123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211 |
- <UserControl
- x:Class="PDF_Master.Views.Dialog.PageEditDialogs.SplitDialog"
- xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
- xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
- xmlns:cus="clr-namespace:PDF_Master.CustomControl"
- xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
- xmlns:local="clr-namespace:PDF_Master.Views.Dialog.PageEditDialogs"
- xmlns:mainpage="clr-namespace:PDF_Master.Strings.MainPage"
- xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
- xmlns:pageeditdialogs="clr-namespace:PDF_Master.ViewModels.Dialog.PageEditDialogs"
- xmlns:prism="http://prismlibrary.com/"
- Width="468"
- Height="464"
- d:DataContext="{d:DesignInstance Type=pageeditdialogs:SplitDialogViewModel}"
- d:DesignHeight="464"
- d:DesignWidth="468"
- prism:Dialog.WindowStyle="{StaticResource DialogWindowStyle}"
- prism:ViewModelLocator.AutoWireViewModel="True"
- mc:Ignorable="d">
- <cus:DialogContent Header="{x:Static mainpage:MainPage.PageEdit_SplitPage}">
- <cus:DialogContent.Content>
- <Grid>
- <Grid.RowDefinitions>
- <RowDefinition />
- <RowDefinition />
- </Grid.RowDefinitions>
- <StackPanel Margin="16,0,16,10">
- <TextBlock
- FontFamily="Segoe UI"
- FontSize="12"
- FontWeight="SemiBold"
- Foreground="{StaticResource color.sys.text.neutral.lv2}"
- Text="{x:Static mainpage:MainPage.PageEdit_SplitMethod}" />
- <StackPanel Margin="0,15" Orientation="Horizontal">
- <RadioButton
- Name="RbtnPage"
- Height="24"
- VerticalAlignment="Center"
- VerticalContentAlignment="Center"
- Content="{x:Static mainpage:MainPage.PageEdit_SplitByEvery}"
- FontFamily="Segoe UI"
- FontSize="14"
- GroupName="SplitMode"
- IsChecked="{Binding Model.IsAveragePages, Mode=TwoWay}" />
- <cus:NumericUpDown
- Width="80"
- Height="32"
- Margin="8,0"
- IsEnabled="{Binding ElementName=RbtnPage, Path=IsChecked}"
- Maximum="{Binding PageCount}"
- Minimum="1"
- Value="{Binding Model.PageNum, Mode=TwoWay}" />
- <TextBlock
- VerticalAlignment="Center"
- FontFamily="Segoe UI"
- FontSize="14"
- Text="{x:Static mainpage:MainPage.PageEdit_Xpage}" />
- </StackPanel>
- <StackPanel Margin="0,0,0,15" Orientation="Horizontal">
- <RadioButton
- Name="RbtnPdf"
- VerticalAlignment="Center"
- VerticalContentAlignment="Center"
- Content="{x:Static mainpage:MainPage.PageEdit_SplitAveragelyToXfiles}"
- FontFamily="Segoe UI"
- FontSize="14"
- GroupName="SplitMode"
- IsChecked="{Binding Model.IsAveragePDF, Mode=TwoWay}" />
- <cus:NumericUpDown
- Width="80"
- Height="32"
- Margin="8,0"
- IsEnabled="{Binding ElementName=RbtnPdf, Path=IsChecked}"
- Maximum="{Binding PageCount}"
- Minimum="1"
- Value="{Binding Model.FilesCount, Mode=TwoWay}" />
- <TextBlock
- VerticalAlignment="Center"
- FontFamily="Segoe UI"
- FontSize="14"
- Text="{x:Static mainpage:MainPage.PageEdit_Xfiles}" />
- </StackPanel>
- <StackPanel Margin="0,0,0,15" Orientation="Horizontal">
- <RadioButton
- x:Name="RbtnPagerange"
- VerticalAlignment="Center"
- VerticalContentAlignment="Center"
- Content="{x:Static mainpage:MainPage.PageEdit_SplitByPageRange}"
- FontFamily="Segoe UI"
- FontSize="14"
- GroupName="SplitMode"
- IsChecked="{Binding Model.IsCustomRange, Mode=TwoWay}" />
- <cus:WritableComboBox
- Width="160"
- Height="32"
- Margin="8,0"
- IsAllPageVisible="Collapsed"
- IsEnabled="{Binding ElementName=RbtnPagerange, Path=IsChecked}"
- MaxPageRange="{Binding PageCount}"
- SelectedIndex="{Binding Model.PageSelectedIndex, Mode=TwoWay}"
- Text="{Binding Model.CustomPageText, Mode=TwoWay, UpdateSourceTrigger=PropertyChanged}" />
- </StackPanel>
- </StackPanel>
- <StackPanel Grid.Row="1" Margin="16,0">
- <TextBlock
- Margin="0,0,0,10"
- FontFamily="Segoe UI"
- FontSize="12"
- FontWeight="SemiBold"
- Foreground="{StaticResource color.sys.text.neutral.lv2}"
- Text="{x:Static mainpage:MainPage.PageEdit_SplitFileName}" />
- <TextBox
- Width="360"
- Height="32"
- HorizontalAlignment="Left"
- VerticalContentAlignment="Center"
- BorderThickness="1"
- Focusable="False"
- FontFamily="Segoe UI"
- FontSize="14"
- IsReadOnly="True"
- Text="{Binding Model.FileName}">
- <TextBox.Resources>
- <Style TargetType="{x:Type Border}">
- <Setter Property="CornerRadius" Value="4" />
- </Style>
- </TextBox.Resources>
- </TextBox>
- <CheckBox
- Width="400"
- Height="22"
- Margin="0,8"
- HorizontalAlignment="Left"
- VerticalContentAlignment="Center"
- Content="{x:Static mainpage:MainPage.PageEdit_ShowOriginalFileNameInFront}"
- FontFamily="Segoe UI"
- FontSize="14"
- IsChecked="{Binding Model.IsSourceNameFront}" />
- <StackPanel Margin="0,0,0,8" Orientation="Horizontal">
- <CheckBox
- Name="ChkSign"
- Width="{Binding ElementName=ChkSeparator, Path=ActualWidth}"
- Margin="0,6"
- VerticalContentAlignment="Center"
- Content="{x:Static mainpage:MainPage.PageEdit_SplitLabel}"
- FontFamily="Segoe UI"
- FontSize="14"
- IsChecked="{Binding Model.HasLabel}" />
- <TextBox
- Width="120"
- Height="32"
- Margin="16,0"
- VerticalContentAlignment="Center"
- IsEnabled="{Binding ElementName=ChkSign, Path=IsChecked}"
- Text="{Binding Model.FileNameLabel, Mode=TwoWay, UpdateSourceTrigger=PropertyChanged}">
- <TextBox.Resources>
- <Style TargetType="{x:Type Border}">
- <Setter Property="CornerRadius" Value="4" />
- </Style>
- </TextBox.Resources>
- </TextBox>
- </StackPanel>
- <StackPanel Orientation="Horizontal">
- <CheckBox
- Name="ChkSeparator"
- Margin="0,6"
- VerticalContentAlignment="Center"
- Content="{x:Static mainpage:MainPage.PageEdit_SplitSeparator}"
- FontFamily="Segoe UI"
- FontSize="14"
- IsChecked="{Binding Model.HasDeimiter}" />
- <TextBox
- Width="120"
- Height="32"
- Margin="16,0"
- VerticalContentAlignment="Center"
- IsEnabled="{Binding ElementName=ChkSeparator, Path=IsChecked}"
- Text="{Binding Model.FileNameDeimiter, Mode=TwoWay, UpdateSourceTrigger=PropertyChanged}">
- <TextBox.Resources>
- <Style TargetType="{x:Type Border}">
- <Setter Property="CornerRadius" Value="4" />
- </Style>
- </TextBox.Resources>
- </TextBox>
- </StackPanel>
- </StackPanel>
- </Grid>
- </cus:DialogContent.Content>
- <cus:DialogContent.BottmBar>
- <Grid>
- <Button
- Width="98"
- Height="32"
- Margin="16,0"
- HorizontalAlignment="Right"
- Command="{Binding CancelCommand}"
- Content="{x:Static mainpage:MainPage.PageEdit_Cancel}"
- Style="{StaticResource btn.sec}" />
- <Button
- Width="98"
- Height="32"
- Margin="124,0"
- HorizontalAlignment="Right"
- Command="{Binding SplitCommnad}"
- Content="{x:Static mainpage:MainPage.PageEdit_Split}"
- Style="{StaticResource Btn.cta}" />
- </Grid>
- </cus:DialogContent.BottmBar>
- </cus:DialogContent>
- </UserControl>
|