From dc7533184a88271bfd2a3aae299532ec7632144d Mon Sep 17 00:00:00 2001 From: FloppyDiskDrive Date: Mon, 25 Sep 2017 17:49:40 -0500 Subject: [PATCH] Added titlebar button hughlighting / pushing --- .vs/ShiftOS/v15/sqlite3/storage.ide | Bin 3395584 -> 3395584 bytes .../WindowManager/InfoboxTemplate.Designer.cs | 26 +++++++++------ .../WindowManager/InfoboxTemplate.cs | 9 +++++- .../WindowManager/InfoboxTemplate.resx | 3 ++ .../WindowManager/ShiftWindow.Designer.cs | 12 +++++-- ShiftOS.Engine/WindowManager/ShiftWindow.cs | 30 ++++++++++++++++++ .../ShiftOS/Apps/ShifterStuff/SelectColor.cs | 6 ++-- ShiftOS.Main/ShiftOS/Apps/TestForm.cs | 3 +- 8 files changed, 70 insertions(+), 19 deletions(-) diff --git a/.vs/ShiftOS/v15/sqlite3/storage.ide b/.vs/ShiftOS/v15/sqlite3/storage.ide index 1d1331faa619303609d7caea898742c68a4648c8..232bc17352cf037a58a3c2f4258a9bca836fb5cf 100644 GIT binary patch delta 6526 zcmcIod011|wm&Bm2_!&bn8P5WGA20+sHh;ImRUidRVz~v$`CFfh+xAc)By#lY*9;5 zP|-Sq7!;6Fp$=6+d$B6EVzsSpwc2~NwG{BK9S9fs`rh-8*YolF&TkES?VY{PS!*5g zYkSCiK)JCtSC1g*bBVF5Vwx+Bt9LT$W)Qnx0)|=jE|v3wr_t)2n-YTeSkND87&d97 zT_)*<8kS1g1%?lE8hFhfD$ma^G6yziSk2rApN;9<235Ku&+JmqY!W~N(3PIqj2*tD z35wo98K5U^jBiNmQU0Kvkxhz5dHOlvmZO~PU~DF*s(5LA2Lr$aumBnWHh=@r1ZV-c z03JXaprfqs&>d|%7Q+<86m&#i zV99Y*tI=2b5Ys^|D&q|Vwrq}cT;5?WIPIvH7rFdV)mQ{OwGBlD2paXm9mB>=v(+Z0 zU7#S;k2D+I@9juXx*bgc2myKkeSiVLP`Mo$or_}&TnY>rg)THiJ~pmEKMomfrwJM> z=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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); } } }