|
@@ -0,0 +1,151 @@
|
|
|
|
+<UserControl x:Class="PDF_Office.Views.Dialog.ToolsDialogs.MergeDialog"
|
|
|
|
+ xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
|
|
|
|
+ xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
|
|
|
|
+ xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
|
|
|
|
+ xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
|
|
|
|
+ xmlns:local="clr-namespace:PDF_Office.Views.Dialog.PageEditDialogs"
|
|
|
|
+ mc:Ignorable="d"
|
|
|
|
+ xmlns:prism="http://prismlibrary.com/" xmlns:customcontrol="clr-namespace:PDF_Office.CustomControl" xmlns:dataconvert="clr-namespace:PDF_Office.DataConvert" xmlns:toolsdialogs="clr-namespace:PDF_Office.ViewModels.Dialog.ToolsDialogs" xmlns:i="http://schemas.microsoft.com/xaml/behaviors" d:DataContext="{d:DesignInstance Type=toolsdialogs:MergeDialogViewModel}"
|
|
|
|
+ prism:Dialog.WindowStyle="{StaticResource DialogWindowStyle}"
|
|
|
|
+ Height="596" Width="947">
|
|
|
|
+ <UserControl.Resources>
|
|
|
|
+ <dataconvert:IndexConverter x:Key="IndexConverter"/>
|
|
|
|
+ <dataconvert:BoolToVisible x:Key="BoolToVisible" />
|
|
|
|
+ </UserControl.Resources>
|
|
|
|
+ <Grid Background="#FFFFFF">
|
|
|
|
+ <Grid.ColumnDefinitions>
|
|
|
|
+ <ColumnDefinition Width="8"/>
|
|
|
|
+ <ColumnDefinition Width="*"/>
|
|
|
|
+ <ColumnDefinition Width="8"/>
|
|
|
|
+ <ColumnDefinition Width="*"/>
|
|
|
|
+ <ColumnDefinition Width="8"/>
|
|
|
|
+ </Grid.ColumnDefinitions>
|
|
|
|
+ <Grid.RowDefinitions>
|
|
|
|
+ <RowDefinition Height="8"/>
|
|
|
|
+ <RowDefinition Height="*"/>
|
|
|
|
+ <RowDefinition Height="8"/>
|
|
|
|
+ <RowDefinition Height="*"/>
|
|
|
|
+ <RowDefinition Height="16"/>
|
|
|
|
+ <RowDefinition Height="*"/>
|
|
|
|
+ <RowDefinition Height="8"/>
|
|
|
|
+ </Grid.RowDefinitions>
|
|
|
|
+ <Button Grid.Column="1" Grid.Row="1" Content="Add Files" Width="80" Height="32" HorizontalAlignment="Center" VerticalAlignment="Center" Style="{StaticResource btn.sec}" Command="{Binding AddFilesCommand}"/>
|
|
|
|
+ <Border Grid.Column="1" Grid.Row="3">
|
|
|
|
+ <Grid >
|
|
|
|
+ <ListView x:Name="MergeView" AllowDrop="True"
|
|
|
|
+ Drop="MergeView_Drop"
|
|
|
|
+ DragOver="MergeView_DragOver"
|
|
|
|
+ DragLeave="MergeView_DragLeave"
|
|
|
|
+ PreviewMouseMove="MergeView_PreviewMouseMove"
|
|
|
|
+ ItemsSource="{Binding MergeObjectlist}"
|
|
|
|
+ ScrollViewer.HorizontalScrollBarVisibility="Disabled"
|
|
|
|
+ HorizontalContentAlignment="Stretch">
|
|
|
|
+ <ListView.ItemTemplate>
|
|
|
|
+ <DataTemplate >
|
|
|
|
+ <Grid x:Name="ContentPanel" >
|
|
|
|
+ <Grid.ColumnDefinitions>
|
|
|
|
+ <ColumnDefinition Width="*"/>
|
|
|
|
+ <ColumnDefinition Width="*"/>
|
|
|
|
+ <ColumnDefinition Width="*"/>
|
|
|
|
+ <ColumnDefinition Width="*"/>
|
|
|
|
+ <ColumnDefinition Width="*"/>
|
|
|
|
+ </Grid.ColumnDefinitions>
|
|
|
|
+ <TextBlock Text="{Binding RelativeSource={RelativeSource FindAncestor,
|
|
|
|
+ AncestorType={x:Type ListViewItem}},
|
|
|
|
+ Converter={StaticResource IndexConverter}}"
|
|
|
|
+ VerticalAlignment="Center" HorizontalAlignment="Center"/>
|
|
|
|
+ <Image Grid.Column="1" Width="50" Height="50" HorizontalAlignment="Center" VerticalAlignment="Center" Source="pack://application:,,,/PDF Office;component/Resources/Dialog/AddImage.png" />
|
|
|
|
+ <StackPanel Grid.Column="2">
|
|
|
|
+ <TextBlock Text="{Binding DocName}" HorizontalAlignment="Left" VerticalAlignment="Top"/>
|
|
|
|
+ <TextBlock Text="{Binding DocSize}" HorizontalAlignment="Left" VerticalAlignment="Top"/>
|
|
|
|
+ <TextBlock Text="{Binding DocPageCount}" HorizontalAlignment="Left" VerticalAlignment="Top"/>
|
|
|
|
+ </StackPanel>
|
|
|
|
+ <StackPanel Grid.Column="3" HorizontalAlignment="Center" VerticalAlignment="Center">
|
|
|
|
+ <customcontrol:WritableComboBox SelectedIndex="0"/>
|
|
|
|
+ </StackPanel>
|
|
|
|
+ <StackPanel Grid.Column="4" VerticalAlignment="Center">
|
|
|
|
+ <Button Content="删除" Click="Delete_Click"/>
|
|
|
|
+ </StackPanel>
|
|
|
|
+ <StackPanel Grid.ColumnSpan="5" Visibility="{Binding IsForward, Converter={StaticResource BoolToVisible}}" Orientation="Horizontal" HorizontalAlignment="Stretch" VerticalAlignment="Bottom">
|
|
|
|
+ <Line Margin="0,0,0,0" X1="0" X2="{Binding ElementName=ContentPanel,Path=ActualWidth}" HorizontalAlignment="Stretch" StrokeThickness="1.5" Stroke="#FF0078D7" VerticalAlignment="Bottom"/>
|
|
|
|
+ </StackPanel>
|
|
|
|
+
|
|
|
|
+ <StackPanel Grid.ColumnSpan="5" Visibility="{Binding IsBackwards, Converter={StaticResource BoolToVisible}}" Orientation="Horizontal" HorizontalAlignment="Stretch" VerticalAlignment="Top">
|
|
|
|
+ <Line X1="0" X2="{Binding ElementName=ContentPanel,Path=ActualWidth}" HorizontalAlignment="Stretch" StrokeThickness="1.5" Stroke="Red" VerticalAlignment="Bottom"/>
|
|
|
|
+ </StackPanel>
|
|
|
|
+ </Grid>
|
|
|
|
+ </DataTemplate>
|
|
|
|
+ </ListView.ItemTemplate>
|
|
|
|
+ </ListView>
|
|
|
|
+ </Grid>
|
|
|
|
+ </Border>
|
|
|
|
+ <Border Grid.Column="3" Grid.Row="3">
|
|
|
|
+ <Grid>
|
|
|
|
+ <Grid.RowDefinitions>
|
|
|
|
+ <RowDefinition Height="20"/>
|
|
|
|
+ <RowDefinition Height="*"/>
|
|
|
|
+ </Grid.RowDefinitions>
|
|
|
|
+ <TextBlock Text=" Page Size"/>
|
|
|
|
+ <StackPanel Grid.Row="1">
|
|
|
|
+ <RadioButton Content="Original page size" Tag="0">
|
|
|
|
+ <i:Interaction.Triggers>
|
|
|
|
+ <i:EventTrigger EventName="Checked">
|
|
|
|
+ <i:InvokeCommandAction Command="{Binding SetPageSizeTypeCommand}" CommandParameter="{Binding RelativeSource={RelativeSource AncestorType=RadioButton}}" PassEventArgsToCommand="True" />
|
|
|
|
+ </i:EventTrigger>
|
|
|
|
+ </i:Interaction.Triggers>
|
|
|
|
+ </RadioButton>
|
|
|
|
+ <RadioButton Content="A4" Tag="1">
|
|
|
|
+ <i:Interaction.Triggers>
|
|
|
|
+ <i:EventTrigger EventName="Checked">
|
|
|
|
+ <i:InvokeCommandAction Command="{Binding SetPageSizeTypeCommand}" CommandParameter="{Binding RelativeSource={RelativeSource AncestorType=RadioButton}}" PassEventArgsToCommand="True" />
|
|
|
|
+ </i:EventTrigger>
|
|
|
|
+ </i:Interaction.Triggers>
|
|
|
|
+ </RadioButton>
|
|
|
|
+ <RadioButton Content="A3" Tag="2">
|
|
|
|
+ <i:Interaction.Triggers>
|
|
|
|
+ <i:EventTrigger EventName="Checked">
|
|
|
|
+ <i:InvokeCommandAction Command="{Binding SetPageSizeTypeCommand}" CommandParameter="{Binding RelativeSource={RelativeSource AncestorType=RadioButton}}" PassEventArgsToCommand="True" />
|
|
|
|
+ </i:EventTrigger>
|
|
|
|
+ </i:Interaction.Triggers>
|
|
|
|
+ </RadioButton>
|
|
|
|
+ <RadioButton Content="U.S.Letter" Tag="3">
|
|
|
|
+ <i:Interaction.Triggers>
|
|
|
|
+ <i:EventTrigger EventName="Checked">
|
|
|
|
+ <i:InvokeCommandAction Command="{Binding SetPageSizeTypeCommand}" CommandParameter="{Binding RelativeSource={RelativeSource AncestorType=RadioButton}}" PassEventArgsToCommand="True" />
|
|
|
|
+ </i:EventTrigger>
|
|
|
|
+ </i:Interaction.Triggers>
|
|
|
|
+ </RadioButton>
|
|
|
|
+ <RadioButton Content="U.S.Legal" Tag="4">
|
|
|
|
+ <i:Interaction.Triggers>
|
|
|
|
+ <i:EventTrigger EventName="Checked">
|
|
|
|
+ <i:InvokeCommandAction Command="{Binding SetPageSizeTypeCommand}" CommandParameter="{Binding RelativeSource={RelativeSource AncestorType=RadioButton}}" PassEventArgsToCommand="True" />
|
|
|
|
+ </i:EventTrigger>
|
|
|
|
+ </i:Interaction.Triggers>
|
|
|
|
+ </RadioButton>
|
|
|
|
+ <RadioButton x:Name="Customized" Content="Customized" Tag="5">
|
|
|
|
+ <i:Interaction.Triggers>
|
|
|
|
+ <i:EventTrigger EventName="Checked">
|
|
|
|
+ <i:InvokeCommandAction Command="{Binding SetPageSizeTypeCommand}" CommandParameter="{Binding RelativeSource={RelativeSource AncestorType=RadioButton}}" PassEventArgsToCommand="True" />
|
|
|
|
+ </i:EventTrigger>
|
|
|
|
+ </i:Interaction.Triggers>
|
|
|
|
+ </RadioButton>
|
|
|
|
+ <Grid IsEnabled="{Binding ElementName=Customized, Path=IsChecked}">
|
|
|
|
+ <Grid.ColumnDefinitions>
|
|
|
|
+ <ColumnDefinition Width="*"/>
|
|
|
|
+ <ColumnDefinition Width="20"/>
|
|
|
|
+ <ColumnDefinition Width="*"/>
|
|
|
|
+ </Grid.ColumnDefinitions>
|
|
|
|
+ <customcontrol:TextBoxEx PlaceholderText="595"/>
|
|
|
|
+ <TextBlock Text="X" Grid.Column="1" HorizontalAlignment="Center" VerticalAlignment="Center"/>
|
|
|
|
+ <customcontrol:TextBoxEx PlaceholderText="841" Grid.Column="2"/>
|
|
|
|
+ </Grid>
|
|
|
|
+ </StackPanel>
|
|
|
|
+ </Grid>
|
|
|
|
+ </Border>
|
|
|
|
+ <Button Grid.Column="3" Grid.Row="5" Content="Clear" HorizontalAlignment="Left" VerticalAlignment="Bottom" Width="80" Height="32" Style="{StaticResource btn.sec}" Command="{Binding ClearCommand}"/>
|
|
|
|
+ <StackPanel Grid.Column="3" Grid.Row="5" Orientation="Horizontal" HorizontalAlignment="Right" VerticalAlignment="Bottom">
|
|
|
|
+ <Button Content="Cancel" Width="80" Height="32" Style="{StaticResource btn.sec}" Command="{Binding CancelCommand}"/>
|
|
|
|
+ <Button Content="Add" Width="80" Height="32" Margin="16,0,0,0" Style="{StaticResource Btn.cta}" Command="{Binding MergeCommand}"/>
|
|
|
|
+ </StackPanel>
|
|
|
|
+ </Grid>
|
|
|
|
+</UserControl>
|