ConverterRTFDialog.xaml 8.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133
  1. <UserControl x:Class="PDF_Master.Views.Dialog.ConverterDialogs.ConverterRTFDialog"
  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/" xmlns:converterdialogs="clr-namespace:PDF_Master.ViewModels.Dialog.ConverterDialogs"
  11. Width="468"
  12. Height="478"
  13. d:DataContext="{d:DesignInstance Type=converterdialogs:ConverterRTFDialogViewModel}"
  14. d:DesignHeight="478"
  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="244"/>
  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="0,2,0,0">
  31. <StackPanel Orientation="Vertical" Visibility="Visible">
  32. <TextBlock Text="RTF Recognition Settings" HorizontalAlignment="Left" Style="{StaticResource PropertyHeaderLv2}" Height="20"/>
  33. <CheckBox Name="OCRCheckBox" Margin="0,10,0,0" Command="{Binding OpenOCRCommand}" 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,8" Width="208" Height="32" HorizontalAlignment="Left" SelectedIndex="{Binding LanguageSelectedIndex}">
  37. <ComboBoxItem Content="Chinese Simplified"/>
  38. <ComboBoxItem Content="Chinese Traditional"/>
  39. <ComboBoxItem Content="English"/>
  40. <ComboBoxItem Content="Japanese"/>
  41. <ComboBoxItem Content="Korean"/>
  42. </ComboBox>
  43. </StackPanel>
  44. <StackPanel Orientation="Vertical" Margin="0,0,0,0">
  45. <TextBlock Text="{Binding T_PageRange}" Height="20" Style="{StaticResource PropertyHeaderLv2}" HorizontalAlignment="Left"/>
  46. <cus:WritableComboBox x:Name="PageRangeComboBox" Margin="0,10,0,0" Width="208" 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. <StackPanel
  63. Grid.ColumnSpan="2"
  64. Height="20"
  65. Margin="0,0,16,8"
  66. HorizontalAlignment="Right"
  67. VerticalAlignment="Bottom"
  68. Panel.ZIndex="2"
  69. Orientation="Horizontal"
  70. Visibility="{Binding LimitationsConvertVisible}">
  71. <Grid Width="16" Height="16">
  72. <Ellipse
  73. Width="13"
  74. Height="13"
  75. Fill="white"
  76. Stroke="#CED0D4" />
  77. <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" />
  78. </Grid>
  79. <TextBlock
  80. Height="20"
  81. Margin="4,0,0,0"
  82. FontFamily="Segoe UI"
  83. FontSize="12"
  84. Foreground="#252629"
  85. Text="First 10 pages for free conversion." />
  86. <TextBlock
  87. Margin="8,0,0,0"
  88. Height="20"
  89. FontFamily="Segoe UI"
  90. FontSize="12"
  91. Foreground="{StaticResource color.light.blue.5}">
  92. <i:Interaction.Triggers>
  93. <i:EventTrigger EventName="MouseDown">
  94. <i:InvokeCommandAction Command="{Binding UnlockMouseDownCommand}" />
  95. </i:EventTrigger>
  96. </i:Interaction.Triggers>
  97. <Underline>
  98. <TextBlock Text="{Binding TextUpgrade}" />
  99. </Underline>
  100. </TextBlock>
  101. </StackPanel> </Grid>
  102. </cus:DialogContent.Content>
  103. <cus:DialogContent.BottmBar>
  104. <Grid>
  105. <!--<Button Background="WhiteSmoke" Width="98" Height="32" Margin="0,0,350,0" Command="{Binding BatchConverterCommand}" Style="{StaticResource btn.sec}">
  106. <Border>
  107. <TextBlock Text="批量处理" ></TextBlock>
  108. </Border>
  109. </Button>-->
  110. <Button
  111. Width="98"
  112. Height="32"
  113. Margin="0,0,16,0"
  114. HorizontalAlignment="Right"
  115. Content="{Binding T_No}"
  116. Command="{Binding CancelCommand}" Style="{StaticResource btn.sec}">
  117. <i:Interaction.Triggers>
  118. <i:EventTrigger EventName="PreviewMouseDown">
  119. <i:InvokeCommandAction Command="{Binding PreviewCancelDownCommand}" CommandParameter="{Binding ElementName=PageRangeComboBox}" />
  120. </i:EventTrigger>
  121. </i:Interaction.Triggers>
  122. </Button>
  123. <Button
  124. Width="98"
  125. Height="32"
  126. Margin="124,0"
  127. HorizontalAlignment="Right"
  128. Content="{Binding T_YES}"
  129. Command = "{Binding ConverterCommnad}" Style="{StaticResource Btn.cta}"/>
  130. </Grid>
  131. </cus:DialogContent.BottmBar>
  132. </cus:DialogContent>
  133. </UserControl>