From 1c2bf50041e376adc3e901fdc94326d2f9beec77 Mon Sep 17 00:00:00 2001 From: FloppyDiskDrive Date: Wed, 27 Sep 2017 19:36:09 -0500 Subject: Commented in the Engine project --- ShiftOS.Engine/Resources/Symbolinfo - Copy.png | Bin 0 -> 56780 bytes ShiftOS.Engine/Resources/symbolWarning.png | Bin 0 -> 3463 bytes ShiftOS.Engine/Tools.cs | 1 - .../WindowManager/InfoboxTemplate.Designer.cs | 15 ++++++------- ShiftOS.Engine/WindowManager/ShiftWM.cs | 25 ++++++++++++++++----- 5 files changed, 27 insertions(+), 14 deletions(-) create mode 100644 ShiftOS.Engine/Resources/Symbolinfo - Copy.png create mode 100644 ShiftOS.Engine/Resources/symbolWarning.png (limited to 'ShiftOS.Engine') diff --git a/ShiftOS.Engine/Resources/Symbolinfo - Copy.png b/ShiftOS.Engine/Resources/Symbolinfo - Copy.png new file mode 100644 index 0000000..659d9b3 Binary files /dev/null and b/ShiftOS.Engine/Resources/Symbolinfo - Copy.png differ diff --git a/ShiftOS.Engine/Resources/symbolWarning.png b/ShiftOS.Engine/Resources/symbolWarning.png new file mode 100644 index 0000000..f8805f6 Binary files /dev/null and b/ShiftOS.Engine/Resources/symbolWarning.png differ diff --git a/ShiftOS.Engine/Tools.cs b/ShiftOS.Engine/Tools.cs index eca7b59..792ccef 100644 --- a/ShiftOS.Engine/Tools.cs +++ b/ShiftOS.Engine/Tools.cs @@ -3,7 +3,6 @@ using System.Drawing; using System.Drawing.Imaging; using System.IO; using System.Runtime.InteropServices; -using ImageMagick; namespace ShiftOS.Engine { diff --git a/ShiftOS.Engine/WindowManager/InfoboxTemplate.Designer.cs b/ShiftOS.Engine/WindowManager/InfoboxTemplate.Designer.cs index a046516..a076c2a 100644 --- a/ShiftOS.Engine/WindowManager/InfoboxTemplate.Designer.cs +++ b/ShiftOS.Engine/WindowManager/InfoboxTemplate.Designer.cs @@ -33,7 +33,7 @@ this.btnOpt2 = new System.Windows.Forms.Button(); this.pictureBox1 = new System.Windows.Forms.PictureBox(); this.changeSize = new System.Windows.Forms.Timer(this.components); - this.label1 = new System.Windows.Forms.TextBox(); + this.label1 = new System.Windows.Forms.Label(); ((System.ComponentModel.ISupportInitialize)(this.pictureBox1)).BeginInit(); this.SuspendLayout(); // @@ -84,14 +84,13 @@ // // label1 // - this.label1.BackColor = System.Drawing.SystemColors.Window; - this.label1.BorderStyle = System.Windows.Forms.BorderStyle.None; - this.label1.Font = new System.Drawing.Font("Lucida Console", 9F); - this.label1.Location = new System.Drawing.Point(111, 61); - this.label1.Multiline = true; + this.label1.AutoSize = true; + this.label1.Font = new System.Drawing.Font("Lucida Console", 9.25F); + this.label1.Location = new System.Drawing.Point(105, 55); this.label1.Name = "label1"; - this.label1.Size = new System.Drawing.Size(219, 57); + this.label1.Size = new System.Drawing.Size(55, 13); this.label1.TabIndex = 3; + this.label1.Text = "label1"; // // InfoboxTemplate // @@ -116,6 +115,6 @@ public System.Windows.Forms.Button btnOpt2; public System.Windows.Forms.PictureBox pictureBox1; private System.Windows.Forms.Timer changeSize; - public System.Windows.Forms.TextBox label1; + public System.Windows.Forms.Label label1; } } 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); } + /// + /// Shows a new Window based on a UserControl. + /// + /// The UserControl to use + /// The program's title + /// The icon to show + /// Checks if this is an infobox + /// Enables or disables resizing + /// 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; } + /// + /// Shows a new infobox. + /// + /// The title of the infobox. + /// The infobox's content. + /// The ButtonType used for the infobox. + /// 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; } -- cgit v1.2.3