private void optionsToolStripMenuItem_Click(object sender, EventArgs e) { TextEnterBox temp = new TextEnterBox(windowTitle.ToString()); temp.onClose += new TextEnterBox.test(getWinTitle); temp.Show(); }
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(); } } }
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(); } } }