示例#1
0
        static void UpdateDisplay()
        {
            display.Clear();

            display.DrawRectangle(0, 0, 128, 64, true, false);

            display.DrawText(4, 4, "C# Radio");
            display.DrawText(4, 16, radio.GetFrequency().ToString("N1") + " MHz");
            display.DrawText(4, 28, radio.GetSignalLevel() + " db");
            display.DrawText(4, 40, radio.IsStereo() ? "Stereo" : "Mono");

            display.Show();
        }
        void UpdateDisplay()
        {
            display.Clear();

            display.DrawText(0, 0, $"{radio.GetFrequency()}");

            display.DrawText(0, 10, (radio.IsStereo() ? "stereo" : "mono"));
            stereoLed.State = radio.IsStereo();

            display.DrawText(0, 20, radio.GetSignalLevel() + "db");

            display.DrawText(0, 30, radio.IsMuted ? "mute" : "on");

            display.Show();
        }