Ver código fonte

Merge branch 'dev' of http://git.kdan.cc:8865/Windows/PDFOffice_Windows_exe into dev

# Conflicts:
#	PDF Office/ViewModels/BottomToolContentViewModel.cs
OYXH\oyxh 1 ano atrás
pai
commit
5f9de4d9b3

BIN
PDF Office/ComPDFKit.Viewer.dll


+ 32 - 24
PDF Office/ViewModels/BottomToolContentViewModel.cs

@@ -346,33 +346,41 @@ namespace PDF_Master.ViewModels
 
         private void ShowViewModularEvent(object obj)
         {
-            ViewContentViewModel.IsPropertyOpen = true;
+       
             if (region.Regions.ContainsRegionWithName(ViewContentViewModel.PropertyRegionName))
             {
-                NavigationParameters param = new NavigationParameters();
-                param.Add(ParameterNames.PDFViewer, PDFViewer);
-                param.Add(ParameterNames.BottomToolContentViewModel, this);
-                region.RequestNavigate(RegionNames.PropertyRegionName, "ViewModularContent", param);
-                //var views = region.Regions[ViewContentViewModel.PropertyRegionName].Views;
-                //var item = views.FindFirst(p => p is ViewModularContent);
-                //if (item == null)
-                //{
-                //    NavigationParameters param = new NavigationParameters();
-                //    param.Add(ParameterNames.PDFViewer, PDFViewer);
-                //    param.Add(ParameterNames.BottomToolContentViewModel, this);
-                //    region.RequestNavigate(RegionNames.PropertyRegionName, "ViewModularContent", param);
-                //}
-                //else
-                //{
-                //    if (item is ViewModularContent viewModular)
-                //    {
-                //        var contentRegion = region.Regions[ViewContentViewModel.PropertyRegionName];
-                //        contentRegion.Activate(viewModular);
-                //    }
-                //}
+                var check = (bool)obj;
+                if (check)
+                {
+                    ViewContentViewModel.IsPropertyOpen = true;
+                    //NavigationParameters param = new NavigationParameters();
+                    //param.Add(ParameterNames.PDFViewer, PDFViewer);
+                    //param.Add(ParameterNames.BottomToolContentViewModel, this);
+                    //region.RequestNavigate(RegionNames.PropertyRegionName, "ViewModularContent", param);
+                    var views = region.Regions[ViewContentViewModel.PropertyRegionName].Views;
+                    var item = views.FindFirst(p => p is ViewModularContent);
+                    if (item == null)
+                    {
+                        NavigationParameters param = new NavigationParameters();
+                        param.Add(ParameterNames.PDFViewer, PDFViewer);
+                        param.Add(ParameterNames.BottomToolContentViewModel, this);
+                        region.RequestNavigate(RegionNames.PropertyRegionName, "ViewModularContent", param);
+                    }
+                    else
+                    {
+                        if (item is ViewModularContent viewModular)
+                        {
+                            var contentRegion = region.Regions[ViewContentViewModel.PropertyRegionName];
+                            contentRegion.Activate(viewModular);
+                        }
+                    }
+                }
+                else
+                {
+                    ViewContentViewModel.IsPropertyOpen = false;
+                    region.RequestNavigate(RegionNames.PropertyRegionName, "PropertyPanelContent");
+                }
             }
-
-            IsShowViewModular = ViewContentViewModel.IsPropertyOpen;
         }
 
         private void SelectionChangedEvent(object e)

+ 2 - 1
PDF Office/Views/BottomToolContent.xaml

@@ -116,8 +116,8 @@
                     Fill="{StaticResource color.icon.base.neutral.norm.lv1}" />
             </Button>
             <cus:TextBoxEx
-                Height="24"
                 Width="57"
+                Height="24"
                 InputMethod.IsInputMethodEnabled="False"
                 ShowClose="False"
                 Text="{Binding CurrentPage}">
@@ -283,6 +283,7 @@
                 Height="24"
                 Margin="4"
                 Command="{Binding ShowViewModularCommand}"
+                CommandParameter="{Binding ElementName=TbtnIsViewPanelOpen, Path=IsChecked}"
                 IsChecked="{Binding IsShowViewModular}"
                 Style="{StaticResource SubToolbarTgb}">
                 <Path Data="M1.5 13V3H7.25V13H1.5ZM8.75 13H14.5V3H8.75V13ZM0 2.5C0 1.94772 0.447715 1.5 1 1.5H15C15.5523 1.5 16 1.94772 16 2.5V13.5C16 14.0523 15.5523 14.5 15 14.5H1C0.447715 14.5 0 14.0523 0 13.5V2.5ZM3 6.25H6V7.75H3V6.25ZM6 9.25H3V10.75H6V9.25Z" Fill="{StaticResource color.icon.base.neutral.norm.lv1}" />

BIN
PDF Office/x64/ComPDFKit.dll


BIN
PDF Office/x86/ComPDFKit.dll