|
@@ -1,76 +1,141 @@
|
|
|
-<UserControl x:Class="PDF_Master.Views.Dialog.ConverterDialogs.ConverterExcelDialog"
|
|
|
- xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
|
|
|
- xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
|
|
|
- xmlns:cus="clr-namespace:PDF_Master.CustomControl"
|
|
|
- xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
|
|
|
- xmlns:i="http://schemas.microsoft.com/xaml/behaviors"
|
|
|
- xmlns:local="clr-namespace:PDF_Master.Views.Dialog.PageEditDialogs"
|
|
|
- xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
|
|
|
- xmlns:pageeditdialogs="clr-namespace:PDF_Master.ViewModels.Dialog.PageEditDialogs"
|
|
|
- xmlns:prism="http://prismlibrary.com/"
|
|
|
- Width="586"
|
|
|
- Height="522"
|
|
|
- d:DataContext="{d:DesignInstance Type=pageeditdialogs:ExtractDialogViewModel}"
|
|
|
- d:DesignHeight="522"
|
|
|
- d:DesignWidth="586"
|
|
|
- prism:Dialog.WindowStyle="{StaticResource DialogWindowStyle}"
|
|
|
- prism:ViewModelLocator.AutoWireViewModel="True"
|
|
|
- mc:Ignorable="d">
|
|
|
+<UserControl
|
|
|
+ x:Class="PDF_Master.Views.Dialog.ConverterDialogs.ConverterExcelDialog"
|
|
|
+ xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
|
|
|
+ xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
|
|
|
+ xmlns:cus="clr-namespace:PDF_Master.CustomControl"
|
|
|
+ xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
|
|
|
+ xmlns:i="http://schemas.microsoft.com/xaml/behaviors"
|
|
|
+ xmlns:local="clr-namespace:PDF_Master.Views.Dialog.PageEditDialogs"
|
|
|
+ xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
|
|
|
+ xmlns:pageeditdialogs="clr-namespace:PDF_Master.ViewModels.Dialog.PageEditDialogs"
|
|
|
+ xmlns:prism="http://prismlibrary.com/"
|
|
|
+ Width="586"
|
|
|
+ Height="522"
|
|
|
+ d:DataContext="{d:DesignInstance Type=pageeditdialogs:ExtractDialogViewModel}"
|
|
|
+ d:DesignHeight="522"
|
|
|
+ d:DesignWidth="586"
|
|
|
+ prism:Dialog.WindowStyle="{StaticResource DialogWindowStyle}"
|
|
|
+ prism:ViewModelLocator.AutoWireViewModel="True"
|
|
|
+ mc:Ignorable="d">
|
|
|
<cus:DialogContent Header="{Binding T_Title}">
|
|
|
<cus:DialogContent.Content>
|
|
|
<Grid Grid.Row="1">
|
|
|
<Grid.ColumnDefinitions>
|
|
|
- <ColumnDefinition Width="244"/>
|
|
|
- <ColumnDefinition Width="*"/>
|
|
|
+ <ColumnDefinition Width="244" />
|
|
|
+ <ColumnDefinition Width="*" />
|
|
|
</Grid.ColumnDefinitions>
|
|
|
<Grid Grid.Column="0">
|
|
|
- <cus:PageTurningPreview x:Name="ConverterPreview" Loaded="ConverterPreview_Loaded" VerticalAlignment="Top"></cus:PageTurningPreview>
|
|
|
+ <cus:PageTurningPreview
|
|
|
+ x:Name="ConverterPreview"
|
|
|
+ VerticalAlignment="Top"
|
|
|
+ Loaded="ConverterPreview_Loaded" />
|
|
|
</Grid>
|
|
|
<Grid Grid.Column="1">
|
|
|
- <StackPanel Orientation="Vertical" Margin="0,2,0,0">
|
|
|
+ <StackPanel Margin="0,2,0,0" Orientation="Vertical">
|
|
|
<StackPanel Orientation="Vertical">
|
|
|
- <TextBlock Text="{Binding T_Settings}" Height="20" Style="{StaticResource PropertyHeaderLv2}"/>
|
|
|
- <StackPanel Orientation="Vertical" Margin="0,10,0,0">
|
|
|
- <RadioButton Name="AnyContentRadioBtn" Command="{Binding RadioButtonCommand}" CommandParameter="{Binding ElementName=AnyContentRadioBtn,Path=Name}" IsChecked="True"
|
|
|
- Style="{StaticResource RadioButtonStyleText}">
|
|
|
- <TextBlock Text="{Binding T_AllContents}"/>
|
|
|
+ <TextBlock
|
|
|
+ Height="20"
|
|
|
+ Style="{StaticResource PropertyHeaderLv2}"
|
|
|
+ Text="{Binding T_Settings}" />
|
|
|
+ <StackPanel Margin="0,10,0,0" Orientation="Vertical">
|
|
|
+ <RadioButton
|
|
|
+ Name="AnyContentRadioBtn"
|
|
|
+ Command="{Binding RadioButtonCommand}"
|
|
|
+ CommandParameter="{Binding ElementName=AnyContentRadioBtn, Path=Name}"
|
|
|
+ IsChecked="True"
|
|
|
+ Style="{StaticResource RadioButtonStyleText}">
|
|
|
+ <TextBlock Text="{Binding T_AllContents}" />
|
|
|
</RadioButton>
|
|
|
- <ComboBox Margin="0,8,0,0" Width="326" Height="32" HorizontalAlignment="Left" IsEnabled="{Binding ElementName=AnyContentRadioBtn,Path=IsChecked}" SelectedIndex="{Binding AnyContentSelectIndex}" >
|
|
|
- <ComboBoxItem Content="{Binding T_EachPageAllContents}"/>
|
|
|
- <ComboBoxItem Content="{Binding T_FileAllContents}"/>
|
|
|
+ <ComboBox
|
|
|
+ Width="326"
|
|
|
+ Height="32"
|
|
|
+ Margin="0,8,0,0"
|
|
|
+ HorizontalAlignment="Left"
|
|
|
+ IsEnabled="{Binding ElementName=AnyContentRadioBtn, Path=IsChecked}"
|
|
|
+ SelectedIndex="{Binding AnyContentSelectIndex}">
|
|
|
+ <ComboBoxItem Content="{Binding T_EachPageAllContents}" />
|
|
|
+ <ComboBoxItem Content="{Binding T_FileAllContents}" />
|
|
|
</ComboBox>
|
|
|
- <RadioButton Margin="0,8,0,0" Name="OnlyTableRadioBtn" Command="{Binding RadioButtonCommand}" CommandParameter="{Binding ElementName=OnlyTableRadioBtn,Path=Name}" Padding="8,0,0,0"
|
|
|
- Style="{StaticResource RadioButtonStyleText}">
|
|
|
- <TextBlock Text="{Binding T_OnlyTables}"/>
|
|
|
+ <RadioButton
|
|
|
+ Name="OnlyTableRadioBtn"
|
|
|
+ Margin="0,8,0,0"
|
|
|
+ Padding="8,0,0,0"
|
|
|
+ Command="{Binding RadioButtonCommand}"
|
|
|
+ CommandParameter="{Binding ElementName=OnlyTableRadioBtn, Path=Name}"
|
|
|
+ Style="{StaticResource RadioButtonStyleText}">
|
|
|
+ <TextBlock Text="{Binding T_OnlyTables}" />
|
|
|
</RadioButton>
|
|
|
- <ComboBox Name="OnlyTableComboBox" Margin="0,8,0,0" Width="326" Height="32" HorizontalAlignment="Left" IsEnabled="{Binding ElementName=OnlyTableRadioBtn,Path=IsChecked}" SelectedIndex="{Binding OnlyTableSelectIndex}">
|
|
|
- <ComboBoxItem Content="{Binding T_EachTableOnlyTables}"/>
|
|
|
- <ComboBoxItem Content="{Binding T_EachPageOnlyTables}"/>
|
|
|
- <ComboBoxItem Content="{Binding T_FileOnlyTables}"/>
|
|
|
+ <ComboBox
|
|
|
+ Name="OnlyTableComboBox"
|
|
|
+ Width="326"
|
|
|
+ Height="32"
|
|
|
+ Margin="0,8,0,0"
|
|
|
+ HorizontalAlignment="Left"
|
|
|
+ IsEnabled="{Binding ElementName=OnlyTableRadioBtn, Path=IsChecked}"
|
|
|
+ SelectedIndex="{Binding OnlyTableSelectIndex}">
|
|
|
+ <ComboBoxItem Content="{Binding T_EachTableOnlyTables}" />
|
|
|
+ <ComboBoxItem Content="{Binding T_EachPageOnlyTables}" />
|
|
|
+ <ComboBoxItem Content="{Binding T_FileOnlyTables}" />
|
|
|
</ComboBox>
|
|
|
- <RadioButton Margin="0,8,0,0" Name="OnlyTextRadioBtn" Command="{Binding RadioButtonCommand}" CommandParameter="{Binding ElementName=OnlyTextRadioBtn,Path=Name}" Padding="8,0,0,0"
|
|
|
- Style="{StaticResource RadioButtonStyleText}">
|
|
|
- <TextBlock Text="{Binding T_OnlyText}"></TextBlock>
|
|
|
+ <RadioButton
|
|
|
+ Name="OnlyTextRadioBtn"
|
|
|
+ Margin="0,8,0,0"
|
|
|
+ Padding="8,0,0,0"
|
|
|
+ Command="{Binding RadioButtonCommand}"
|
|
|
+ CommandParameter="{Binding ElementName=OnlyTextRadioBtn, Path=Name}"
|
|
|
+ Style="{StaticResource RadioButtonStyleText}">
|
|
|
+ <TextBlock Text="{Binding T_OnlyText}" />
|
|
|
</RadioButton>
|
|
|
</StackPanel>
|
|
|
</StackPanel>
|
|
|
- <StackPanel Orientation="Vertical" Margin="0,18,0,0">
|
|
|
- <StackPanel Orientation="Vertical" Visibility="Visible" IsEnabled="{Binding OCRIsEnable}">
|
|
|
- <TextBlock Text="Text Recognition Settings:" HorizontalAlignment="Left" Height="20" Style="{StaticResource PropertyHeaderLv2}"/>
|
|
|
- <CheckBox Name="OCRCheckBox" Margin="0,10,0,0" IsChecked="{Binding OCRCheckBoxIsCheckBox}" Padding="8,0,0,0" >
|
|
|
- <TextBlock Text="Recognize text if needed"/>
|
|
|
+ <StackPanel Margin="0,18,0,0" Orientation="Vertical">
|
|
|
+ <StackPanel
|
|
|
+ IsEnabled="{Binding OCRIsEnable}"
|
|
|
+ Orientation="Vertical"
|
|
|
+ Visibility="Visible">
|
|
|
+ <TextBlock
|
|
|
+ Height="20"
|
|
|
+ HorizontalAlignment="Left"
|
|
|
+ Style="{StaticResource PropertyHeaderLv2}"
|
|
|
+ Text="Text Recognition Settings:" />
|
|
|
+ <CheckBox
|
|
|
+ Name="OCRCheckBox"
|
|
|
+ Margin="0,10,0,0"
|
|
|
+ Padding="8,0,0,0"
|
|
|
+ IsChecked="{Binding OCRCheckBoxIsCheckBox}">
|
|
|
+ <TextBlock Text="Recognize text if needed" />
|
|
|
</CheckBox>
|
|
|
- <ComboBox IsEnabled="{Binding ElementName=OCRCheckBox,Path=IsChecked}" Margin="0,8,0,0" Width="326" Height="32" HorizontalAlignment="Left" SelectedIndex="{Binding LanguageSelectedIndex}">
|
|
|
- <ComboBoxItem Content="Chinese Simplified"/>
|
|
|
- <ComboBoxItem Content="Chinese Traditional"/>
|
|
|
- <ComboBoxItem Content="English"/>
|
|
|
- <ComboBoxItem Content="Japanese"/>
|
|
|
- <ComboBoxItem Content="Korean"/>
|
|
|
+ <ComboBox
|
|
|
+ Width="326"
|
|
|
+ Height="32"
|
|
|
+ Margin="0,8,0,0"
|
|
|
+ HorizontalAlignment="Left"
|
|
|
+ IsEnabled="{Binding ElementName=OCRCheckBox, Path=IsChecked}"
|
|
|
+ SelectedIndex="{Binding LanguageSelectedIndex}">
|
|
|
+ <ComboBoxItem Content="Chinese Simplified" />
|
|
|
+ <ComboBoxItem Content="Chinese Traditional" />
|
|
|
+ <ComboBoxItem Content="English" />
|
|
|
+ <ComboBoxItem Content="Japanese" />
|
|
|
+ <ComboBoxItem Content="Korean" />
|
|
|
</ComboBox>
|
|
|
</StackPanel>
|
|
|
- <StackPanel Orientation="Vertical" Margin="0,18,0,0">
|
|
|
- <TextBlock Text="{Binding T_PageRange}" Height="20" HorizontalAlignment="Left" Style="{StaticResource PropertyHeaderLv2}"/>
|
|
|
- <cus:WritableComboBox x:Name="PageRangeComboBox" Margin="0,10,0,0" Width="326" Height="32" HorizontalAlignment="Left" IsCurrentPage="True" Text="{Binding PageRangeText, Mode=TwoWay}" SelectedIndex="{Binding PageRangeSelectIndex, Mode=TwoWay}" MaxPageRange="{Binding MaxPageRange}" Loaded="PageRangeComboBox_Loaded">
|
|
|
+ <StackPanel Margin="0,18,0,0" Orientation="Vertical">
|
|
|
+ <TextBlock
|
|
|
+ Height="20"
|
|
|
+ HorizontalAlignment="Left"
|
|
|
+ Style="{StaticResource PropertyHeaderLv2}"
|
|
|
+ Text="{Binding T_PageRange}" />
|
|
|
+ <cus:WritableComboBox
|
|
|
+ x:Name="PageRangeComboBox"
|
|
|
+ Width="326"
|
|
|
+ Height="32"
|
|
|
+ Margin="0,10,0,0"
|
|
|
+ HorizontalAlignment="Left"
|
|
|
+ IsCurrentPage="True"
|
|
|
+ Loaded="PageRangeComboBox_Loaded"
|
|
|
+ MaxPageRange="{Binding MaxPageRange}"
|
|
|
+ SelectedIndex="{Binding PageRangeSelectIndex, Mode=TwoWay}"
|
|
|
+ Text="{Binding PageRangeText, Mode=TwoWay}">
|
|
|
<i:Interaction.Triggers>
|
|
|
<i:EventTrigger EventName="SelectionChanged">
|
|
|
<i:InvokeCommandAction Command="{Binding CmbPageSelectionChanged}" CommandParameter="{Binding ElementName=ConverterPreview}" />
|
|
@@ -78,8 +143,8 @@
|
|
|
<i:EventTrigger EventName="TextChanged">
|
|
|
<i:InvokeCommandAction Command="{Binding CmbPageTextChanged}" CommandParameter="{Binding ElementName=ConverterPreview}" />
|
|
|
</i:EventTrigger>
|
|
|
- <i:KeyTrigger FiredOn="KeyDown" Key="Return">
|
|
|
- <i:InvokeCommandAction Command="{Binding SetCustomPageRangeCommand}" ></i:InvokeCommandAction>
|
|
|
+ <i:KeyTrigger Key="Return" FiredOn="KeyDown">
|
|
|
+ <i:InvokeCommandAction Command="{Binding SetCustomPageRangeCommand}" />
|
|
|
</i:KeyTrigger>
|
|
|
</i:Interaction.Triggers>
|
|
|
</cus:WritableComboBox>
|
|
@@ -87,47 +152,63 @@
|
|
|
</StackPanel>
|
|
|
</StackPanel>
|
|
|
</Grid>
|
|
|
- <StackPanel Orientation="Horizontal" Width="245" Panel.ZIndex="2" Grid.ColumnSpan="2" Height="20" HorizontalAlignment="Right" VerticalAlignment="Bottom" Margin="0,0,16,8" Visibility="{Binding LimitationsConvertVisible}">
|
|
|
- <Grid Width="16" Height="16" >
|
|
|
- <Ellipse Width="13" Height="13" Fill="white" Stroke="#CED0D4"/>
|
|
|
- <Path Data="M7.4701 8.91H8.5001L8.7601 5.49L8.8101 4H7.1601L7.2101 5.49L7.4701 8.91ZM7.9901 11.58C8.4901 11.58 8.8701 11.21 8.8701 10.69C8.8701 10.17 8.4901 9.81 7.9901 9.81C7.4801 9.81 7.1001 10.17 7.1001 10.69C7.1001 11.21 7.4701 11.58 7.9901 11.58Z" Fill="#94989C"/>
|
|
|
+ <StackPanel
|
|
|
+ Grid.ColumnSpan="2"
|
|
|
+ Height="20"
|
|
|
+ Margin="0,0,16,8"
|
|
|
+ HorizontalAlignment="Right"
|
|
|
+ VerticalAlignment="Bottom"
|
|
|
+ Panel.ZIndex="2"
|
|
|
+ Orientation="Horizontal"
|
|
|
+ Visibility="{Binding LimitationsConvertVisible}">
|
|
|
+ <Grid Width="16" Height="16">
|
|
|
+ <Ellipse
|
|
|
+ Width="13"
|
|
|
+ Height="13"
|
|
|
+ Fill="white"
|
|
|
+ Stroke="#CED0D4" />
|
|
|
+ <Path Data="M7.4701 8.91H8.5001L8.7601 5.49L8.8101 4H7.1601L7.2101 5.49L7.4701 8.91ZM7.9901 11.58C8.4901 11.58 8.8701 11.21 8.8701 10.69C8.8701 10.17 8.4901 9.81 7.9901 9.81C7.4801 9.81 7.1001 10.17 7.1001 10.69C7.1001 11.21 7.4701 11.58 7.9901 11.58Z" Fill="#94989C" />
|
|
|
</Grid>
|
|
|
- <TextBlock
|
|
|
- Margin="4,0,0,0"
|
|
|
- FontFamily="Segoe UI"
|
|
|
- FontSize="12"
|
|
|
- Foreground="#94989C"
|
|
|
- Text="First 10 pages for free conversion."
|
|
|
+ <TextBlock
|
|
|
+ Height="20"
|
|
|
+ Margin="4,0,0,0"
|
|
|
+ FontFamily="Segoe UI"
|
|
|
+ FontSize="12"
|
|
|
+ Foreground="#252629"
|
|
|
+ Text="First 10 pages for free conversion." />
|
|
|
+ <TextBlock
|
|
|
Height="20"
|
|
|
- />
|
|
|
- <TextBlock FontFamily="Segoe UI"
|
|
|
- FontSize="12" Height="20" Foreground="{StaticResource color.light.blue.5}">
|
|
|
+ Margin="8,0,0,0"
|
|
|
+ FontFamily="Segoe UI"
|
|
|
+ FontSize="12"
|
|
|
+ Foreground="{StaticResource color.light.blue.5}">
|
|
|
<i:Interaction.Triggers>
|
|
|
- <i:EventTrigger EventName="MouseDown">
|
|
|
- <i:InvokeCommandAction Command="{Binding UnlockMouseDownCommand}" />
|
|
|
- </i:EventTrigger>
|
|
|
+ <i:EventTrigger EventName="MouseDown">
|
|
|
+ <i:InvokeCommandAction Command="{Binding UnlockMouseDownCommand}" />
|
|
|
+ </i:EventTrigger>
|
|
|
</i:Interaction.Triggers>
|
|
|
- <Underline >
|
|
|
- <TextBlock Text="{Binding TextUpgrade}"/>
|
|
|
- </Underline>
|
|
|
+ <Underline>
|
|
|
+ <TextBlock Text="{Binding TextUpgrade}" />
|
|
|
+ </Underline>
|
|
|
</TextBlock>
|
|
|
</StackPanel>
|
|
|
</Grid>
|
|
|
</cus:DialogContent.Content>
|
|
|
<cus:DialogContent.BottmBar>
|
|
|
<Grid>
|
|
|
- <!--<Button Background="WhiteSmoke" Width="98" Height="32" Margin="0,0,400,0" Command="{Binding BatchConverterCommand}" Style="{StaticResource btn.sec}">
|
|
|
- <Border>
|
|
|
- <TextBlock Text="批量处理" ></TextBlock>
|
|
|
- </Border>
|
|
|
+ <!--<Button Background="WhiteSmoke" Width="98" Height="32" Margin="0,0,400,0" Command="{Binding BatchConverterCommand}" Style="{StaticResource btn.sec}">
|
|
|
+ <Border>
|
|
|
+ <TextBlock Text="批量处理" ></TextBlock>
|
|
|
+ </Border>
|
|
|
</Button>-->
|
|
|
<Button
|
|
|
Width="98"
|
|
|
Height="32"
|
|
|
Margin="0,0,16,0"
|
|
|
HorizontalAlignment="Right"
|
|
|
- Content="{Binding T_No}"
|
|
|
- Command="{Binding CancelCommand}" Style="{StaticResource btn.sec}">
|
|
|
+ Command="{Binding CancelCommand}"
|
|
|
+ Content="{Binding T_No}"
|
|
|
+ Style="{StaticResource btn.sec}">
|
|
|
<i:Interaction.Triggers>
|
|
|
<i:EventTrigger EventName="PreviewMouseDown">
|
|
|
<i:InvokeCommandAction Command="{Binding PreviewCancelDownCommand}" CommandParameter="{Binding ElementName=PageRangeComboBox}" />
|
|
@@ -139,8 +220,9 @@
|
|
|
Height="32"
|
|
|
Margin="124,0"
|
|
|
HorizontalAlignment="Right"
|
|
|
- Content="{Binding T_YES}"
|
|
|
- Command = "{Binding ConverterCommnad}" Style="{StaticResource Btn.cta}"/>
|
|
|
+ Command="{Binding ConverterCommnad}"
|
|
|
+ Content="{Binding T_YES}"
|
|
|
+ Style="{StaticResource Btn.cta}" />
|
|
|
</Grid>
|
|
|
</cus:DialogContent.BottmBar>
|
|
|
</cus:DialogContent>
|