ConverterExcelDialog.xaml 11 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147
  1. <UserControl x:Class="PDF_Master.Views.Dialog.ConverterDialogs.ConverterExcelDialog"
  2. xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
  3. xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
  4. xmlns:cus="clr-namespace:PDF_Master.CustomControl"
  5. xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
  6. xmlns:i="http://schemas.microsoft.com/xaml/behaviors"
  7. xmlns:local="clr-namespace:PDF_Master.Views.Dialog.PageEditDialogs"
  8. xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
  9. xmlns:pageeditdialogs="clr-namespace:PDF_Master.ViewModels.Dialog.PageEditDialogs"
  10. xmlns:prism="http://prismlibrary.com/"
  11. Width="586"
  12. Height="522"
  13. d:DataContext="{d:DesignInstance Type=pageeditdialogs:ExtractDialogViewModel}"
  14. d:DesignHeight="522"
  15. d:DesignWidth="586"
  16. prism:Dialog.WindowStyle="{StaticResource DialogWindowStyle}"
  17. prism:ViewModelLocator.AutoWireViewModel="True"
  18. mc:Ignorable="d">
  19. <cus:DialogContent Header="{Binding T_Title}">
  20. <cus:DialogContent.Content>
  21. <Grid Grid.Row="1">
  22. <Grid.ColumnDefinitions>
  23. <ColumnDefinition Width="244"/>
  24. <ColumnDefinition Width="*"/>
  25. </Grid.ColumnDefinitions>
  26. <Grid Grid.Column="0">
  27. <cus:PageTurningPreview x:Name="ConverterPreview" Loaded="ConverterPreview_Loaded" VerticalAlignment="Top"></cus:PageTurningPreview>
  28. </Grid>
  29. <Grid Grid.Column="1">
  30. <StackPanel Orientation="Vertical" Margin="0,2,0,0">
  31. <StackPanel Orientation="Vertical">
  32. <TextBlock Text="{Binding T_Settings}" Height="20" Style="{StaticResource PropertyHeaderLv2}"/>
  33. <StackPanel Orientation="Vertical" Margin="0,10,0,0">
  34. <RadioButton Name="AnyContentRadioBtn" Command="{Binding RadioButtonCommand}" CommandParameter="{Binding ElementName=AnyContentRadioBtn,Path=Name}" IsChecked="True"
  35. Style="{StaticResource RadioButtonStyleText}">
  36. <TextBlock Text="{Binding T_AllContents}"/>
  37. </RadioButton>
  38. <ComboBox Margin="0,8,0,0" Width="326" Height="32" HorizontalAlignment="Left" IsEnabled="{Binding ElementName=AnyContentRadioBtn,Path=IsChecked}" SelectedIndex="{Binding AnyContentSelectIndex}" >
  39. <ComboBoxItem Content="{Binding T_EachPageAllContents}"/>
  40. <ComboBoxItem Content="{Binding T_FileAllContents}"/>
  41. </ComboBox>
  42. <RadioButton Margin="0,8,0,0" Name="OnlyTableRadioBtn" Command="{Binding RadioButtonCommand}" CommandParameter="{Binding ElementName=OnlyTableRadioBtn,Path=Name}" Padding="8,0,0,0"
  43. Style="{StaticResource RadioButtonStyleText}">
  44. <TextBlock Text="{Binding T_OnlyTables}"/>
  45. </RadioButton>
  46. <ComboBox Name="OnlyTableComboBox" Margin="0,8,0,0" Width="326" Height="32" HorizontalAlignment="Left" IsEnabled="{Binding ElementName=OnlyTableRadioBtn,Path=IsChecked}" SelectedIndex="{Binding OnlyTableSelectIndex}">
  47. <ComboBoxItem Content="{Binding T_EachTableOnlyTables}"/>
  48. <ComboBoxItem Content="{Binding T_EachPageOnlyTables}"/>
  49. <ComboBoxItem Content="{Binding T_FileOnlyTables}"/>
  50. </ComboBox>
  51. <RadioButton Margin="0,8,0,0" Name="OnlyTextRadioBtn" Command="{Binding RadioButtonCommand}" CommandParameter="{Binding ElementName=OnlyTextRadioBtn,Path=Name}" Padding="8,0,0,0"
  52. Style="{StaticResource RadioButtonStyleText}">
  53. <TextBlock Text="{Binding T_OnlyText}"></TextBlock>
  54. </RadioButton>
  55. </StackPanel>
  56. </StackPanel>
  57. <StackPanel Orientation="Vertical" Margin="0,18,0,0">
  58. <StackPanel Orientation="Vertical" Visibility="Visible" IsEnabled="{Binding OCRIsEnable}">
  59. <TextBlock Text="Text Recognition Settings:" HorizontalAlignment="Left" Height="20" Style="{StaticResource PropertyHeaderLv2}"/>
  60. <CheckBox Name="OCRCheckBox" Margin="0,10,0,0" IsChecked="{Binding OCRCheckBoxIsCheckBox}" Padding="8,0,0,0" >
  61. <TextBlock Text="Recognize text if needed"/>
  62. </CheckBox>
  63. <ComboBox IsEnabled="{Binding ElementName=OCRCheckBox,Path=IsChecked}" Margin="0,8,0,0" Width="326" Height="32" HorizontalAlignment="Left" SelectedIndex="{Binding LanguageSelectedIndex}">
  64. <ComboBoxItem Content="Chinese Simplified"/>
  65. <ComboBoxItem Content="Chinese Traditional"/>
  66. <ComboBoxItem Content="English"/>
  67. <ComboBoxItem Content="Japanese"/>
  68. <ComboBoxItem Content="Korean"/>
  69. </ComboBox>
  70. </StackPanel>
  71. <StackPanel Orientation="Vertical" Margin="0,18,0,0">
  72. <TextBlock Text="{Binding T_PageRange}" Height="20" HorizontalAlignment="Left" Style="{StaticResource PropertyHeaderLv2}"/>
  73. <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">
  74. <i:Interaction.Triggers>
  75. <i:EventTrigger EventName="SelectionChanged">
  76. <i:InvokeCommandAction Command="{Binding CmbPageSelectionChanged}" CommandParameter="{Binding ElementName=ConverterPreview}" />
  77. </i:EventTrigger>
  78. <i:EventTrigger EventName="TextChanged">
  79. <i:InvokeCommandAction Command="{Binding CmbPageTextChanged}" CommandParameter="{Binding ElementName=ConverterPreview}" />
  80. </i:EventTrigger>
  81. <i:KeyTrigger FiredOn="KeyDown" Key="Return">
  82. <i:InvokeCommandAction Command="{Binding SetCustomPageRangeCommand}" ></i:InvokeCommandAction>
  83. </i:KeyTrigger>
  84. </i:Interaction.Triggers>
  85. </cus:WritableComboBox>
  86. </StackPanel>
  87. </StackPanel>
  88. </StackPanel>
  89. </Grid>
  90. <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}">
  91. <Grid Width="16" Height="16" >
  92. <Ellipse Width="13" Height="13" Fill="white" Stroke="#CED0D4"/>
  93. <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"/>
  94. </Grid>
  95. <TextBlock
  96. Margin="4,0,0,0"
  97. FontFamily="Segoe UI"
  98. FontSize="12"
  99. Foreground="#94989C"
  100. Text="First 10 pages for free conversion."
  101. Height="20"
  102. />
  103. <TextBlock FontFamily="Segoe UI"
  104. FontSize="12" Height="20" Foreground="{StaticResource color.light.blue.5}">
  105. <i:Interaction.Triggers>
  106. <i:EventTrigger EventName="MouseDown">
  107. <i:InvokeCommandAction Command="{Binding UnlockMouseDownCommand}" />
  108. </i:EventTrigger>
  109. </i:Interaction.Triggers>
  110. <Underline >
  111. <TextBlock Text="Unlock"/>
  112. </Underline>
  113. </TextBlock>
  114. </StackPanel>
  115. </Grid>
  116. </cus:DialogContent.Content>
  117. <cus:DialogContent.BottmBar>
  118. <Grid>
  119. <!--<Button Background="WhiteSmoke" Width="98" Height="32" Margin="0,0,400,0" Command="{Binding BatchConverterCommand}" Style="{StaticResource btn.sec}">
  120. <Border>
  121. <TextBlock Text="批量处理" ></TextBlock>
  122. </Border>
  123. </Button>-->
  124. <Button
  125. Width="98"
  126. Height="32"
  127. Margin="0,0,16,0"
  128. HorizontalAlignment="Right"
  129. Content="{Binding T_No}"
  130. Command="{Binding CancelCommand}" Style="{StaticResource btn.sec}">
  131. <i:Interaction.Triggers>
  132. <i:EventTrigger EventName="PreviewMouseDown">
  133. <i:InvokeCommandAction Command="{Binding PreviewCancelDownCommand}" CommandParameter="{Binding ElementName=PageRangeComboBox}" />
  134. </i:EventTrigger>
  135. </i:Interaction.Triggers>
  136. </Button>
  137. <Button
  138. Width="98"
  139. Height="32"
  140. Margin="124,0"
  141. HorizontalAlignment="Right"
  142. Content="{Binding T_YES}"
  143. Command = "{Binding ConverterCommnad}" Style="{StaticResource Btn.cta}"/>
  144. </Grid>
  145. </cus:DialogContent.BottmBar>
  146. </cus:DialogContent>
  147. </UserControl>