Skip to content

Instantly share code, notes, and snippets.

@mrexodia
Created January 17, 2015 18:30
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
Star You must be signed in to star a gist
Save mrexodia/d5853552677f16ad0253 to your computer and use it in GitHub Desktop.
ClipboardTest for GitExtensions
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