Parcourir la source

Merge branch 'dev' into beta

liyijie il y a 1 an
Parent
commit
d655adef29

+ 56 - 42
PDF Office/App.xaml.cs

@@ -219,59 +219,73 @@ namespace PDF_Master
 
         private void InitSettings()
         {
-            //是否是更新后
-            if (Settings.Default.UpdateSettings)
+            try
             {
-                //内嵌文档更新时 显示文档到最前方
-                //每次版本更新留意检查IsGuidPDFUpdated 值,如果没有内嵌文档更新,要设为false
-                if (Settings.Default.IsGuidPDFUpdated)
+                //是否是更新后
+                if (Settings.Default.UpdateSettings)
                 {
-                    App.IsGuidPDFUpdated = true;
-                    Settings.Default.IsGuidPDFUpdated = false;
-                }
+                    //内嵌文档更新时 显示文档到最前方
+                    //每次版本更新留意检查IsGuidPDFUpdated 值,如果没有内嵌文档更新,要设为false
+                    if (Settings.Default.IsGuidPDFUpdated)
+                    {
+                        App.IsGuidPDFUpdated = true;
+                        Settings.Default.IsGuidPDFUpdated = false;
+                    }
 
-                Settings.Default.Upgrade();
-                Settings.Default.UpdateSettings = false;
-                //重置用于弹窗的记录参数
-            }
-            if (Settings.Default.ADDate == null)
-            {
-                Settings.Default.ADDate = new PDFSettings.ADDate();
-            }
+                    Settings.Default.Upgrade();
+                    Settings.Default.UpdateSettings = false;
+                    //清除OCR下载内容
+                    if (Settings.Default.AppProperties == null)
+                    {
+                        Settings.Default.AppProperties = new PDFSettings.APPSettingProperties();
+                    }
+                    Settings.Default.AppProperties.OCRFile_Url = "";
+                    Settings.Default.AppProperties.OCRmodelMD5 = "";
 
-            if (Settings.Default.PDFEditList == null)
-            {
-                Settings.Default.PDFEditList = new PDFSettings.PDFEditList();
-            }
-            if (Settings.Default.UserDate == null)
-            {
-                Settings.Default.UserDate = new PDFSettings.UserDate();
-            }
+                    //重置用于弹窗的记录参数
+                }
+                if (Settings.Default.ADDate == null)
+                {
+                    Settings.Default.ADDate = new PDFSettings.ADDate();
+                }
 
-            if (Settings.Default.AppProperties == null)
-            {
-                Settings.Default.AppProperties = new PDFSettings.APPSettingProperties();
-            }
+                if (Settings.Default.PDFEditList == null)
+                {
+                    Settings.Default.PDFEditList = new PDFSettings.PDFEditList();
+                }
+                if (Settings.Default.UserDate == null)
+                {
+                    Settings.Default.UserDate = new PDFSettings.UserDate();
+                }
 
-            if (Settings.Default.RecentOpenFiles == null)
-            {
-                Settings.Default.RecentOpenFiles = new RecentOpenFiles();
-            }
+                if (Settings.Default.AppProperties == null)
+                {
+                    Settings.Default.AppProperties = new PDFSettings.APPSettingProperties();
+                }
+
+                if (Settings.Default.RecentOpenFiles == null)
+                {
+                    Settings.Default.RecentOpenFiles = new RecentOpenFiles();
+                }
 
-            if (Settings.Default.RedactionsSettings == null)
-                Settings.Default.RedactionsSettings = new PDFSettings.RedactionSettings();
+                if (Settings.Default.RedactionsSettings == null)
+                    Settings.Default.RedactionsSettings = new PDFSettings.RedactionSettings();
 
-            if (Settings.Default.AppProperties == null)
-                Settings.Default.AppProperties = new PDFSettings.APPSettingProperties();
+                if (Settings.Default.AppProperties == null)
+                    Settings.Default.AppProperties = new PDFSettings.APPSettingProperties();
 
-            if (Settings.Default.AllPDFToolsList == null)
-                Settings.Default.AllPDFToolsList = new PDFSettings.AllPDFToolsList();
+                if (Settings.Default.AllPDFToolsList == null)
+                    Settings.Default.AllPDFToolsList = new PDFSettings.AllPDFToolsList();
 
-            if (Settings.Default.QuickPDFToolsList == null)
-                Settings.Default.QuickPDFToolsList = new PDFSettings.QuickPDFToolsList();
+                if (Settings.Default.QuickPDFToolsList == null)
+                    Settings.Default.QuickPDFToolsList = new PDFSettings.QuickPDFToolsList();
 
