mirror of
https://github.com/crskycode/GARbro.git
synced 2026-06-06 05:38:48 +08:00
(FJSYS): changed password query.
This commit is contained in:
@@ -120,6 +120,13 @@ namespace GameRes.Formats.NSystem
|
|||||||
return new FjsysOptions { MsdPassword = Properties.Settings.Default.FJSYSPassword };
|
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 ()
|
public override object GetAccessWidget ()
|
||||||
{
|
{
|
||||||
return new GUI.WidgetMSD();
|
return new GUI.WidgetMSD();
|
||||||
|
|||||||
@@ -3,9 +3,9 @@
|
|||||||
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
|
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
|
||||||
xmlns:p="clr-namespace:GameRes.Formats.Properties">
|
xmlns:p="clr-namespace:GameRes.Formats.Properties">
|
||||||
<ComboBox Name="Title" ItemsSource="{Binding}"
|
<ComboBox Name="Title" ItemsSource="{Binding}"
|
||||||
SelectedValue="{Binding Source={x:Static p:Settings.Default}, Path=FJSYSPassword, Mode=OneWay}"
|
SelectedValue="{Binding ElementName=Password, Path=Text, Mode=TwoWay}"
|
||||||
SelectedValuePath="Value" DisplayMemberPath="Key" SelectionChanged="Title_SelectionChanged"
|
SelectedValuePath="Value" DisplayMemberPath="Key"
|
||||||
Width="250" HorizontalAlignment="Left"/>
|
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"/>
|
Width="250" HorizontalAlignment="Left" Margin="0,5,0,0"/>
|
||||||
</StackPanel>
|
</StackPanel>
|
||||||
|
|||||||
@@ -17,16 +17,6 @@ namespace GameRes.Formats.GUI
|
|||||||
InitializeComponent ();
|
InitializeComponent ();
|
||||||
var first = new Dictionary<string, string> { { arcStrings.ArcNoEncryption, "" } };
|
var first = new Dictionary<string, string> { { arcStrings.ArcNoEncryption, "" } };
|
||||||
Title.ItemsSource = first.Concat (FjsysOpener.KnownPasswords.OrderBy (x => x.Key));
|
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;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user