diff --git a/.vs/ShiftOS/v15/sqlite3/storage.ide b/.vs/ShiftOS/v15/sqlite3/storage.ide
index 0209546..1d1331f 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/ShiftWindow.Designer.cs b/ShiftOS.Engine/WindowManager/ShiftWindow.Designer.cs
index 0b215a9..c26e724 100644
--- a/ShiftOS.Engine/WindowManager/ShiftWindow.Designer.cs
+++ b/ShiftOS.Engine/WindowManager/ShiftWindow.Designer.cs
@@ -155,21 +155,25 @@
//
this.maximizebutton.Anchor = System.Windows.Forms.AnchorStyles.Right;
this.maximizebutton.BackColor = System.Drawing.Color.Black;
- this.maximizebutton.Location = new System.Drawing.Point(228, 5);
+ this.maximizebutton.Location = new System.Drawing.Point(231, 4);
this.maximizebutton.Name = "maximizebutton";
this.maximizebutton.Size = new System.Drawing.Size(21, 21);
this.maximizebutton.TabIndex = 6;
this.maximizebutton.TabStop = false;
+ this.maximizebutton.MouseEnter += new System.EventHandler(this.maximizebutton_MouseEnter);
+ this.maximizebutton.MouseLeave += new System.EventHandler(this.maximizebutton_MouseLeave);
//
// minimizebutton
//
this.minimizebutton.Anchor = System.Windows.Forms.AnchorStyles.Right;
this.minimizebutton.BackColor = System.Drawing.Color.Black;
- this.minimizebutton.Location = new System.Drawing.Point(205, 5);
+ this.minimizebutton.Location = new System.Drawing.Point(208, 4);
this.minimizebutton.Name = "minimizebutton";
this.minimizebutton.Size = new System.Drawing.Size(21, 21);
this.minimizebutton.TabIndex = 5;
this.minimizebutton.TabStop = false;
+ this.minimizebutton.MouseEnter += new System.EventHandler(this.minimizebutton_MouseEnter);
+ this.minimizebutton.MouseLeave += new System.EventHandler(this.minimizebutton_MouseLeave);
//
// Title
//
@@ -188,12 +192,14 @@
//
this.closebutton.Anchor = System.Windows.Forms.AnchorStyles.Right;
this.closebutton.BackColor = System.Drawing.Color.Black;
- this.closebutton.Location = new System.Drawing.Point(251, 5);
+ this.closebutton.Location = new System.Drawing.Point(254, 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.MouseEnter += new System.EventHandler(this.closebutton_MouseEnter);
+ this.closebutton.MouseLeave += new System.EventHandler(this.closebutton_MouseLeave);
//
// right
//
diff --git a/ShiftOS.Engine/WindowManager/ShiftWindow.cs b/ShiftOS.Engine/WindowManager/ShiftWindow.cs
index 9caaa6c..a004aa6 100644
--- a/ShiftOS.Engine/WindowManager/ShiftWindow.cs
+++ b/ShiftOS.Engine/WindowManager/ShiftWindow.cs
@@ -40,5 +40,34 @@ namespace ShiftOS.Engine.WindowManager
this.Close();
}
+ private void closebutton_MouseEnter(object sender, EventArgs e)
+ {
+ closebutton.BackColor = Color.Gray;
+ }
+
+ private void closebutton_MouseLeave(object sender, EventArgs e)
+ {
+ closebutton.BackColor = Color.Black;
+ }
+
+ private void maximizebutton_MouseEnter(object sender, EventArgs e)
+ {
+ maximizebutton.BackColor = Color.Gray;
+ }
+
+ private void maximizebutton_MouseLeave(object sender, EventArgs e)
+ {
+ maximizebutton.BackColor = Color.Black;
+ }
+
+ private void minimizebutton_MouseEnter(object sender, EventArgs e)
+ {
+ minimizebutton.BackColor = Color.Gray;
+ }
+
+ private void minimizebutton_MouseLeave(object sender, EventArgs e)
+ {
+ minimizebutton.BackColor = Color.Black;
+ }
}
}
diff --git a/ShiftOS.Main/ShiftOS.Main.csproj b/ShiftOS.Main/ShiftOS.Main.csproj
index d6ea600..18e842f 100644
--- a/ShiftOS.Main/ShiftOS.Main.csproj
+++ b/ShiftOS.Main/ShiftOS.Main.csproj
@@ -52,16 +52,22 @@
+
+ UserControl
+
+
+ SelectColor.cs
+
UserControl
ShiftDemo.cs
-
+
UserControl
-
+
Shifter.cs
@@ -83,10 +89,13 @@
Resources.resx
True
+
+ SelectColor.cs
+
ShiftDemo.cs
-
+
Shifter.cs
diff --git a/ShiftOS.Main/ShiftOS/Apps/ShifterStuff/SelectColor.Designer.cs b/ShiftOS.Main/ShiftOS/Apps/ShifterStuff/SelectColor.Designer.cs
new file mode 100644
index 0000000..e305651
--- /dev/null
+++ b/ShiftOS.Main/ShiftOS/Apps/ShifterStuff/SelectColor.Designer.cs
@@ -0,0 +1,128 @@
+namespace ShiftOS.Main.ShiftOS.Apps
+{
+ partial class SelectColor
+ {
+ ///
+ /// Required designer variable.
+ ///
+ private System.ComponentModel.IContainer components = null;
+
+ ///
+ /// Clean up any resources being used.
+ ///
+ /// true if managed resources should be disposed; otherwise, false.
+ protected override void Dispose(bool disposing)
+ {
+ if (disposing && (components != null))
+ {
+ components.Dispose();
+ }
+ base.Dispose(disposing);
+ }
+
+ #region Component Designer generated code
+
+ ///
+ /// Required method for Designer support - do not modify
+ /// the contents of this method with the code editor.
+ ///
+ private void InitializeComponent()
+ {
+ this.label1 = new System.Windows.Forms.Label();
+ this.label2 = new System.Windows.Forms.Label();
+ this.label3 = new System.Windows.Forms.Label();
+ this.textBox1 = new System.Windows.Forms.TextBox();
+ this.textBox2 = new System.Windows.Forms.TextBox();
+ this.textBox3 = new System.Windows.Forms.TextBox();
+ this.btnSetColor = new System.Windows.Forms.Button();
+ this.SuspendLayout();
+ //
+ // label1
+ //
+ this.label1.AutoSize = true;
+ this.label1.Location = new System.Drawing.Point(21, 34);
+ this.label1.Name = "label1";
+ this.label1.Size = new System.Drawing.Size(39, 13);
+ this.label1.TabIndex = 0;
+ this.label1.Text = "Red:";
+ //
+ // label2
+ //
+ this.label2.AutoSize = true;
+ this.label2.Location = new System.Drawing.Point(21, 62);
+ this.label2.Name = "label2";
+ this.label2.Size = new System.Drawing.Size(55, 13);
+ this.label2.TabIndex = 1;
+ this.label2.Text = "Green:";
+ //
+ // label3
+ //
+ this.label3.AutoSize = true;
+ this.label3.Location = new System.Drawing.Point(21, 92);
+ this.label3.Name = "label3";
+ this.label3.Size = new System.Drawing.Size(47, 13);
+ this.label3.TabIndex = 2;
+ this.label3.Text = "Blue:";
+ //
+ // textBox1
+ //
+ this.textBox1.Location = new System.Drawing.Point(75, 27);
+ this.textBox1.Name = "textBox1";
+ this.textBox1.Size = new System.Drawing.Size(206, 20);
+ this.textBox1.TabIndex = 3;
+ //
+ // textBox2
+ //
+ this.textBox2.Location = new System.Drawing.Point(75, 58);
+ this.textBox2.Name = "textBox2";
+ this.textBox2.Size = new System.Drawing.Size(206, 20);
+ this.textBox2.TabIndex = 4;
+ //
+ // textBox3
+ //
+ this.textBox3.Location = new System.Drawing.Point(75, 88);
+ this.textBox3.Name = "textBox3";
+ this.textBox3.Size = new System.Drawing.Size(206, 20);
+ this.textBox3.TabIndex = 5;
+ //
+ // btnSetColor
+ //
+ this.btnSetColor.FlatStyle = System.Windows.Forms.FlatStyle.Flat;
+ this.btnSetColor.Location = new System.Drawing.Point(75, 121);
+ this.btnSetColor.Name = "btnSetColor";
+ this.btnSetColor.Size = new System.Drawing.Size(93, 23);
+ this.btnSetColor.TabIndex = 6;
+ this.btnSetColor.Text = "Set Color";
+ this.btnSetColor.UseVisualStyleBackColor = true;
+ this.btnSetColor.Click += new System.EventHandler(this.btnSetColor_Click);
+ //
+ // SelectColor
+ //
+ this.AutoScaleDimensions = new System.Drawing.SizeF(7F, 12F);
+ this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
+ this.Controls.Add(this.btnSetColor);
+ this.Controls.Add(this.textBox3);
+ this.Controls.Add(this.textBox2);
+ this.Controls.Add(this.textBox1);
+ this.Controls.Add(this.label3);
+ this.Controls.Add(this.label2);
+ this.Controls.Add(this.label1);
+ this.Font = new System.Drawing.Font("Lucida Console", 9.25F);
+ this.Name = "SelectColor";
+ this.Size = new System.Drawing.Size(317, 158);
+ this.ResumeLayout(false);
+ this.PerformLayout();
+
+ }
+
+ #endregion
+
+ private System.Windows.Forms.Label label1;
+ private System.Windows.Forms.Label label2;
+ private System.Windows.Forms.Label label3;
+ private System.Windows.Forms.TextBox textBox1;
+ private System.Windows.Forms.TextBox textBox2;
+ private System.Windows.Forms.TextBox textBox3;
+ private System.Windows.Forms.Button btnSetColor;
+ }
+}
diff --git a/ShiftOS.Main/ShiftOS/Apps/ShifterStuff/SelectColor.cs b/ShiftOS.Main/ShiftOS/Apps/ShifterStuff/SelectColor.cs
new file mode 100644
index 0000000..175d1cb
--- /dev/null
+++ b/ShiftOS.Main/ShiftOS/Apps/ShifterStuff/SelectColor.cs
@@ -0,0 +1,60 @@
+using System;
+using System.Collections.Generic;
+using System.ComponentModel;
+using System.Drawing;
+using System.Data;
+using System.Linq;
+using System.Text;
+using System.Threading.Tasks;
+using System.Windows.Forms;
+using ShiftOS.Engine.WindowManager;
+
+namespace ShiftOS.Main.ShiftOS.Apps
+{
+ public partial class SelectColor : UserControl
+ {
+ ShiftWM shiftWM = new ShiftWM();
+ Color finalColor;
+ int colorType1;
+ int colorType2;
+ int colorType3;
+ public SelectColor()
+ {
+ InitializeComponent();
+
+ }
+
+ private void btnSetColor_Click(object sender, EventArgs e)
+ {
+ try
+ {
+ colorType1 = Convert.ToInt32(textBox1.Text);
+ colorType2 = Convert.ToInt32(textBox2.Text);
+ colorType3 = Convert.ToInt32(textBox3.Text);
+ }
+ catch
+ {
+ shiftWM.StartInfoboxSession("Error!", "Cannot parse a string.", InfoboxTemplate.buttonType.OK);
+ }
+
+ if (colorType1 > 255 || colorType2 > 255 || colorType3 > 255)
+ {
+ shiftWM.StartInfoboxSession("Error!", "A value cannot be greater than 255!", InfoboxTemplate.buttonType.OK);
+ }
+ else
+ {
+ try
+ {
+ ShiftWindow sw = new ShiftWindow();
+ finalColor = Color.FromArgb(colorType1, colorType2, colorType3);
+ this.BackColor = finalColor;
+ shiftWM.StartInfoboxSession("Success!", "Changed color to:\n" + colorType1.ToString() + ", " + colorType2.ToString() + ", " + colorType3.ToString() + ".", InfoboxTemplate.buttonType.OK);
+ }
+ catch (Exception ex)
+ {
+ shiftWM.StartInfoboxSession("Error!", "An exception occured while setting the color! Exception: \n" + ex, InfoboxTemplate.buttonType.OK);
+ }
+ }
+ }
+ }
+}
diff --git a/ShiftOS.Main/ShiftOS/Apps/Shifter.resx b/ShiftOS.Main/ShiftOS/Apps/ShifterStuff/SelectColor.resx
similarity index 100%
rename from ShiftOS.Main/ShiftOS/Apps/Shifter.resx
rename to ShiftOS.Main/ShiftOS/Apps/ShifterStuff/SelectColor.resx
diff --git a/ShiftOS.Main/ShiftOS/Apps/Shifter.Designer.cs b/ShiftOS.Main/ShiftOS/Apps/ShifterStuff/Shifter.Designer.cs
similarity index 97%
rename from ShiftOS.Main/ShiftOS/Apps/Shifter.Designer.cs
rename to ShiftOS.Main/ShiftOS/Apps/ShifterStuff/Shifter.Designer.cs
index 0e9b2b4..a89dca4 100644
--- a/ShiftOS.Main/ShiftOS/Apps/Shifter.Designer.cs
+++ b/ShiftOS.Main/ShiftOS/Apps/ShifterStuff/Shifter.Designer.cs
@@ -30,9 +30,9 @@
{
this.tabControl1 = new System.Windows.Forms.TabControl();
this.tabPage1 = new System.Windows.Forms.TabPage();
- this.tabPage2 = new System.Windows.Forms.TabPage();
this.groupBox1 = new System.Windows.Forms.GroupBox();
this.button1 = new System.Windows.Forms.Button();
+ this.tabPage2 = new System.Windows.Forms.TabPage();
this.tabControl1.SuspendLayout();
this.tabPage1.SuspendLayout();
this.groupBox1.SuspendLayout();
@@ -59,19 +59,9 @@
this.tabPage1.Padding = new System.Windows.Forms.Padding(3);
this.tabPage1.Size = new System.Drawing.Size(326, 296);
this.tabPage1.TabIndex = 0;
- this.tabPage1.Text = "tabPage1";
+ this.tabPage1.Text = "Titlebar";
this.tabPage1.UseVisualStyleBackColor = true;
//
- // tabPage2
- //
- this.tabPage2.Location = new System.Drawing.Point(4, 22);
- this.tabPage2.Name = "tabPage2";
- this.tabPage2.Padding = new System.Windows.Forms.Padding(3);
- this.tabPage2.Size = new System.Drawing.Size(192, 74);
- this.tabPage2.TabIndex = 1;
- this.tabPage2.Text = "tabPage2";
- this.tabPage2.UseVisualStyleBackColor = true;
- //
// groupBox1
//
this.groupBox1.Controls.Add(this.button1);
@@ -94,6 +84,16 @@
this.button1.UseVisualStyleBackColor = true;
this.button1.Click += new System.EventHandler(this.button1_Click);
//
+ // tabPage2
+ //
+ this.tabPage2.Location = new System.Drawing.Point(4, 22);
+ this.tabPage2.Name = "tabPage2";
+ this.tabPage2.Padding = new System.Windows.Forms.Padding(3);
+ this.tabPage2.Size = new System.Drawing.Size(326, 296);
+ this.tabPage2.TabIndex = 1;
+ this.tabPage2.Text = "tabPage2";
+ this.tabPage2.UseVisualStyleBackColor = true;
+ //
// Shifter
//
this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F);
diff --git a/ShiftOS.Main/ShiftOS/Apps/Shifter.cs b/ShiftOS.Main/ShiftOS/Apps/ShifterStuff/Shifter.cs
similarity index 68%
rename from ShiftOS.Main/ShiftOS/Apps/Shifter.cs
rename to ShiftOS.Main/ShiftOS/Apps/ShifterStuff/Shifter.cs
index ce80f2b..74b2079 100644
--- a/ShiftOS.Main/ShiftOS/Apps/Shifter.cs
+++ b/ShiftOS.Main/ShiftOS/Apps/ShifterStuff/Shifter.cs
@@ -13,6 +13,8 @@ namespace ShiftOS.Main.ShiftOS.Apps
{
public partial class Shifter : UserControl
{
+ public int colorType; //This is a check to see what option was chosen.
+ ShiftWM wm = new ShiftWM();
public Shifter()
{
InitializeComponent();
@@ -20,12 +22,8 @@ namespace ShiftOS.Main.ShiftOS.Apps
private void button1_Click(object sender, EventArgs e)
{
- ColorDialog cD = new ColorDialog();
- if (cD.ShowDialog() == DialogResult.OK)
- {
- ShiftWindow sw = new ShiftWindow();
- sw.top.BackColor = cD.Color;
- }
+ colorType = 1;
+ wm.Init(new SelectColor(), "Select a color", Properties.Resources.iconColourPicker_fw);
}
}
}
diff --git a/ShiftOS.Main/ShiftOS/Apps/ShifterStuff/Shifter.resx b/ShiftOS.Main/ShiftOS/Apps/ShifterStuff/Shifter.resx
new file mode 100644
index 0000000..1af7de1
--- /dev/null
+++ b/ShiftOS.Main/ShiftOS/Apps/ShifterStuff/Shifter.resx
@@ -0,0 +1,120 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ text/microsoft-resx
+
+
+ 2.0
+
+
+ System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089
+
+
+ System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089
+
+
\ No newline at end of file
diff --git a/ShiftOS.Main/ShiftOS/Apps/TestForm.Designer.cs b/ShiftOS.Main/ShiftOS/Apps/TestForm.Designer.cs
index 654466d..7049a7e 100644
--- a/ShiftOS.Main/ShiftOS/Apps/TestForm.Designer.cs
+++ b/ShiftOS.Main/ShiftOS/Apps/TestForm.Designer.cs
@@ -31,6 +31,7 @@
this.textBox1 = new System.Windows.Forms.TextBox();
this.textBox2 = new System.Windows.Forms.TextBox();
this.button1 = new System.Windows.Forms.Button();
+ this.button2 = new System.Windows.Forms.Button();
this.SuspendLayout();
//
// textBox1
@@ -53,17 +54,28 @@
//
this.button1.Location = new System.Drawing.Point(12, 65);
this.button1.Name = "button1";
- this.button1.Size = new System.Drawing.Size(260, 23);
+ this.button1.Size = new System.Drawing.Size(128, 23);
this.button1.TabIndex = 2;
this.button1.Text = "Create Window";
this.button1.UseVisualStyleBackColor = true;
this.button1.Click += new System.EventHandler(this.Button1_Click);
//
+ // button2
+ //
+ this.button2.Location = new System.Drawing.Point(146, 65);
+ this.button2.Name = "button2";
+ this.button2.Size = new System.Drawing.Size(126, 23);
+ this.button2.TabIndex = 4;
+ this.button2.Text = "Test Shifter";
+ this.button2.UseVisualStyleBackColor = true;
+ this.button2.Click += new System.EventHandler(this.button2_Click);
+ //
// TestForm
//
this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F);
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
this.ClientSize = new System.Drawing.Size(284, 100);
+ this.Controls.Add(this.button2);
this.Controls.Add(this.button1);
this.Controls.Add(this.textBox2);
this.Controls.Add(this.textBox1);
@@ -79,5 +91,6 @@
private System.Windows.Forms.TextBox textBox1;
private System.Windows.Forms.TextBox textBox2;
private System.Windows.Forms.Button button1;
+ private System.Windows.Forms.Button button2;
}
}
\ No newline at end of file
diff --git a/ShiftOS.Main/ShiftOS/Apps/TestForm.cs b/ShiftOS.Main/ShiftOS/Apps/TestForm.cs
index 91055af..c8cd086 100644
--- a/ShiftOS.Main/ShiftOS/Apps/TestForm.cs
+++ b/ShiftOS.Main/ShiftOS/Apps/TestForm.cs
@@ -1,6 +1,7 @@
using System;
using System.Windows.Forms;
using ShiftOS.Engine.WindowManager;
+using ShiftOS.Main.ShiftOS.Apps;
namespace ShiftOS.Main
{
@@ -20,5 +21,10 @@ namespace ShiftOS.Main
shiftWM.Init(demo, textBox1.Text, null);
shiftWM.StartInfoboxSession(textBox1.Text, textBox2.Text, InfoboxTemplate.buttonType.OK);
}
+
+ private void button2_Click(object sender, EventArgs e)
+ {
+ shiftWM.Init(new Shifter(), "Shifter", Properties.Resources.iconShifter);
+ }
}
}