-            if (Settings.Default.PresetFontList == null)
-                Settings.Default.PresetFontList = new PDFSettings.PresetFontList();
+                if (Settings.Default.PresetFontList == null)
+                    Settings.Default.PresetFontList = new PDFSettings.PresetFontList();
+            }
+            catch { 
+            
+            }
         }
 
         protected override void OnStartup(StartupEventArgs e)

+ 6 - 0
PDF Office/Helper/FileComparisonHelper.cs

@@ -178,6 +178,12 @@ namespace PDF_Master.Helper
                             //获取OCRMD5
                             XmlAttribute ocrUrlAttributemd5 = itemNode.Attributes["ocrmd5"];
                             Settings.Default.AppProperties.OCRmodelMD5 = ocrUrlAttributemd5?.Value;
+                            //删除Xml文件
+                            string folderzipPath = System.IO.Path.Combine(App.CurrentPath, "AppXml");
+                            if (Directory.Exists(folderzipPath))
+                            {
+                                Directory.Delete(folderzipPath, true);
+                            }
                             return true;
                         }
                     }

+ 33 - 17
PDF Office/ViewModels/Tools/TextEditToolContentViewModel.cs

@@ -697,28 +697,44 @@ namespace PDF_Master.ViewModels.Tools
             }
         }
 
