Beispiel #1
0
        private void Mi_SetAxisLimits_Click(object sender, RoutedEventArgs e)
        {
            var limitsWndw = new AxisLimitsWindow()
            {
                XAxisUnit    = (_units == Units.Meters) ? "km" : "n mile",
                XAxisMaximum = xAxis.MaxValue,
                XAxisMinimum = xAxis.MinValue,
                XAxisStep    = xSeparator.Step,
                YAxisMaximum = yAxis.MaxValue,
                YAxisMinimum = yAxis.MinValue,
                YAxisStep    = ySeparator.Step
            };

            if (!limitsWndw.ShowDialog().Value)
            {
                return;
            }

            xAxis.MaxValue  = limitsWndw.XAxisMaximum;
            xAxis.MinValue  = limitsWndw.XAxisMinimum;
            xSeparator.Step = limitsWndw.XAxisStep;

            yAxis.MaxValue  = limitsWndw.YAxisMaximum;
            yAxis.MinValue  = limitsWndw.YAxisMinimum;
            ySeparator.Step = limitsWndw.YAxisStep;
        }
Beispiel #2
0
        private void Mi_SetAxisLimits_Click(object sender, RoutedEventArgs e)
        {
            var limitsWndw = new AxisLimitsWindow()
            {
                XAxisUnit    = (GlobalState.Units == Units.Meters) ? "km" : "n mile",
                XAxisMaximum = _xAxis.Maximum,
                XAxisMinimum = _xAxis.Minimum,
                YAxisMaximum = _yAxis.Maximum,
                YAxisMinimum = _yAxis.Minimum,
            };

            if (!limitsWndw.ShowDialog().Value)
            {
                return;
            }

            _xAxis.Maximum = limitsWndw.XAxisMaximum;
            _xAxis.Minimum = limitsWndw.XAxisMinimum;

            _yAxis.Maximum = limitsWndw.YAxisMaximum;
            _yAxis.Minimum = limitsWndw.YAxisMinimum;

            plot.InvalidatePlot();
        }