コード例 #1
0
ファイル: TopBar.cs プロジェクト: kevelbreh/xna-cncnet-client
 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
ファイル: TopBar.cs プロジェクト: kevelbreh/xna-cncnet-client
 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;
            }
        }