Selaa lähdekoodia

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

ZhouJieSheng 2 vuotta sitten
vanhempi
commit
76a4e976a9
42 muutettua tiedostoa jossa 1014 lisäystä ja 336 poistoa
  1. 4 0
      PDF Office/App.xaml
  2. 209 139
      PDF Office/Helper/ServiceHelper.cs
  3. 1 1
      PDF Office/Model/Dialog/ConverterDialogs/ConverterDialogsModel.cs
  4. 1 1
      PDF Office/ViewModels/Dialog/ConverterDialogs/ConverterExcelDialogViewModel.cs
  5. 1 1
      PDF Office/ViewModels/Dialog/ConverterDialogs/ConverterHTMLDialogViewModel.cs
  6. 1 1
      PDF Office/ViewModels/Dialog/ConverterDialogs/ConverterPPTDialogViewModel.cs
  7. 1 1
      PDF Office/ViewModels/Dialog/ConverterDialogs/ConverterRTFDialogViewModel.cs
  8. 1 1
      PDF Office/ViewModels/Dialog/ConverterDialogs/ConverterTextDialogViewModel.cs
  9. 1 1
      PDF Office/ViewModels/Dialog/ConverterDialogs/ConverterWordDialogViewModel.cs
  10. 1 1
      PDF Office/ViewModels/Dialog/ServiceDialog/CodeRegionViewModel.cs
  11. 42 4
      PDF Office/ViewModels/Dialog/ServiceDialog/LoginPasswordRegionViewModel.cs
  12. 26 9
      PDF Office/ViewModels/Dialog/ServiceDialog/LoginRegionViewModel.cs
  13. 75 3
      PDF Office/ViewModels/Dialog/ServiceDialog/PasswordUpdataRegionVIewModel.cs
  14. 1 3
      PDF Office/ViewModels/Dialog/ServiceDialog/RegisterOKRegionViewModel.cs
  15. 102 9
      PDF Office/ViewModels/Dialog/ServiceDialog/RegisterRegionViewModel.cs
  16. 21 18
      PDF Office/ViewModels/Dialog/ToolsDialogs/MergeDialogViewModel.cs
  17. 12 1
      PDF Office/ViewModels/FillAndSign/FillAndSignContentViewModel.cs
  18. 10 4
      PDF Office/ViewModels/MainWindowViewModel.cs
  19. 2 0
      PDF Office/ViewModels/Tools/AnnotToolContentViewModel.Command.cs
  20. 2 0
      PDF Office/ViewModels/Tools/ConverterBarContentViewModel.cs
  21. 4 5
      PDF Office/Views/Dialog/ConverterDialogs/ConverterCSVDialog.xaml
  22. 2 2
      PDF Office/Views/Dialog/ConverterDialogs/ConverterHTMLDialog.xaml
  23. 2 2
      PDF Office/Views/Dialog/ConverterDialogs/ConverterPPTDialog.xaml
  24. 1 1
      PDF Office/Views/Dialog/ConverterDialogs/ConverterRTFDialog.xaml
  25. 8 2
      PDF Office/Views/Dialog/ServiceDialog/CodeRegion.xaml
  26. 117 40
      PDF Office/Views/Dialog/ServiceDialog/CodeRegion.xaml.cs
  27. 1 0
      PDF Office/Views/Dialog/ServiceDialog/LoginDialog.xaml
  28. 10 2
      PDF Office/Views/Dialog/ServiceDialog/LoginPasswordRegion.xaml
  29. 8 0
      PDF Office/Views/Dialog/ServiceDialog/LoginPasswordRegion.xaml.cs
  30. 2 1
      PDF Office/Views/Dialog/ServiceDialog/LoginRegion.xaml
  31. 9 0
      PDF Office/Views/Dialog/ServiceDialog/LoginRegion.xaml.cs
  32. 28 3
      PDF Office/Views/Dialog/ServiceDialog/PasswordUpdataRegion.xaml
  33. 9 0
      PDF Office/Views/Dialog/ServiceDialog/PasswordUpdataRegion.xaml.cs
  34. 1 0
      PDF Office/Views/Dialog/ServiceDialog/RegisterDialog.xaml
  35. 49 22
      PDF Office/Views/Dialog/ServiceDialog/RegisterRegion.xaml
  36. 10 0
      PDF Office/Views/Dialog/ServiceDialog/RegisterRegion.xaml.cs
  37. 1 0
      PDF Office/Views/Dialog/ServiceDialog/UserDialog.xaml
  38. 7 1
      PDF Office/Views/Dialog/ServiceDialog/UserOutCodeRegion.xaml
  39. 116 39
      PDF Office/Views/Dialog/ServiceDialog/UserOutCodeRegion.xaml.cs
  40. 1 1
      PDF Office/Views/FillAndSign/FillAndSignContent.xaml
  41. 36 8
      PDF Office/Views/PropertyPanel/AnnotPanel/StickyNotePopup.xaml
  42. 78 9
      PDF Office/Views/PropertyPanel/AnnotPanel/StickyNotePopup.xaml.cs

+ 4 - 0
PDF Office/App.xaml

@@ -521,6 +521,7 @@
                                     <Setter TargetName="arrow" Property="Fill" Value="{StaticResource color.icon.arrow.gray.dis}" />
                                     <Setter TargetName="templateRoot" Property="Background" Value="{StaticResource color.field.bg.dis}" />
                                     <Setter TargetName="templateRoot" Property="BorderBrush" Value="{StaticResource color.field.border.dis}" />
+                                    
                                 </Trigger>
                             </ControlTemplate.Triggers>
                         </ControlTemplate>
@@ -605,6 +606,9 @@
                     <Trigger Property="HasItems" Value="false">
                         <Setter TargetName="dropDownBorder" Property="Height" Value="95" />
                     </Trigger>
+                    <Trigger Property="IsEnabled" Value="false">
+                        <Setter  Property="Foreground" Value="{StaticResource color.field.text.dis}"/>
+                    </Trigger>
                     <MultiTrigger>
                         <MultiTrigger.Conditions>
                             <Condition Property="IsGrouping" Value="true" />

+ 209 - 139
PDF Office/Helper/ServiceHelper.cs

@@ -73,7 +73,7 @@ namespace PDF_Office.Helper
             request.ContentType = "text/html;charset=UTF-8";
             //request.Accept = "application/vnd.api+json;version=1";
             request.UserAgent = "Apifox/1.0.0 (https://www.apifox.cn)";
-            request.Timeout = 10000;
+            request.Timeout = 20000;
             request.ServicePoint.Expect100Continue = false;
             try
             {
@@ -97,7 +97,7 @@ namespace PDF_Office.Helper
         }
             catch
             {
-                return "";
+                return "网络不稳定请重试";
             }
            
                
@@ -116,7 +116,7 @@ namespace PDF_Office.Helper
             request.ContentType = "application/json";
             //request.Accept = "application/vnd.api+json;version=1";
             request.UserAgent = "Apifox/1.0.0 (https://www.apifox.cn)";
-            request.Timeout = 10000;
+            request.Timeout = 20000;
             request.ServicePoint.Expect100Continue = false;
             StringWriter sw = new StringWriter();
             using (JsonWriter writer = new JsonTextWriter(sw))
@@ -138,29 +138,37 @@ namespace PDF_Office.Helper
                 writer.Write(postBody);
                 writer.Close();
             }
-
-            response = (HttpWebResponse)request.GetResponse();
-            using (StreamReader reader = new StreamReader(response.GetResponseStream()))
+            try
             {
-                string responseData = reader.ReadToEnd();
-                Console.WriteLine(responseData);
-                reader.Close();
-                JObject jobject = (JObject)JsonConvert.DeserializeObject(responseData);
-                //outemail = jobject["msg"].ToObject<string>().ToLower();
-                if (response != null)
-                {
-                    response.Close();
-                }
-                if (request != null)
+                response = (HttpWebResponse)request.GetResponse();
+                using (StreamReader reader = new StreamReader(response.GetResponseStream()))
                 {
-                    request.Abort();
+                    string responseData = reader.ReadToEnd();
+                    Console.WriteLine(responseData);
+                    reader.Close();
+                    JObject jobject = (JObject)JsonConvert.DeserializeObject(responseData);
+                    //outemail = jobject["msg"].ToObject<string>().ToLower();
+                    if (response != null)
+                    {
+                        response.Close();
+                    }
+                    if (request != null)
+                    {
+                        request.Abort();
+                    }
+                    return jobject["msg"].ToObject<string>().ToLower();
+
+
                 }
-                return jobject["msg"].ToObject<string>().ToLower();
-               
-                
             }
+            catch
+            {
+                return "网络不稳定请重试";
+            }
+           
         }
 
+        //⑤报错
         public static void Get_code(string action, string email)
         {
             string post = $"?action={action}&appId=16&receiver={email}&type=0";
@@ -172,26 +180,36 @@ namespace PDF_Office.Helper
             request.ContentType = "text/html;charset=UTF-8";
             //request.Accept = "application/vnd.api+json;version=1";
             request.UserAgent = "Apifox/1.0.0 (https://www.apifox.cn)";
-            request.Timeout = 10000;
+            request.Timeout = 20000;
             request.ServicePoint.Expect100Continue = false;
-            response = (HttpWebResponse)request.GetResponse();
-            using (StreamReader reader = new StreamReader(response.GetResponseStream()))
+            try
             {
-                string responseData = reader.ReadToEnd();
-                Console.WriteLine(responseData);
-                reader.Close();
-                JObject jobject = (JObject)JsonConvert.DeserializeObject(responseData);
-                if (response != null)
-                {
-                    response.Close();
-                }
-                if (request != null)
+                response = (HttpWebResponse)request.GetResponse();
+                using (StreamReader reader = new StreamReader(response.GetResponseStream()))
                 {
-                    request.Abort();
+                    string responseData = reader.ReadToEnd();
+                    Console.WriteLine(responseData);
+                    reader.Close();
+                    JObject jobject = (JObject)JsonConvert.DeserializeObject(responseData);
+                    if (response != null)
+                    {
+                        response.Close();
+                    }
+                    if (request != null)
+                    {
+                        request.Abort();
+                    }
+
+
                 }
-               
+            }
+            catch
+            {
                 
             }
+
+
+            
         }
         public static String Ok_code(string email, string code, string type)
         {
@@ -205,26 +223,34 @@ namespace PDF_Office.Helper
             request.ContentType = "text/html;charset=UTF-8";
             //request.Accept = "application/vnd.api+json;version=1";
             request.UserAgent = "Apifox/1.0.0 (https://www.apifox.cn)";
-            request.Timeout = 10000;
+            request.Timeout = 20000;
             request.ServicePoint.Expect100Continue = false;
-            response = (HttpWebResponse)request.GetResponse();
-            using (StreamReader reader = new StreamReader(response.GetResponseStream()))
+            try
             {
-                string responseData = reader.ReadToEnd();
-                Console.WriteLine(responseData);
-                reader.Close();
-                JObject jobject = (JObject)JsonConvert.DeserializeObject(responseData);
-                if (response != null)
-                {
-                    response.Close();
-                }
-                if (request != null)
+                response = (HttpWebResponse)request.GetResponse();
+                using (StreamReader reader = new StreamReader(response.GetResponseStream()))
                 {
-                    request.Abort();
+                    string responseData = reader.ReadToEnd();
+                    Console.WriteLine(responseData);
+                    reader.Close();
+                    JObject jobject = (JObject)JsonConvert.DeserializeObject(responseData);
+                    if (response != null)
+                    {
+                        response.Close();
+                    }
+                    if (request != null)
+                    {
+                        request.Abort();
+                    }
+                    return jobject["msg"].ToObject<string>().ToLower();
+
                 }
-               return jobject["msg"].ToObject<string>().ToLower();
-                
             }
+            catch
+            {
+                return "网络不稳定请重试";
+            }
+           
         }
         public static String Register_email(string intemail, string intpassword, string intcode, string uuid)
         {
@@ -236,7 +262,7 @@ namespace PDF_Office.Helper
             request.ContentType = "application/json";
             //request.Accept = "application/vnd.api+json;version=1";
             request.UserAgent = "Apifox/1.0.0 (https://www.apifox.cn)";
-            request.Timeout = 10000;
+            request.Timeout = 20000;
             request.ServicePoint.Expect100Continue = false;
             StringWriter sw = new StringWriter();
             using (JsonWriter writer = new JsonTextWriter(sw))
@@ -263,26 +289,39 @@ namespace PDF_Office.Helper
                 writer.Write(postBody);
                 writer.Close();
             }
