public DiameterView(IFilamentService filamentService, INavigationService navigationService) { InitializeComponent(); timer = new Stopwatch(); _filamentService = filamentService; _filamentService.DiameterChanged += _filamentService_DiameterChanged; _navigationService = navigationService; _navigationService.RegionCleared += _navigationService_RegionCleared; zgraphHistorical = ZedGraphPlotModel.GetPlot("HistoricalModel"); zgraphRealTime = ZedGraphPlotModel.GetPlot("RealTimeModel"); timer.Start(); previousHistoricalMillis = 0; //add to grid on xaml page zedGraphHistoricalModel.Children.Add(new WindowsFormsHost() { Child = zgraphHistorical }); zedGraphRealTimeModel.Children.Add(new WindowsFormsHost() { Child = zgraphRealTime }); settingsButton.Click += SettingButton_Click; this.LayoutUpdated += DiameterView_LayoutUpdated; this.SizeChanged += DiameterView_SizeChanged; }
private void ResetGraph_Click() { ZedGraphPlotModel.GetPlot("HistoricalModel").ZoomOutAll(); }
private void SetupPlots() { ZedGraphPlotModel.CreatePlots(UpperLimit, NominalDiameter, LowerLimit); ZedGraphPlotModel.GetPlot("HistoricalModel").ZedGraph.GraphPane.XAxis.Scale.Min = new ZedGraph.XDate(DateTime.Now.AddMilliseconds(-100)); }