예제 #1
0
파일: LogoTyper.cs 프로젝트: thumpnail/SAM
        public static void DrawLogo(string[] logo, ConsoleColor fColor, ConsoleColor bColor, int wait)
        {
            ConsoleColor fDefault = Console.ForegroundColor;
            ConsoleColor bDefault = Console.BackgroundColor;

            Console.ForegroundColor = fColor;
            Console.BackgroundColor = bColor;

            List <char[]> charLogo = new List <char[]>();

            for (int i = 0; i < logo.Length; i++)
            {
                charLogo.Add(logo[i].ToCharArray());
            }

            for (int i = 0; i < charLogo.Count; i++)
            {
                for (int a = 0; a < charLogo[i].Length; a++)
                {
                    Console.Write(charLogo[i].GetValue(a));
                    WAIT.waitMilsec(wait);
                }
                Console.WriteLine();
            }
            Console.ForegroundColor = fDefault;
            Console.BackgroundColor = bDefault;
        }
예제 #2
0
        public static void SimpleLoadingProcedure(string nameTag, int procress, ConsoleColor frameColor, ConsoleColor barColor, ConsoleColor frameBackColor, ConsoleColor barBackColor, int rndTimeStampMin, int rndTimeStampMax)
        {
            //saveing defaults
            ConsoleColor backDefault = Console.BackgroundColor;
            ConsoleColor foreDefault = Console.ForegroundColor;

            //Configure Frame
            Console.BackgroundColor = frameBackColor;
            Console.ForegroundColor = frameColor;
            Console.Write(nameTag + ":[");
            for (int i = 0; i < procress; i++)
            {
                Console.Write(".");
            }
            Console.Write("]");
            Console.ForegroundColor = foreDefault;
            Console.BackgroundColor = backDefault;
            //Configure Bar
            Console.BackgroundColor = barBackColor;
            Console.ForegroundColor = barColor;
            Console.SetCursorPosition(nameTag.Length + 2, Console.CursorTop);
            Random rnd = new Random();

            for (int i = 0; i < procress; i++)
            {
                WAIT.waitMilsec(rnd.Next(rndTimeStampMin, rndTimeStampMax));
                Console.Write("#");
            }
            Console.ForegroundColor = foreDefault;
            Console.BackgroundColor = backDefault;
            //Clearing up with an empty line
            Console.WriteLine();
        }
예제 #3
0
파일: TextTyper.cs 프로젝트: thumpnail/SAM
 public static void SimpleTextType(string text)
 {
     char[] typeText = text.ToCharArray();
     for (int i = 0; i < typeText.Length; i++)
     {
         Console.Write(typeText[i]);
         WAIT.waitMilsec(100);
     }
     Console.WriteLine();
 }
예제 #4
0
파일: TextTyper.cs 프로젝트: thumpnail/SAM
        public static void SimpleTextType(string text, int wait, ConsoleColor fColor)
        {
            ConsoleColor fDefault = Console.ForegroundColor;

            Console.ForegroundColor = fColor;
            char[] typeText = text.ToCharArray();
            for (int i = 0; i < typeText.Length; i++)
            {
                Console.Write(typeText[i]);
                WAIT.waitMilsec(wait);
            }
            Console.ForegroundColor = fDefault;
            Console.WriteLine();
        }