private void FindDialog_Load(object sender, EventArgs e)
 {
     SearchParams sp = new SearchParams();
     this.textBoxSearch.Text = sp.Text;
     this.checkBoxLang.Checked = sp.SearchLanguage;
     this.checkBoxKey.Checked = sp.SearchKeys;
     this.checkBoxText.Checked = sp.SearchText;
     this.checkBoxFile.Checked = sp.SearchFileName;
     this.radioButtonRegexp.Checked = sp.UseRegex;
     this.checkBoxCS.Checked = sp.OptCase;
     this.checkBoxWord.Checked = sp.OptWord;
 }
 private void buttonFind_Click(object sender, EventArgs e)
 {
     var sp = new SearchParams(
         this.textBoxSearch.Text
         , this.checkBoxLang.Checked
         , this.checkBoxKey.Checked
         , this.checkBoxText.Checked
         , this.checkBoxFile.Checked
         , this.radioButtonRegexp.Checked
         , this.checkBoxCS.Checked
         , this.checkBoxWord.Checked);
     sp.Save();
     this.MyForm.CurrentSearch = sp;
     this.Close();
 }