Esempio n. 1
0
        public MainState(Program handle)
            : base(handle,TypeState.Normal)
        {
            _arrayState = new State[9];
            string disconnect = "(disconnect)";
            _menu = new Menu(MainHandle.Display_N18);
            _menu.Title = "SDK Gadgeteer";
            _menu.Lines[0] = "On/off Button led";
            _menu.Lines[1] = "Demo Joystick";
            _menu.Lines[2] = "Demo Timer";
            _menu.Lines[3] = "Demo SDCard";
            _menu.Lines[4] = "Demo Tunes";
            _menu.Lines[5] = "Demo Led Strip";
            _menu.Lines[6] = "Demo Screen";
            _menu.Lines[7] = "Item7";
            _menu.Lines[8] = "Infos,versions,...";

            if (MainHandle.Tunes == null)
                _menu.Lines[4] += disconnect;

            if (MainHandle.LED_Strip == null)
                _menu.Lines[5] += disconnect;

            _menu.Draw();
        }
Esempio n. 2
0
        public TunesDemoState(Program handle)
            : base(handle, TypeState.Normal)
        {
            _melodyRTTL = new String[9];
            _menu = new Menu(MainHandle.Display_N18);
            _menu.Title = "Demo Tunes";
            _menu.Lines[0] = "Super Mario Bros";
            _melodyRTTL[0] = "smb:d=4,o=5,b=100:16e6,16e6,32p,8e6,16c6,8e6,8g6,8p,8g,8p,8c6,16p,8g,16p,8e,16p,8a,8b,16a#,8a,16g.,16e6,16g6,8a6,16f6,8g6,8e6,16c6,16d6,8b,16p,8c6,16p,8g,16p,8e,16p,8a,8b,16a#,8a,16g.,16e6,16g6,8a6,16f6,8g6,8e6,16c6,16d6,8b,8p,16g6,16f#6,16f6,16d#6,16p,16e6,16p,16g#,16a,16c6,16p,16a,16c6,16d6,8p,16g6,16f#6,16f6,16d#6,16p,16e6,16p,16c7,16p,16c7,16c7,p,16g6,16f#6,16f6,16d#6,16p,16e6,16p,16g#,16a,16c6,16p,16a,16c6,16d6,8p,16d#6,8p,16d6,8p,16c6";
            _menu.Lines[1] = "Zelda: Ocarina Of Time";
            _melodyRTTL[1] = "zelda_gerudo:d=4,o=5,b=125:16c#,16f#,16g#,8a,16p,16c#,16f#,16g#,a,8p,16d,16f#,16g#,8a,16p,16d,16f#,16g#,a,8p,16b4,16e,16f#,8g#,16p,16b4,16e,16f#,g#,8p,16f#,16g#,16f#,2f,8p,16c#,16f#,16g#,8a,16p,16c#,16f#,16g#,a,8p,16d,16f#,16g#,8a,16p,16d,16f#,16g#,a,8p,16b4,16e,16f#,8g#,16p,16b4,16e,16f#,g#,8p,16a,16b,16a,2g#";
            _menu.Lines[2] = "Tetris";
            _melodyRTTL[2] = "korobyeyniki:d=4,o=5,b=160:e6,8b,8c6,8d6,16e6,16d6,8c6,8b,a,8a,8c6,e6,8d6,8c6,b,8b,8c6,d6,e6,c6,a,2a,8p,d6,8f6,a6,8g6,8f6,e6,8e6,8c6,e6,8d6,8c6,b,8b,8c6,d6,e6,c6,a,a";
            _menu.Lines[3] = "The Adams Family";
            _melodyRTTL[3] = "aadams:d=4,o=5,b=160:8c,f,8a,f,8c,b4,2g,8f,e,8g,e,8e4,a4,2f,8c,f,8a,f,8c,b4,2g,8f,e,8c,d,8e,1f,8c,8d,8e,8f,1p,8d,8e,8f#,8g,1p,8d,8e,8f#,8g,p,8d,8e,8f#,8g,p,8c,8d,8e,8f";
            _menu.Lines[4] = "Pink Panther";
            _melodyRTTL[4] = "PinkPanther:d=4,o=5,b=160:8d#,8e,2p,8f#,8g,2p,8d#,8e,16p,8f#,8g,16p,8c6,8b,16p,8d#,8e,16p,8b,2a#,2p,16a,16g,16e,16d,2e";
            _menu.Lines[5] = "Barbie Girl";
            _melodyRTTL[5] = "girl:d=4,o=5,b=125:8g#,8e,8g#,8c#6,a,p,8f#,8d#,8f#,8b,g#,8f#,8e,p,8e,8c#,f#,c#,p,8f#,8e,g#,f# ";
            _menu.Lines[6] = "Macarena";
            _melodyRTTL[6] = "Macarena:d=4,o=5,b=180:f,8f,8f,f,8f,8f,8f,8f,8f,8f,8f,8a,8c,8c,f,8f,8f,f,8f,8f,8f,8f,8f,8f,8d,8c,p,f,8f,8f,f,8f,8f,8f,8f,8f,8f,8f,8a,p,2c.6,a,8c6,8a,8f,p,2p";
            _menu.Lines[7] = "Indiana";
            _melodyRTTL[7] = "Indiana:d=4,o=5,b=250:e,8p,8f,8g,8p,1c6,8p.,d,8p,8e,1f,p.,g,8p,8a,8b,8p,1f6,p,a,8p,8b,2c6,2d6,2e6,e,8p,8f,8g,8p,1c6,p,d6,8p,8e6,1f.6,g,8p,8g,e.6,8p,d6,8p,8g,e.6,8p,d6,8p,8g,f.6,8p,e6,8p,8d6,2c6";
            _menu.Lines[8] = "The Simpsons";
            _melodyRTTL[8] = "The Simpsons:d=4,o=5,b=160:c.6,e6,f#6,8a6,g.6,e6,c6,8a,8f#,8f#,8f#,2g,8p,8p,8f#,8f#,8f#,8g,a#.,8c6,8c6,8c6,c6";
            _menu.Draw();

            _Tunes = MainHandle.Tunes;
        }