mirror of
https://github.com/crskycode/GARbro.git
synced 2026-06-24 04:37:49 +08:00
mask entry dialog has a drop-down list of possible extensions.
This commit is contained in:
@@ -1,5 +1,6 @@
|
||||
using System.Collections.Generic;
|
||||
using System.Windows;
|
||||
using System.Windows.Controls;
|
||||
using System.Windows.Input;
|
||||
|
||||
namespace GARbro.GUI
|
||||
@@ -12,16 +13,21 @@ namespace GARbro.GUI
|
||||
public EnterMaskDialog (IEnumerable<string> mask_list)
|
||||
{
|
||||
InitializeComponent ();
|
||||
// Mask.ItemsSource = mask_list;
|
||||
Mask.ItemsSource = mask_list;
|
||||
Mask.Text = "*.*";
|
||||
Mask.SelectionStart = 2;
|
||||
Mask.SelectionLength = 1;
|
||||
FocusManager.SetFocusedElement (this, Mask);
|
||||
}
|
||||
|
||||
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