コード例 #1
0
ファイル: Program.cs プロジェクト: piwi1263/nf429
        /// <summary>
        /// Display standard startup screen
        /// </summary>
        private static void DisplaySurprise()
        {
            // 1. clear screen
            // 2. set screen color to LightBlue
            // 3. Fill a 80% or more box centered on the screen
            // 4. Draw the startup text to the inner block
            // 5. Assume 40 chars and 15 lines
            //
            //          1         2         3         4
            // 1234567890123456789012345678901234567890
            //
            //    *** NANOFRAMEWORK PREVIEW 772 ***
            //
            //    8M RAM SYSTEM  8362776 BYTES FREE
            //
            // READY
            // [BLINK BLOCK]

            // Clear the screen
            tft.ClearScreen();

            // Fill the screen with light blue
            tft.FillScreen(Color565.LightBlue);

            // Draw a rectangular with a 20 pixel surrounding
            tft.DrawRect(20, 300, 20, 220, Color565.DarkBlue);

            // Now draw the text                      1.0.4.488
            tft.DrawString(25, 25, " *** NANOFRAMEWORK 1.0.4.488 *** ", Color565.LightBlue, Color565.DarkBlue, font);
            tft.DrawString(25, 55, "8M RAM SYSTEM  8362776 BYTES FREE", Color565.LightBlue, Color565.DarkBlue, font);
            tft.DrawString(20, 85, "READY.", Color565.LightBlue, Color565.DarkBlue, font);
        }