From 6cdb8cb0253230f6f845afb549517c5c3f12d2d1 Mon Sep 17 00:00:00 2001 From: Michael Date: Wed, 28 Jun 2017 08:48:16 -0400 Subject: [PATCH] .icons file extension --- .../Applications/IconManager.Designer.cs | 22 +++++++++---------- ShiftOS.WinForms/Applications/IconManager.cs | 12 +++++++++- 2 files changed, 22 insertions(+), 12 deletions(-) diff --git a/ShiftOS.WinForms/Applications/IconManager.Designer.cs b/ShiftOS.WinForms/Applications/IconManager.Designer.cs index 25bcee4..0dd21cf 100644 --- a/ShiftOS.WinForms/Applications/IconManager.Designer.cs +++ b/ShiftOS.WinForms/Applications/IconManager.Designer.cs @@ -32,10 +32,10 @@ this.btnclose = new System.Windows.Forms.Button(); this.btnreset = new System.Windows.Forms.Button(); this.btnapply = new System.Windows.Forms.Button(); - this.flbody = new System.Windows.Forms.FlowLayoutPanel(); this.lbcurrentpage = new System.Windows.Forms.Label(); this.btnprev = new System.Windows.Forms.Button(); this.btnnext = new System.Windows.Forms.Button(); + this.flbody = new System.Windows.Forms.FlowLayoutPanel(); this.flowLayoutPanel1.SuspendLayout(); this.SuspendLayout(); // @@ -91,16 +91,6 @@ this.btnapply.UseVisualStyleBackColor = true; this.btnapply.Click += new System.EventHandler(this.btnapply_Click); // - // flbody - // - this.flbody.Dock = System.Windows.Forms.DockStyle.Fill; - this.flbody.FlowDirection = System.Windows.Forms.FlowDirection.TopDown; - this.flbody.Location = new System.Drawing.Point(0, 0); - this.flbody.Name = "flbody"; - this.flbody.Size = new System.Drawing.Size(393, 416); - this.flbody.TabIndex = 1; - this.flbody.WrapContents = false; - // // lbcurrentpage // this.lbcurrentpage.AutoSize = true; @@ -134,6 +124,16 @@ this.btnnext.UseVisualStyleBackColor = true; this.btnnext.Click += new System.EventHandler(this.btnnext_Click); // + // flbody + // + this.flbody.Dock = System.Windows.Forms.DockStyle.Fill; + this.flbody.FlowDirection = System.Windows.Forms.FlowDirection.TopDown; + this.flbody.Location = new System.Drawing.Point(0, 0); + this.flbody.Name = "flbody"; + this.flbody.Size = new System.Drawing.Size(393, 416); + this.flbody.TabIndex = 1; + this.flbody.WrapContents = false; + // // IconManager // this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F); diff --git a/ShiftOS.WinForms/Applications/IconManager.cs b/ShiftOS.WinForms/Applications/IconManager.cs index 1f3166f..1979ce6 100644 --- a/ShiftOS.WinForms/Applications/IconManager.cs +++ b/ShiftOS.WinForms/Applications/IconManager.cs @@ -14,17 +14,27 @@ using Newtonsoft.Json; namespace ShiftOS.WinForms.Applications { + [FileHandler("Icon Pack", ".icons", "fileiconicons")] [RequiresUpgrade("icon_manager")] [Launcher("{TITLE_ICONMANAGER}", true, "al_icon_manager", "{AL_CUSTOMIZATION}")] [DefaultTitle("{TITLE_ICONMANAGER}")] [DefaultIcon("iconIconManager")] - public partial class IconManager : UserControl, IShiftOSWindow + public partial class IconManager : UserControl, IShiftOSWindow, IFileHandler { public IconManager() { InitializeComponent(); } + public void OpenFile(string file) + { + var contents = Objects.ShiftFS.Utils.ReadAllText(file); + var dict = JsonConvert.DeserializeObject>(contents); + AppearanceManager.SetupWindow(this); + Icons = dict; + SetupUI(); + } + public void OnLoad() { LoadIconsFromEngine();