public LiveDataGrowing() { this.InitializeComponent(); #if DEBUG this.AttachDevTools(); #endif avaPlot1 = this.Find <AvaPlot>("avaPlot1"); ReadingsTextbox = this.Find <TextBox>("ReadingsTextbox"); LatestValueTextbox = this.Find <TextBox>("LatestValueTextbox"); AutoAxisCheckbox = this.Find <CheckBox>("AutoAxisCheckbox"); // plot the data array only once signalPlot = avaPlot1.plt.PlotSignal(data); avaPlot1.plt.YLabel("Value"); avaPlot1.plt.XLabel("Sample Number"); // create a timer to modify the data DispatcherTimer updateDataTimer = new DispatcherTimer(); updateDataTimer.Interval = TimeSpan.FromMilliseconds(1); updateDataTimer.Tick += UpdateData; updateDataTimer.Start(); // create a timer to update the GUI DispatcherTimer renderTimer = new DispatcherTimer(); renderTimer.Interval = TimeSpan.FromMilliseconds(20); renderTimer.Tick += Render; renderTimer.Start(); }
public MainWindow(IWpfVisualizerData data) { RenderOptions.ProcessRenderMode = RenderMode.SoftwareOnly; InitializeComponent(); this.frameholder.Visibility = Visibility.Hidden; this.frameholderTimer.Visibility = Visibility.Hidden; this.DataContext = data; var backgroundFill = ColorHelpers.Convert(data.Configuration.FillColor); BackgroundPlottable = data.Display.BackgroundDataPlot.plt.PlotSignal(new double[] { 1, 10, 5, 15, 10, 5, 0 }, lineWidth: 2, markerSize: 0, color: backgroundFill); BackgroundPlottable.fillColor1 = backgroundFill; BackgroundPlottable.fillType = FillType.FillBelow; var foregroundFill = ColorHelpers.Convert(data.Configuration.ChartProgressColor); ForegroundPlottable = data.Display.MainDataPlot.plt.PlotSignal(new double[] { 1, 10, 5, 15, 10, 5, 0 }, lineWidth: 2, markerSize: 0, color: foregroundFill); ForegroundPlottable.fillColor1 = foregroundFill; ForegroundPlottable.fillType = FillType.FillBelow; this.frameholder.Content = new Chart(new DataPlotBinding { WpfPlot = data.Display.BackgroundDataPlot, Data = data }); this.frameholderTimer.Content = new Chart(new DataPlotBinding { WpfPlot = data.Display.MainDataPlot, Data = data }); }
public LiveDataIncoming() { InitializeComponent(); signalPlot = formsPlot1.plt.PlotSignal(data); formsPlot1.plt.YLabel("Value"); formsPlot1.plt.XLabel("Sample Number"); }
public MainWindow() { InitializeComponent(); portsbox.ItemsSource = ports; currentPlot = wpfPlot1.plt.PlotSignal(currentdata, useParallel: true, lineWidth: 2); wpfPlot1.plt.YLabel("Biosensor current (nA)"); wpfPlot1.plt.XLabel("Data point"); voltagePlot = wpfPlot2.plt.PlotSignal(voltagedata, useParallel: true, lineWidth: 2); wpfPlot2.plt.YLabel("PV Voltage (mV)"); wpfPlot2.plt.XLabel("Data point"); //vLine = wpfPlot1.plt.PlotVLine(0, color: System.Drawing.Color.Red, lineStyle: LineStyle.Dash); //hLine = wpfPlot1.plt.PlotHLine(0, color: System.Drawing.Color.Red, lineStyle: LineStyle.Dash); DispatcherTimer renderTimer = new DispatcherTimer(); renderTimer.Interval = TimeSpan.FromMilliseconds(16); renderTimer.Tick += Render; renderTimer.Start(); disconnect.IsEnabled = false; start_measurement.IsEnabled = false; stop_measurement.IsEnabled = false; single_measurement.IsEnabled = false; export.IsEnabled = false; clear.IsEnabled = false; saveDirectory.IsEnabled = false; }
public void Initialize_Graph() { CurrentPlot = C_Graph.plt.PlotSignal(Samples); C_Graph.plt.YLabel("Current ( A )"); C_Graph.plt.XLabel("Sample Number"); CurrentPlot.color = ColorTranslator.FromHtml("#FF00C0FF"); System.Drawing.Pen Line = new System.Drawing.Pen(System.Drawing.Brushes.LightSkyBlue); CurrentPlot.penLD = Line; }
public LiveDataGrowing() { InitializeComponent(); // plot the data array only once signalPlot = wpfPlot1.plt.PlotSignal(data); wpfPlot1.plt.YLabel("Value"); wpfPlot1.plt.XLabel("Sample Number"); // create a timer to modify the data DispatcherTimer updateDataTimer = new DispatcherTimer(); updateDataTimer.Interval = TimeSpan.FromMilliseconds(1); updateDataTimer.Tick += UpdateData; updateDataTimer.Start(); // create a timer to update the GUI DispatcherTimer renderTimer = new DispatcherTimer(); renderTimer.Interval = TimeSpan.FromMilliseconds(20); renderTimer.Tick += Render; renderTimer.Start(); }