From 6fa9d69da922c8049f5acfcbb9ce9fd26811024c Mon Sep 17 00:00:00 2001
From: xm <1271024303@qq.com>
Date: 星期四, 16 四月 2020 17:10:57 +0800
Subject: [PATCH] 请合并代码

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

diff --git a/ZigbeeApp/Shared/Phone/UserCenter/HideOption/HideOptionFileContentForm.cs b/ZigbeeApp/Shared/Phone/UserCenter/HideOption/HideOptionFileContentForm.cs
new file mode 100755
index 0000000..2eda89e
--- /dev/null
+++ b/ZigbeeApp/Shared/Phone/UserCenter/HideOption/HideOptionFileContentForm.cs
@@ -0,0 +1,76 @@
+锘縰sing System;
+using System.Collections.Generic;
+using System.Text;
+
+namespace Shared.Phone.UserCenter.HideOption
+{
+    /// <summary>
+    /// 鏂囦欢鍐呭
+    /// </summary>
+    public class HideOptionFileContentForm : EditorCommonForm
+    {
+        #region 鈻� 鍙橀噺澹版槑___________________________
+
+        #endregion
+
+        #region 鈻� 鍒濆鍖朹____________________________
+
+        /// <summary>
+        /// 鐢婚潰鏄剧ず(搴曞眰浼氬浐瀹氳皟鐢ㄦ鏂规硶锛屽�熶互瀹屾垚鐢婚潰鍒涘缓)
+        /// </summary>
+        public void ShowForm(string i_file)
+        {
+            //璁剧疆澶撮儴淇℃伅
+            base.SetTitleText("鏂囦欢鍐呭");
+
+            //鍒濆鍖栦腑閮ㄤ俊鎭�
+            this.InitMiddleFrame(i_file);
+        }
+
+        /// <summary>
+        /// 鍒濆鍖栦腑閮ㄤ俊鎭�
+        /// </summary>
+        private void InitMiddleFrame(string i_file)
+        {
+            if (i_file.EndsWith(".png") == true || i_file.EndsWith(".jpg") == true || i_file.EndsWith(".JPG") == true)
+            {
+                var btnPic = new ImageView();
+                btnPic.Y = Application.GetRealHeight(60);
+                btnPic.Width = Application.GetMinRealAverage(887);
+                btnPic.Height = Application.GetMinRealAverage(444);
+                btnPic.Gravity = Gravity.CenterHorizontal;
+                btnPic.Radius= (uint)Application.GetRealHeight(17);
+                btnPic.ImageBytes = Shared.IO.FileUtils.ReadFile(i_file);
+                bodyFrameLayout.AddChidren(btnPic);
+            }
+            else
+            {
+                string textValue = System.Text.Encoding.UTF8.GetString(Shared.IO.FileUtils.ReadFile(i_file)).Trim();
+                textValue = textValue.Replace(",", "\r\n");
+                if (textValue.StartsWith("{") == true)
+                {
+                    textValue = "{\r\n" + textValue.Substring(1);
+                }
+                if (textValue.EndsWith("}") == true)
+                {
+                    textValue = textValue.Substring(0, textValue.Length - 1) + "\r\n}";
+                }
+
+                var btnText = new EditTextView();
+                btnText.Width = bodyFrameLayout.Width;
+                btnText.Height = bodyFrameLayout.Height;
+                btnText.TextAlignment = TextAlignment.TopLeft;
+                btnText.TextColor = UserCenterColor.Current.TextColor1;
+                btnText.Text = textValue;
+                btnText.Enable = false;
+                bodyFrameLayout.AddChidren(btnText);
+            }
+        }
+
+        #endregion
+
+        #region 鈻� 涓�鑸柟娉昣__________________________
+
+        #endregion
+    }
+}

--
Gitblit v1.8.0