Пример #1
0
 private void BtnCnCNetLobby_LeftClick(object sender, EventArgs e)
 {
     LastSwitchType = SwitchType.SECONDARY;
     primarySwitches[primarySwitches.Count - 1].SwitchOff();
     cncnetLobbySwitch.SwitchOn();
     privateMessageSwitch.SwitchOff();
 }
Пример #2
0
        private void BtnCnCNetLobby_LeftClick(object sender, EventArgs e)
        {
            LastSwitchType = SwitchType.SECONDARY;
            primarySwitches[primarySwitches.Count - 1].SwitchOff();
            cncnetLobbySwitch.SwitchOn();
            privateMessageSwitch.SwitchOff();

            // HACK warning
            // TODO: add a way for DarkeningPanel to skip transitions
            ((DarkeningPanel)((XNAControl)cncnetLobbySwitch).Parent).Alpha = 1.0f;
        }
Пример #3
0
 private void BtnMainButton_LeftClick(object sender, EventArgs e)
 {
     LastSwitchType = SwitchType.PRIMARY;
     cncnetLobbySwitch.SwitchOff();
     privateMessageSwitch.SwitchOff();
     primarySwitches[primarySwitches.Count - 1].SwitchOn();
 }
Пример #4
0
        private void BtnMainButton_LeftClick(object sender, EventArgs e)
        {
            LastSwitchType = SwitchType.PRIMARY;
            cncnetLobbySwitch.SwitchOff();
            privateMessageSwitch.SwitchOff();
            primarySwitches[primarySwitches.Count - 1].SwitchOn();

            // HACK warning
            // TODO: add a way for DarkeningPanel to skip transitions
            if (((XNAControl)primarySwitches[primarySwitches.Count - 1]).Parent is DarkeningPanel darkeningPanel)
            {
                darkeningPanel.Alpha = 1.0f;
            }
        }
Пример #5
0
        public void SwitchByUserInput()
        {
            var input = Console.ReadKey().Key;

            state = !state;

            while (input != ConsoleKey.Escape)
            {
                if (state)
                {
                    _myDevice.SwitchOn();
                }
                else
                {
                    _myDevice.SwitchOff();
                }

                input = Console.ReadKey().Key;
                state = !state;
            }
        }