示例#1
0
        public SetCharts(DelSetChartsParams DelSetting_, ChartSetting setting)
        {
            InitializeComponent();
            this.DelSetChartsParams_ = DelSetting_;

            this.labChartAreaName.Text = (setting.hitTestResult.ChartArea.Name.Split('.'))[1];
            this.tbxYmax.Text          = Convert.ToString(setting.hitTestResult.ChartArea.AxisY.Maximum);
            this.tbxYmin.Text          = Convert.ToString(setting.hitTestResult.ChartArea.AxisY.Minimum);
            this.tbxTimeLen.Text       = "50";

            this.chartSetting.ChartInd = setting.ChartInd;

            this.chartSetting.hitTestResult = setting.hitTestResult;
        }
示例#2
0
        public void chart_MouseDoubleClick(object sender, MouseEventArgs e)
        {
            //string chart_name = ((Chart)sender).Name;

            //string[] name_str = chart[ind].Titles[i].Text.Split('-');
            string[] chart_name = ((Chart)sender).Name.Split('-');
            int      chart_ind  = Convert.ToInt32(chart_name[1]);

            HitTestResult result = chart[chart_ind].HitTest(e.X, e.Y);

            if (result.ChartElementType != ChartElementType.Nothing && result.ChartElementType != ChartElementType.Title)
            {
                string elementType = result.ChartElementType.ToString();
                elementType = result.ChartArea.Name;

                // get the chart setting by the sub form
                this.chartSettings.ChartInd      = chart_ind;
                this.chartSettings.hitTestResult = result;
                DelSetChartsParams DelSetChartsParams_ = new DelSetChartsParams(SetChartsParams);
                SetCharts          ChartSettingsForm   = new SetCharts(DelSetChartsParams_, chartSettings);
                ChartSettingsForm.ShowDialog();
            }
        }