private void ShowEditor() { BigListResult <object> res = this._config.ShowListEditor(this.ComboBox.FindForm()); if (res != null) { this.UpdateItemsNoPreserve(); this.SelectedItem = res.Selection; } else { this.SelectedItem = _lastValidSelection; } }
/// <summary> /// The session's observation filters /// </summary> public static DataSet <ObsFilter> ForObsFilter(Core core) { return(new DataSet <ObsFilter>() { Core = core, ListTitle = "Observation Filters", ListSource = core.ObsFilters, ItemDescription = z => z.ParamsAsString() + z.Comment.FormatIf("\r\nComments: "), Icon = Resources.ListIconFilter, HandleEdit = z => { BigListResult <ObsFilter.Condition> newlist = DataSet.ForObsFilterConditions(core, z.DefaultValue).ShowListEditor(z.Owner, z.ReadOnly ? FrmBigList.EShow.ReadOnly : FrmBigList.EShow.Acceptor, null); if (newlist == null || z.ReadOnly) { return null; } return new ObsFilter(z.DefaultValue?.OverrideDisplayName, z.DefaultValue?.Comment, newlist.List); }, HandleCommit = z => core.SetObsFilters(z.List), ListSupportsReorder = true, }); }