public GuiAnalyzerMainFrame(_PlcAgent.Analyzer.Analyzer analyzer) : base(analyzer) { InitializeComponent(); Analyzer.AnalyzerChannels.OnChannelListModified += RefreshGui; _channelList = new List<GuiComponent>(); Analyzer.AnalyzerDataCursorRed.ParentGrid = PlotGrid; Analyzer.AnalyzerDataCursorRed.ActualPosition = 246.0; Analyzer.AnalyzerDataCursorBlue.ParentGrid = PlotGrid; Analyzer.AnalyzerDataCursorBlue.ActualPosition = 206.0; GeneralGrid.Children.Add(Analyzer.AnalyzerDataCursorRed); GeneralGrid.Children.Add(Analyzer.AnalyzerDataCursorBlue); if (!Analyzer.AnalyzerSetupFile.ShowDataCursors[Analyzer.Header.Id]) { Analyzer.AnalyzerDataCursorRed.Visibility = Visibility.Hidden; Analyzer.AnalyzerDataCursorBlue.Visibility = Visibility.Hidden; } PlotArea.Dispatcher.BeginInvoke((new Action( () => PlotArea.DataContext = Analyzer.TimeObservableVariable.MainViewModelClone))); RefreshGui(); Analyzer.CommunicationInterfaceHandler.PlcCommunicator.PropertyChanged += OnConnectionStatusChanged; if (Analyzer.CommunicationInterfaceHandler.PlcCommunicator.ConnectionStatus != 1) AnalyzerStartStopButton.IsEnabled = false; _updateThread = new Thread(AxisSynchronization) { IsBackground = true }; _updateThread.Start(); }
public GuiAnalyzerSingleFigure(uint id, _PlcAgent.Analyzer.Analyzer analyzer) : base(analyzer) { InitializeComponent(); BrushComboBox.ItemsSource = _colorsList; BrushComboBox.SelectedItem = Brushes.Green; BrushComboBox.DataContext = this; Analyzer.CommunicationInterfaceHandler.OnInterfaceUpdatedDelegate += OnInterfaceUpdated; OnInterfaceUpdated(); _analyzerChannel = Analyzer.AnalyzerChannels.GetChannel(id); ChannelGroupBox.Header = "Channel " + _analyzerChannel.Id; PlotArea.Dispatcher.BeginInvoke((new Action( () => PlotArea.DataContext = new DataMainViewModel()))); if (_analyzerChannel.AnalyzerObservableVariable != null) { UpdateControls(this, new PropertyChangedEventArgs("CommunicationInterfaceVariable")); UpdateControls(this, new PropertyChangedEventArgs("Brush")); UpdateControls(this, new PropertyChangedEventArgs("Unit")); _analyzerChannel.AnalyzerObservableVariable.PropertyChanged += UpdateControls; PlotArea.Dispatcher.BeginInvoke((new Action( () => PlotArea.DataContext = _analyzerChannel.AnalyzerObservableVariable.MainViewModelClone))); } _save = true; }
public GuiAnalyzerDataCursor(_PlcAgent.Analyzer.Analyzer analyzer) : base(analyzer) { InitializeComponent(); PositionLabel.Visibility = Visibility.Hidden; }
public GuiAnalyzerControl(_PlcAgent.Analyzer.Analyzer analyzer) : base(analyzer) { InitializeComponent(); Analyzer.CommunicationInterfaceHandler.PlcCommunicator.PropertyChanged += OnConnectionStatusChanged; if (Analyzer.CommunicationInterfaceHandler.PlcCommunicator.ConnectionStatus != 1) AnalyzerStartStopButton.IsEnabled = false; }
public GuiAnalyzerConfiguration(_PlcAgent.Analyzer.Analyzer analyzer) : base(analyzer) { InitializeComponent(); SampleTimeSlider.Value = Analyzer.AnalyzerSetupFile.SampleTime[Analyzer.Header.Id]; TimeRangeSlider.Value = Analyzer.AnalyzerSetupFile.TimeRange[Analyzer.Header.Id]; ShowDataCursorsCheckBox.IsChecked = Analyzer.AnalyzerSetupFile.ShowDataCursors[Analyzer.Header.Id]; _save = true; }
public GuiAnalyzerDataCursorTable(_PlcAgent.Analyzer.Analyzer analyzer) : base(analyzer) { InitializeComponent(); AnalyzerDataCursorPointCollection = Analyzer.AnalyzerDataCursorPointCollection.Children; CursorTableDataGrid.ItemsSource = AnalyzerDataCursorPointCollection; Analyzer.AnalyzerDataCursorRed.PropertyChanged += OnDataCursorPositionChanged; Analyzer.AnalyzerDataCursorBlue.PropertyChanged += OnDataCursorPositionChanged; Analyzer.OnUpdatePlotsDelegate += OnUpdatePlots; if (Analyzer.AnalyzerSetupFile.ShowDataCursors[Analyzer.Header.Id]) return; Visibility = Visibility.Hidden; }