public MonitoringUserControl() { InitializeComponent(); tabControl1.TabPages[0].Text = "График"; tabControl1.TabPages[1].Text = "Индикаторы"; uc = wpf.UserControl1.Instance; management = new ManagerGraph(bufferDataGraph, OxyPlotGraphView.Model); management.DrawOxyPlotGraph(1); comboBoxViewPoints.SelectedIndex = 0; MonitoringOfIndicators(); }
private void DrawOxyPlotGraph(object sender, EventArgs e) { if (DisableFollowGraph == false) { bufferDataGraph.GetDataFromDevice(); if (bufferDataGraph.PointFirstGraph1.Count != 0) { uc.setValueMoment(bufferDataGraph.PointFirstGraph1[bufferDataGraph.PointFirstGraph1.Count - 1]); } bufferDataGraph.Parent = OxyPlotGraphView.Model.Axes[0].Parent; OxyPlotGraphView.Model = management.DrawOxyPlotGraph(1); } else { bufferDataGraph.Parent = OxyPlotGraphView.Model.Axes[0].Parent; bufferDataGraph.GetDataFromDevice(); if (bufferDataGraph.PointFirstGraph1.Count != 0) { uc.setValueMoment(bufferDataGraph.PointFirstGraph1[bufferDataGraph.PointFirstGraph1.Count - 1]); } OxyPlotGraphView.Model = management.DrawOxyPlotGraph(1); } }