mirror of
https://github.com/crskycode/GARbro.git
synced 2024-11-23 05:35:34 +08:00
(FJSYS): changed password query.
This commit is contained in:
parent
0257244a73
commit
73db11a6bc
@ -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();
|
||||
|
@ -3,9 +3,9 @@
|
||||
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
|
||||
xmlns:p="clr-namespace:GameRes.Formats.Properties">
|
||||
<ComboBox Name="Title" ItemsSource="{Binding}"
|
||||
SelectedValue="{Binding Source={x:Static p:Settings.Default}, Path=FJSYSPassword, Mode=OneWay}"
|
||||
SelectedValuePath="Value" DisplayMemberPath="Key" SelectionChanged="Title_SelectionChanged"
|
||||
SelectedValue="{Binding ElementName=Password, Path=Text, Mode=TwoWay}"
|
||||
SelectedValuePath="Value" DisplayMemberPath="Key"
|
||||
Width="250" HorizontalAlignment="Left"/>
|
||||
<TextBox Name="Password" Text="{Binding Source={x:Static p:Settings.Default}, Path=FJSYSPassword, Mode=TwoWay}"
|
||||
<TextBox Name="Password" Text="{Binding Source={x:Static p:Settings.Default}, Path=FJSYSPassword, Mode=OneWay}"
|
||||
Width="250" HorizontalAlignment="Left" Margin="0,5,0,0"/>
|
||||
</StackPanel>
|
||||
|
@ -17,16 +17,6 @@ namespace GameRes.Formats.GUI
|
||||
InitializeComponent ();
|
||||
var first = new Dictionary<string, string> { { 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<string, string>)this.Title.SelectedItem;
|
||||
this.Password.Text = selected.Value;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user