From f982455916297ab07379d902a7f15b7a7a867c94 Mon Sep 17 00:00:00 2001
From: wei <kaede@kaededeMacBook-Air.local>
Date: 星期三, 20 十月 2021 09:19:20 +0800
Subject: [PATCH] 1
---
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