From efad979b6fae76fb37a4de7e94e6bac0a85cb72c Mon Sep 17 00:00:00 2001 From: JLChen <551775569@qq.com> Date: 星期二, 30 十一月 2021 13:14:28 +0800 Subject: [PATCH] 2021-11-30 1.修复乐橙Android,没调用拒接接口问题。 --- HDL_ON/UI/UI2/4-PersonalCenter/AddDevice/SenesorEnvironment/AddSensorEnvironmentPage.cs | 41 +++++++++++++++++++++++++++++++++++++++-- 1 files changed, 39 insertions(+), 2 deletions(-) diff --git a/HDL_ON/UI/UI2/4-PersonalCenter/AddDevice/SenesorEnvironment/AddSensorEnvironmentPage.cs b/HDL_ON/UI/UI2/4-PersonalCenter/AddDevice/SenesorEnvironment/AddSensorEnvironmentPage.cs index 0d1da43..f274fbb 100644 --- a/HDL_ON/UI/UI2/4-PersonalCenter/AddDevice/SenesorEnvironment/AddSensorEnvironmentPage.cs +++ b/HDL_ON/UI/UI2/4-PersonalCenter/AddDevice/SenesorEnvironment/AddSensorEnvironmentPage.cs @@ -89,6 +89,36 @@ }; textView.AddChidren(editText); + string pairString = ""; + if (integratedDevice.spk == SPK.SensorEnvironment2) + { + //璇疯緭鍏ヨ澶囨満涓婄殑閰嶅鐮� + var pairView = new FrameLayout() + { + Y = Application.GetRealHeight(309), + Gravity = Gravity.CenterHorizontal, + Width = Application.GetRealWidth(319), + Height = Application.GetRealHeight(44), + }; + bodyFrameLayout.AddChidren(pairView); + pairView.AddChidren(new Button() { Y = Application.GetRealHeight(43), Height = 1, BackgroundColor = CSS.CSS_Color.DividingLineColor }); + + EditText pairText = new EditText() + { + TextAlignment = TextAlignment.Center, + TextColor = CSS.CSS_Color.FirstLevelTitleColor, + PlaceholderText = Language.StringByID(StringId.PlsEntryPairCode), + PlaceholderTextColor = CSS.CSS_Color.PromptingColor1, + TextSize = CSS.CSS_FontSize.TextFontSize, + }; + pairView.AddChidren(pairText); + + pairText.TextChangeEventHandler = (sender, e) => { + pairString = e; + }; + } + + if (integratedDevice.spk == SPK.SensorEnvironment2 || integratedDevice.spk == SPK.SensorEnvironment3) { editText.PlaceholderText = Language.StringByID(StringId.PlsEntryMacCode); @@ -130,7 +160,7 @@ try { var pm = new HttpServerRequest(); - var pack = pm.IndependentRegister3TyDevcie(integratedDevice.spk, snCode, Language.StringByID(StringId.SensorEnvironment)); + var pack = pm.IndependentRegister3TyDevcie(integratedDevice.spk, snCode,integratedDevice.productName,pairString);// Language.StringByID(StringId.SensorEnvironment) if (pack.Code == StateCode.SUCCESS) { //var revData = Newtonsoft.Json.JsonConvert.DeserializeObject<List<IntegratedBrandDevice>>(pack.Data.ToString()); @@ -177,7 +207,14 @@ } finally { - Application.RunOnMainThread(() => { waitPage.Hide(); }); + Application.RunOnMainThread(() => + { + if (waitPage != null) + { + waitPage.RemoveFromParent(); + waitPage = null; + } + }); } }) { IsBackground = true }.Start(); -- Gitblit v1.8.0