mirror of
https://github.com/crskycode/GARbro.git
synced 2025-01-11 12:39:16 +08:00
bind destination to ExtractDialog.Destination property.
This commit is contained in:
parent
9d218a4130
commit
bbcc92acb8
@ -13,7 +13,8 @@
|
|||||||
<RowDefinition Height="41*"/>
|
<RowDefinition Height="41*"/>
|
||||||
</Grid.RowDefinitions>
|
</Grid.RowDefinitions>
|
||||||
<TextBlock x:Name="ExtractLabel" Text="{x:Static s:guiStrings.LabelExtractAllTo}" Margin="10,10,10,0" VerticalAlignment="Top" Height="15"/>
|
<TextBlock x:Name="ExtractLabel" Text="{x:Static s:guiStrings.LabelExtractAllTo}" Margin="10,10,10,0" VerticalAlignment="Top" Height="15"/>
|
||||||
<local:ExtAutoCompleteBox x:Name="DestinationDir" Margin="10,0,41,9" VerticalAlignment="Bottom"/>
|
<local:ExtAutoCompleteBox x:Name="DestinationDir" Margin="10,0,41,9" VerticalAlignment="Bottom"
|
||||||
|
Text="{Binding RelativeSource={RelativeSource AncestorType={x:Type local:ExtractDialog}}, Path=Destination, Mode=TwoWay}"/>
|
||||||
<Button Margin="0,0,10,9" VerticalAlignment="Bottom" HorizontalAlignment="Right"
|
<Button Margin="0,0,10,9" VerticalAlignment="Bottom" HorizontalAlignment="Right"
|
||||||
Command="{x:Static local:Commands.Browse}">
|
Command="{x:Static local:Commands.Browse}">
|
||||||
<Image Source="{StaticResource IconSearch}" Stretch="Uniform" UseLayoutRounding="True" SnapsToDevicePixels="True" Width="16" Height="16" HorizontalAlignment="Center" VerticalAlignment="Center"/>
|
<Image Source="{StaticResource IconSearch}" Stretch="Uniform" UseLayoutRounding="True" SnapsToDevicePixels="True" Width="16" Height="16" HorizontalAlignment="Center" VerticalAlignment="Center"/>
|
||||||
|
@ -46,7 +46,7 @@ namespace GARbro.GUI
|
|||||||
{
|
{
|
||||||
InitializeComponent();
|
InitializeComponent();
|
||||||
ExtractLabel.Text = string.Format (guiStrings.LabelExtractAllTo, filename);
|
ExtractLabel.Text = string.Format (guiStrings.LabelExtractAllTo, filename);
|
||||||
DestinationDir.Text = destination;
|
Destination = destination;
|
||||||
|
|
||||||
ExtractImages.IsChecked = Settings.Default.appExtractImages;
|
ExtractImages.IsChecked = Settings.Default.appExtractImages;
|
||||||
ExtractText.IsChecked = Settings.Default.appExtractText;
|
ExtractText.IsChecked = Settings.Default.appExtractText;
|
||||||
|
@ -39,6 +39,8 @@ namespace GARbro.GUI
|
|||||||
{
|
{
|
||||||
public partial class ExtractDialog : Window
|
public partial class ExtractDialog : Window
|
||||||
{
|
{
|
||||||
|
public string Destination { get; set; }
|
||||||
|
|
||||||
public void InitImageFormats (ComboBox image_format)
|
public void InitImageFormats (ComboBox image_format)
|
||||||
{
|
{
|
||||||
var default_format = Settings.Default.appImageFormat;
|
var default_format = Settings.Default.appImageFormat;
|
||||||
|
@ -11,8 +11,8 @@
|
|||||||
<RowDefinition/>
|
<RowDefinition/>
|
||||||
</Grid.RowDefinitions>
|
</Grid.RowDefinitions>
|
||||||
<TextBlock x:Name="ExtractLabel" Text="{x:Static s:guiStrings.LabelExtractFileTo}" Margin="10,10,9.157,0" VerticalAlignment="Top" Height="15"/>
|
<TextBlock x:Name="ExtractLabel" Text="{x:Static s:guiStrings.LabelExtractFileTo}" Margin="10,10,9.157,0" VerticalAlignment="Top" Height="15"/>
|
||||||
<local:ExtAutoCompleteBox x:Name="DestinationDir" Margin="10,28,0,0"
|
<local:ExtAutoCompleteBox x:Name="DestinationDir" Margin="10,28,0,0" VerticalAlignment="Top" HorizontalAlignment="Left" Width="337"
|
||||||
VerticalAlignment="Top" HorizontalAlignment="Left" Width="337"/>
|
Text="{Binding RelativeSource={RelativeSource AncestorType={x:Type local:ExtractDialog}}, Path=Destination, Mode=TwoWay}"/>
|
||||||
<Button Margin="0,28,10,0" VerticalAlignment="Top" HorizontalAlignment="Right"
|
<Button Margin="0,28,10,0" VerticalAlignment="Top" HorizontalAlignment="Right"
|
||||||
Command="{x:Static local:Commands.Browse}">
|
Command="{x:Static local:Commands.Browse}">
|
||||||
<Image Source="{StaticResource IconSearch}" Stretch="Uniform" UseLayoutRounding="True" SnapsToDevicePixels="True" Width="16" Height="16" HorizontalAlignment="Center" VerticalAlignment="Center"/>
|
<Image Source="{StaticResource IconSearch}" Stretch="Uniform" UseLayoutRounding="True" SnapsToDevicePixels="True" Width="16" Height="16" HorizontalAlignment="Center" VerticalAlignment="Center"/>
|
||||||
|
@ -44,7 +44,7 @@ namespace GARbro.GUI
|
|||||||
{
|
{
|
||||||
InitializeComponent();
|
InitializeComponent();
|
||||||
ExtractLabel.Text = string.Format (guiStrings.LabelExtractFileTo, entry.Name);
|
ExtractLabel.Text = string.Format (guiStrings.LabelExtractFileTo, entry.Name);
|
||||||
DestinationDir.Text = destination;
|
Destination = destination;
|
||||||
if ("image" == entry.Type)
|
if ("image" == entry.Type)
|
||||||
{
|
{
|
||||||
ImageConversionOptions.Visibility = Visibility.Visible;
|
ImageConversionOptions.Visibility = Visibility.Visible;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user