Exemplo n.º 1
0
        private void ToggleProjectorPower(string port)
        {
            try
            {
                SyncBoard sb = new SyncBoard(port);

                sb.Open();
                sb.TogglePower();

                sb.ToggleProjectorMode();
                sb.Close();
            }
            catch (Exception ex)
            {
                throw ex;
            }
        }
Exemplo n.º 2
0
        private void ToggleProjectorPower(string port)
        {
            _projectorPowerBtn.Invoke(new Action(() => _projectorPowerBtn.Enabled = false));

            try
            {
                SyncBoard sb = new SyncBoard(port);

                sb.Open();
                sb.TogglePower();

                sb.ToggleProjectorMode();
                sb.Close();
            }
            catch (Exception ex)
            {
                throw ex;
            }
            finally
            {
                _projectorPowerBtn.Invoke(new Action(() => _projectorPowerBtn.Enabled = true));
            }
        }