2014-07-21 23:26:28 +04:00
|
|
|
|
using System.Windows;
|
|
|
|
|
using System.Windows.Controls;
|
2014-08-03 10:48:08 +04:00
|
|
|
|
using System.Linq;
|
2014-07-26 23:11:24 +04:00
|
|
|
|
using GameRes.Formats.Properties;
|
2014-08-18 09:07:35 +04:00
|
|
|
|
using GameRes.Formats.NitroPlus;
|
2014-07-21 23:26:28 +04:00
|
|
|
|
|
|
|
|
|
namespace GameRes.Formats.GUI
|
|
|
|
|
{
|
|
|
|
|
/// <summary>
|
|
|
|
|
/// Interaction logic for WidgetNPA.xaml
|
|
|
|
|
/// </summary>
|
|
|
|
|
public partial class WidgetNPA : Grid
|
|
|
|
|
{
|
2014-07-26 23:11:24 +04:00
|
|
|
|
public WidgetNPA ()
|
2014-07-21 23:26:28 +04:00
|
|
|
|
{
|
2014-08-18 09:07:35 +04:00
|
|
|
|
var selected = Settings.Default.NPAScheme;
|
2014-07-21 23:26:28 +04:00
|
|
|
|
InitializeComponent();
|
2014-08-03 10:48:08 +04:00
|
|
|
|
var sorted = NpaOpener.KnownSchemes.Skip (1).OrderBy (x => x);
|
|
|
|
|
Scheme.ItemsSource = NpaOpener.KnownSchemes.Take(1).Concat (sorted);
|
2014-08-18 09:07:35 +04:00
|
|
|
|
if (NpaTitleId.NotEncrypted == NpaOpener.GetTitleId (selected))
|
|
|
|
|
Scheme.SelectedIndex = 0;
|
|
|
|
|
else
|
|
|
|
|
Scheme.SelectedValue = selected;
|
2014-07-21 23:26:28 +04:00
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|