private Expression <Func <T, bool> > BuildRuntimeFilter(IEnumerable <FilterEntry> filterEntries) { var predicate = PredicateBuilder.False <T>(); foreach (var filterEntry in filterEntries) { FilterEntry temp = filterEntry; int runtimeFrom; if (!int.TryParse(temp.ValueFrom, out runtimeFrom)) { runtimeFrom = -1; } int runtimeTo; if (!int.TryParse(temp.ValueTo, out runtimeTo)) { runtimeTo = -1; } switch (filterEntry.Operator) { case FilterEntryOperator.Equal: predicate = predicate.Or(p => p.Movie.Runtime == runtimeFrom); break; case FilterEntryOperator.NotEqual: predicate = predicate.Or(p => p.Movie.Runtime != runtimeFrom); break; case FilterEntryOperator.Greater: predicate = predicate.Or(p => p.Movie.Runtime > runtimeFrom); break; case FilterEntryOperator.Lesser: predicate = predicate.Or(p => p.Movie.Runtime < runtimeFrom); break; case FilterEntryOperator.Between: predicate = predicate.Or(p => p.Movie.Runtime >= runtimeFrom && p.Movie.Runtime <= runtimeTo); break; default: throw new InvalidFilterException($"Der Operator '{filterEntry.Operator}' ist für die Laufzeit nicht zulässig!"); } } return(predicate); }
private Expression <Func <T, bool> > BuildRatingFilter(IEnumerable <FilterEntry> filterEntries) { var predicate = PredicateBuilder.False <T>(); foreach (var filterEntry in filterEntries) { FilterEntry temp = filterEntry; int ratingFrom = temp.ValueFrom != null?int.Parse(temp.ValueFrom) : 0; int ratingTo = !string.IsNullOrEmpty(temp.ValueTo) ? int.Parse(temp.ValueTo) : 0; switch (filterEntry.Operator) { case FilterEntryOperator.Equal: predicate = predicate.Or(p => p.Movie.Rating == ratingFrom); break; case FilterEntryOperator.NotEqual: predicate = predicate.Or(p => p.Movie.Rating != ratingFrom); break; case FilterEntryOperator.Greater: predicate = predicate.Or(p => p.Movie.Rating > ratingFrom); break; case FilterEntryOperator.Lesser: predicate = predicate.Or(p => p.Movie.Rating < ratingFrom); break; case FilterEntryOperator.Between: predicate = predicate.Or(p => p.Movie.Rating >= ratingFrom && p.Movie.Rating <= ratingTo); break; default: throw new InvalidFilterException($"Der Operator '{filterEntry.Operator}' ist für die Bewertung nicht zulässig!"); } } return(predicate); }
public static IList <FilterEntryOperator> GetAllowedOperators(FilterEntry filterEntry) { switch (filterEntry.FilterEntryType.Property) { case FilterEntryProperty.Title: case FilterEntryProperty.Description: case FilterEntryProperty.Remarks: return(new List <FilterEntryOperator>() { FilterEntryOperator.Equal, FilterEntryOperator.NotEqual, FilterEntryOperator.Contains }); case FilterEntryProperty.Source: case FilterEntryProperty.Genre: return(new List <FilterEntryOperator>() { FilterEntryOperator.Equal, FilterEntryOperator.NotEqual }); case FilterEntryProperty.Rating: case FilterEntryProperty.Runtime: case FilterEntryProperty.ReleaseDate: case FilterEntryProperty.LastSeen: return(new List <FilterEntryOperator>() { FilterEntryOperator.Equal, FilterEntryOperator.NotEqual, FilterEntryOperator.Between, FilterEntryOperator.Greater, FilterEntryOperator.Lesser }); default: return(new List <FilterEntryOperator>()); } }
/// <summary> /// Update the procedure filter. /// </summary> public void UpdateFilter() { procFilter[icao, rwy, IsSid] = new FilterEntry( View.IsBlacklist, GetSelectedProcedures().ToList(), IsSid); }
public override void Init() { string filter = SQLiteConnectionUser.GetSettingString(DbSave + "Campaign", ""); List <string> filtarray = BaseUtils.StringParser.ParseWordList(filter); savedfilterentries = new List <FilterEntry>(); for (int i = 0; i < filtarray.Count / 5; i++) { FilterEntry f = new FilterEntry(filtarray, i * 5); if (f.Type != FilterEntry.EntryType.Invalid) { savedfilterentries.Add(f); } } buttonExtEditCampaign.Enabled = false; discoveryform.OnHistoryChange += Discoveryform_OnHistoryChange; discoveryform.OnNewEntry += Discoveryform_OnNewEntry; checkBoxCustomGridOn.Checked = SQLiteConnectionUser.GetSettingBool(DbSave + "Gridshow", false); checkBoxCustomGridOn.Visible = IsFloatingWindow; transparentfont = EDDTheme.Instance.GetFontAtSize(12); BaseUtils.Translator.Instance.Translate(this); BaseUtils.Translator.Instance.Translate(contextMenuStrip, this); BaseUtils.Translator.Instance.Translate(toolTip, this); }
/// <summary> /// Load From File Click Event /// </summary> /// <param name="sender">Sender Object</param> /// <param name="e">Routed Event Argument</param> private void LoadFromFileClick(object sender, RoutedEventArgs e) { try { var view = AppContext.ActiveView as ViewImage; if (view != null) { Imaging imageData = view.GetImagingData(); if (imageData != null) { ImageMetaData imageMetaData = imageData.MetaData; if (imageMetaData != null) { // get the filename (and path) with the common dialog var loadFileDialog = new CommonDialog(); var filter = new FilterEntry(Strings.XmlFileDescription, Strings.XmlFileExtension); loadFileDialog.Filters.Add(filter); loadFileDialog.ShowOpen(); string fileName = loadFileDialog.FileName; if (string.IsNullOrEmpty(fileName) || !File.Exists(fileName)) { return; } // read the meta data imageMetaData.ReadFromXml(fileName); } } } } catch (Exception ex) { Util.ReportException(ex); } }
public override void Init() { string filter = EliteDangerousCore.DB.UserDatabase.Instance.GetSettingString(DbSave + "Campaign", ""); List <string> filtarray = BaseUtils.StringParser.ParseWordList(filter); dataGridViewCombat.DefaultCellStyle.WrapMode = DataGridViewTriState.False; dataGridViewCombat.AutoSizeRowsMode = DataGridViewAutoSizeRowsMode.DisplayedCells; savedfilterentries = new List <FilterEntry>(); for (int i = 0; i < filtarray.Count / 5; i++) { FilterEntry f = new FilterEntry(filtarray, i * 5); if (f.Type != FilterEntry.EntryType.Invalid) { savedfilterentries.Add(f); } } buttonExtEditCampaign.Enabled = false; discoveryform.OnHistoryChange += Discoveryform_OnHistoryChange; discoveryform.OnNewEntry += Discoveryform_OnNewEntry; checkBoxCustomGridOn.Checked = EliteDangerousCore.DB.UserDatabase.Instance.GetSettingBool(DbSave + "Gridshow", false); checkBoxCustomGridOn.Visible = IsFloatingWindow; transparentfont = EDDTheme.Instance.GetFont; BaseUtils.Translator.Instance.Translate(this); BaseUtils.Translator.Instance.Translate(toolTip, this); labelTarget.Size = new Size(1280, 24); labelTarget.Text = "No Target".T(EDTx.UserControlCombatPanel_NT); }
private void OKBtn_Click(object sender, EventArgs e) { string filter; string globbing; if (IsRegExp.Checked) { try { new System.Text.RegularExpressions.Regex(FilterText.Text); } catch (Exception ex) { MessageBox.Show(this, string.Format(Strings.FilterDialog.InvalidRegExpMessage, ex.Message), Application.ProductName, MessageBoxButtons.OK, MessageBoxIcon.Error); return; } filter = FilterText.Text; globbing = null; } else { filter = Library.Utility.FilenameFilter.ConvertGlobbingToRegExp(FilterText.Text); globbing = FilterText.Text; } m_filter = new FilterEntry(Inclusive.Checked, filter, globbing); this.DialogResult = DialogResult.OK; this.Close(); }
private void comboBoxCustomCampaign_SelectedIndexChanged(object sender, EventArgs e) { if (!disablecombobox && comboBoxCustomCampaign.SelectedIndex >= 0) { int entry = comboBoxCustomCampaign.SelectedIndex; FilterEntry f = displayedfilterentries[entry]; if (f.Type == FilterEntry.EntryType.NewEntry) { FilterEntry newe = new FilterEntry("Enter name", FilterEntry.EntryType.Time); if (EditEntry(newe, true, false) == DialogResult.OK) { current = newe; savedfilterentries.Add(current); FillCampaignCombo(); } } else { current = f; } buttonExtEditCampaign.Enabled = current != null && current.Type == FilterEntry.EntryType.Time; Display(); } }
public void UpdateFilterEntry(Model.NodeData n, FilterEntry f) { Model.ConnectionPointData p = n.OutputPoints.Find(v => v.Id == f.ConnectionPointId); UnityEngine.Assertions.Assert.IsNotNull(p); p.Label = f.Instance.Object.Label; }
private FilterEntry CreateFilterEntry(RootPathFilter filter) { FilterEntry filterEntry = new FilterEntry(filter); filterEntry.Action += FilterEntry_Action; filterEntry.Changed += FilterEntry_Changed; return(filterEntry); }
public void AddFilterCondition(Model.NodeData n, IFilter filter) { var point = n.AddOutputPoint(filter.Label); var newEntry = new FilterEntry(filter, point); m_filter.Add(newEntry); UpdateFilterEntry(n, newEntry); }
private void UpdateFilter(object sender, EventArgs e) { procFilter[icao, rwy] = new FilterEntry( listTypeComboBox.SelectedIndex == 0, CheckedItems().ToList()); FinishedSelection?.Invoke(sender, e); }
private void IsEnabled_Unchecked(object sender, RoutedEventArgs e) { FilterEntry fi = ((FilterEntry)((FrameworkElement)e.OriginalSource).DataContext); UncheckedFiltersEx[LeagueIndex].Add(fi.Owner + '@' + fi.Stash); RefreshVisibilityOfFilteredItems(); FiltersChanged = true; }
private FilterDetailItemViewModel CreateFilterDetailItemViewModel(FilterEntry filterEntry) { var filterDetailItemViewModel = new FilterDetailItemViewModel() { FilterEntry = filterEntry }; return(filterDetailItemViewModel); }
public void ExistsTest() { var f = new ProcedureFilter(); Assert.IsFalse(f.Exists("ABCD", "08R", true)); f["ABCD", "08R", true] = new FilterEntry(false, new[] { "SID0" }, true); Assert.IsTrue(f.Exists("ABCD", "08R", true)); }
private void CheckCurrent() { if (current == null || displayedfilterentries.Find(x => x.UniqueID.Equals(current.UniqueID)) == null) { current = null; disablecombobox = true; comboBoxCustomCampaign.SelectedIndex = -1; disablecombobox = false; } }
private FilterEntry AddFilterEntry() { FilterEntry filterEntry = FilterEntry.CreateNew <FilterEntry>(); filterEntry.Filter = Filter; filterEntry.FilterEntryType = new FilterEntryType(); Filter.FilterEntries.Add(filterEntry); // Den Filter auf Modified setzen, da sonst nicht gespeichert wird Filter.IsModified = true; return(filterEntry); }
private void GenerateFilterEntries(List <IFilterLine> lineList) { FilterEntries.Clear(); FilterEntry lastDataEntry = new FilterEntry(); FilterEntry lastCommentEntry = new FilterEntry(); FilterConstants.FilterEntryType entryType = FilterConstants.FilterEntryType.Unknown; foreach (var line in lineList) { if (!string.IsNullOrEmpty(line.Ident)) { entryType = FilterConstants.FilterEntryType.Content; if (line.Ident == "Show" || line.Ident == "Hide") { lastDataEntry = FilterEntry.CreateDataEntry(line); FilterEntries.Add(lastDataEntry); } else { lastDataEntry.Content.Add(line); } } else if (line.Comment != string.Empty) { if (entryType != FilterConstants.FilterEntryType.Comment) { lastCommentEntry = FilterEntry.CreateCommentEntry(line); entryType = FilterConstants.FilterEntryType.Comment; FilterEntries.Add(lastCommentEntry); } else { lastCommentEntry.Content.AddComment(line); } entryType = FilterConstants.FilterEntryType.Comment; } else if (line.Comment == string.Empty) { if (entryType == FilterConstants.FilterEntryType.Filler) { continue; } else { FilterEntries.Add(FilterEntry.CreateFillerEntry()); entryType = FilterConstants.FilterEntryType.Filler; } } } }
public int CompareTo(object other) { FilterEntry fi = other as FilterEntry; int cmp = Owner.CompareTo(fi.Owner); if (cmp != 0) { return(cmp); } return(Stash.CompareTo(fi.Stash)); }
internal static int FilterSortComparison(FilterEntry a, FilterEntry b) { var compareLength = b.OriginalEntry.Length.CompareTo( a.OriginalEntry.Length); if (compareLength != 0) { return(compareLength); } return(string.Compare(a.Text, b.Text, StringComparison.Ordinal)); }
public GeneralControlViewModel() { Type[] filterTypes = { typeof(WeatherFilter), typeof(SeasonFilter), typeof(LightLevelFilter) }; foreach (Type type in filterTypes) { FilterEntry fe = (FilterEntry)Activator.CreateInstance(type); Filters.Add(fe); } RefreshProfiles(); }
public IQueryable <FilterResultModel> Filter(FilterEntry entry, string deviceclass, string devicetype, string department, string location) { switch (entry) { case FilterEntry.It: return(new ItDeviceFilter(_context).Filter(deviceclass, devicetype, department, location).ToFilterResultModel()); case FilterEntry.Aspp: return(new AsppDeviceFilter(_context).Filter(deviceclass, devicetype, department, location).ToFilterResultModel()); case FilterEntry.Pa: return(new PaDeviceFilter(_context).Filter(deviceclass, devicetype, department, location).ToFilterResultModel()); default: return(null); } }
public void InsertionAndModifyTest() { var f = new ProcedureFilter(); f["ABCD", "08R", true] = new FilterEntry(false, new[] { "SID0" }, true); f["ABCD", "08R", true] = new FilterEntry(false, new[] { "SID1" }, true); var entry = f["ABCD", "08R", true]; Assert.IsFalse(entry.IsBlackList); Assert.AreEqual(1, entry.Procedures.Count); Assert.IsTrue(entry.Procedures.Contains("SID1")); }
/// <summary> /// Event Handler for clicking image path button /// </summary> /// <param name="sender">sender object</param> /// <param name="e">routed event args</param> private void ImagePathBtnClick(object sender, RoutedEventArgs e) { try { // 1) Open File Dialog with wiff/img filter string fileName = string.Empty; var openFileDialog = new CommonDialog(); if (AppContext.SpecFileLoaders != null && AppContext.SpecFileLoaders.Count > 0) { foreach (ISpecFileLoader loader in AppContext.SpecFileLoaders) { FileTypeDescriptorList supportedFileTypes = loader.SupportedFileTypes; if (supportedFileTypes != null) { foreach (FileTypeDescriptor fileType in supportedFileTypes) { if (fileType.Extensions != null) { foreach (string extension in fileType.Extensions) { var filter = new FilterEntry(fileType.Description, extension); openFileDialog.Filters.Add(filter); } } } } } // proceed if at least one loader is ready to accept a file... if (openFileDialog.Filters.Count > 0) { // Add the all files filter openFileDialog.Filters.Add(new FilterEntry(Strings.AllFilesDesc, Strings.AllFilesExt)); openFileDialog.ShowOpen(); fileName = openFileDialog.FileName; } } if (!string.IsNullOrEmpty(fileName) || File.Exists(fileName)) { // 2) Update ImagePathTB.Text = fileName; } } catch (Exception ex) { Util.ReportException(ex); } }
/// <summary> /// Method call for SaveToFileClick /// </summary> /// <param name="sender">Sender Object</param> /// <param name="e">Routed Event Arg</param> private void SaveToFileClick(object sender, RoutedEventArgs e) { try { var view = AppContext.ActiveView as ViewImage; if (view != null) { Imaging imageData = view.GetImagingData(); if (imageData != null) { ImageMetaData imageMetaData = imageData.MetaData; if (imageMetaData != null && imageMetaData.Count > 0) { // get the filename (and path) with the common dialog var saveAsFileDialog = new CommonDialog(); var filter = new FilterEntry(Strings.XmlFileDescription, Strings.XmlFileExtension); saveAsFileDialog.Filters.Add(filter); if (imageData.ObjectDocument != null) { if (!string.IsNullOrEmpty(imageData.ObjectDocument.FileName)) { string proposal = Path.GetFileNameWithoutExtension(imageData.ObjectDocument.FileName); proposal += "_meta" + Strings.XmlFileExtension; saveAsFileDialog.FileName = proposal; } } saveAsFileDialog.ShowSaveAs(); string fileName = saveAsFileDialog.FileName; if (string.IsNullOrEmpty(fileName)) { return; } string extension = Path.GetExtension(fileName); if (string.IsNullOrEmpty(extension)) { fileName += Strings.XmlFileExtension; } // write the meta data imageMetaData.SaveToXml(fileName); } } } } catch (Exception ex) { Util.ReportException(ex); } }
private void renameFilterButton_Click(object sender, EventArgs e) { log.Debug("renameFilterButton_Click"); FilterEntry item = (FilterEntry)this.filtersComboBox.SelectedItem; using (InputBox dlg = new InputBox("Change filter name", "Enter filter name:", item.FilterName)) { if (dlg.ShowDialog(this) == DialogResult.OK) { item.FilterName = dlg.Value; this.filtersComboBox.Items[this.filtersComboBox.SelectedIndex] = item; } } }
private void SaveCurrentFilter() { FilterEntry filter = filterManager.CurrentFilter; log.Debug("Saving current filter: " + filter.FilterName); filterSettingsDateTime.SaveContent(filter.DateTimeRange); filterSettingsThreads.SaveContent(filter.Threads); filterSettingsTypes.SaveContent(filter.Types); filterSettingsClasses.SaveContent(filter.Classes); filterSettingsMessages.SaveContent(filter.Messages); log.Debug("Filter saved"); }
private void LoadCurrentGroup() { FilterEntry filter = filterManager.CurrentFilter; log.Debug("Loading current filter: " + filter.FilterName); filterSettingsDateTime.LoadContent(filter.DateTimeRange, currentLogEntry == null ? DateTime.MinValue : currentLogEntry.Date, null); filterSettingsThreads.LoadContent(filter.Threads, currentLogEntry == null ? String.Empty : currentLogEntry.Thread, getDistinctValues.Threads); filterSettingsTypes.LoadContent(filter.Types, currentLogEntry == null ? String.Empty : currentLogEntry.Type, getDistinctValues.Types); filterSettingsClasses.LoadContent(filter.Classes, currentLogEntry == null ? String.Empty : currentLogEntry.Class, getDistinctValues.Classes); filterSettingsMessages.LoadContent(filter.Messages, currentLogEntry == null ? String.Empty : currentLogEntry.Message, null); log.Debug("Filter loaded"); }
private void buttonExtEditCampaign_Click(object sender, EventArgs e) { if (current != null) // should always be non null, but double check. Note must be a saved entry, and we never remake these, only the mission ones { DialogResult res = EditEntry(current, false, true); if (res == DialogResult.Abort) { savedfilterentries.Remove(current); current = null; } CheckCurrent(); FillCampaignCombo(); Display(); } }
protected void getContactItems(string uid, Dictionary <string,string> mapObj) { String str; getItemsRequest req = new getItemsRequest(); getItemsResponse resp; Filter Flt = new Filter(); FilterEntry FEN = new FilterEntry(); FEN.op = FilterOp.eq; FEN.field = "@type"; FEN.value = "Contact"; Flt.element = FEN; req.filter = Flt; req.container = uid; resp = ws.getItemsRequest(req); // resp = ws.getItemRequest(req); if (0 == resp.status.code) { str = "Items: for Contact folder "; if (null != resp.items) { str += resp.items.Length; int cnt = resp.items.Length; cnt = cnt - 1; while (cnt >= 0) { Contact mt = (Contact)resp.items[cnt]; str += mt.officeInfo; str += "\n"; str += mt.name; cnt--; if (mt.officeInfo != null) mapObj.Add("Location", mt.officeInfo.location.ToString()); if (mt.officeInfo != null) mapObj.Add("Organization", mt.officeInfo.organization.ToString()); if (mt.officeInfo != null) mapObj.Add("Title", mt.officeInfo.title.ToString()); if (mt.name != null) mapObj.Add("Name", mt.name.ToString()); if (mt.personalInfo != null) mapObj.Add("birthday", mt.personalInfo.birthday.ToString()); if (mt.phoneList != null) { int count = mt.phoneList.phone.Length; while (count > 0) { mapObj.Add("Phone" + mt.phoneList.phone[count-1].type.ToString(), mt.phoneList.phone[count-1].Value.ToString()); count--; } } if (mt.imList != null) mapObj.Add("imList", mt.imList.ToString()); if (mt.fullName.lastName != null) mapObj.Add("LastName", mt.fullName.lastName.ToString()); if (mt.fullName.firstName != null) mapObj.Add("FirstName", mt.fullName.firstName.ToString()); if (mt.fullName.middleName != null) mapObj.Add("MiddleName", mt.fullName.middleName.ToString()); if (mt.addressList != null) mapObj.Add("address", mt.addressList.address.ToString()); if (mt.addressList != null) mapObj.Add("mailingaddress", mt.addressList.mailingAddress.ToString()); if (mt.contacts != null) mapObj.Add("Contacts", mt.contacts.ToString()); } str += resp.status.code.ToString(); } System.Console.WriteLine(str); } else { System.Console.WriteLine(resp.status.description); } }
public FilterWidgetRow(FileSearchFilter filter) : base(0, 0, 1, 1) { TreeIter iter; CellRendererText textCell; ListStore store; this.filter = filter; matchTypeStore = new ListStore(typeof(string), typeof(FileSearchFilterComparison)); textCell = new CellRendererText(); matchTypeComboBox = new ComboBox(); matchTypeComboBox.Model = matchTypeStore; matchTypeComboBox.PackStart(textCell, true); matchTypeComboBox.AddAttribute(textCell, "text", 0); matchTypeComboBox.RowSeparatorFunc = ComboSeparatorFunc; matchTypeComboBox.Changed += MatchTypeChanged; textCell = new CellRendererText(); store = new ListStore(typeof(string), typeof(FilterEntryMode), typeof(FileSearchFilterField)); filterTextEntry = new FilterEntry(filter); filterTextEntry.Changed += FilterTextChanged; fieldComboBox = new ComboBox(); fieldComboBox.PackStart(textCell, true); fieldComboBox.AddAttribute(textCell, "text", 0); fieldComboBox.SetCellDataFunc(textCell, FieldComboDataFunc); store.AppendValues("File Name", FilterEntryMode.String, FileSearchFilterField.FileName); store.AppendValues("Size", FilterEntryMode.Size, FileSearchFilterField.Size); store.AppendValues("-"); store.AppendValues("(Audio)", null); store.AppendValues("Artist", FilterEntryMode.String, FileSearchFilterField.Artist); store.AppendValues("Album", FilterEntryMode.String, FileSearchFilterField.Album); store.AppendValues("Bitrate", FilterEntryMode.Speed, FileSearchFilterField.Bitrate); store.AppendValues("-"); store.AppendValues("(Video)", null); store.AppendValues("Resolution", FilterEntryMode.Dimentions, FileSearchFilterField.Resolution); store.AppendValues("-"); store.AppendValues("(Images)", null); store.AppendValues("Dimentions", FilterEntryMode.Dimentions, FileSearchFilterField.Dimentions); fieldComboBox.Model = store; fieldComboBox.RowSeparatorFunc = ComboSeparatorFunc; fieldComboBox.Changed += FieldChanged; /* if (fieldComboBox.Model.GetIterFirst(out iter)) { fieldComboBox.SetActiveIter(iter); } */ addButton = new Button(); addButton.Relief = ReliefStyle.None; addButton.Image = new Image(Gui.LoadIcon(16, "list-add")); addButton.Clicked += AddButtonClicked; removeButton = new Button(); removeButton.Relief = ReliefStyle.None; removeButton.Image = new Image(Gui.LoadIcon(16, "list-remove")); removeButton.Clicked += RemoveButtonClicked; box = new HBox(); box.PackStart(fieldComboBox, false, false, 0); box.PackStart(matchTypeComboBox, false, false, 3); box.PackStart(filterTextEntry, true, true, 0); box.PackStart(removeButton, false, false, 0); box.PackStart(addButton, false, false, 0); this.TopPadding = 3; this.BottomPadding = 3; this.Add(box); fieldComboBox.Model.GetIterFirst(out iter); do { FileSearchFilterField field = (FileSearchFilterField)fieldComboBox.Model.GetValue(iter, 2); if (field == filter.Field) { fieldComboBox.SetActiveIter(iter); break; } } while (fieldComboBox.Model.IterNext(ref iter)); matchTypeComboBox.Model.GetIterFirst(out iter); do { FileSearchFilterComparison comp = (FileSearchFilterComparison)matchTypeComboBox.Model.GetValue(iter, 1); if (comp == filter.Comparison) { matchTypeComboBox.SetActiveIter(iter); break; } } while (matchTypeComboBox.Model.IterNext(ref iter)); filterTextEntry.Text = filter.Text; }
public FilterDialog(FilterEntry filter) : this() { m_filter = filter; }