| | |
| | | UserView.HomePage.Instance.PageIndex += 1; |
| | | addLogicPage.Show(); |
| | | } |
| | | /// <summary> |
| | | /// HidenFloor |
| | | /// </summary> |
| | | /// <param name="statu"></param> |
| | | private void HidenFloor(bool statu) |
| | | { |
| | | selectFloorBtn.Visible = !statu; |
| | | floorBtn.Visible = !statu; |
| | | } |
| | | |
| | | #endregion |
| | | |
| | |
| | | functionSceneAutoBodyView.RemoveAll(); |
| | | if (functionBtn.IsSelected) |
| | | { |
| | | HidenFloor(false); |
| | | ShowFunction(); |
| | | } |
| | | else if (sceneBtn.IsSelected) |
| | | { |
| | | HidenFloor(false); |
| | | ShowScene(); |
| | | } |
| | | else if (automationBtn.IsSelected) |
| | | { |
| | | HidenFloor(true); |
| | | ShowAutotion(); |
| | | } |
| | | } |
| | |
| | | |
| | | deviceRow.ClickBtn.MouseUpEventHandler += (send2, e2) => |
| | | { |
| | | if (deviceUI.CommonDevice.DfunctionType == DeviceFunctionType.A开关) |
| | | { |
| | | var lightControl = new Phone.Device.Light.OnOffControl(); |
| | | UserView.HomePage.Instance.AddChidren(lightControl); |
| | | UserView.HomePage.Instance.PageIndex += 1; |
| | | //lightControl.action = RefreshBodyView; |
| | | lightControl.Show(deviceUI, room); |
| | | } |
| | | else if (deviceUI.CommonDevice.DfunctionType == DeviceFunctionType.A插座) |
| | | { |
| | | var lightControl = new Phone.Device.Light.PlugControl(); |
| | | UserView.HomePage.Instance.AddChidren(lightControl); |
| | | UserView.HomePage.Instance.PageIndex += 1; |
| | | //lightControl.action = RefreshBodyView; |
| | | lightControl.Show(deviceUI, room); |
| | | } |
| | | else |
| | | { |
| | | var lightControl = new Phone.Device.Light.LightControl(); |
| | | UserView.HomePage.Instance.AddChidren(lightControl); |
| | | UserView.HomePage.Instance.PageIndex += 1; |
| | | //lightControl.action = RefreshBodyView; |
| | | lightControl.Show(deviceUI, room); |
| | | } |
| | | }; |
| | | |
| | | var editBtn = new CommonForm.RowLayoutEditButton() |
| | |
| | | UserHomeView.ReadStatus(rollerShade, () => |
| | | { |
| | | rollerShade.ReadAttri(Cluster_ID.Identify, AttriButeId.Switch); |
| | | rollerShade.ReadWcdCurrentPositionLiftPercentage(); |
| | | }); |
| | | } |
| | | else |
| | |
| | | if ((DateTime.Now - rollerShade.LastDateTime).TotalSeconds > CommonPage.ReadDeviceStatuSpan) |
| | | { |
| | | rollerShade.ReadAttri(Cluster_ID.Identify, AttriButeId.Switch); |
| | | rollerShade.ReadWcdCurrentPositionLiftPercentage(); |
| | | } |
| | | } |
| | | |