Example #1
0
        public void StartProgram()
        {
            Debug.WriteLine("Program Started");
            var lcd = new DisplayDriver43(SC20260.GpioPin.PA15);

            Glide.SetupGlide(480, 272, 96, 0, lcd.display);
            Screens = new Hashtable();
            //populate all form
            var F1 = new SplashForm(ref MainWindow);

            F1.FormRequestEvent += General_FormRequestEvent;
            Screens.Add(Screen.ScreenTypes.Splash, F1);

            var F2 = new MainMenuForm(ref MainWindow);

            F2.FormRequestEvent += General_FormRequestEvent;
            Screens.Add(Screen.ScreenTypes.MainMenu, F2);

            var F6 = new GameForm(ref MainWindow, ref lcd);

            F6.FormRequestEvent += General_FormRequestEvent;
            Screens.Add(Screen.ScreenTypes.Game, F6);
            //init glide touch
            Glide.FitToScreen = true;
            GlideTouch.Initialize();
            //enable touch screen
            lcd.CapacitiveScreenReleased += Lcd_CapacitiveScreenReleased;
            lcd.CapacitiveScreenPressed  += Lcd_CapacitiveScreenPressed;
            lcd.CapacitiveScreenMove     += Lcd_CapacitiveScreenMove;
            //load splash
            LoadForm(Screen.ScreenTypes.Splash);
        }
Example #2
0
 //imgFull
 public GameForm(ref GHI.Glide.Display.Window window, ref DisplayDriver43 displayTE35) : base(ref window)
 {
     this.displayTE35 = displayTE35;
 }