ConverterCSVDialog.xaml 8.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149
  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 Grid.Column="0" VerticalAlignment="Top" Margin="0,0,0,0">
  29. <cus:PageTurningPreview x:Name="ConverterPreview" Loaded="ConverterPreview_Loaded" />
  30. </Grid>
  31. <Grid Grid.Column="1">
  32. <StackPanel Margin="0,2,0,0">
  33. <TextBlock
  34. Height="20"
  35. Style="{StaticResource PropertyHeaderLv2}"
  36. HorizontalAlignment="Left"
  37. Text="{Binding T_Settings}" />
  38. <StackPanel Margin="0,10,0,0">
  39. <RadioButton
  40. IsChecked="True"
  41. Name="ForEachPageRadioBtn"
  42. Padding="8,0,0,0"
  43. Style="{StaticResource RadioButtonStyleText}"
  44. Command="{Binding RadioButtonCommand}"
  45. CommandParameter="{Binding ElementName=ForEachPageRadioBtn, Path=Name}">
  46. <TextBlock Text="{Binding T_EachForm}" />
  47. </RadioButton>
  48. <RadioButton
  49. Name="OnlyTableRadioBtn"
  50. Margin="0,8,0,0"
  51. Style="{StaticResource RadioButtonStyleText}"
  52. Command="{Binding RadioButtonCommand}"
  53. CommandParameter="{Binding ElementName=OnlyTableRadioBtn, Path=Name}">
  54. <TextBlock Text="{Binding T_ADocument}" />
  55. </RadioButton>
  56. </StackPanel>
  57. <StackPanel Margin="0,18,0,0" Orientation="Vertical">
  58. <TextBlock
  59. Height="20"
  60. HorizontalAlignment="Left"
  61. Style="{StaticResource PropertyHeaderLv2}"
  62. Text="{Binding T_PageRange}" />
  63. <cus:WritableComboBox
  64. x:Name="PageRangeComboBox"
  65. Width="208"
  66. Height="32"
  67. Margin="0,10,0,0"
  68. HorizontalAlignment="Left"
  69. IsCurrentPage="True"
  70. MaxPageRange="{Binding MaxPageRange}"
  71. Loaded="PageRangeComboBox_Loaded"
  72. SelectedIndex="{Binding PageRangeSelectIndex, Mode=TwoWay}"
  73. Text="{Binding PageRangeText, Mode=TwoWay}">
  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. </Grid>
  89. <StackPanel Orientation="Horizontal" Width="245" Panel.ZIndex="2" Grid.ColumnSpan="2" Height="20" HorizontalAlignment="Right" VerticalAlignment="Bottom" Margin="0,0,16,8">
  90. <Grid Width="16" Height="16" >
  91. <Ellipse Width="13" Height="13" Fill="white" Stroke="#CED0D4"/>
  92. <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"/>
  93. </Grid>
  94. <TextBlock
  95. Margin="4,0,0,0"
  96. FontFamily="Segoe UI"
  97. FontSize="12"
  98. Foreground="#94989C"
  99. Text="First 10 pages for free conversion."
  100. Height="20"
  101. />
  102. <TextBlock FontFamily="Segoe UI"
  103. FontSize="12" Height="20" Foreground="{StaticResource color.light.blue.5}">
  104. <i:Interaction.Triggers>
  105. <i:EventTrigger EventName="MouseDown">
  106. <i:InvokeCommandAction Command="{Binding UnlockMouseDownCommand}" />
  107. </i:EventTrigger>
  108. </i:Interaction.Triggers>
  109. <Underline >
  110. <TextBlock Text="Unlock"/>
  111. </Underline>
  112. </TextBlock>
  113. </StackPanel>
  114. </Grid>
  115. </cus:DialogContent.Content>
  116. <cus:DialogContent.BottmBar>
  117. <Grid>
  118. <!--<Button Background="WhiteSmoke" Width="98" Height="32" Margin="0,0,400,0" Command="{Binding BatchConverterCommand}" Style="{StaticResource btn.sec}">
  119. <Border>
  120. <TextBlock Text="批量处理" ></TextBlock>
  121. </Border>
  122. </Button>-->
  123. <Button
  124. Width="98"
  125. Height="32"
  126. Margin="0,0,16,0"
  127. HorizontalAlignment="Right"
  128. Command="{Binding CancelCommand}"
  129. Content="{Binding T_No}"
  130. 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. Command="{Binding ConverterCommnad}"
  143. Content="{Binding T_YES}"
  144. Style="{StaticResource Btn.cta}"/>
  145. </Grid>
  146. </cus:DialogContent.BottmBar>
  147. </cus:DialogContent>
  148. </UserControl>