wasSharpNET – Diff between revs 9 and 11

Subversion Repositories:
Rev:
Show entire fileRegard whitespace
Rev 9 Rev 11
Line 17... Line 17...
17 TOP_LEFT, 17 TOP_LEFT,
18 TOP_CENTER, 18 TOP_CENTER,
19 TOP_RIGHT 19 TOP_RIGHT
20 } 20 }
Line 21... Line -...
21   -  
22   21  
23 public static void WriteLine(this object data, ConsoleColor foreground, 22 public static void WriteLine(this object data, ConsoleColor foreground,
24 ConsoleColor background) 23 ConsoleColor background)
25 { 24 {
26 var cFG = System.Console.ForegroundColor; 25 var cFG = System.Console.ForegroundColor;
Line 58... Line 57...
58 { 57 {
59 case ConsoleTextAlignment.TOP_CENTER: 58 case ConsoleTextAlignment.TOP_CENTER:
60 System.Console.CursorLeft = Math.Max(System.Console.WindowWidth/2 - data.ToString().Length/2, 0); 59 System.Console.CursorLeft = Math.Max(System.Console.WindowWidth / 2 - data.ToString().Length / 2, 0);
61 WriteLine(data, System.Console.ForegroundColor, System.Console.BackgroundColor); 60 WriteLine(data, System.Console.ForegroundColor, System.Console.BackgroundColor);
62 break; 61 break;
-   62  
63 default: 63 default:
64 throw new NotImplementedException(); 64 throw new NotImplementedException();
65 } 65 }
66 } 66 }
Line 71... Line 71...
71 { 71 {
72 case ConsoleTextAlignment.TOP_CENTER: 72 case ConsoleTextAlignment.TOP_CENTER:
73 System.Console.CursorLeft = Math.Max(System.Console.WindowWidth / 2 - data.ToString().Length / 2, 0); 73 System.Console.CursorLeft = Math.Max(System.Console.WindowWidth / 2 - data.ToString().Length / 2, 0);
74 WriteLine(data, foregroundColor, System.Console.BackgroundColor); 74 WriteLine(data, foregroundColor, System.Console.BackgroundColor);
75 break; 75 break;
-   76  
76 default: 77 default:
77 throw new NotImplementedException(); 78 throw new NotImplementedException();
78 } 79 }
79 } 80 }
Line 84... Line 85...
84 { 85 {
85 case ConsoleTextAlignment.TOP_CENTER: 86 case ConsoleTextAlignment.TOP_CENTER:
86 System.Console.CursorLeft = Math.Max(System.Console.WindowWidth/2 - data.ToString().Length/2, 0); 87 System.Console.CursorLeft = Math.Max(System.Console.WindowWidth / 2 - data.ToString().Length / 2, 0);
87 Write(data, System.Console.ForegroundColor, System.Console.BackgroundColor); 88 Write(data, System.Console.ForegroundColor, System.Console.BackgroundColor);
88 break; 89 break;
-   90  
89 default: 91 default:
90 throw new NotImplementedException(); 92 throw new NotImplementedException();
91 } 93 }
92 } 94 }
Line 102... Line 104...
102 { 104 {
103 System.Console.CursorLeft = padding; 105 System.Console.CursorLeft = padding;
104 WriteLine(line, System.Console.ForegroundColor, System.Console.BackgroundColor); 106 WriteLine(line, System.Console.ForegroundColor, System.Console.BackgroundColor);
105 } 107 }
106 break; 108 break;
-   109  
107 default: 110 default:
108 throw new NotImplementedException(); 111 throw new NotImplementedException();
109 } 112 }
110 } 113 }
111 } 114 }