Пример #1
0
        private void Buzz(Wiimote BuzzedWiimote)
        {
            Buzzer Buzzed = GetBuzzer(BuzzedWiimote);

            if (Buzzed == null)
            {
                return;
            }

            if (BuzzedList.Contains(Buzzed))
            {
                return;
            }

            if (BuzzedList.Count == 0)
            {
                System.Media.SystemSounds.Beep.Play();

                // First one
                RumbleWiimote(BuzzedWiimote);

                // Start Reset Timer
                if (TimedBuzzerReset)
                {
                    BuzzerResetTask = Task.Factory.StartNew(new Action(() => { BuzzedResetTimer(); }));
                }
            }

            BuzzedList.Add(Buzzed);
            Buzzed.BuzzedNumber = BuzzedList.Count;
        }
Пример #2
0
        private void RemoveWiimote(Wiimote DisconnectedWiimote)
        {
            Buzzer BuzzerToRemove = GetBuzzer(DisconnectedWiimote);

            if (BuzzerToRemove == null)
            {
                return;
            }

            Buzzer.Remove(BuzzerToRemove);
            BuzzerPanel.Items.Refresh();

            AvailableIndices.Add(BuzzerToRemove.Index);
            AvailableIndices.Sort();
        }