示例#1
0
        private void optionsToolStripMenuItem_Click(object sender, EventArgs e)
        {
            TextEnterBox temp = new TextEnterBox(windowTitle.ToString());

            temp.onClose += new TextEnterBox.test(getWinTitle);
            temp.Show();
        }
示例#2
0
 private void getWinTitle(string t)
 {
     try {
         windowTitle = new Regex(t, RegexOptions.Compiled);
     } catch (System.ArgumentException) {
         System.Windows.Forms.DialogResult res = MessageBox.Show("ERROR: Invalid Regex! \n Please use a simple string or correct your regex.", "Error", MessageBoxButtons.RetryCancel, MessageBoxIcon.Error);
         if (res == System.Windows.Forms.DialogResult.Retry)
         {
             TextEnterBox temp = new TextEnterBox(windowTitle.ToString());
             temp.onClose += new TextEnterBox.test(getWinTitle);
             temp.Show();
         }
     }
 }
示例#3
0
 private void optionsToolStripMenuItem_Click(object sender, EventArgs e)
 {
     TextEnterBox temp = new TextEnterBox(windowTitle.ToString());
     temp.onClose += new TextEnterBox.test(getWinTitle);
     temp.Show();
 }
示例#4
0
 private void getWinTitle(string t)
 {
     try {
         windowTitle = new Regex(t, RegexOptions.Compiled);
     } catch(System.ArgumentException) {
         System.Windows.Forms.DialogResult res = MessageBox.Show("ERROR: Invalid Regex! \n Please use a simple string or correct your regex.", "Error", MessageBoxButtons.RetryCancel, MessageBoxIcon.Error);
         if (res == System.Windows.Forms.DialogResult.Retry) {
             TextEnterBox temp = new TextEnterBox(windowTitle.ToString());
             temp.onClose += new TextEnterBox.test(getWinTitle);
             temp.Show();
         }
     }
 }