-
-            response = (HttpWebResponse)request.GetResponse();
-            using (StreamReader reader = new StreamReader(response.GetResponseStream()))
+            try
             {
-                string responseData = reader.ReadToEnd();
-                Console.WriteLine(responseData);
-                reader.Close();
-                JObject jobject = (JObject)JsonConvert.DeserializeObject(responseData);
-                if (response != null)
-                {
-                    response.Close();
-                }
-                if (request != null)
+                response = (HttpWebResponse)request.GetResponse();
+                using (StreamReader reader = new StreamReader(response.GetResponseStream()))
                 {
-                    request.Abort();
-                }
-               
-                return jobject["msg"].ToObject<string>().ToLower();
+                    string responseData = reader.ReadToEnd();
+                    Console.WriteLine(responseData);
+                    reader.Close();
+                    JObject jobject = (JObject)JsonConvert.DeserializeObject(responseData);
+                    if (response != null)
+                    {
+                        response.Close();
+                    }
+                    if (request != null)
+                    {
+                        request.Abort();
+                    }
 
+                    if (jobject["msg"].ToObject<string>().ToLower() == "success")
+                    {
+                        access_token = jobject["result"]["access_token"].ToObject<string>().ToLower();
+                        Settings.Default.AppProperties.LoginToken = jobject["result"]["access_token"].ToObject<string>().ToLower();
+                        Settings.Default.Save();
+                    }
+                    return jobject["msg"].ToObject<string>().ToLower();
+
+                }
             }
+            catch
+            {
+                return "网络不稳定请重试";
+            }
+          
         }
         public static String Login(string intemail, string intpassword, string uuid)
         {
@@ -295,37 +334,45 @@ namespace PDF_Office.Helper
             request.ContentType = "application/x-www-form-urlencoded";
             //request.Accept = "application/vnd.api+json;version=1";
             request.UserAgent = "Apifox/1.0.0 (https://www.apifox.cn)";
-            request.Timeout = 10000;
+            request.Timeout = 20000;
             request.ServicePoint.Expect100Continue = false;
-
-            response = (HttpWebResponse)request.GetResponse();
-            using (StreamReader reader = new StreamReader(response.GetResponseStream()))
+            try
             {
-                string responseData = reader.ReadToEnd();
-                Console.WriteLine(responseData);
-                reader.Close();
-                JObject jobject = (JObject)JsonConvert.DeserializeObject(responseData);
-                outlogin = jobject["msg"].ToObject<string>().ToLower();
-
-                if (response != null)
-                {
-                    response.Close();
-                }
-                if (request != null)
-                {
-                    request.Abort();
-                }
-                if (jobject["msg"].ToObject<string>().ToLower() == "success")
+                response = (HttpWebResponse)request.GetResponse();
+                using (StreamReader reader = new StreamReader(response.GetResponseStream()))
                 {
-                    access_token = jobject["result"]["access_token"].ToObject<string>().ToLower();
-                    Settings.Default.AppProperties.LoginToken= jobject["result"]["access_token"].ToObject<string>().ToLower();
-                    Settings.Default.Save();
-                }
-                return jobject["msg"].ToObject<string>().ToLower();
+                    string responseData = reader.ReadToEnd();
+                    Console.WriteLine(responseData);
+                    reader.Close();
+                    JObject jobject = (JObject)JsonConvert.DeserializeObject(responseData);
+                    outlogin = jobject["msg"].ToObject<string>().ToLower();
+
+                    if (response != null)
+                    {
+                        response.Close();
+                    }
+                    if (request != null)
+                    {
+                        request.Abort();
+                    }
+                    if (jobject["msg"].ToObject<string>().ToLower() == "success")
+                    {
+                        access_token = jobject["result"]["access_token"].ToObject<string>().ToLower();
+                        Settings.Default.AppProperties.LoginToken = jobject["result"]["access_token"].ToObject<string>().ToLower();
+                        Settings.Default.Save();
+                    }
+                    return jobject["msg"].ToObject<string>().ToLower();
 
+                }
+            }
+            catch
+            {
+                return "网络不稳定请重试";
             }
+           
         }
 
+        //⑤报错
         public static void Logout(string uuid)
         {
             
@@ -338,26 +385,33 @@ namespace PDF_Office.Helper
             request.ContentType = "application/x-www-form-urlencoded";
             //request.Accept = "application/vnd.api+json;version=1";
             request.UserAgent = "Apifox/1.0.0 (https://www.apifox.cn)";
-            request.Timeout = 10000;
+            request.Timeout = 20000;
             request.ServicePoint.Expect100Continue = false;
-
-            response = (HttpWebResponse)request.GetResponse();
-            using (StreamReader reader = new StreamReader(response.GetResponseStream()))
+            try
             {
-                string responseData = reader.ReadToEnd();
-                Console.WriteLine(responseData);
-                reader.Close();
-                JObject jobject = (JObject)JsonConvert.DeserializeObject(responseData);
-                if (response != null)
-                {
-                    response.Close();
-                }
-                if (request != null)
+                response = (HttpWebResponse)request.GetResponse();
+                using (StreamReader reader = new StreamReader(response.GetResponseStream()))
                 {
-                    request.Abort();
+                    string responseData = reader.ReadToEnd();
+                    Console.WriteLine(responseData);
+                    reader.Close();
+                    JObject jobject = (JObject)JsonConvert.DeserializeObject(responseData);
+                    if (response != null)
+                    {
+                        response.Close();
+                    }
+                    if (request != null)
+                    {
+                        request.Abort();
+                    }
+
                 }
-              
             }
+            catch
+            {
+               
+            }
+           
         }
         public static String Usergout(string code)
         {
@@ -371,30 +425,37 @@ namespace PDF_Office.Helper
             request.ContentType = "application/x-www-form-urlencoded";
             //request.Accept = "application/vnd.api+json;version=1";
             request.UserAgent = "Apifox/1.0.0 (https://www.apifox.cn)";
-            request.Timeout = 10000;
+            request.Timeout = 20000;
             request.ServicePoint.Expect100Continue = false;
-
-            response = (HttpWebResponse)request.GetResponse();
-            using (StreamReader reader = new StreamReader(response.GetResponseStream()))
+            try
             {
-                string responseData = reader.ReadToEnd();
-                Console.WriteLine(responseData);
-                reader.Close();
-                JObject jobject = (JObject)JsonConvert.DeserializeObject(responseData);
-                if (response != null)
-                {
-                    response.Close();
-                }
-                if (request != null)
+                response = (HttpWebResponse)request.GetResponse();
+                using (StreamReader reader = new StreamReader(response.GetResponseStream()))
                 {
-                    request.Abort();
-                }
-      
-                return jobject["msg"].ToObject<string>().ToLower();
+                    string responseData = reader.ReadToEnd();
+                    Console.WriteLine(responseData);
+                    reader.Close();
+                    JObject jobject = (JObject)JsonConvert.DeserializeObject(responseData);
+                    if (response != null)
+                    {
+                        response.Close();
+                    }
+                    if (request != null)
+                    {
+                        request.Abort();
+                    }
 
+                    return jobject["msg"].ToObject<string>().ToLower();
 
-               
+
+
+                }
+            }
+            catch
+            {
+                return "网络不稳定请重试";
             }
+           
         }
 
         public static String Rebirth(string intemail, string firstpassword, string secondPassword, string intcode)
@@ -408,7 +469,7 @@ namespace PDF_Office.Helper
             request.ContentType = "application/json";
             //request.Accept = "application/vnd.api+json;version=1";
             request.UserAgent = "Apifox/1.0.0 (https://www.apifox.cn)";
-            request.Timeout = 10000;
+            request.Timeout = 20000;
             request.ServicePoint.Expect100Continue = false;
             StringWriter sw = new StringWriter();
             using (JsonWriter writer = new JsonTextWriter(sw))
@@ -435,27 +496,36 @@ namespace PDF_Office.Helper
                 writer.Write(postBody);
                 writer.Close();
             }
-
-            response = (HttpWebResponse)request.GetResponse();
-            using (StreamReader reader = new StreamReader(response.GetResponseStream()))
+            try
             {
-                string responseData = reader.ReadToEnd();
-                Console.WriteLine(responseData);
-                reader.Close();
-                JObject jobject = (JObject)JsonConvert.DeserializeObject(responseData);
-                if (response != null)
-                {
-                    response.Close();
-                }
-                if (request != null)
+                response = (HttpWebResponse)request.GetResponse();
+                using (StreamReader reader = new StreamReader(response.GetResponseStream()))
                 {
-                    request.Abort();
+                    string responseData = reader.ReadToEnd();
+                    Console.WriteLine(responseData);
+                    reader.Close();
+                    JObject jobject = (JObject)JsonConvert.DeserializeObject(responseData);
+                    if (response != null)
+                    {
+                        response.Close();
+                    }
+                    if (request != null)
+                    {
+                        request.Abort();
+                    }
+                    return jobject["msg"].ToObject<string>().ToLower();
+
+
                 }
-               return jobject["msg"].ToObject<string>().ToLower();
 
-               
             }
+            catch
+            {
+                return "网络不稳定请重试";
+            }
+           
         }
+         
     }
 }
 

+ 1 - 1
PDF Office/Model/Dialog/ConverterDialogs/ConverterDialogsModel.cs

@@ -14,7 +14,7 @@ namespace PDF_Office.Model.Dialog.ConverterDialogs
     public class ConvertOptions
     {
         public COCRLanguage OCRLanguage = COCRLanguage.English;
-        public bool IsAllowOCR = false;
+        public bool IsAllowOCR = true;
         public bool IsContainOCRBgImage =false;
         public bool IsContainAnnotations = true;
         public bool IsContainImages = true;

+ 1 - 1
PDF Office/ViewModels/Dialog/ConverterDialogs/ConverterExcelDialogViewModel.cs

@@ -74,7 +74,7 @@ namespace PDF_Office.ViewModels.Dialog.ConverterDialogs
             }
         }
 
-        private bool oCRCheckBoxIsCheckBox = false;
+        private bool oCRCheckBoxIsCheckBox = true;
         public bool OCRCheckBoxIsCheckBox
         {
             get { return oCRCheckBoxIsCheckBox; }

+ 1 - 1
PDF Office/ViewModels/Dialog/ConverterDialogs/ConverterHTMLDialogViewModel.cs

@@ -48,7 +48,7 @@ namespace PDF_Office.ViewModels.Dialog.ConverterDialogs
             }
         }
 
-        private bool oCRCheckBoxIsCheckBox = false;
+        private bool oCRCheckBoxIsCheckBox = true;
         public bool OCRCheckBoxIsCheckBox
         {
             get { return oCRCheckBoxIsCheckBox; }

+ 1 - 1
PDF Office/ViewModels/Dialog/ConverterDialogs/ConverterPPTDialogViewModel.cs

@@ -48,7 +48,7 @@ namespace PDF_Office.ViewModels.Dialog.ConverterDialogs
             }
         }
 
-        private bool oCRCheckBoxIsCheckBox = false;
+        private bool oCRCheckBoxIsCheckBox = true;
         public bool OCRCheckBoxIsCheckBox
         {
             get { return oCRCheckBoxIsCheckBox; }

+ 1 - 1
PDF Office/ViewModels/Dialog/ConverterDialogs/ConverterRTFDialogViewModel.cs

@@ -48,7 +48,7 @@ namespace PDF_Office.ViewModels.Dialog.ConverterDialogs
             }
         }
 
-        private bool oCRCheckBoxIsCheckBox = false;
+        private bool oCRCheckBoxIsCheckBox = true;
         public bool OCRCheckBoxIsCheckBox
         {
             get { return oCRCheckBoxIsCheckBox; }

+ 1 - 1
PDF Office/ViewModels/Dialog/ConverterDialogs/ConverterTextDialogViewModel.cs

@@ -49,7 +49,7 @@ namespace PDF_Office.ViewModels.Dialog.ConverterDialogs
             }
         }
 
-        private bool oCRCheckBoxIsCheckBox = false;
+        private bool oCRCheckBoxIsCheckBox = true;
         public bool OCRCheckBoxIsCheckBox
         {
             get { return oCRCheckBoxIsCheckBox; }

+ 1 - 1
PDF Office/ViewModels/Dialog/ConverterDialogs/ConverterWordDialogViewModel.cs

@@ -48,7 +48,7 @@ namespace PDF_Office.ViewModels.Dialog.ConverterDialogs
             }
         }
 
