aboutsummaryrefslogtreecommitdiff
path: root/ShiftOS.Engine/WindowManager/ShiftWM.cs
diff options
context:
space:
mode:
Diffstat (limited to 'ShiftOS.Engine/WindowManager/ShiftWM.cs')
-rw-r--r--ShiftOS.Engine/WindowManager/ShiftWM.cs25
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;
}