Beispiel #1
0
        private void setupChartInfoEventHandler(object sender, EventArgs e)
        {
            SetupGraph mSetup = new SetupGraph();

            mSetup.ShowDialog();

            try
            {
                mXInterval = mSetup.xInterval;
                mMin       = mSetup.min;
                mMax       = mSetup.max;

                if (mIsLoding)
                {
                    MetroMessageBox.Show(mParent, "불러오는 중에는 변경할 수 없습니다.", "", MessageBoxButtons.OK, MessageBoxIcon.Error);
                }
                else
                {
                }
            }
            catch (Exception ex)
            {
                MetroMessageBox.Show(mParent, ex.Message, "", MessageBoxButtons.OK, MessageBoxIcon.Error);
            }
        }
Beispiel #2
0
        private void setupChartInfoEventHandler(object sender, EventArgs e)
        {
            SetupGraph mSetup = new SetupGraph();

            mSetup.ShowDialog();

            try
            {
                mXInterval = mSetup.xInterval;
                mMin       = mSetup.min;
                mMax       = mSetup.max;

                if (mIsLoding)
                {
                    MetroMessageBox.Show(mParent, "불러오는 중에는 변경할 수 없습니다.", "", MessageBoxButtons.OK, MessageBoxIcon.Error);
                }
                else
                {
                    //chart1.ChartAreas[0].AxisX.Interval = Convert.ToDouble(mXInterval);
                    //chart1.ChartAreas[0].AxisY.Minimum = Convert.ToDouble(mMin);
                    //chart1.ChartAreas[0].AxisY.Maximum = Convert.ToDouble(mMax);
                    //chartControl1
                    //XYDiagram diagram = chartControl1.Diagram as XYDiagram;
                    //XYDiagram diagram = (XYDiagram)chartControl1.Diagram;



                    SwiftPlotDiagram diagram = chartControl1.Diagram as SwiftPlotDiagram;
                    if (diagram != null)
                    {
                        diagram.AxisX.VisualRange.Auto            = false;
                        diagram.AxisX.VisualRange.AutoSideMargins = false;

                        diagram.AxisY.VisualRange.MinValue = BetteryMonitoringSystem.Properties.Settings.Default.BackupAxisYLow;
                        diagram.AxisY.VisualRange.MaxValue = BetteryMonitoringSystem.Properties.Settings.Default.BackupAxisYUpper;
                    }
                }
            }
            catch (Exception ex)
            {
                MetroMessageBox.Show(mParent, ex.Message, "", MessageBoxButtons.OK, MessageBoxIcon.Error);
            }
        }