Пример #1
0
        public static void StartAnimClock()
        {
            var locationColon = 7;

            if (SettingsSDMonitor.CheckForLayout() == "Mini")
            {
                locationColon = 1;
            }

            //start loop
            while (true)
            {
                if (exitflag)
                {
                    break;
                }

                var loc = KeyBitmap.Create.FromFile(SettingsSDMonitor.ImageLocColon);
                deck.SetKeyBitmap(locationColon, loc);

                //animate clock colon every second
                System.Threading.Thread.Sleep(1000);
                deck.ClearKey(locationColon);
                System.Threading.Thread.Sleep(1000);
            }
        }
Пример #2
0
        private static void StartGame(IMacroBoard deck)
        {
            //suffle memory cards
            openCard[0] = -1;
            openCard[1] = -1;
            mode        = 0;
            SuffleArray(gameState, rnd);

            for (int i = 0; i < cardVisible.Length; i++)
            {
                cardVisible[i] = false;
            }

            //Clear all tiles (except restart key)
            for (int i = 0; i < deck.Keys.Count; i++)
            {
                if (i != restartKey)
                {
                    deck.ClearKey(i);
                }
            }

            //(Re-)Draw restart key image
            deck.SetKeyBitmap(restartKey, restartIcon);
        }