ConverterPPTDialog.xaml 5.8 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788
  1. <UserControl x:Class="PDF_Office.Views.Dialog.ConverterDialogs.ConverterPPTDialog"
  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_Office.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_Office.Views.Dialog.PageEditDialogs"
  8. xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
  9. xmlns:pageeditdialogs="clr-namespace:PDF_Office.ViewModels.Dialog.PageEditDialogs"
  10. xmlns:prism="http://prismlibrary.com/" xmlns:converterdialogs="clr-namespace:PDF_Office.ViewModels.Dialog.ConverterDialogs"
  11. Width="468"
  12. Height="454"
  13. d:DataContext="{d:DesignInstance Type=converterdialogs:ConverterPPTDialogViewModel}"
  14. d:DesignHeight="454"
  15. d:DesignWidth="468"
  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="212"/>
  24. <ColumnDefinition Width="*"/>
  25. </Grid.ColumnDefinitions>
  26. <Grid Grid.Column="0" VerticalAlignment="Top">
  27. <cus:PageTurningPreview x:Name="ConverterPreview" Loaded="ConverterPreview_Loaded"></cus:PageTurningPreview>
  28. </Grid>
  29. <Grid Grid.Column="1">
  30. <StackPanel Orientation="Vertical" Margin="16,2,0,0">
  31. <StackPanel Orientation="Vertical" Visibility="Collapsed">
  32. <TextBlock Text="PPT Recognition Settings" HorizontalAlignment="Left" Style="{StaticResource PropertyHeaderLv2}" Height="20"/>
  33. <CheckBox Name="OCRCheckBox" Margin="0,10,0,0" IsChecked="{Binding OCRCheckBoxIsCheckBox}" Padding="8,0,0,0">
  34. <TextBlock Text="Recognize text if needed"/>
  35. </CheckBox>
  36. <ComboBox IsEnabled="{Binding ElementName=OCRCheckBox,Path=IsChecked}" Margin="0,8,0,0" Width="228" Height="32" HorizontalAlignment="Left" SelectedIndex="{Binding LanguageSelectedIndex}">
  37. <ComboBoxItem Content="Chinese Simplified"/>
  38. <ComboBoxItem Content="Chinese Traditional"/>
  39. <ComboBoxItem Content="English"/>
  40. <ComboBoxItem Content="Japan"/>
  41. <ComboBoxItem Content="Korean"/>
  42. </ComboBox>
  43. </StackPanel>
  44. <StackPanel Orientation="Vertical" Margin="0,0,0,0">
  45. <TextBlock Text="Page Range" Height="20" Style="{StaticResource PropertyHeaderLv2}" HorizontalAlignment="Left"/>
  46. <cus:WritableComboBox x:Name="PageRangeComboBox" Margin="0,10,0,0" Width="228" Height="32" HorizontalAlignment="Left" IsCurrentPage="True" Text="{Binding PageRangeText, Mode=TwoWay}" SelectedIndex="{Binding PageRangeSelectIndex, Mode=TwoWay}" MaxPageRange="{Binding MaxPageRange}" Loaded="PageRangeComboBox_Loaded">
  47. <i:Interaction.Triggers>
  48. <i:EventTrigger EventName="SelectionChanged">
  49. <i:InvokeCommandAction Command="{Binding CmbPageSelectionChanged}" CommandParameter="{Binding ElementName=ConverterPreview}" />
  50. </i:EventTrigger>
  51. <i:EventTrigger EventName="TextChanged">
  52. <i:InvokeCommandAction Command="{Binding CmbPageTextChanged}" CommandParameter="{Binding ElementName=ConverterPreview}" />
  53. </i:EventTrigger>
  54. <i:KeyTrigger FiredOn="KeyDown" Key="Return">
  55. <i:InvokeCommandAction Command="{Binding SetCustomPageRangeCommand}" ></i:InvokeCommandAction>
  56. </i:KeyTrigger>
  57. </i:Interaction.Triggers>
  58. </cus:WritableComboBox>
  59. </StackPanel>
  60. </StackPanel>
  61. </Grid>
  62. </Grid>
  63. </cus:DialogContent.Content>
  64. <cus:DialogContent.BottmBar>
  65. <Grid>
  66. <!--<Button Background="WhiteSmoke" Width="98" Height="32" Margin="0,0,350,0" Command="{Binding BatchConverterCommand}" Style="{StaticResource btn.sec}">
  67. <Border>
  68. <TextBlock Text="批量处理" ></TextBlock>
  69. </Border>
  70. </Button>-->
  71. <Button
  72. Width="98"
  73. Height="32"
  74. Margin="0,0,16,0"
  75. HorizontalAlignment="Right"
  76. Content="{Binding T_No}"
  77. Command="{Binding CancelCommand}" Style="{StaticResource btn.sec}"/>
  78. <Button
  79. Width="98"
  80. Height="32"
  81. Margin="124,0"
  82. HorizontalAlignment="Right"
  83. Content="{Binding T_YES}"
  84. Command = "{Binding ConverterCommnad}" Style="{StaticResource Btn.cta}"/>
  85. </Grid>
  86. </cus:DialogContent.BottmBar>
  87. </cus:DialogContent>
  88. </UserControl>