Пример #1
0
 protected override void BeforeRun()
 {
     VGADriverII.Initialize(VGAMode.Pixel320x200DB);
     draw.FromByteArray(System.Graphics.Images.BootScreen);
     VGAGraphics.DrawImage(0, 0, draw);
     VGAGraphics.Display();
     draw.FromByteArray(System.Graphics.Images.Cursor);
 }
Пример #2
0
 public static void Run()
 {
     VGAGraphics.Clear(VGAColor.Black);
     //draw current window (windows are always fullscreen for now)
     if (!(windows.Count == 0))
     {
         windows[RunningIndex].Run();
     }
     //draw mouse
     VGAGraphics.DrawImage((int)MouseManager.X, (int)MouseManager.Y, VGAColor.Magenta, ImgCursor);
     VGADriverII.Display();
 }
Пример #3
0
 public override void Run()
 {
     //draw gets called before run
     if (MouseOver)
     {
         VGAGraphics.DrawFilledRect(X, Y, Width, Height, HoverColor);
     }
     if (MouseOver && MouseManager.MouseState == MouseState.Left && !MousePreviouslyPressed)
     {
         MousePreviouslyPressed = true;
         VGAGraphics.DrawFilledRect(X, Y, Width, Height, ClickColor);
         EventArgs eventArgs = new EventArgs();
         OnMouseClick(eventArgs);
     }
 }
Пример #4
0
 public static void Run()
 {
     VGAGraphics.Clear(VGAColor.Black);
     foreach (var window in windows)
     {
         window.Draw();
     }
     if (windows.Count != 0)
     {
         windows[RunningIndex].Run();
     }
     //draw mouse
     VGAGraphics.DrawImage((int)MouseManager.X, (int)MouseManager.Y, VGAColor.Magenta, ImgCursor);
     VGADriverII.Display();
 }
Пример #5
0
        public override void Draw()
        {
            //called by window
            MouseOver = Intersect((int)MouseManager.X, (int)MouseManager.Y);

            if (MouseOver)
            {
                if (MouseManager.MouseState != MouseState.Left)
                {
                    MousePreviouslyPressed = false;
                }
            }
            else
            {
                VGAGraphics.DrawFilledRect(X, Y, Width, Height, Color);
            }
        }
Пример #6
0
 public static void Run()
 {
     VGADriverII.Clear(247);
     VGAGraphics.DrawString(0, 0, "Cosix Graphics Manager", VGAColor.Black, VGAFont.Font8x8);
     VGAGraphics.DrawFilledRect(300, 180, 20, 20, VGAColor.Red);
     VGAGraphics.DrawFilledRect((int)MouseManager.X, (int)MouseManager.Y, 2, 2, VGAColor.Blue);
     if (vstate == 2)
     {
         VGAGraphics.Display();
     }
     if ((MouseManager.X > 300) & (MouseManager.Y > 180) & (MouseManager.MouseState == MouseState.Left))
     {
         GoText();
         Terminal.TextColor = ConsoleColor.White;
         Terminal.BackColor = ConsoleColor.Black;
         Terminal.Clear();
     }
 }
Пример #7
0
 public static void Crash(Exception e)
 {
     if (Modules.CGM.VStateGet() == 0)
     {
         Terminal.Clear(ConsoleColor.DarkRed);
         Terminal.WriteLine("A fatal exception occured!");
         Terminal.WriteLine(e.ToString());
         Terminal.WriteLine("Please report this to the Cosix devs.");
         Terminal.DisableCursor();
         while (true)
         {
             if (Sys.KeyboardManager.ControlPressed)
             {
                 Terminal.BackColor = ConsoleColor.Black;
                 Terminal.Clear();
                 Terminal.EnableCursor();
                 break;
             }
             if (Sys.KeyboardManager.ShiftPressed)
             {
                 Restart();
             }
         }
     }
     else
     {
         VGADriverII.Clear(229);
         VGAGraphics.DrawString(0, 0, "A fatal exception occured!\n" + e.ToString() + "\nPlease report this to the Cosix devs.", VGAColor.White, VGAFont.Font8x8);
         if (Modules.CGM.VStateGet() == 2)
         {
             VGADriverII.Display();
         }
         while (true)
         {
         }
     }
 }
Пример #8
0
 protected override void Run()
 {
     VGADriverII.Clear(206);
     VGAGraphics.DrawImage((int)Sys.MouseManager.X, (int)Sys.MouseManager.Y, draw);
     VGADriverII.Display();
 }
Пример #9
0
 private static void DrawTaskbar()
 {
     VGAGraphics.DrawFilledRect(0, 300, 200, 20, VGAColor.Gray3);
 }
Пример #10
0
 private static void DrawWallpaper()
 {
     VGAGraphics.Clear(VGAColor.Cyan7);
 }
Пример #11
0
 private static void DrawBackground()
 {
     VGAGraphics.Clear(VGAColor.Blue3);
 }