/// <summary> /// Initializes a new instance of the <see cref="ElasticSearchFilterController"/> class. /// </summary> public ElasticSearchFilterController() { #pragma warning disable CC0009 // Use object initializer #pragma warning disable S2583 // Conditionally executed blocks should be reachable SingleChoiceAction tempAction = null; try { tempAction = new SingleChoiceAction(this, "FilterFields", PredefinedCategory.FullTextSearch); tempAction.Caption = "Search in"; tempAction.ImageName = "Action_ParametrizedAction"; tempAction.Execute += FilterFieldsActionExecute; filterFieldsAction = tempAction; tempAction = null; } finally { if (tempAction != null) { tempAction.Dispose(); } } tempAction = null; try { tempAction = new SingleChoiceAction(this, "LookupFilterFields", "ElasticActionContainer"); tempAction.Caption = "Search in"; tempAction.ImageName = "Action_ParametrizedAction"; tempAction.Execute += FilterFieldsActionExecute; lookupFilterFieldsAction = tempAction; tempAction = null; } finally { if (tempAction != null) { tempAction.Dispose(); } } tempAction = null; try { tempAction = new SingleChoiceAction(this, "LookupSetFilter", "ElasticActionContainer"); tempAction.Caption = "Filter"; tempAction.ImageName = "MenuBar_Filter"; tempAction.Execute += LookupSetFilterAction_Execute; lookupSetFilterAction = tempAction; tempAction = null; } finally { if (tempAction != null) { tempAction.Dispose(); } } #pragma warning restore S2583 // Conditionally executed blocks should be reachable #pragma warning restore CC0009 // Use object initializer }
/// <summary> /// Initializes a new instance of the <see cref="FilterPanelListViewController"/> class. /// </summary> public FilterPanelListViewController() { ParametrizedAction tempAction = null; try { tempAction = new ParametrizedAction(this, "FilterPanelSearchEdit", FilterPanelGroup, typeof(string)) { Caption = "Search", ToolTip = "Search entries that contain the specified words", NullValuePrompt = "Text to search", PaintStyle = ActionItemPaintStyle.Image }; tempAction.Execute += SearchTextActionExecute; searchTextAction = tempAction; tempAction = null; } finally { if (tempAction != null) { tempAction.Dispose(); } } SimpleAction tempSimpleAction = null; try { tempSimpleAction = new SimpleAction(this, "FilterPanelFuzzySearch", FilterPanelGroup) { Caption = "Fuzzy Search", PaintStyle = ActionItemPaintStyle.Caption }; tempSimpleAction.Execute += FuzzySearchActionExecute; fuzzySearchAction = tempSimpleAction; tempSimpleAction = null; } finally { if (tempSimpleAction != null) { tempSimpleAction.Dispose(); } } SingleChoiceAction tempChoiceAction = null; try { tempChoiceAction = new SingleChoiceAction(this, "FilterPanelFilterFields", FilterPanelGroup) { Caption = "Search in", ImageName = "Action_ParametrizedAction", PaintStyle = ActionItemPaintStyle.Caption }; newFilterFieldsAction = tempChoiceAction; tempChoiceAction = null; } finally { if (tempChoiceAction != null) { tempChoiceAction.Dispose(); } } RegisterActions(searchTextAction, fuzzySearchAction, newFilterFieldsAction); Forms.Timer tempTimer = null; try { tempTimer = new Forms.Timer { Interval = 500 }; tempTimer.Tick += SearchTextTimer_TickAsync; searchTextTimer = tempTimer; tempTimer = null; } finally { if (tempTimer != null) { tempTimer.Dispose(); } } }
public FilterPanelListViewController() { #pragma warning disable CC0009 // Use object initializer #pragma warning disable S2583 // Conditionally executed blocks should be reachable ParametrizedAction tempAction = null; try { tempAction = new ParametrizedAction(this, "FilterPanelSearchEdit", FilterPanelGroup, typeof(string)); tempAction.Caption = "Search"; tempAction.ToolTip = "Search entries that contain the specified words"; tempAction.NullValuePrompt = "Text to search"; tempAction.PaintStyle = ActionItemPaintStyle.Image; tempAction.Execute += SearchTextActionExecute; searchTextAction = tempAction; tempAction = null; } finally { if (tempAction != null) { tempAction.Dispose(); } } SimpleAction tempSimpleAction = null; try { tempSimpleAction = new SimpleAction(this, "FilterPanelFuzzySearch", FilterPanelGroup); tempSimpleAction.Caption = "Fuzzy Search"; tempSimpleAction.PaintStyle = ActionItemPaintStyle.Caption; tempSimpleAction.Execute += FuzzySearchActionExecute; fuzzySearchAction = tempSimpleAction; tempSimpleAction = null; } finally { if (tempSimpleAction != null) { tempSimpleAction.Dispose(); } } SingleChoiceAction tempChoiceAction = null; try { tempChoiceAction = new SingleChoiceAction(this, "FilterPanelFilterFields", FilterPanelGroup); tempChoiceAction.Caption = "Search in"; tempChoiceAction.ImageName = "Action_ParametrizedAction"; tempChoiceAction.PaintStyle = ActionItemPaintStyle.Caption; newFilterFieldsAction = tempChoiceAction; tempChoiceAction = null; } finally { if (tempChoiceAction != null) { tempChoiceAction.Dispose(); } } RegisterActions(searchTextAction, fuzzySearchAction, newFilterFieldsAction); Forms.Timer tempTimer = null; try { tempTimer = new Forms.Timer(); tempTimer.Interval = 500; tempTimer.Tick += SearchTextTimer_TickAsync; searchTextTimer = tempTimer; tempTimer = null; } finally { if (tempTimer != null) { tempTimer.Dispose(); } } #pragma warning restore S2583 // Conditionally executed blocks should be reachable #pragma warning restore CC0009 // Use object initializer }
/// <summary> /// Initializes a new instance of the <see cref="ElasticSearchFilterController"/> class. /// </summary> public ElasticSearchFilterController() { SingleChoiceAction tempAction = null; try { tempAction = new SingleChoiceAction(this, "FilterFields", PredefinedCategory.FullTextSearch) { Caption = "Search in", ImageName = "Action_ParametrizedAction", }; tempAction.Execute += FilterFieldsActionExecute; filterFieldsAction = tempAction; tempAction = null; } finally { if (tempAction != null) { tempAction.Dispose(); } } tempAction = null; try { tempAction = new SingleChoiceAction(this, "LookupFilterFields", "ElasticActionContainer") { Caption = "Search in", ImageName = "Action_ParametrizedAction", }; tempAction.Execute += FilterFieldsActionExecute; lookupFilterFieldsAction = tempAction; tempAction = null; } finally { if (tempAction != null) { tempAction.Dispose(); } } tempAction = null; try { tempAction = new SingleChoiceAction(this, "LookupSetFilter", "ElasticActionContainer") { Caption = "Filter", ImageName = "MenuBar_Filter", }; tempAction.Execute += LookupSetFilterAction_Execute; lookupSetFilterAction = tempAction; tempAction = null; } finally { if (tempAction != null) { tempAction.Dispose(); } } }