diff options
| author | AShifter <[email protected]> | 2017-10-03 20:45:18 -0600 |
|---|---|---|
| committer | GitHub <[email protected]> | 2017-10-03 20:45:18 -0600 |
| commit | 6f0e4160117bfbd04ba918b2f2604afe1959877f (patch) | |
| tree | 3d658f306135e53c2198c3f8eacfb4000f32d47d /ShiftOS.Main/ShiftOS | |
| parent | 5077745a2c10c993c22e00d1ce33b733563e2ac7 (diff) | |
| parent | 385d800066822cdf7467a90f6168026b6603573e (diff) | |
| download | shiftos-rewind-6f0e4160117bfbd04ba918b2f2604afe1959877f.tar.gz shiftos-rewind-6f0e4160117bfbd04ba918b2f2604afe1959877f.tar.bz2 shiftos-rewind-6f0e4160117bfbd04ba918b2f2604afe1959877f.zip | |
Merge pull request #8 from AShifter/master
Master
Diffstat (limited to 'ShiftOS.Main/ShiftOS')
| -rw-r--r-- | ShiftOS.Main/ShiftOS/Apps/ShifterStuff/SelectColor.cs | 9 | ||||
| -rw-r--r-- | ShiftOS.Main/ShiftOS/Apps/ShifterStuff/Shifter.Designer.cs | 82 | ||||
| -rw-r--r-- | ShiftOS.Main/ShiftOS/Apps/ShifterStuff/Shifter.cs | 40 |
3 files changed, 101 insertions, 30 deletions
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 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 button2_Click(object sender, EventArgs e) + 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)); + } } } } |
