/// <summary> /// コンストラクタ /// </summary> /// <param name="searchData"></param> public SearchForm(FileSearchData searchData) { InitializeComponent(); InitSetting(searchData); }
/// <summary> /// 初期状態に戻します。 /// </summary> /// <param name="searchData">検索設定データ</param> public void InitSetting(FileSearchData searchData) { if (searchData == null) { termsTextBox.Text = string.Empty; ignoreCaseCheckBox.Checked = false; vagueCheckBox.Checked = false; targetComboBox.SelectedIndex = (int)FileSearchData.TargetKind.All; } else { termsTextBox.Text = searchData.SearchWord; ignoreCaseCheckBox.Checked = searchData.IgnoreCase; vagueCheckBox.Checked = searchData.Vague; targetComboBox.SelectedIndex = (int)searchData.Target; } }