-        private bool oCRCheckBoxIsCheckBox = false;
+        private bool oCRCheckBoxIsCheckBox = true;
         public bool OCRCheckBoxIsCheckBox
         {
             get { return oCRCheckBoxIsCheckBox; }

+ 1 - 1
PDF Office/ViewModels/Dialog/ServiceDialog/CodeRegionViewModel.cs

@@ -267,7 +267,7 @@ namespace PDF_Office.ViewModels.Dialog.ServiceDialog
 
         private void Code6Changed()
         {
-            if(Code6.Length==1)
+           if(Code6.Length==1)
             {
                 Codesum = Code1 + Code2 + Code3 + Code4 + Code5 + Code6;
                 if (Codesum.Length == 6)

+ 42 - 4
PDF Office/ViewModels/Dialog/ServiceDialog/LoginPasswordRegionViewModel.cs

@@ -79,6 +79,15 @@ namespace PDF_Office.ViewModels.Dialog.ServiceDialog
             set
             {
                 SetProperty(ref _LoginPassword, value);
+                LoginPasswordlookVis = Visibility.Collapsed;
+                if (string.IsNullOrEmpty(LoginPassword))
+                {
+                    ChkVis = Visibility.Collapsed;
+                }
+                else
+                {
+                    ChkVis = Visibility.Visible;
+                }
                 CheckEnableNextStepEncrypt();
             }
 
@@ -123,6 +132,13 @@ namespace PDF_Office.ViewModels.Dialog.ServiceDialog
                 SetProperty(ref _LoginPasswordVisibility, value);
             }
         }
+        private Visibility _ChkVis = Visibility.Collapsed;
+        public Visibility ChkVis
+        {
+            get { return _ChkVis; }
+            set { SetProperty(ref _ChkVis, value); }
+        }
+
 
         private Visibility _LoginTextVisibility = Visibility.Collapsed;
         public Visibility LoginTextVisibility
@@ -144,6 +160,7 @@ namespace PDF_Office.ViewModels.Dialog.ServiceDialog
         public DelegateCommand GoCodeUpdataCommand { get; set; }
         public DelegateCommand LoginCommand { get; set; }
         public DelegateCommand LinkLicenseCommand { get; set; }
+        public DelegateCommand LoginPasswordChangedCommand { get; set; }
         LoginPasswordRegionViewModel(IRegionManager regionManager, IDialogService dialogService)
         {
             dialogs = dialogService;
@@ -152,8 +169,28 @@ namespace PDF_Office.ViewModels.Dialog.ServiceDialog
             LoginCommand = new DelegateCommand(Login);
             ChangeEmailCommand = new DelegateCommand(ChangeEmail);
             GoCodeUpdataCommand = new DelegateCommand(GoCodeUpdata);
+            LoginPasswordChangedCommand = new DelegateCommand(LoginPasswordChanged);
+        }
+        private void LoginPasswordChanged()
+        {
+
+            if (LoginPassword.Length < 6)
+            {
+                LoginPasswordlook = "At least 6 characters";
+            }
+            else if (LoginPassword.Length > 24)
+            {
+                LoginPasswordlook = "Up to 24 characters";
+            }
+            else
+            {
+                LoginPasswordlook = "";
+            }
+
         }
 
+
+
         private void GoCodeUpdata()
         {
             ServiceHelper.Get_code("user_reset_password", LoginEmail);
@@ -203,10 +240,11 @@ namespace PDF_Office.ViewModels.Dialog.ServiceDialog
         {
             EnableNextStep = true;
 
-            if (string.IsNullOrEmpty(LoginPassword))
-            {
-                EnableNextStep = false;
-            }
+            if (LoginPassword.Length < 6 || LoginPassword.Length > 24 )
+                {
+                    EnableNextStep = false;
+                }
+
         }
 
         public void DisplayPassword(object e)

+ 26 - 9
PDF Office/ViewModels/Dialog/ServiceDialog/LoginRegionViewModel.cs

@@ -9,6 +9,7 @@ using System.Collections.Generic;
 using System.Diagnostics;
 using System.Linq;
 using System.Text;
+using System.Text.RegularExpressions;
 using System.Threading.Tasks;
 using System.Windows;
 using System.Windows.Controls;
@@ -52,7 +53,7 @@ namespace PDF_Office.ViewModels.Dialog.ServiceDialog
         public string LoginEmaillook
         {
             get { return _LoginEmaillook; }
-            set { SetProperty(ref _LoginEmaillook, value); }
+            set { SetProperty(ref _LoginEmaillook, value);}
         }
 
 
@@ -75,6 +76,15 @@ namespace PDF_Office.ViewModels.Dialog.ServiceDialog
             set
             {
                 SetProperty(ref _LoginEmail, value);
+
+                if (LoginEmail == "")
+                {
+                    LoginEmaillook = "";
+                }
+                else
+                {
+                    CheckMail(LoginEmail);
+                }
                 CheckEnableNextStepEncrypt();
             }
         }
@@ -123,19 +133,26 @@ namespace PDF_Office.ViewModels.Dialog.ServiceDialog
         }
 
 
+        private void CheckMail(string mail)
+        {
+            string str = "^([a-z0-9_\\.-]+)@([\\da-z\\.-]+)\\.([a-z\\.]{2,6})$";
+            Regex mReg = new Regex(str);
 
+            if (mReg.IsMatch(mail))
+            {
+                LoginEmaillook = "";
+            }
+            else
+            {
+                LoginEmaillook = "请输入正确的邮箱格式";
+            }
+        }
         private void GoLogin()
         {
 
 
             LoginDialogViewModel.Close();
-
-            dialogs.ShowDialog(DialogNames.RegisterDialog, new DialogParameters(""), r =>
-            {
-
-
-            });
-
+            App.mainWindowViewModel.OpenRegister();
 
         }
 
@@ -143,7 +160,7 @@ namespace PDF_Office.ViewModels.Dialog.ServiceDialog
         {
             EnableNextStep = true;
 
-            if (string.IsNullOrEmpty(LoginEmail))
+            if (string.IsNullOrEmpty(LoginEmail)||LoginEmaillook!="")
             {
                 EnableNextStep = false;
             }

+ 75 - 3
PDF Office/ViewModels/Dialog/ServiceDialog/PasswordUpdataRegionVIewModel.cs

@@ -70,7 +70,12 @@ namespace PDF_Office.ViewModels.Dialog.ServiceDialog
             set { SetProperty(ref _LoginPasswordlook, value); }
         }
 
-
+        private string _LoginPasswordlook2;
+        public string LoginPasswordlook2
+        {
+            get { return _LoginPasswordlook2; }
+            set { SetProperty(ref _LoginPasswordlook2, value); }
+        }
 
 
         private string _LoginPassword = "";
@@ -80,6 +85,14 @@ namespace PDF_Office.ViewModels.Dialog.ServiceDialog
             set
             {
                 SetProperty(ref _LoginPassword, value);
+                if (string.IsNullOrEmpty(LoginPassword))
+                {
+                    ChkVis = Visibility.Collapsed;
+                }
+                else
+                {
+                    ChkVis = Visibility.Visible;
+                }
                 CheckEnableNextStepEncrypt();
             }
 
@@ -95,7 +108,19 @@ namespace PDF_Office.ViewModels.Dialog.ServiceDialog
             }
         }
 
+        private Visibility _ChkVis = Visibility.Collapsed;
+        public Visibility ChkVis
+        {
+            get { return _ChkVis; }
+            set { SetProperty(ref _ChkVis, value); }
+        }
 
+        private Visibility _ChkVis2 = Visibility.Collapsed;
+        public Visibility ChkVis2
+        {
+            get { return _ChkVis2; }
+            set { SetProperty(ref _ChkVis2, value); }
+        }
         private Visibility _LoginPasswordVisibility = Visibility.Visible;
         public Visibility LoginPasswordVisibility
         {
@@ -131,6 +156,14 @@ namespace PDF_Office.ViewModels.Dialog.ServiceDialog
             set
             {
                 SetProperty(ref _LoginPassword2, value);
+                if (string.IsNullOrEmpty(LoginPassword2))
+                {
+                    ChkVis2 = Visibility.Collapsed;
+                }
+                else
+                {
+                    ChkVis2 = Visibility.Visible;
+                }
                 CheckEnableNextStepEncrypt();
             }
 
@@ -197,21 +230,60 @@ namespace PDF_Office.ViewModels.Dialog.ServiceDialog
 
 
         public DelegateCommand<object> DisplayPasswordCommand { get; set; }
+        public DelegateCommand<object> DisplayPasswordCommand2 { get; set; }
 
         public DelegateCommand ChangeEmailCommand { get; set; }
         public DelegateCommand GoCodeUpdataCommand { get; set; }
         public DelegateCommand PasswordUpdataCommand { get; set; }
         public DelegateCommand LinkLicenseCommand { get; set; }
+
+        public DelegateCommand LoginPasswordChangedCommand { get; set; }
+        public DelegateCommand LoginPasswordChanged2Command { get; set; }
         PasswordUpdataRegionViewModel(IRegionManager regionManager, IDialogService dialogService)
         {
             dialogs = dialogService;
 
             DisplayPasswordCommand = new DelegateCommand<object>(DisplayPassword);
-            DisplayPasswordCommand = new DelegateCommand<object>(DisplayPassword2);
+            DisplayPasswordCommand2 = new DelegateCommand<object>(DisplayPassword2);
             PasswordUpdataCommand = new DelegateCommand(PasswordUpdata);
+            LoginPasswordChangedCommand = new DelegateCommand(LoginPasswordChanged);
+            LoginPasswordChanged2Command = new DelegateCommand(LoginPasswordChanged2);
         }
 
+        private void LoginPasswordChanged()
+        {
 
+            if (LoginPassword.Length < 6)
+            {
+                LoginPasswordlook = "At least 6 characters";
+            }
+            else if (LoginPassword.Length > 24)
+            {
+                LoginPasswordlook = "Up to 24 characters";
+            }
+            else
+            {
+                LoginPasswordlook = "";
+            }
+
+        }
+        private void LoginPasswordChanged2()
+        {
+
+            if (LoginPassword2.Length < 6)
+            {
+                LoginPasswordlook2 = "At least 6 characters";
+            }
+            else if (LoginPassword2.Length > 24)
+            {
+                LoginPasswordlook2 = "Up to 24 characters";
+            }
+            else
+            {
+                LoginPasswordlook2 = "";
+            }
+
+        }
 
         private void PasswordUpdata()
         {
@@ -233,7 +305,7 @@ namespace PDF_Office.ViewModels.Dialog.ServiceDialog
         {
             EnableNextStep = true;
 
-            if (string.IsNullOrEmpty(LoginPassword)|| string.IsNullOrEmpty(LoginPassword2))
+            if (LoginPassword.Length < 6 || LoginPassword.Length > 24 || LoginPassword2.Length < 6 || LoginPassword2.Length > 24)
             {
                 EnableNextStep = false;
             }

+ 1 - 3
PDF Office/ViewModels/Dialog/ServiceDialog/RegisterOKRegionViewModel.cs

@@ -58,9 +58,7 @@ namespace PDF_Office.ViewModels.Dialog.ServiceDialog
         {
 
             RegisterDialogViewModel.Close();
-            App.mainWindowViewModel.UserVis = Visibility.Collapsed;
-            App.mainWindowViewModel.RegisterVis = Visibility.Collapsed;
-            App.mainWindowViewModel.LoginVis = Visibility.Visible;
+            
 
         }
     }

+ 102 - 9
PDF Office/ViewModels/Dialog/ServiceDialog/RegisterRegionViewModel.cs

@@ -9,6 +9,7 @@ using System.Collections.Generic;
 using System.Diagnostics;
 using System.Linq;
 using System.Text;
+using System.Text.RegularExpressions;
 using System.Threading.Tasks;
 using System.Windows;
 using System.Windows.Controls;
@@ -86,6 +87,14 @@ namespace PDF_Office.ViewModels.Dialog.ServiceDialog
             }
         }
 
