//        private bool _isUserChangedView = false;

        #region Constrctor

        internal StripChartXCursor(StripChartX parentChart, StripChartXPlotArea parentPlotArea, Cursor baseCursor, Axis baseAxis, string cursorName)
        {
            this._parentChart    = parentChart;
            this._parentPlotArea = parentPlotArea;
            this._baseCursor     = baseCursor;
            this._baseAxis       = baseAxis;
            this.Name            = cursorName;
        }
Esempio n. 2
0
        // TODO 新增属性后需要同步
        internal void ApplyConfig(StripChartXPlotArea template)
        {
            this.BackColor = template.BackColor;
            this.AxisX.ApplyConfig(template.AxisX);
            this.AxisY.ApplyConfig(template.AxisY);
            this.AxisX2.ApplyConfig(template.AxisX2);
            this.AxisY2.ApplyConfig(template.AxisY2);

            this.XCursor.ApplyConfig(template.XCursor);
            this.YCursor.ApplyConfig(template.YCursor);
        }
Esempio n. 3
0
        internal StripTabCursorCollection(StripChartX parentChart, Chart baseChart, StripChartXPlotArea parentPlotArea)
        {
            this._parentChart      = parentChart;
            this._parentPlotArea   = parentPlotArea;
            this._baseChart        = baseChart;
            this._adapter          = new PositionAdapter(baseChart, parentPlotArea);
            this._cursors          = new List <StripTabCursor>(MaxCursorCount);
            this.CursorValueFormat = null;
            this.RunTimeEditable   = true;
            _flowCursorEnableFlag  = false;
//            this._baseChart.PostPaint += BaseChartOnPostPaint;
            // TODO to add _cursor code, get from parentchart
        }
        public StripChartXRangeYConfigForm(StripChartXPlotArea hitPlotArea)
        {
            this._hitPlotArea = hitPlotArea;
            InitializeComponent();
            _lastYAutoScale  = this._hitPlotArea.AxisY.AutoScale;
            _lastY2AutoScale = this._hitPlotArea.AxisY2.AutoScale;
            if (_lastYAutoScale)
            {
                this._hitPlotArea.AxisY.AutoScale  = false;
                this._hitPlotArea.AxisY2.AutoScale = false;
            }

            textBox_primaryYMax.Text = _hitPlotArea.AxisY.Maximum.ToString();
            textBox_primaryYMin.Text = _hitPlotArea.AxisY.Minimum.ToString();

            textBox_secondaryYMax.Text = _hitPlotArea.AxisY2.Maximum.ToString();
            textBox_secondaryYMin.Text = _hitPlotArea.AxisY2.Minimum.ToString();
        }
        internal void Initialize(StripChartX parentStripChart, StripChartXPlotArea basePlotArea, Axis baseAxis)
        {
            this.Name            = baseAxis.Name;
            this._parentChart    = parentStripChart;
            this._parentPlotArea = basePlotArea;
            this._baseAxis       = baseAxis;

            this._viewMax = baseAxis.ScaleView.ViewMaximum;
            this._viewMin = baseAxis.ScaleView.ViewMinimum;

            if (IsXAxis())
            {
                this._maxData        = Constants.DefaultXMax;
                this._minData        = Constants.DefaultXMin;
                this._specifiedMax   = Constants.DefaultXMax;
                this._specifiedMin   = Constants.DefaultXMin;
                this.ViewMaximum     = Constants.DefaultXMax;
                this.ViewMinimum     = Constants.DefaultXMin;
                this._majorGridCount = Constants.DefaultXMajorGridCount;
                InitXAxisLabels();
            }
            else
            {
                this._maxData        = Constants.DefaultYMax;
                this._minData        = Constants.DefaultYMin;
                this._specifiedMax   = Constants.DefaultYMax;
                this._specifiedMin   = Constants.DefaultYMin;
                this.ViewMaximum     = Constants.DefaultYMax;
                this.ViewMinimum     = Constants.DefaultYMin;
                this._majorGridCount = Constants.DefaultYMajorGridCount;
            }
            RefreshAxisRange();
            RefreshGridsAndLabels();
            SetAxisLabelStyle();
            // 设置主网格默认为虚线
            this.MajorGridType = GridStyle.Dash;
            this.MinorGridType = GridStyle.DashDot;
        }