Browse Source

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

OYXH\oyxh 2 years ago
parent
commit
2ed304c1b0

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

@@ -114,7 +114,7 @@ namespace PDF_Office
         /// <summary>
         /// <summary>
         /// 是否已经登陆
         /// 是否已经登陆
         /// </summary>
         /// </summary>
-        public static bool IsLogin = true;
+        public static bool IsLogin =false;
 
 
         //是否需要显示注册弹窗
         //是否需要显示注册弹窗
         //app第一次启动时需要弹出注册弹窗
         //app第一次启动时需要弹出注册弹窗

+ 1 - 0
PDF Office/Helper/ServiceHelper.cs

@@ -176,6 +176,7 @@ namespace PDF_Office.Helper
                     JToken jToken;
                     JToken jToken;
                     if(jobject.TryGetValue("msg" ,out jToken)==false)
                     if(jobject.TryGetValue("msg" ,out jToken)==false)
                     {
                     {
+                        App.IsLogin = true;
                         return jobject["email"].ToObject<string>().ToLower();
                         return jobject["email"].ToObject<string>().ToLower();
                     }
                     }
                    else
                    else

+ 51 - 5
PDF Office/ViewModels/Dialog/ServiceDialog/IAPCompareDialogViewModel.cs

@@ -1,19 +1,29 @@
-using Prism.Mvvm;
+using Prism.Commands;
+using Prism.Mvvm;
+using Prism.Regions;
 using Prism.Services.Dialogs;
 using Prism.Services.Dialogs;
 using System;
 using System;
-using System.Collections.Generic;
-using System.Linq;
-using System.Text;
-using System.Threading.Tasks;
 
 
 namespace PDF_Office.ViewModels.Dialog.ServiceDialog
 namespace PDF_Office.ViewModels.Dialog.ServiceDialog
 {
 {
     public class IAPCompareDialogViewModel : BindableBase,IDialogAware
     public class IAPCompareDialogViewModel : BindableBase,IDialogAware
     {
     {
+        
+       
+
         public string Title => "";
         public string Title => "";
 
 
         public event Action<IDialogResult> RequestClose;
         public event Action<IDialogResult> RequestClose;
 
 
+
+
+        private string _IAPRegionName;
+        public string IAPRegionName
+        {
+            get { return _IAPRegionName; }
+            set { _IAPRegionName = value; }
+        }
+
         public bool CanCloseDialog()
         public bool CanCloseDialog()
         {
         {
             return true;
             return true;
@@ -26,6 +36,42 @@ namespace PDF_Office.ViewModels.Dialog.ServiceDialog
 
 
         public void OnDialogOpened(IDialogParameters parameters)
         public void OnDialogOpened(IDialogParameters parameters)
         {
         {
+            
+        }
+
+        public DelegateCommand GoLoginCommand { get; set; }
+        public DelegateCommand GoRegisterCommand { get; set; }
+
+
+
+        IAPCompareDialogViewModel(IRegionManager regionManager, IDialogService dialogService)
+        {
+           
+            IAPRegionName = Guid.NewGuid().ToString();
+            GoLoginCommand = new DelegateCommand(GoLogin);
+            GoRegisterCommand = new DelegateCommand(GoRegisterd);
+        }
+
+
+        private void GoRegisterd()
+        {
+
+            RequestClose?.Invoke(new Prism.Services.Dialogs.DialogResult(ButtonResult.Cancel));
+            App.mainWindowViewModel.OpenLogin();
+        }
+
+
+        private void GoLogin()
+        {
+
+
+            RequestClose?.Invoke(new Prism.Services.Dialogs.DialogResult(ButtonResult.Cancel));
+            App.mainWindowViewModel.OpenRegister();
+
         }
         }
+
+
+
+      
     }
     }
 }
 }

+ 5 - 3
PDF Office/ViewModels/FillAndSign/FillAndSignContentViewModel.cs

@@ -388,10 +388,12 @@ namespace PDF_Office.ViewModels.FillAndSign
             return Annot;
             return Annot;
         }
         }
         private void CheckedEvent(RoutedEventArgs e)
         private void CheckedEvent(RoutedEventArgs e)
