From 601835075051c91510dbdd40e73b0b815d2ff3ad Mon Sep 17 00:00:00 2001 From: wei <kaede@kaededeMacBook-Air.local> Date: 星期一, 19 七月 2021 16:15:55 +0800 Subject: [PATCH] 更新 --- HDL-ON_Android/Properties/AndroidManifest.xml | 2 HDL_ON/UI/UI2/4-PersonalCenter/AddDevice/SenesorMegahealth/AddSenesorMegahealthDirection1Page.cs | 2 HDL-ON_Android/Assets/Language.ini | 11 HDL_ON/UI/UI2/4-PersonalCenter/AddDevice/SenesorEnvironment/SensorEnvironmentManagerPage.cs | 133 +++++++++++++++++++ DLL/IOS/EZSDK.IOS.dll | 0 HDL_ON/UI/UI2/4-PersonalCenter/AddFunction/DeviceListPage.cs | 8 + HDL_ON/HDL_ON.projitems | 3 HDL_ON/UI/UI2/4-PersonalCenter/AddDevice/SenesorEnvironment/AddSensorEnvironmentPage.cs | 186 ++++++++++++++++++++++++++ HDL_ON/UI/UI2/4-PersonalCenter/AddFunction/AddDevciePage.cs | 8 + HDL-ON_iOS/Info.plist | 4 HDL-ON_iOS/Resources/Language.ini | 2 HDL_ON/UI/UI2/4-PersonalCenter/AddDevice/SenesorMegahealth/SenesorMegahealthManagerPage.cs | 2 HDL_ON/Common/R.cs | 4 .vs/HDL_APP_Project/xs/UserPrefs.xml | 30 ++-- HDL_ON/UI/MainPage.cs | 2 15 files changed, 369 insertions(+), 28 deletions(-) diff --git a/.vs/HDL_APP_Project/xs/UserPrefs.xml b/.vs/HDL_APP_Project/xs/UserPrefs.xml index 448750b..cb836f4 100644 --- a/.vs/HDL_APP_Project/xs/UserPrefs.xml +++ b/.vs/HDL_APP_Project/xs/UserPrefs.xml @@ -1,11 +1,15 @@ 锘�<Properties StartupConfiguration="{D998E133-F0DD-4760-BE3C-461632F54DA4}|Default"> - <MonoDevelop.Ide.ItemProperties.HDL-ON__iOS PreferredExecutionTarget="MonoDevelop.IPhone.IPhoneDeviceTarget.00008020-000404163432002E" /> - <MonoDevelop.Ide.Workbench ActiveDocument="HDL_ON/UI/UI2/4-PersonalCenter/RoomListManage/RoomEditFunctionPage.cs"> + <MonoDevelop.Ide.ItemProperties.HDL-ON__iOS PreferredExecutionTarget="MonoDevelop.IPhone.IPhoneDeviceTarget.6242be7109c740c6cb8999a8904b6e0ea8d45192" /> + <MonoDevelop.Ide.Workbench> <Files> - <File FileName="HDL_ON/DAL/Server/HttpUtil.cs" Line="27" Column="22" /> + <File FileName="HDL_ON/DAL/Server/HttpUtil.cs" Line="14" Column="1" /> <File FileName="HDL-ON_iOS/Info.plist" /> - <File FileName="HDL_ON/UI/MainPage.cs" Line="115" Column="62" /> - <File FileName="HDL_ON/UI/UI2/4-PersonalCenter/RoomListManage/RoomEditFunctionPage.cs" Line="167" Column="29" /> + <File FileName="HDL_ON/UI/MainPage.cs" Line="28" Column="55" /> + <File FileName="HDL_ON/UI/UI2/4-PersonalCenter/RoomListManage/RoomEditFunctionPage.cs" /> + <File FileName="HDL_ON/UI/UI2/4-PersonalCenter/AddFunction/DeviceListPage.cs" Line="177" Column="75" /> + <File FileName="HDL_ON/UI/UI2/4-PersonalCenter/AddFunction/AddDevciePage.cs" Line="158" Column="69" /> + <File FileName="HDL_ON/UI/UI2/4-PersonalCenter/AddDevice/SenesorEnvironment/SensorEnvironmentManagerPage.cs" Line="13" Column="18" /> + <File FileName="HDL_ON/UI/UI2/4-PersonalCenter/AddDevice/SenesorEnvironment/AddSensorEnvironmentPage.cs" Line="116" Column="149" /> </Files> <Pads> <Pad Id="ProjectPad"> @@ -15,16 +19,12 @@ <Node name="DAL" expanded="True"> <Node name="Server" expanded="True" /> </Node> - <Node name="UI" expanded="True"> - <Node name="UI2" expanded="True"> - <Node name="4-PersonalCenter" expanded="True"> - <Node name="RoomListManage" expanded="True"> - <Node name="RoomEditFunctionPage.cs" selected="True" /> - </Node> - </Node> - <Node name="FuntionControlView" expanded="True" /> - </Node> - </Node> + <Node name="UI" expanded="True" /> + </Node> + <Node name="HDL-ON_Android" selected="True" /> + <Node name="HDL-ON_iOS" expanded="True"> + <Node name="References" expanded="True" /> + <Node name="Resources" expanded="True" /> </Node> </Node> </State> diff --git a/DLL/IOS/EZSDK.IOS.dll b/DLL/IOS/EZSDK.IOS.dll index 9ec3766..9f14a48 100644 --- a/DLL/IOS/EZSDK.IOS.dll +++ b/DLL/IOS/EZSDK.IOS.dll Binary files differ diff --git a/HDL-ON_Android/Assets/Language.ini b/HDL-ON_Android/Assets/Language.ini index 3ed920d..d565ef1 100644 --- a/HDL-ON_Android/Assets/Language.ini +++ b/HDL-ON_Android/Assets/Language.ini @@ -328,7 +328,7 @@ 324=Scene delay 325=Delay setting 326=Delay -327=Catch Scene +327=Capture the scene 328=Film scene 329=General 330=Automatic mode @@ -439,7 +439,6 @@ 453=Alarm mute 454=Deployment information 455=The name can not be blank. - 456=Canvas 457=Energy consumption 458=Date @@ -466,6 +465,7 @@ 477=Swing 478=Pattern 479=Speed +480=Environmental sensor @@ -1405,7 +1405,7 @@ 324=鍦烘櫙寤舵椂 325=寤舵椂璁剧疆 326=寤舵椂 -327=鎹曡幏鍦烘櫙 +327=鎹曟崏鍦烘櫙 328=鐢靛奖鍦烘櫙 329=鏅�� 330=鑷姩妯″紡 @@ -1541,6 +1541,7 @@ 477=鎽嗗姩 478=妯″紡 479=椋庨�� +480=鐜浼犳劅鍣� 1000=瀹ゅ唴婀垮害 @@ -1804,7 +1805,7 @@ 6016=绂荤嚎 6017=鐗堟湰鍙� 6018=璇疯緭鍏ラ仴鎺у櫒鍚嶇О -6019=鎻愮ず锛氶仴鎺у櫒鍒涘缓鍚庡彲鍦ㄥ姛鑳�-鐢靛櫒鍒嗙被{\r\n}鏌ユ壘浣跨敤 +6019=鎻愮ず锛氶仴鎺у櫒鍒涘缓鍚庡彲鍦ㄥ姛鑳�-鐢靛櫒鍒嗙被锛屾煡鎵句娇鐢� 6020=鎺ㄨ崘鎸夐敭 6021=璇疯緭鍏ユ寜閿悕绉� 6022=涓嬩竴姝� @@ -1879,6 +1880,7 @@ 6093=璁惧涓嶅湪绾� 6094=缃戝叧璁惧涓嶅瓨鍦� 6095=娣诲姞鎸夐挳瓒呭嚭30涓� + 7000=鏂板缓鑷姩鍖� @@ -2026,7 +2028,6 @@ 7142=涓ラ噸 7143=鍋忛珮 7144=浼樼 - 9000=璇蜂娇鐢ㄦ柊鐨勬墜鏈鸿处鍙风櫥褰旳PP 9001=璇蜂娇鐢ㄦ柊鐨勯偖绠辫处鍙风櫥褰旳PP diff --git a/HDL-ON_Android/Properties/AndroidManifest.xml b/HDL-ON_Android/Properties/AndroidManifest.xml index 8421f97..8cb1dff 100644 --- a/HDL-ON_Android/Properties/AndroidManifest.xml +++ b/HDL-ON_Android/Properties/AndroidManifest.xml @@ -1,5 +1,5 @@ 锘�<?xml version="1.0" encoding="utf-8"?> -<manifest xmlns:android="http://schemas.android.com/apk/res/android" android:versionCode="202107161" android:versionName="1.2.202107161" package="com.hdl.onpro"> +<manifest xmlns:android="http://schemas.android.com/apk/res/android" android:versionCode="202107192" android:versionName="1.2.202107192" package="com.hdl.onpro"> <uses-sdk android:minSdkVersion="23" android:targetSdkVersion="29" /> <!-- 涔愭鍙瀵硅闇�瑕佺殑鏉冮檺 --> <!--<uses-permission android:name="android.permission.INTERNET" />--> diff --git a/HDL-ON_iOS/Info.plist b/HDL-ON_iOS/Info.plist index 59de433..6278204 100644 --- a/HDL-ON_iOS/Info.plist +++ b/HDL-ON_iOS/Info.plist @@ -100,9 +100,9 @@ <key>UIStatusBarStyle</key> <string>UIStatusBarStyleLightContent</string> <key>CFBundleShortVersionString</key> - <string>1.2.202107161</string> + <string>1.2.202107192</string> <key>CFBundleVersion</key> - <string>1.2.07161</string> + <string>1.2.07192</string> <key>NSLocationWhenInUseUsageDescription</key> <string>Use geographic location to provide services such as weather</string> <key>NSAppleMusicUsageDescription</key> diff --git a/HDL-ON_iOS/Resources/Language.ini b/HDL-ON_iOS/Resources/Language.ini index 4d6e2f9..d565ef1 100644 --- a/HDL-ON_iOS/Resources/Language.ini +++ b/HDL-ON_iOS/Resources/Language.ini @@ -465,6 +465,7 @@ 477=Swing 478=Pattern 479=Speed +480=Environmental sensor @@ -1540,6 +1541,7 @@ 477=鎽嗗姩 478=妯″紡 479=椋庨�� +480=鐜浼犳劅鍣� 1000=瀹ゅ唴婀垮害 diff --git a/HDL_ON/Common/R.cs b/HDL_ON/Common/R.cs index 9464539..7e133bb 100644 --- a/HDL_ON/Common/R.cs +++ b/HDL_ON/Common/R.cs @@ -5,6 +5,10 @@ public static class StringId { /// <summary> + /// 鐜浼犳劅鍣� + /// </summary> + public const int SensorEnvironment = 480; + /// <summary> /// 椋庨噺 /// </summary> public const int AirVolume = 479; diff --git a/HDL_ON/HDL_ON.projitems b/HDL_ON/HDL_ON.projitems index 357af0a..884e206 100644 --- a/HDL_ON/HDL_ON.projitems +++ b/HDL_ON/HDL_ON.projitems @@ -465,6 +465,8 @@ <Compile Include="$(MSBuildThisFileDirectory)UI\UI2\4-PersonalCenter\PirDevice\View\FrameLayout50.cs" /> <Compile Include="$(MSBuildThisFileDirectory)UI\UI2\4-PersonalCenter\PirDevice\View\SaveView.cs" /> <Compile Include="$(MSBuildThisFileDirectory)UI\UI2\4-PersonalCenter\PirDevice\View\Buttons.cs" /> + <Compile Include="$(MSBuildThisFileDirectory)UI\UI2\4-PersonalCenter\AddDevice\SenesorEnvironment\SensorEnvironmentManagerPage.cs" /> + <Compile Include="$(MSBuildThisFileDirectory)UI\UI2\4-PersonalCenter\AddDevice\SenesorEnvironment\AddSensorEnvironmentPage.cs" /> </ItemGroup> <ItemGroup> <Folder Include="$(MSBuildThisFileDirectory)Entity\Device\" /> @@ -488,5 +490,6 @@ <Folder Include="$(MSBuildThisFileDirectory)UI\UI2\4-PersonalCenter\SmartSpeaker\" /> <Folder Include="$(MSBuildThisFileDirectory)UI\UI2\4-PersonalCenter\AddDevice\SenesorMegahealth\" /> <Folder Include="$(MSBuildThisFileDirectory)UI\UI2\4-PersonalCenter\AddDevice\MiniRemoteControl\" /> + <Folder Include="$(MSBuildThisFileDirectory)UI\UI2\4-PersonalCenter\AddDevice\SenesorEnvironment\" /> </ItemGroup> </Project> \ No newline at end of file diff --git a/HDL_ON/UI/MainPage.cs b/HDL_ON/UI/MainPage.cs index a6ed457..7a77379 100644 --- a/HDL_ON/UI/MainPage.cs +++ b/HDL_ON/UI/MainPage.cs @@ -25,7 +25,7 @@ /// <summary> /// 鐗堟湰鍙� /// </summary> - public static string VersionString = "1.2.0716"; + public static string VersionString = "1.2.0719"; ///// <summary> ///// 瀹㈡埛绔被鍨� ///// </summary> diff --git a/HDL_ON/UI/UI2/4-PersonalCenter/AddDevice/SenesorEnvironment/AddSensorEnvironmentPage.cs b/HDL_ON/UI/UI2/4-PersonalCenter/AddDevice/SenesorEnvironment/AddSensorEnvironmentPage.cs new file mode 100644 index 0000000..d590b9b --- /dev/null +++ b/HDL_ON/UI/UI2/4-PersonalCenter/AddDevice/SenesorEnvironment/AddSensorEnvironmentPage.cs @@ -0,0 +1,186 @@ +锘縰sing HDL_ON.DAL.Server; +using HDL_ON.Entity; +using HDL_ON.Stan; +using Shared; +using System; + +namespace HDL_ON.UI +{ + /// <summary> + /// 娣诲姞姣背娉㈡楠�1鐣岄潰 + /// </summary> + public class AddSensorEnvironmentPage : EditorCommonForm + { + #region 鈻� 鍙橀噺澹版槑___________________________ + + /// <summary> + /// 娣诲姞璁惧瀹屾垚涔嬪悗鐨勫洖璋冧簨浠� + /// </summary> + public Action<Function> AddDeviceEvent = null; + + #endregion + + #region 鈻� 鍒濆鍖朹____________________________ + /// <summary> + /// 鐢婚潰鏄剧ず(搴曞眰浼氬浐瀹氳皟鐢ㄦ鏂规硶锛屽�熶互瀹屾垚鐢婚潰鍒涘缓) + /// </summary> + public void ShowForm(IntegratedBrandDevice device) + { + if (Language.CurrentLanguage == "Chinese") + { + //璁剧疆澶撮儴淇℃伅 + base.SetTitleText(Language.StringByID(StringId.Add) + device.productName); + } + else + { + base.SetTitleText(Language.StringByID(StringId.Add) + " " + device.productName); + } + //杩欎釜鐣岄潰鐨勮儗鏅渶瑕佺櫧鑹� + bodyFrameLayout.BackgroundColor = UI.CSS.CSS_Color.MainBackgroundColor; + + //鍒濆鍖栦腑閮ㄤ俊鎭� + this.InitMiddleFrame(); + } + + /// <summary> + /// 鍒濆鍖栦腑閮ㄤ俊鎭� + /// </summary> + private void InitMiddleFrame() + { + //鍥剧墖 + var btnPic = new PicViewControl(132, 132); + btnPic.Y = Application.GetRealHeight(69); + btnPic.Gravity = Gravity.CenterHorizontal; + btnPic.UnSelectedImagePath = "PersonalCenter/AddDevice/SenesorMegahealthBg.png"; + bodyFrameLayout.AddChidren(btnPic); + + //璇疯緭鍏ヨ澶囨満涓婄殑sn鐮� + var textView = new FrameLayout() + { + Y = Application.GetRealHeight(309 - 64), + Gravity = Gravity.CenterHorizontal, + Width = Application.GetRealWidth(319), + Height = Application.GetRealHeight(44), + }; + bodyFrameLayout.AddChidren(textView); + textView.AddChidren(new Button() { Y = Application.GetRealHeight(43), Height = 1, BackgroundColor = CSS.CSS_Color.DividingLineColor }); + + EditText editText = new EditText() + { + TextAlignment = TextAlignment.Center, + TextColor = CSS.CSS_Color.FirstLevelTitleColor, + PlaceholderText = Language.StringByID(StringId.PlsEntrySNCode), + PlaceholderTextColor = CSS.CSS_Color.PromptingColor1, + TextSize = CSS.CSS_FontSize.TextFontSize, + }; + textView.AddChidren(editText); + + Button btnScan = new Button() + { + Width = Application.GetRealWidth(32), + Height = Application.GetRealWidth(32), + Gravity = Gravity.CenterVertical, + X = Application.GetRealWidth(275), + UnSelectedImagePath = "Public/Scan.png" + }; + textView.AddChidren(btnScan); + btnScan.MouseUpEventHandler = (sender, e) => + { + Scan.OpenScan((scanString) => + { + editText.Text = scanString; + }); + }; + + + + + //涓嬩竴姝� + var btnNext = this.AddBottomClickButton(Language.StringByID(StringId.Next)); + btnNext.ButtonClickEvent += (sender, e) => + { + var snCode = editText.Text.Trim(); + if (string.IsNullOrEmpty(snCode)) + { + editText.PlaceholderTextColor = CSS.CSS_Color.WarningColor; + } + else + { + + var waitPage = new Loading(); + waitPage.Start(); + new System.Threading.Thread(() => { + try + { + var pm = new HttpServerRequest(); + var pack = pm.IndependentRegister3TyDevcie(SPK.SensorEnvironment, snCode, Language.StringByID(StringId.SensorEnvironment)); + if (pack.Code == StateCode.SUCCESS) + { + //var revData = Newtonsoft.Json.JsonConvert.DeserializeObject<List<IntegratedBrandDevice>>(pack.Data.ToString()); + Application.RunOnMainThread(() => + { + waitPage.Hide(); + var tipDialog = new OperationResultDisPalyPage(); + tipDialog.LoadPage(true, Language.StringByID(StringId.AddSuccess), "", Language.StringByID(StringId.CanStartUsingZhaoguanMillimeterWave), Language.StringByID(StringId.Next)); + tipDialog.Show(); + AddDeviceEvent?.Invoke(new Function()); + this.CloseForm(); + }); + } + else if (pack.Code == "10801" || pack.Code == "9") + { + var mes = ""; + if (Language.CurrentLanguage == "Chinese") + { + mes = "璇ヨ澶囧凡缁忚娣诲姞銆�"; + } + else + { + mes = "This device has been added."; + } + Application.RunOnMainThread(() => + { + var tip = new Tip() + { + Text = mes, + CloseTime = 2, + Direction = AMPopTipDirection.None + }; + tip.Show(MainPage.BaseView); + }); + } + else + { + IMessageCommon.Current.ShowErrorInfoAlter(pack.Code); + } + } + catch (Exception ex) + { + MainPage.Log("2--::" + ex.Message); + } + finally + { + Application.RunOnMainThread(() => { waitPage.Hide(); }); + } + }) + { IsBackground = true }.Start(); + } + }; + } + + #endregion + + #region 鈻� 鍏抽棴鐣岄潰___________________________ + + /// <summary> + /// 鍏抽棴鐣岄潰 + /// </summary> + public override void CloseFormBefore() + { + this.AddDeviceEvent = null; + base.CloseFormBefore(); + } + + #endregion + } +} diff --git a/HDL_ON/UI/UI2/4-PersonalCenter/AddDevice/SenesorEnvironment/SensorEnvironmentManagerPage.cs b/HDL_ON/UI/UI2/4-PersonalCenter/AddDevice/SenesorEnvironment/SensorEnvironmentManagerPage.cs new file mode 100644 index 0000000..961d9c9 --- /dev/null +++ b/HDL_ON/UI/UI2/4-PersonalCenter/AddDevice/SenesorEnvironment/SensorEnvironmentManagerPage.cs @@ -0,0 +1,133 @@ +锘縰sing HDL_ON.DAL.Server; +using HDL_ON.Entity; +using HDL_ON.Stan; +using HDL_ON.UI.UI2.PersonalCenter.PirDevice; +using Shared; +using System; + +namespace HDL_ON.UI +{ + /// <summary> + /// 娣诲姞姣背娉㈡楠�1鐣岄潰 + /// </summary> + public class SensorEnvironmentManagerPage : EditorCommonForm + { + #region 鈻� 鍙橀噺澹版槑___________________________ + + /// <summary> + /// 娣诲姞璁惧瀹屾垚涔嬪悗鐨勫洖璋冧簨浠� + /// </summary> + public Action DelDeviceEvent = null; + + Function function = null; + #endregion + + #region 鈻� 鍒濆鍖朹____________________________ + /// <summary> + /// 鐢婚潰鏄剧ず(搴曞眰浼氬浐瀹氳皟鐢ㄦ鏂规硶锛屽�熶互瀹屾垚鐢婚潰鍒涘缓) + /// </summary> + public void ShowForm(Function device) + { + function = device; + //璁剧疆澶撮儴淇℃伅 + base.SetTitleText(Language.StringByID(StringId.Add) + device.name); + //杩欎釜鐣岄潰鐨勮儗鏅渶瑕佺櫧鑹� + bodyFrameLayout.BackgroundColor = CSS.CSS_Color.BackgroundColor; + + //鍒濆鍖栦腑閮ㄤ俊鎭� + this.InitMiddleFrame(); + } + + /// <summary> + /// 鍒濆鍖栦腑閮ㄤ俊鎭� + /// </summary> + private void InitMiddleFrame() + { + //鍥剧墖 + var btnPic = new PicViewControl(132, 132); + btnPic.Y = Application.GetRealHeight(69); + btnPic.Gravity = Gravity.CenterHorizontal; + btnPic.UnSelectedImagePath = "PersonalCenter/AddDevice/SenesorMegahealthBg.png"; + bodyFrameLayout.AddChidren(btnPic); + + var btnTip = new Button() + { + Y = Application.GetRealHeight(309 - 44), + Gravity = Gravity.CenterHorizontal, + Width = Application.GetRealWidth(319), + Height = Application.GetRealHeight(84), + IsMoreLines = true, + TextAlignment = TextAlignment.Center, + TextColor = CSS.CSS_Color.FirstLevelTitleColor, + TextSize = CSS.CSS_FontSize.SubheadingFontSize, + }; + bodyFrameLayout.AddChidren(btnTip); + + if (Language.CurrentLanguage == "Chinese") + { + btnTip.Text = "璇ヨ澶囧凡娣诲姞鍒板畨闃蹭紶鎰熷櫒绫诲埆锛屽彲鍒板搴斿姛鑳芥澘鍧楁煡鐪�"; + } + else + { + btnTip.Text = "The device has been added to the security sensor category, which can be viewed in the corresponding function block."; + } + + var btnDel = new Button() + { + Y = Application.GetRealHeight(617 - 64), + Height = Application.GetRealHeight(50), + TextAlignment = TextAlignment.Center, + TextColor = CSS.CSS_Color.WarningColor, + TextSize = CSS.CSS_FontSize.SubheadingFontSize, + TextID = StringId.DeleteDevice, + BackgroundColor = CSS.CSS_Color.MainBackgroundColor, + }; + bodyFrameLayout.AddChidren(btnDel); + + btnDel.MouseUpEventHandler = (sender, e) => { + var pack = PirSend.DeleteDevice(function.deviceId); + if (pack.Code == StateCode.SUCCESS) + { + DelDeviceEvent?.Invoke(); + this.CloseForm(); + var mes = ""; + if (Language.CurrentLanguage == "Chinese") + { + mes = "璁惧鍒犻櫎鎴愬姛銆�"; + } + else + { + mes = "Device deleted successfully."; + } + var tip = new Tip() + { + Text = mes, + CloseTime = 2, + Direction = AMPopTipDirection.None + }; + tip.Show(MainPage.BaseView); + } + else + { + IMessageCommon.Current.ShowErrorInfoAlter(pack.Code); + } + }; + + } + + #endregion + + #region 鈻� 鍏抽棴鐣岄潰___________________________ + + /// <summary> + /// 鍏抽棴鐣岄潰 + /// </summary> + public override void CloseFormBefore() + { + this.DelDeviceEvent = null; + base.CloseFormBefore(); + } + + #endregion + } +} diff --git a/HDL_ON/UI/UI2/4-PersonalCenter/AddDevice/SenesorMegahealth/AddSenesorMegahealthDirection1Page.cs b/HDL_ON/UI/UI2/4-PersonalCenter/AddDevice/SenesorMegahealth/AddSenesorMegahealthDirection1Page.cs index b45f8ee..69f180e 100644 --- a/HDL_ON/UI/UI2/4-PersonalCenter/AddDevice/SenesorMegahealth/AddSenesorMegahealthDirection1Page.cs +++ b/HDL_ON/UI/UI2/4-PersonalCenter/AddDevice/SenesorMegahealth/AddSenesorMegahealthDirection1Page.cs @@ -3,8 +3,6 @@ using HDL_ON.Stan; using Shared; using System; -using System.Collections.Generic; -using System.Text; namespace HDL_ON.UI { diff --git a/HDL_ON/UI/UI2/4-PersonalCenter/AddDevice/SenesorMegahealth/SenesorMegahealthManagerPage.cs b/HDL_ON/UI/UI2/4-PersonalCenter/AddDevice/SenesorMegahealth/SenesorMegahealthManagerPage.cs index 4c24a2c..367b0a9 100644 --- a/HDL_ON/UI/UI2/4-PersonalCenter/AddDevice/SenesorMegahealth/SenesorMegahealthManagerPage.cs +++ b/HDL_ON/UI/UI2/4-PersonalCenter/AddDevice/SenesorMegahealth/SenesorMegahealthManagerPage.cs @@ -4,8 +4,6 @@ using HDL_ON.UI.UI2.PersonalCenter.PirDevice; using Shared; using System; -using System.Collections.Generic; -using System.Text; namespace HDL_ON.UI { diff --git a/HDL_ON/UI/UI2/4-PersonalCenter/AddFunction/AddDevciePage.cs b/HDL_ON/UI/UI2/4-PersonalCenter/AddFunction/AddDevciePage.cs index 19fe9ea..0b70665 100644 --- a/HDL_ON/UI/UI2/4-PersonalCenter/AddFunction/AddDevciePage.cs +++ b/HDL_ON/UI/UI2/4-PersonalCenter/AddFunction/AddDevciePage.cs @@ -154,6 +154,14 @@ this.RemoveFromParent(); }; break; + case SPK.SensorEnvironment: + var form2 = new AddSensorEnvironmentPage(); + form2.AddForm(device); + form2.AddDeviceEvent = (functionObj) => { + refreshView.BeginHeaderRefreshing(); + this.RemoveFromParent(); + }; + break; } }; } diff --git a/HDL_ON/UI/UI2/4-PersonalCenter/AddFunction/DeviceListPage.cs b/HDL_ON/UI/UI2/4-PersonalCenter/AddFunction/DeviceListPage.cs index a2c9567..c0f02a1 100644 --- a/HDL_ON/UI/UI2/4-PersonalCenter/AddFunction/DeviceListPage.cs +++ b/HDL_ON/UI/UI2/4-PersonalCenter/AddFunction/DeviceListPage.cs @@ -173,6 +173,14 @@ contentView.BeginHeaderRefreshing(); }; break; + case SPK.SensorEnvironment: + var smPage1 = new SensorEnvironmentManagerPage(); + smPage1.AddForm(device); + smPage1.DelDeviceEvent = () => + { + contentView.BeginHeaderRefreshing(); + }; + break; } }; } -- Gitblit v1.8.0