ConverterCSVDialog.xaml 8.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166
  1. <UserControl
  2. x:Class="PDF_Master.Views.Dialog.ConverterDialogs.ConverterCSVDialog"
  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:ConverterCSVDialogViewModel}"
  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
  29. Grid.Column="0"
  30. Margin="0,0,0,0"
  31. VerticalAlignment="Top">
  32. <cus:PageTurningPreview x:Name="ConverterPreview" Loaded="ConverterPreview_Loaded" />
  33. </Grid>
  34. <Grid Grid.Column="1">
  35. <StackPanel Margin="0,2,0,0">
  36. <TextBlock
  37. Height="20"
  38. HorizontalAlignment="Left"
  39. Style="{StaticResource PropertyHeaderLv2}"
  40. Text="{Binding T_Settings}" />
  41. <StackPanel Margin="0,10,0,0">
  42. <RadioButton
  43. Name="ForEachPageRadioBtn"
  44. Padding="8,0,0,0"
  45. Command="{Binding RadioButtonCommand}"
  46. CommandParameter="{Binding ElementName=ForEachPageRadioBtn, Path=Name}"
  47. IsChecked="True"
  48. Style="{StaticResource RadioButtonStyleText}">
  49. <TextBlock Text="{Binding T_EachForm}" />
  50. </RadioButton>
  51. <RadioButton
  52. Name="OnlyTableRadioBtn"
  53. Margin="0,8,0,0"
  54. Command="{Binding RadioButtonCommand}"
  55. CommandParameter="{Binding ElementName=OnlyTableRadioBtn, Path=Name}"
  56. Style="{StaticResource RadioButtonStyleText}">
  57. <TextBlock Text="{Binding T_ADocument}" />
  58. </RadioButton>
  59. </StackPanel>
  60. <StackPanel Margin="0,18,0,0" Orientation="Vertical">
  61. <TextBlock
  62. Height="20"
  63. HorizontalAlignment="Left"
  64. Style="{StaticResource PropertyHeaderLv2}"
  65. Text="{Binding T_PageRange}" />
  66. <cus:WritableComboBox
  67. x:Name="PageRangeComboBox"
  68. Width="208"
  69. Height="32"
  70. Margin="0,10,0,0"
  71. HorizontalAlignment="Left"
  72. IsCurrentPage="True"
  73. Loaded="PageRangeComboBox_Loaded"
  74. MaxPageRange="{Binding MaxPageRange}"
  75. SelectedIndex="{Binding PageRangeSelectIndex, Mode=TwoWay}"
  76. Text="{Binding PageRangeText, Mode=TwoWay}">
  77. <i:Interaction.Triggers>
  78. <i:EventTrigger EventName="SelectionChanged">
  79. <i:InvokeCommandAction Command="{Binding CmbPageSelectionChanged}" CommandParameter="{Binding ElementName=ConverterPreview}" />
  80. </i:EventTrigger>
  81. <i:EventTrigger EventName="TextChanged">
  82. <i:InvokeCommandAction Command="{Binding CmbPageTextChanged}" CommandParameter="{Binding ElementName=ConverterPreview}" />
  83. </i:EventTrigger>
  84. <i:KeyTrigger Key="Return" FiredOn="KeyDown">
  85. <i:InvokeCommandAction Command="{Binding SetCustomPageRangeCommand}" />
  86. </i:KeyTrigger>
  87. </i:Interaction.Triggers>
  88. </cus:WritableComboBox>
  89. </StackPanel>
  90. </StackPanel>
  91. </Grid>
  92. <StackPanel
  93. Grid.ColumnSpan="2"
  94. Height="20"
  95. Margin="0,0,16,8"
  96. HorizontalAlignment="Right"
  97. VerticalAlignment="Bottom"
  98. Panel.ZIndex="2"
  99. Orientation="Horizontal"
  100. Visibility="{Binding LimitationsConvertVisible}">
  101. <Grid Width="16" Height="16">
  102. <Ellipse
  103. Width="13"
  104. Height="13"
  105. Fill="white"
  106. Stroke="#CED0D4" />
  107. <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" />
  108. </Grid>
  109. <TextBlock
  110. Height="20"
  111. Margin="4,0,0,0"
  112. FontFamily="Segoe UI"
  113. FontSize="12"
  114. Foreground="#252629"
  115. Text="First 10 pages for free conversion." />
  116. <TextBlock
  117. Margin="8,0,0,0"
  118. Height="20"
  119. FontFamily="Segoe UI"
  120. FontSize="12"
  121. Foreground="{StaticResource color.light.blue.5}">
  122. <i:Interaction.Triggers>
  123. <i:EventTrigger EventName="MouseDown">
  124. <i:InvokeCommandAction Command="{Binding UnlockMouseDownCommand}" />
  125. </i:EventTrigger>
  126. </i:Interaction.Triggers>
  127. <Underline>
  128. <TextBlock Text="{Binding TextUpgrade}" />
  129. </Underline>
  130. </TextBlock>
  131. </StackPanel>
  132. </Grid>
  133. </cus:DialogContent.Content>
  134. <cus:DialogContent.BottmBar>
  135. <Grid>
  136. <!--<Button Background="WhiteSmoke" Width="98" Height="32" Margin="0,0,400,0" Command="{Binding BatchConverterCommand}" Style="{StaticResource btn.sec}">
  137. <Border>
  138. <TextBlock Text="批量处理" ></TextBlock>
  139. </Border>
  140. </Button>-->
  141. <Button
  142. Width="98"
  143. Height="32"
  144. Margin="0,0,16,0"
  145. HorizontalAlignment="Right"
  146. Command="{Binding CancelCommand}"
  147. Content="{Binding T_No}"
  148. Style="{StaticResource btn.sec}">
  149. <i:Interaction.Triggers>
  150. <i:EventTrigger EventName="PreviewMouseDown">
  151. <i:InvokeCommandAction Command="{Binding PreviewCancelDownCommand}" CommandParameter="{Binding ElementName=PageRangeComboBox}" />
  152. </i:EventTrigger>
  153. </i:Interaction.Triggers>
  154. </Button>
  155. <Button
  156. Width="98"
  157. Height="32"
  158. Margin="124,0"
  159. HorizontalAlignment="Right"
  160. Command="{Binding ConverterCommnad}"
  161. Content="{Binding T_YES}"
  162. Style="{StaticResource Btn.cta}" />
  163. </Grid>
  164. </cus:DialogContent.BottmBar>
  165. </cus:DialogContent>
  166. </UserControl>