+        private bool _isRegisterPasswordDisplayed = false;
+        public bool IsRegisterPasswordDisplayed
+        {
+            get { return _isRegisterPasswordDisplayed; }
+            set { SetProperty(ref _isRegisterPasswordDisplayed, value); }
+        }
+
+
         private string _registerText1 = "Already have an account?";
         public string Registertext1
         {
@@ -116,7 +125,16 @@ namespace PDF_Office.ViewModels.Dialog.ServiceDialog
             get { return _registerPassword; }
             set
             {
+                
                 SetProperty(ref _registerPassword, value);
+                if (string.IsNullOrEmpty(RegisterPassword))
+                {
+                    ChkVis = Visibility.Collapsed;
+                }
+                else
+                {
+                    ChkVis = Visibility.Visible;
+                }
                 CheckEnableNextStepEncrypt();
             }
 
@@ -129,6 +147,16 @@ namespace PDF_Office.ViewModels.Dialog.ServiceDialog
             set
             {
                 SetProperty(ref _registerEmail, value);
+
+                if(RegisterEmail=="")
+                {
+                    RegisterEmaillook = "";
+                }
+                else
+                {
+                    CheckMail(RegisterEmail);
+                }
+               
                 CheckEnableNextStepEncrypt();
             }
         }
@@ -152,7 +180,7 @@ namespace PDF_Office.ViewModels.Dialog.ServiceDialog
                 SetProperty(ref _registerPasswordMsg, value);
             }
         }
-
+        
         private Visibility _registerPasswordVisibility = Visibility.Visible;
         public Visibility RegisterPasswordVisibility
         {
@@ -170,6 +198,13 @@ namespace PDF_Office.ViewModels.Dialog.ServiceDialog
                 SetProperty(ref _registerPasswordVisibility, value);
             }
         }
+        private Visibility _ChkVis = Visibility.Collapsed;
+        public Visibility ChkVis
+        {
+            get { return _ChkVis; }
+            set { SetProperty(ref _ChkVis, value); }
+        }
+        
         private Visibility _registerTextVisibility = Visibility.Collapsed;
         public Visibility RegisterTextVisibility
         {
@@ -183,11 +218,14 @@ namespace PDF_Office.ViewModels.Dialog.ServiceDialog
             get { return _isPermissionsPasswordDisplayed; }
             set { SetProperty(ref _isPermissionsPasswordDisplayed, value); }
         }
-
+        
         public DelegateCommand<object> DisplayPasswordCommand { get; set; }
         public DelegateCommand LinkPolicyCommand { get; set; }
+        public DelegateCommand CloseDialogCommand { get; set; }
         public DelegateCommand RegisterNextCommand { get; set; }
         public DelegateCommand GoLoginCommand { get; set; }
+        public DelegateCommand RegisterPasswordChangedCommand { get; set; }
+        
         public DelegateCommand LinkLicenseCommand { get; set; }
         RegisterRegionViewModel(IRegionManager regionManager, IDialogService dialogService)
         {
@@ -197,6 +235,52 @@ namespace PDF_Office.ViewModels.Dialog.ServiceDialog
             LinkLicenseCommand = new DelegateCommand(LinkLicense);
             GoLoginCommand = new DelegateCommand(GoLogin);
             RegisterNextCommand = new DelegateCommand(RegisterNext);
+            CloseDialogCommand = new DelegateCommand(CloseDialog);
+            RegisterPasswordChangedCommand = new DelegateCommand(RegisterPasswordChanged);
+            
+        }
+
+
+        private void RegisterPasswordChanged()
+        {
+
+           if(RegisterPassword.Length<6)
+            {
+                RegisterePasswordlook = "At least 6 characters";
+            }
+           else if(RegisterPassword.Length>24)
+            {
+                RegisterePasswordlook = "Up to 24 characters";
+            }
+           else
+            {
+                RegisterePasswordlook = "";
+            }
+
+        }
+
+
+
+        private void CheckMail(string mail)
+        {
+            string str = "^([a-z0-9_\\.-]+)@([\\da-z\\.-]+)\\.([a-z\\.]{2,6})$";
+            Regex mReg = new Regex(str);
+
+            if (mReg.IsMatch(mail))
+            {
+                RegisterEmaillook = "";
+            }
+            else
+            {
+                RegisterEmaillook = "请输入正确的邮箱格式";
+            }
+        }
+
+        private void CloseDialog()
+        {
+
+            RegisterDialogViewModel.Close();
+         
         }
 
 
@@ -210,6 +294,9 @@ namespace PDF_Office.ViewModels.Dialog.ServiceDialog
                 RegisterDialogViewModel.RegisterPassword = RegisterPassword;
                 ServiceHelper.Get_code("user_register", RegisterEmail);
                 RegisterDialogViewModel.RegionMan( "CodeRegion");
+                App.mainWindowViewModel.UserVis = Visibility.Visible;
+                App.mainWindowViewModel.RegisterVis = Visibility.Collapsed;
+                App.mainWindowViewModel.LoginVis = Visibility.Collapsed;
             }
             else 
             {
@@ -217,7 +304,16 @@ namespace PDF_Office.ViewModels.Dialog.ServiceDialog
             }
         }
 
-
+        public void SetOpenPassword(object e)
+        {
+            var chk = e as CheckBox;
+            if (chk != null)
+            {
+                IsRegisterPasswordDisplayed = false;
+                RegisterPasswordVisibility = Visibility.Visible;
+            }
+            CheckEnableNextStepEncrypt();
+        }
 
         private void GoLogin()
         {
@@ -225,11 +321,8 @@ namespace PDF_Office.ViewModels.Dialog.ServiceDialog
 
             RegisterDialogViewModel.Close();
 
-            dialogs.ShowDialog(DialogNames.LoginDialog, new DialogParameters(""), r =>
-            {
-               
-
-            });
+            App.mainWindowViewModel.OpenLogin();
+    
 
 
         }
@@ -255,7 +348,7 @@ namespace PDF_Office.ViewModels.Dialog.ServiceDialog
         {
             EnableNextStep = true;
            
-            if (string.IsNullOrEmpty(RegisterPassword) || string.IsNullOrEmpty(RegisterEmail))
+            if (RegisterPassword.Length<6|| RegisterPassword.Length >24 || string.IsNullOrEmpty(RegisterEmail)|| RegisterEmaillook!="")
             {
                 EnableNextStep = false;
             }

+ 21 - 18
PDF Office/ViewModels/Dialog/ToolsDialogs/MergeDialogViewModel.cs

@@ -20,6 +20,7 @@ using System.Windows;
 using System.Windows.Controls;
 using System.Windows.Media;
 using System.Windows.Media.Imaging;
+using static PDF_Office.Model.Dialog.ToolsDialogs.SaftyDialogs.DeleteSafetySettintgsModel;
 
 namespace PDF_Office.ViewModels.Dialog.ToolsDialogs
 {
@@ -364,6 +365,11 @@ namespace PDF_Office.ViewModels.Dialog.ToolsDialogs
                     continue;
                 }
                 string FileType = Path.GetExtension(mergeObject.FilePath).Trim().ToLower();
+                if (string.IsNullOrEmpty(FileType))
+                {
+                    //获取不到文件类型
+                    continue;
+                }
                 if (FileType != ".pdf")
                 {
                     if (!Properties.Resources.imageex.Contains(FileType))
@@ -381,28 +387,25 @@ namespace PDF_Office.ViewModels.Dialog.ToolsDialogs
                 else
                 {
                     CPDFDocument doc = CPDFDocument.InitWithFilePath(mergeObject.FilePath);
-                    if (doc.IsLocked)
+                    if (doc==null)
                     {
-                        DialogParameters value = new DialogParameters();
-                        value.Add(ParameterNames.PDFDocument, doc);
-                        dialogs.ShowDialog(DialogNames.VerifyPassWordDialog, value, e =>
-                        {
-                            if (e.Result != ButtonResult.OK)
-                            {
-                                result = false;
-                            }
-                            else
-                            {
-                                mergeObject.Password = e.Parameters.GetValue<string>(ParameterNames.PassWord);
-                            }
-
-                        });
-                        if (!result)
+                        //图片格式不支持
+                        continue;
+                    }
+                    VerifyPasswordResult condition = SecurityHelper.VerifyPasswordByPasswordKind(doc, EnumPasswordKind.StatusPermissionsPassword, dialogs);
+                    if (condition.IsDiscryptied)
+                    {
+                        if (condition.Password != null)
                         {
-                            doc.Release();
-                            continue;
+                            mergeObject.Password = condition.Password;
+                            doc.UnlockWithPassword(condition.Password);
                         }
                     }
+                    else
+                    {
+                        doc.Release();
+                        continue;
+                    }
                     mergeObject.DocName = doc.FileName;
                     mergeObject.DocPageCount = doc.PageCount.ToString() + "页";
                     mergeObject.SDKPageCount = doc.PageCount;

+ 12 - 1
PDF Office/ViewModels/FillAndSign/FillAndSignContentViewModel.cs

@@ -61,6 +61,13 @@ namespace PDF_Office.ViewModels.FillAndSign
         public double FillOpacity = 1;
         public double LineWidth = 1;
         public double LineWidthMultiple = 1;
+
+        private bool _HookShapeIsCheck=true;
+        public bool HookShapeIsCheck {
+            get { return _HookShapeIsCheck; }
+            set { SetProperty(ref _HookShapeIsCheck,value); }
+        
+        }
         #endregion
 
         #region Command
@@ -1154,7 +1161,10 @@ namespace PDF_Office.ViewModels.FillAndSign
             ContextMenu contextMenu = App.Current.FindResource("ViewerContextMenu") as ContextMenu;
 
             ViewerContextMenu_Loaded(contextMenu, null,Visibility.Visible);
-            viewContentViewModel.SelectedPrpoertyPanel("PropertyPanelContent", null);
+            viewContentViewModel.SelectedPrpoertyPanel("PropertyPanelContent", null);
+            PDFViewer.SetMouseMode(MouseModes.PanTool);
+            ShowPropertyPanel(false);
+           
         }
 
         public void OnNavigatedTo(NavigationContext navigationContext)
@@ -1162,6 +1172,7 @@ namespace PDF_Office.ViewModels.FillAndSign
             navigationContext.Parameters.TryGetValue<ViewContentViewModel>(ParameterNames.ViewContentViewModel, out viewContentViewModel);
             navigationContext.Parameters.TryGetValue<CPDFViewer>(ParameterNames.PDFViewer, out PDFViewer);
             BindingPDFViewerHandler();
+            HookShapeIsCheck=true;
             InitCheckedEvent("RbtnTick");
             IsEdit = false;
         }

+ 10 - 4
PDF Office/ViewModels/MainWindowViewModel.cs

@@ -221,10 +221,14 @@ namespace PDF_Office.ViewModels
                 System.Windows.Application.Current.Dispatcher.BeginInvoke(System.Windows.Threading.DispatcherPriority.Send, new Action(() =>
                 {
                     region.RequestNavigate(RegionNames.MainRegion, "MainContent");
+                    if (App.IsShowRegist)
+                    {
+                        OpenRegister();
+                    }
+
                 }
                 ));
                 App.IsFirstOpen = false;
-
                 if (Settings.Default.AppProperties.LoginToken != "")
                 {
                     UserVis = Visibility.Visible;
@@ -233,11 +237,13 @@ namespace PDF_Office.ViewModels
                 {
                     RegisterVis = Visibility.Visible;
                 }
+               
             }
+            
         }
 
         //打开注册弹窗
