From 56da43f1e25a191cd83fb91c5756f19ef7431bb0 Mon Sep 17 00:00:00 2001 From: wxr <wxr@hdlchina.com.cn> Date: 星期五, 07 六月 2024 13:59:50 +0800 Subject: [PATCH] 日志功能 --- Crabtree/ON/Resources/Resource.designer.cs | 3 ++- Crabtree/SmartHome/UI/SimpleControl/CommonPage.cs | 8 ++++++++ Crabtree/SmartHome/UI/SimpleControl/Phone/User/UserMiddle.cs | 4 ++-- Crabtree/SmartHome/UI/SimpleControl/Phone/Register/Databackup.cs | 2 +- Crabtree/SmartHome/UI/SimpleControl/Phone/Register/AccountLogin.cs | 4 ++-- Crabtree/SmartHome/UI/SimpleControl/Phone/Schedule/Method.cs | 14 +++++++++----- 6 files changed, 24 insertions(+), 11 deletions(-) diff --git a/Crabtree/ON/Resources/Resource.designer.cs b/Crabtree/ON/Resources/Resource.designer.cs index 7297687..4bf8a6d 100644 --- a/Crabtree/ON/Resources/Resource.designer.cs +++ b/Crabtree/ON/Resources/Resource.designer.cs @@ -2,6 +2,7 @@ //------------------------------------------------------------------------------ // <auto-generated> // This code was generated by a tool. +// Runtime Version:4.0.30319.42000 // // Changes to this file may cause incorrect behavior and will be lost if // the code is regenerated. @@ -14,7 +15,7 @@ { - [global::System.CodeDom.Compiler.GeneratedCodeAttribute("Xamarin.Android.Build.Tasks", "12.2.8.165")] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("Xamarin.Android.Build.Tasks", "13.2.2.120")] public partial class Resource { diff --git a/Crabtree/SmartHome/UI/SimpleControl/CommonPage.cs b/Crabtree/SmartHome/UI/SimpleControl/CommonPage.cs index f9e12d1..4906e4b 100644 --- a/Crabtree/SmartHome/UI/SimpleControl/CommonPage.cs +++ b/Crabtree/SmartHome/UI/SimpleControl/CommonPage.cs @@ -108,6 +108,14 @@ static void Packet_ReceiveEvent (byte subnetID, byte deviceID, Command command, byte [] usefullBytes) { +#if DEBUG + string ssc = $"{command.ToString()} : " + subnetID + "," + deviceID + ","; + foreach (var bin in usefullBytes) { + ssc += bin + ","; + } + Utlis.WriteLine (ssc); +#endif + try { List<byte> ButtonBkeyModelList = new List<byte> (); switch (command) { diff --git a/Crabtree/SmartHome/UI/SimpleControl/Phone/Register/AccountLogin.cs b/Crabtree/SmartHome/UI/SimpleControl/Phone/Register/AccountLogin.cs index f3cb6c3..549af5a 100644 --- a/Crabtree/SmartHome/UI/SimpleControl/Phone/Register/AccountLogin.cs +++ b/Crabtree/SmartHome/UI/SimpleControl/Phone/Register/AccountLogin.cs @@ -87,7 +87,7 @@ etAccount.Text = "464027401@qq.com"; etAccount.Text = "460649739@qq.com"; etAccount.Text = "1489771324@qq.com"; - //etAccount.Text = "jai.panghal2201@gmail.com"; + etAccount.Text = "balamanthiragiri@gmail.com"; //etAccount.Text = "avinavrai.we@gmail.com"; #endif @@ -144,7 +144,7 @@ //etPasswrod.Text = "123456"; etPasswrod.Text = "123456"; etPasswrod.Text = "kkkkkk333"; - etPasswrod.Text = "Hdl1985."; + etPasswrod.Text = "Bala@1314"; //etPasswrod.Text = "Mavi@2789"; #endif passwrodView.AddChidren (etPasswrod); diff --git a/Crabtree/SmartHome/UI/SimpleControl/Phone/Register/Databackup.cs b/Crabtree/SmartHome/UI/SimpleControl/Phone/Register/Databackup.cs index 73197d3..9e87dbd 100644 --- a/Crabtree/SmartHome/UI/SimpleControl/Phone/Register/Databackup.cs +++ b/Crabtree/SmartHome/UI/SimpleControl/Phone/Register/Databackup.cs @@ -587,7 +587,7 @@ // SmartHome.MqttCommon.DisConnectRemote("UserBakeupFileDetailedInformation"); //} this.RemoveFromParent (); - UserMiddle.Init (true, true); + UserMiddle.Init (true, true,false); EquipmentPublicClass.CheckLinkRemote (UserConfig.Instance.internetStatus); new Alert (Language.StringByID (R.MyInternationalizationString.Tip), Language.StringByID (R.MyInternationalizationString.RestoreFileIsSuccessfull), Language.StringByID (R.MyInternationalizationString.Close)).Show (); diff --git a/Crabtree/SmartHome/UI/SimpleControl/Phone/Schedule/Method.cs b/Crabtree/SmartHome/UI/SimpleControl/Phone/Schedule/Method.cs index 2461a8b..0347b4c 100644 --- a/Crabtree/SmartHome/UI/SimpleControl/Phone/Schedule/Method.cs +++ b/Crabtree/SmartHome/UI/SimpleControl/Phone/Schedule/Method.cs @@ -238,11 +238,15 @@ { for (int j = 0; j < Timer.deviceList.Count; j++) { var cloudsDevice = Timer.deviceList [j]; - if (common.SubnetID == cloudsDevice.bus.SubnetID && - common.DeviceID == cloudsDevice.bus.DeviceID && - common.LoopID == cloudsDevice.bus.LoopId - ) { - return cloudsDevice; + try { + if (common.SubnetID == cloudsDevice.bus.SubnetID && + common.DeviceID == cloudsDevice.bus.DeviceID && + common.LoopID == cloudsDevice.bus.LoopId + ) { + return cloudsDevice; + } + }catch(Exception ex) { + return null; } } return null; diff --git a/Crabtree/SmartHome/UI/SimpleControl/Phone/User/UserMiddle.cs b/Crabtree/SmartHome/UI/SimpleControl/Phone/User/UserMiddle.cs index cdcf69a..8e68fea 100644 --- a/Crabtree/SmartHome/UI/SimpleControl/Phone/User/UserMiddle.cs +++ b/Crabtree/SmartHome/UI/SimpleControl/Phone/User/UserMiddle.cs @@ -244,7 +244,7 @@ /// </summary> /// <param name="isGuide">鏄惁Guide</param> /// <param name="bFromLogin">鏄惁鏉ヨ嚜鐧诲綍鐣岄潰</param> - public static void Init (bool isGuide = false, bool bFromLogin = false) + public static void Init (bool isGuide = false, bool bFromLogin = false,bool logout = true) { if (MainPage.LoginUser == null) MainPage.LoginUser = Newtonsoft.Json.JsonConvert.DeserializeObject<UserInfo> (System.Text.Encoding.UTF8.GetString (Shared.IO.FileUtils.ReadFile (UserInfo.GlobalRegisterFile))); @@ -298,7 +298,7 @@ UserHomePage.FrameLayoutMain.AddChidren (guidePageView); var guide = new GuideAddResidence (); - guide.IsHideBack = true; + guide.IsHideBack = logout; guidePageView.AddChidren (guide); guide.ShowHomeView (true); -- Gitblit v1.8.0