diff --git a/.vs/ShiftOS/v15/sqlite3/storage.ide b/.vs/ShiftOS/v15/sqlite3/storage.ide index 1d1331f..232bc17 100644 Binary files a/.vs/ShiftOS/v15/sqlite3/storage.ide and b/.vs/ShiftOS/v15/sqlite3/storage.ide differ diff --git a/ShiftOS.Engine/WindowManager/InfoboxTemplate.Designer.cs b/ShiftOS.Engine/WindowManager/InfoboxTemplate.Designer.cs index 6b18e5f..a046516 100644 --- a/ShiftOS.Engine/WindowManager/InfoboxTemplate.Designer.cs +++ b/ShiftOS.Engine/WindowManager/InfoboxTemplate.Designer.cs @@ -28,10 +28,12 @@ /// private void InitializeComponent() { + this.components = new System.ComponentModel.Container(); this.btnOpt1 = new System.Windows.Forms.Button(); this.btnOpt2 = new System.Windows.Forms.Button(); this.pictureBox1 = new System.Windows.Forms.PictureBox(); - this.label1 = new System.Windows.Forms.Label(); + this.changeSize = new System.Windows.Forms.Timer(this.components); + this.label1 = new System.Windows.Forms.TextBox(); ((System.ComponentModel.ISupportInitialize)(this.pictureBox1)).BeginInit(); this.SuspendLayout(); // @@ -75,18 +77,21 @@ this.pictureBox1.TabIndex = 2; this.pictureBox1.TabStop = false; // + // changeSize + // + this.changeSize.Interval = 1; + this.changeSize.Tick += new System.EventHandler(this.changeSize_Tick); + // // label1 // - this.label1.Anchor = ((System.Windows.Forms.AnchorStyles)((((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom) - | System.Windows.Forms.AnchorStyles.Left) - | System.Windows.Forms.AnchorStyles.Right))); - this.label1.AutoSize = true; - this.label1.Font = new System.Drawing.Font("Lucida Console", 9.25F); - this.label1.Location = new System.Drawing.Point(106, 57); + 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.Name = "label1"; - this.label1.Size = new System.Drawing.Size(103, 13); + this.label1.Size = new System.Drawing.Size(219, 57); this.label1.TabIndex = 3; - this.label1.Text = "Generic Body"; // // InfoboxTemplate // @@ -110,6 +115,7 @@ public System.Windows.Forms.Button btnOpt1; public System.Windows.Forms.Button btnOpt2; public System.Windows.Forms.PictureBox pictureBox1; - public System.Windows.Forms.Label label1; + private System.Windows.Forms.Timer changeSize; + public System.Windows.Forms.TextBox label1; } } diff --git a/ShiftOS.Engine/WindowManager/InfoboxTemplate.cs b/ShiftOS.Engine/WindowManager/InfoboxTemplate.cs index f261ace..c1921a6 100644 --- a/ShiftOS.Engine/WindowManager/InfoboxTemplate.cs +++ b/ShiftOS.Engine/WindowManager/InfoboxTemplate.cs @@ -20,12 +20,13 @@ namespace ShiftOS.Engine.WindowManager public InfoboxTemplate(buttonType type) { InitializeComponent(); + switch (type) { case buttonType.OK: btnOpt1.Text = "OK"; btnOpt2.Hide(); - btnOpt1.Location = new Point(122, 134); + btnOpt1.Location = new Point(109, 134); buttonChoice = 1; break; case buttonType.OKCancel: @@ -86,5 +87,11 @@ namespace ShiftOS.Engine.WindowManager { Play(); } + + private void changeSize_Tick(object sender, EventArgs e) + { + this.Height += label1.Height; + this.Width += label1.Width; + } } } diff --git a/ShiftOS.Engine/WindowManager/InfoboxTemplate.resx b/ShiftOS.Engine/WindowManager/InfoboxTemplate.resx index 1af7de1..a977bee 100644 --- a/ShiftOS.Engine/WindowManager/InfoboxTemplate.resx +++ b/ShiftOS.Engine/WindowManager/InfoboxTemplate.resx @@ -117,4 +117,7 @@ System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + 17, 17 + \ No newline at end of file diff --git a/ShiftOS.Engine/WindowManager/ShiftWindow.Designer.cs b/ShiftOS.Engine/WindowManager/ShiftWindow.Designer.cs index c26e724..f7443d6 100644 --- a/ShiftOS.Engine/WindowManager/ShiftWindow.Designer.cs +++ b/ShiftOS.Engine/WindowManager/ShiftWindow.Designer.cs @@ -155,25 +155,29 @@ // this.maximizebutton.Anchor = System.Windows.Forms.AnchorStyles.Right; this.maximizebutton.BackColor = System.Drawing.Color.Black; - this.maximizebutton.Location = new System.Drawing.Point(231, 4); + this.maximizebutton.Location = new System.Drawing.Point(230, 4); this.maximizebutton.Name = "maximizebutton"; this.maximizebutton.Size = new System.Drawing.Size(21, 21); this.maximizebutton.TabIndex = 6; this.maximizebutton.TabStop = false; + this.maximizebutton.MouseDown += new System.Windows.Forms.MouseEventHandler(this.maximizebutton_MouseDown); this.maximizebutton.MouseEnter += new System.EventHandler(this.maximizebutton_MouseEnter); this.maximizebutton.MouseLeave += new System.EventHandler(this.maximizebutton_MouseLeave); + this.maximizebutton.MouseUp += new System.Windows.Forms.MouseEventHandler(this.maximizebutton_MouseUp); // // minimizebutton // this.minimizebutton.Anchor = System.Windows.Forms.AnchorStyles.Right; this.minimizebutton.BackColor = System.Drawing.Color.Black; - this.minimizebutton.Location = new System.Drawing.Point(208, 4); + this.minimizebutton.Location = new System.Drawing.Point(207, 4); this.minimizebutton.Name = "minimizebutton"; this.minimizebutton.Size = new System.Drawing.Size(21, 21); this.minimizebutton.TabIndex = 5; this.minimizebutton.TabStop = false; + this.minimizebutton.MouseDown += new System.Windows.Forms.MouseEventHandler(this.minimizebutton_MouseDown); this.minimizebutton.MouseEnter += new System.EventHandler(this.minimizebutton_MouseEnter); this.minimizebutton.MouseLeave += new System.EventHandler(this.minimizebutton_MouseLeave); + this.minimizebutton.MouseUp += new System.Windows.Forms.MouseEventHandler(this.minimizebutton_MouseUp); // // Title // @@ -192,14 +196,16 @@ // this.closebutton.Anchor = System.Windows.Forms.AnchorStyles.Right; this.closebutton.BackColor = System.Drawing.Color.Black; - this.closebutton.Location = new System.Drawing.Point(254, 4); + this.closebutton.Location = new System.Drawing.Point(253, 4); this.closebutton.Name = "closebutton"; this.closebutton.Size = new System.Drawing.Size(21, 21); this.closebutton.TabIndex = 4; this.closebutton.TabStop = false; this.closebutton.Click += new System.EventHandler(this.closebutton_Click); + this.closebutton.MouseDown += new System.Windows.Forms.MouseEventHandler(this.closebutton_MouseDown); this.closebutton.MouseEnter += new System.EventHandler(this.closebutton_MouseEnter); this.closebutton.MouseLeave += new System.EventHandler(this.closebutton_MouseLeave); + this.closebutton.MouseUp += new System.Windows.Forms.MouseEventHandler(this.closebutton_MouseUp); // // right // diff --git a/ShiftOS.Engine/WindowManager/ShiftWindow.cs b/ShiftOS.Engine/WindowManager/ShiftWindow.cs index a004aa6..45aec7c 100644 --- a/ShiftOS.Engine/WindowManager/ShiftWindow.cs +++ b/ShiftOS.Engine/WindowManager/ShiftWindow.cs @@ -69,5 +69,35 @@ namespace ShiftOS.Engine.WindowManager { minimizebutton.BackColor = Color.Black; } + + private void closebutton_MouseDown(object sender, MouseEventArgs e) + { + closebutton.BackColor = Color.Black; + } + + private void maximizebutton_MouseDown(object sender, MouseEventArgs e) + { + maximizebutton.BackColor = Color.Black; + } + + private void minimizebutton_MouseDown(object sender, MouseEventArgs e) + { + minimizebutton.BackColor = Color.Black; + } + + private void minimizebutton_MouseUp(object sender, MouseEventArgs e) + { + minimizebutton.BackColor = Color.Gray; + } + + private void maximizebutton_MouseUp(object sender, MouseEventArgs e) + { + maximizebutton.BackColor = Color.Gray; + } + + private void closebutton_MouseUp(object sender, MouseEventArgs e) + { + closebutton.BackColor = Color.Gray; + } } } diff --git a/ShiftOS.Main/ShiftOS/Apps/ShifterStuff/SelectColor.cs b/ShiftOS.Main/ShiftOS/Apps/ShifterStuff/SelectColor.cs index 175d1cb..9062947 100644 --- a/ShiftOS.Main/ShiftOS/Apps/ShifterStuff/SelectColor.cs +++ b/ShiftOS.Main/ShiftOS/Apps/ShifterStuff/SelectColor.cs @@ -32,9 +32,9 @@ namespace ShiftOS.Main.ShiftOS.Apps colorType2 = Convert.ToInt32(textBox2.Text); colorType3 = Convert.ToInt32(textBox3.Text); } - catch + catch(Exception ex) { - shiftWM.StartInfoboxSession("Error!", "Cannot parse a string.", InfoboxTemplate.buttonType.OK); + shiftWM.StartInfoboxSession("Error!", "Failed to parse integer. Error:\n" + ex, InfoboxTemplate.buttonType.OK); } if (colorType1 > 255 || colorType2 > 255 || colorType3 > 255) @@ -52,7 +52,7 @@ namespace ShiftOS.Main.ShiftOS.Apps } catch (Exception ex) { - shiftWM.StartInfoboxSession("Error!", "An exception occured while setting the color! Exception: \n" + ex, InfoboxTemplate.buttonType.OK); + shiftWM.StartInfoboxSession("Error!", "An error occured while setting the color.", InfoboxTemplate.buttonType.OK); } } } diff --git a/ShiftOS.Main/ShiftOS/Apps/TestForm.cs b/ShiftOS.Main/ShiftOS/Apps/TestForm.cs index c8cd086..e2b5bf7 100644 --- a/ShiftOS.Main/ShiftOS/Apps/TestForm.cs +++ b/ShiftOS.Main/ShiftOS/Apps/TestForm.cs @@ -24,7 +24,6 @@ namespace ShiftOS.Main private void button2_Click(object sender, EventArgs e) { - shiftWM.Init(new Shifter(), "Shifter", Properties.Resources.iconShifter); - } + shiftWM.Init(new Shifter(), "Shifter", Properties.Resources.iconShifter); } } }