コード例 #1
0
 private void PrintLastDate()
 {
     ReadData();
     if (_Data != null)
     {
         ConsoleDisplayN18.Clear();
         ConsoleDisplayN18.WriteLine("The last date save in the SDCard : " + _Data.LastDate.ToString());
     }
 }
コード例 #2
0
        public override void Entry()
        {
            //To do at the start (subscribe events...)
            ConsoleDisplayN18.Clear();
            ConsoleDisplayN18.WriteLine("Hello World !");
            Thread.Sleep(1000);

            StartListen(); //start timer and interface (button Home, back and joystick)
            Timer.Tick += Timer_Tick;
        }
コード例 #3
0
        public override void Entry()
        {
            StartListen();
            ConsoleDisplayN18.Clear();
            ConsoleDisplayN18.WriteLine("Press and move the joystick.");

            _x = MainHandle.Display_N18.Width / 2;
            _y = MainHandle.Display_N18.Height / 2;
            Draw();
        }
コード例 #4
0
        public override void Entry()
        {
            StartListen();

            ConsoleDisplayN18.Clear();
            ConsoleDisplayN18.WriteLine("Size Display : " + ConsoleDisplayN18.Screen.Width + "x" + ConsoleDisplayN18.Screen.Height);
            ConsoleDisplayN18.WriteLine("Line 2");
            ConsoleDisplayN18.WriteLine("Line 3");
            ConsoleDisplayN18.WriteLine("Line 4");
            ConsoleDisplayN18.WriteLine("Line 5");
            ConsoleDisplayN18.WriteLine("0123456789X123........456789X123456___________789X12345");
            ConsoleDisplayN18.WriteLine("Line 9\nLine 10\nLine 11\nLine 12\nLine 13");
        }
コード例 #5
0
 public override void Entry()
 {
     if (_Tunes == null)
     {
         ConsoleDisplayN18.Clear();
         ConsoleDisplayN18.WriteLine("The module Tunes is not connected.You have to connect in the socket 3 and in the Gadgeteer's designer(don't forget to recompile the project).");
         Thread.Sleep(2000);
         MainHandle.Context.GoBack();
     }
     else
     {
         StartListen();
     }
 }
コード例 #6
0
        public override void Entry()
        {
            StartListen();

            ConsoleDisplayN18.Clear();
            ConsoleDisplayN18.WriteLine("About this DEMO Gadgeteer");
            ConsoleDisplayN18.WriteLine("Mainboard :");
            ConsoleDisplayN18.WriteLine(MainHandle.MotherCard.MainboardName);
            ConsoleDisplayN18.WriteLine(MainHandle.MotherCard.MainboardVersion);
            ConsoleDisplayN18.WriteLine("Framework :");
            ConsoleDisplayN18.WriteLine(SystemInfo.Version.ToString());
            ConsoleDisplayN18.WriteLine("Logiciel :");
            ConsoleDisplayN18.WriteLine(Assembly.GetExecutingAssembly().GetName().Name);
            ConsoleDisplayN18.WriteLine(Assembly.GetExecutingAssembly().GetName().Version.ToString());
        }
コード例 #7
0
        public override void Exit()
        {
            //To do at the end (desubscribe events...)
            if (MainHandle.SdCard.IsCardMounted)
            {
                //save date
                _Data          = new ExampleData();
                _Data.LastDate = DateTime.Now;
                SaveData();
            }
            else
            {
                ConsoleDisplayN18.Clear();
                ConsoleDisplayN18.WriteLine("Sorry I cannot save the date.");
                Thread.Sleep(1000);
            }

            StopListen();//Stop timer and interface
        }
コード例 #8
0
        public override void Entry()
        {
            if (MainHandle.LED_Strip == null)
            {
                ConsoleDisplayN18.Clear();
                ConsoleDisplayN18.WriteLine("The module Led Strip is not connected.You have to connect in the socket 3 and in the Gadgeteer's designer(don't forget to recompile the project).");
                Thread.Sleep(2000);
                MainHandle.Context.GoBack();
            }
            else
            {
                ConsoleDisplayN18.Clear();
                ConsoleDisplayN18.WriteLine("Demo led strip !");
                StartListen(); //start timer and interface (button Home, back and joystick)

                MainHandle.LED_Strip.TurnAllLedsOn();
                Thread.Sleep(1000);
                Timer.Tick += Timer_Tick;
            }
        }
コード例 #9
0
        private bool IsMountSdCard()
        {
            bool result = false;

            if (!MainHandle.SdCard.IsCardInserted)
            {
                ConsoleDisplayN18.Clear();
                ConsoleDisplayN18.WriteLine("Insert the SDCard.");
                ConsoleDisplayN18.WriteLine("After press Joystick.");
            }
            else
            {
                if (!MainHandle.SdCard.IsCardMounted)
                {
                    MainHandle.SdCard.MountSDCard();
                }

                result = true;
            }
            return(result);
        }
コード例 #10
0
 public override void Entry()
 {
     ConsoleDisplayN18.Clear();
     ConsoleDisplayN18.WriteLine(Error.Message + " " + Error.StackTrace);
 }
コード例 #11
0
 public override void Entry()
 {
     StartListen();
     ConsoleDisplayN18.Clear();
     ConsoleDisplayN18.WriteLine("Press the joystick to turn on/off the button's led.");
 }