예제 #1
0
 public static void RollDown(uint mspause)
 {
     for (int i = 0; i < 26; i++)
     {
         for (int j = 0; j < 81; j++)
         {
             AConsole.Write(" ");
             AIC.Core.PIT.SleepMilliseconds(mspause);
         }
     }
     AConsole.Clear();
 }
            /// <summary>
            /// INFO: MaxValue is 100 and MinValue is 0.
            /// </summary>
            public void Draw()
            {
                AConsole.WriteLine();
                string buffer = "[          ]";

                AConsole.Write(buffer);
                AConsole.CursorLeft = CL + 1;

                string __buffer = "";

                for (int i = 0; i < this.value; i++)
                {
                    __buffer += "=";
                }

                AConsole.Write(__buffer);

                AConsole.CursorLeft = CL + 14;
                AConsole.Write(this.value.ToString() + "0%");
                AConsole.CursorTop  = CT;
                AConsole.CursorLeft = CL;
            }
예제 #3
0
 public static void Write(string text)
 {
     AConsole.Write("[!] ERROR: " + text.ToUpper(), ConsoleColor.Red);
 }
예제 #4
0
        /// <summary>
        /// Shows the BootScreen and a specified effect
        /// </summary>
        /// <param name="OSname"></param>
        /// <param name="efx"></param>
        /// <param name="color"></param>
        /// <param name="ms_sleep"></param>
        public static void Show(string OSname, Effect efx, ConsoleColor color, int ms_sleep)
        {
            debugger.Send("Bootscreen.Show");
            if (ms_sleep % 2 == 1)
            {
                ms_sleep++;
            }
            switch (efx)
            {
            case Effect.SlideFromLeft:
                debugger.Send("slide-from-left");
                for (int i = 0; i < ((AConsole.WindowWidth / 2) - (OSname.Length / 2)); i++)
                {
                    AConsole.Clear();
                    AConsole.CursorLeft = i;
                    string fill = "";
                    for (int x = 0; x < i; x++)
                    {
                        fill += " ";
                    }
                    AConsole.Write(fill);
                    AConsole.Write(OSname, color, false, true);
                    RTC.Sleep(ms_sleep);
                }
                break;

            case Effect.SlideFromRight:
                debugger.Send("slide-from-right");
                for (int i = (AConsole.WindowWidth - OSname.Length);
                     i > ((AConsole.WindowWidth / 2) - (OSname.Length / 2)); i--)
                {
                    AConsole.Clear();
                    AConsole.CursorLeft = i;
                    AConsole.Write(OSname, color, false, true);
                    RTC.Sleep(ms_sleep);
                }
                break;

            case Effect.SlideFromTop:
                debugger.Send("slide-from-top");
                for (int i = 0; i < (AConsole.WindowHeight / 2); i++)
                {
                    AConsole.Clear();
                    AConsole.CursorTop = i;
                    AConsole.WriteLine(OSname, color, true, false);
                    RTC.Sleep(ms_sleep);
                }
                break;

            case Effect.SlideFromBottom:
                debugger.Send("slide-from-bottom");
                for (int i = (AConsole.WindowHeight - 1); i > (AConsole.WindowHeight / 2); i--)
                {
                    AConsole.Clear();
                    AConsole.CursorTop = i;
                    AConsole.WriteLine(OSname, color, true, false);
                    RTC.Sleep(ms_sleep);
                }
                break;

            case Effect.Typewriter:
                debugger.Send("typewriter");
                AConsole.CursorLeft = ((AConsole.WindowWidth / 2) - (OSname.Length / 2));
                foreach (char chr in OSname)
                {
                    AConsole.Write(chr.ToString(), color, false, true);
                    RTC.Sleep(ms_sleep);
                }
                break;

            case Effect.Matrix:
                debugger.Send("matrix");
                int sec1 = AIC.Hardware.RTC.Now.Second;
                int sec2 = sec1;
                do
                {
                    sec2 = AIC.Hardware.RTC.Now.Second;
                } while (sec1 == sec2);
                int sec3;
                if (sec2 <= 56)
                {
                    sec3 = sec2 + 3;
                }
                else if (sec2 == 57)
                {
                    sec3 = 1;
                }
                else if (sec2 == 58)
                {
                    sec3 = 2;
                }
                else if (sec2 == 59)
                {
                    sec3 = 3;
                }
                else
                {
                    sec3 = 3;
                }
                int tmr  = 0;
                int tmrx = 0;
                for (int i = 0; i < 10; i++)
                {
                    for (int ih = 0; ih < AConsole.WindowHeight; ih++)
                    {
                        for (int iw = 0; iw < AConsole.WindowWidth; iw++)
                        {
                            if (tmr == 11)
                            {
                                tmr = 0;
                            }
                            if (tmrx == 4)
                            {
                                tmrx = 0;
                            }
                            tmr++;
                            if (tmr == 0)
                            {
                                AConsole.Write("#", ConsoleColor.Magenta);
                            }
                            if (tmrx == 3)
                            {
                                AConsole.Write("*", ConsoleColor.Green);
                            }
                            if (tmr == 2)
                            {
                                AConsole.Write(";", ConsoleColor.Red); ++tmrx;
                            }
                            if (tmrx == 1)
                            {
                                AConsole.Write("+", ConsoleColor.Yellow);
                            }
                            if (tmr == 4)
                            {
                                AConsole.Write("~", ConsoleColor.Blue); ++tmrx;
                            }
                            if (tmrx == 2)
                            {
                                AConsole.Write("&", ConsoleColor.Cyan);
                            }
                            AConsole.Write(OSname, ConsoleColor.White, true, true);
                        }
                    }
                }
                break;
            }
        }