-        private void PDFViewer_PDFEditHandler(object sender, List<PDFEditSelectionData> e)
+        private async void PDFViewer_PDFEditHandler(object sender, List<PDFEditSelectionData> e)
         {
-            if (e != null && e.Count > 0)
-            {
-                foreach (var item in e)
-                {
-                    if (item is PDFEditSelectionData editSelectionData)
-                    {
-                        switch (editSelectionData.Action)
-                        {
-                            case ActionType.Add:
-                                PDFViewer.ClearSelectPDFEdit();
-                                PDFViewer.SelectPDFEdit(e, true);
-                                break;
+            #region 后续 Undo 操作
 
-                            case ActionType.Modify:
+            //if (e != null && e.Count > 0)
+            //{
+            //    foreach (var item in e)
+            //    {
+            //        if (item is PDFEditSelectionData editSelectionData)
+            //        {
+            //            switch (editSelectionData.Action)
+            //            {
+            //                case ActionType.Add:
+            //                    PDFViewer.ClearSelectPDFEdit();
+            //                    PDFViewer.SelectPDFEdit(e, true);
+            //                    break;
+
+            //                case ActionType.Modify:
+
+            //                    break;
+            //            }
+            //        }
+            //    }
+            //}
 
-                                break;
-                        }
-                    }
+            #endregion 后续 Undo 操作
+
+            PDFViewer.ClearSelectPDFEdit();
+            if (e != null)
+            {
+                //需要区分 图片和文本,不然框选添加 文本,会出现光标消失
+                if (e[0].EditType == CPDFEditType.EditImage)
+                {
+                    //延时 =》添加图片,弹出系统文件弹窗,双击选中图片后添加到页面上,需要选中图片
+                    await Task.Delay(50);
                 }
             }
+            PDFViewer.SelectPDFEdit(e, true);
         }
 
         protected PDFEditEvent TextEditEvent;

+ 6 - 5
PDF Office/Views/Dialog/ConverterDialogs/ConverterWordDialog.xaml

@@ -42,6 +42,7 @@
                                     Padding="8,0,0,0"
                                     Command="{Binding RadioButtonCommand}"
                                     CommandParameter="{Binding ElementName=FlowingTextRadioBtn, Path=Name}"
+                                    IsChecked="True"
                                     Style="{StaticResource RadioButtonStyleText}">
                                     <TextBlock Text="Retain Flowing Text" />
                                 </RadioButton>
@@ -51,7 +52,7 @@
                                     Padding="8,0,0,0"
                                     Command="{Binding RadioButtonCommand}"
                                     CommandParameter="{Binding ElementName=PageLayoutRadioBtn, Path=Name}"
-                                    IsChecked="True"
+                                    IsChecked="False"
                                     Style="{StaticResource RadioButtonStyleText}">
                                     <TextBlock Text="Retain Page Layout" />
                                 </RadioButton>
@@ -158,15 +159,15 @@
                             <TextBlock Text="{Binding TextUpgrade}" />
                         </Underline>
                     </TextBlock>
-                </StackPanel>            
+                </StackPanel>
             </Grid>
         </cus:DialogContent.Content>
         <cus:DialogContent.BottmBar>
             <Grid>
                 <!--<Button Background="WhiteSmoke" Width="98" Height="32" Margin="0,0,350,0" Command="{Binding BatchConverterCommand}" Style="{StaticResource btn.sec}">
-                    <Border>
-                        <TextBlock Text="批量处理" ></TextBlock>
-                    </Border>
+                <Border>
+                <TextBlock Text="批量处理" ></TextBlock>
+                </Border>
                 </Button>-->
                 <Button
                     Width="98"

+ 1 - 1
PDF Office/Views/Dialog/ServiceDialog/LoginoffDialog.xaml

@@ -61,7 +61,7 @@
                         </Hyperlink>
                     </TextBlock>
                     <StackPanel
-                        Margin="150,0,0,0"
+                        Margin="30,0,0,0"
                         DockPanel.Dock="Right"
                         Orientation="Horizontal">
                         <Button

+ 106 - 106
PDF Office/Views/MainWindow.xaml

@@ -16,7 +16,6 @@
     Height="800"
     MinWidth="640"
     MinHeight="460"
-    Loaded="Window_Loaded"
     d:DataContext="{d:DesignInstance Type=viewmodels:MainWindowViewModel}"
     prism:ViewModelLocator.AutoWireViewModel="True"
     Activated="Window_Activated"
@@ -24,6 +23,7 @@
     BorderThickness="2"
     Closed="Window_Closed"
     Closing="Window_Closing"
+    Loaded="Window_Loaded"
     PreviewMouseLeftButtonDown="Window_PreviewMouseLeftButtonDown"
     SizeChanged="Window_SizeChanged"
     SnapsToDevicePixels="True"
@@ -183,7 +183,7 @@
                                     </MultiDataTrigger.Conditions>
                                     <Setter TargetName="Title" Property="Background" Value="#0D000000" />
                                     <Setter Property="Foreground" Value="{StaticResource color.sys.text.neutral.lv1}" />
-                                    <!--<Setter TargetName="btnPath" Property="Path.Fill" Value="Black"/>-->
+                                    <!--<Setter TargetName="btnPath" Property="Path.Fill" Value="Black" />-->
                                 </MultiDataTrigger>
                             </ControlTemplate.Triggers>
                         </ControlTemplate>
@@ -243,9 +243,8 @@
         <!--  标题栏右侧栏,关闭按钮,会员,试用等  -->
         <DockPanel HorizontalAlignment="Right">
             <Grid
-                DockPanel.Dock="Left"
                 x:Name="Grid_Openhight"
-                IsVisibleChanged="Grid_Openhight_IsVisibleChanged"
+                DockPanel.Dock="Left"
                 Visibility="Collapsed">
 
                 <WrapPanel VerticalAlignment="Center">
@@ -257,12 +256,9 @@
                         VerticalAlignment="Center"
                         Background=" #FFCF52"
                         CornerRadius="4" />
-
-
                     <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>
-
                 </WrapPanel>
                 <TextBlock
                     HorizontalAlignment="Center"
@@ -273,127 +269,132 @@
                     Text="{Binding Msgtologin}" />
             </Grid>
             <StackPanel
-            Name="StkPnlRight"
-            HorizontalAlignment="Right"
-            Orientation="Horizontal"
-            WindowChrome.IsHitTestVisibleInChrome="True">
+                Name="StkPnlRight"
+                HorizontalAlignment="Right"
+                Orientation="Horizontal"
+                WindowChrome.IsHitTestVisibleInChrome="True">
 
-                <Border Width="87" Height="24"  Visibility="{Binding UpgradeVis}">
+                <Border
+                    Name="BorderUpgrade"
+                    Width="87"
+                    Height="24"
+                    IsVisibleChanged="Grid_Openhight_IsVisibleChanged"
+                    Visibility="{Binding UpgradeVis}">
                     <Border.InputBindings>
-                        <MouseBinding MouseAction="LeftClick" Command="{Binding  UpgradelinkCommand}" />
+                        <MouseBinding Command="{Binding UpgradelinkCommand}" MouseAction="LeftClick" />
                     </Border.InputBindings>
                     <Image Source="pack://application:,,,/PDF Master;component/Resources/Service/Upgrade.png" />
-                    </Border>
+                </Border>
 
-               
                 <Button
-                x:Name="Btn_Register"
-                Width="40"
-                Height="40"
-                Background="Transparent"
-                Command="{Binding OpenRegisterCommand}"
-                Style="{StaticResource subToolBar}"
-                Visibility="{Binding RegisterVis, Mode=TwoWay}">
+                    x:Name="Btn_Register"
+                    Width="40"
+                    Height="40"
+                    Background="Transparent"
+                    Command="{Binding OpenRegisterCommand}"
+                    Style="{StaticResource subToolBar}"
+                    Visibility="{Binding RegisterVis, Mode=TwoWay}">
                     <Grid>
                         <Border
-                        x:Name="myBorder1"
-                        Width="24"
-                        Height="24"
-                        Background="White"
-                        CornerRadius="12" />
+                            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}">
+                            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" />
+                            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"
-                Height="40"
-                Background="Transparent"
-                Command="{Binding OpenLoginCommand}"
-                Style="{StaticResource subToolBar}"
-                Visibility="{Binding LoginVis, Mode=TwoWay}">
+                    x:Name="Btn_Login"
+                    Width="40"
+                    Height="40"
+                    Background="Transparent"
+                    Command="{Binding OpenLoginCommand}"
+                    Style="{StaticResource subToolBar}"
+                    Visibility="{Binding LoginVis, Mode=TwoWay}">
                     <Grid>
                         <Border
-                        x:Name="myBorder2"
-                        Width="24"
-                        Height="24"
-                        Background="White"
-                        CornerRadius="12" />
+                            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}">
+                            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" />
+                            Width="24"
+                            Height="24"
+                            BorderBrush="{StaticResource color.icon.base.neutral.norm.lv1}"
+                            BorderThickness="2"
+                            CornerRadius="100" />
                     </Grid>
                 </Button>
                 <Button
