GARbro-mirror/GUI/CreateArchive.xaml

54 lines
3.7 KiB
Plaintext
Raw Normal View History

<Window x:Class="GARbro.GUI.CreateArchiveDialog"
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:p="clr-namespace:GARbro.GUI.Properties"
2014-07-25 06:58:42 +04:00
xmlns:gr="clr-namespace:GameRes;assembly=GameRes"
xmlns:local="clr-namespace:GARbro.GUI"
Title="{x:Static s:guiStrings.TextCreateArchive}" SizeToContent="WidthAndHeight"
UseLayoutRounding="True" Background="{DynamicResource {x:Static SystemColors.ControlBrushKey}}"
ShowInTaskbar="False" WindowStartupLocation="CenterOwner" ResizeMode="NoResize"
MinWidth="300">
2014-07-25 06:58:42 +04:00
<DockPanel VerticalAlignment="Top" Margin="10">
<StackPanel DockPanel.Dock="Bottom" HorizontalAlignment="Right" Orientation="Horizontal" Margin="20,20,0,0">
<Button Name="ButtonOk" Content="{x:Static s:guiStrings.ButtonOK}" Click="Button_Click" IsDefault="True" Width="70" Height="25" Margin="0,0,10,0" IsEnabled="{Binding ElementName=ArchiveFormat, Path=SelectedItem.CanWrite}"/>
2014-07-25 06:58:42 +04:00
<Button Content="{x:Static s:guiStrings.ButtonCancel}" IsCancel="True" Width="70" Height="25" Margin="10,0,0,0"/>
</StackPanel>
<Grid DockPanel.Dock="Top">
<Grid.ColumnDefinitions>
<ColumnDefinition Width="*"/>
<ColumnDefinition Width="Auto"/>
</Grid.ColumnDefinitions>
<Grid.RowDefinitions>
<RowDefinition/>
<RowDefinition/>
</Grid.RowDefinitions>
<Label Target="{Binding ElementName=ArchiveName}" Content="{x:Static s:guiStrings.LabelArchiveName}" Grid.Row="0" Grid.Column="0" Grid.ColumnSpan="2"/>
<local:ExtAutoCompleteBox x:Name="ArchiveName" HorizontalContentAlignment="Stretch" Grid.Column="0" Grid.Row="1"
TextChanged="ArchiveName_TextChanged"/>
<Button Margin="10,0,0,0" VerticalAlignment="Center" Grid.Column="1" Grid.Row="1"
Command="{x:Static local:Commands.Browse}">
<Image Source="{StaticResource IconSearch}" Stretch="Uniform" UseLayoutRounding="True" SnapsToDevicePixels="True" Width="16" Height="16" HorizontalAlignment="Center" VerticalAlignment="Center"/>
</Button>
</Grid>
<Grid DockPanel.Dock="Top" Margin="0,10,0,0">
<Grid.ColumnDefinitions>
<ColumnDefinition Width="Auto"/>
<ColumnDefinition Width="*"/>
</Grid.ColumnDefinitions>
2014-07-25 06:58:42 +04:00
<GroupBox Name="OptionsWidget" Grid.Column="1" Header="{x:Static s:guiStrings.LabelArchiveOptions}"
VerticalAlignment="Stretch" VerticalContentAlignment="Stretch" Padding="5" Visibility="Hidden"/>
<StackPanel Orientation="Vertical" Grid.Column="0" VerticalAlignment="Top" Margin="0,0,10,0">
<Label Content="{x:Static s:guiStrings.LabelArchiveFormat}" Target="{Binding ElementName=ArchiveFormat}" HorizontalAlignment="Left"
Padding="5,0,5,5"/>
<ComboBox Name="ArchiveFormat" SelectedValuePath="Tag" SelectedValue="{Binding Source={x:Static p:Settings.Default}, Path=appArchiveFormat, Mode=TwoWay}"
ItemsSource="{Binding Path=ArcFormats, RelativeSource={RelativeSource FindAncestor, AncestorType={x:Type Window}}, Mode=OneWay}"
SelectionChanged="OnFormatSelect" DisplayMemberPath="Tag"/>
</StackPanel>
</Grid>
</DockPanel>
<Window.CommandBindings>
<CommandBinding Command="{x:Static local:Commands.Browse}" Executed="BrowseExec" CanExecute="CanExecuteAlways"/>
</Window.CommandBindings>
</Window>