mirror of
https://github.com/crskycode/GARbro.git
synced 2024-11-30 08:55:39 +08:00
(WidgetNSA): takes known keys dictionary as argument.
This commit is contained in:
parent
a48bf2599a
commit
92279cf4bf
@ -218,7 +218,7 @@ namespace GameRes.Formats.NScripter
|
||||
|
||||
public override object GetAccessWidget ()
|
||||
{
|
||||
return new GUI.WidgetNSA();
|
||||
return new GUI.WidgetNSA (KnownKeys);
|
||||
}
|
||||
|
||||
public override object GetCreationWidget ()
|
||||
|
@ -1,7 +1,6 @@
|
||||
<Grid x:Class="GameRes.Formats.GUI.WidgetNSA"
|
||||
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
|
||||
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
|
||||
xmlns:fmt="clr-namespace:GameRes.Formats.NScripter"
|
||||
xmlns:p="clr-namespace:GameRes.Formats.Properties"
|
||||
xmlns:s="clr-namespace:GameRes.Formats.Strings">
|
||||
<Grid.RowDefinitions>
|
||||
@ -10,7 +9,7 @@
|
||||
<RowDefinition/>
|
||||
</Grid.RowDefinitions>
|
||||
<Label Content="{x:Static s:arcStrings.NSAChoose}" Grid.Row="0" HorizontalAlignment="Left"/>
|
||||
<ComboBox Name="Title" ItemsSource="{Binding Source={x:Static fmt:NsaOpener.KnownKeys}, Mode=OneWay}"
|
||||
<ComboBox Name="Title" ItemsSource="{Binding}"
|
||||
SelectedValue="{Binding Source={x:Static p:Settings.Default}, Path=NSATitle, Mode=TwoWay}"
|
||||
SelectedValuePath="Key" DisplayMemberPath="Key" SelectionChanged="Title_SelectionChanged"
|
||||
Width="200" Grid.Row="1" HorizontalAlignment="Left"/>
|
||||
|
@ -9,9 +9,10 @@ namespace GameRes.Formats.GUI
|
||||
/// </summary>
|
||||
public partial class WidgetNSA : Grid
|
||||
{
|
||||
public WidgetNSA ()
|
||||
public WidgetNSA (IDictionary<string, string> known_keys)
|
||||
{
|
||||
InitializeComponent ();
|
||||
this.Title.ItemsSource = known_keys;
|
||||
this.Password.Text = Settings.Default.NSAPassword;
|
||||
if (null != this.Title.SelectedItem)
|
||||
{
|
||||
|
Loading…
Reference in New Issue
Block a user