Example #1
0
 public static void WriteLogo(int x, int y, int pixWidth, int pixHeight, ConsoleShade fillShade, ConsoleShade endShade, ConsoleShade shadowShade, bool makeSpace, bool replaceCursor, string[] lines)
 {
     if (RugConsole.CanManipulateBuffer)
     {
         int cursorLeft = RugConsole.CursorLeft;
         int cursorTop  = RugConsole.CursorTop;
         if (makeSpace)
         {
             RugConsole.CursorLeft = x;
             RugConsole.CursorTop  = y;
             int num3 = 0;
             int num4 = pixHeight * lines.Length;
             while (num3 < num4)
             {
                 RugConsole.WriteLine();
                 num3++;
             }
             if (!replaceCursor)
             {
                 cursorLeft = RugConsole.CursorLeft;
                 cursorTop  = RugConsole.CursorTop;
             }
         }
         WriteLogo(x, y, pixWidth, pixHeight, fillShade, endShade, shadowShade, lines);
         RugConsole.CursorTop  = cursorTop;
         RugConsole.CursorLeft = cursorLeft;
     }
 }
Example #2
0
 public static void WriteLogo(int x, int y, int pixWidth, int pixHeight, ConsoleShade fillShade, ConsoleShade endShade, ConsoleShade shadowShade, string[] lines)
 {
     if (RugConsole.CanManipulateBuffer)
     {
         ConsoleColorState colorState = RugConsole.ColorState;
         int    cursorLeft            = RugConsole.CursorLeft;
         int    cursorTop             = RugConsole.CursorTop;
         string str  = new string(ConsoleChars.GetShade(fillShade), pixWidth);
         string str2 = "";
         if (pixWidth > 1)
         {
             str2 = new string(ConsoleChars.GetShade(fillShade), pixWidth - 1) + ConsoleChars.GetShade(endShade);
         }
         else
         {
             str2 = new string(ConsoleChars.GetShade(endShade), 1);
         }
         string str3 = new string(ConsoleChars.GetShade(ConsoleShade.Clear), pixWidth);
         string str4 = new string(ConsoleChars.GetShade(shadowShade), pixWidth);
         string str5 = "";
         if (pixWidth > 1)
         {
             str5 = new string(ConsoleChars.GetShade(shadowShade), 1) + new string(ConsoleChars.GetShade(ConsoleShade.Clear), pixWidth - 1);
         }
         else
         {
             str5 = new string(ConsoleChars.GetShade(shadowShade), 1);
         }
         int num3 = y;
         RugConsole.CursorLeft           = x;
         RugConsole.CursorTop            = num3++;
         RugConsole.ForegroundThemeColor = ConsoleThemeColor.TitleText;
         for (int i = 0; i < lines.Length; i++)
         {
             for (int j = 0; j < pixHeight; j++)
             {
                 RugConsole.Write(string.Format(lines[i], new object[] { str, str2, str3, str4, str5 }));
                 RugConsole.CursorLeft = x;
                 RugConsole.CursorTop  = num3++;
             }
         }
         RugConsole.ColorState = colorState;
         RugConsole.CursorTop  = cursorTop;
         RugConsole.CursorLeft = cursorLeft;
     }
 }
Example #3
0
 public static char GetShade(ConsoleShade shade)
 {
     return(Shades[(int)shade]);
 }
Example #4
0
 public static void WriteRuglandLogo(int x, int y, int pixWidth, int pixHeight, bool divideChars, ConsoleShade fillShade, bool makeSpace, bool replaceCursor)
 {
     WriteLogo(x, y, pixWidth, pixHeight, fillShade, divideChars ? ConsoleShade.HalfLeft : ConsoleShade.Opaque, ConsoleShade.Dark, makeSpace, replaceCursor, RuglandLogo);
 }
Example #5
0
 public static void WriteLogo(int x, int y, int pixWidth, int pixHeight, ConsoleShade fillShade, ConsoleShade endShade, ConsoleShade shadowShade, bool makeSpace, bool replaceCursor, string[] lines)
 {
     if (RugConsole.CanManipulateBuffer)
     {
         int cursorLeft = RugConsole.CursorLeft;
         int cursorTop = RugConsole.CursorTop;
         if (makeSpace)
         {
             RugConsole.CursorLeft = x;
             RugConsole.CursorTop = y;
             int num3 = 0;
             int num4 = pixHeight * lines.Length;
             while (num3 < num4)
             {
                 RugConsole.WriteLine();
                 num3++;
             }
             if (!replaceCursor)
             {
                 cursorLeft = RugConsole.CursorLeft;
                 cursorTop = RugConsole.CursorTop;
             }
         }
         WriteLogo(x, y, pixWidth, pixHeight, fillShade, endShade, shadowShade, lines);
         RugConsole.CursorTop = cursorTop;
         RugConsole.CursorLeft = cursorLeft;
     }
 }
Example #6
0
 public static void WriteLogo(int x, int y, int pixWidth, int pixHeight, ConsoleShade fillShade, ConsoleShade endShade, ConsoleShade shadowShade, string[] lines)
 {
     if (RugConsole.CanManipulateBuffer)
     {
         ConsoleColorState colorState = RugConsole.ColorState;
         int cursorLeft = RugConsole.CursorLeft;
         int cursorTop = RugConsole.CursorTop;
         string str = new string(ConsoleChars.GetShade(fillShade), pixWidth);
         string str2 = "";
         if (pixWidth > 1)
         {
             str2 = new string(ConsoleChars.GetShade(fillShade), pixWidth - 1) + ConsoleChars.GetShade(endShade);
         }
         else
         {
             str2 = new string(ConsoleChars.GetShade(endShade), 1);
         }
         string str3 = new string(ConsoleChars.GetShade(ConsoleShade.Clear), pixWidth);
         string str4 = new string(ConsoleChars.GetShade(shadowShade), pixWidth);
         string str5 = "";
         if (pixWidth > 1)
         {
             str5 = new string(ConsoleChars.GetShade(shadowShade), 1) + new string(ConsoleChars.GetShade(ConsoleShade.Clear), pixWidth - 1);
         }
         else
         {
             str5 = new string(ConsoleChars.GetShade(shadowShade), 1);
         }
         int num3 = y;
         RugConsole.CursorLeft = x;
         RugConsole.CursorTop = num3++;
         RugConsole.ForegroundThemeColor = ConsoleThemeColor.TitleText;
         for (int i = 0; i < lines.Length; i++)
         {
             for (int j = 0; j < pixHeight; j++)
             {
                 RugConsole.Write(string.Format(lines[i], new object[] { str, str2, str3, str4, str5 }));
                 RugConsole.CursorLeft = x;
                 RugConsole.CursorTop = num3++;
             }
         }
         RugConsole.ColorState = colorState;
         RugConsole.CursorTop = cursorTop;
         RugConsole.CursorLeft = cursorLeft;
     }
 }
Example #7
0
 public static char GetShade(ConsoleShade shade)
 {
     return Shades[(int) shade];
 }
Example #8
0
 public static void WriteRuglandLogo(int x, int y, int pixWidth, int pixHeight, bool divideChars, ConsoleShade fillShade, bool makeSpace, bool replaceCursor)
 {
     WriteLogo(x, y, pixWidth, pixHeight, fillShade, divideChars ? ConsoleShade.HalfLeft : ConsoleShade.Opaque, ConsoleShade.Dark, makeSpace, replaceCursor, RuglandLogo);
 }