HDL-ON_Android/Assets/Language.ini | ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史 | |
HDL-ON_iOS/Resources/Language.ini | ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史 | |
HDL_ON/Common/R.cs | ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史 | |
HDL_ON/DAL/Server/HttpServerRequest.cs | ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史 | |
HDL_ON/UI/MainPage.cs | ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史 | |
HDL_ON/UI/UI0-Stan/Logic/HdlFormLogic.cs | ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史 | |
HDL_ON/UI/UI2/4-PersonalCenter/AddDevice/AddMiniRemoteControlDirection1Page.cs | ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史 | |
HDL_ON/UI/UI2/4-PersonalCenter/AddDevice/AddMiniRemoteControlDirection4Page.cs | ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史 | |
HDL_ON/UI/UI2/4-PersonalCenter/AddFunction/BrandListPage.cs | ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史 | |
HDL_ON/UI/UI2/4-PersonalCenter/AddFunction/DeviceListPage.cs | ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史 |
HDL-ON_Android/Assets/Language.ini
@@ -411,6 +411,7 @@ 426=Air dry time 427=Disinfect time 428=Anion Time 429=H 430=Min 431=You are currently adding any platform devices to @@ -418,6 +419,8 @@ 433=Water valve 434=Time switch 435=Remote control 436=Added Devices 437=Device List 1000=Indoor Humidity 1001=V-chip @@ -1178,6 +1181,8 @@ 433=水阀 434=定时开关 435=遥控器 436=已添加功能 437=设备列表 1000=室内湿度 HDL-ON_iOS/Resources/Language.ini
@@ -419,6 +419,8 @@ 433=Water valve 434=Time switch 435=Remote control 436=Added Devices 437=Device List 1000=Indoor Humidity 1001=V-chip @@ -1179,6 +1181,8 @@ 433=水阀 434=定时开关 435=遥控器 436=已添加功能 437=设备列表 1000=室内湿度 HDL_ON/Common/R.cs
@@ -4,6 +4,8 @@ { public static class StringId { public const int DeviceList = 437; public const int AddedDevice = 436; public const int RemoteControl = 435; public const int TimeSwitch = 434; public const int WaterValve = 433; HDL_ON/DAL/Server/HttpServerRequest.cs
@@ -1808,6 +1808,8 @@ d.Add("categoryType", 1); d.Add("productPlatform", productPlatform); d.Add("productBrand", productBrand); d.Add("networkConfig", true); var requestJson = HttpUtil.GetSignRequestJson(d); return HttpUtil.RequestHttpsPostFroHome(NewAPI.Api_Post_Get3tyBrandDevcieList, requestJson); HDL_ON/UI/MainPage.cs
@@ -192,7 +192,7 @@ waitPage.RemoveFromParent(); BaseView.RemoveAll(); BasePageView = new PageLayout(); BasePageView.ScrollEnabled = false; BasePageView.ScrollEnabled = true; BasePageView.IsShowPoint = false; BasePageView.PageChange = (sender, e) => { HDL_ON/UI/UI0-Stan/Logic/HdlFormLogic.cs
@@ -163,6 +163,32 @@ #region ■ 一般方法___________________________ /// <summary> /// 关闭所有打开了的界面 /// </summary> /// <param name="tagetFrom">目标界面,如果指定了的话,则关闭目标界面上层的全部界面(它自身不关闭)</param> public void CloseAllOpenForm(string tagetFrom = null) { //最后一个是装载主页的容器,所以不能删除 while (MainPage.BasePageView.ChildrenCount > 1) { var view = MainPage.BasePageView.GetChildren(MainPage.BasePageView.ChildrenCount - 1); if (view is CommonFormBase) { if (((CommonFormBase)view).FormID == tagetFrom) { //只关闭到指定目标界面 return; } ((CommonFormBase)view).CloseForm(); } else { view.RemoveFromParent(); } } } /// <summary> /// 获取当前正在激活的界面 /// </summary> /// <returns></returns> HDL_ON/UI/UI2/4-PersonalCenter/AddDevice/AddMiniRemoteControlDirection1Page.cs
@@ -13,6 +13,11 @@ { #region ■ 变量声明___________________________ /// <summary> /// 添加设备完成之后的回调事件(温总说他自己要这个东西) /// </summary> public Action<Entity.Function> AddDeviceEvent = null; #endregion #region ■ 初始化_____________________________ @@ -64,7 +69,7 @@ btnNext.CanClick = true; if (result == true) { this.CloseForm(); //注意:这个界面不能关闭,它用来回调温总的界面用的 var form = new AddMiniRemoteControlDirection2Page(); //初始wifi和密码为空 form.AddForm(string.Empty, string.Empty); @@ -74,5 +79,18 @@ } #endregion #region ■ 关闭界面___________________________ /// <summary> /// 关闭界面 /// </summary> public override void CloseFormBefore() { this.AddDeviceEvent = null; base.CloseFormBefore(); } #endregion } } HDL_ON/UI/UI2/4-PersonalCenter/AddDevice/AddMiniRemoteControlDirection4Page.cs
@@ -22,6 +22,10 @@ /// </summary> private string wifiPsw = string.Empty; /// <summary> /// 新设备的sid(用来匹配哪一个设备是新的) /// </summary> private string newDeviceSid = string.Empty; /// <summary> /// 超时线程是否运行 /// </summary> private bool timeoutThreadActivity = false; @@ -176,7 +180,7 @@ /// <summary> /// 显示成功界面 /// </summary> private void ShowSuccessView() private void ShowSuccessView(Entity.Function newDevice) { //清空body this.ClearBodyFrame(); @@ -209,19 +213,38 @@ bodyFrameLayout.AddChidren(btnUse); btnUse.ButtonClickEvent += (sender, e) => { //关掉界面 this.CloseForm(); HdlFormLogic.Current.CloseFormByFormName("AddThirdPartyDeviceMenuListPage"); HDL_ON.UI.UI2.PersonalCenter.PirDevice.Method.GetPirDeviceList(this, () => if (newDevice == null) { Application.RunOnMainThread(() => //关闭掉全部的界面,应该不会发生 HdlFormLogic.Current.CloseAllOpenForm(); return; } var form = HdlFormLogic.Current.GetFormByName("AddMiniRemoteControlDirection1Page") as AddMiniRemoteControlDirection1Page; if (form.AddDeviceEvent != null) { //代表这个是由温总那边调用的,直接回调函数 form.AddDeviceEvent.Invoke(newDevice); //关闭掉这个界面 this.CloseForm(); //再把AddMiniRemoteControlDirection1Page界面关了 HdlFormLogic.Current.CloseFormByFormName("AddMiniRemoteControlDirection1Page"); } else { //代表这并不是由温总的界面调用的,则关闭掉全部的界面 HdlFormLogic.Current.CloseAllOpenForm(); //然后再把温总的界面new起来 HDL_ON.UI.UI2.PersonalCenter.PirDevice.Method.GetPirDeviceList(this, () => { var page = new UI2.PersonalCenter.PirDevice.PirMain(); MainPage.BasePageView.AddChidren(page); page.Show(null); MainPage.BasePageView.PageIndex = MainPage.BasePageView.ChildrenCount - 1; Application.RunOnMainThread(() => { var page = new UI2.PersonalCenter.PirDevice.PirMain(); MainPage.BasePageView.AddChidren(page); page.Show(); MainPage.BasePageView.PageIndex = MainPage.BasePageView.ChildrenCount - 1; }); }); }); } }; } @@ -311,11 +334,13 @@ //数组类型 if (linqArry.Count == 0) { return false; } strSpk = linqArry[0]["spk"].ToString(); this.newDeviceSid = linqArry[0]["sid"].ToString(); } else { //非数组类型 strSpk = json["objects"]["spk"].ToString(); this.newDeviceSid = json["objects"]["sid"].ToString(); } if (strSpk != Entity.SPK.IrModule) { @@ -331,7 +356,7 @@ /// 刷新红外宝信息 /// </summary> /// <param name="successEvent">成功的回调事件</param> private void RefreshMiniRemoteControlInfo(Action successEvent) private void RefreshMiniRemoteControlInfo(Action<Entity.Function> successEvent) { var pra = new Dictionary<string, object>(); pra.Add("homeId", Entity.DB_ResidenceData.Instance.CurrentRegion.RegionID); @@ -357,14 +382,20 @@ continue; } var listDevice = Newtonsoft.Json.JsonConvert.DeserializeObject<Entity.DevcieApiPack>(result.Data.ToString()); Entity.Function newDevice = null; foreach (var newFunction in listDevice.list) { //添加到缓存当中 newFunction.SaveFunctionFile(); Entity.FunctionList.List.IniFunctionList(newFunction.savePath, true); if (newFunction.sid == this.newDeviceSid) { //这个设备是新追加的 newDevice = newFunction; } } //调用回调函数 successEvent?.Invoke(); successEvent?.Invoke(newDevice); return; } catch @@ -392,7 +423,7 @@ return; } //刷新红外宝信息 this.RefreshMiniRemoteControlInfo(() => this.RefreshMiniRemoteControlInfo((Entity.Function newDevice) => { //移除这个事件 HdlCloudReceiveLogic.Current.RemoveCloudReceiveEvent("AddMiniRemoteControlDirection4Page"); @@ -400,14 +431,14 @@ this.timeoutThreadActivity = false; //添加设备成功之后,处理一些东西 this.DoSomethingAfterAddDeviceSuccess(); this.DoSomethingAfterAddDeviceSuccess(newDevice); }); } /// <summary> /// 添加设备成功之后,处理一些东西 /// </summary> private void DoSomethingAfterAddDeviceSuccess() private void DoSomethingAfterAddDeviceSuccess(Entity.Function newDevice) { HdlThreadLogic.Current.RunThread(() => { @@ -438,7 +469,7 @@ HdlThreadLogic.Current.RunMain(() => { //显示成功界面 this.ShowSuccessView(); this.ShowSuccessView(newDevice); }); } } HDL_ON/UI/UI2/4-PersonalCenter/AddFunction/BrandListPage.cs
@@ -21,13 +21,7 @@ public void LoadPage() { Action<string,string> action = (s,a) => { var page = new AddThirdPartyBrandListpage(brandList); MainPage.BasePageView.AddChidren(page); page.LoadPage(); MainPage.BasePageView.PageIndex = MainPage.BasePageView.ChildrenCount - 1; }; new TopViewDiv(bodyView, Language.StringByID(StringId.FunctionBrand)).LoadTopView_AddIcon("3ty",action); new TopViewDiv(bodyView, Language.StringByID(StringId.FunctionBrand)).LoadTopView();//.LoadTopView_AddIcon("3ty",action); bodyView.BackgroundColor = CSS_Color.BackgroundColor; @@ -193,32 +187,30 @@ }; contentView.AddChidren(btnTipText1); var btnAdd = new Button() { Y = Application.GetRealHeight(500), Gravity = Gravity.CenterHorizontal, Width = Application.GetRealWidth(220), Height = Application.GetRealWidth(44), BackgroundColor = CSS_Color.MainColor, TextAlignment = TextAlignment.Center, TextColor = CSS_Color.MainBackgroundColor, TextSize = CSS_FontSize.SubheadingFontSize, IsBold = true, Radius = (uint)Application.GetRealWidth(22), BorderColor = 0x00000000, BorderWidth = 0, TextID = StringId.Add, }; contentView.AddChidren(btnAdd); btnAdd.MouseUpEventHandler = (sender, e) => { var page = new AddThirdPartyBrandListpage(brandList); MainPage.BasePageView.AddChidren(page); page.LoadPage(); MainPage.BasePageView.PageIndex = MainPage.BasePageView.ChildrenCount - 1; this.RemoveFromParent(); }; //var btnAdd = new Button() //{ // Y = Application.GetRealHeight(500), // Gravity = Gravity.CenterHorizontal, // Width = Application.GetRealWidth(220), // Height = Application.GetRealWidth(44), // BackgroundColor = CSS_Color.MainColor, // TextAlignment = TextAlignment.Center, // TextColor = CSS_Color.MainBackgroundColor, // TextSize = CSS_FontSize.SubheadingFontSize, // IsBold = true, // Radius = (uint)Application.GetRealWidth(22), // BorderColor = 0x00000000, // BorderWidth = 0, // TextID = StringId.Add, //}; //contentView.AddChidren(btnAdd); //btnAdd.MouseUpEventHandler = (sender, e) => { // var page = new AddThirdPartyBrandListpage(brandList); // MainPage.BasePageView.AddChidren(page); // page.LoadPage(); // MainPage.BasePageView.PageIndex = MainPage.BasePageView.ChildrenCount - 1; // this.RemoveFromParent(); //}; HDL_ON/UI/UI2/4-PersonalCenter/AddFunction/DeviceListPage.cs
@@ -20,7 +20,13 @@ public void LoadPage() { new TopViewDiv(bodyView, Language.StringByID(StringId.AddDevice)).LoadTopView(); Action<string,string> action = (s,a) => { var page = new AddDevciePage(brand); MainPage.BasePageView.AddChidren(page); page.LoadPage(); MainPage.BasePageView.PageIndex = MainPage.BasePageView.ChildrenCount - 1; }; new TopViewDiv(bodyView, Language.StringByID(StringId.Devices)).LoadTopView_AddIcon("3ty",action); bodyView.BackgroundColor = CSS_Color.BackgroundColor; contentView = new VerticalRefreshLayout() @@ -69,8 +75,6 @@ void LoadRow(List<Function> deviceList) { deviceList.Add(new Function() { name ="测试红外宝",spk = SPK.IrModule}); contentView.RemoveAll(); bool isFrist = true; foreach (var device in deviceList)