2015-08-04 02:44:14 +08:00
|
|
|
|
using System.Collections.Generic;
|
|
|
|
|
using System.Windows;
|
2015-08-11 11:10:17 +08:00
|
|
|
|
using System.Windows.Controls;
|
2015-08-04 02:44:14 +08:00
|
|
|
|
using System.Windows.Input;
|
|
|
|
|
|
|
|
|
|
namespace GARbro.GUI
|
|
|
|
|
{
|
|
|
|
|
/// <summary>
|
|
|
|
|
/// Interaction logic for EnterMaskDialog.xaml
|
|
|
|
|
/// </summary>
|
|
|
|
|
public partial class EnterMaskDialog : Window
|
|
|
|
|
{
|
|
|
|
|
public EnterMaskDialog (IEnumerable<string> mask_list)
|
|
|
|
|
{
|
|
|
|
|
InitializeComponent ();
|
2015-08-11 11:10:17 +08:00
|
|
|
|
Mask.ItemsSource = mask_list;
|
2015-08-04 02:44:14 +08:00
|
|
|
|
Mask.Text = "*.*";
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
private void Button_Click (object sender, RoutedEventArgs e)
|
|
|
|
|
{
|
|
|
|
|
this.DialogResult = true;
|
|
|
|
|
}
|
2015-08-11 11:10:17 +08:00
|
|
|
|
|
|
|
|
|
private void Mask_Loaded (object sender, RoutedEventArgs e)
|
|
|
|
|
{
|
|
|
|
|
var text_box = (TextBox)Mask.Template.FindName ("PART_EditableTextBox", Mask);
|
|
|
|
|
FocusManager.SetFocusedElement (this, text_box);
|
|
|
|
|
text_box.SelectionStart = 2;
|
|
|
|
|
text_box.SelectionLength = 1;
|
|
|
|
|
}
|
2015-08-04 02:44:14 +08:00
|
|
|
|
}
|
|
|
|
|
}
|