aboutsummaryrefslogtreecommitdiff
path: root/ShiftOS.WinForms/Applications/NameChanger.cs
diff options
context:
space:
mode:
Diffstat (limited to 'ShiftOS.WinForms/Applications/NameChanger.cs')
-rw-r--r--ShiftOS.WinForms/Applications/NameChanger.cs11
1 files changed, 9 insertions, 2 deletions
diff --git a/ShiftOS.WinForms/Applications/NameChanger.cs b/ShiftOS.WinForms/Applications/NameChanger.cs
index 4695c8a..67c64fd 100644
--- a/ShiftOS.WinForms/Applications/NameChanger.cs
+++ b/ShiftOS.WinForms/Applications/NameChanger.cs
@@ -37,20 +37,27 @@ using ShiftOS.Objects.ShiftFS;
using ShiftOS.WinForms.Tools;
namespace ShiftOS.WinForms.Applications {
-
+ [FileHandler("Name Pack", ".nme", "fileiconnames")]
[MultiplayerOnly]
[Launcher("{TITLE_NAMECHANGER}", false, null, "{AL_CUSTOMIZATION}")]
[AppscapeEntry("name_changer", "{TITLE_NAMECHANGER}", "{DESC_NAMECHANGER}", 342, 500, "skinning;file_skimmer;wm_titlebar", "{AL_CUSTOMIZATION}")]
[WinOpen("{WO_NAMECHANGER}")]
[DefaultTitle("{TITLE_NAMECHANGER}")]
[DefaultIcon("iconNameChanger")]
- public partial class NameChanger : UserControl, IShiftOSWindow
+ public partial class NameChanger : UserControl, IShiftOSWindow, IFileHandler
{
public NameChanger()
{
InitializeComponent();
}
+ public void OpenFile(string file)
+ {
+ AppearanceManager.SetupWindow(this);
+ names = JsonConvert.DeserializeObject<Dictionary<string, string>>(ShiftOS.Objects.ShiftFS.Utils.ReadAllText(file));
+ SetupUI();
+ }
+
private Dictionary<string, string> names = new Dictionary<string, string>();
public void OnLoad()