HomePageRemoveDialog.xaml 10.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164
  1. <UserControl x:Class="PDF_Master.Views.Dialog.HomePageToolsDialogs.HomePageBatchProcessing.HomePageRemoveDialog"
  2. xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
  3. xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
  4. xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
  5. xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
  6. xmlns:cus="clr-namespace:PDF_Master.CustomControl"
  7. xmlns:prism="http://prismlibrary.com/"
  8. prism:ViewModelLocator.AutoWireViewModel="True"
  9. xmlns:convert="clr-namespace:PDF_Master.DataConvert"
  10. d:DesignHeight="600"
  11. d:DesignWidth="818"
  12. mc:Ignorable="d">
  13. <UserControl.Resources>
  14. <ResourceDictionary>
  15. <convert:UnVisivleConvert x:Key="unVisibleConvert"/>
  16. </ResourceDictionary>
  17. </UserControl.Resources>
  18. <Grid IsEnabled="{Binding OptionsRemoveGridIsEnabled}">
  19. <Grid.ColumnDefinitions>
  20. <ColumnDefinition Width="558*" />
  21. <ColumnDefinition Width="260*" MaxWidth="260"/>
  22. </Grid.ColumnDefinitions>
  23. <Grid Grid.Column="0" >
  24. <Grid.RowDefinitions>
  25. <RowDefinition Height="556*" />
  26. <RowDefinition Height="64*" MaxHeight="64"/>
  27. </Grid.RowDefinitions>
  28. <Grid Grid.Row="0" AllowDrop="True"
  29. Drop="Grid_Drop"
  30. DragEnter="MainPage_DragEnter"
  31. DragOver="MainPage_DragOver"
  32. DragLeave="MainPage_DragLeave"
  33. >
  34. <!--<Label Name="DropGrid" Background="#18A0FB" Opacity="0.5" Panel.ZIndex="1" Visibility="Collapsed"/>-->
  35. <Button Name="BtnBlank" Background="Green" Height="300" Width="300" Visibility="{Binding AddFileVisibility}" Command="{Binding ADDPDFCommand}" >
  36. </Button>
  37. <ListView x:Name="listView" DataContext="{Binding PDFDataTable,Mode=TwoWay}" Grid.Row="0" Background="White" ItemsSource="{Binding}" SelectionChanged="listView_SelectionChanged" Visibility="{Binding ElementName=BtnBlank, Path=Visibility, Converter={StaticResource unVisibleConvert}}">
  38. <ListView.ContextMenu>
  39. <ContextMenu StaysOpen="True" >
  40. <MenuItem Header="打开文件" Name="OpenFileMenuItem" Click="OpenFileMenuItem_Click"/>
  41. <MenuItem Header="移除" Name="RemoveFileMenuItem" Click="RemoveFileMenuItem_Click"/>
  42. </ContextMenu>
  43. </ListView.ContextMenu>
  44. <ListView.View>
  45. <GridView>
  46. <GridViewColumn Header="文档名" Width="390" DisplayMemberBinding="{Binding FileName}"/>
  47. <GridViewColumn Header="大小" Width="68" DisplayMemberBinding="{Binding FileSize}"/>
  48. <GridViewColumn Header="状态" Width="80" >
  49. <GridViewColumn.CellTemplate>
  50. <DataTemplate>
  51. <StackPanel Orientation="Horizontal">
  52. <cus:BatchStatus StatusValue="{Binding FileState,Mode=TwoWay}" Width="16" Height="16" />
  53. <Button Name="DeleteTemplateBtn" Width="14" Height="14" Content="X" Foreground="Red" FontSize="8" VerticalAlignment="Center" Margin="38,0,0,0" Click="DeleteTemplateBtn_Click">
  54. </Button>
  55. </StackPanel>
  56. <DataTemplate.Triggers>
  57. <DataTrigger Binding="{Binding Path=IsMouseOver, RelativeSource={RelativeSource FindAncestor, AncestorType=ListViewItem}}" Value="True">
  58. <Setter TargetName="DeleteTemplateBtn" Property="Visibility" Value="Visible"/>
  59. </DataTrigger>
  60. <DataTrigger Binding="{Binding Path=IsMouseOver, RelativeSource={RelativeSource FindAncestor, AncestorType=ListViewItem}}" Value="False">
  61. <Setter TargetName="DeleteTemplateBtn" Property="Visibility" Value="Hidden"/>
  62. </DataTrigger>
  63. </DataTemplate.Triggers>
  64. </DataTemplate>
  65. </GridViewColumn.CellTemplate>
  66. </GridViewColumn>
  67. </GridView>
  68. </ListView.View>
  69. <ListView.ItemContainerStyle>
  70. <Style TargetType="ListViewItem">
  71. <Setter Property="Height" Value="42"/>
  72. <Style.Triggers>
  73. <Trigger Property="ListView.AlternationIndex" Value="1">
  74. <Setter Property="Background" Value="LightGray"/>
  75. </Trigger>
  76. </Style.Triggers>
  77. </Style>
  78. </ListView.ItemContainerStyle>
  79. </ListView>
  80. </Grid>
  81. <Grid Grid.Row="1">
  82. <Button x:Name="MenuBtn" Width="113"
  83. Height="40"
  84. Margin="25,0,0,0"
  85. HorizontalAlignment="Left" Click="Menu_Click">
  86. <StackPanel Orientation="Horizontal" >
  87. <Border HorizontalAlignment="Right">
  88. <TextBlock Text="添加文件" FontSize="18" Foreground="Black"></TextBlock>
  89. </Border>
  90. <Border Margin="12,0,0,0">
  91. <Path VerticalAlignment="Center" HorizontalAlignment="Right" Stroke="Black" Data="M0 0L8 4 L16 0" Height="10" Stretch="Fill" />
  92. </Border>
  93. </StackPanel>
  94. </Button>
  95. <Popup x:Name="menuPop1" StaysOpen="False" AllowsTransparency="True" PlacementTarget="{Binding ElementName=MenuBtn}">
  96. <Grid Height="auto" Width="auto" HorizontalAlignment="Left">
  97. <Border BorderThickness="0" CornerRadius="3" Background="White" Margin="3">
  98. <Border.Effect>
  99. <DropShadowEffect ShadowDepth="0" Color="#FFB6B6B6"/>
  100. </Border.Effect>
  101. <StackPanel Margin="0">
  102. <MenuItem x:Name="添加文件" Header="添加文件" Command="{Binding ADDPDFCommand}"></MenuItem>
  103. <MenuItem x:Name="添加文件夹" Header="添加文件夹" Command="{Binding ADDPDFFilesCommand}"></MenuItem>
  104. <MenuItem x:Name="添加已打开文件" Header="添加文件夹" Command="{Binding ADDOpenedPDFCommand}"></MenuItem>
  105. </StackPanel>
  106. </Border>
  107. </Grid>
  108. </Popup>
  109. <!--<Button
  110. Width="40"
  111. Height="40"
  112. Margin="0,0,90,0"
  113. HorizontalAlignment="Right">
  114. </Button>-->
  115. <Button
  116. Width="40"
  117. Height="40"
  118. Margin="25,0"
  119. HorizontalAlignment="Right"
  120. IsEnabled="{Binding RemoveIsEnable}"
  121. Command="{Binding RemovePDFFileCommand}"
  122. >
  123. </Button>
  124. </Grid>
  125. </Grid>
  126. <Grid Grid.Column="1" Background="WhiteSmoke" IsEnabled="{Binding SetOptionsRemoveGridIsEnabled}">
  127. <Grid.RowDefinitions>
  128. <RowDefinition Height="536*"/>
  129. <RowDefinition Height="64*" MaxHeight="64"/>
  130. </Grid.RowDefinitions>
  131. <StackPanel Orientation="Vertical" Margin="16,14,0,0" Grid.Row="0">
  132. <TextBlock Text="Options" FontSize="14" Width="228" Height=" 22" FontFamily="Segoe UI" TextBlock.Foreground="#252629" HorizontalAlignment="Left"/>
  133. <CheckBox IsChecked="{Binding SecurityIsRemove}" Margin="0,8,0,0" >
  134. <TextBlock Text="安全" FontSize="14" Width="228" Height=" 22" FontFamily="Segoe UI" TextBlock.Foreground="#252629"/>
  135. </CheckBox>
  136. <CheckBox IsChecked="{Binding WatermarkIsRemove}" Margin="0,8,0,0">
  137. <TextBlock Text="水印" FontSize="14" Width="228" Height=" 22" FontFamily="Segoe UI" TextBlock.Foreground="#252629"/>
  138. </CheckBox>
  139. <CheckBox IsChecked="{Binding BackgroundIsRemove}" Margin="0,8,0,0">
  140. <TextBlock Text="背景" FontSize="14" Width="228" Height=" 22" FontFamily="Segoe UI" TextBlock.Foreground="#252629"/>
  141. </CheckBox>
  142. <CheckBox IsChecked="{Binding HeaderFooterIsRemove}" Margin="0,8,0,0">
  143. <TextBlock Text="页眉页脚" FontSize="14" Width="228" Height=" 22" FontFamily="Segoe UI" TextBlock.Foreground="#252629"/>
  144. </CheckBox>
  145. <CheckBox IsChecked="{Binding BatesIsRemove}" Margin="0,8,0,0">
  146. <TextBlock Text="Bates码" FontSize="14" Width="228" Height=" 22" FontFamily="Segoe UI" TextBlock.Foreground="#252629"/>
  147. </CheckBox>
  148. </StackPanel>
  149. <Grid Grid.Row="2">
  150. <Button Height="32" Width="228" Background="Black" Command="{Binding OptionsRemoveCommand}">
  151. <TextBlock Text="Remove" FontSize="18" Foreground="White"/>
  152. </Button>
  153. </Grid>
  154. </Grid>
  155. </Grid>
  156. </UserControl>