Browse Source

综合-合并错误,注释-内容选择-enter键返回

OYXH\oyxh 2 years ago
parent
commit
341f35e515

+ 11 - 11
PDF Office/App.xaml

@@ -130,7 +130,7 @@
                                         <Border
                                             x:Name="SubMenuBorder"
                                             Padding="2,2,2,2"
-                                            Background="{TemplateBinding Background}"
+                                            Background="{StaticResource color.sys.layout.mg}"
                                             BorderBrush="#999999"
                                             BorderThickness="0"
                                             CornerRadius="7">
@@ -326,10 +326,10 @@
                                     </MultiTrigger.Setters>
                                 </MultiTrigger>
                                 <!--<Trigger Property="IsPressed" Value="true">
-                                    <Setter TargetName="checkBoxBorder" Property="Background" Value="{StaticResource OptionMark.Pressed.Background}" />
-                                    <Setter TargetName="checkBoxBorder" Property="BorderBrush" Value="{StaticResource OptionMark.Pressed.Border}" />
-                                    <Setter TargetName="optionMark" Property="Fill" Value="{StaticResource OptionMark.Pressed.Glyph}" />
-                                    <Setter TargetName="indeterminateMark" Property="Fill" Value="{StaticResource OptionMark.Pressed.Glyph}" />
+                                <Setter TargetName="checkBoxBorder" Property="Background" Value="{StaticResource OptionMark.Pressed.Background}" />
+                                <Setter TargetName="checkBoxBorder" Property="BorderBrush" Value="{StaticResource OptionMark.Pressed.Border}" />
+                                <Setter TargetName="optionMark" Property="Fill" Value="{StaticResource OptionMark.Pressed.Glyph}" />
+                                <Setter TargetName="indeterminateMark" Property="Fill" Value="{StaticResource OptionMark.Pressed.Glyph}" />
                                 </Trigger>-->
                                 <Trigger Property="IsChecked" Value="true">
                                     <Setter TargetName="optionMark" Property="Opacity" Value="1" />
@@ -798,7 +798,7 @@
                             <ControlTemplate.Triggers>
                                 <!--<Trigger Property="HasContent" Value="true">
                                 <Setter Property="Padding" Value="4,-1,0,0" />
-                            </Trigger>-->
+                                </Trigger>-->
                                 <Trigger Property="IsMouseOver" Value="true">
                                     <Setter TargetName="radioButtonBorder" Property="BorderBrush" Value="{StaticResource color.icon.checkbox-radio.hov.border}" />
                                 </Trigger>
@@ -808,10 +808,10 @@
                                     <Setter TargetName="optionMark" Property="Fill" Value="{StaticResource color.icon.checkbox-radio.dis.fill}" />
                                 </Trigger>
                                 <!--<Trigger Property="IsPressed" Value="true">
-                                <Setter Property="Background" TargetName="radioButtonBorder" Value="{StaticResource RadioButton.Pressed.Background2}"/>
-                                <Setter Property="BorderBrush" TargetName="radioButtonBorder" Value="{StaticResource RadioButton.Pressed.Border}"/>
-                                <Setter Property="Fill" TargetName="optionMark" Value="{StaticResource RadioButton.Pressed.Glyph2}"/>
-                            </Trigger>-->
+                                <Setter Property="Background" TargetName="radioButtonBorder" Value="{StaticResource RadioButton.Pressed.Background2}" />
+                                <Setter Property="BorderBrush" TargetName="radioButtonBorder" Value="{StaticResource RadioButton.Pressed.Border}" />
+                                <Setter Property="Fill" TargetName="optionMark" Value="{StaticResource RadioButton.Pressed.Glyph2}" />
+                                </Trigger>-->
                                 <Trigger Property="IsChecked" Value="true">
                                     <Setter TargetName="optionMark" Property="Opacity" Value="1" />
                                     <Setter TargetName="radioButtonBorder" Property="BorderBrush" Value="{StaticResource color.icon.checkbox-radio.hov.border}" />
@@ -826,4 +826,4 @@
             </Style>
         </ResourceDictionary>
     </Application.Resources>
-</prism:PrismApplication>
+</prism:PrismApplication>

File diff suppressed because it is too large
+ 3 - 4
PDF Office/App.xaml.cs


+ 1 - 1
PDF Office/ViewModels/PropertyPanel/AnnotPanel/SnapshotEditMenuViewModel.cs

