예제 #1
0
 private void Find(object sender, ExecutedRoutedEventArgs e)
 {
     if (_FindWindow == null || !_FindWindow.IsLoaded)
     {
         _FindWindow = new FindWindow();
         _FindWindow.Show();
         _FindWindow._Textbox.Text = _RitchTextBox.SelectedText;
         if (_RitchTextBox.SelectionLength == 0)
         {
             _FindWindow._Textbox.Text = Clipboard.GetText();
         }
         _FindWindow._Textbox.SelectAll();
         _FindWindow._Textbox.KeyDown += new KeyEventHandler(_Textbox_KeyDown);
     }
 }
예제 #2
0
 private void Find(object sender, ExecutedRoutedEventArgs e)
 {
     if (_FindWindow == null || !_FindWindow.IsLoaded)
     {
         _FindWindow = new FindWindow();
         _FindWindow.Show();
         _FindWindow._Textbox.Text = _RitchTextBox.SelectedText;
         if (_RitchTextBox.SelectionLength == 0) _FindWindow._Textbox.Text = Clipboard.GetText();
         _FindWindow._Textbox.SelectAll();
         _FindWindow._Textbox.KeyDown += new KeyEventHandler(_Textbox_KeyDown);
     }
 }