コード例 #1
0
ファイル: KloutKlock.cs プロジェクト: bleroy/netduinohelpers
        public static void ShowTime()
        {
            BreatheTFT(BreatheOutPulses);

            var background = new VirtualFrame(40960, 32, @"SD\Bitmaps\KloutBackground.bin");

            background.Width  = 160;
            background.Height = 128;
            vm.IsReadOnly     = false;
            vm.Copy(background);

            DisplayKloutOrKlockIcon(background, "clock");
            DisplayKloutOrKlock(background, "KLOCK");

            vm.BitmapDirectory          = @"SD\DigitsS\";
            vm.MaxCharactersAfterPeriod = 2;
            vm.MaxMessageLength         = 10;
            vm.Print(background, GetDate(), 7, 35 + 4, 15, 21);

            vm.BitmapDirectory          = @"SD\DigitsM\";
            vm.MaxCharactersAfterPeriod = 2;
            vm.MaxMessageLength         = 5;
            vm.Print(background, GetTime(), 0, 64 + 11, 32, 42);

            tft.Refresh();
            BreatheTFT(BreatheInPulses);
            background.Dispose();
            background = null;
            Debug.GC(true);
        }