Esempio n. 1
0
        private void _value2_GotFocus(object sender, RoutedEventArgs e)
        {
            _value0.Foreground = this.Foreground;
            _value1.Foreground = this.Foreground;
            _value2.Foreground = this.SelectedValueBrush;

            RotarySliderViewModel vm = (RotarySliderViewModel)DataContext;

            vm.SetValueIndex(2);
        }
Esempio n. 2
0
        public RightAscensionValuesEntryViewModel()
            : base("RightAscensionValuesEntry")
        {
            _description = "Enter the target right ascension ";

            _rotarySliderVm = new RotarySliderViewModel
            {
                RotaryValues = new ObservableCollection <RotaryValue>
                {
                    new RotaryValue(0, 0, 24, 'h'),
                    new RotaryValue(0, 0, 60, 'm'),
                    new RotaryValue(0, 0, 60, 's')
                },
                IsValueDefined = new bool[] { true, true, true }
            };
        }
Esempio n. 3
0
        public SimpleValueEntryViewModel(string sourceID, string description, int maximumValue, char units)
            : base(sourceID)
        {
            _description = description;

            _rotarySliderVm = new RotarySliderViewModel
            {
                RotaryValues = new ObservableCollection <RotaryValue>
                {
                    new RotaryValue(0, 0, maximumValue, units)
                },
                IsValueDefined = new bool[] { true, false, false }
            };

            UsesSignsText = false;
            IsNegative    = false;
        }
        public AzimuthValuesEntryViewModel()
            : base("AzimuthValuesEntry")
        {
            _description = "Enter the target azimuth";

            _rotarySliderVm = new RotarySliderViewModel
            {
                RotaryValues = new ObservableCollection <RotaryValue>
                {
                    new RotaryValue(0, 0, 360, '°'),
                    new RotaryValue(0, 0, 60, '\''),
                    new RotaryValue(0, 0, 60, '"')
                },
                IsValueDefined = new bool[] { true, true, true }
            };

            UsesSignsText = false;
            IsNegative    = false;          // since RotaryValues[0].Value is not negative
        }
        public DomeAzimuthOffsetViewModel()
            : base("DomeAzimuthAdjustment")
        {
            _description = String.Format("Enter the dome azimuth adjustment, in degrees");

            _rotarySliderVm = new RotarySliderViewModel
            {
                RotaryValues = new System.Collections.ObjectModel.ObservableCollection <RotaryValue>
                {
                    new RotaryValue(0, 0, 11, ' ')
                },
                IsValueDefined = new bool[] { true, false, false }
            };

            UsesSignsText = true;
            NegativeText  = "----";
            PositiveText  = "++++";
            IsNegative    = false;          // since RotaryValues[0].Value is not negative
        }
        public ScopeDomeOffsetViewModel(string offsetDirections)
            : base(offsetDirections + "OffsetValuesEntry")
        {
            _description = String.Format("Enter the {0} offset distance, in mm", offsetDirections);

            _rotarySliderVm = new RotarySliderViewModel
            {
                RotaryValues = new ObservableCollection <RotaryValue>
                {
                    new RotaryValue(0, 0, +5000, ' ')
                },
                IsValueDefined = new bool[] { true, false, false }
            };

            UsesSignsText = true;
            NegativeText  = "----";
            PositiveText  = "++++";
            IsNegative    = false;          // since RotaryValues[0].Value is not negative
        }
        public DeclinationValuesEntryViewModel()
            : base("DeclinationValuesEntry")
        {
            _description = "Enter the target declination";

            _rotarySliderVm = new RotarySliderViewModel
            {
                RotaryValues = new ObservableCollection <RotaryValue>
                {
                    new RotaryValue(0, 0, 90, 0, 89, '°'),
                    new RotaryValue(0, 0, 60, 0, 59, '\''),
                    new RotaryValue(0, 0, 60, 0, 59, '"')
                },
                IsValueDefined = new bool[] { true, true, true }
            };

            UsesSignsText = true;
            NegativeText  = "South";
            PositiveText  = "North";
            IsNegative    = false;          // since RotaryValues[0].Value is not negative
        }