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/Register/SubaccountListView.cs | 64 ++++++++++++++++++++++++++++++++
1 files changed, 64 insertions(+), 0 deletions(-)
diff --git a/Crabtree/SmartHome/UI/SimpleControl/Phone/Register/SubaccountListView.cs b/Crabtree/SmartHome/UI/SimpleControl/Phone/Register/SubaccountListView.cs
index 6cefea4..6848f8b 100644
--- a/Crabtree/SmartHome/UI/SimpleControl/Phone/Register/SubaccountListView.cs
+++ b/Crabtree/SmartHome/UI/SimpleControl/Phone/Register/SubaccountListView.cs
@@ -125,6 +125,28 @@
btnUserAccount.Text += MainPage.LoginUser.AccountString;
}
+ #region 璋冭瘯浜哄憳绠$悊
+ Button debuggingBtn = new Button () {
+ X = btnUserName.X,
+ Y = Application.GetRealHeight(175 - 40),
+ Width = Application.GetRealWidth (200),
+ Height = Application.GetRealHeight (30),
+ //TextAlignment = TextAlignment.CenterRight,
+ Text = "Debugger management",
+ TextColor = SkinStyle.Current.TextColor1,
+ BackgroundColor = SkinStyle.Current.MainColor,
+ TextSize = 14,
+ Radius = (uint)Application.GetRealWidth (10)
+ };
+ topUserMsgView.AddChidren (debuggingBtn);
+ debuggingBtn.Width = debuggingBtn.GetTextWidth () + Application.GetRealWidth (20);
+ //debuggingBtn.X = Application.GetRealWidth (640 - 20) - debuggingBtn.Width;
+
+ debuggingBtn.MouseUpEventHandler = (sender, e) => {
+ GetHomeList ();
+ };
+ #endregion
+
VerticalScrolViewLayout contentView = new VerticalScrolViewLayout () {
Y = topUserMsgView.Bottom,
Height = Application.GetRealHeight (1136-80) - topUserMsgView.Bottom,
@@ -534,6 +556,48 @@
}
+ /// <summary>
+ /// 鑾峰彇浣忓畢鍒楄〃
+ /// </summary>
+ void GetHomeList ()
+ {
+ MainPage.Loading.Start ("Please wait...");
+ System.Threading.Tasks.Task.Run (() => {
+ try {
+ var revertObj = HttpServerRequest.Current.GetHomeList ();
+ if (revertObj.Code == StateCode.SUCCESS) {
+ var homeList = Newtonsoft.Json.JsonConvert.DeserializeObject<List<RegionInfoResNew>> (revertObj.Data.ToString ());
+ if (homeList != null && homeList.Count > 0) {
+ var findHome = homeList.Find ((obj) => obj.Id == UserConfig.Instance.CurrentRegion.Id);
+ if (findHome != null) {
+ //鏌ヨ浣忓畢鎴愬姛
+ Application.RunOnMainThread (() => {
+ //鎵撳紑璋冭瘯浜哄憳绠$悊
+ DebuggerManagementView page = new DebuggerManagementView (findHome);
+ UserMiddle.SettingPageView.AddChidren (page);
+ page.ShowDebuggerManagementView ();
+ UserMiddle.SettingPageView.PageIndex += 1;
+ });
+ return;
+ }
+ }
+
+ IMessageCommon.Current.ShowErrorInfoAlter (Language.StringByID (R.MyInternationalizationString.Home_NoExists));
+
+ } else {
+ //閿欒鎻愮ず
+ IMessageCommon.Current.ShowErrorInfoAlter (revertObj.Code);
+ }
+ } catch {
+ MainPage.FailureToServer ();
+ } finally {
+ Application.RunOnMainThread (() => {
+ MainPage.Loading.Hide ();
+ });
+ }
+ });
+ }
+
///// <summary>
///// 鑾峰彇瀛愯处鍙峰垪琛�
///// </summary>
--
Gitblit v1.8.0