Kaynağa Gözat

阅读页-快捷键

liuaoran 2 yıl önce
ebeveyn
işleme
9288e00dbb

+ 28 - 3
PDF Office/Views/BottomToolContent.xaml

@@ -18,7 +18,28 @@
     BorderBrush="{StaticResource color.sys.layout.divider}"
     BorderThickness="0,1,0,0"
     mc:Ignorable="d">
-    <UserControl.Resources />
+    <UserControl.Resources >
+        <RoutedUICommand x:Key="SetSinglePage" Text="SetSinglePage"/>
+        <RoutedUICommand x:Key="SetDoublePage" Text="SetDoublePage"/>
+    </UserControl.Resources>
+    <UserControl.InputBindings>
+        <KeyBinding Command="{Binding FirstPageCommand}" Modifiers="Ctrl" Key="Up" />
+        <KeyBinding Command="{Binding LastPageCommand}"  Modifiers="Ctrl" Key="Down"  />
+        <KeyBinding Command="{Binding PrePageCommand}" Modifiers="Ctrl" Key="Left" ></KeyBinding>
+        <KeyBinding Command="{Binding NextPageCommand}" Modifiers="Ctrl" Key="Right" ></KeyBinding>
+        <KeyBinding Command="{Binding PreViewCommand}" Modifiers="Ctrl" Key="OemOpenBrackets"></KeyBinding>
+        <KeyBinding Command="{Binding PreViewCommand}" Modifiers="Ctrl" Key="OemCloseBrackets"></KeyBinding>
+        <KeyBinding Command="{Binding PageTextKeyDownCommand}" Modifiers="Ctrl+Alt" Key="G"></KeyBinding>
+        <KeyBinding Command="{Binding ZoomInCommand}" Modifiers="Ctrl" Key="OemPlus"></KeyBinding>
+        <KeyBinding Command="{Binding ZoomInCommand}" Modifiers="Ctrl+Shift" Key="OemPlus"></KeyBinding>
+        <KeyBinding Command="{Binding ZoomOutCommand}" Modifiers="Ctrl" Key="OemMinus"></KeyBinding>
+        <KeyBinding Command="{StaticResource SetSinglePage}" Gesture="Ctrl+1" ></KeyBinding>
+        <KeyBinding Command="{StaticResource SetDoublePage}" Gesture="Ctrl+2" ></KeyBinding>
+    </UserControl.InputBindings>
+    <UserControl.CommandBindings>
+        <CommandBinding x:Name="SetSinglePageCommand" Command="{StaticResource SetSinglePage}" Executed="SetSinglePageCommand_Executed"/>
+        <CommandBinding x:Name="SetDoublePageCommand" Command="{StaticResource SetDoublePage}" Executed="SetDoublePageCommand_Executed"/>
+    </UserControl.CommandBindings>
     <Grid Height="32" Background="{StaticResource color.sys.layout.mg}">
         <Grid.ColumnDefinitions>
             <ColumnDefinition Width="*" />
@@ -35,14 +56,16 @@
                 Height="24"
                 Margin="4"
                 Command="{Binding FirstPageCommand}"
-                Style="{StaticResource btn.selector}">
+                Style="{StaticResource btn.selector}"
+                >
                 <Path
                     Width="24"
                     Height="24"
                     HorizontalAlignment="Center"
                     VerticalAlignment="Center"
                     Data="M5.25 6V18H6.75V6H5.25ZM12.8803 8.93035L10.5607 11.25H18.95V12.75H10.5607L12.8803 15.0696L11.8196 16.1303L8.21967 12.5303C7.92678 12.2374 7.92678 11.7626 8.21967 11.4697L11.8196 7.86969L12.8803 8.93035Z"
-                    Fill="{StaticResource color.icon.base.neutral.norm.lv1}" />
+                    Fill="{StaticResource color.icon.base.neutral.norm.lv1}" >
+                </Path>
             </Button>
             <Button
                 Width="24"
