From 17db37f62a6e3e691c48391c08750a82de5f7783 Mon Sep 17 00:00:00 2001
From: JLChen <551775569@qq.com>
Date: 星期四, 04 三月 2021 16:54:29 +0800
Subject: [PATCH] 2021-03-04 1.UserSettingView页面增加主、子账号功能菜单刷新处理

---
 Crabtree/SmartHome/UI/SimpleControl/Phone/Schedule/HelpView.cs |  131 +++++--------------------------------------
 1 files changed, 17 insertions(+), 114 deletions(-)

diff --git a/Crabtree/SmartHome/UI/SimpleControl/Phone/Schedule/HelpView.cs b/Crabtree/SmartHome/UI/SimpleControl/Phone/Schedule/HelpView.cs
index a3c3ebd..794ee1d 100644
--- a/Crabtree/SmartHome/UI/SimpleControl/Phone/Schedule/HelpView.cs
+++ b/Crabtree/SmartHome/UI/SimpleControl/Phone/Schedule/HelpView.cs
@@ -129,19 +129,12 @@
             };
             msgView.AddChidren (btnMail);
 
-            btnMail.MouseUpEventHandler += (e, e2) => {
-#if DEBUG
-                GetDeviceList ();
-                var ud = new UniversalDevice () { LoopID = 1, SubnetID = 1, DeviceID = 100, ActionType = 2, Name = "閫氱敤寮�鍏�", obj1 = 1, TargetType = 0 };
-                ud.SendBytes = new List<byte> () { 1, 0 };
-                //IO.FileUtils.SaveEquipmentMessage (ud, ud.LoopID.ToString ());
+//            btnMail.MouseUpEventHandler += (e, e2) => {
+//#if DEBUG
+//                GetDeviceList ();
+//#endif
 
-                //var ud2 = new UniversalDevice () { LoopID = 2, SubnetID = 1, DeviceID = 100, ActionType = 2, Name = "閫氱敤寮�鍏�2", obj1 = 1, TargetType = 0 };
-                //ud2.SendBytes = new List<byte> () { 2, 255 };
-                //IO.FileUtils.SaveEquipmentMessage (ud2, ud2.LoopID.ToString ());
-#endif
-
-            };
+//            };
 
             var btnMail2 = new Button () {
                 X = Application.GetRealWidth (100),
@@ -154,12 +147,12 @@
             };
             msgView.AddChidren (btnMail2);
 
-            btnMail2.MouseUpEventHandler += (e, e2) => {
-#if DEBUG
-                upload ();
-#endif
+//            btnMail2.MouseUpEventHandler += (e, e2) => {
+//#if DEBUG
+//                upload ();
+//#endif
 
-            };
+//            };
 
             var btnFAQ = new Button () { 
                 Height = Application.GetRealHeight(100),
@@ -172,15 +165,13 @@
             };
             AddChidren (btnFAQ);
 
-            btnFAQ.MouseUpEventHandler += (e,e2) =>{
-#if DEBUG
+//            btnFAQ.MouseUpEventHandler += (e,e2) =>{
+//#if DEBUG
 
-                UploadSecneList ();
-                //upload ();
-
-#endif
-
-            };
+//                UploadSecneList ();
+//                //upload ();
+//#endif
+//            };
    
 
             var btnLine = new Button () { 
@@ -192,94 +183,6 @@
 
         }
 
-        /// <summary>
-        /// 
-        /// </summary>
-        void upload ()
-        {
-
-            MainPage.Loading.Start (Language.StringByID (R.MyInternationalizationString.load));
-            System.Threading.Tasks.Task.Run (() => {
-                try {
-                    var RES = HDLLinkUtlis.Current.UploadOidAndSidList ();
-                    Application.RunOnMainThread (() => {
-                        if (RES) {
-                            Utlis.ShowTip ("涓婁紶鎴愬姛");
-                        } else {
-                            Utlis.ShowTip ("涓婁紶澶辫触");
-                        }
-                    });
-                } catch {
-                    MainPage.FailureToServer ();
-                } finally {
-                    Application.RunOnMainThread (() => {
-                        MainPage.Loading.Hide ();
-                    });
-                }
-            });
-        }
-
-        /// <summary>
-        /// 
-        /// </summary>
-        void UploadSecneList ()
-        {
-
-            MainPage.Loading.Start (Language.StringByID (R.MyInternationalizationString.load));
-            System.Threading.Tasks.Task.Run (() => {
-                try {
-                    var RES = HDLLinkUtlis.Current.UploadSecneList ();
-                    Application.RunOnMainThread (() => {
-                        if (RES) {
-                            Utlis.ShowTip ("涓婁紶鎴愬姛");
-                        } else {
-                            Utlis.ShowTip ("涓婁紶澶辫触");
-                        }
-                    });
-                } catch {
-                    MainPage.FailureToServer ();
-                } finally {
-                    Application.RunOnMainThread (() => {
-                        MainPage.Loading.Hide ();
-                    });
-                }
-            });
-        }
-        
-
-
-        /// <summary>
-        /// 
-        /// </summary>
-        void GetDeviceList ()
-        {
-            MainPage.Loading.Start (Language.StringByID (R.MyInternationalizationString.load));
-            System.Threading.Tasks.Task.Run (() => {
-                try {
-                    var deviceResult = HttpServerRequest.Current.GetDeviceList ();
-
-                    if (deviceResult.Code == StateCode.SUCCESS) {
-                        var deviceList = Newtonsoft.Json.JsonConvert.DeserializeObject<DevcieFunctionRes> (deviceResult.Data.ToString ());
-                        CommonConfig.Current.FunctionList = deviceList.list;
-                        CommonConfig.Current.Save ();
-
-                       Utlis.WriteLine ("deviceList Count" + deviceList.list.Count);
-                    } else {
-                        Utlis.ShowTip ("璁惧鍒楄〃");
-                    }
-
-                    //Application.RunOnMainThread (() => {
-                        
-                    //});
-                } catch {
-                    MainPage.FailureToServer ();
-                } finally {
-                    Application.RunOnMainThread (() => {
-                        MainPage.Loading.Hide ();
-                    });
-                }
-            });
-        }
-
+       
     }
 }

--
Gitblit v1.8.0