From 25429f085093d89d543a0b90e30d0d62d1b7dac9 Mon Sep 17 00:00:00 2001
From: hxb <hxb@hdlchina.com.cn>
Date: 星期二, 30 八月 2022 09:37:38 +0800
Subject: [PATCH] 合并了IOS的代码

---
 ZigbeeApp/Shared/Phone/UserCenter/HideOption/HideOptionFileContentForm.cs |   41 ++++++++++++++++++++++++++++++++++++++++-
 1 files changed, 40 insertions(+), 1 deletions(-)

diff --git a/ZigbeeApp/Shared/Phone/UserCenter/HideOption/HideOptionFileContentForm.cs b/ZigbeeApp/Shared/Phone/UserCenter/HideOption/HideOptionFileContentForm.cs
index b032749..5658f1d 100755
--- a/ZigbeeApp/Shared/Phone/UserCenter/HideOption/HideOptionFileContentForm.cs
+++ b/ZigbeeApp/Shared/Phone/UserCenter/HideOption/HideOptionFileContentForm.cs
@@ -11,6 +11,11 @@
     {
         #region 鈻� 鍙橀噺澹版槑___________________________
 
+        /// <summary>
+        /// 瑙e瘑
+        /// </summary>
+        private bool decryptPassword = false;
+
         #endregion
 
         #region 鈻� 鍒濆鍖朹____________________________
@@ -20,11 +25,30 @@
         /// </summary>
         public void ShowForm(string i_file)
         {
+            this.ScrollEnabled = false;
             //璁剧疆澶撮儴淇℃伅
             base.SetTitleText("鏂囦欢鍐呭");
 
             //鍒濆鍖栦腑閮ㄤ俊鎭�
             this.InitMiddleFrame(i_file);
+
+            var btnButton = new NormalViewControl(200, 69, true);
+            btnButton.Gravity = Gravity.CenterVertical;
+            btnButton.X = bodyFrameLayout.Width - Application.GetRealWidth(200) - ControlCommonResourse.XXLeft;
+            btnButton.TextColor = UserCenterColor.Current.TopLayoutTitleText;
+            btnButton.TextAlignment = TextAlignment.BottomRight;
+            btnButton.TextSize = 17;
+            btnButton.Text = "缈昏瘧";
+            topFrameLayout.AddChidren(btnButton);
+            btnButton.ButtonClickEvent += (sender, e) =>
+            {
+                if (this.decryptPassword == false)
+                {
+                    this.decryptPassword = true;
+                    //鍒濆鍖栦腑閮ㄤ俊鎭�
+                    this.InitMiddleFrame(i_file);
+                }
+            };
         }
 
         /// <summary>
@@ -33,6 +57,8 @@
         private void InitMiddleFrame(string i_file)
         {
             if (i_file == string.Empty) { return; }
+
+            this.ClearBodyFrame();
 
             if (i_file.EndsWith(".png") == true || i_file.EndsWith(".jpg") == true || i_file.EndsWith(".JPG") == true)
             {
@@ -58,7 +84,17 @@
         /// <param name="i_text"></param>
         public void SetTextContent(string textValue)
         {
-            textValue = textValue.Replace(",", "\r\n");
+            if (this.decryptPassword == true)
+            {
+                var strArry = textValue.Split(new string[] { "\r\n" }, StringSplitOptions.RemoveEmptyEntries);
+
+                textValue = string.Empty;
+                foreach (var strtext in strArry)
+                {
+                    string value = UserCenterLogic.DecryptPassword(UserCenterResourse.FileEncryptKey, strtext);
+                    textValue += value + "\r\n";
+                }
+            }
             if (textValue.StartsWith("{") == true)
             {
                 textValue = "{\r\n" + textValue.Substring(1);
@@ -74,6 +110,9 @@
             btnText.TextAlignment = TextAlignment.TopLeft;
             btnText.TextColor = UserCenterColor.Current.TextColor1;
             btnText.Text = textValue;
+#if Android
+            btnText.Foucs = false;
+#endif
             bodyFrameLayout.AddChidren(btnText);
         }
 

--
Gitblit v1.8.0