Ejemplo n.º 1
0
 public static void SetupDialog()
 {
     Initialize();
     using (frmSetup form = new frmSetup())
     {
         form.RotationRate   = RotationRate;
         form.CanReverse     = CanReverse;
         form.Reverse        = Reverse;
         form.UpdateInterval = s_iUpdateInterval;
         if (form.ShowDialog() == System.Windows.Forms.DialogResult.OK)
         {
             Reverse      = form.Reverse;
             CanReverse   = form.CanReverse;
             RotationRate = form.RotationRate;
             Finalize_(); // Added to force persistence after valus are changed in the setup dialogue
         }
     }
 }
Ejemplo n.º 2
0
 public static void SetupDialog()
 {
     ReadConfiguration();
     using (frmSetup form = new frmSetup())
     {
         form.RotationRate   = RotationRate;
         form.CanReverse     = CanReverse;
         form.Reverse        = Reverse;
         form.UpdateInterval = updateInterval;
         form.SyncOffset     = syncOffset;
         if (form.ShowDialog() == System.Windows.Forms.DialogResult.OK)
         {
             Reverse      = form.Reverse;
             CanReverse   = form.CanReverse;
             RotationRate = form.RotationRate;
             syncOffset   = form.SyncOffset;
             //syncOffset = RangeAngle(syncOffset, 0.0F, 360.0F);
             WriteConfiguration(); // Added to force persistence after values are changed in the setup dialogue
         }
     }
 }
Ejemplo n.º 3
0
        //
        // This is also used by the driver class to access the shared
        // setup dialog. If the driver is asked for this while connected,
        // it will trap there.
        //
        public void DoSetupDialog()
        {
            frmSetup setupForm = new frmSetup();

            setupForm.CanReverse     = RotatorHardware.CanReverse;
            setupForm.Reverse        = RotatorHardware.Reverse;
            setupForm.RotationRate   = RotatorHardware.RotationRate;
            setupForm.UpdateInterval = m_iUpdateInterval;
            this.BringToFront();
            this.TopMost = true;

            DialogResult ans = setupForm.ShowDialog(this);

            if (ans == DialogResult.OK)
            {
                RotatorHardware.CanReverse   = setupForm.CanReverse;
                RotatorHardware.Reverse      = setupForm.Reverse;
                RotatorHardware.RotationRate = setupForm.RotationRate;
            }

            setupForm.Dispose();
        }
Ejemplo n.º 4
0
        //
        // This is also used by the driver class to access the shared
        // setup dialogue. If the driver is asked for this while connected,
        // it will trap there.
        //
        public void DoSetupDialog()
        {
            frmSetup setupForm = new frmSetup();

            setupForm.CanReverse   = RotatorHardware.CanReverse;
            setupForm.Reverse      = RotatorHardware.Reverse;
            setupForm.RotationRate = RotatorHardware.RotationRate;
            setupForm.SyncOffset   = RotatorHardware.SyncOffset;

            setupForm.UpdateInterval = updateInterval;

            DialogResult ans = setupForm.ShowDialog(this);

            if (ans == DialogResult.OK)
            {
                RotatorHardware.CanReverse   = setupForm.CanReverse;
                RotatorHardware.Reverse      = setupForm.Reverse;
                RotatorHardware.RotationRate = setupForm.RotationRate;
                RotatorHardware.SyncOffset   = setupForm.SyncOffset;
            }

            setupForm.Dispose();
        }