From 385d800066822cdf7467a90f6168026b6603573e Mon Sep 17 00:00:00 2001 From: AShifter Date: Tue, 3 Oct 2017 20:44:54 -0600 Subject: [PATCH] Adding basic skinning Open up the shifter, choose a skin and hit Apply. I ll work on it more later. --- .vs/ShiftOS/v15/sqlite3/storage.ide | Bin 835584 -> 843776 bytes ShiftOS.Engine/ShiftOS.Engine.csproj | 2 +- ShiftOS.Engine/WindowManager/ShiftArray.cs | 12 --- ShiftOS.Engine/WindowManager/ShiftSkinData.cs | 34 ++++++++ .../ShiftOS/Apps/ShifterStuff/SelectColor.cs | 9 +- .../Apps/ShifterStuff/Shifter.Designer.cs | 82 ++++++++++++------ .../ShiftOS/Apps/ShifterStuff/Shifter.cs | 42 ++++++++- 7 files changed, 137 insertions(+), 44 deletions(-) delete mode 100644 ShiftOS.Engine/WindowManager/ShiftArray.cs create mode 100644 ShiftOS.Engine/WindowManager/ShiftSkinData.cs diff --git a/.vs/ShiftOS/v15/sqlite3/storage.ide b/.vs/ShiftOS/v15/sqlite3/storage.ide index 610893ea6ce0d13b9a8cd22dfe96e09091a34f54..590cc4d2db1c6d81e1a76b85a53283d9e49cb21f 100644 GIT binary patch delta 12931 zcmd^G30M>Nwx1=LOeTS#>;)kR2qGYh2v$^3)Z$VF6t#6>3!2Lk48f(nG$3N#7lKT+ zTCna~t6rB_z23UFwxzY#wRNf0+S}#Yy0*2}^3Ivbge2PbzWd&HzxRD_{0{T~{m(i7 z^Iy-LITLGY5^D}6E`7>foq5YPD+3Tx9Lh{Gj=#=9=b$=0nXf z&3?@eO@n5GW|d~{uCNN7rZ++CZro8*Q>n$y|(whxfngMm| z8kS<6<(N5*9Bq-;1XI*zOIXbcOKtsUeBL#c(z3DkS8qiXmFhusHsjyt}n zy-3X?+IX0V@2zbf+$r*k{AVVpAuEh;naufFE@!Y_+969WBtM_` z*RY!ffl<*FY*FvFgVwg)>I#zFY}Gu=-6pO1>0G1I!wrT;G8F_GKl#HAA_OqUs;7?%l+leFoHs%mjk)9RA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*zDP|L{>_C>RU<+}n$Sq+P~6 z$>BDvB!0v3CDQPNs#nrRu%j;}S|aGAUfhS5GxN(b?XpeaBQathGVDWkKU)oZYhg+C z1Dr;(UlqKihYzq?6G^A*!R)4qfK#`s&FW-9hEFJeQ+}-+tL!QlS8F6g|WHv}3==f!B(QjEeHt?;rWa_5RkJp|YDg z{cAO;m&3eMCj9(3d~L*!XP)(`x#AN)Z$zmvXL$YQCrg*^Pc@yipPy<7ffmj@`$J2- z<#PYPAeV~a{z=2qTP#jXReljpQ|6sm+b{H3(8BrSW>3g5Rd>yBTQ(qgbE4iX854IkB`lRo>6Sio>e*HlF=0MiRg&|ej zB3%6+6;8V4uBn??_kHkm*FyD96V1M@} ztJ_q5Y#$%8r%mP07Wj}$Z7N@Ooey~edfg>>>CkIIi(Fy9{0!WBnKx+MJCXW6g0E~? zC&=dHXq3S0b2*MOhW*Fw6QbC$Sf^&i?DMm4Wjv-|=^ZsZqm?OeO$+^oLKasQXsqV InfoboxTemplate.cs - + Form diff --git a/ShiftOS.Engine/WindowManager/ShiftArray.cs b/ShiftOS.Engine/WindowManager/ShiftArray.cs deleted file mode 100644 index bfb3cde..0000000 --- a/ShiftOS.Engine/WindowManager/ShiftArray.cs +++ /dev/null @@ -1,12 +0,0 @@ -using System; -using System.Collections.Generic; -using System.Linq; -using System.Text; -using System.Threading.Tasks; - -namespace ShiftOS.Engine.WindowManager -{ - class ShiftArray - { - } -} diff --git a/ShiftOS.Engine/WindowManager/ShiftSkinData.cs b/ShiftOS.Engine/WindowManager/ShiftSkinData.cs new file mode 100644 index 0000000..653e814 --- /dev/null +++ b/ShiftOS.Engine/WindowManager/ShiftSkinData.cs @@ -0,0 +1,34 @@ +using System.Drawing; + +namespace ShiftOS.Engine.WindowManager +{ + public class ShiftSkinData + { + // ColorData + public Color leftTopCornerColor { get; set; } + public Color titleBarColor { get; set; } + public Color rightTopCornerColor { get; set; } + public Color btnCloseColor { get; set; } + public Color btnMaxColor { get; set; } + public Color btnMinColor { get; set; } + public Color leftSideColor { get; set; } + public Color rightSideColor { get; set; } + public Color leftBottomCornerColor { get; set; } + public Color bottomSideColor { get; set; } + public Color rightBottomCornerColor { get; set; } + public Color borderColorColor { get; set; } + + // SetBorderColor + public void setBorderColor(Color borderColor) + { + leftTopCornerColor = borderColor; + titleBarColor = borderColor; + rightTopCornerColor = borderColor; + leftSideColor = borderColor; + rightSideColor = borderColor; + leftBottomCornerColor = borderColor; + bottomSideColor = borderColor; + rightBottomCornerColor = borderColor; + } + } +} diff --git a/ShiftOS.Main/ShiftOS/Apps/ShifterStuff/SelectColor.cs b/ShiftOS.Main/ShiftOS/Apps/ShifterStuff/SelectColor.cs index 1534f36..7a97915 100644 --- a/ShiftOS.Main/ShiftOS/Apps/ShifterStuff/SelectColor.cs +++ b/ShiftOS.Main/ShiftOS/Apps/ShifterStuff/SelectColor.cs @@ -17,7 +17,7 @@ namespace ShiftOS.Main.ShiftOS.Apps } - private Color btnSetColor_Click(object sender, EventArgs e) + private Color setColor() { _colorType1 = Int32.Parse(redUpDown.Value.ToString()); _colorType2 = Int32.Parse(greenUpDown.Value.ToString()); @@ -41,5 +41,10 @@ namespace ShiftOS.Main.ShiftOS.Apps } return _finalColor; } + + private void btnSetColor_Click(object sender, EventArgs e) + { + setColor(); + } } - } +} diff --git a/ShiftOS.Main/ShiftOS/Apps/ShifterStuff/Shifter.Designer.cs b/ShiftOS.Main/ShiftOS/Apps/ShifterStuff/Shifter.Designer.cs index 51bce9c..47bc115 100644 --- a/ShiftOS.Main/ShiftOS/Apps/ShifterStuff/Shifter.Designer.cs +++ b/ShiftOS.Main/ShiftOS/Apps/ShifterStuff/Shifter.Designer.cs @@ -30,11 +30,13 @@ { this.tabControl1 = new System.Windows.Forms.TabControl(); this.tabPage1 = new System.Windows.Forms.TabPage(); + this.button5 = new System.Windows.Forms.Button(); + this.button4 = new System.Windows.Forms.Button(); + this.button3 = new System.Windows.Forms.Button(); + this.button2 = new System.Windows.Forms.Button(); this.groupBox1 = new System.Windows.Forms.GroupBox(); this.button1 = new System.Windows.Forms.Button(); this.tabPage2 = new System.Windows.Forms.TabPage(); - this.button2 = new System.Windows.Forms.Button(); - this.button3 = new System.Windows.Forms.Button(); this.tabControl1.SuspendLayout(); this.tabPage1.SuspendLayout(); this.groupBox1.SuspendLayout(); @@ -55,6 +57,8 @@ // // tabPage1 // + this.tabPage1.Controls.Add(this.button5); + this.tabPage1.Controls.Add(this.button4); this.tabPage1.Controls.Add(this.button3); this.tabPage1.Controls.Add(this.button2); this.tabPage1.Controls.Add(this.groupBox1); @@ -66,6 +70,54 @@ this.tabPage1.Text = "Titlebar"; this.tabPage1.UseVisualStyleBackColor = true; // + // button5 + // + this.button5.FlatStyle = System.Windows.Forms.FlatStyle.Flat; + this.button5.Font = new System.Drawing.Font("Lucida Console", 8.25F); + this.button5.Location = new System.Drawing.Point(6, 267); + this.button5.Name = "button5"; + this.button5.Size = new System.Drawing.Size(314, 23); + this.button5.TabIndex = 5; + this.button5.Text = "Apply"; + this.button5.UseVisualStyleBackColor = true; + this.button5.Click += new System.EventHandler(this.button5_Click); + // + // button4 + // + this.button4.FlatStyle = System.Windows.Forms.FlatStyle.Flat; + this.button4.Font = new System.Drawing.Font("Lucida Console", 8.25F); + this.button4.Location = new System.Drawing.Point(6, 209); + this.button4.Name = "button4"; + this.button4.Size = new System.Drawing.Size(314, 23); + this.button4.TabIndex = 4; + this.button4.Text = "Set Random Skin"; + this.button4.UseVisualStyleBackColor = true; + this.button4.Click += new System.EventHandler(this.setRandomSkin); + // + // button3 + // + this.button3.FlatStyle = System.Windows.Forms.FlatStyle.Flat; + this.button3.Font = new System.Drawing.Font("Lucida Console", 8.25F); + this.button3.Location = new System.Drawing.Point(6, 238); + this.button3.Name = "button3"; + this.button3.Size = new System.Drawing.Size(155, 23); + this.button3.TabIndex = 3; + this.button3.Text = "Set Default Skin"; + this.button3.UseVisualStyleBackColor = true; + this.button3.Click += new System.EventHandler(this.setDefaultSkin); + // + // button2 + // + this.button2.FlatStyle = System.Windows.Forms.FlatStyle.Flat; + this.button2.Font = new System.Drawing.Font("Lucida Console", 8.25F); + this.button2.Location = new System.Drawing.Point(171, 238); + this.button2.Name = "button2"; + this.button2.Size = new System.Drawing.Size(149, 23); + this.button2.TabIndex = 2; + this.button2.Text = "Set Colorful Skin"; + this.button2.UseVisualStyleBackColor = true; + this.button2.Click += new System.EventHandler(this.setColorSkin); + // // groupBox1 // this.groupBox1.Controls.Add(this.button1); @@ -98,30 +150,6 @@ this.tabPage2.Text = "tabPage2"; this.tabPage2.UseVisualStyleBackColor = true; // - // button2 - // - this.button2.FlatStyle = System.Windows.Forms.FlatStyle.Flat; - this.button2.Font = new System.Drawing.Font("Lucida Console", 8.25F); - this.button2.Location = new System.Drawing.Point(171, 267); - this.button2.Name = "button2"; - this.button2.Size = new System.Drawing.Size(149, 23); - this.button2.TabIndex = 2; - this.button2.Text = "Set Colorful Skin"; - this.button2.UseVisualStyleBackColor = true; - this.button2.Click += new System.EventHandler(this.button2_Click); - // - // button3 - // - this.button3.FlatStyle = System.Windows.Forms.FlatStyle.Flat; - this.button3.Font = new System.Drawing.Font("Lucida Console", 8.25F); - this.button3.Location = new System.Drawing.Point(6, 267); - this.button3.Name = "button3"; - this.button3.Size = new System.Drawing.Size(149, 23); - this.button3.TabIndex = 3; - this.button3.Text = "Set Default Skin"; - this.button3.UseVisualStyleBackColor = true; - this.button3.Click += new System.EventHandler(this.button3_Click); - // // Shifter // this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F); @@ -145,5 +173,7 @@ private System.Windows.Forms.TabPage tabPage2; private System.Windows.Forms.Button button3; private System.Windows.Forms.Button button2; + private System.Windows.Forms.Button button4; + private System.Windows.Forms.Button button5; } } diff --git a/ShiftOS.Main/ShiftOS/Apps/ShifterStuff/Shifter.cs b/ShiftOS.Main/ShiftOS/Apps/ShifterStuff/Shifter.cs index 5d5ad7d..7659601 100644 --- a/ShiftOS.Main/ShiftOS/Apps/ShifterStuff/Shifter.cs +++ b/ShiftOS.Main/ShiftOS/Apps/ShifterStuff/Shifter.cs @@ -2,12 +2,14 @@ using System.Windows.Forms; using ShiftOS.Engine; using ShiftOS.Engine.WindowManager; +using System.Drawing; namespace ShiftOS.Main.ShiftOS.Apps { public partial class Shifter : UserControl { public int colorType; //This is a check to see what option was chosen. + ShiftSkinData skinConfig = new ShiftSkinData(); public Shifter() { InitializeComponent(); @@ -19,14 +21,48 @@ namespace ShiftOS.Main.ShiftOS.Apps ShiftWM.Init(new SelectColor(), "Select a color", Properties.Resources.iconColourPicker_fw.ToIcon()); } - private void button3_Click(object sender, EventArgs e) + private void setDefaultSkin(object sender, EventArgs e) { - + skinConfig.setBorderColor(Color.FromArgb(64, 64, 64)); + skinConfig.btnCloseColor = Color.Black; + skinConfig.btnMaxColor = Color.Black; + skinConfig.btnMinColor = Color.Black; } - private void button2_Click(object sender, EventArgs e) + private void setColorSkin(object sender, EventArgs e) + { + skinConfig.setBorderColor(Color.Blue); + skinConfig.btnCloseColor = Color.Red; + skinConfig.btnMaxColor = Color.Yellow; + skinConfig.btnMinColor = Color.Green; + } + + private void setRandomSkin(object sender, EventArgs e) + { + Random rnd = new Random(); + skinConfig.setBorderColor(Color.FromArgb(rnd.Next(255), rnd.Next(255), rnd.Next(255))); + skinConfig.btnCloseColor = Color.FromArgb(rnd.Next(255), rnd.Next(255), rnd.Next(255)); + skinConfig.btnMaxColor = Color.FromArgb(rnd.Next(255), rnd.Next(255), rnd.Next(255)); + skinConfig.btnMinColor = Color.FromArgb(rnd.Next(255), rnd.Next(255), rnd.Next(255)); + } + + private void button5_Click(object sender, EventArgs e) { + foreach (var window in ShiftWM.Windows) + { + window.Invoke(new Action(() => window.top.BackColor = skinConfig.titleBarColor)); + window.Invoke(new Action(() => window.topleftcorner.BackColor = skinConfig.leftTopCornerColor)); + window.Invoke(new Action(() => window.toprightcorner.BackColor = skinConfig.rightTopCornerColor)); + window.Invoke(new Action(() => window.left.BackColor = skinConfig.leftSideColor)); + window.Invoke(new Action(() => window.right.BackColor = skinConfig.rightSideColor)); + window.Invoke(new Action(() => window.bottomleftcorner.BackColor = skinConfig.leftBottomCornerColor)); + window.Invoke(new Action(() => window.bottom.BackColor = skinConfig.bottomSideColor)); + window.Invoke(new Action(() => window.bottomrightcorner.BackColor = skinConfig.rightBottomCornerColor)); + window.Invoke(new Action(() => window.closebutton.BackColor = skinConfig.btnCloseColor)); + window.Invoke(new Action(() => window.maximizebutton.BackColor = skinConfig.btnMaxColor)); + window.Invoke(new Action(() => window.minimizebutton.BackColor = skinConfig.btnMinColor)); + } } } }