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/Suggestion/FeedbackForm.cs | 32 ++++++++++++-------------------- 1 files changed, 12 insertions(+), 20 deletions(-) diff --git a/ZigbeeApp/Shared/Phone/UserCenter/Suggestion/FeedbackForm.cs b/ZigbeeApp/Shared/Phone/UserCenter/Suggestion/FeedbackForm.cs index 1f4abf5..2e36d6f 100755 --- a/ZigbeeApp/Shared/Phone/UserCenter/Suggestion/FeedbackForm.cs +++ b/ZigbeeApp/Shared/Phone/UserCenter/Suggestion/FeedbackForm.cs @@ -214,16 +214,16 @@ frameEmail.BackgroundColor = UserCenterColor.Current.White; frameEmail.Y = framType.Bottom + Application.GetRealHeight(23); bodyFrameLayout.AddChidren(frameEmail); - //閭鍦板潃 - var btnEmail = new NormalViewControl(220, 60, true); - btnEmail.X = ControlCommonResourse.XXLeft; - btnEmail.Gravity = Gravity.CenterVertical; - btnEmail.TextID = R.MyInternationalizationString.uEmailAddress; - frameEmail.AddChidren(btnEmail); - var txtEmail = new TextInputControl(500, 60, true); + //鑱旂郴鏂瑰紡 + var btnContact = new NormalViewControl(220, 60, true); + btnContact.X = ControlCommonResourse.XXLeft; + btnContact.Gravity = Gravity.CenterVertical; + btnContact.TextID = R.MyInternationalizationString.uContactInformation; + frameEmail.AddChidren(btnContact); + var txtEmail = new TextInputControl(720, 60, true); txtEmail.X = Application.GetRealWidth(314); txtEmail.Gravity = Gravity.CenterVertical; - txtEmail.PlaceholderText = Language.StringByID(R.MyInternationalizationString.uPleaseInputYouEmailAddress); + txtEmail.PlaceholderText = Language.StringByID(R.MyInternationalizationString.uPleaseInputYourContactInformation); frameEmail.AddChidren(txtEmail); //鎻愪氦 @@ -242,13 +242,7 @@ this.UploadSuggestion(txtInput.Text, txtEmail.Text); }; - - var strFile = System.IO.Path.Combine(Shared.IO.FileUtils.RootPath, Common.Config.Instance.Guid, DirNameResourse.SuggestionFile); - if (System.IO.File.Exists(strFile) == false) - { - return; - } - var data = UserCenterLogic.LoadFileContent(strFile); + var data = HdlFileLogic.Current.ReadFileTextContent(DirNameResourse.SuggestionFile); if (data != null) { var strNowData = DateTime.Now.ToString("yyyyMMdd"); @@ -277,7 +271,7 @@ /// <param name="email"></param> private void UploadSuggestion(string strContent, string email) { - HdlThreadLogic.Current.RunThread(async() => + HdlThreadLogic.Current.RunThread(() => { var pra = new { @@ -287,15 +281,13 @@ OpinionFeedbackType = this.typeMode, Email = email }; - var result = await UserCenterLogic.GetResultStatuByRequestHttps("App/AddOpinionFeedback", false, pra); + var result = UserCenterLogic.GetResultStatuByRequestHttps("App/AddOpinionFeedback", false, pra); if (result == true) { //淇濆瓨娆℃暟 this.suggestionCount--; - var strFile = System.IO.Path.Combine(Shared.IO.FileUtils.RootPath, Common.Config.Instance.Guid, DirNameResourse.SuggestionFile); - var byteData = System.Text.Encoding.UTF8.GetBytes(this.suggestionCount + DateTime.Now.ToString("yyyyMMdd")); //鍐欏叆鍐呭 - Shared.IO.FileUtils.WriteFileByBytes(strFile, byteData); + HdlFileLogic.Current.SaveTextToFile(DirNameResourse.SuggestionFile, this.suggestionCount + DateTime.Now.ToString("yyyyMMdd")); HdlThreadLogic.Current.RunMain(() => { -- Gitblit v1.8.0