コード例 #1
0
        /// <summary>
        /// Constructor
        /// 构造函数
        /// </summary>
        public StripChart()
        {
            Control.CheckForIllegalCrossThreadCalls = true;
            InitializeComponent();
            // 设计器中自动配置了Name会导致在设计时获取控件名称失败
            this.Name = "";
            //            chart.ChartAreas[0].AxisX.LabelStyle.Format = DefaultTimeStampFormat;
            //            chart.ChartAreas[0].AxisX.IsMarginVisible = false;

            _yAutoEnabled = true;

            // Set default legend visible;
            _legendVisibe = true;
            SetLegendVisible();

            ResetDrawingParams();
            this._axisViewAdapter = new AxisViewAdapter(this, this.chart);
            this.plotter          = new StripPlotter(chart, _axisViewAdapter);
            this._axisViewAdapter.SetPlotter(this.plotter);
            SetSeriesInitialvalue();

            _zoomMenuItems.Add(ToolStripMenuItem_zoomX);
            _zoomMenuItems.Add(ToolStripMenuItem_zoomY);
            _zoomMenuItems.Add(ToolStripMenuItem_zoomWindow);
            _zoomMenuItems.Add(ToolStripMenuItem_showValue);

            NextTimeStamp = DateTime.MinValue;
            TimeInterval  = TimeSpan.Zero;

            this.Clear();
        }
コード例 #2
0
 public BindStripPlotter(StripPlotter plotter, AxisViewAdapter axisViewAdapter) :
     base(plotter, axisViewAdapter)
 {
     // TODO
     this.XAxisData = new List <string>(Constants.MaxPointsInSingleSeries);
     FillBufWithDefault(XAxisData, Constants.MaxPointsInSingleSeries, "");
     this.YAxisData        = new List <List <double> >(Constants.MaxSeriesToDraw);
     this.YShallowAxisData = new List <List <double> >(Constants.MaxSeriesToDraw);
 }
コード例 #3
0
 public SparseStripPlotter(StripPlotter plotter, AxisViewAdapter axisViewAdapter, int maxSparseRatio) : base(plotter, axisViewAdapter, maxSparseRatio)
 {
     XWrapBuf  = new OverLapStrBuffer(plotter.MaxSampleNum);
     YWrapBufs = new List <OverLapWrapBuffer <double> >(plotter.LineNum);
     for (int i = 0; i < plotter.LineNum; i++)
     {
         YWrapBufs.Add(new OverLapWrapBuffer <double>(plotter.MaxSampleNum));
     }
 }
コード例 #4
0
 public StripPlotter(Chart chart, AxisViewAdapter axisViewAdapter)
 {
     this._chart           = chart;
     this._autoYRange      = true;
     this.PlotSeries       = chart.Series;
     this.PlotStatus       = PlotStatus.Idle;
     this.LineNum          = 1;
     this.ScrollMode       = false;
     this._axisViewAdapter = axisViewAdapter;
 }
コード例 #5
0
        protected PlotAction(StripPlotter plotter, AxisViewAdapter axisViewAdapter)
        {
            this.Plotter         = plotter;
            this.PlotSeries      = plotter.PlotSeries;
            this.SamplesInChart  = 0;
            this.SparseRatio     = 1;
            this.AxisViewAdapter = axisViewAdapter;

            this.Parallel = new ParallelHandler(this);

            _maxYValue     = double.MinValue;
            _minYValue     = double.MaxValue;
            this.YWrapBufs = new List <OverLapWrapBuffer <double> >(Constants.MaxSeriesToDraw);
        }
コード例 #6
0
 public CommonStripPlotter(StripPlotter plotter, AxisViewAdapter axisViewAdapter) :
     base(plotter, axisViewAdapter)
 {
     XAxisData = null;
     YAxisData = null;
 }