Ejemplo n.º 1
0
        private void EditSlaveInterval()
        {
            int interval = SlaveInterval;

            SimpleValueEntryViewModel vm = new SimpleValueEntryViewModel("SlaveInterval"
                                                                         , "Enter the azimuth adjustment interval, in seconds", 0, 300, 5, 300, ' ');

            vm.InitializeValues(new int[1] {
                interval
            });

            IDialogService svc    = ServiceContainer.Instance.GetService <IDialogService>();
            bool?          result = svc.ShowDialog(vm);

            if (result.HasValue && result.Value)
            {
                int[] values = vm.GetValues();

                interval = values[0];
            }

            vm.Dispose();
            vm = null;

            // Don't allow a value less than 5 seconds.

            SlaveInterval = Math.Max(interval, 5);
        }
Ejemplo n.º 2
0
        private void EditGemAxisOffset()
        {
            int offset = GemAxisOffset;

            SimpleValueEntryViewModel vm = new SimpleValueEntryViewModel("GemAxisOffset"
                                                                         , "Enter the GEM axis offset distance, in mm", 0, 2000, 0, 2000, ' ');

            vm.InitializeValues(new int[1] {
                offset
            });

            IDialogService svc    = ServiceContainer.Instance.GetService <IDialogService>();
            bool?          result = svc.ShowDialog(vm);

            if (result.HasValue && result.Value)
            {
                int[] values = vm.GetValues();

                offset = values[0];
            }

            vm.Dispose();
            vm = null;

            GemAxisOffset = offset;
        }
Ejemplo n.º 3
0
        private void EditAzimuthAccuracy()
        {
            int accuracy = AzimuthAccuracy;

            SimpleValueEntryViewModel vm = new SimpleValueEntryViewModel("AzimuthAccuracy"
                                                                         , "Enter the allowed azimuth difference, in degrees", 0, 10, 0, 10, ' ');

            vm.InitializeValues(new int[1] {
                accuracy
            });

            IDialogService svc    = ServiceContainer.Instance.GetService <IDialogService>();
            bool?          result = svc.ShowDialog(vm);

            if (result.HasValue && result.Value)
            {
                int[] values = vm.GetValues();

                accuracy = values[0];
            }

            vm.Dispose();
            vm = null;

            AzimuthAccuracy = accuracy;
        }
Ejemplo n.º 4
0
        private void EditDomeRadius()
        {
            int radius = DomeRadius;

            SimpleValueEntryViewModel vm = new SimpleValueEntryViewModel("DomeRadius"
                                                                         , "Enter the radius of the dome, in mm", 0, 20000, 0, 20000, ' ');

            vm.InitializeValues(new int[1] {
                radius
            });

            IDialogService svc    = ServiceContainer.Instance.GetService <IDialogService>();
            bool?          result = svc.ShowDialog(vm);

            if (result.HasValue && result.Value)
            {
                int[] values = vm.GetValues();

                radius = values[0];
            }

            vm.Dispose();
            vm = null;

            DomeRadius = radius;
        }