@@ -174,6 +197,7 @@
                 Width="24"
                 Height="24"
                 Margin="4"
+                Name="SinglePage_Btn"
                 Command="{Binding SetViewModeCommand}"
                 IsChecked="{Binding IsSingleView}"
                 Style="{StaticResource StateBarRbt}">
@@ -190,6 +214,7 @@
                 Width="24"
                 Height="24"
                 Margin="4"
+                Name="DoublePage_Btn"
                 Command="{Binding SetViewModeCommand}"
                 Cursor="Hand"
                 IsChecked="{Binding IsDoubleView}"

+ 13 - 0
PDF Office/Views/BottomToolContent.xaml.cs

@@ -24,5 +24,18 @@ namespace PDF_Office.Views
         {
             InitializeComponent();
         }
+
+        private void SetSinglePageCommand_Executed(object sender, ExecutedRoutedEventArgs e)
+        {
+            this.SinglePage_Btn.IsChecked = true;
+            this.DoublePage_Btn.IsChecked = false;
+
+        }
+
+        private void SetDoublePageCommand_Executed(object sender, ExecutedRoutedEventArgs e)
+        {
+            this.SinglePage_Btn.IsChecked = false;
+            this.DoublePage_Btn.IsChecked = true;
+        }
     }
 }

+ 5 - 0
PDF Office/Views/PropertyPanel/ViewModular/ViewModularContent.xaml

@@ -26,6 +26,11 @@
             <PathGeometry x:Key="SinglePage " Figures="M3.5 1.75C3.5 1.61193 3.61193 1.5 3.75 1.5H8.5V4.75C8.5 5.16421 8.83579 5.5 9.25 5.5H12.5V14.25C12.5 14.3881 12.3881 14.5 12.25 14.5H3.75C3.61193 14.5 3.5 14.3881 3.5 14.25V1.75ZM11.4393 4L10 2.56066V4H11.4393ZM3.75 0C2.7835 0 2 0.783501 2 1.75V14.25C2 15.2165 2.7835 16 3.75 16H12.25C13.2165 16 14 15.2165 14 14.25V5.16421C14 4.70008 13.8156 4.25497 13.4874 3.92678L10.0732 0.512563C9.74503 0.184374 9.29992 0 8.83579 0H3.75Z" />
         </ResourceDictionary>
     </UserControl.Resources>
+    <UserControl.InputBindings>
+        <KeyBinding Command="{Binding OpenFullCommand}" Gesture="F11" />
+    </UserControl.InputBindings>
+    
+    
     <ScrollViewer VerticalScrollBarVisibility="Auto">
         <StackPanel Margin="5,0,5,0">
             <TextBlock

+ 4 - 1
PDF Office/Views/ViewContent.xaml

@@ -22,6 +22,7 @@
     Drop="UserControl_Drop"
     KeyDown="UserControl_KeyDown"
     mc:Ignorable="d">
+
     <i:Interaction.Triggers>
         <i:EventTrigger EventName="Loaded">
             <prism:InvokeCommandAction Command="{Binding Load}" />
@@ -30,6 +31,7 @@
             <prism:InvokeCommandAction Command="{Binding MouseDown}" />
         </i:EventTrigger>
     </i:Interaction.Triggers>
+    
     <UserControl.Resources>
         <ResourceDictionary>
             <ResourceDictionary.MergedDictionaries>
@@ -41,9 +43,10 @@
                 <Setter Property="Height" Value="20" />
             </Style>
             <convert:BoolToVisible x:Key="BoolToVisibleConvert" />
-        </ResourceDictionary>
+      </ResourceDictionary>
     </UserControl.Resources>
 
+    
     <Grid Background="{StaticResource color.sys.layout.mg}">
         <Grid.RowDefinitions>
             <RowDefinition Name="HeadRow" Height="40" />