diff --git a/ShiftOS.Main/ShiftOS.Main.csproj b/ShiftOS.Main/ShiftOS.Main.csproj
index 35d7761..bc4e9d7 100644
--- a/ShiftOS.Main/ShiftOS.Main.csproj
+++ b/ShiftOS.Main/ShiftOS.Main.csproj
@@ -33,9 +33,6 @@
latest
-
- ..\packages\Newtonsoft.Json.10.0.3\lib\net45\Newtonsoft.Json.dll
-
@@ -47,6 +44,9 @@
+
+ ..\packages\Whoa.1.5.0\lib\net45\Whoa.dll
+
diff --git a/ShiftOS.Main/ShiftOS/Apps/ShifterStuff/Shifter.Designer.cs b/ShiftOS.Main/ShiftOS/Apps/ShifterStuff/Shifter.Designer.cs
index 2ed43b4..8bbbac2 100644
--- a/ShiftOS.Main/ShiftOS/Apps/ShifterStuff/Shifter.Designer.cs
+++ b/ShiftOS.Main/ShiftOS/Apps/ShifterStuff/Shifter.Designer.cs
@@ -30,6 +30,7 @@
{
this.tabControl1 = new System.Windows.Forms.TabControl();
this.tabPage1 = new System.Windows.Forms.TabPage();
+ this.btnSave = new System.Windows.Forms.Button();
this.button5 = new System.Windows.Forms.Button();
this.button4 = new System.Windows.Forms.Button();
this.button3 = new System.Windows.Forms.Button();
@@ -37,7 +38,7 @@
this.groupBox1 = new System.Windows.Forms.GroupBox();
this.button1 = new System.Windows.Forms.Button();
this.tabPage2 = new System.Windows.Forms.TabPage();
- this.btnSave = new System.Windows.Forms.Button();
+ this.btnLoad = new System.Windows.Forms.Button();
this.tabControl1.SuspendLayout();
this.tabPage1.SuspendLayout();
this.groupBox1.SuspendLayout();
@@ -58,6 +59,7 @@
//
// tabPage1
//
+ this.tabPage1.Controls.Add(this.btnLoad);
this.tabPage1.Controls.Add(this.btnSave);
this.tabPage1.Controls.Add(this.button5);
this.tabPage1.Controls.Add(this.button4);
@@ -72,6 +74,18 @@
this.tabPage1.Text = "Titlebar";
this.tabPage1.UseVisualStyleBackColor = true;
//
+ // btnSave
+ //
+ this.btnSave.FlatStyle = System.Windows.Forms.FlatStyle.Flat;
+ this.btnSave.Font = new System.Drawing.Font("Lucida Console", 8.25F);
+ this.btnSave.Location = new System.Drawing.Point(6, 267);
+ this.btnSave.Name = "btnSave";
+ this.btnSave.Size = new System.Drawing.Size(155, 23);
+ this.btnSave.TabIndex = 6;
+ this.btnSave.Text = "Save Skin";
+ this.btnSave.UseVisualStyleBackColor = true;
+ this.btnSave.Click += new System.EventHandler(this.btnSave_Click);
+ //
// button5
//
this.button5.FlatStyle = System.Windows.Forms.FlatStyle.Flat;
@@ -112,9 +126,9 @@
//
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, 210);
+ this.button2.Location = new System.Drawing.Point(165, 210);
this.button2.Name = "button2";
- this.button2.Size = new System.Drawing.Size(149, 23);
+ this.button2.Size = new System.Drawing.Size(155, 23);
this.button2.TabIndex = 2;
this.button2.Text = "Set Colorful Skin";
this.button2.UseVisualStyleBackColor = true;
@@ -152,17 +166,17 @@
this.tabPage2.Text = "tabPage2";
this.tabPage2.UseVisualStyleBackColor = true;
//
- // btnSave
+ // btnLoad
//
- this.btnSave.FlatStyle = System.Windows.Forms.FlatStyle.Flat;
- this.btnSave.Font = new System.Drawing.Font("Lucida Console", 8.25F);
- this.btnSave.Location = new System.Drawing.Point(6, 267);
- this.btnSave.Name = "btnSave";
- this.btnSave.Size = new System.Drawing.Size(314, 23);
- this.btnSave.TabIndex = 6;
- this.btnSave.Text = "Save Skin";
- this.btnSave.UseVisualStyleBackColor = true;
- this.btnSave.Click += new System.EventHandler(this.btnSave_Click);
+ this.btnLoad.FlatStyle = System.Windows.Forms.FlatStyle.Flat;
+ this.btnLoad.Font = new System.Drawing.Font("Lucida Console", 8.25F);
+ this.btnLoad.Location = new System.Drawing.Point(165, 267);
+ this.btnLoad.Name = "btnLoad";
+ this.btnLoad.Size = new System.Drawing.Size(155, 23);
+ this.btnLoad.TabIndex = 7;
+ this.btnLoad.Text = "Load Skin";
+ this.btnLoad.UseVisualStyleBackColor = true;
+ this.btnLoad.Click += new System.EventHandler(this.btnLoad_Click);
//
// Shifter
//
@@ -190,5 +204,6 @@
private System.Windows.Forms.Button button4;
private System.Windows.Forms.Button button5;
private System.Windows.Forms.Button btnSave;
+ private System.Windows.Forms.Button btnLoad;
}
}
diff --git a/ShiftOS.Main/ShiftOS/Apps/ShifterStuff/Shifter.cs b/ShiftOS.Main/ShiftOS/Apps/ShifterStuff/Shifter.cs
index df093f0..1f31ae3 100644
--- a/ShiftOS.Main/ShiftOS/Apps/ShifterStuff/Shifter.cs
+++ b/ShiftOS.Main/ShiftOS/Apps/ShifterStuff/Shifter.cs
@@ -2,10 +2,10 @@
using System.Drawing;
using System.IO;
using System.Windows.Forms;
-using Newtonsoft.Json;
using ShiftOS.Engine.Misc;
using ShiftOS.Engine.WindowManager;
using ShiftOS.Main.Properties;
+using Whoa;
namespace ShiftOS.Main.ShiftOS.Apps.ShifterStuff
{
@@ -106,11 +106,42 @@ namespace ShiftOS.Main.ShiftOS.Apps.ShifterStuff
shiftColors[11] = ShiftSkinData.BtnCloseHoverColor;
shiftColors[12] = ShiftSkinData.BtnMaxHoverColor;
shiftColors[13] = ShiftSkinData.BtnMinHoverColor;
- File.WriteAllText(@"C:\Users\Public\Documents\Skin.json", JsonConvert.SerializeObject(shiftColors));
- ShiftWM.StartInfoboxSession(
+
+ using (var fobj = File.OpenWrite(@"C:\Users\Public\Documents\Skin.whoa"))
+ Whoa.Whoa.SerialiseObject(fobj, shiftColors);
+
+ ShiftWM.StartInfoboxSession(
"Saved Skin",
- "Saved Skin to C:\\Users\\Public\\Documents\\Skin.json",
+ "Saved Skin to C:\\Users\\Public\\Documents\\Skin.whoa",
InfoboxTemplate.ButtonType.Ok);
}
- }
+
+ private void btnLoad_Click(object sender, EventArgs e)
+ {
+ var shiftColors = new Color[14];
+ using (var fobj = File.OpenRead(@"C:\Users\Public\Documents\Skin.whoa"))
+ shiftColors = Whoa.Whoa.DeserialiseObject(fobj);
+
+ ShiftSkinData.LeftTopCornerColor = shiftColors[0];
+ ShiftSkinData.TitleBarColor = shiftColors[1];
+ ShiftSkinData.RightTopCornerColor = shiftColors[2];
+ ShiftSkinData.LeftSideColor = shiftColors[3];
+ ShiftSkinData.RightSideColor = shiftColors[4];
+ ShiftSkinData.LeftBottomCornerColor = shiftColors[5];
+ ShiftSkinData.BottomSideColor = shiftColors[6];
+ ShiftSkinData.RightBottomCornerColor = shiftColors[7];
+ ShiftSkinData.BtnCloseColor = shiftColors[8];
+ ShiftSkinData.BtnMaxColor = shiftColors[9];
+ ShiftSkinData.BtnMinColor = shiftColors[10];
+ ShiftSkinData.BtnCloseHoverColor = shiftColors[11];
+ ShiftSkinData.BtnMaxHoverColor = shiftColors[12];
+ ShiftSkinData.BtnMinHoverColor = shiftColors[13];
+
+ button5_Click(sender, e);
+ ShiftWM.StartInfoboxSession(
+ "Loaded Skin",
+ "Loaded Skin from C:\\Users\\Public\\Documents\\Skin.whoa",
+ InfoboxTemplate.ButtonType.Ok);
+ }
+ }
}
\ No newline at end of file
diff --git a/ShiftOS.Main/ShiftOS/Desktop.Designer.cs b/ShiftOS.Main/ShiftOS/Desktop.Designer.cs
index 98cd5e7..49f7c78 100644
--- a/ShiftOS.Main/ShiftOS/Desktop.Designer.cs
+++ b/ShiftOS.Main/ShiftOS/Desktop.Designer.cs
@@ -28,104 +28,114 @@
///
private void InitializeComponent()
{
- this.components = new System.ComponentModel.Container();
- this.listView1 = new System.Windows.Forms.ListView();
- this.taskbar = new System.Windows.Forms.ToolStrip();
- this.toolStripDropDownButton1 = new System.Windows.Forms.ToolStripDropDownButton();
- this.terminalToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
- this.textPadToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
- this.taskbarClock = new System.Windows.Forms.ToolStripLabel();
- this.timer1 = new System.Windows.Forms.Timer(this.components);
- this.fileSkimmerToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
- this.taskbar.SuspendLayout();
- this.SuspendLayout();
- //
- // listView1
- //
- this.listView1.BorderStyle = System.Windows.Forms.BorderStyle.None;
- this.listView1.Dock = System.Windows.Forms.DockStyle.Fill;
- this.listView1.Location = new System.Drawing.Point(0, 0);
- this.listView1.Name = "listView1";
- this.listView1.Size = new System.Drawing.Size(1916, 1052);
- this.listView1.TabIndex = 0;
- this.listView1.UseCompatibleStateImageBehavior = false;
- //
- // taskbar
- //
- this.taskbar.Dock = System.Windows.Forms.DockStyle.Bottom;
- this.taskbar.GripStyle = System.Windows.Forms.ToolStripGripStyle.Hidden;
- this.taskbar.ImageScalingSize = new System.Drawing.Size(24, 24);
- this.taskbar.Items.AddRange(new System.Windows.Forms.ToolStripItem[] {
+ this.components = new System.ComponentModel.Container();
+ this.listView1 = new System.Windows.Forms.ListView();
+ this.taskbar = new System.Windows.Forms.ToolStrip();
+ this.toolStripDropDownButton1 = new System.Windows.Forms.ToolStripDropDownButton();
+ this.terminalToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
+ this.textPadToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
+ this.fileSkimmerToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
+ this.taskbarClock = new System.Windows.Forms.ToolStripLabel();
+ this.timer1 = new System.Windows.Forms.Timer(this.components);
+ this.shifterToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
+ this.taskbar.SuspendLayout();
+ this.SuspendLayout();
+ //
+ // listView1
+ //
+ this.listView1.BorderStyle = System.Windows.Forms.BorderStyle.None;
+ this.listView1.Dock = System.Windows.Forms.DockStyle.Fill;
+ this.listView1.Location = new System.Drawing.Point(0, 0);
+ this.listView1.Margin = new System.Windows.Forms.Padding(2, 2, 2, 2);
+ this.listView1.Name = "listView1";
+ this.listView1.Size = new System.Drawing.Size(1277, 684);
+ this.listView1.TabIndex = 0;
+ this.listView1.UseCompatibleStateImageBehavior = false;
+ //
+ // taskbar
+ //
+ this.taskbar.Dock = System.Windows.Forms.DockStyle.Bottom;
+ this.taskbar.GripStyle = System.Windows.Forms.ToolStripGripStyle.Hidden;
+ this.taskbar.ImageScalingSize = new System.Drawing.Size(24, 24);
+ this.taskbar.Items.AddRange(new System.Windows.Forms.ToolStripItem[] {
this.toolStripDropDownButton1,
this.taskbarClock});
- this.taskbar.Location = new System.Drawing.Point(0, 1020);
- this.taskbar.Name = "taskbar";
- this.taskbar.Padding = new System.Windows.Forms.Padding(0, 0, 2, 0);
- this.taskbar.Size = new System.Drawing.Size(1916, 32);
- this.taskbar.TabIndex = 1;
- this.taskbar.Text = "toolStrip1";
- //
- // toolStripDropDownButton1
- //
- this.toolStripDropDownButton1.DropDownItems.AddRange(new System.Windows.Forms.ToolStripItem[] {
+ this.taskbar.Location = new System.Drawing.Point(0, 653);
+ this.taskbar.Name = "taskbar";
+ this.taskbar.Size = new System.Drawing.Size(1277, 31);
+ this.taskbar.TabIndex = 1;
+ this.taskbar.Text = "toolStrip1";
+ //
+ // toolStripDropDownButton1
+ //
+ this.toolStripDropDownButton1.DropDownItems.AddRange(new System.Windows.Forms.ToolStripItem[] {
this.terminalToolStripMenuItem,
this.textPadToolStripMenuItem,
- this.fileSkimmerToolStripMenuItem});
- this.toolStripDropDownButton1.Image = global::ShiftOS.Main.Properties.Resources.iconWebBrowser;
- this.toolStripDropDownButton1.ImageTransparentColor = System.Drawing.Color.Magenta;
- this.toolStripDropDownButton1.Name = "toolStripDropDownButton1";
- this.toolStripDropDownButton1.Size = new System.Drawing.Size(131, 29);
- this.toolStripDropDownButton1.Tag = ((uint)(0u));
- this.toolStripDropDownButton1.Text = "Programs";
- //
- // terminalToolStripMenuItem
- //
- this.terminalToolStripMenuItem.Name = "terminalToolStripMenuItem";
- this.terminalToolStripMenuItem.Size = new System.Drawing.Size(210, 30);
- this.terminalToolStripMenuItem.Text = "Terminal";
- this.terminalToolStripMenuItem.Click += new System.EventHandler(this.terminalToolStripMenuItem_Click);
- //
- // textPadToolStripMenuItem
- //
- this.textPadToolStripMenuItem.Name = "textPadToolStripMenuItem";
- this.textPadToolStripMenuItem.Size = new System.Drawing.Size(210, 30);
- this.textPadToolStripMenuItem.Text = "TextPad";
- this.textPadToolStripMenuItem.Click += new System.EventHandler(this.textPadToolStripMenuItem_Click);
- //
- // taskbarClock
- //
- this.taskbarClock.Alignment = System.Windows.Forms.ToolStripItemAlignment.Right;
- this.taskbarClock.Image = global::ShiftOS.Main.Properties.Resources.iconClock;
- this.taskbarClock.Name = "taskbarClock";
- this.taskbarClock.Size = new System.Drawing.Size(70, 29);
- this.taskbarClock.Tag = ((uint)(0u));
- this.taskbarClock.Text = "0:00";
- //
- // timer1
- //
- this.timer1.Interval = 1000;
- this.timer1.Tick += new System.EventHandler(this.timer1_Tick);
- //
- // fileSkimmerToolStripMenuItem
- //
- this.fileSkimmerToolStripMenuItem.Name = "fileSkimmerToolStripMenuItem";
- this.fileSkimmerToolStripMenuItem.Size = new System.Drawing.Size(210, 30);
- this.fileSkimmerToolStripMenuItem.Text = "File Skimmer";
- this.fileSkimmerToolStripMenuItem.Click += new System.EventHandler(this.fileSkimmerToolStripMenuItem_Click);
- //
- // Desktop
- //
- this.AutoScaleDimensions = new System.Drawing.SizeF(9F, 20F);
- this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
- this.ClientSize = new System.Drawing.Size(1916, 1052);
- this.Controls.Add(this.taskbar);
- this.Controls.Add(this.listView1);
- this.Name = "Desktop";
- this.Text = "Desktop";
- this.taskbar.ResumeLayout(false);
- this.taskbar.PerformLayout();
- this.ResumeLayout(false);
- this.PerformLayout();
+ this.fileSkimmerToolStripMenuItem,
+ this.shifterToolStripMenuItem});
+ this.toolStripDropDownButton1.Image = global::ShiftOS.Main.Properties.Resources.iconWebBrowser;
+ this.toolStripDropDownButton1.ImageTransparentColor = System.Drawing.Color.Magenta;
+ this.toolStripDropDownButton1.Name = "toolStripDropDownButton1";
+ this.toolStripDropDownButton1.Size = new System.Drawing.Size(95, 28);
+ this.toolStripDropDownButton1.Tag = ((uint)(0u));
+ this.toolStripDropDownButton1.Text = "Programs";
+ //
+ // terminalToolStripMenuItem
+ //
+ this.terminalToolStripMenuItem.Name = "terminalToolStripMenuItem";
+ this.terminalToolStripMenuItem.Size = new System.Drawing.Size(152, 22);
+ this.terminalToolStripMenuItem.Text = "Terminal";
+ this.terminalToolStripMenuItem.Click += new System.EventHandler(this.terminalToolStripMenuItem_Click);
+ //
+ // textPadToolStripMenuItem
+ //
+ this.textPadToolStripMenuItem.Name = "textPadToolStripMenuItem";
+ this.textPadToolStripMenuItem.Size = new System.Drawing.Size(152, 22);
+ this.textPadToolStripMenuItem.Text = "TextPad";
+ this.textPadToolStripMenuItem.Click += new System.EventHandler(this.textPadToolStripMenuItem_Click);
+ //
+ // fileSkimmerToolStripMenuItem
+ //
+ this.fileSkimmerToolStripMenuItem.Name = "fileSkimmerToolStripMenuItem";
+ this.fileSkimmerToolStripMenuItem.Size = new System.Drawing.Size(152, 22);
+ this.fileSkimmerToolStripMenuItem.Text = "File Skimmer";
+ this.fileSkimmerToolStripMenuItem.Click += new System.EventHandler(this.fileSkimmerToolStripMenuItem_Click);
+ //
+ // taskbarClock
+ //
+ this.taskbarClock.Alignment = System.Windows.Forms.ToolStripItemAlignment.Right;
+ this.taskbarClock.Image = global::ShiftOS.Main.Properties.Resources.iconClock;
+ this.taskbarClock.Name = "taskbarClock";
+ this.taskbarClock.Size = new System.Drawing.Size(52, 28);
+ this.taskbarClock.Tag = ((uint)(0u));
+ this.taskbarClock.Text = "0:00";
+ //
+ // timer1
+ //
+ this.timer1.Interval = 1000;
+ this.timer1.Tick += new System.EventHandler(this.timer1_Tick);
+ //
+ // shifterToolStripMenuItem
+ //
+ this.shifterToolStripMenuItem.Name = "shifterToolStripMenuItem";
+ this.shifterToolStripMenuItem.Size = new System.Drawing.Size(152, 22);
+ this.shifterToolStripMenuItem.Text = "Shifter";
+ this.shifterToolStripMenuItem.Click += new System.EventHandler(this.shifterToolStripMenuItem_Click);
+ //
+ // Desktop
+ //
+ this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F);
+ this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
+ this.ClientSize = new System.Drawing.Size(1277, 684);
+ this.Controls.Add(this.taskbar);
+ this.Controls.Add(this.listView1);
+ this.Margin = new System.Windows.Forms.Padding(2, 2, 2, 2);
+ this.Name = "Desktop";
+ this.Text = "Desktop";
+ this.taskbar.ResumeLayout(false);
+ this.taskbar.PerformLayout();
+ this.ResumeLayout(false);
+ this.PerformLayout();
}
@@ -139,5 +149,6 @@
private System.Windows.Forms.ToolStripMenuItem terminalToolStripMenuItem;
private System.Windows.Forms.ToolStripMenuItem textPadToolStripMenuItem;
private System.Windows.Forms.ToolStripMenuItem fileSkimmerToolStripMenuItem;
- }
+ private System.Windows.Forms.ToolStripMenuItem shifterToolStripMenuItem;
+ }
}
\ No newline at end of file
diff --git a/ShiftOS.Main/ShiftOS/Desktop.cs b/ShiftOS.Main/ShiftOS/Desktop.cs
index 4bf4805..9ca5270 100644
--- a/ShiftOS.Main/ShiftOS/Desktop.cs
+++ b/ShiftOS.Main/ShiftOS/Desktop.cs
@@ -72,5 +72,11 @@ namespace ShiftOS.Main.ShiftOS
var fs = new FileSkimmer();
ShiftWM.Init(fs, "File Skimmer", Resources.iconFileSkimmer);
}
- }
+
+ private void shifterToolStripMenuItem_Click(object sender, EventArgs e)
+ {
+ Apps.ShifterStuff.Shifter app = new Apps.ShifterStuff.Shifter();
+ ShiftWM.Init(app, "Shifter", null);
+ }
+ }
}
diff --git a/ShiftOS.Main/packages.config b/ShiftOS.Main/packages.config
index a96650b..a7de16a 100644
--- a/ShiftOS.Main/packages.config
+++ b/ShiftOS.Main/packages.config
@@ -1,5 +1,5 @@
-
+
\ No newline at end of file