Example #1
0
 /// <summary>
 /// 显示替换文本窗体
 /// </summary>
 /// <param name="mainTextBox"></param>
 /// <param name="former"></param>
 public static void ShowReplacer(TextBox mainTextBox, FormEdit.FormerSaver <String> former, bool topMost = false)
 {
     if (instance == null)
     {
         instance = new FormReplacer(mainTextBox, former);
         instance.textBox替换内容.Text = Clipboard.GetText();
         instance.TopMost          = topMost;
         instance.Show();
         instance.textBox替换为.Focus();
     }
     else
     {
         instance.textBox替换内容.Text = Clipboard.GetText();
         instance.TopMost          = topMost;
         instance.Focus();
         instance.textBox替换为.Focus();
     }
 }
Example #2
0
 private FormReplacer(TextBox mainTextBox, FormEdit.FormerSaver <String> former)
 {
     InitializeComponent();
     this.mainTextBox = mainTextBox;
     this.former      = former;
 }