Browse Source

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

liuaoran 2 years ago
parent
commit
29e2f626b3

+ 9 - 1
PDF Office/App.xaml.cs

@@ -74,7 +74,7 @@ namespace PDF_Office
         /// <summary>
         /// 内嵌文档路径
         /// </summary>
-        public static string GuidPDFPath = Path.Combine(Environment.CurrentDirectory, "Resources//GuidPDF//Quick Start Guide.pdf");
+        public static string GuidPDFPath = Path.Combine(Environment.CurrentDirectory, "Resources\\GuidPDF\\Quick Start Guide.pdf");
 
         /// <summary>
         /// 是否需要更新内嵌文档
@@ -105,9 +105,17 @@ namespace PDF_Office
         /// </summary>
         public static string modelFolderPath = null;
 
+        /// <summary>
+        /// 是否是软件的第一个主窗体
+        /// </summary>
         public static bool IsFirstOpen = true;
         public static bool IsBookMode = false;
 
+        /// <summary>
+        /// 是否已经登陆
+        /// </summary>
+        public static bool IsLogin = false;
+
         //是否需要显示注册弹窗
         //app第一次启动时需要弹出注册弹窗
         public static bool IsShowRegist = false;

+ 5 - 1
PDF Office/ViewModels/ViewContentViewModel.cs

@@ -507,7 +507,11 @@ namespace PDF_Office.ViewModels
             get { return isPorpertyOpen; }
             set
             {
-                SetProperty(ref isPorpertyOpen, value);
+                //如果设置为手动展开属性面板时,则不响应代码控制的展开
+                if (Settings.Default.AppProperties.InitialVIew.AutoExpandProperty)
+                {
+                    SetProperty(ref isPorpertyOpen, value);
+                }
             }
         }
 

+ 77 - 46
PDF Office/Views/MainWindow.xaml

@@ -22,8 +22,8 @@
     BorderThickness="2"
     Closed="Window_Closed"
     Closing="Window_Closing"
-    SizeChanged="Window_SizeChanged"
     PreviewMouseLeftButtonDown="Window_PreviewMouseLeftButtonDown"
+    SizeChanged="Window_SizeChanged"
     Style="{StaticResource WindowStyle}"
     UseLayoutRounding="True"
     WindowStartupLocation="CenterScreen"
@@ -233,7 +233,8 @@
             HorizontalAlignment="Right"
             Orientation="Horizontal"
             WindowChrome.IsHitTestVisibleInChrome="True">
-            <Grid Visibility="{Binding ElementName=Btn_Login,Path=Visibility}" >
+
+            <Grid Visibility="{Binding ElementName=Btn_Login, Path=Visibility}">
                 <Border VerticalAlignment="Center">
                     <Path Data="M0 4C0 1.79086 1.79086 0 4 0H132C134.209 0 136 1.79086 136 4V10.323C136 10.7319 136.249 11.0996 136.629 11.2514L141.179 13.0715C142.017 13.4068 142.017 14.5932 141.179 14.9285L136.629 16.7486C136.249 16.9004 136 17.2681 136 17.677V24C136 26.2091 134.209 28 132 28H4C1.79086 28 0 26.2091 0 24V4Z" Fill="#FFCF52" />
                 </Border>
@@ -253,21 +254,33 @@
                 Command="{Binding OpenRegisterCommand}"
                 Style="{StaticResource subToolBar}"
                 Visibility="{Binding RegisterVis, Mode=TwoWay}">
-                <Border
-                    Width="40"
-                    Height="40"
-                    Margin="-2,-2,0,0"
-                    Background="{StaticResource color.icon.base.neutral.norm.lv1}"
-                    BorderBrush="{StaticResource color.icon.base.neutral.norm.lv1}"
-                    BorderThickness="1"
-                    CornerRadius="100">
-                    <Path
-                        HorizontalAlignment="Center"
-                        VerticalAlignment="Center"
-                        Data="M12 13C14.2091 13 16 11.2091 16 9C16 6.79086 14.2091 5 12 5C9.79086 5 8 6.79086 8 9C8 11.2091 9.79086 13 12 13ZM12 31C17.5228 31 22 27.4183 22 23C22 18.5817 17.5228 15 12 15C6.47715 15 2 18.5817 2 23C2 27.4183 6.47715 31 12 31Z"
-                        Fill="White" />
-                </Border>
+                <Grid>
+                    <Border
+                        x:Name="myBorder1"
+                        Width="24"
+                        Height="24"
+                        Background="White"
+                        CornerRadius="12" />
+                    <Border
+                        Width="24"
+                        Height="24"
+                        Background="{StaticResource color.icon.base.neutral.norm.lv1}"
+                        BorderBrush="{StaticResource color.icon.base.neutral.norm.lv1}">
+                        <Path Data="M12 13C14.2091 13 16 11.2091 16 9C16 6.79086 14.2091 5 12 5C9.79086 5 8 6.79086 8 9C8 11.2091 9.79086 13 12 13ZM12 31C17.5228 31 22 27.4183 22 23C22 18.5817 17.5228 15 12 15C6.47715 15 2 18.5817 2 23C2 27.4183 6.47715 31 12 31Z" Fill="White" />
+                        <Border.OpacityMask>
+                            <VisualBrush Visual="{Binding ElementName=myBorder1}" />
+                        </Border.OpacityMask>
+                    </Border>
+                    <Border
+                        Width="24"
+                        Height="24"
+                        BorderBrush="{StaticResource color.icon.base.neutral.norm.lv1}"
+                        BorderThickness="2"
+                        CornerRadius="100" />
+                </Grid>
+
             </Button>
