private void CancelConfigure() { StripChartX beforeChart = ((StripChartX)_beforeCtrl); _changedCtrl.Size = beforeChart.Size; _changedCtrl.LegendVisible = beforeChart.LegendVisible; _changedCtrl.AxisY.AutoScale = beforeChart.AxisY.AutoScale; double yAxisRange = beforeChart.AxisY.Maximum; if (!double.IsNaN(yAxisRange)) { _changedCtrl.AxisY.Maximum = (int)yAxisRange; } yAxisRange = beforeChart.AxisY.Minimum; if (!double.IsNaN(yAxisRange)) { _changedCtrl.AxisY.Minimum = (int)yAxisRange; } _changedCtrl.BackColor = beforeChart.BackColor; _changedCtrl.ChartAreaBackColor = beforeChart.ChartAreaBackColor; _changedCtrl.LegendBackColor = beforeChart.LegendBackColor; _changedCtrl.GradientStyle = beforeChart.GradientStyle; }
public StripChartXPropertyForm(StripChartX _ctrl) { InitializeComponent(); _beforeCtrl = ControlFactory.CloneCtrl(_ctrl); _changedCtrl = _ctrl; windowCloseButton = false; }
//The constructor associates the control with the smart tag list. public StripChartXActionList(IComponent component) : base(component) { this.colUserControl = component as StripChartX; this.designerActionUISvc = GetService(typeof(DesignerActionUIService)) as DesignerActionUIService; }
// 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; }
/// <summary> /// Constructor for design /// </summary> public StripChartXAxis() { this._parentChart = null; this._baseAxis = null; this.AutoZoomReset = false; this.InitWithScaleView = false; this._autoScale = true; }
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 }
internal StripChartXSeriesCollection(SeriesCollection chartSeries, StripChartX parentChart) { this._plotSeries = chartSeries; _lineSeries = new List <StripChartXSeries>(Constants.DefaultMaxSeriesCount); this._parentChart = parentChart; // 默认添加n个Series foreach (Series plotSeries in _plotSeries) { StripChartXSeries series = new StripChartXSeries(); series.SetSeriesCollecton(this); series.Name = plotSeries.Name; series.AdaptBaseSeries(plotSeries); // 为了判断是否为设计时,只能使用原集合的Add _lineSeries.Add(series); } }
internal StripChartXPlotArea(StripChartX parentChart, ChartArea chartArea) { this._parentChart = parentChart; this.ChartArea = chartArea; this.ChartArea.Position.Auto = false; this._enabled = chartArea.Visible; this._axisX = new StripChartXAxis(); this._axisX2 = new StripChartXAxis(); this._axisY = new StripChartXAxis(); this._axisY2 = new StripChartXAxis(); _axisX.Initialize(parentChart, this, chartArea.AxisX); _axisX.InitAxisViewRange(Constants.DefaultXMax, Constants.DefaultXMin, Constants.DefaultXMax, Constants.DefaultXMin); _axisX2.Initialize(parentChart, this, chartArea.AxisX2); _axisX2.InitAxisViewRange(Constants.DefaultXMax, Constants.DefaultXMin, Constants.DefaultXMax, Constants.DefaultXMin); _axisY.Initialize(parentChart, this, chartArea.AxisY); _axisY.InitAxisViewRange(Constants.DefaultYMax, Constants.DefaultYMin, Constants.DefaultYMax, Constants.DefaultYMin); _axisY2.Initialize(parentChart, this, chartArea.AxisY2); _axisY2.InitAxisViewRange(Constants.DefaultYMax, Constants.DefaultYMin, Constants.DefaultYMax, Constants.DefaultYMin); _axes[0] = _axisX; _axes[1] = _axisX2; _axes[2] = _axisY; _axes[3] = _axisY2; // Initialize cursor classes _xCursor = new StripChartXCursor(_parentChart, this, chartArea.CursorX, chartArea.AxisX, "X cursor"); _xCursor.Mode = StripChartXCursor.CursorMode.Zoom; _yCursor = new StripChartXCursor(_parentChart, this, chartArea.CursorY, chartArea.AxisY, "Y cursor"); _yCursor.Mode = StripChartXCursor.CursorMode.Disabled; _cursors[0] = _xCursor; _cursors[1] = _yCursor; // _xAxisSync = new AxisSynchronizer(_axisX, _axisX2); YAxisSync = new AxisSynchronizer(_axisY, _axisY2); }
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; }
public StripChartXPlotAreaCollection(StripChartX parentChart, ChartAreaCollection chartAreas) { this._parentChart = parentChart; this._chartAreas = chartAreas; }