public EditPatternForm(FilterRule rule, string property) : this(property) { Pattern = rule; searchTextBox.Text = rule.SearchString; negateCheckBox.Checked = rule.Negate; switch (rule.FilterType) { case FilterType.StartsWith: typeSelection.ChangeSelection(0); break; case FilterType.EndsWidth: typeSelection.ChangeSelection(1); break; case FilterType.Contains: typeSelection.ChangeSelection(2); break; case FilterType.Equals: typeSelection.ChangeSelection(3); break; } }