From 9f326f4000847e6167d8166fa2f6a66f53cb3734 Mon Sep 17 00:00:00 2001 From: 黄学彪 <hxb@hdlchina.com.cn> Date: 星期四, 17 十二月 2020 09:07:13 +0800 Subject: [PATCH] 新云端Ver1.3 --- ZigbeeApp/Shared/Phone/Device/Logic/OneLogic.cs | 65 +++++++++++++------------------- 1 files changed, 26 insertions(+), 39 deletions(-) diff --git a/ZigbeeApp/Shared/Phone/Device/Logic/OneLogic.cs b/ZigbeeApp/Shared/Phone/Device/Logic/OneLogic.cs index 866f354..fc9b3c8 100755 --- a/ZigbeeApp/Shared/Phone/Device/Logic/OneLogic.cs +++ b/ZigbeeApp/Shared/Phone/Device/Logic/OneLogic.cs @@ -24,8 +24,8 @@ /// <param name="Yes"></param> public void Show(bool Yes) { - UserView.HomePage.Instance.ScrollEnabled = false; #region View甯冨眬浠g爜 + UserView.HomePage.Instance.ScrollEnabled = false; TopView view = new TopView(); this.AddChidren(view.TopRowView()); @@ -47,7 +47,7 @@ view.clickBtn.MouseDownEventHandler += (sender, e) => { - // UserView.HomePage.Instance.ScrollEnabled = true;//鎭㈠宸︽粦 + UserView.HomePage.Instance.ScrollEnabled = true;//鎭㈠宸︽粦 RemoveFromParent(); }; var middle = new VerticalScrolViewLayout @@ -193,22 +193,20 @@ //S-one闂ㄩ攣鐗规畩,涓嶈兘鍐嶆缂栬緫; actiondevice.stateRow.AddRightView(actiondevice.edit); } - - var linkType = int.Parse(Common.Logic.CurrentLogic.Actions[i]["LinkType"].ToString()); var actions = Common.Logic.CurrentLogic.Actions[i]; - switch (linkType) { case 8: { - - var deviceinof = Method.GetCommonDevice(actions["DeviceAddr"].ToString(), actions["Epoint"].ToString()); + //S-one闂ㄩ攣鐗规畩锛圡ac鏄敮涓�鐨勮瘑鍒級 + ///濡傛灉涓嶈繖鏍锋煡鎵撅紝鍒嗙被-鑷姩鍖栬繘鏉ユ煡鐪嬩細瀛樺湪闂 + var deviceinof = Common.Logic.LogicDviceList.Find((obj) => { return obj.DeviceAddr == actions["DeviceAddr"].ToString(); }); if (deviceinof == null) { deviceinof = new CommonDevice(); } - actiondevice.deviceNameBtn.Text = LocalDevice.Current.GetDeviceEpointName(deviceinof); + actiondevice.deviceNameBtn.Text = HdlDeviceCommonLogic.Current.GetDeviceEpointName(deviceinof); actiondevice.deviceNameBtn.Visible = true; actiondevice.regionNameBtn.Visible = true; Method.RoomNmae(actiondevice.regionNameBtn, deviceinof); @@ -241,7 +239,6 @@ break; } - ///缂栬緫 actiondevice.edit.MouseUpEventHandler += (sender, e) => { @@ -249,7 +246,9 @@ { case 8: { - var deviceinof = Method.GetCommonDevice(actions["DeviceAddr"].ToString(), actions["Epoint"].ToString()); + //S-one闂ㄩ攣鐗规畩锛圡ac鏄敮涓�鐨勮瘑鍒級 + ///濡傛灉涓嶈繖鏍锋煡鎵撅紝鍒嗙被-鑷姩鍖栬繘鏉ユ煡鐪嬩細瀛樺湪闂 + var deviceinof = Common.Logic.LogicDviceList.Find((obj) => { return obj.DeviceAddr == actions["DeviceAddr"].ToString(); }); if (deviceinof == null) { deviceinof = new CommonDevice(); @@ -326,10 +325,8 @@ return; } var name = logicTextBox.Text.Trim(); - Method.SaveLogic(IfString._Logic, name, IfString.Tag, Common.Logic.CurrentLogic); + Method.SaveLogic(IfString._SoneLogic, name, IfString.Tag, Common.Logic.CurrentLogic); }; - - } /// <summary> @@ -345,7 +342,7 @@ this.AddChidren(flMain); CompleteView completeView = new CompleteView(); flMain.AddChidren(completeView.Show(1)); - // completeView.Btntitle.Text =LocalDevice.Current.GetDeviceEpointName(common); + // completeView.Btntitle.Text =HdlDeviceCommonLogic.Current.GetDeviceEpointName(common); completeView.Btntitle.TextID = MyInternationalizationString.openmode; EventHandler<MouseEventArgs> clickcancel = (sender, e) => { @@ -406,34 +403,24 @@ }; - foreach (var deviceinfo in Common.Logic.CurrentLogic.Actions) + if (button.Text == Language.StringByID(MyInternationalizationString.logicopen)) { - if (deviceinfo["LinkType"].ToString() == "8") - { - if (deviceinfo["DeviceAddr"].ToString() == common.DeviceAddr && deviceinfo["Epoint"].ToString() == common.DeviceEpoint.ToString()) - { - if (deviceinfo["PassData"].ToString() == "055704010112") - {//寮�鍚� - SelectedDeviceStatus = Language.StringByID(MyInternationalizationString.logicopen); - openView.selectedIconBtn.Visible = true; - closeView.selectedIconBtn.Visible = false; - openView.titleBtn.TextColor = ZigbeeColor.Current.LogicBtnSelectedColor; - closeView.titleBtn.TextColor = ZigbeeColor.Current.LogicBtnNotSelectedColor; - } - else - {//鍏抽棴 - SelectedDeviceStatus = Language.StringByID(MyInternationalizationString.logicclose); - openView.selectedIconBtn.Visible = false; - closeView.selectedIconBtn.Visible = true; - openView.titleBtn.TextColor = ZigbeeColor.Current.LogicBtnNotSelectedColor; - closeView.titleBtn.TextColor = ZigbeeColor.Current.LogicBtnSelectedColor; + //寮�鍚� + SelectedDeviceStatus = Language.StringByID(MyInternationalizationString.logicopen); + openView.selectedIconBtn.Visible = true; + closeView.selectedIconBtn.Visible = false; + openView.titleBtn.TextColor = ZigbeeColor.Current.LogicBtnSelectedColor; + closeView.titleBtn.TextColor = ZigbeeColor.Current.LogicBtnNotSelectedColor; - } - break; - } - } } - + else { + //鍏抽棴 + SelectedDeviceStatus = Language.StringByID(MyInternationalizationString.logicclose); + openView.selectedIconBtn.Visible = false; + closeView.selectedIconBtn.Visible = true; + openView.titleBtn.TextColor = ZigbeeColor.Current.LogicBtnNotSelectedColor; + closeView.titleBtn.TextColor = ZigbeeColor.Current.LogicBtnSelectedColor; + } } break; -- Gitblit v1.8.0