-        {
-
-            IsEdit = false;
+        {
+
             var control = e.OriginalSource as Control;
             var control = e.OriginalSource as Control;
+        
+            IsEdit = false;
+            
 
 
             //NavigateToProperty(control.Name);
             //NavigateToProperty(control.Name);
             //不创建注释,属于注释模板
             //不创建注释,属于注释模板

+ 5 - 0
PDF Office/ViewModels/Tools/AnnotToolContentViewModel.cs

@@ -196,6 +196,11 @@ namespace PDF_Office.ViewModels.Tools
                     isTemplateAnnot = true;
                     isTemplateAnnot = true;
                 }
                 }
 
 
+                if (tag != "Link")
+                    BtnLinkIsChecked = false;
+                else
+                    StrAnnotToolChecked = "Link";
+
                 if (annotArgs != null)
                 if (annotArgs != null)
                 {
                 {
                     annotArgs.Author = Settings.Default.AppProperties.Description.Author;
                     annotArgs.Author = Settings.Default.AppProperties.Description.Author;

File diff suppressed because it is too large
+ 44 - 2
PDF Office/Views/Dialog/ServiceDialog/IAPCompareDialog.xaml


+ 9 - 2
PDF Office/Views/Dialog/ServiceDialog/IAPCompareDialog.xaml.cs

@@ -1,4 +1,6 @@
-using System;
+using Prism.Ioc;
+using Prism.Regions;
+using System;
 using System.Collections.Generic;
 using System.Collections.Generic;
 using System.Linq;
 using System.Linq;
 using System.Text;
 using System.Text;
@@ -20,9 +22,14 @@ namespace PDF_Office.Views.Dialog.ServiceDialog
     /// </summary>
     /// </summary>
     public partial class IAPCompareDialog : UserControl
     public partial class IAPCompareDialog : UserControl
     {
     {
-        public IAPCompareDialog()
+        private IContainerProvider containerProvider;
+        public IAPCompareDialog(IContainerProvider containerProvider)
         {
         {
             InitializeComponent();
             InitializeComponent();
+            this.containerProvider = containerProvider;
+            var regionManager = containerProvider.Resolve<IRegionManager>();
+            RegionManager.SetRegionManager(this, regionManager);
+            RegionManager.UpdateRegions();
         }
         }
     }
     }
 }
 }

File diff suppressed because it is too large
+ 7 - 7
PDF Office/Views/FillAndSign/FillAndSignContent.xaml


+ 10 - 1
PDF Office/Views/FillAndSign/FillAndSignContent.xaml.cs

@@ -23,6 +23,15 @@ namespace PDF_Office.Views.FillAndSign
         public FillAndSignContent()
         public FillAndSignContent()
         {
         {
             InitializeComponent();
             InitializeComponent();
-        }
+        }
+
+        private void RbtnTick_Click(object sender, RoutedEventArgs e)
+        {
+            var a = sender as RadioButton;
+            if (a.IsChecked == true) {
+                a.IsChecked = false;
+            }
+            else { a.IsChecked = true; }
+        }
     }
     }
 }
 }

+ 2 - 0
PDF Office/Views/Tools/AnnotToolContent.xaml

@@ -376,6 +376,7 @@
                     Command="{Binding MyToolsCommand}"
                     Command="{Binding MyToolsCommand}"
                     CommandParameter="{Binding ElementName=BtnStamp}"
                     CommandParameter="{Binding ElementName=BtnStamp}"
                     Style="{StaticResource ToggleBtnViewModeStyle}"
                     Style="{StaticResource ToggleBtnViewModeStyle}"
+                    IsChecked="{Binding StrAnnotToolChecked,Converter={StaticResource AnnotToolIsCheckedConvert},ConverterParameter=Stamp}"
                     Tag="Stamp">
                     Tag="Stamp">
                     <Grid Width="20" Height="20">
                     <Grid Width="20" Height="20">
 
 
@@ -441,6 +442,7 @@
                     Click="BtnTool_Click"
                     Click="BtnTool_Click"
                     Command="{Binding MyToolsCommand}"
                     Command="{Binding MyToolsCommand}"
                     CommandParameter="{Binding ElementName=BtnSignature}"
                     CommandParameter="{Binding ElementName=BtnSignature}"
+                    IsChecked="{Binding StrAnnotToolChecked,Converter={StaticResource AnnotToolIsCheckedConvert},ConverterParameter=Signature}"
                     Style="{StaticResource ToggleBtnViewModeStyle}"
                     Style="{StaticResource ToggleBtnViewModeStyle}"
                     Tag="Signature">
                     Tag="Signature">
                     <Grid>
                     <Grid>