@@ -31,7 +31,7 @@ using static Dropbox.Api.Sharing.ListFileMembersIndividualResult;
 
 namespace PDF_Office.ViewModels.PropertyPanel.AnnotPanel
 {
-    internal class SnapshotEditMenuViewModel : BindableBase
+    public class SnapshotEditMenuViewModel : BindableBase
     {
         public CustomIconToggleBtn ToggleBtn { get; set; }
         public SnapshotEditToolArgs SnapToolArgs { get; set; }

+ 1 - 2
PDF Office/ViewModels/PropertyPanel/ViewModular/SplitScreenContentViewModel.cs

@@ -175,7 +175,7 @@ namespace PDF_Office.ViewModels.PropertyPanel.ViewModular
                 //CheckViewer(SplitViewRegionName, PDFViewer);
                 region.AddToRegion(SplitViewRegionName, SplitScreenPDFViewer);
 
-                App.SplitScreenPDFViewer = SplitScreenPDFViewer;
+                //App.SplitScreenPDFViewer = SplitScreenPDFViewer;
                 SplitScreenPDFViewer.MouseWheelZoomHandler += PdfViewer_MouseWheelZoomHandler;
 
                 PDFViewerVisibility = Visibility.Visible;
@@ -342,7 +342,6 @@ namespace PDF_Office.ViewModels.PropertyPanel.ViewModular
             }
         }
 
-
         private void PDFViewer_InfoChanged(object sender, KeyValuePair<string, object> e)
         {
             if (e.Key == "ViewMode")

+ 3 - 0
PDF Office/ViewModels/Tools/AnnotToolContentViewModel.Function.cs

@@ -614,6 +614,9 @@ namespace PDF_Office.ViewModels.Tools
             snapshotArgs.ControlPointColor = Colors.White;
             snapshotArgs.BgColor = Color.FromArgb(0x99, 0x00, 0x00, 0x00);
             snapshotArgs.LineColor = Color.FromArgb(0xFF, 0x47, 0x7E, 0xDE);
+            SnapshotEditMenuViewModel.SnapToolArgs = snapshotArgs;
+            SnapshotEditMenuViewModel.PDFViewer = PDFViewer;
+            SnapshotEditMenuViewModel.SnapToolEvent += SnapshotEditMenuViewModel_SnapToolEvent; ;
 
             #region to do
 

File diff suppressed because it is too large
+ 586 - 582
PDF Office/ViewModels/Tools/AnnotToolContentViewModel.cs


+ 0 - 1
PDF Office/Views/BOTA/AnnotationContent.xaml

@@ -256,7 +256,6 @@
                                 </MenuItem.Header>
                                 <MenuItem
                                     Name="MenuPageSort"
-                                    Background="Red"
                                     Command="{Binding PageSortCommand}">
                                     <!--<MenuItem.Icon>
                                     <Path

+ 20 - 3
PDF Office/Views/ViewContent.xaml.cs

@@ -3,7 +3,9 @@ using ComPDFKitViewer.PdfViewer;
 using PDF_Office.EventAggregators;
 using PDF_Office.Model;
 using PDF_Office.ViewModels;
+using PDF_Office.ViewModels.Tools;
 using PDF_Office.Views.PropertyPanel.ViewModular;
+using PDF_Office.Views.Tools;
 using Prism.Events;
 using Prism.Regions;
 using System;
@@ -91,9 +93,24 @@ namespace PDF_Office.Views
             {
                 if (viewModel != null)
                 {
-                    //App.IsBookMode = false;
-                    //SetReadMode(false);
-                    viewModel.UnReadModel();
+                    if (viewModel.PDFViewer.MouseMode != MouseModes.PanTool)
+                    {
+                        if (this.ContentToolsBar.Content is AnnotToolContent annotTool)
+                        {
+                            AnnotToolContentViewModel model = (AnnotToolContentViewModel)annotTool.DataContext;
+                            if (model != null)
+                            {
+                                if (model.SnapshotEditMenuViewModel.SnapToolArgs != null)
+                                {
+                                    model.SnapshotEditMenuViewModel.SnapToolArgs.ReSnapshot();
+                                }
+                            }
+                        }
+                    }
+                    else
+                    {
+                        viewModel.UnReadModel();
+                    }
                 }
             }
         }