-        private void OpenRegister()
+        public void OpenRegister()
         {
             dialogs.ShowDialog(DialogNames.RegisterDialog, new DialogParameters(), r =>
             {
@@ -245,7 +251,7 @@ namespace PDF_Office.ViewModels
         }
 
         //打开登录弹窗
-        private void OpenLogin()
+        public void OpenLogin()
         {
             dialogs.ShowDialog(DialogNames.LoginDialog, new DialogParameters(""), r =>
             {
@@ -253,7 +259,7 @@ namespace PDF_Office.ViewModels
         }
 
         //打开用户弹窗
-        private void OpenUser()
+        public void OpenUser()
         {
             dialogs.ShowDialog(DialogNames.UserDialog, new DialogParameters(""), r =>
             {

+ 2 - 0
PDF Office/ViewModels/Tools/AnnotToolContentViewModel.Command.cs

@@ -381,6 +381,8 @@ namespace PDF_Office.ViewModels.Tools
 
                 case AnnotArgsType.AnnotSticky:
                     GetStickyNote(e.AnnotItemsList);
+                    customStickyPopup.GetCurrentAnnot = e.AnnotItemsList[0] as StickyAnnotArgs;
+                    customStickyPopup.GetPDFViewer = PDFViewer;
                     break;
             }
         }

+ 2 - 0
PDF Office/ViewModels/Tools/ConverterBarContentViewModel.cs

@@ -270,6 +270,8 @@ namespace PDF_Office.ViewModels.Tools
             if (PDFViewer != null)
             {
                 isFirstLoad = false;
+                viewContentViewModel.IsPropertyOpen = false;
+                PDFViewer.SetMouseMode(MouseModes.PanTool);
             }
         }
     }

+ 4 - 5
PDF Office/Views/Dialog/ConverterDialogs/ConverterCSVDialog.xaml

@@ -33,18 +33,17 @@
                         <TextBlock
                                 Height="20"
                                 Style="{StaticResource PropertyHeaderLv2}"
-                            
                                 HorizontalAlignment="Left"
-                                Text="CSV Workbook Settings" />
+                                Text="CSV Settings" />
                         <StackPanel Margin="0,10,0,0">
                             <RadioButton
                                 IsChecked="True"
                                 Name="ForEachPageRadioBtn"
-                               
+                                Padding="8,0,0,0"
                                 Style="{StaticResource RadioButtonStyleText}"
                                 Command="{Binding RadioButtonCommand}"
                                 CommandParameter="{Binding ElementName=ForEachPageRadioBtn, Path=Name}">
-                                <TextBlock Text="Retain Flowing Text" />
+                                <TextBlock Text="Create worksheets for each &#13; form" />
                             </RadioButton>
                             <RadioButton
                                 
@@ -53,7 +52,7 @@
                                 Style="{StaticResource RadioButtonStyleText}"
                                 Command="{Binding RadioButtonCommand}"
                                 CommandParameter="{Binding ElementName=OnlyTableRadioBtn, Path=Name}">
-                                <TextBlock Text="Retain Page Layout" />
+                                <TextBlock Text="Create a single worksheet for &#13; a document" />
                             </RadioButton>
                         </StackPanel>
                         <StackPanel Margin="0,18,0,0" Orientation="Vertical">

+ 2 - 2
PDF Office/Views/Dialog/ConverterDialogs/ConverterHTMLDialog.xaml

@@ -29,11 +29,11 @@
                 <Grid Grid.Column="1">
                     <StackPanel Orientation="Vertical"  Margin="16,2,0,0">
                         <StackPanel Orientation="Vertical">
-                            <TextBlock Text="Text Recognition Settings" HorizontalAlignment="Left"  Height="20"  Style="{StaticResource PropertyHeaderLv2}"/>
+                            <TextBlock Text="HTML Recognition Settings" HorizontalAlignment="Left"  Height="20"  Style="{StaticResource PropertyHeaderLv2}"/>
                             <CheckBox Name="OCRCheckBox"  Margin="0,8,0,0" Padding="8,0,0,0" IsChecked="{Binding OCRCheckBoxIsCheckBox}">
                                 <TextBlock Text="Recognize text if needed"/>
                             </CheckBox>
-                            <ComboBox IsEnabled="{Binding ElementName=OCRCheckBox,Path=IsChecked}"  Margin="0,8,0,0" Width="228"  Height="32" HorizontalAlignment="Left" SelectedIndex="{Binding LanguageSelectedIndex}">
+                            <ComboBox IsEnabled="{Binding ElementName=OCRCheckBox,Path=IsChecked}"  Margin="0,8,0,0" Width="228"  Height="32" HorizontalAlignment="Left" SelectedIndex="{Binding LanguageSelectedIndex}" >
                                 <ComboBoxItem Content="Chinese Simplified"/>
                                 <ComboBoxItem Content="Chinese Traditional"/>
                                 <ComboBoxItem Content="English"/>

+ 2 - 2
PDF Office/Views/Dialog/ConverterDialogs/ConverterPPTDialog.xaml

@@ -29,11 +29,11 @@
                 <Grid Grid.Column="1">
                     <StackPanel Orientation="Vertical"  Margin="16,2,0,0">
                         <StackPanel Orientation="Vertical">
-                            <TextBlock Text="Text Recognition Settings" HorizontalAlignment="Left"  Style="{StaticResource PropertyHeaderLv2}" Height="20"/>
+                            <TextBlock Text="PPT Recognition Settings" HorizontalAlignment="Left"  Style="{StaticResource PropertyHeaderLv2}" Height="20"/>
                             <CheckBox Name="OCRCheckBox"  Margin="0,10,0,0" IsChecked="{Binding OCRCheckBoxIsCheckBox}" Padding="8,0,0,0">
                                 <TextBlock Text="Recognize text if needed"/>
                             </CheckBox>
-                            <ComboBox IsEnabled="{Binding ElementName=OCRCheckBox,Path=IsChecked}"  Margin="0,8,0,0" Width="228" Height="28.55" HorizontalAlignment="Left" SelectedIndex="{Binding LanguageSelectedIndex}">
+                            <ComboBox IsEnabled="{Binding ElementName=OCRCheckBox,Path=IsChecked}"  Margin="0,8,0,0" Width="228" Height="32" HorizontalAlignment="Left" SelectedIndex="{Binding LanguageSelectedIndex}">
                                 <ComboBoxItem Content="Chinese Simplified"/>
                                 <ComboBoxItem Content="Chinese Traditional"/>
                                 <ComboBoxItem Content="English"/>

+ 1 - 1
PDF Office/Views/Dialog/ConverterDialogs/ConverterRTFDialog.xaml

@@ -29,7 +29,7 @@
                 <Grid Grid.Column="1">
                     <StackPanel Orientation="Vertical"  Margin="16,2,0,0">
                         <StackPanel Orientation="Vertical">
-                            <TextBlock Text="Text Recognition Settings" HorizontalAlignment="Left"  Style="{StaticResource PropertyHeaderLv2}" Height="20"/>
+                            <TextBlock Text="RTF Recognition Settings" HorizontalAlignment="Left"  Style="{StaticResource PropertyHeaderLv2}" Height="20"/>
                             <CheckBox Name="OCRCheckBox"  Margin="0,10,0,0" IsChecked="{Binding OCRCheckBoxIsCheckBox}" Padding="8,0,0,0">
                                 <TextBlock Text="Recognize text if needed"/>
                             </CheckBox>

+ 8 - 2
PDF Office/Views/Dialog/ServiceDialog/CodeRegion.xaml

@@ -45,6 +45,7 @@
             FontFamily="Segoe UI"
             FontSize="12"
             FontStyle="Normal"
+            KeyUp="text_Code1_KeyUp"
             Text="{Binding Code1, Mode=TwoWay}"
             TextChanged="Code_TextChanged" />
         <TextBox
@@ -56,6 +57,7 @@
             HorizontalAlignment="Left"
             VerticalAlignment="Top"
             FontFamily="Segoe UI"
+             KeyUp="text_Code2_KeyUp"
             FontSize="12"
             FontStyle="Normal"
             Text="{Binding Code2, Mode=TwoWay}"
@@ -64,6 +66,7 @@
             x:Name="text_Code3"
             Width="36"
             Height="42"
+             KeyUp="text_Code3_KeyUp"
             Margin="120,138,0,0"
             Padding="10"
             HorizontalAlignment="Left"
@@ -79,6 +82,7 @@
             Height="42"
             Margin="164,138,0,0"
             Padding="10"
+             KeyUp="text_Code4_KeyUp"
             HorizontalAlignment="Left"
             VerticalAlignment="Top"
             FontFamily="Segoe UI"
@@ -91,6 +95,7 @@
             x:Name="text_Code5"
             Width="36"
             Height="42"
+             KeyUp="text_Code5_KeyUp"
             Margin="208,138,0,0"
             Padding="10"
             HorizontalAlignment="Left"
@@ -106,15 +111,16 @@
             Height="42"
             Margin="252,138,0,0"
             Padding="10"
+             KeyUp="text_Code6_KeyUp"
             HorizontalAlignment="Left"
             VerticalAlignment="Top"
             FontFamily="Segoe UI"
             FontSize="12"
             FontStyle="Normal"
-            Text="{Binding Code6, Mode=TwoWay}"
+            Text="{Binding Code6, Mode=TwoWay,UpdateSourceTrigger=PropertyChanged}"
             TextChanged="text_Code6_TextChanged">
             <i:Interaction.Triggers>
-                <i:EventTrigger EventName="Code6Changed">
+                <i:EventTrigger EventName="TextChanged">
                     <i:InvokeCommandAction Command="{Binding Code6ChangedCommand}" />
                 </i:EventTrigger>
             </i:Interaction.Triggers>

+ 117 - 40
PDF Office/Views/Dialog/ServiceDialog/CodeRegion.xaml.cs

@@ -36,69 +36,88 @@ namespace PDF_Office.Views.Dialog.ServiceDialog
         }
         private void Code_TextChanged(object sender, TextChangedEventArgs e)
         {
-            if (text_Code1.Text.Length >= 1)
+            if (text_Code1.Text.Length == 1)
             {
                 text_Code2.Focus();
             }
-            else if(text_Code1.Text.Length == 0)
-            {
-                text_Code1.Focus();
-            }
+
             else if (text_Code1.Text.Length > 1)
             {
-                text_Code1.Text = text_Code1.Text.Substring(0, 1);
-                text_Code1.Focus();
+                string str = text_Code1.Text;
+               
+                 text_Code1.Text = str.Substring(0, 1);
+                str = str.Remove(0, 1);
+                if(str.Length>0)
+                {
+                    text_Code2.Text = str;
+                   
+                }
+               
+                
+                
             }
         }
 
         private void text_Code2_TextChanged(object sender, TextChangedEventArgs e)
         {
-            if (text_Code2.Text.Length >= 1)
+            if (text_Code2.Text.Length == 1)
             {
                 text_Code3.Focus();
             }
-            else if (text_Code2.Text.Length == 0)
-            {
-                text_Code1.Focus();
-            }
+
             else if (text_Code2.Text.Length > 1)
             {
-                text_Code2.Text = text_Code2.Text.Substring(0, 1);
-                text_Code2.Focus();
+                string str = text_Code2.Text;
+
+                text_Code2.Text = str.Substring(0, 1);
+                str = str.Remove(0, 1);
+                if (str.Length > 0)
+                {
+                    text_Code3.Text = str;
+                }
+                
             }
         }
 
         private void text_Code3_TextChanged(object sender, TextChangedEventArgs e)
         {
-            if (text_Code3.Text.Length >= 1)
+            if (text_Code3.Text.Length == 1)
             {
                 text_Code4.Focus();
             }
-            else if (text_Code3.Text.Length == 0)
-            {
-                text_Code2.Focus();
-            }
+
             else if (text_Code3.Text.Length > 1)
             {
-                text_Code3.Text = text_Code3.Text.Substring(0, 1);
-                text_Code3.Focus();
+                string str = text_Code3.Text;
+
+                text_Code3.Text = str.Substring(0, 1);
+                str = str.Remove(0, 1);
+                if (str.Length > 0)
+                {
+                    text_Code4.Text = str;
+                }
+                
             }
         }
 
         private void text_Code4_TextChanged(object sender, TextChangedEventArgs e)
         {
-            if (this.text_Code4.Text.Length >= 1)
+            if (this.text_Code4.Text.Length == 1)
             {
                 this.text_Code5.Focus();
             }
-            else if (text_Code4.Text.Length == 0)
-            {
-                text_Code3.Focus();
-            }
+
             else if (text_Code4.Text.Length > 1)
             {
-                text_Code4.Text = text_Code4.Text.Substring(0, 1);
-                text_Code4.Focus();
+                string str = text_Code4.Text;
+
+                text_Code4.Text = str.Substring(0, 1);
+                str = str.Remove(0, 1);
+                if (str.Length > 0)
+                {
+                    text_Code5.Text = str;
+                }
+               
             }
         }
 
@@ -108,14 +127,18 @@ namespace PDF_Office.Views.Dialog.ServiceDialog
             {
                 this.text_Code6.Focus();
             }
-            else if (text_Code5.Text.Length == 0)
-            {
-                text_Code4.Focus();
-            }
+
             else if (text_Code5.Text.Length > 1)
             {
-                text_Code5.Text = text_Code5.Text.Substring(0, 1);
-                text_Code5.Focus();
+                string str = text_Code5.Text;
+
+                text_Code5.Text = str.Substring(0, 1);
+                str = str.Remove(0, 1);
+                if (str.Length > 0)
+                {
+                    text_Code6.Text = str;
+                }
+                
             }
         }
 
@@ -125,18 +148,72 @@ namespace PDF_Office.Views.Dialog.ServiceDialog
             {
                 text_Code6.Focus();
             }
-            else if (text_Code6.Text.Length == 0)
+
+            else 
+            if(text_Code6.Text.Length >1)
             {
-                text_Code5.Focus();
+                string str = text_Code6.Text;
+                text_Code6.Focus();
+                text_Code6.Text = str.Substring(0, 1);
+                
+
+            }
+
+        }
+
+        private void text_Code1_KeyUp(object sender, KeyEventArgs e)
+        {
+            if (e.Key == Key.Back)
+            {
+                text_Code1.Text = "";
+                text_Code1.Focus();
             }
-            else if(text_Code6.Text.Length >1)
+        }
+
+        private void text_Code2_KeyUp(object sender, KeyEventArgs e)
+        {
+            if (e.Key == Key.Back)
             {
-                text_Code6.Text = text_Code6.Text.Substring(0,1);
-                text_Code6.Focus();
+                text_Code2.Text = "";
+                text_Code1.Focus();
+            }
+        }
+
+        private void text_Code3_KeyUp(object sender, KeyEventArgs e)
+        {
+            if (e.Key == Key.Back )
+            {
+                text_Code3.Text = "";
+                text_Code2.Focus();
             }
 
         }
 