-                x:Name="Btn_User"
-                Width="40"
-                Height="40"
-                Background="Transparent"
-                Command="{Binding OpenUserCommand}"
-                Style="{StaticResource subToolBar}"
-                Visibility="{Binding UserVis, Mode=TwoWay}">
+                    x:Name="Btn_User"
+                    Width="40"
+                    Height="40"
+                    Background="Transparent"
+                    Command="{Binding OpenUserCommand}"
+                    Style="{StaticResource subToolBar}"
+                    Visibility="{Binding UserVis, Mode=TwoWay}">
                     <Grid>
                         <Border
-                        Width="24"
-                        Height="24"
-                        Background="#1770F4"
-                        BorderBrush="#1770F4"
-                        CornerRadius="100">
+                            Width="24"
+                            Height="24"
+                            Background="#1770F4"
+                            BorderBrush="#1770F4"
+                            CornerRadius="100">
                             <TextBlock
-                            HorizontalAlignment="Center"
-                            VerticalAlignment="Center"
-                            FontFamily="SF Pro Text"
-                            FontSize="14"
-                            FontWeight="SemiBold"
-                            Foreground="White"
-                          Text="{Binding Useremailchar,Mode=TwoWay}" />
+                                HorizontalAlignment="Center"
+                                VerticalAlignment="Center"
+                                FontFamily="SF Pro Text"
+                                FontSize="14"
+                                FontWeight="SemiBold"
+                                Foreground="White"
+                                Text="{Binding Useremailchar, Mode=TwoWay}" />
                         </Border>
-
                     </Grid>
                 </Button>
-                <Separator Background="{StaticResource color.sys.layout.divider}" Width="16" Height="1">
+                <Separator
+                    Width="16"
+                    Height="1"
+                    Background="{StaticResource color.sys.layout.divider}">
                     <Separator.LayoutTransform>
                         <RotateTransform Angle="90" />
                     </Separator.LayoutTransform>
                 </Separator>
                 <Button
-                Name="BtnMiniSize"
-                Width="46"
-                Height="40"
-                Background="Transparent"
-                BorderThickness="0"
-                Click="BtnMiniSize_Click"
-                Style="{StaticResource TitleBarBtn}">
+                    Name="BtnMiniSize"
+                    Width="46"
+                    Height="40"
+                    Background="Transparent"
+                    BorderThickness="0"
+                    Click="BtnMiniSize_Click"
+                    Style="{StaticResource TitleBarBtn}">
                     <Polygon Fill="{StaticResource color.btn.sec.text.def}" Points="14 7 14 8 2 8 2 7">
                         <Polygon.RenderTransform>
                             <TransformGroup>
