aboutsummaryrefslogtreecommitdiff
path: root/ShiftOS.WinForms/Applications
diff options
context:
space:
mode:
Diffstat (limited to 'ShiftOS.WinForms/Applications')
-rw-r--r--ShiftOS.WinForms/Applications/IconManager.Designer.cs22
-rw-r--r--ShiftOS.WinForms/Applications/IconManager.cs12
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<Dictionary<string, byte[]>>(contents);
+ AppearanceManager.SetupWindow(this);
+ Icons = dict;
+ SetupUI();
+ }
+
public void OnLoad()
{
LoadIconsFromEngine();