-      
+        private void text_Code4_KeyUp(object sender, KeyEventArgs e)
+        {
+            if (e.Key == Key.Back )
+            {
+                text_Code4.Text = "";
+                text_Code3.Focus();
+            }
+        }
+
+        private void text_Code5_KeyUp(object sender, KeyEventArgs e)
+        {
+            if (e.Key == Key.Back )
+            {
+                text_Code5.Text = "";
+                text_Code4.Focus();
+            }
+        }
+
+        private void text_Code6_KeyUp(object sender, KeyEventArgs e)
+        {
+            if (e.Key == Key.Back )
+            {
+                text_Code6.Text = "";
+                text_Code5.Focus();
+            }
+        }
     }
 }

+ 1 - 0
PDF Office/Views/Dialog/ServiceDialog/LoginDialog.xaml

@@ -8,6 +8,7 @@
     xmlns:prism="http://prismlibrary.com/"
     prism:ViewModelLocator.AutoWireViewModel="True" 
     Width="586"
+     prism:Dialog.WindowStyle="{StaticResource DialogWindowStyle}"
     Height="420"
     mc:Ignorable="d">
     <Grid Background="White">

+ 10 - 2
PDF Office/Views/Dialog/ServiceDialog/LoginPasswordRegion.xaml

@@ -6,7 +6,7 @@
     xmlns:help="clr-namespace:PDF_Office.Helper"
     xmlns:local="clr-namespace:PDF_Office.Views.Dialog.ServiceDialog"
     xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
-    xmlns:prism="http://prismlibrary.com/"
+    xmlns:prism="http://prismlibrary.com/" xmlns:i="http://schemas.microsoft.com/xaml/behaviors"
     Width="326"
     Height="420"
     prism:ViewModelLocator.AutoWireViewModel="True"
@@ -344,16 +344,24 @@
                 Style="{StaticResource LoginPasswordBoxStyle}"
                 Visibility="{Binding LoginPasswordVisibility, Mode=TwoWay}" />
                 <TextBox
+                    x:Name="Text_Password"
                 Grid.ColumnSpan="2"
                 help:PasswordBoxHelper.DisplayText="{Binding LoginPasswordMsg, Mode=TwoWay}"
                 Style="{StaticResource LoginPasswordTextBoxStyle}"
                 Text="{Binding LoginPassword, Mode=TwoWay, UpdateSourceTrigger=PropertyChanged}"
-                Visibility="{Binding LoginTextVisibility, Mode=TwoWay}" />
+                Visibility="{Binding LoginTextVisibility, Mode=TwoWay}" HorizontalAlignment="Left" Width="262" >
+                    <i:Interaction.Triggers>
+                        <i:EventTrigger EventName="TextChanged">
+                            <i:InvokeCommandAction Command="{Binding LoginPasswordChangedCommand}" />
+                        </i:EventTrigger>
+                    </i:Interaction.Triggers>
+                </TextBox>
                 <CheckBox
                 x:Name="DisplayLoginPasswordChk"
                 Grid.Column="1"
                 Height="16"
                 HorizontalAlignment="Left"
+                Visibility="{Binding ChkVis}"
                 Panel.ZIndex="1"
                 Command="{Binding DisplayPasswordCommand}"
                 CommandParameter="{Binding RelativeSource={RelativeSource Self}}"

+ 8 - 0
PDF Office/Views/Dialog/ServiceDialog/LoginPasswordRegion.xaml.cs

@@ -23,6 +23,14 @@ namespace PDF_Office.Views.Dialog.ServiceDialog
         public LoginPasswordRegion()
         {
             InitializeComponent();
+            Loaded += Focus_Loaded;
+
+
+        }
+
+        private void Focus_Loaded(object sender, RoutedEventArgs e)
+        {
+            Text_Password.Focus();
         }
     }
 }

+ 2 - 1
PDF Office/Views/Dialog/ServiceDialog/LoginRegion.xaml

@@ -304,11 +304,12 @@
                 VerticalAlignment="Top">
 
                 <TextBox
+                    x:Name="Text_Email"
                     Grid.ColumnSpan="2"
                     help:PasswordBoxHelper.DisplayText="{Binding LoginEmailMsg, Mode=TwoWay}"
                     Style="{StaticResource LoginEmailTextBoxStyle}"
                     Text="{Binding LoginEmail, Mode=TwoWay, UpdateSourceTrigger=PropertyChanged}"
-                    Visibility="{Binding EmailTextVisibility, Mode=TwoWay}" />
+                     />
             </Grid>
             <TextBlock
                 Width="262"

+ 9 - 0
PDF Office/Views/Dialog/ServiceDialog/LoginRegion.xaml.cs

@@ -23,6 +23,15 @@ namespace PDF_Office.Views.Dialog.ServiceDialog
         public LoginRegion()
         {
             InitializeComponent();
+            Loaded += Focus_Loaded;
+
+
+        }
+
+        private void Focus_Loaded(object sender, RoutedEventArgs e)
+        {
+            Text_Email.Focus();
         }
+    
     }
 }

+ 28 - 3
PDF Office/Views/Dialog/ServiceDialog/PasswordUpdataRegion.xaml

@@ -6,7 +6,7 @@
     xmlns:help="clr-namespace:PDF_Office.Helper"
     xmlns:local="clr-namespace:PDF_Office.Views.Dialog.ServiceDialog"
     xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
-    xmlns:prism="http://prismlibrary.com/"
+    xmlns:prism="http://prismlibrary.com/" xmlns:i="http://schemas.microsoft.com/xaml/behaviors"
     Width="326"
     Height="420"
     prism:ViewModelLocator.AutoWireViewModel="True"
@@ -417,22 +417,40 @@
                 Style="{StaticResource LoginPasswordBoxStyle2}"
                 Visibility="{Binding LoginPasswordVisibility2, Mode=TwoWay}" />
                 <TextBox
+                 x:Name="Text_RePassword2"
                 Grid.ColumnSpan="2"
                 help:PasswordBoxHelper.DisplayText="{Binding LoginPasswordMsg2, Mode=TwoWay}"
                 Style="{StaticResource LoginPasswordTextBoxStyle2}"
                 Text="{Binding LoginPassword2, Mode=TwoWay, UpdateSourceTrigger=PropertyChanged}"
-                Visibility="{Binding LoginTextVisibility2, Mode=TwoWay}" />
+                Visibility="{Binding LoginTextVisibility2, Mode=TwoWay}" >
+                    <i:Interaction.Triggers>
+                        <i:EventTrigger EventName="TextChanged">
+                            <i:InvokeCommandAction Command="{Binding LoginPasswordChanged2Command}" />
+                        </i:EventTrigger>
+                    </i:Interaction.Triggers>
+                </TextBox>
+
                 <CheckBox
                 x:Name="DisplayLoginPasswordChk2"
                 Grid.Column="1"
                 Height="16"
                 HorizontalAlignment="Left"
                 Panel.ZIndex="1"
+                     Visibility="{Binding ChkVis2}"
                 Command="{Binding DisplayPasswordCommand2}"
                 CommandParameter="{Binding RelativeSource={RelativeSource Self}}"
                 IsChecked="{Binding IsLoginPasswordDisplayed2, Mode=TwoWay}"
                 Style="{StaticResource EyeCheckbox}" />
+               
             </Grid>
+            <TextBlock
+                Width="262"
+                Height="20"
+                Margin="32,142,0,0"
+                Foreground="#F3465B"
+                HorizontalAlignment="Left"
+                VerticalAlignment="Top"
+                Text="{Binding LoginPasswordlook2, Mode=TwoWay}" Grid.ColumnSpan="2" />
             <Grid
             Width="262"
             Height="32"
@@ -455,13 +473,20 @@
                 help:PasswordBoxHelper.DisplayText="{Binding LoginPasswordMsg, Mode=TwoWay}"
                 Style="{StaticResource LoginPasswordTextBoxStyle}"
                 Text="{Binding LoginPassword, Mode=TwoWay, UpdateSourceTrigger=PropertyChanged}"
-                Visibility="{Binding LoginTextVisibility, Mode=TwoWay}" />
+                Visibility="{Binding LoginTextVisibility, Mode=TwoWay}" >
+                    <i:Interaction.Triggers>
+                        <i:EventTrigger EventName="TextChanged">
+                            <i:InvokeCommandAction Command="{Binding LoginPasswordChangedCommand}" />
+                        </i:EventTrigger>
+                    </i:Interaction.Triggers>
+                </TextBox>
                 <CheckBox
                 x:Name="DisplayLoginPasswordChk"
                 Grid.Column="1"
                 Height="16"
                 HorizontalAlignment="Left"
                 Panel.ZIndex="1"
+                     Visibility="{Binding ChkVis}"
                 Command="{Binding DisplayPasswordCommand}"
                 CommandParameter="{Binding RelativeSource={RelativeSource Self}}"
                 IsChecked="{Binding IsLoginPasswordDisplayed, Mode=TwoWay}"

+ 9 - 0
PDF Office/Views/Dialog/ServiceDialog/PasswordUpdataRegion.xaml.cs

@@ -24,7 +24,16 @@ namespace PDF_Office.Views.Dialog.ServiceDialog
     {
         public PasswordUpdataRegion()
         {
+
             InitializeComponent();
+            Loaded += Focus_Loaded;
+
+
+        }
+
+        private void Focus_Loaded(object sender, RoutedEventArgs e)
+        {
+            Text_RePassword2.Focus();
         }
     }
 }

+ 1 - 0
PDF Office/Views/Dialog/ServiceDialog/RegisterDialog.xaml

@@ -7,6 +7,7 @@
     xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
     xmlns:prism="http://prismlibrary.com/"
     prism:ViewModelLocator.AutoWireViewModel="True" 
+    prism:Dialog.WindowStyle="{StaticResource DialogWindowStyle}"
     Width="586"
     Height="420"
     mc:Ignorable="d">

+ 49 - 22
PDF Office/Views/Dialog/ServiceDialog/RegisterRegion.xaml

@@ -6,11 +6,10 @@
     xmlns:help="clr-namespace:PDF_Office.Helper"
     xmlns:local="clr-namespace:PDF_Office.Views.Dialog.ServiceDialog"
     xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
-    xmlns:prism="http://prismlibrary.com/"
-    Height="420"
+    xmlns:prism="http://prismlibrary.com/" xmlns:i="http://schemas.microsoft.com/xaml/behaviors"
     Width="326"
+    Height="420"
     prism:ViewModelLocator.AutoWireViewModel="True"
-    
     mc:Ignorable="d">
     <UserControl.Resources>
         <Style x:Key="EyeCheckbox" TargetType="CheckBox">
@@ -276,6 +275,18 @@
     </UserControl.Resources>
 
     <Grid Background="White">
+        <Button
+            Width="16"
+            Height="16" 
+            WindowChrome.IsHitTestVisibleInChrome="True"
+            Margin="287,17,0,0"
+            HorizontalAlignment="Left"
+            Background="Transparent"  
+            BorderThickness="0"
+            VerticalAlignment="Top"
+            Command="{Binding CloseDialogCommand}">
+            <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>
         <TextBlock
             Width="72"
             Height="28"
@@ -294,21 +305,20 @@
             HorizontalAlignment="Left"
             VerticalAlignment="Top">
             <TextBox
-                
+                Name="Text_Email"
                 Grid.ColumnSpan="2"
                 help:PasswordBoxHelper.DisplayText="{Binding RegisterEmailMsg, Mode=TwoWay}"
                 Style="{StaticResource RegisterEmailTextBoxStyle}"