@@ -403,19 +404,19 @@
                     </Polygon>
                 </Button>
                 <Button
-                Name="BtnReStore"
-                Width="46"
-                Height="40"
-                Background="Transparent"
-                BorderThickness="0"
-                Click="BtnReStore_Click"
-                Style="{StaticResource TitleBarBtn}">
+                    Name="BtnReStore"
+                    Width="46"
+                    Height="40"
+                    Background="Transparent"
+                    BorderThickness="0"
+                    Click="BtnReStore_Click"
+                    Style="{StaticResource TitleBarBtn}">
                     <Grid>
                         <Path
-                        x:Name="ico_max"
-                        Data="M14,2 L14,14 L2,14 L2,2 L14,2 Z M13,3 L3,3 L3,13 L13,13 L13,3 Z"
-                        Fill="{StaticResource color.btn.sec.text.def}"
-                        Visibility="Collapsed" />
+                            x:Name="ico_max"
+                            Data="M14,2 L14,14 L2,14 L2,2 L14,2 Z M13,3 L3,3 L3,13 L13,13 L13,3 Z"
+                            Fill="{StaticResource color.btn.sec.text.def}"
+                            Visibility="Collapsed" />
                         <Grid x:Name="ico_mini" Visibility="{Binding ElementName=ico_max, Path=Visibility, Converter={StaticResource UnvisibleConvert}}">
                             <Path Data="M11,5 L11,14 L2,14 L2,5 L11,5 Z M10,6 L3,6 L3,13 L10,13 L10,6 Z" Fill="{StaticResource color.btn.sec.text.def}" />
                             <Polygon Fill="{StaticResource color.btn.sec.text.def}" Points="14 2 14 11 11 11 11 10 13 10 13 3 6 3 6 5 5 5 5 2" />
@@ -423,18 +424,17 @@
                     </Grid>
                 </Button>
                 <Button
-                Name="BtnClose"
-                Width="46"
-                Height="40"
-                Background="Transparent"
-                BorderThickness="0"
-                Click="BtnClose_Click"
-                Style="{StaticResource CloseBtn}">
+                    Name="BtnClose"
+                    Width="46"
+                    Height="40"
+                    Background="Transparent"
+                    BorderThickness="0"
+                    Click="BtnClose_Click"
+                    Style="{StaticResource CloseBtn}">
                     <Polygon Fill="{StaticResource color.btn.sec.text.def}" Points="11.2919922 12 12 11.2919922 6.70800781 6 12 0.708007813 11.2919922 0 6 5.29199219 0.708007812 9.76996262e-15 -2.27456942e-13 0.708007813 5.29199219 6 0 11.2919922 0.708007812 12 6 6.70800781" />
                 </Button>
             </StackPanel>
         </DockPanel>
-       
 
         <!--  OCR Progress Control  -->
         <Grid Grid.RowSpan="2" Visibility="{Binding IsProcessVisible}">
@@ -480,4 +480,4 @@
             </Border>
         </Grid>
     </Grid>
-</Window>
+</Window>

+ 56 - 19
PDF Office/Views/MainWindow.xaml.cs

@@ -26,6 +26,7 @@ using PDF_Master.Properties;
 using System.Windows.Interop;
 using System.Runtime.InteropServices;
 using System.Security.Cryptography;
