示例#1
0
        /// <summary>
        /// Adds a Vertical LinearScale
        /// </summary>
        public void AddVLinearScale()
        {
            GaugeLinearScale scale = NewLinearScale(Orientation.Vertical);

            _GaugeControl.LinearScales.Add(scale);

            GaugePropertyGrid prop = new GaugePropertyGrid();

            prop.SelectedObject = scale;

            DialogResult result = prop.ShowDialog();

            if (result != DialogResult.OK)
                _GaugeControl.LinearScales.Remove(scale);
        }
示例#2
0
        /// <summary>
        /// Adds a CircularScale
        /// </summary>
        public void AddCircularScale()
        {
            GaugeCircularScale scale = NewCircularScale();

            _GaugeControl.CircularScales.Add(scale);

            GaugePropertyGrid prop = new GaugePropertyGrid();

            prop.SelectedObject = scale;

            DialogResult result = prop.ShowDialog();

            if (result != DialogResult.OK)
                _GaugeControl.CircularScales.Remove(scale);
        }