From d53e6af2c5f17838fa79659614b15a2a1f383399 Mon Sep 17 00:00:00 2001
From: wxr <464027401@qq.com>
Date: 星期五, 31 三月 2023 10:04:58 +0800
Subject: [PATCH] 1
---
Crabtree/SmartHome/UI/SimpleControl/Phone/Guide/GuideAddResidence.cs | 90 ++++++---------------------------------------
1 files changed, 12 insertions(+), 78 deletions(-)
diff --git a/Crabtree/SmartHome/UI/SimpleControl/Phone/Guide/GuideAddResidence.cs b/Crabtree/SmartHome/UI/SimpleControl/Phone/Guide/GuideAddResidence.cs
index 4dafb7b..8fac363 100644
--- a/Crabtree/SmartHome/UI/SimpleControl/Phone/Guide/GuideAddResidence.cs
+++ b/Crabtree/SmartHome/UI/SimpleControl/Phone/Guide/GuideAddResidence.cs
@@ -12,6 +12,15 @@
bool IsNeedGoToGuideAddGatewayView = false;
+ public override void RemoveFromParent ()
+ {
+ base.RemoveFromParent ();
+ if (!IsHideBack) {
+ //鍒ゆ柇鏄惁闇�瑕侀殣钘忔垨鑰呮樉绀哄姛鑳借彍鍗曟寜閽�
+ UserSettingView.CheckIfRefreshView ();
+ }
+ }
+
public GuideAddResidence ()
{
BackgroundColor = SkinStyle.Current.MainColor;
@@ -473,27 +482,7 @@
}
- void ShowDelHomeErrorInfo (string stateCodeStr)
- {
- string mes = "";
- if (stateCodeStr == "NoLogin") {
- mes = ErrorCode.NoLogin;
- } else if (stateCodeStr == "CurrentHomeExixtsGatewayBind") {
- mes = ErrorCode.CurrentHomeExixtsGatewayBind;
- } else if (stateCodeStr == ErrorCode.NetworkError) {
- mes = ErrorCode.NetworkError;
- } else {
- //RequestServerFailed
- //mes = ErrorCode.AddFailed;
- mes = ErrorCode.OperationFailed + ErrorCode.Reason + stateCodeStr;
-
- }
- if (!string.IsNullOrEmpty (mes)) {
- Application.RunOnMainThread (() => {
- new Alert ("", mes, Language.StringByID (R.MyInternationalizationString.Close)).Show ();
- });
- }
- }
+
/// <summary>
/// 鍚姩鏈湴妯″紡
@@ -829,63 +818,8 @@
}
- void ShowAddHomeErrorInfo (string stateCodeStr) {
- string mes = "";
- if (stateCodeStr == "NoLogin") {
- mes = ErrorCode.NoLogin;
- } else if (stateCodeStr == "Exist") {
- mes = ErrorCode.NameExist;
- } else if (stateCodeStr == ErrorCode.NetworkError) {
- mes = ErrorCode.NetworkError;
- } else {
- //RequestServerFailed
- //mes = ErrorCode.AddFailed;
- mes = ErrorCode.OperationFailed + ErrorCode.Reason + stateCodeStr;
+
- }
- if (!string.IsNullOrEmpty (mes)) {
- Application.RunOnMainThread (() => {
- new Alert ("", mes, Language.StringByID (R.MyInternationalizationString.Close)).Show ();
- });
- }
- }
-
-
- /// <summary>
- /// 鍝嶅簲鐘舵�佺爜:
- //(1)Success 鍒� [璋冪敤姝ゆ帴鍙f搷浣滄垚鍔焆, ResponseData鍒欎负null
- //(2)ParameterOrEmpty,鍒欏搷搴斿瓧娈典腑 [ErrorInfo] 涓洪敊璇俊鎭�, ResponseData鍒欎负null
- //(3)NoLogin,鍒欏搷搴斿瓧娈典腑 [ErrorInfo] 涓洪敊璇俊鎭负 [鏃犳晥鐧诲綍Token!]
- //(5)NoRecord,,鍒欏搷搴斿瓧娈典腑 [ErrorInfo] 涓洪敊璇俊鎭负 [鏈埌鐩稿叧璁板綍, 璇风‘璁ゆ偍鎻愪氦鍙傛暟鏄惁姝g‘]
- //(6)Exist,鍒欏搷搴斿瓧娈典腑 [ErrorInfo] 涓洪敊璇俊鎭负 [褰撳墠鎻愪氦鐨勭殑浣忓畢:XXXX锛屽悕绉板凡瀛樺湪!]
- //(7)NoPermission,鍒欏搷搴斿瓧娈典腑 [ErrorInfo] 涓洪敊璇俊鎭负 [鎮ㄥ苟涓嶅叿鏈夋鍒嗕韩鑰呮浣忓畢鐨勬潈闄�!]
- //(8)InsufficientAuthority,鍒欏搷搴斿瓧娈典腑 [ErrorInfo] 涓洪敊璇俊鎭负 [鎮ㄥ苟涓嶅叿鏈夋鍒嗕韩鑰呮浣忓畢鐨勫畬鍏ㄦ帶鍒舵潈闄�!]
- //(9)HomeIdAndTokenNoConsistent,鍒欏搷搴斿瓧娈典腑 [ErrorInfo] 涓洪敊璇俊鎭负 [鎮ㄥ綋鍓峊oken涓庝綘褰撳墠鎺у埗鐨凥omeId涓嶄竴鑷�!]
- //(10)NoPermission,鍒欏搷搴斿瓧娈典腑 [ErrorInfo] 涓洪敊璇俊鎭负 [XXX]
- /// </summary>
- /// <param name="stateCodeStr"></param>
- void ShowEditHomeErrorInfo (string stateCodeStr)
- {
- string mes = "";
- if (stateCodeStr == "NoLogin") {
- mes = ErrorCode.NoLogin;
- } else if (stateCodeStr == "Exist") {
- mes = ErrorCode.NameExist;
- } else if (stateCodeStr == "HomeIdAndTokenNoConsistent") {
- mes = ErrorCode.HomeIdAndTokenNoConsistent;
- } else if (stateCodeStr == ErrorCode.NetworkError) {
- mes = ErrorCode.NetworkError;
- } else {
- //RequestServerFailed
- //mes = ErrorCode.AddFailed;
- mes = ErrorCode.OperationFailed + ErrorCode.Reason + stateCodeStr;
-
- }
- if (!string.IsNullOrEmpty (mes)) {
- Application.RunOnMainThread (() => {
- new Alert ("", mes, Language.StringByID (R.MyInternationalizationString.Close)).Show ();
- });
- }
- }
+
}
}
--
Gitblit v1.8.0