示例#1
0
        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);
        }
示例#2
0
        public static void DisplayKloutOrKlock(VirtualFrame background, string filename)
        {
            var sprite = new VirtualFrame(7548, 16, @"SD\Bitmaps\" + filename + ".bin");

            sprite.Width   = 111;
            sprite.Height  = 34;
            sprite.xOffset = 44;
            sprite.yOffset = 0;
            vm.Merge(background, sprite);
            sprite.Dispose();
            sprite = null;
            Debug.GC(true);
        }
示例#3
0
        public static void DisplayKloutKPI(VirtualFrame background, string filename)
        {
            var sprite = new VirtualFrame(8960, 16, @"SD\Bitmaps\" + filename + ".bin");

            sprite.Width   = 160;
            sprite.Height  = 28;
            sprite.xOffset = 0;
            sprite.yOffset = 35;
            vm.Merge(background, sprite);
            sprite.Dispose();
            sprite = null;
            Debug.GC(true);
        }
示例#4
0
        public static void DisplayKloutOrKlockIcon(VirtualFrame background, string icon)
        {
            var sprite = new VirtualFrame(4950, 16, @"SD\Bitmaps\" + icon + ".bin");

            sprite.Width   = 48;
            sprite.Height  = 34;
            sprite.xOffset = 0;
            sprite.yOffset = 0;
            vm.Merge(background, sprite);
            sprite.Dispose();
            sprite = null;
            Debug.GC(true);
        }
示例#5
0
        public static void DisplayPositiveNegativeIcon(VirtualFrame background, string icon)
        {
            var sprite = new VirtualFrame(4800, 16, @"SD\Bitmaps\" + icon + ".bin");

            sprite.Width   = 40;
            sprite.Height  = 60;
            sprite.xOffset = 0;
            sprite.yOffset = 64 + 2;
            vm.Merge(background, sprite);
            sprite.Dispose();
            sprite = null;
            Debug.GC(true);
        }
示例#6
0
        public static void DisplayKloutClass(VirtualFrame background, string kloutClass)
        {
            var sprite = new VirtualFrame(6720, 16, @"SD\Bitmaps\" + kloutClass + ".bin");

            sprite.Width   = 160;
            sprite.Height  = 21;
            sprite.xOffset = 0;
            sprite.yOffset = 64 + 21;
            vm.Merge(background, sprite);
            sprite.Dispose();
            sprite = null;
            Debug.GC(true);
        }
示例#7
0
        public static void EraseKloutData(VirtualFrame background)
        {
            var sprite = new VirtualFrame(20480, 16, @"SD\Bitmaps\KloutDataEraser.bin");

            sprite.Width   = 160;
            sprite.Height  = 64;
            sprite.xOffset = 0;
            sprite.yOffset = 64;
            vm.Merge(background, sprite);
            sprite.Dispose();
            sprite = null;
            Debug.GC(true);
        }
示例#8
0
        public static void ShowKloutSplashScreen()
        {
            tftBacklight.SetPulse(0, 0);
            var background = new VirtualFrame(40960, 32, @"SD\Bitmaps\KLOUTSplashScreen.bin");

            background.Width  = 160;
            background.Height = 128;
            vm.Copy(background);
            tft.Refresh();
            BreatheTFT(BreatheInPulses);
            background.Dispose();
            background = null;
            Debug.GC(true);
            Thread.Sleep(2000);
        }
示例#9
0
        public static void ShowKlout()
        {
            BreatheTFT(BreatheOutPulses);

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

            background.Width  = 160;
            background.Height = 128;

            vm.IsReadOnly = false;
            vm.Copy(background);

            vm.BitmapDirectory          = @"SD\DigitsL\";
            vm.MaxCharactersAfterPeriod = 1;
            vm.MaxMessageLength         = 4;

            DisplayKloutOrKlockIcon(background, "KloutLogo");
            DisplayKloutOrKlock(background, "KLOUT");

            DisplayKloutKPI(background, "Class");
            DisplayKloutClass(background, _kclass);
            tft.Refresh();

            BreatheTFT(BreatheInPulses);

            DisplayKloutDataPoint(background, "KloutScore", _kscore);
            DisplayKloutDataPoint(background, "Network", _networkScore);
            DisplayKloutDataPoint(background, "Amplification", _amplificationScore);
            DisplayKloutDataPoint(background, "TrueReach", _trueReach);
            DisplayKloutDataPoint(background, "Influencers", _influencers);
            DisplayKloutDataPoint(background, "Influencees", _influencees);
            DisplayKloutDataPoint(background, "Topics", _topicsCount);
            DisplayKloutDataPoint(background, "Delta1Day", _delta1Day, true);
            DisplayKloutDataPoint(background, "Delta5Days", _delta5Day, true);

            background.Dispose();
            background = null;
            Debug.GC(true);
        }