void SelectUiElement(FilterExpression filterExpression) { if (AppDefaults.visualSettings.UseOnlyCommonFilterView) { exprEditor = new ExpressionDefaultEditor(arguments, AddFilter); panelFilterEditor.Children.Clear(); panelFilterEditor.Children.Add((UserControl)exprEditor); } else { if (filterExpression.Dialect != null && filterExpression.Dialect != DefaultDialects.dialecttopic1.dialect && filterExpression.Dialect != DefaultDialects.dialecttopic2.dialect && filterExpression.Dialect != DefaultDialects.dialectcontent1.dialect) { exprEditor = new ExpressionDefaultEditor(arguments, AddFilter); panelFilterEditor.Children.Clear(); panelFilterEditor.Children.Add((UserControl)exprEditor); } else { exprEditor = new ExpressionFilterEditor(arguments, AddFilter); panelFilterEditor.Children.Clear(); panelFilterEditor.Children.Add((UserControl)exprEditor); } } }
public void Init(ExpressionArguments arguments, bool IsIncludeEvents = true) { this.arguments = arguments; if (IsIncludeEvents) { includeEvents.Visibility = System.Windows.Visibility.Visible; } //panelFilterEditor.Children.Add(new ExpressionFilterEditor()); if (AppDefaults.visualSettings.UseOnlyCommonFilterView) { exprEditor = new ExpressionDefaultEditor(arguments, AddFilter); } else { exprEditor = new ExpressionFilterEditor(arguments, AddFilter); } panelFilterEditor.Children.Add((UserControl)exprEditor); filtersList = new ObservableCollection <FilterExpression>(); //buttons initialization //Delete filter button btnDeleteFilter.IsEnabled = valueFilters.SelectedItem == null ? false : true; //Current filter list valueFilters.ItemsSource = filtersList; valueFilters.SelectionChanged += new SelectionChangedEventHandler((o, e) => { if (valueFilters.SelectedItem == null) { btnDeleteFilter.IsEnabled = false; } else { btnDeleteFilter.IsEnabled = true; FilterSelected((FilterExpression)valueFilters.SelectedItem); } }); btnDeleteFilter.Click += new RoutedEventHandler((o, e) => { if (valueFilters.SelectedItem == null) { return; } FilterExpression sitem = valueFilters.SelectedItem as FilterExpression; if (sitem != null) { filtersList.Remove(sitem); } }); //fill startup filters arguments.messageContentFilters.ForEach(f => { filtersList.Add(ContentFilterExpression.CreateFilter(f)); }); arguments.topicExpressionFilters.ForEach(f => { filtersList.Add(TopicFilterExpression.CreateFilter(f)); }); }
public void Init(ExpressionArguments arguments, bool IsIncludeEvents = true) { this.arguments = arguments; if (IsIncludeEvents) { includeEvents.Visibility = System.Windows.Visibility.Visible; } //panelFilterEditor.Children.Add(new ExpressionFilterEditor()); if (AppDefaults.visualSettings.UseOnlyCommonFilterView) exprEditor = new ExpressionDefaultEditor(arguments, AddFilter); else { exprEditor = new ExpressionFilterEditor(arguments, AddFilter); } panelFilterEditor.Children.Add((UserControl)exprEditor); filtersList = new ObservableCollection<FilterExpression>(); //buttons initialization //Delete filter button btnDeleteFilter.IsEnabled = valueFilters.SelectedItem == null ? false : true; //Current filter list valueFilters.ItemsSource = filtersList; valueFilters.SelectionChanged += new SelectionChangedEventHandler((o, e) => { if (valueFilters.SelectedItem == null) btnDeleteFilter.IsEnabled = false; else { btnDeleteFilter.IsEnabled = true; FilterSelected((FilterExpression)valueFilters.SelectedItem); } }); btnDeleteFilter.Click += new RoutedEventHandler((o, e) => { if (valueFilters.SelectedItem == null) return; FilterExpression sitem = valueFilters.SelectedItem as FilterExpression; if (sitem != null) { filtersList.Remove(sitem); } }); //fill startup filters arguments.messageContentFilters.ForEach(f => { filtersList.Add(ContentFilterExpression.CreateFilter(f)); }); arguments.topicExpressionFilters.ForEach(f => { filtersList.Add(TopicFilterExpression.CreateFilter(f)); }); }
protected override ItemClickHelper GetItemClickHelper(string selectedItemText, IExpressionEditor editor) { if (selectedItemText == additionalFunctionsTitle) return new AggregatesClickHelper(editor); return base.GetItemClickHelper(selectedItemText, editor); }
public ReportWizardExpressionEditorLogic(IExpressionEditor editor, IDataColumnInfo columnInfo) : base(editor, columnInfo) { additionalFunctionsTitle = CaptionHelper.GetLocalizedText("Texts", "Aggregates"); parametersTitle = editor.GetResourceString("Parameters.Text"); }
public AggregatesClickHelper(IExpressionEditor editor) : base(editor) { }
public ConditionExpressionEditorLogic(IExpressionEditor editor, IDataColumnInfo columnInfo) : base(editor, columnInfo) { }