From fa6bcb2e9907772480f99205f36ec2a1ce735a22 Mon Sep 17 00:00:00 2001 From: 黄学彪 <hxb@hdlchina.com.cn> Date: 星期四, 09 一月 2020 14:11:07 +0800 Subject: [PATCH] 合并代码 --- ZigbeeApp/Shared/Phone/UserCenter/CommonBase/Logic/UserCenterLogic.cs | 74 +++++++++++++++++++++++++++++++++---- 1 files changed, 66 insertions(+), 8 deletions(-) diff --git a/ZigbeeApp/Shared/Phone/UserCenter/CommonBase/Logic/UserCenterLogic.cs b/ZigbeeApp/Shared/Phone/UserCenter/CommonBase/Logic/UserCenterLogic.cs index eaaeb52..389dc39 100755 --- a/ZigbeeApp/Shared/Phone/UserCenter/CommonBase/Logic/UserCenterLogic.cs +++ b/ZigbeeApp/Shared/Phone/UserCenter/CommonBase/Logic/UserCenterLogic.cs @@ -259,6 +259,11 @@ /// <param name="pra">璇锋眰鐨勫弬鏁�</param> public static bool CheckNotEorrorMsg(ResponsePack revertObj, string RequestName, List<string> listNotShowError = null, object pra = null) { + if (listNotShowError != null && listNotShowError.Contains("NotCheck") == true) + { + //涓嶆娴� + return true; + } if (revertObj == null) { Application.RunOnMainThread(() => @@ -416,7 +421,7 @@ catch (Exception ex) { //鍑虹幇鏈煡閿欒,鏁版嵁涓㈠け - var alert = new ShowMsgControl(ShowMsgType.Error, Language.StringByID(R.MyInternationalizationString.uUnknownErrorAndDataLost)); + var alert = new ShowMsgControl(ShowMsgType.Error, Language.StringByID(R.MyInternationalizationString.uUnKnownError)); alert.Show(); //Log鍑哄姏 @@ -451,7 +456,7 @@ catch (Exception ex) { //鍑虹幇鏈煡閿欒,鏁版嵁涓㈠け - var alert = new ShowMsgControl(ShowMsgType.Error, Language.StringByID(R.MyInternationalizationString.uUnknownErrorAndDataLost)); + var alert = new ShowMsgControl(ShowMsgType.Error, Language.StringByID(R.MyInternationalizationString.uUnKnownError)); alert.Show(); //Log鍑哄姏 @@ -612,8 +617,7 @@ //鍏抽棴鎵�鏈夋帴鏀� HdlGatewayReceiveLogic.Current.RemoveAllEvent(); //娓呴櫎鍗囩骇鍒楄〃 - FirmwareUpdateResourse.dicDeviceUpdateList.Clear(); - FirmwareUpdateResourse.dicGatewayUpdateList.Clear(); + FirmwareUpdateResourse.dicUpdateList.Clear(); HdlThreadLogic.Current.RunThread(async () => { @@ -814,12 +818,22 @@ try { //鏂紑杩滅▼Mqtt杩炴帴 - ZigBee.Device.ZbGateway.DisConnectRemoteMqttClient(); + await ZigBee.Device.ZbGateway.DisConnectRemoteMqttClient(); } catch { } //娑堟伅璁板綍閲嶆柊璇诲彇鍙婃娴� ControlCommonResourse.ReadMessageAgain = true; + ControlCommonResourse.HadNewMessage = false; + HdlThreadLogic.Current.RunMain(() => + { + for (int i = 0; i < ControlCommonResourse.listMessageManaContr.Count; i++) + { + //鏄剧ず瑙掓爣鐗规晥 + ControlCommonResourse.listMessageManaContr[i].IsSelected = false; + } + }); + //鍔犺浇璐﹀彿閰嶇疆淇℃伅 var optionInfo = UserCenterResourse.Option.Load(); UserCenterResourse.Option = optionInfo; @@ -872,9 +886,6 @@ HdlGatewayLogic.Current.SynchronizeDbGateway(); } - //鍒濆鍖栦綇瀹呭璞� - Common.Config.Instance.Home = House.GetHouseByHouseId(Common.Config.Instance.HomeId); - //鍒濆鍖栨埧闂�(閮洩鍩庨偅杈逛笉鍋氬鐞�,闇�瑕佽繖閲岀壒娈婃墽琛屼竴姝�) Room.RefreshAllRoomByLocation(); @@ -887,6 +898,8 @@ //寮�鍚嚜鍔ㄥ浠芥彁绀� HdlAutoBackupLogic.ShowAutoBackupPromptedForm(); } + //鏄剧ず寮曞鐣岄潰 + ShowGuideForm(result); } //APP缂撳瓨鍔犺浇瀹屾垚 UserCenterResourse.Option.AppCanSignout = true; @@ -1181,6 +1194,36 @@ #endregion + #region 鈻� 寮曞鐣岄潰___________________________ + + /// <summary> + /// 鏄剧ず寮曞鐣岄潰 + /// </summary> + /// <param name="result">鍚屾缁撴灉 -1锛氬紓甯� 0:宸茬粡鍚屾杩囷紝涓嶉渶瑕佸悓姝� 1锛氭甯稿悓姝� 2:娌℃湁鑷姩澶囦唤鏁版嵁</param> + private static void ShowGuideForm(int result) + { + var checkFile = System.IO.Path.Combine(Shared.IO.FileUtils.RootPath, DirNameResourse.GuideFile); + if (System.IO.File.Exists(checkFile) == true) + { + //涓嶉渶瑕佹樉绀� + return; + } + if (result == 2 && Config.Instance.Home.IsOthreShare == false) + { + HdlThreadLogic.Current.RunMain(() => + { + var form = new Guide.GuideHouseForm(); + form.ShowFrom(); + }); + } + + //鍒涘缓涓�涓┖鏂囦欢(鏍囪瘑宸茬粡瀹屾垚寮曞) + var file = System.IO.File.Create(checkFile); + file.Close(); + } + + #endregion + #region 鈻� 16杩涘埗杞寲_________________________ /// <summary> @@ -1291,6 +1334,21 @@ } #endregion + #region 鈻� 鏃堕棿杞崲___________________________ + + /// <summary> + /// 灏唘tc鏃堕棿绫诲瀷鐨勫瓧绗︿覆,杞崲涓烘湰鍦版椂闂� + /// </summary> + /// <param name="timeText"></param> + /// <returns></returns> + public static DateTime ConvertUtcTimeToLocalTime(string timeText) + { + var utcTime = Convert.ToDateTime(timeText); + return TimeZoneInfo.ConvertTimeFromUtc(utcTime, TimeZoneInfo.Local); + } + + #endregion + #region 鈻� 鏂囦欢淇濆瓨鍜岃鍙朹____________________ /// <summary> -- Gitblit v1.8.0