-                Text="{Binding RegisterEmail, Mode=TwoWay, UpdateSourceTrigger=PropertyChanged}"
-                Visibility="{Binding EmailTextVisibility, Mode=TwoWay}"  />
+                Text="{Binding RegisterEmail, Mode=TwoWay, UpdateSourceTrigger=PropertyChanged}" />
         </Grid>
         <TextBlock
             Width="262"
             Height="20"
             Margin="32,144,0,0"
-            Foreground="#F3465B"
             HorizontalAlignment="Left"
-            Text="{Binding RegisterEmaillook,Mode=TwoWay}"
-            VerticalAlignment="Top"/>
+            VerticalAlignment="Top"
+            Foreground="#F3465B"
+            Text="{Binding RegisterEmaillook, Mode=TwoWay}" />
 
         <Grid
             Width="262"
@@ -316,7 +326,7 @@
             Margin="32,170,0,0"
             HorizontalAlignment="Left"
             VerticalAlignment="Top"
-            IsEnabled="{Binding ElementName=PermissionsPasswordChk, Path=IsChecked}">
+            >
             <Grid.ColumnDefinitions>
                 <ColumnDefinition />
                 <ColumnDefinition Width="24" />
@@ -332,7 +342,14 @@
                 help:PasswordBoxHelper.DisplayText="{Binding RegisterPasswordMsg, Mode=TwoWay}"
                 Style="{StaticResource RegisterPasswordTextBoxStyle}"
                 Text="{Binding RegisterPassword, Mode=TwoWay, UpdateSourceTrigger=PropertyChanged}"
-                Visibility="{Binding RegisterTextVisibility, Mode=TwoWay}" />
+                Visibility="{Binding RegisterTextVisibility, Mode=TwoWay}" >
+                <i:Interaction.Triggers>
+                    <i:EventTrigger EventName="TextChanged">
+                        <i:InvokeCommandAction Command="{Binding RegisterPasswordChangedCommand}" />
+                    </i:EventTrigger>
+                </i:Interaction.Triggers>
+            </TextBox>
+            
             <CheckBox
                 x:Name="DisplayRegisterPasswordChk"
                 Grid.Column="1"
@@ -340,6 +357,7 @@
                 HorizontalAlignment="Left"
                 Panel.ZIndex="1"
                 Command="{Binding DisplayPasswordCommand}"
+                Visibility="{Binding ChkVis}"
                 CommandParameter="{Binding RelativeSource={RelativeSource Self}}"
                 IsChecked="{Binding IsRegisterPasswordDisplayed, Mode=TwoWay}"
                 Style="{StaticResource EyeCheckbox}" />
@@ -349,9 +367,9 @@
             Height="20"
             Margin="32,204,0,0"
             HorizontalAlignment="Left"
+            VerticalAlignment="Top"
             Foreground="#F3465B"
-            Text="{Binding RegisterePasswordlook,Mode=TwoWay}"
-            VerticalAlignment="Top"/>
+            Text="{Binding RegisterePasswordlook, Mode=TwoWay}" />
         <Button
             Width="262"
             Height="32"
@@ -383,9 +401,8 @@
             FontSize="12"
             FontWeight="Normal"
             Foreground="#1770F4"
-            LineHeight="20"
-            Text="{Binding GoLogin}" >
-            <Hyperlink    Command="{Binding GoLoginCommand}">Sign in </Hyperlink>
+            LineHeight="20">
+            <Hyperlink Command="{Binding GoLoginCommand}">Sign in</Hyperlink>
         </TextBlock>
         <TextBlock
             Width="262"
@@ -397,12 +414,22 @@
             FontSize="11"
             FontWeight="Normal"
             Foreground="#616469"
-            TextWrapping = "Wrap"
-            LineHeight="18">
-            <Run Text="By registering, you agree to the" />   
-           <Hyperlink NavigateUri="{Binding UriPolivy}" TextDecorations="Underline"  Command="{Binding LinkPolicyCommand}">privary policy </Hyperlink>
-           <Run Text="and"/>
-           <Hyperlink NavigateUri="{Binding UriLicense}" TextDecorations="Underline" Command="{Binding LinkLicenseCommand}">License Agreement </Hyperlink>
+            LineHeight="18"
+            TextWrapping="Wrap">
+            <Run Text="By registering, you agree to the" />
+            <Hyperlink
+                Command="{Binding LinkPolicyCommand}"
+                NavigateUri="{Binding UriPolivy}"
+                TextDecorations="Underline">
+                privary policy
+            </Hyperlink>
+            <Run Text="and" />
+            <Hyperlink
+                Command="{Binding LinkLicenseCommand}"
+                NavigateUri="{Binding UriLicense}"
+                TextDecorations="Underline">
+                License Agreement
+            </Hyperlink>
         </TextBlock>
     </Grid>
 </UserControl>

+ 10 - 0
PDF Office/Views/Dialog/ServiceDialog/RegisterRegion.xaml.cs

@@ -25,6 +25,16 @@ namespace PDF_Office.Views.Dialog.ServiceDialog
         public RegisterRegion()
         {
             InitializeComponent();
+            Loaded += Focus_Loaded;
+
+
+        }
+
+        private void Focus_Loaded(object sender, RoutedEventArgs e)
+        {
+            Text_Email.Focus();
         }
+    
+
     }
 }

+ 1 - 0
PDF Office/Views/Dialog/ServiceDialog/UserDialog.xaml

@@ -8,6 +8,7 @@
     xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
     xmlns:prism="http://prismlibrary.com/"
     Width="310"
+   prism:Dialog.WindowStyle="{StaticResource DialogWindowStyle}"
     Height="348"
     prism:ViewModelLocator.AutoWireViewModel="True"
     mc:Ignorable="d">

+ 7 - 1
PDF Office/Views/Dialog/ServiceDialog/UserOutCodeRegion.xaml

@@ -39,6 +39,7 @@
             x:Name="text_Code1"
             Width="36"
             Height="42"
+            KeyUp="text_Code1_KeyUp"
             Margin="24,130,0,0"
             Padding="10"
             HorizontalAlignment="Left"
@@ -51,6 +52,7 @@
         <TextBox
             x:Name="text_Code2"
             Width="36"
+            KeyUp="text_Code2_KeyUp"
             Height="42"
             Margin="69,130,0,0"
             Padding="10"
@@ -67,6 +69,7 @@
             Height="42"
             Margin="114,130,0,0"
             Padding="10"
+            KeyUp="text_Code3_KeyUp"
             HorizontalAlignment="Left"
             VerticalAlignment="Top"
             FontFamily="Segoe UI"
@@ -78,6 +81,7 @@
             x:Name="text_Code4"
             Width="36"
             Height="42"
+            KeyUp="text_Code4_KeyUp"
             Margin="159,130,0,0"
             Padding="10"
             HorizontalAlignment="Left"
@@ -92,6 +96,7 @@
             x:Name="text_Code5"
             Width="36"
             Height="42"
+            KeyUp="text_Code5_KeyUp"
             Margin="204,130,0,0"
             Padding="10"
             HorizontalAlignment="Left"
@@ -104,6 +109,7 @@
         <TextBox
             x:Name="text_Code6"
             Width="36"
+            KeyUp="text_Code6_KeyUp"
             Height="42"
             Margin="249,130,0,0"
             Padding="10"
@@ -112,7 +118,7 @@
             FontFamily="Segoe UI"
             FontSize="12"
             FontStyle="Normal"
-            Text="{Binding Code6, Mode=TwoWay}"
+            Text="{Binding Code6, Mode=TwoWay,UpdateSourceTrigger=PropertyChanged}"
             TextChanged="text_Code6_TextChanged">
             <i:Interaction.Triggers>
                 <i:EventTrigger EventName="Code6Changed">

+ 116 - 39
PDF Office/Views/Dialog/ServiceDialog/UserOutCodeRegion.xaml.cs

@@ -38,69 +38,88 @@ namespace PDF_Office.Views.Dialog.ServiceDialog
 
         private void Code_TextChanged(object sender, TextChangedEventArgs e)
         {
-            if (text_Code1.Text.Length >= 1)
+            if (text_Code1.Text.Length == 1)
             {
                 text_Code2.Focus();
             }
-            else if (text_Code1.Text.Length == 0)
-            {
-                text_Code1.Focus();
-            }
+
             else if (text_Code1.Text.Length > 1)
             {
-                text_Code1.Text = text_Code1.Text.Substring(0, 1);
-                text_Code1.Focus();
+                string str = text_Code1.Text;
+
+                text_Code1.Text = str.Substring(0, 1);
+                str = str.Remove(0, 1);
+                if (str.Length > 0)
+                {
+                    text_Code2.Text = str;
+
+                }
+
+
+
             }
         }
 
         private void text_Code2_TextChanged(object sender, TextChangedEventArgs e)
         {
-            if (text_Code2.Text.Length >= 1)
+            if (text_Code2.Text.Length == 1)
             {
                 text_Code3.Focus();
             }
-            else if (text_Code2.Text.Length == 0)
-            {
-                text_Code1.Focus();
-            }
+
             else if (text_Code2.Text.Length > 1)
             {
-                text_Code2.Text = text_Code2.Text.Substring(0, 1);
-                text_Code2.Focus();
+                string str = text_Code2.Text;
+
+                text_Code2.Text = str.Substring(0, 1);
+                str = str.Remove(0, 1);
+                if (str.Length > 0)
+                {
+                    text_Code3.Text = str;
+                }
+
             }
         }
 
         private void text_Code3_TextChanged(object sender, TextChangedEventArgs e)
         {
-            if (text_Code3.Text.Length >= 1)
+            if (text_Code3.Text.Length == 1)
             {
                 text_Code4.Focus();
             }
-            else if (text_Code3.Text.Length == 0)
-            {
-                text_Code2.Focus();
-            }
+
             else if (text_Code3.Text.Length > 1)
             {
-                text_Code3.Text = text_Code3.Text.Substring(0, 1);
-                text_Code3.Focus();
+                string str = text_Code3.Text;
+
+                text_Code3.Text = str.Substring(0, 1);
+                str = str.Remove(0, 1);
+                if (str.Length > 0)
+                {
+                    text_Code4.Text = str;
+                }
+
             }
         }
 
         private void text_Code4_TextChanged(object sender, TextChangedEventArgs e)
         {
-            if (this.text_Code4.Text.Length >= 1)
+            if (this.text_Code4.Text.Length == 1)
             {
                 this.text_Code5.Focus();
             }
-            else if (text_Code4.Text.Length == 0)
-            {
-                text_Code3.Focus();
-            }
+
             else if (text_Code4.Text.Length > 1)
             {
-                text_Code4.Text = text_Code4.Text.Substring(0, 1);
-                text_Code4.Focus();
+                string str = text_Code4.Text;
+
+                text_Code4.Text = str.Substring(0, 1);
+                str = str.Remove(0, 1);
+                if (str.Length > 0)
+                {
+                    text_Code5.Text = str;
+                }
+
             }
         }
 
@@ -110,14 +129,18 @@ namespace PDF_Office.Views.Dialog.ServiceDialog
             {
                 this.text_Code6.Focus();
             }
-            else if (text_Code5.Text.Length == 0)
-            {
-                text_Code4.Focus();
-            }
+
             else if (text_Code5.Text.Length > 1)
             {
-                text_Code5.Text = text_Code5.Text.Substring(0, 1);
-                text_Code5.Focus();
+                string str = text_Code5.Text;
+
+                text_Code5.Text = str.Substring(0, 1);
+                str = str.Remove(0, 1);
+                if (str.Length > 0)
+                {
+                    text_Code6.Text = str;
+                }
+
             }
         }
 
@@ -127,18 +150,72 @@ namespace PDF_Office.Views.Dialog.ServiceDialog
             {
                 text_Code6.Focus();
             }
-            else if (text_Code6.Text.Length == 0)
-            {
-                text_Code5.Focus();
-            }
+
             else if (text_Code6.Text.Length > 1)
             {
-                text_Code6.Text = text_Code6.Text.Substring(0, 1);
+                string str = text_Code6.Text;
                 text_Code6.Focus();
+                text_Code6.Text = str.Substring(0, 1);
+
+
+            }
+
+        }
+
+        private void text_Code1_KeyUp(object sender, KeyEventArgs e)
+        {
+            if (e.Key == Key.Back)
+            {
+                text_Code1.Text = "";
+                text_Code1.Focus();
+            }
+        }
+
+        private void text_Code2_KeyUp(object sender, KeyEventArgs e)
+        {
+            if (e.Key == Key.Back)
+            {
+                text_Code2.Text = "";
+                text_Code1.Focus();
+            }
+        }
+
+        private void text_Code3_KeyUp(object sender, KeyEventArgs e)
+        {
+            if (e.Key == Key.Back)
+            {
+                text_Code3.Text = "";
+                text_Code2.Focus();
+            }
+
+        }
+
+        private void text_Code4_KeyUp(object sender, KeyEventArgs e)
+        {
+            if (e.Key == Key.Back)
+            {
+                text_Code4.Text = "";
+                text_Code3.Focus();
             }
+        }
 
