GARbro-mirror/ArcFormats/WidgetYPF.xaml.cs

33 lines
788 B
C#
Raw Normal View History

2014-07-22 03:26:28 +08:00
using System.Windows;
using System.Windows.Controls;
2014-07-27 03:11:24 +08:00
using GameRes.Formats.Properties;
2014-07-22 03:26:28 +08:00
namespace GameRes.Formats.GUI
{
/// <summary>
/// Interaction logic for WidgetYPF.xaml
/// </summary>
public partial class WidgetYPF : Grid
{
2014-07-27 03:11:24 +08:00
public WidgetYPF ()
2014-07-22 03:26:28 +08:00
{
InitializeComponent();
2014-07-27 03:11:24 +08:00
uint key = Settings.Default.YPFKey;
if (key < 0x100)
this.Passkey.Text = key.ToString();
2014-07-22 03:26:28 +08:00
else
this.Passkey.Text = null;
}
public uint? GetKey ()
{
uint key;
2014-07-27 03:11:24 +08:00
if (uint.TryParse (this.Passkey.Text, out key) && key < 0x100)
2014-07-22 03:26:28 +08:00
return key;
else
return null;
}
}
}