2015-09-18 01:27:53 +04:00
|
|
|
|
using System.Windows.Controls;
|
2015-08-19 21:40:32 +04:00
|
|
|
|
using System.Linq;
|
|
|
|
|
using GameRes.Formats.Properties;
|
|
|
|
|
using GameRes.Formats.NitroPlus;
|
2015-09-18 01:27:53 +04:00
|
|
|
|
using GameRes.Formats.Strings;
|
2015-08-19 21:40:32 +04:00
|
|
|
|
|
|
|
|
|
namespace GameRes.Formats.GUI
|
|
|
|
|
{
|
|
|
|
|
/// <summary>
|
|
|
|
|
/// Interaction logic for WidgetNPA.xaml
|
|
|
|
|
/// </summary>
|
|
|
|
|
public partial class WidgetNPA : Grid
|
|
|
|
|
{
|
|
|
|
|
public WidgetNPA ()
|
|
|
|
|
{
|
|
|
|
|
var selected = Settings.Default.NPAScheme;
|
|
|
|
|
InitializeComponent();
|
2015-09-18 01:27:53 +04:00
|
|
|
|
var keys = new string[] { arcStrings.ArcNoEncryption };
|
|
|
|
|
Scheme.ItemsSource = keys.Concat (NpaOpener.KnownSchemes.Keys.OrderBy (x => x));
|
2015-08-19 21:40:32 +04:00
|
|
|
|
if (NpaTitleId.NotEncrypted == NpaOpener.GetTitleId (selected))
|
|
|
|
|
Scheme.SelectedIndex = 0;
|
|
|
|
|
else
|
|
|
|
|
Scheme.SelectedValue = selected;
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|