diff --git a/ArcFormats/NSystem/ArcFJSYS.cs b/ArcFormats/NSystem/ArcFJSYS.cs index 191b5f3d..e01a83b0 100644 --- a/ArcFormats/NSystem/ArcFJSYS.cs +++ b/ArcFormats/NSystem/ArcFJSYS.cs @@ -120,6 +120,13 @@ namespace GameRes.Formats.NSystem return new FjsysOptions { MsdPassword = Properties.Settings.Default.FJSYSPassword }; } + public override ResourceOptions GetOptions (object widget) + { + if (widget is GUI.WidgetMSD) + Properties.Settings.Default.FJSYSPassword = ((GUI.WidgetMSD)widget).Password.Text; + return GetDefaultOptions(); + } + public override object GetAccessWidget () { return new GUI.WidgetMSD(); diff --git a/ArcFormats/NSystem/WidgetMSD.xaml b/ArcFormats/NSystem/WidgetMSD.xaml index a05ca814..3f6fdd92 100644 --- a/ArcFormats/NSystem/WidgetMSD.xaml +++ b/ArcFormats/NSystem/WidgetMSD.xaml @@ -3,9 +3,9 @@ xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" xmlns:p="clr-namespace:GameRes.Formats.Properties"> - diff --git a/ArcFormats/NSystem/WidgetMSD.xaml.cs b/ArcFormats/NSystem/WidgetMSD.xaml.cs index fa7e0a51..ec0b2d27 100644 --- a/ArcFormats/NSystem/WidgetMSD.xaml.cs +++ b/ArcFormats/NSystem/WidgetMSD.xaml.cs @@ -17,16 +17,6 @@ namespace GameRes.Formats.GUI InitializeComponent (); var first = new Dictionary { { arcStrings.ArcNoEncryption, "" } }; Title.ItemsSource = first.Concat (FjsysOpener.KnownPasswords.OrderBy (x => x.Key)); - Password.Text = Settings.Default.FJSYSPassword; - } - - private void Title_SelectionChanged (object sender, SelectionChangedEventArgs e) - { - if (null != this.Title.SelectedItem && null != this.Password) - { - var selected = (KeyValuePair)this.Title.SelectedItem; - this.Password.Text = selected.Value; - } } } }