ConverterImgDialog.xaml 8.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165
  1. <UserControl
  2. x:Class="PDF_Master.Views.Dialog.ConverterDialogs.ConverterImgDialog"
  3. xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
  4. xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
  5. xmlns:converterdialogs="clr-namespace:PDF_Master.ViewModels.Dialog.ConverterDialogs"
  6. xmlns:cus="clr-namespace:PDF_Master.CustomControl"
  7. xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
  8. xmlns:i="http://schemas.microsoft.com/xaml/behaviors"
  9. xmlns:local="clr-namespace:PDF_Master.Views.Dialog.PageEditDialogs"
  10. xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
  11. xmlns:pageeditdialogs="clr-namespace:PDF_Master.ViewModels.Dialog.PageEditDialogs"
  12. xmlns:prism="http://prismlibrary.com/"
  13. Width="468"
  14. Height="478"
  15. d:DataContext="{d:DesignInstance Type=converterdialogs:ConverterImgDialogViewModel}"
  16. d:DesignHeight="478"
  17. d:DesignWidth="468"
  18. prism:Dialog.WindowStyle="{StaticResource DialogWindowStyle}"
  19. prism:ViewModelLocator.AutoWireViewModel="True"
  20. mc:Ignorable="d">
  21. <cus:DialogContent Header="{Binding T_Title}">
  22. <cus:DialogContent.Content>
  23. <Grid Grid.Row="1">
  24. <Grid.ColumnDefinitions>
  25. <ColumnDefinition Width="244" />
  26. <ColumnDefinition Width="*" />
  27. </Grid.ColumnDefinitions>
  28. <Grid Grid.Column="0" VerticalAlignment="Top">
  29. <cus:PageTurningPreview
  30. x:Name="ConverterPreview"
  31. Loaded="ConverterPreview_Loaded"
  32. PageIsForm="False" />
  33. </Grid>
  34. <Grid Grid.Column="1">
  35. <StackPanel Margin="0,2,0,0">
  36. <StackPanel>
  37. <TextBlock
  38. Height="20"
  39. HorizontalAlignment="Left"
  40. Style="{StaticResource PropertyHeaderLv2}"
  41. Text="{Binding T_Format}" />
  42. <ComboBox
  43. Name="ImageTypeComboBox"
  44. Width="208"
  45. Height="32"
  46. Margin="0,10,0,0"
  47. HorizontalAlignment="Left"
  48. ItemsSource="{Binding ImageTypeFamily}"
  49. SelectedIndex="{Binding ImageTypeSelectedIndex, Mode=TwoWay}" />
  50. <ComboBox
  51. Name="ImageDPIComboBox"
  52. Width="208"
  53. Height="32"
  54. Margin="0,8,0,0"
  55. HorizontalAlignment="Left"
  56. ItemsSource="{Binding ImageDPIFamily}"
  57. SelectedIndex="{Binding ImageDPISelectedIndex, Mode=TwoWay}" />
  58. </StackPanel>
  59. <StackPanel Margin="0,18,0,0">
  60. <TextBlock
  61. Height="20"
  62. HorizontalAlignment="Left"
  63. Style="{StaticResource PropertyHeaderLv2}"
  64. Text="{Binding T_PageRange}" />
  65. <cus:WritableComboBox
  66. x:Name="PageRangeComboBox"
  67. Width="208"
  68. Height="32"
  69. Margin="0,10,0,0"
  70. HorizontalAlignment="Left"
  71. IsCurrentPage="True"
  72. Loaded="PageRangeComboBox_Loaded"
  73. MaxPageRange="{Binding MaxPageRange}"
  74. SelectedIndex="{Binding PageRangeSelectIndex, Mode=TwoWay}"
  75. Text="{Binding PageRangeText, Mode=TwoWay}">
  76. <i:Interaction.Triggers>
  77. <i:EventTrigger EventName="SelectionChanged">
  78. <i:InvokeCommandAction Command="{Binding CmbPageSelectionChanged}" CommandParameter="{Binding ElementName=ConverterPreview}" />
  79. </i:EventTrigger>
  80. <i:EventTrigger EventName="TextChanged">
  81. <i:InvokeCommandAction Command="{Binding CmbPageTextChanged}" CommandParameter="{Binding ElementName=ConverterPreview}" />
  82. </i:EventTrigger>
  83. <i:KeyTrigger Key="Return" FiredOn="KeyDown">
  84. <i:InvokeCommandAction Command="{Binding SetCustomPageRangeCommand}" />
  85. </i:KeyTrigger>
  86. </i:Interaction.Triggers>
  87. </cus:WritableComboBox>
  88. </StackPanel>
  89. </StackPanel>
  90. </Grid>
  91. <StackPanel
  92. Grid.ColumnSpan="2"
  93. Height="20"
  94. Margin="0,0,16,8"
  95. HorizontalAlignment="Right"
  96. VerticalAlignment="Bottom"
  97. Panel.ZIndex="2"
  98. Orientation="Horizontal"
  99. Visibility="{Binding LimitationsConvertVisible}">
  100. <Grid Width="16" Height="16">
  101. <Ellipse
  102. Width="13"
  103. Height="13"
  104. Fill="white"
  105. Stroke="#CED0D4" />
  106. <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" />
  107. </Grid>
  108. <TextBlock
  109. Height="20"
  110. Margin="4,0,0,0"
  111. FontFamily="Segoe UI"
  112. FontSize="12"
  113. Foreground="#252629"
  114. Text="First 10 pages for free conversion." />
  115. <TextBlock
  116. Height="20"
  117. Margin="8,0,0,0"
  118. FontFamily="Segoe UI"
  119. FontSize="12"
  120. Foreground="{StaticResource color.light.blue.5}">
  121. <i:Interaction.Triggers>
  122. <i:EventTrigger EventName="MouseDown">
  123. <i:InvokeCommandAction Command="{Binding UnlockMouseDownCommand}" />
  124. </i:EventTrigger>
  125. </i:Interaction.Triggers>
  126. <Underline>
  127. <TextBlock Text="{Binding TextUpgrade}" />
  128. </Underline>
  129. </TextBlock>
  130. </StackPanel>
  131. </Grid>
  132. </cus:DialogContent.Content>
  133. <cus:DialogContent.BottmBar>
  134. <Grid>
  135. <!--<Button Background="WhiteSmoke" Width="98" Height="32" Margin="0,0,350,0" Command="{Binding BatchConverterCommand}" Style="{StaticResource btn.sec}">
  136. <Border>
  137. <TextBlock Text="批量处理" ></TextBlock>
  138. </Border>
  139. </Button>-->
  140. <Button
  141. Width="98"
  142. Height="32"
  143. Margin="0,0,16,0"
  144. HorizontalAlignment="Right"
  145. Command="{Binding CancelCommand}"
  146. Content="{Binding T_No}"
  147. Style="{StaticResource btn.sec}">
  148. <i:Interaction.Triggers>
  149. <i:EventTrigger EventName="PreviewMouseDown">
  150. <i:InvokeCommandAction Command="{Binding PreviewCancelDownCommand}" CommandParameter="{Binding ElementName=PageRangeComboBox}" />
  151. </i:EventTrigger>
  152. </i:Interaction.Triggers>
  153. </Button>
  154. <Button
  155. Width="98"
  156. Height="32"
  157. Margin="124,0"
  158. HorizontalAlignment="Right"
  159. Command="{Binding ConverterCommnad}"
  160. Content="{Binding T_YES}"
  161. Style="{StaticResource Btn.cta}" />
  162. </Grid>
  163. </cus:DialogContent.BottmBar>
  164. </cus:DialogContent>
  165. </UserControl>