diff --git a/.vs/ShiftOS/v15/sqlite3/storage.ide b/.vs/ShiftOS/v15/sqlite3/storage.ide
index 3be5453..8466a5c 100644
Binary files a/.vs/ShiftOS/v15/sqlite3/storage.ide and b/.vs/ShiftOS/v15/sqlite3/storage.ide differ
diff --git a/ShiftOS.Engine/ShiftOS.Engine.csproj b/ShiftOS.Engine/ShiftOS.Engine.csproj
index 2b436c1..be91d50 100644
--- a/ShiftOS.Engine/ShiftOS.Engine.csproj
+++ b/ShiftOS.Engine/ShiftOS.Engine.csproj
@@ -59,6 +59,7 @@
InfoboxTemplate.cs
+
Form
diff --git a/ShiftOS.Engine/WindowManager/ShiftArray.cs b/ShiftOS.Engine/WindowManager/ShiftArray.cs
new file mode 100644
index 0000000..bfb3cde
--- /dev/null
+++ b/ShiftOS.Engine/WindowManager/ShiftArray.cs
@@ -0,0 +1,12 @@
+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/ShiftWM.cs b/ShiftOS.Engine/WindowManager/ShiftWM.cs
index 0c69fb7..594848a 100644
--- a/ShiftOS.Engine/WindowManager/ShiftWM.cs
+++ b/ShiftOS.Engine/WindowManager/ShiftWM.cs
@@ -18,7 +18,7 @@ namespace ShiftOS.Engine.WindowManager
}
///
- /// Shows a new Window based on a UserControl.
+ /// Shows a new ShiftWindow based on a UserControl.
///
/// The UserControl to use
/// The program's title
diff --git a/ShiftOS.Main/ShiftOS/Apps/ShifterStuff/SelectColor.Designer.cs b/ShiftOS.Main/ShiftOS/Apps/ShifterStuff/SelectColor.Designer.cs
index e305651..a7473a0 100644
--- a/ShiftOS.Main/ShiftOS/Apps/ShifterStuff/SelectColor.Designer.cs
+++ b/ShiftOS.Main/ShiftOS/Apps/ShifterStuff/SelectColor.Designer.cs
@@ -31,10 +31,13 @@
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.redUpDown = new System.Windows.Forms.NumericUpDown();
+ this.greenUpDown = new System.Windows.Forms.NumericUpDown();
+ this.blueUpDown = new System.Windows.Forms.NumericUpDown();
+ ((System.ComponentModel.ISupportInitialize)(this.redUpDown)).BeginInit();
+ ((System.ComponentModel.ISupportInitialize)(this.greenUpDown)).BeginInit();
+ ((System.ComponentModel.ISupportInitialize)(this.blueUpDown)).BeginInit();
this.SuspendLayout();
//
// label1
@@ -64,27 +67,6 @@
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;
@@ -96,20 +78,59 @@
this.btnSetColor.UseVisualStyleBackColor = true;
this.btnSetColor.Click += new System.EventHandler(this.btnSetColor_Click);
//
+ // redUpDown
+ //
+ this.redUpDown.Location = new System.Drawing.Point(82, 32);
+ this.redUpDown.Maximum = new decimal(new int[] {
+ 255,
+ 0,
+ 0,
+ 0});
+ this.redUpDown.Name = "redUpDown";
+ this.redUpDown.Size = new System.Drawing.Size(120, 20);
+ this.redUpDown.TabIndex = 7;
+ //
+ // greenUpDown
+ //
+ this.greenUpDown.Location = new System.Drawing.Point(82, 60);
+ this.greenUpDown.Maximum = new decimal(new int[] {
+ 255,
+ 0,
+ 0,
+ 0});
+ this.greenUpDown.Name = "greenUpDown";
+ this.greenUpDown.Size = new System.Drawing.Size(120, 20);
+ this.greenUpDown.TabIndex = 8;
+ //
+ // blueUpDown
+ //
+ this.blueUpDown.Location = new System.Drawing.Point(82, 90);
+ this.blueUpDown.Maximum = new decimal(new int[] {
+ 255,
+ 0,
+ 0,
+ 0});
+ this.blueUpDown.Name = "blueUpDown";
+ this.blueUpDown.Size = new System.Drawing.Size(120, 20);
+ this.blueUpDown.TabIndex = 9;
+ //
// SelectColor
//
this.AutoScaleDimensions = new System.Drawing.SizeF(7F, 12F);
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
+ this.Controls.Add(this.blueUpDown);
+ this.Controls.Add(this.greenUpDown);
+ this.Controls.Add(this.redUpDown);
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);
+ ((System.ComponentModel.ISupportInitialize)(this.redUpDown)).EndInit();
+ ((System.ComponentModel.ISupportInitialize)(this.greenUpDown)).EndInit();
+ ((System.ComponentModel.ISupportInitialize)(this.blueUpDown)).EndInit();
this.ResumeLayout(false);
this.PerformLayout();
@@ -120,9 +141,9 @@
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;
+ private System.Windows.Forms.NumericUpDown redUpDown;
+ private System.Windows.Forms.NumericUpDown greenUpDown;
+ private System.Windows.Forms.NumericUpDown blueUpDown;
}
}
diff --git a/ShiftOS.Main/ShiftOS/Apps/ShifterStuff/SelectColor.cs b/ShiftOS.Main/ShiftOS/Apps/ShifterStuff/SelectColor.cs
index 697e22e..f9f8f72 100644
--- a/ShiftOS.Main/ShiftOS/Apps/ShifterStuff/SelectColor.cs
+++ b/ShiftOS.Main/ShiftOS/Apps/ShifterStuff/SelectColor.cs
@@ -14,40 +14,31 @@ namespace ShiftOS.Main.ShiftOS.Apps
public SelectColor()
{
InitializeComponent();
-
+
}
private void btnSetColor_Click(object sender, EventArgs e)
{
+ _colorType1 = Int32.Parse(redUpDown.Value.ToString());
+ _colorType2 = Int32.Parse(greenUpDown.Value.ToString());
+ _colorType3 = Int32.Parse(blueUpDown.Value.ToString());
try
{
- _colorType1 = Convert.ToInt32(textBox1.Text);
- _colorType2 = Convert.ToInt32(textBox2.Text);
- _colorType3 = Convert.ToInt32(textBox3.Text);
- }
- catch(FormatException ex)
- {
- ShiftWM.StartInfoboxSession("Error!", "Failed to parse integer. Error:\n" + ex, 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);
- BackColor = _finalColor;
- ShiftWM.StartInfoboxSession("Success!", "Changed color to:\n" + _colorType1.ToString() + ", " + _colorType2.ToString() + ", " + _colorType3.ToString() + ".", InfoboxTemplate.ButtonType.Ok);
- }
- catch (Exception)
- {
- ShiftWM.StartInfoboxSession("Error!", "An error occured while setting the color.", InfoboxTemplate.ButtonType.Ok);
+ _finalColor = Color.FromArgb(_colorType1, _colorType2, _colorType3);
+ //BackColor = _finalColor;
+
+ foreach (var window in ShiftWM.Windows)
+{
+ window.Invoke(new Action(() => window.top.BackColor = _finalColor));
}
+
+ ShiftWM.StartInfoboxSession("Success!", $"Changed color to:\r\n{_colorType1}, {_colorType2}, {_colorType3}.", InfoboxTemplate.ButtonType.Ok);
}
+ catch (Exception)
+ {
+ ShiftWM.StartInfoboxSession("Error!", "An error occured while setting the color.", InfoboxTemplate.ButtonType.Ok);
+ }
+ //return _finalColor;
}
}
-}
+ }
diff --git a/ShiftOS.Main/ShiftOS/Apps/ShifterStuff/Shifter.Designer.cs b/ShiftOS.Main/ShiftOS/Apps/ShifterStuff/Shifter.Designer.cs
index a89dca4..51bce9c 100644
--- a/ShiftOS.Main/ShiftOS/Apps/ShifterStuff/Shifter.Designer.cs
+++ b/ShiftOS.Main/ShiftOS/Apps/ShifterStuff/Shifter.Designer.cs
@@ -33,6 +33,8 @@
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();
@@ -53,6 +55,8 @@
//
// tabPage1
//
+ this.tabPage1.Controls.Add(this.button3);
+ this.tabPage1.Controls.Add(this.button2);
this.tabPage1.Controls.Add(this.groupBox1);
this.tabPage1.Location = new System.Drawing.Point(4, 22);
this.tabPage1.Name = "tabPage1";
@@ -94,6 +98,30 @@
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);
@@ -115,5 +143,7 @@
private System.Windows.Forms.GroupBox groupBox1;
private System.Windows.Forms.Button button1;
private System.Windows.Forms.TabPage tabPage2;
+ private System.Windows.Forms.Button button3;
+ private System.Windows.Forms.Button button2;
}
}
diff --git a/ShiftOS.Main/ShiftOS/Apps/ShifterStuff/Shifter.cs b/ShiftOS.Main/ShiftOS/Apps/ShifterStuff/Shifter.cs
index 098920f..5d5ad7d 100644
--- a/ShiftOS.Main/ShiftOS/Apps/ShifterStuff/Shifter.cs
+++ b/ShiftOS.Main/ShiftOS/Apps/ShifterStuff/Shifter.cs
@@ -18,5 +18,15 @@ namespace ShiftOS.Main.ShiftOS.Apps
colorType = 1;
ShiftWM.Init(new SelectColor(), "Select a color", Properties.Resources.iconColourPicker_fw.ToIcon());
}
+
+ private void button3_Click(object sender, EventArgs e)
+ {
+
+ }
+
+ private void button2_Click(object sender, EventArgs e)
+ {
+
+ }
}
}
diff --git a/ShiftOS.Main/ShiftOS/Apps/TestForm.cs b/ShiftOS.Main/ShiftOS/Apps/TestForm.cs
index 1fd3b18..389f8d1 100644
--- a/ShiftOS.Main/ShiftOS/Apps/TestForm.cs
+++ b/ShiftOS.Main/ShiftOS/Apps/TestForm.cs
@@ -17,12 +17,8 @@ namespace ShiftOS.Main
private void Button1_Click(object sender, EventArgs e)
{
- ShiftDemo demo = new ShiftDemo {label1 = {Text = textBox2.Text}};
-
- var item = typeof(SystemIcons).GetProperties()
- .First(p => p.Name == comboBox1.SelectedItem as string);
-
- ShiftWM.Init(demo, textBox1.Text, (item.GetMethod.Invoke(null, new object[0]) as Icon));
+ ShiftDemo demo = new ShiftDemo();
+ ShiftWM.Init(demo, textBox1.Text, null);
ShiftWM.StartInfoboxSession(textBox1.Text, textBox2.Text, InfoboxTemplate.ButtonType.Ok);
}