diff options
author | crupest <crupest@outlook.com> | 2020-02-02 22:52:33 +0800 |
---|---|---|
committer | crupest <crupest@outlook.com> | 2020-02-02 22:52:33 +0800 |
commit | bcf15408ca1a1a16ccaca959861e812e6b24a33d (patch) | |
tree | 9a0a539cdaf50a8f35bfbcf65197fce26634feb1 /ErrorResponseCodeGenerator/Program.cs | |
parent | 12f85448cde94d70d9030b757b09caa5e2f53061 (diff) | |
download | timeline-bcf15408ca1a1a16ccaca959861e812e6b24a33d.tar.gz timeline-bcf15408ca1a1a16ccaca959861e812e6b24a33d.tar.bz2 timeline-bcf15408ca1a1a16ccaca959861e812e6b24a33d.zip |
Add copy to clipboard function to code generator.
Diffstat (limited to 'ErrorResponseCodeGenerator/Program.cs')
-rw-r--r-- | ErrorResponseCodeGenerator/Program.cs | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/ErrorResponseCodeGenerator/Program.cs b/ErrorResponseCodeGenerator/Program.cs index cf021927..5ea8aaca 100644 --- a/ErrorResponseCodeGenerator/Program.cs +++ b/ErrorResponseCodeGenerator/Program.cs @@ -57,6 +57,12 @@ $ ".Replace("$", code);
Console.WriteLine(code);
+
+ TextCopy.Clipboard.SetText(code);
+ var oldColor = Console.ForegroundColor;
+ Console.ForegroundColor = ConsoleColor.Green;
+ Console.WriteLine("Code has copied to clipboard!");
+ Console.ForegroundColor = oldColor;
}
}
}
|