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 | 10985f0a26010988d26777d5a6d985b4fbc0a776 (patch) | |
tree | 9a0a539cdaf50a8f35bfbcf65197fce26634feb1 /ErrorResponseCodeGenerator/Program.cs | |
parent | c4fcf37d6018a0a0408920593fbfb7c01af96859 (diff) | |
download | timeline-10985f0a26010988d26777d5a6d985b4fbc0a776.tar.gz timeline-10985f0a26010988d26777d5a6d985b4fbc0a776.tar.bz2 timeline-10985f0a26010988d26777d5a6d985b4fbc0a776.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;
}
}
}
|