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));
                }
            }
        }
示例#2
0
        private void onAddClick(object sender, RoutedEventArgs e)
        {
            FilterWindow filterWindow = new FilterWindow(m_PropertyList);

            filterWindow.FilterUpdated += filterUpdated;
            filterWindow.ShowDialog();
        }
示例#3
0
 private void _mainViewModel_OpenFilter(object sender, EventArgs e)
 {
     _filterWindow = new FilterWindow
     {
         DataContext = _mainViewModel
     };
     _filterWindow.ShowDialog();
 }
示例#4
0
        private void ShowFilterWindow()
        {
            if (_filterWindow == null)
            {
                _filterWindow = new FilterWindow(CloseFilterWindow, UpdatePeopleView);
            }

            _filterWindow.ShowDialog();
        }
示例#5
0
        /// <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();
        }
示例#6
0
        /// <summary>
        /// 修改数据标签
        /// </summary>
        public void ModifyFilter(Filter filter)
        {
            FilterWindow inputWindow = new FilterWindow(filter)
            {
                Owner = _window
            };

            FocusedAction(() => {
                inputWindow.ShowDialog();
            });
        }
示例#7
0
        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;
            }
        }
示例#8
0
        public Boolean OpenFilterWindow()
        {
            IFilterViewModel viewModel = new FilterViewModel(this);

            Window window = new FilterWindow();

            window.DataContext = viewModel;

            Nullable <Boolean> result = window.ShowDialog();

            return(result == true);
        }
示例#9
0
        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();
        }
示例#10
0
 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();
     }
 }
示例#11
0
        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;
        }
示例#12
0
        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);
            }
        }
示例#13
0
 public FilterCommand(TestCasesPresenter presenter, FilterWindow window)
 {
     this.presenter = presenter;
     this.window    = window;
 }
示例#14
0
        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);
        }
示例#15
0
        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);
        }
示例#16
0
 void OnFilterWindowClosing(object sender, CancelEventArgs e)
 {
     window.Closing -= OnFilterWindowClosing;
     window          = null;
     tableView1.DataControl.Focus();
 }