private void SubmitFilter() { string text = filterComboBox.SelectedIndex != -1 ? filterComboBox.Items[filterComboBox.SelectedIndex] as string : filterComboBox.Text; LibraryBrowserFilter.Text = text; if (!string.IsNullOrEmpty(text)) { LibraryModel.AddFilter(text); } }