1 // Permission is hereby granted, free of charge, to any person obtaining
2 // a copy of this software and associated documentation files (the
3 // "Software"), to deal in the Software without restriction, including
4 // without limitation the rights to use, copy, modify, merge, publish,
5 // distribute, sublicense, and/or sell copies of the Software, and to
6 // permit persons to whom the Software is furnished to do so, subject to
7 // the following conditions:
9 // The above copyright notice and this permission notice shall be
10 // included in all copies or substantial portions of the Software.
12 // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
13 // EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
14 // MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
15 // NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
16 // LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
17 // OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
18 // WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
20 // Copyright (c) 2004,2006 Novell, Inc. (http://www.novell.com)
23 // Miguel de Icaza (miguel@novell.com).
24 // Peter Bartok (pbartok@novell.com)
32 namespace System
.Windows
.Forms
34 public class SystemInformation
36 private SystemInformation ()
40 public static ArrangeDirection ArrangeDirection
{
42 return ThemeEngine
.Current
.ArrangeDirection
;
46 public static ArrangeStartingPosition ArrangeStartingPosition
{
48 return ThemeEngine
.Current
.ArrangeStartingPosition
;
52 public static BootMode BootMode
{
54 return BootMode
.Normal
;
58 public static Size Border3DSize
{
60 return ThemeEngine
.Current
.Border3DSize
;
64 public static Size BorderSize
{
66 return ThemeEngine
.Current
.Border3DSize
;
70 public static Size CaptionButtonSize
{
72 return ThemeEngine
.Current
.CaptionButtonSize
;
76 public static int CaptionHeight
{
78 return ThemeEngine
.Current
.CaptionHeight
;
82 public static string ComputerName
{
84 return Environment
.MachineName
;
88 public static Size CursorSize
{
90 return XplatUI
.CursorSize
;
94 public static bool DbcsEnabled
{
100 public static bool DebugOS
{
106 public static Size DoubleClickSize
{
108 return ThemeEngine
.Current
.DoubleClickSize
;
112 public static int DoubleClickTime
{
114 return ThemeEngine
.Current
.DoubleClickTime
;
118 public static bool DragFullWindows
{
120 return XplatUI
.DragFullWindows
;
124 public static Size DragSize
{
126 return XplatUI
.DragSize
;
130 public static Size FixedFrameBorderSize
{
132 return ThemeEngine
.Current
.FixedFrameBorderSize
;
136 public static Size FrameBorderSize
{
138 return ThemeEngine
.Current
.FrameBorderSize
;
142 public static bool HighContrast
{
148 public static int HorizontalScrollBarArrowWidth
{
150 return ThemeEngine
.Current
.HorizontalScrollBarArrowWidth
;
154 public static int HorizontalScrollBarHeight
{
156 return ThemeEngine
.Current
.HorizontalScrollBarHeight
;
160 public static int HorizontalScrollBarThumbWidth
{
162 return ThemeEngine
.Current
.HorizontalScrollBarThumbWidth
;
166 public static Size IconSize
{
168 return XplatUI
.IconSize
;
172 public static Size IconSpacingSize
{
174 return ThemeEngine
.Current
.IconSpacingSize
;
178 public static int KanjiWindowHeight
{
189 static int KeyboardDelay
{
191 return XplatUI
.KeyboardDelay
;
200 static int KeyboardSpeed
{
202 return XplatUI
.KeyboardSpeed
;
206 public static Size MaxWindowTrackSize
{
208 return XplatUI
.MaxWindowTrackSize
;
217 static bool MenuAccessKeysUnderlined
{
219 return ThemeEngine
.Current
.MenuAccessKeysUnderlined
;
223 public static Size MenuButtonSize
{
225 return ThemeEngine
.Current
.MenuButtonSize
;
229 public static Size MenuCheckSize
{
231 return ThemeEngine
.Current
.MenuCheckSize
;
235 public static Font MenuFont
{
237 // note: we MUST return a clone of the Font instance as anyone
238 // can dispose it. However we shouldn't expect the theme to do
239 // the cloning for performance reason
240 return (Font
) ThemeEngine
.Current
.MenuFont
.Clone ();
244 public static int MenuHeight
{
246 return ThemeEngine
.Current
.MenuHeight
;
250 public static bool MidEastEnabled
{
252 return false; // ??? how do we decide?
256 public static Size MinimizedWindowSize
{
258 return XplatUI
.MinimizedWindowSize
;
262 public static Size MinimizedWindowSpacingSize
{
264 return XplatUI
.MinimizedWindowSpacingSize
;
268 public static Size MinimumWindowSize
{
270 return XplatUI
.MinimumWindowSize
;
274 public static Size MinWindowTrackSize
{
276 return XplatUI
.MinWindowTrackSize
;
280 public static int MonitorCount
{
282 return 1; // Why bother...
286 public static bool MonitorsSameDisplayFormat
{
292 public static int MouseButtons
{
294 return XplatUI
.MouseButtonCount
;
298 public static bool MouseButtonsSwapped
{
300 return XplatUI
.MouseButtonsSwapped
;
305 public static Size MouseHoverSize
{
307 return XplatUI
.MouseHoverSize
;
311 public static int MouseHoverTime
{
313 return XplatUI
.MouseHoverTime
;
318 public static bool MousePresent
{
324 public static bool MouseWheelPresent
{
326 return XplatUI
.MouseWheelPresent
;
330 public static int MouseWheelScrollLines
{
332 return ThemeEngine
.Current
.MouseWheelScrollLines
;
336 public static bool NativeMouseWheelSupport
{
338 return MouseWheelPresent
;
342 public static bool Network
{
348 public static bool PenWindows
{
354 public static Size PrimaryMonitorMaximizedWindowSize
{
356 return new Size(WorkingArea
.Width
, WorkingArea
.Height
);
360 public static Size PrimaryMonitorSize
{
362 return new Size(WorkingArea
.Width
, WorkingArea
.Height
);
366 public static bool RightAlignedMenus
{
368 return ThemeEngine
.Current
.RightAlignedMenus
;
372 public static bool Secure
{
378 public static bool ShowSounds
{
384 public static Size SmallIconSize
{
386 return XplatUI
.SmallIconSize
;
391 public static bool TerminalServerSession
{
398 public static Size ToolWindowCaptionButtonSize
{
400 return ThemeEngine
.Current
.ToolWindowCaptionButtonSize
;
404 public static int ToolWindowCaptionHeight
{
406 return ThemeEngine
.Current
.ToolWindowCaptionHeight
;
410 public static string UserDomainName
{
412 return Environment
.UserDomainName
;
416 public static bool UserInteractive
{
418 return Environment
.UserInteractive
;
422 public static string UserName
{
424 return Environment
.UserName
;
428 public static int VerticalScrollBarArrowHeight
{
430 return ThemeEngine
.Current
.VerticalScrollBarArrowHeight
;
434 public static int VerticalScrollBarThumbHeight
{
436 return ThemeEngine
.Current
.VerticalScrollBarThumbHeight
;
440 public static int VerticalScrollBarWidth
{
442 return ThemeEngine
.Current
.VerticalScrollBarWidth
;
446 public static Rectangle VirtualScreen
{
448 return XplatUI
.VirtualScreen
;
452 public static Rectangle WorkingArea
{
454 return XplatUI
.WorkingArea
;