Esempio n. 1
0
        private void ConsoleWindow_onTicked(ObjectTimer sender, EventArgs args)
        {
            var team = sender.id < 3 ? 0 : 1;

            overlay.viewmodel.isTimerShowed[team] = true;
            var span = new TimeSpan(0, 0, sender.leftTime);

            overlay.viewmodel.inhibTimer[sender.id] = sender.leftTime >= 0 ? span.ToString(@"m\:ss") : "";
        }
Esempio n. 2
0
        private void ConsoleWindow_onTimerEnd(ObjectTimer sender, EventArgs args)
        {
            sender.Stop();
            var team = sender.id < 3 ? 0 : 1;

            if (team == 0)
            {
                var array = new int[3] {
                    viewmodel.timer[0].leftTime, viewmodel.timer[1].leftTime, viewmodel.timer[2].leftTime
                };
                overlay.viewmodel.isTimerShowed[team] = array.Sum() == -3 ? false : true;
            }
            else
            {
                var array = new int[3] {
                    viewmodel.timer[3].leftTime, viewmodel.timer[4].leftTime, viewmodel.timer[5].leftTime
                };
                overlay.viewmodel.isTimerShowed[team] = array.Sum() == -3 ? false : true;
            }
        }