+        private void text_Code5_KeyUp(object sender, KeyEventArgs e)
+        {
+            if (e.Key == Key.Back)
+            {
+                text_Code5.Text = "";
+                text_Code4.Focus();
+            }
         }
 
+        private void text_Code6_KeyUp(object sender, KeyEventArgs e)
+        {
+            if (e.Key == Key.Back)
+            {
+                text_Code6.Text = "";
+                text_Code5.Focus();
+            }
+        }
 
     }
 }

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

@@ -38,7 +38,7 @@
                         </i:EventTrigger>
                     </i:Interaction.Triggers>
                 </RadioButton>-->
-                <RadioButton Name="RbtnTick" IsChecked="True"  Width="36" Height="36">
+                <RadioButton Name="RbtnTick" IsChecked="{Binding HookShapeIsCheck}"  Width="36" Height="36">
                     <Path Data="M17.3725 3.20441L18.5688 4.10928L8.73555 17.1099L2.46973 10.844L3.53039 9.78337L8.57806 14.831L17.3725 3.20441Z" Fill="Black" />
                     <i:Interaction.Triggers>
                         <i:EventTrigger EventName="Checked">

+ 36 - 8
PDF Office/Views/PropertyPanel/AnnotPanel/StickyNotePopup.xaml

@@ -9,15 +9,43 @@
              d:DesignHeight="450" d:DesignWidth="800">
     <annotview:StickyPopupExt.Resources>
         <DataTemplate x:Key="listboxData">
-            <Ellipse
+            <Ellipse Stroke="{StaticResource color.sys.layout.divider}"
+                     StrokeThickness="1"
                     Width="20"
                     Height="20"
                     Fill="{Binding Color}" />
         </DataTemplate>
+
         <Style x:Key="listboxItemStyle" TargetType="{x:Type ListBoxItem}">
             <Setter Property="HorizontalContentAlignment" Value="Center" />
-            <Setter Property="Height" Value="32" />
+            <Setter Property="Height" Value="32"/>
+            <Setter Property="Width" Value="32"/>
             <Setter Property="Margin" Value="2,0,2,0" />
+            <Setter Property="Template">
+                <Setter.Value>
+                    <ControlTemplate TargetType="{x:Type ContentControl}">
+                        <Border CornerRadius="4"
+                                x:Name="border"
+                                Padding="0,0"
+                                Background="{TemplateBinding Background}">
+                            <ContentPresenter />
+                        </Border>
+                    </ControlTemplate>
+                </Setter.Value>
+            </Setter>
+
+            <Style.Triggers>
+                <Trigger Property="IsMouseOver" Value="True">
+                    <Setter Property="Background" Value="#e2e3e5" />
+                </Trigger>
+                <Trigger Property="IsMouseOver" Value="False">
+                    <Setter Property="Background" Value="Transparent" />
+                </Trigger>
+                <Trigger Property="IsSelected" Value="True">
+                    <Setter Property="Background" Value="#e2e3e5" />
+                </Trigger>
+            </Style.Triggers>
+
         </Style>
     </annotview:StickyPopupExt.Resources>
     <Grid MouseLeftButtonDown="Grid_MouseLeftButtonDown">
@@ -25,14 +53,14 @@
             <Border.Effect>
                 <DropShadowEffect BlurRadius="8" Direction="0" Opacity="0.16" ShadowDepth="0" Color="#000000" />
             </Border.Effect>
-            <Grid MinWidth="240" MinHeight="200" Background="White" Name="GridUi" Width="240" Height="200">
+            <Grid MinWidth="240" MinHeight="200" Background="Transparent" Name="GridUi" Width="240" Height="200">
                 <Grid.RowDefinitions>
-                    <RowDefinition Height="auto"></RowDefinition>
+                    <RowDefinition Height="32"></RowDefinition>
                     <RowDefinition Height="auto"></RowDefinition>
                     <RowDefinition Height="*"></RowDefinition>
                     <RowDefinition Height="auto"></RowDefinition>
                 </Grid.RowDefinitions>
-                <Grid>
+                <Grid Margin="8,0,8,0">
                     <Grid.ColumnDefinitions>
                         <ColumnDefinition Width="auto"></ColumnDefinition>
                         <ColumnDefinition Width="auto"></ColumnDefinition>
@@ -42,7 +70,7 @@
                     </Grid.ColumnDefinitions>
                     <TextBlock x:Name="AuthorText" Grid.Column="1" FontFamily="SegoeUI" FontSize="12" VerticalAlignment="Center" LineHeight="16" Margin="2,2,0,0"/>
                     <TextBlock Name="DateText" Grid.Column="3" Foreground="{StaticResource color.sys.text.neutral.lv2}" VerticalAlignment="Center"  Margin="0,-2,0,0" FontFamily="SegoeUI" FontSize="12" LineHeight="16"></TextBlock>
-                    <Border Grid.Column="4"  MouseUp="CloseText_MouseUp" Background="#01000000" Margin="0,-8,-3,0">
+                    <Border Grid.Column="4" Visibility="Collapsed" MouseUp="CloseText_MouseUp" Background="#01000000" Margin="0,-8,-3,0">
                         <Path Fill="#000000" Width="16" Height="16" >
                             <Path.Data>
                                 M9.48528137,2.98528137 L9.48428137,8.48428137 L14.9852814,8.48528137 L14.9852814,9.48528137 L9.48428137,9.48428137 L9.48528137,14.9852814 L8.48528137,14.9852814 L8.48428137,9.48428137 L2.98528137,9.48528137 L2.98528137,8.48528137 L8.48428137,8.48428137 L8.48528137,2.98528137 L9.48528137,2.98528137 Z
@@ -53,8 +81,8 @@
                         </Path>
                     </Border>
                 </Grid>
-              
-                <TextBox  Name="ContentText" Grid.Row="2" Margin="4,0,4,0" Background="#CCFFFFFF" BorderThickness="0" 
+                <Rectangle Margin="8,0,8,0" VerticalAlignment="Bottom" Height="1" Fill="{StaticResource color.sys.layout.divider}"/>
+                <TextBox  x:Name="ContentText" Grid.Row="2" Padding="2,4,0,0"  Margin="4,0,4,0" Background="#CCFFFFFF" BorderThickness="0" 
                      AcceptsReturn="True" TextWrapping="Wrap" VerticalScrollBarVisibility="Auto"></TextBox>
 
                 <Grid Grid.Row="3">

+ 78 - 9
PDF Office/Views/PropertyPanel/AnnotPanel/StickyNotePopup.xaml.cs

@@ -1,4 +1,6 @@
 using ComPDFKitViewer;
+using ComPDFKitViewer.AnnotEvent;
+using ComPDFKitViewer.PdfViewer;
 using PDF_Office.CustomControl.CompositeControl;
 using System;
 using System.Collections.Generic;
@@ -73,6 +75,22 @@ namespace PDF_Office.Views.PropertyPanel.AnnotPanel
             Color bkColor = (border.BorderBrush as SolidColorBrush).Color;
             bkColor.A = saveOpacity;
             border.BorderBrush = new SolidColorBrush(bkColor);
+            this.Background = new SolidColorBrush(Colors.Transparent);
+            this.BorderBrush = new SolidColorBrush(Colors.Transparent);
+
+            //为了点击某控件之后就直接关闭窗口
+            var ui = Mouse.DirectlyOver as FrameworkElement;
+            if (ui != null)
+            {
+
+                var colorItem = ui.DataContext as ColorItem;
+                if (colorItem != null)
+                {
+                    e.Handled = false;
+                    return;
+                }
+            }
+
             CloseText_MouseUp(this, null);
         }
 
@@ -82,13 +100,43 @@ namespace PDF_Office.Views.PropertyPanel.AnnotPanel
             saveOpacity = bkColor.A;
             bkColor.A = 255;
             border.BorderBrush = new SolidColorBrush(bkColor);
-            this.Background = new SolidColorBrush(this.StickyColor);
+            this.Background = new SolidColorBrush(Colors.Transparent);
+            this.BorderBrush = new SolidColorBrush(Colors.Transparent);
         }
 
         private void StickyPopupControl_Loaded(object sender, RoutedEventArgs e)
         {
             ContentText.Focus();
             ContentText.CaretIndex = ContentText.Text.Length;
+            LoadedColor();
+        }
+
+        public void LoadedColor()
+        {
+            if (colors != null && colors.Count > 0)
+            {
+                BtnDelete.DataContext = colors[0];//为了避免点击删除按钮之后,先执行取消焦点函数后,就没法执行点击事件
+
+                if (GetCurrentAnnot != null)
+                {
+                    foreach (var item in colors)
+                    {
+                        var colorItem = (item.Color as SolidColorBrush).Color;
+                        if (colorItem.A == GetCurrentAnnot.Color.A &&
+                            colorItem.R == GetCurrentAnnot.Color.R &&
+                            colorItem.G == GetCurrentAnnot.Color.G &&
+                            colorItem.B == GetCurrentAnnot.Color.B
+                            )
+                        {
+                            ListColor.SelectedItem = item;
+                            return;
+                        }
+                    }
+
+                }
+
+                ListColor.SelectedItem = null;
+            }
         }
 
         private void StickyPopupControl_MouseDown(object sender, MouseButtonEventArgs e)
@@ -139,6 +187,8 @@ namespace PDF_Office.Views.PropertyPanel.AnnotPanel
             }
         }
 
+        public StickyAnnotArgs GetCurrentAnnot { get; set; }
+        public CPDFViewer GetPDFViewer { get; set; }
         public bool CanMove { get; set; } = true;
         private void ResizeGrip_MouseMove(object sender, MouseEventArgs e)
         {
@@ -272,6 +322,8 @@ namespace PDF_Office.Views.PropertyPanel.AnnotPanel
         {
             base.SetStickyColor(newColor);
             border.BorderBrush = new SolidColorBrush(newColor);
+            this.Background = new SolidColorBrush(Colors.Transparent);
+            this.BorderBrush = new SolidColorBrush(Colors.Transparent);
         }
 
         public override void SetStickyNote(string note)
@@ -291,22 +343,39 @@ namespace PDF_Office.Views.PropertyPanel.AnnotPanel
             return StickyText;
         }
 
+
         private void ListColor_SelectionChanged(object sender, SelectionChangedEventArgs e)
         {
-            var color = ListColor.SelectedItem as ColorItem;
-            if (color != null)
+            var colorItem = ListColor.SelectedItem as ColorItem;
+            if (colorItem != null)
             {
-                this.SetStickyColor((color.Color as SolidColorBrush).Color);
-                border.BorderBrush = new SolidColorBrush((color.Color as SolidColorBrush).Color);
-                this.Background = new SolidColorBrush((color.Color as SolidColorBrush).Color);
+                var color = (colorItem.Color as SolidColorBrush).Color;
+                this.SetStickyColor(color);
+                var annot = GetCurrentAnnot as StickyAnnotArgs;
+                if (annot != null)
+                {
+                    annot.Color = color;
+                    var AnnotEvent = AnnotAttribEvent.GetAnnotAttribEvent(annot, annot.GetAnnotAttrib());
+                    AnnotEvent?.UpdateAttrib(AnnotAttrib.Color, color);
+                    AnnotEvent?.UpdateAnnot();
+                }
+                border.BorderBrush = new SolidColorBrush(color);
+                this.Background = new SolidColorBrush(Colors.Transparent);
+                this.BorderBrush = new SolidColorBrush(Colors.Transparent);
             }
         }
 
         private void BtnDelete_Click(object sender, RoutedEventArgs e)
         {
-            ContentText.Text = "";
-            this.SetStickyNote("");
-            Closed.Invoke(sender, EventArgs.Empty);
+            if (GetPDFViewer != null)
+            {
+                if (GetCurrentAnnot != null)
+                    GetPDFViewer.RemovePageAnnot(GetCurrentAnnot.PageIndex, GetCurrentAnnot.AnnotIndex);
+
+                // Closed.Invoke(sender, EventArgs.Empty);
+                CloseText_MouseUp(this, null);
+            }
+
         }
 
         private void Grid_MouseLeftButtonDown(object sender, MouseButtonEventArgs e)