+
             <Button
                 x:Name="Btn_Login"
                 Width="40"
@@ -276,22 +289,30 @@
                 Command="{Binding OpenLoginCommand}"
                 Style="{StaticResource subToolBar}"
                 Visibility="{Binding LoginVis, Mode=TwoWay}">
-                <Border
-                    Width="40"
-                    Height="40"
-                    Margin="-2,-2,0,0"
-                    HorizontalAlignment="Center"
-                    VerticalAlignment="Center"
-                    Background="{StaticResource color.icon.base.neutral.norm.lv1}"
-                    BorderBrush="{StaticResource color.icon.base.neutral.norm.lv1}"
-                    BorderThickness="1"
-                    CornerRadius="100">
-                    <Path
-                        HorizontalAlignment="Center"
-                        VerticalAlignment="Center"
-                        Data="M12 13C14.2091 13 16 11.2091 16 9C16 6.79086 14.2091 5 12 5C9.79086 5 8 6.79086 8 9C8 11.2091 9.79086 13 12 13ZM12 31C17.5228 31 22 27.4183 22 23C22 18.5817 17.5228 15 12 15C6.47715 15 2 18.5817 2 23C2 27.4183 6.47715 31 12 31Z"
-                        Fill="White" />
-                </Border>
+                <Grid>
+                    <Border
+                        x:Name="myBorder2"
+                        Width="24"
+                        Height="24"
+                        Background="White"
+                        CornerRadius="12" />
+                    <Border
+                        Width="24"
+                        Height="24"
+                        Background="{StaticResource color.icon.base.neutral.norm.lv1}"
+                        BorderBrush="{StaticResource color.icon.base.neutral.norm.lv1}">
+                        <Path Data="M12 13C14.2091 13 16 11.2091 16 9C16 6.79086 14.2091 5 12 5C9.79086 5 8 6.79086 8 9C8 11.2091 9.79086 13 12 13ZM12 31C17.5228 31 22 27.4183 22 23C22 18.5817 17.5228 15 12 15C6.47715 15 2 18.5817 2 23C2 27.4183 6.47715 31 12 31Z" Fill="White" />
+                        <Border.OpacityMask>
+                            <VisualBrush Visual="{Binding ElementName=myBorder2}" />
+                        </Border.OpacityMask>
+                    </Border>
+                    <Border
+                        Width="24"
+                        Height="24"
+                        BorderBrush="{StaticResource color.icon.base.neutral.norm.lv1}"
+                        BorderThickness="2"
+                        CornerRadius="100" />
+                </Grid>
             </Button>
             <Button
                 x:Name="Btn_User"
@@ -301,20 +322,30 @@
                 Command="{Binding OpenUserCommand}"
                 Style="{StaticResource subToolBar}"
                 Visibility="{Binding UserVis, Mode=TwoWay}">
-                <Border
-                    Width="40"
-                    Height="40"
-                    Margin="-2,-2,0,0"
-                    Background="#1770F4"
-                    BorderBrush="{StaticResource color.icon.base.neutral.norm.lv1}"
-                    BorderThickness="1"
-                    CornerRadius="100">
-                    <Path
-                        HorizontalAlignment="Center"
-                        VerticalAlignment="Center"
-                        Data="M12 13C14.2091 13 16 11.2091 16 9C16 6.79086 14.2091 5 12 5C9.79086 5 8 6.79086 8 9C8 11.2091 9.79086 13 12 13ZM12 31C17.5228 31 22 27.4183 22 23C22 18.5817 17.5228 15 12 15C6.47715 15 2 18.5817 2 23C2 27.4183 6.47715 31 12 31Z"
-                        Fill="White" />
-                </Border>
+                <Grid>
+                    <Border
+                        x:Name="myBorder3"
+                        Width="24"
+                        Height="24"
+                        Background="White"
+                        CornerRadius="12" />
+                    <Border
+                        Width="24"
+                        Height="24"
+                        Background="#1770F4"
+                        BorderBrush="{StaticResource color.icon.base.neutral.norm.lv1}">
+                        <Path Data="M12 13C14.2091 13 16 11.2091 16 9C16 6.79086 14.2091 5 12 5C9.79086 5 8 6.79086 8 9C8 11.2091 9.79086 13 12 13ZM12 31C17.5228 31 22 27.4183 22 23C22 18.5817 17.5228 15 12 15C6.47715 15 2 18.5817 2 23C2 27.4183 6.47715 31 12 31Z" Fill="White" />
+                        <Border.OpacityMask>
+                            <VisualBrush Visual="{Binding ElementName=myBorder3}" />
+                        </Border.OpacityMask>
+                    </Border>
+                    <Border
+                        Width="24"
+                        Height="24"
+                        BorderBrush="#1770F4"
+                        BorderThickness="2"
+                        CornerRadius="100" />
+                </Grid>
             </Button>
             <Separator BorderBrush="#94989C" BorderThickness="1">
                 <Separator.LayoutTransform>

+ 1 - 1
PDFSettings/APPSettingProperties.cs

@@ -150,7 +150,7 @@ namespace PDFSettings
         /// <summary>
         /// 属性面板 手动展开
         /// </summary>
-        public bool ClickOpenProperty = true;
+        public bool ClickOpenProperty = false;
 
         /// <summary>
         /// 阅读页背景色