Beispiel #1
0
 private void Undo1_Click(object sender, EventArgs e)
 {
     if (TextBox1.CanUndo)
     {
         TextBox1.Undo();
     }
 }
Beispiel #2
0
        private void Edit(string editMenu)
        {
            switch (editMenu)
            {
            case "Undo":
                if (TextBox1.CanUndo == true)
                {
                    TextBox1.Undo();
                }
                break;

            case "Cut":
                if (TextBox1.SelectedText != "")
                {
                    TextBox1.Cut();
                }
                break;

            case "Copy":
                Clipboard.SetDataObject(TextBox1.SelectedText, true);
                break;

            case "Paste":
                TextBox1.Paste();
                break;

            case "Delete":
                TextBox1.SelectedText = "";
                break;

            case "BingSearch":
                string bingSearch = TextBox1.SelectedText;
                System.Diagnostics.Process.Start(string.Format("https://www.bing.com/search?q={0}", bingSearch));
                break;
            }
        }
Beispiel #3
0
 private void UndoToolStripMenuItem_Click(object sender, EventArgs e)
 {
     TextBox1.Undo();
 }
 private void Undo_Click(object sender, RoutedEventArgs e)
 {
     TextBox1.Undo();
 }