private void DrawRendererFeatureList() { EditorGUILayout.LabelField(Styles.RenderFeatures, EditorStyles.boldLabel); EditorGUILayout.Space(); if (m_RendererFeatures.arraySize == 0) { EditorGUILayout.HelpBox("No Renderer Features added", MessageType.Info); } else { //Draw List CoreEditorUtils.DrawSplitter(); for (int i = 0; i < m_RendererFeatures.arraySize; i++) { SerializedProperty renderFeaturesProperty = m_RendererFeatures.GetArrayElementAtIndex(i); DrawRendererFeature(i, ref renderFeaturesProperty); CoreEditorUtils.DrawSplitter(); } } EditorGUILayout.Space(); //Add renderer using (var hscope = new EditorGUILayout.HorizontalScope()) { if (GUILayout.Button("Add Renderer Feature", EditorStyles.miniButton)) { var r = hscope.rect; var pos = new Vector2(r.x + r.width / 2f, r.yMax + 18f); FilterWindow.Show(pos, new ScriptableRendererFeatureProvider(this)); } } }
private void onAddClick(object sender, RoutedEventArgs e) { FilterWindow filterWindow = new FilterWindow(m_PropertyList); filterWindow.FilterUpdated += filterUpdated; filterWindow.ShowDialog(); }
private void _mainViewModel_OpenFilter(object sender, EventArgs e) { _filterWindow = new FilterWindow { DataContext = _mainViewModel }; _filterWindow.ShowDialog(); }
private void ShowFilterWindow() { if (_filterWindow == null) { _filterWindow = new FilterWindow(CloseFilterWindow, UpdatePeopleView); } _filterWindow.ShowDialog(); }
/// <summary> /// Opens filter window /// </summary> private void setFilterBtn_Click(object sender, EventArgs e) { var departments = _dc.People.GroupBy(x => x.Department_ID) .Select(y => y.First().Department_ID.ToString()).ToList(); var filterWindow = new FilterWindow(departments, _currentFilterArgs); filterWindow.FilterChangeEvent += new EventHandler <FilterChangeEventArgs>(this.OnFilterChange); filterWindow.ShowDialog(); }
/// <summary> /// 修改数据标签 /// </summary> public void ModifyFilter(Filter filter) { FilterWindow inputWindow = new FilterWindow(filter) { Owner = _window }; FocusedAction(() => { inputWindow.ShowDialog(); }); }
private void onSearch(object sender, RoutedEventArgs e) { FilterWindow form = new FilterWindow(); var res = form.ShowDialog(); if (res == true && form.choosenpersons.Count > 0) { Persons = form.choosenpersons; //FillPersons(); stage = StageEnum.CHOSEN; } }
public Boolean OpenFilterWindow() { IFilterViewModel viewModel = new FilterViewModel(this); Window window = new FilterWindow(); window.DataContext = viewModel; Nullable <Boolean> result = window.ShowDialog(); return(result == true); }
private void ShowFilterEditor(DevExpress.Xpf.Grid.FilterEditorEventArgs e) { if (IsFilterWindowOpened) { return; } string titleText = DevExpress.Xpf.Grid.GridControlLocalizer.Active.GetLocalizedString(GridControlStringId.FilterEditorTitle); window = new FilterWindow(e.FilterControl); window.Owner = this; window.Closing += OnFilterWindowClosing; window.Title = titleText; window.Icon = DevExpress.Xpf.Core.Native.ImageHelper.CreateImageFromCoreEmbeddedResource("Editors.Images.FilterControl.filter.png"); window.Grid.Children.Add(e.FilterControl); window.ShowDialog(); }
private void onEditClick(object sender, MouseButtonEventArgs e) { if (list_Filter.SelectedIndex != -1) { String[] temp = list_Filter.SelectedItem.ToString().Split(new Char[] { ' ' }); FilterWindow filterWindow; if (temp[1] == "IN") { filterWindow = new FilterWindow(m_PropertyList, temp[2], temp[1], temp[0]); } else { filterWindow = new FilterWindow(m_PropertyList, temp[0], temp[1], temp[2]); } filterWindow.FilterUpdated += filterEdited; filterWindow.ShowDialog(); } }
public TestCasesPresenter(RenameVariableWindow renameVariablewindow, FilterWindow filterWindow, ConnectionStringWindow connectionStringWindow, TestCasesManager testCasesManager, DataTable testCases, BindingList <string> variables, BindingList <string> connectionStringNames) { this.OpenTestCasesCommand = new OpenTestCasesCommand(this); this.OpenTestCasesQueryCommand = new OpenTestCasesQueryCommand(this); this.RenameVariableCommand = new RenameVariableCommand(this, renameVariablewindow); this.RemoveVariableCommand = new RemoveVariableCommand(this); this.MoveLeftVariableCommand = new MoveLeftVariableCommand(this); this.MoveRightVariableCommand = new MoveRightVariableCommand(this); this.FilterCommand = new FilterCommand(this, filterWindow); this.AddConnectionStringCommand = new AddConnectionStringCommand(this, connectionStringWindow); this.RemoveConnectionStringCommand = new RemoveConnectionStringCommand(this); this.EditConnectionStringCommand = new EditConnectionStringCommand(this, connectionStringWindow); this.RunQueryCommand = new RunQueryCommand(this); this.testCasesManager = testCasesManager; TestCases = testCases; Variables = variables; ConnectionStringNames = connectionStringNames; ConnectionStringSelectedIndex = -1; VariableSelectedIndex = -1; }
private void SetFilter() { if (logTabControl.SelectedIndex < 0) { return; } ObservableCollection <FilteringRuleDefinition> definitions = new ObservableCollection <FilteringRuleDefinition>(); foreach (FilteringRuleDefinition definition in _optionsTracker.Options.FilteringRuleDefinitions) { definitions.Add(definition.Clone()); } FilterWindow filterWindow = new FilterWindow(); filterWindow.Owner = this; filterWindow.SetCollection(definitions); if (filterWindow.ShowDialog() ?? false) { _optionsTracker.Options.FilteringRuleDefinitions = new List <FilteringRuleDefinition>(definitions); } }
public FilterCommand(TestCasesPresenter presenter, FilterWindow window) { this.presenter = presenter; this.window = window; }
private void Filter(object param) { string filterDegreeText = ""; string cutoffFrequencyText = ""; IWindow windowFunction = null; Filter filter = null; FilterWindow dialog = new FilterWindow(); if (dialog.ShowDialog() == true) { filterDegreeText = dialog.FilterDegree; cutoffFrequencyText = dialog.CutoffFrequency; windowFunction = dialog.SelectedWindowFunction; filter = dialog.SelectedFilter; } if (!int.TryParse(filterDegreeText, out int filterDegree)) { return; } if (!double.TryParse(cutoffFrequencyText, out double cutoffFrequency)) { return; } if (windowFunction == null) { return; } if (filter == null) { return; } ISignal signal; switch (param.ToString()) { case "1": signal = FirstChart.SignalRepresentation.Signal; break; case "2": signal = SecondChart.SignalRepresentation.Signal; break; case "3": signal = combinedSignal.Signal; break; default: throw new ArgumentException(); } filter.InitFilter(cutoffFrequency, filterDegree, windowFunction); SignalImplementation filteredSignal = filter.FilterSignal(signal); filteredSignal.StartingMoment = filteredSignal.Points[0].Item1; filteredSignal.EndingMoment = filteredSignal.Points[filteredSignal.Points.Count - 1].Item1; filteredSignal.CalculateTraits(); combinedSignal.Signal = filteredSignal; combinedTextProperties.AverageValueText = combinedSignal.Signal.AverageValue.ToString("N3"); combinedTextProperties.AbsouluteAverageValueText = combinedSignal.Signal.AbsouluteAverageValue.ToString("N3"); combinedTextProperties.AveragePowerText = combinedSignal.Signal.AveragePower.ToString("N3"); combinedTextProperties.VarianceText = combinedSignal.Signal.Variance.ToString("N3"); combinedTextProperties.EffectiveValueText = combinedSignal.Signal.EffectiveValue.ToString("N3"); OnPropertyChanged("CombinedTextProperties"); realCombinedSeries = new ScatterSeries(); imaginaryCombinedSeries = new ScatterSeries(); foreach (Tuple <double, Complex> tuple in filteredSignal.Points) { realCombinedSeries.Points.Add(new ScatterPoint(tuple.Item1, tuple.Item2.Real)); imaginaryCombinedSeries.Points.Add(new ScatterPoint(tuple.Item1, tuple.Item2.Imaginary)); } ClearPlot(); realCombinedSeries.MarkerType = MarkerType.Circle; imaginaryCombinedSeries.MarkerType = MarkerType.Circle; realCombinedSeries.MarkerSize = 1; imaginaryCombinedSeries.MarkerSize = 1; realCombinedSeries.MarkerFill = OxyColors.Green; imaginaryCombinedSeries.MarkerFill = OxyColors.Green; realPlotModel.Series.Add(realCombinedSeries); imaginaryPlotModel.Series.Add(imaginaryCombinedSeries); realPlotModel.InvalidatePlot(true); imaginaryPlotModel.InvalidatePlot(true); }
public void FilterBartlettRBA(float[] sample_times, float [] input, float filter_width, float[] result) { FilterWindow <float> filter = new FilterWindow <float>(new AlgebraRealFloat32(), new BartlettWindow(filter_width)); filter.ComputeRBA(sample_times, input, result); }
void OnFilterWindowClosing(object sender, CancelEventArgs e) { window.Closing -= OnFilterWindowClosing; window = null; tableView1.DataControl.Focus(); }