Example #1
0
        private void SetupDisplay()
        {
            zedGraphWaveform.MasterPane.PaneList.Clear();
            zedGraphWaveform.MasterPane.Border.IsVisible = false;

            for (int i = 0; i < StimulatorExtension.NumberOfChannels(device as dynamic); i++)
            {
                GraphPane pane = new GraphPane();
                zedGraphWaveform.MasterPane.Add(pane);
                pane.Border.IsVisible          = false;
                pane.XAxis.MajorGrid.IsVisible = true;
                pane.YAxis.MajorGrid.IsVisible = true;
            }
        }
Example #2
0
        private void DrawWaveform()
        {
            zedGraphWaveform.MasterPane.PaneList.ForEach(p => p.CurveList.Clear());

            for (int i = 0; i < StimulatorExtension.NumberOfChannels(device as dynamic); i++)
            {
                var pane = zedGraphWaveform.MasterPane.PaneList[i];

                var curve = pane.AddCurve($"Channel {i}", StimulatorExtension.Waveform(device as dynamic, i), Color.CornflowerBlue, ZedGraph.SymbolType.None);
                curve.Line.Width       = 3;
                curve.Line.IsAntiAlias = true;
                curve.Label.IsVisible  = false;

                pane.Title.Text = $"Channel {i}";
                var labels = StimulatorExtension.WaveformAxisLabels(device as dynamic);
                pane.XAxis.Title.Text = labels[0];
                pane.YAxis.Title.Text = labels[1];
            }

            zedGraphWaveform.Refresh();
        }