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