static Glide()
        {
            int width, height, bitsPerPixel, orientationDeg;

            HardwareProvider.HwProvider.GetLCDMetrics(out width, out height, out bitsPerPixel, out orientationDeg);
            LCD = new Size()
            {
                Width = width, Height = height
            };
            screen = new Bitmap(width, height);

            // Are we in the emulator?
            if (SystemInfo.SystemID.SKU == 3)
            {
                IsEmulator = true;
            }
            else
            {
                IsEmulator = false;
            }

            FitToScreen = false;

            Keyboard          = DefaultKeyboard();
            MessageBoxManager = new MessageBoxManager();

            // Show loading
            Bitmap loading = Resources.GetBitmap(Resources.BitmapResources.loading);

            screen.DrawImage((LCD.Width - loading.Width) / 2, (LCD.Height - loading.Height) / 2, loading, 0, 0, loading.Width, loading.Height);
            screen.Flush();
        }
Example #2
0
        public static void SetupGlide(int width, int height, int bitsPerPixel, int orientationDeg, DisplayController displayController)
        {
            Hdc = displayController.Hdc;
            //HardwareProvider.HwProvider.GetLCDMetrics(out width, out height, out bitsPerPixel, out orientationDeg);
            LCD = new Size()
            {
                Width = width, Height = height
            };
            screen     = System.Drawing.Graphics.FromHdc(Hdc);// new (width, height);
            IsEmulator = false;

            /*
             * // Are we in the emulator?
             * if (SystemInfo.SystemID.SKU == 3)
             *  IsEmulator = true;
             * else
             *  IsEmulator = false;
             */
            FitToScreen = false;

            Keyboard          = DefaultKeyboard();
            MessageBoxManager = new MessageBoxManager();

            // Show loading
            System.Drawing.Bitmap loading = Resources.GetBitmap(Resources.BitmapResources.loading);

            screen.DrawImage(loading, (LCD.Width - loading.Width) / 2, (LCD.Height - loading.Height) / 2, loading.Width, loading.Height);
            screen.Flush();
            //screen.Flush(0,0,width,height);
        }
Example #3
0
        public static void Start(IPlatform platform)
        {
            Platform = platform;

            LCD = new Size
            {
                Width = Platform.ScreenWidth,
                Height = Platform.ScreenHeight
            };

            // Are we in the emulator?
            //            if (SystemInfo.SystemID.SKU == 3)
                IsEmulator = true;
            //else
            //    IsEmulator = false;

            FitToScreen = false;

            Keyboard = DefaultKeyboard();
            MessageBoxManager = new MessageBoxManager();

            // Show loading
            Bitmap loading = LoadBitmap("loading");
            Screen.DrawImage((LCD.Width - loading.Width) / 2, (LCD.Height - loading.Height) / 2, loading, 0, 0, loading.Width, loading.Height);
            Screen.Flush();
        }