private void Window_Closed(object sender, System.EventArgs e)
        {
            textToFind    = txtFind2.Text;
            caseSensitive = (cbCaseSensitive.IsChecked == true);
            wholeWord     = (cbWholeWord.IsChecked == true);
            useRegex      = (cbRegex.IsChecked == true);
            useWildcards  = (cbWildcards.IsChecked == true);
            searchUp      = (cbSearchUp.IsChecked == true);

            theDialog = null;
        }
 public FindReplaceDialog()
 {
     theDialog = this;
     InitializeComponent();
 }