mirror of
https://github.com/crskycode/GARbro.git
synced 2026-07-08 01:30:18 +08:00
moved GUI project to a subdirectory.
This commit is contained in:
33
GUI/EnterMaskDialog.xaml.cs
Normal file
33
GUI/EnterMaskDialog.xaml.cs
Normal file
@@ -0,0 +1,33 @@
|
||||
using System.Collections.Generic;
|
||||
using System.Windows;
|
||||
using System.Windows.Controls;
|
||||
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 ();
|
||||
Mask.ItemsSource = mask_list;
|
||||
Mask.Text = "*.*";
|
||||
}
|
||||
|
||||
private void Button_Click (object sender, RoutedEventArgs e)
|
||||
{
|
||||
this.DialogResult = true;
|
||||
}
|
||||
|
||||
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;
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user