ConverterCSVDialog.xaml 5.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110
  1. <UserControl
  2. x:Class="PDF_Office.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_Office.ViewModels.Dialog.ConverterDialogs"
  6. xmlns:cus="clr-namespace:PDF_Office.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_Office.Views.Dialog.PageEditDialogs"
  10. xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
  11. xmlns:pageeditdialogs="clr-namespace:PDF_Office.ViewModels.Dialog.PageEditDialogs"
  12. xmlns:prism="http://prismlibrary.com/"
  13. Width="529"
  14. Height="416"
  15. d:DataContext="{d:DesignInstance Type=converterdialogs:ConverterCSVDialogViewModel}"
  16. d:DesignHeight="416"
  17. d:DesignWidth="529"
  18. prism:Dialog.WindowStyle="{StaticResource DialogWindowStyle}"
  19. prism:ViewModelLocator.AutoWireViewModel="True"
  20. mc:Ignorable="d">
  21. <cus:DialogContent Header="PDF转CSV">
  22. <cus:DialogContent.Content>
  23. <Grid Grid.Row="1">
  24. <Grid.ColumnDefinitions>
  25. <ColumnDefinition Width="212" />
  26. <ColumnDefinition Width="*" />
  27. </Grid.ColumnDefinitions>
  28. <Grid Grid.Column="0">
  29. <cus:PageTurningPreview x:Name="ConverterPreview" Loaded="ConverterPreview_Loaded" />
  30. </Grid>
  31. <Grid Grid.Column="1">
  32. <StackPanel Margin="18,16,0,0">
  33. <TextBlock
  34. Width="60"
  35. Height="20"
  36. HorizontalAlignment="Left"
  37. Text="CSV设置:" />
  38. <StackPanel Margin="0,8,0,0">
  39. <RadioButton
  40. IsChecked="True"
  41. Name="ForEachPageRadioBtn"
  42. Command="{Binding RadioButtonCommand}"
  43. CommandParameter="{Binding ElementName=ForEachPageRadioBtn, Path=Name}">
  44. <TextBlock Text="为每个表格创建工作表" />
  45. </RadioButton>
  46. <RadioButton
  47. Name="OnlyTableRadioBtn"
  48. Margin="0,6,0,0"
  49. Command="{Binding RadioButtonCommand}"
  50. CommandParameter="{Binding ElementName=OnlyTableRadioBtn, Path=Name}">
  51. <TextBlock Text="为文档创建单个工作表" />
  52. </RadioButton>
  53. </StackPanel>
  54. <StackPanel Margin="0,14,0,0" Orientation="Vertical">
  55. <TextBlock
  56. Width="48"
  57. Height="20"
  58. HorizontalAlignment="Left"
  59. Text="页面范围" />
  60. <cus:WritableComboBox
  61. x:Name="PageRangeComboBox"
  62. Width="228"
  63. Height="32"
  64. Margin="0,4,0,0"
  65. HorizontalAlignment="Left"
  66. IsCurrentPage="True"
  67. MaxPageRange="{Binding MaxPageRange}"
  68. Loaded="PageRangeComboBox_Loaded"
  69. SelectedIndex="{Binding PageRangeSelectIndex, Mode=TwoWay}"
  70. Text="{Binding PageRangeText, Mode=TwoWay}">
  71. <i:Interaction.Triggers>
  72. <i:EventTrigger EventName="SelectionChanged">
  73. <i:InvokeCommandAction Command="{Binding CmbPageSelectionChanged}" CommandParameter="{Binding ElementName=ConverterPreview}" />
  74. </i:EventTrigger>
  75. <i:EventTrigger EventName="TextChanged">
  76. <i:InvokeCommandAction Command="{Binding CmbPageTextChanged}" CommandParameter="{Binding ElementName=ConverterPreview}" />
  77. </i:EventTrigger>
  78. </i:Interaction.Triggers>
  79. </cus:WritableComboBox>
  80. </StackPanel>
  81. </StackPanel>
  82. </Grid>
  83. </Grid>
  84. </cus:DialogContent.Content>
  85. <cus:DialogContent.BottmBar>
  86. <Grid>
  87. <Button Background="WhiteSmoke" Width="98" Height="32" Margin="0,0,400,0" Command="{Binding BatchConverterCommand}">
  88. <Border>
  89. <TextBlock Text="批量处理" ></TextBlock>
  90. </Border>
  91. </Button>
  92. <Button
  93. Width="98"
  94. Height="32"
  95. Margin="0,0,16,0"
  96. HorizontalAlignment="Right"
  97. Command="{Binding CancelCommand}"
  98. Content="取消" />
  99. <Button
  100. Width="98"
  101. Height="32"
  102. Margin="124,0"
  103. HorizontalAlignment="Right"
  104. Command="{Binding ConverterCommnad}"
  105. Content="转换" />
  106. </Grid>
  107. </cus:DialogContent.BottmBar>
  108. </cus:DialogContent>
  109. </UserControl>