예제 #1
0
파일: Form1.cs 프로젝트: djesoft/TestForm
 private void Cut1_Click(object sender, EventArgs e)
 {
     if (TextBox1.SelectionLength > 0)
     {
         TextBox1.Cut();
     }
 }
예제 #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;
            }
        }
예제 #3
0
 private void CutToolStripMenuItem_Click(object sender, EventArgs e)
 {
     TextBox1.Cut();
 }
예제 #4
0
 private void Cut_Click(object sender, RoutedEventArgs e)
 {
     TextBox1.Cut();
 }