diff options
| author | FloppyDiskDrive <[email protected]> | 2017-09-27 19:36:09 -0500 |
|---|---|---|
| committer | FloppyDiskDrive <[email protected]> | 2017-09-27 19:36:09 -0500 |
| commit | 1c2bf50041e376adc3e901fdc94326d2f9beec77 (patch) | |
| tree | f52ec9f37c36a33d721b2947348200d13728cf1b /ShiftOS.Engine/WindowManager | |
| parent | f61f67c6d73c625b6f0120a5899c1a9b09bed678 (diff) | |
| download | shiftos-rewind-1c2bf50041e376adc3e901fdc94326d2f9beec77.tar.gz shiftos-rewind-1c2bf50041e376adc3e901fdc94326d2f9beec77.tar.bz2 shiftos-rewind-1c2bf50041e376adc3e901fdc94326d2f9beec77.zip | |
Commented in the Engine project
Diffstat (limited to 'ShiftOS.Engine/WindowManager')
| -rw-r--r-- | ShiftOS.Engine/WindowManager/InfoboxTemplate.Designer.cs | 15 | ||||
| -rw-r--r-- | ShiftOS.Engine/WindowManager/ShiftWM.cs | 25 |
2 files changed, 27 insertions, 13 deletions
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); } + /// <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; } |
