mirror of
https://github.com/crskycode/GARbro.git
synced 2024-11-23 13:45:34 +08:00
Dialog for entering wildcard mask.
This commit is contained in:
parent
3a293baeea
commit
81773a8137
17
EnterMaskDialog.xaml
Normal file
17
EnterMaskDialog.xaml
Normal file
@ -0,0 +1,17 @@
|
||||
<Window x:Class="GARbro.GUI.EnterMaskDialog"
|
||||
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
|
||||
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
|
||||
xmlns:s="clr-namespace:GARbro.GUI.Strings"
|
||||
xmlns:ctl="clr-namespace:System.Windows.Controls;assembly=System.Windows.Controls.Input.Toolkit"
|
||||
Background="{DynamicResource {x:Static SystemColors.ControlBrushKey}}"
|
||||
Title="{x:Static s:guiStrings.TextSelectFiles}" SizeToContent="WidthAndHeight" ShowInTaskbar="False"
|
||||
WindowStartupLocation="CenterOwner" ResizeMode="NoResize">
|
||||
<StackPanel Orientation="Vertical" Margin="10">
|
||||
<TextBlock Text="{x:Static s:guiStrings.LabelEnterMask}"/>
|
||||
<TextBox Name="Mask"/>
|
||||
<StackPanel Orientation="Horizontal" Margin="0,10,0,0">
|
||||
<Button Width="75" Height="25" Content="{x:Static s:guiStrings.ButtonOK}" IsDefault="True" Margin="0,0,10,0" Click="Button_Click"/>
|
||||
<Button Width="75" Height="25" Content="{x:Static s:guiStrings.ButtonCancel}" IsCancel="True"/>
|
||||
</StackPanel>
|
||||
</StackPanel>
|
||||
</Window>
|
27
EnterMaskDialog.xaml.cs
Normal file
27
EnterMaskDialog.xaml.cs
Normal file
@ -0,0 +1,27 @@
|
||||
using System.Collections.Generic;
|
||||
using System.Windows;
|
||||
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 = "*.*";
|
||||
Mask.SelectionStart = 2;
|
||||
Mask.SelectionLength = 1;
|
||||
FocusManager.SetFocusedElement (this, Mask);
|
||||
}
|
||||
|
||||
private void Button_Click (object sender, RoutedEventArgs e)
|
||||
{
|
||||
this.DialogResult = true;
|
||||
}
|
||||
}
|
||||
}
|
Loading…
Reference in New Issue
Block a user