+using System.Diagnostics;
 
 namespace PDF_Master.Views
 {
@@ -38,6 +39,11 @@ namespace PDF_Master.Views
 
         public IRegionManager region;
 
+        /// <summary>
+        /// 窗口大小是否改变
+        /// </summary>
+        private bool sizeChange = false;
+
         public MainWindow()
         {
             InitializeComponent();
@@ -85,7 +91,6 @@ namespace PDF_Master.Views
                     }
                     if (File.Exists(filePath))
                     {
-
                         //打开传过来的文件路径
                         if (App.OpenedFileList.Contains(filePath))
                         {
@@ -105,18 +110,15 @@ namespace PDF_Master.Views
                 }
                 catch
                 {
-
                 }
                 handled = true;
                 return (IntPtr)(1);
             }
-            if (msg == App.WakeId|| msg == App.WebopenexpiredId)
+            if (msg == App.WakeId || msg == App.WebopenexpiredId)
             {
-              
                 //将现有窗口激活 并前置
                 try
                 {
-                   
                     Activate();
                     //最小化后激活
                     if (this.WindowState == WindowState.Minimized)
@@ -127,14 +129,14 @@ namespace PDF_Master.Views
                     Topmost = true;
                     Topmost = false;
                     ServiceHelper.GetUser();
-                    if(msg==App.WebopenexpiredId)
+                    if (msg == App.WebopenexpiredId)
                     {
-                        if (App.IsLogin == true&&App.UserOpen==false)
+                        if (App.IsLogin == true && App.UserOpen == false)
                         {
                             App.mainWindowViewModel.OpenUser();
                             App.WebOpencase = "";
                         }
-                        else if(App.IsLogin == false&&App.LoginOpen == false)
+                        else if (App.IsLogin == false && App.LoginOpen == false)
                         {
                             App.mainWindowViewModel.OpenLogin();
                             App.WebOpencase = "";
@@ -144,7 +146,6 @@ namespace PDF_Master.Views
                 }
                 catch
                 {
-
                 }
 
                 return (IntPtr)(1);
@@ -157,7 +158,7 @@ namespace PDF_Master.Views
         /// </summary>
         /// <param name="eventAggregator"></param>
 
-        public MainWindow(IEventAggregator eventAggregator, IContainerProvider container) :this()
+        public MainWindow(IEventAggregator eventAggregator, IContainerProvider container) : this()
         {
             aggregator = eventAggregator;
             eventAggregator?.GetEvent<DragablzWindowEvent>().Publish(new DragablzWindowEventArgs() { TabControl = TabablzControl, Type = DragablzWindowEventType.Opened });
@@ -192,8 +193,8 @@ namespace PDF_Master.Views
             aggregator?.GetEvent<DragablzWindowEvent>().Publish(new DragablzWindowEventArgs() { TabControl = TabablzControl, Type = DragablzWindowEventType.Activated });
             //只需要第一次激活时获取一次信息
 
-            if(App.IsFirstOpen)
-            {            
+            if (App.IsFirstOpen)
+            {
                 //判断本地有没有token,没有显示登录,有再判断登录状态
                 if (Settings.Default.AppProperties.LoginToken != "")
                 {
@@ -247,7 +248,7 @@ namespace PDF_Master.Views
             //设为默认浏览器后,外部点击文档打开
             if (App.NeedOpenFilePathList.Count != 0)
             {
-                for(int i=0;i<App.NeedOpenFilePathList.Count;i++)
+                for (int i = 0; i < App.NeedOpenFilePathList.Count; i++)
                 {
                     (this.DataContext as MainWindowViewModel).AddTabItem(App.NeedOpenFilePathList[i]);
                     await Task.Delay(50);
@@ -298,7 +299,6 @@ namespace PDF_Master.Views
 
         private void Window_SizeChanged(object sender, SizeChangedEventArgs e)
         {
-            UpdateTitleMargin();
             if (this.WindowState == WindowState.Maximized)
             {
                 ico_max.Visibility = Visibility.Collapsed;
@@ -307,6 +307,12 @@ namespace PDF_Master.Views
             {
                 ico_max.Visibility = Visibility.Visible;
             }
+
+            UpdateTitleMargin();
+            if (this.ActualWidth != 1280)
+            {
+                sizeChange = true;
+            }
         }
 
         /// <summary>
@@ -315,13 +321,44 @@ namespace PDF_Master.Views
         private void UpdateTitleMargin()
         {
             var width = StkPnlRight.ActualWidth;
-            BtnAdd.Margin = new Thickness(8, 13, width, 7);
+            double width1 = this.ActualWidth;
+            double width2 = TabablzControl.ActualWidth;
+            if (BorderUpgrade.Visibility == Visibility.Collapsed)
+            {
+                BtnAdd.Margin = new Thickness(8, 13, width, 7);
+                Trace.WriteLine("BorderUpgrade.Collapsed " + width1);
+                Trace.WriteLine("BorderUpgrade.Collapsed " + width2);
+                Trace.WriteLine("BorderUpgrade.Collapsed " + width);
+            }
+            else
+            {
+                Trace.WriteLine("BorderUpgrade.Visibility " + width1);
+                Trace.WriteLine("BorderUpgrade.Visibility " + width2);
+                Trace.WriteLine("BorderUpgrade.Visibility " + width);
+                if (this.WindowState == WindowState.Maximized)
+                {
+                    BtnAdd.Margin = new Thickness(8, 13, width, 7);
+                }
+                else
+                {
+                    if (sizeChange)
+                    {
+                        BtnAdd.Margin = new Thickness(8, 13, width, 7);
+                    }
+                    else
+                    {
+                        sizeChange = false;
+                        BtnAdd.Margin = new Thickness(8, 13, width + 50, 7);
+                    }
+                }
+            }
+
             TabablzControl.UpdateLayout();
         }
 
         private void TxtRename_PreviewKeyDown(object sender, KeyEventArgs e)
         {
-            if(e.Key == Key.Enter)
+            if (e.Key == Key.Enter)
             {
                 TabablzControl.Focus();
             }
@@ -364,10 +401,10 @@ namespace PDF_Master.Views
                 //放在主窗体的显示事件里,避免因网络请求问题导致启动缓慢
                 await Task.Run(() =>
                 {
-                //上传启动信息至服务端
-                ServiceHelper.CreateDeviceLog();
+                    //上传启动信息至服务端
+                    ServiceHelper.CreateDeviceLog();
                 });
             }
         }
     }
-}
+}

BIN
PDF Office/x64/CPDFConverterNative.dll


BIN
PDF Office/x86/CPDFConverterNative.dll


+ 4 - 6
UpdateXML/pdfmaster_win_en_Us.xml

@@ -6,14 +6,12 @@
 		<description>Most recent changes with links to updates.</description>
 		<language>en</language>
 		<item>
-			<title>Version 1.2.0</title>
+			<title>Version 1.3.0.0</title>
 			<description>
 				<![CDATA[
           <ul>
-            <head>PDF Master New Release: Edit PDF page for a more organized document!</head>
+            <head>PDF Master New Release: </head>
             <br></br>
-            <li> <b>Organize Pages: </b>Easily delete, insert, rotate, split pages, or rearrange pages by dragging and dropping;</li>
-            <li><b>AI Technology:</b>AI robot helps you to translate, rewrite, or correct errors in a PDF file, improving productivity significantly;</li>
             <li>Tiny bug fixes and performance improvements for user experience.</li>
             <br></br>
             <head>We are constantly improving our software, if you have any questions or feedback, feel free to contact us at support@pdfreaderpro.com</head>
@@ -21,9 +19,9 @@
             ]]>
 			</description>
 			<pubDate>Thur, 20 Dec 2022 00:00:00 +0000</pubDate>
-			<enclosure url="https://www.pdfreaderpro.com/downloads/PDFMaster.exe" sparkle:version="1.2.0.0" />
+			<enclosure url="https://www.pdfreaderpro.com/downloads/PDFMaster.exe" sparkle:version="1.3.0.0" />
 			<ocrenclosure>
-				<ocrenclosure0 ocrurl="http://test-pdf-pro.kdan.cn:3021/downloads/OCREngine.zip" ocrmd5="65d21a699138c194f06a8640dd40a901" sparkle:startversion="1.3.0" sparkle:endversion="1.4.0" />
+				<ocrenclosure0 ocrurl="https://www.pdfreaderpro.com/downloads/OCREngine.zip" ocrmd5="65d21a699138c194f06a8640dd40a901" sparkle:startversion="1.3.0.0" sparkle:endversion="1.3.0.0" />
 			</ocrenclosure>
 		</item>
 	</channel>

+ 10 - 11
UpdateXML/pdfmaster_win_zh_Hans.xml

@@ -1,29 +1,28 @@
 <?xml version="1.0" encoding="utf-8"?>
 <rss version="2.0" xmlns:sparkle="http://www.andymatuschak.org/xml-namespaces/sparkle"  xmlns:dc="http://purl.org/dc/elements/1.1/">
 	<channel>
-		<title>PDF Reader Pro's Changelog</title>
-		<link> https://www.pdfreaderpro.com/downloads/pdfreaderprocast_win.xml</link>
+		<title>PDF Master's Changelog</title>
+		<link> https://www.pdfreaderpro.com/downloads/pdfmaster_win_zh_Hans.xml</link>
 		<description>Most recent changes with links to updates.</description>
 		<language>en</language>
 		<item>
-			<title>Version 1.2.0.0</title>
+			<title>Version 1.3.0.0</title>
 			<description>
 				<![CDATA[
-           <ul>
-            <head>PDF Reader Pro 新版本发布!利用升级的转档工具快速将PDF转换成Office文档!</head>
+          <ul>
+            <head>PDF Master New Release: </head>
             <br></br>
-              <li>优化PDF转档器:快速将您的PDF文件转换为Microsoft Word (.docx)、Excel (.xlsx)、PowerPoint (.pptx)、图片和文本等;</li>
-                <li>已知问题修复,性能优化,提高用户体验。</li>
+            <li>Tiny bug fixes and performance improvements for user experience.</li>
             <br></br>
-            <head>有任何反馈,意见或是建议,请随时与我们联系:support@pdfreaderpro.com</head>
+            <head>We are constantly improving our software, if you have any questions or feedback, feel free to contact us at support@pdfreaderpro.com</head>
             </ul>
             ]]>
 			</description>
 			<pubDate>Thur, 20 Dec 2022 00:00:00 +0000</pubDate>
-			<enclosure url="http://test-pdf-pro.kdan.cn:3021/downloads/PDFMaster.exe" sparkle:version="1.2.0.0" />
+			<enclosure url="https://www.pdfreaderpro.com/downloads/PDFMaster.exe" sparkle:version="1.3.0.0" />
 			<ocrenclosure>
-				<ocrenclosure0 ocrurl="http://test-pdf-pro.kdan.cn:3021/downloads/OCREngine.zip" ocrmd5="65d21a699138c194f06a8640dd40a901" sparkle:startversion="1.3.0" sparkle:endversion="1.4.0" />
+				<ocrenclosure0 ocrurl="https://www.pdfreaderpro.com/downloads/OCREngine.zip" ocrmd5="65d21a699138c194f06a8640dd40a901" sparkle:startversion="1.3.0.0" sparkle:endversion="1.3.0.0" />
 			</ocrenclosure>
 		</item>
 	</channel>
-</rss>
+</rss>

+ 10 - 11
UpdateXML/pdfmaster_win_zh_Hant.xml

@@ -1,29 +1,28 @@
 <?xml version="1.0" encoding="utf-8"?>
 <rss version="2.0" xmlns:sparkle="http://www.andymatuschak.org/xml-namespaces/sparkle"  xmlns:dc="http://purl.org/dc/elements/1.1/">
 	<channel>
-		<title>PDF Reader Pro's Changelog</title>
-		<link> https://www.pdfreaderpro.com/downloads/pdfreaderprocast_win.xml</link>
+		<title>PDF Master's Changelog</title>
+		<link> https://www.pdfreaderpro.com/downloads/pdfmaster_win_zh_Hant.xml</link>
 		<description>Most recent changes with links to updates.</description>
 		<language>en</language>
 		<item>
-			<title>Version 1.2.0.0</title>
+			<title>Version 1.3.0.0</title>
 			<description>
 				<![CDATA[
-           <ul>
-            <head>PDF Reader Pro新版發佈!利用升級的轉檔工具快速將PDF轉換成Office文檔!</head>
+          <ul>
+            <head>PDF Master New Release: </head>
             <br></br>
-                <li>優化PDF轉檔器:快速將您的PDF文檔轉換為Microsoft Word (.docx)、Excel (.xlsx)、PowerPoint (.pptx)、圖片和文本等;</li>
-                <li>已知問題修復,優化性能,提高用戶體驗感。</li>
+            <li>Tiny bug fixes and performance improvements for user experience.</li>
             <br></br>
-            <head>有任何反饋,意見或是建議,請隨時與我們聯繫:support@pdfreaderpro.com</head>
+            <head>We are constantly improving our software, if you have any questions or feedback, feel free to contact us at support@pdfreaderpro.com</head>
             </ul>
             ]]>
 			</description>
 			<pubDate>Thur, 20 Dec 2022 00:00:00 +0000</pubDate>
-			<enclosure url="http://test-pdf-pro.kdan.cn:3021/downloads/PDFMaster.exe" sparkle:version="1.2.0.0" />
+			<enclosure url="https://www.pdfreaderpro.com/downloads/PDFMaster.exe" sparkle:version="1.3.0.0" />
 			<ocrenclosure>
-				<ocrenclosure0 ocrurl="http://test-pdf-pro.kdan.cn:3021/downloads/OCREngine.zip" ocrmd5="65d21a699138c194f06a8640dd40a901" sparkle:startversion="1.3.0" sparkle:endversion="1.4.0" />
+				<ocrenclosure0 ocrurl="https://www.pdfreaderpro.com/downloads/OCREngine.zip" ocrmd5="65d21a699138c194f06a8640dd40a901" sparkle:startversion="1.3.0.0" sparkle:endversion="1.3.0.0" />
 			</ocrenclosure>
 		</item>
 	</channel>
-</rss>
+</rss>