ClipboardTest for GitExtensions
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
using System; | |
using System.Windows.Forms; | |
using System.Drawing; | |
namespace ClipboardTest | |
{ | |
public class Form1 : Form | |
{ | |
public Form1() | |
{ | |
Text = "ClipboardTest"; | |
var button = new Button(); | |
button.Location = new Point(10, 10); | |
button.Text = "test"; | |
button.Click += (object s, EventArgs ea) => | |
{ | |
if (Clipboard.ContainsText()) | |
{ | |
string text = Clipboard.GetText(); | |
Clipboard.SetText(text); | |
} | |
}; | |
Controls.Add(button); | |
} | |
} | |
static class Program | |
{ | |
/// <summary> | |
/// The main entry point for the application. | |
/// </summary> | |
[STAThread] | |
static void Main() | |
{ | |
Application.EnableVisualStyles(); | |
Application.SetCompatibleTextRenderingDefault(false); | |
Application.Run(new Form1()); | |
} | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment