diff options
| author | John T <[email protected]> | 2017-09-27 20:46:40 -0400 |
|---|---|---|
| committer | John T <[email protected]> | 2017-09-27 20:46:40 -0400 |
| commit | 52dc6e02dda00aca5ef8100d004d436be88f1d88 (patch) | |
| tree | 87be3e7f978db15e4df59014f62a7b4ac2650bfe /ShiftOS.Engine/WindowManager/ShiftWM.cs | |
| parent | 1b28809aadcd5281fd335bf7af7b5790542a4a97 (diff) | |
| parent | 1c2bf50041e376adc3e901fdc94326d2f9beec77 (diff) | |
| download | shiftos-rewind-52dc6e02dda00aca5ef8100d004d436be88f1d88.tar.gz shiftos-rewind-52dc6e02dda00aca5ef8100d004d436be88f1d88.tar.bz2 shiftos-rewind-52dc6e02dda00aca5ef8100d004d436be88f1d88.zip | |
added some stuff to the gitignore
Diffstat (limited to 'ShiftOS.Engine/WindowManager/ShiftWM.cs')
| -rw-r--r-- | ShiftOS.Engine/WindowManager/ShiftWM.cs | 25 |
1 files changed, 20 insertions, 5 deletions
diff --git a/ShiftOS.Engine/WindowManager/ShiftWM.cs b/ShiftOS.Engine/WindowManager/ShiftWM.cs index 539d469..0c69fb7 100644 --- a/ShiftOS.Engine/WindowManager/ShiftWM.cs +++ b/ShiftOS.Engine/WindowManager/ShiftWM.cs @@ -17,6 +17,15 @@ namespace ShiftOS.Engine.WindowManager return Windows.First(p => (uint) control.Tag == p.Id); } + /// <summary> + /// Shows a new Window based on a UserControl. + /// </summary> + /// <param name="content">The UserControl to use</param> + /// <param name="title">The program's title</param> + /// <param name="icon">The icon to show</param> + /// <param name="showAsInfobox">Checks if this is an infobox</param> + /// <param name="resize">Enables or disables resizing</param> + /// <returns></returns> public static ShiftWindow Init(UserControl content, string title, Icon icon, bool showAsInfobox = false, bool resize = true) { // Setup Window @@ -68,13 +77,19 @@ namespace ShiftOS.Engine.WindowManager return app; } + /// <summary> + /// Shows a new infobox. + /// </summary> + /// <param name="title">The title of the infobox.</param> + /// <param name="body">The infobox's content.</param> + /// <param name="type">The ButtonType used for the infobox.</param> + /// <returns></returns> public static InfoboxTemplate StartInfoboxSession(string title, string body, ButtonType type) { - InfoboxTemplate info = new InfoboxTemplate(type) - { - label1 = { Text = body } - }; - + InfoboxTemplate info = new InfoboxTemplate(type) + { + label1 = { Text = body } + }; Init(info, title, Properties.Resources.iconInfoBox_fw.ToIcon(), true, false); return info; } |
