From 9a4b76398009cf76c508d61f7e48fb6f5cb7ac2d Mon Sep 17 00:00:00 2001 From: xm <1271024303@qq.com> Date: 星期二, 21 七月 2020 09:46:53 +0800 Subject: [PATCH] 请合并最新多功能面板代码 --- ZigbeeApp/Shared/Phone/UserCenter/HideOption/HideOptionFileContentForm.cs | 49 ++++++++++++++++++++++++++++++++----------------- 1 files changed, 32 insertions(+), 17 deletions(-) diff --git a/ZigbeeApp/Shared/Phone/UserCenter/HideOption/HideOptionFileContentForm.cs b/ZigbeeApp/Shared/Phone/UserCenter/HideOption/HideOptionFileContentForm.cs index dd5e4ed..a05bea7 100755 --- a/ZigbeeApp/Shared/Phone/UserCenter/HideOption/HideOptionFileContentForm.cs +++ b/ZigbeeApp/Shared/Phone/UserCenter/HideOption/HideOptionFileContentForm.cs @@ -20,6 +20,7 @@ /// </summary> public void ShowForm(string i_file) { + this.ScrollEnabled = false; //璁剧疆澶撮儴淇℃伅 base.SetTitleText("鏂囦欢鍐呭"); @@ -32,6 +33,8 @@ /// </summary> private void InitMiddleFrame(string i_file) { + if (i_file == string.Empty) { return; } + if (i_file.EndsWith(".png") == true || i_file.EndsWith(".jpg") == true || i_file.EndsWith(".JPG") == true) { var btnPic = new ImageView(); @@ -46,26 +49,38 @@ 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; - bodyFrameLayout.AddChidren(btnText); + this.SetTextContent(textValue); } } + /// <summary> + /// 鑷畾涔夎缃樉绀虹殑鏂囨湰 + /// </summary> + /// <param name="i_text"></param> + public void SetTextContent(string textValue) + { + 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; +#if Android + btnText.Foucs = false; +#endif + bodyFrameLayout.AddChidren(btnText); + } + #endregion #region 鈻� 涓�鑸柟娉昣__________________________ -- Gitblit v1.8.0