Пример #1
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();
        }
Пример #2
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();
        }