| | |
| | | X = Application.GetRealWidth(x); |
| | | Y = Application.GetRealHeight(y); |
| | | Width = Application.GetRealWidth(1080); |
| | | Height = Application.GetRealHeight(446); |
| | | Height = Application.GetRealHeight(397 + 46); |
| | | BackgroundColor = ZigbeeColor.Current.GXCGrayBackgroundColor; |
| | | } |
| | | |
| | |
| | | RemoveAll(); |
| | | var sceneRowLayout = new RowLayout |
| | | { |
| | | Y = Application.GetRealHeight(46), |
| | | Height = Application.GetRealHeight(446 - 46), |
| | | Height = Application.GetRealHeight(440), |
| | | LineColor = ZigbeeColor.Current.GXCGrayBackgroundColor, |
| | | Tag= scene |
| | | Tag = scene |
| | | }; |
| | | AddChidren(sceneRowLayout); |
| | | sceneRowLayout.SubViewWidth = Application.GetRealWidth(199); |
| | |
| | | { |
| | | X = Application.GetRealWidth(179), |
| | | Width = Application.GetRealWidth(844), |
| | | Height = Application.GetRealHeight(400), |
| | | Height = Application.GetRealHeight(397), |
| | | ImagePath = scene.IconPathType == 0 ? scene.IconPath : System.IO.Path.Combine(Config.Instance.FullPath, scene.IconPath), |
| | | Radius = (uint)Application.GetRealHeight(17) |
| | | }; |
| | | sceneRowLayout.AddChidren(sceneImg); |
| | | //sceneImg.SetViewShadow(true); |
| | | sceneRowLayout.AddChidren(sceneImg);
|
| | | //阴影
|
| | | var btnShadow = new PicViewControl(sceneImg.Width + Application.GetRealWidth(14 * 2), sceneImg.Height + Application.GetRealHeight(43), false);
|
| | | btnShadow.X = sceneImg.X - Application.GetRealWidth(14);
|
| | | btnShadow.UnSelectedImagePath = "Scene/SceneShadow.png";
|
| | | sceneRowLayout.AddChidren(btnShadow); |
| | | |
| | | var leftFL = new FrameLayout |
| | | { |
| | |
| | | Y = Application.GetRealHeight(58), |
| | | Width = Application.GetRealWidth(251), |
| | | Height = Application.GetRealHeight(282), |
| | | BackgroundColor = ZigbeeColor.Current.GXCBlackBackgroundColor2, |
| | | BackgroundColor = 0xd6333333, |
| | | Radius = (uint)Application.GetRealHeight(17) |
| | | }; |
| | | sceneRowLayout.AddChidren(leftFL); |
| | |
| | | Height = Application.GetMinRealAverage(65), |
| | | UnSelectedImagePath = "Item/Collection.png", |
| | | SelectedImagePath = "Item/CollectionSelected.png", |
| | | IsSelected = Common.Room.CurrentRoom.GetLoveRoom().SceneUIFilePathList.Contains(scene.FileName), |
| | | IsSelected = HdlRoomLogic.Current.IsCollectInRoom(scene), |
| | | Tag = scene |
| | | }; |
| | | leftFL.AddChidren(collectionBtn); |
| | |
| | | { |
| | | if (room.IsLove) |
| | | { |
| | | Common.Room.CurrentRoom.GetLoveRoom().DeleteScene(scene); |
| | | HdlSceneLogic.Current.DeleteScene(HdlRoomLogic.Current.GetLoveRoom(), scene); |
| | | RemoveViewByTag(collectionBtn.Tag); |
| | | } |
| | | else |
| | | { |
| | | collectionBtn.IsSelected = !collectionBtn.IsSelected; |
| | | if (collectionBtn.IsSelected) |
| | | { |
| | | Common.Room.CurrentRoom.GetLoveRoom().AddScene(scene); |
| | | {
|
| | | HdlSceneLogic.Current.AddScene(HdlRoomLogic.Current.GetLoveRoom(), scene); |
| | | } |
| | | else |
| | | { |
| | | Common.Room.CurrentRoom.GetLoveRoom().DeleteScene(scene); |
| | | HdlSceneLogic.Current.DeleteScene(HdlRoomLogic.Current.GetLoveRoom(), scene); |
| | | } |
| | | } |
| | | }; |
| | |
| | | BackgroundColor=ZigbeeColor.Current.GXCTextSelectedColor, |
| | | }; |
| | | delayBtn.SetCornerWithSameRadius(Application.GetRealHeight(17), HDLUtils.RectCornerBottomLeft | HDLUtils.RectCornerTopLeft | HDLUtils.RectCornerTopRight | HDLUtils.RectCornerBottomRight); |
| | | sceneRowLayout.AddLeftView(delayBtn); |
| | | sceneRowLayout.AddLeftView(delayBtn);
|
| | | //变更按钮的高度
|
| | | delayBtn.Height = sceneImg.Height; |
| | | //编辑 |
| | | var settingBtn = new Device.CommonForm.RowLayoutEditButton() |
| | | { |
| | |
| | | { |
| | | if (room.IsLove) |
| | | { |
| | | sceneRowLayout.AddRightView(deleteBtn); |
| | | sceneRowLayout.AddRightView(deleteBtn);
|
| | | //变更按钮的高度
|
| | | deleteBtn.Height = sceneImg.Height; |
| | | } |
| | | else |
| | | { |
| | | sceneRowLayout.AddRightView(settingBtn); |
| | | sceneRowLayout.AddRightView(deleteBtn); |
| | | |
| | | sceneRowLayout.AddRightView(deleteBtn);
|
| | | //变更按钮的高度
|
| | | settingBtn.Height = sceneImg.Height;
|
| | | deleteBtn.Height = sceneImg.Height; |
| | | } |
| | | } |
| | | |
| | |
| | | { |
| | | if (room.IsLove) |
| | | { |
| | | Shared.Common.Room.CurrentRoom.GetLoveRoom().DeleteScene(scene); |
| | | HdlSceneLogic.Current.DeleteScene(HdlRoomLogic.Current.GetLoveRoom(), scene); |
| | | RemoveFromParent(); |
| | | } |
| | | else |
| | |
| | | //1成功 |
| | | if (removeSceneAllData.removeSceneData.Result == 1) |
| | | { |
| | | room.RemoveScene(scene); |
| | | HdlSceneLogic.Current.RemoveScene(scene); |
| | | //RefreshBodyView(); |
| | | RemoveFromParent(); |
| | | } |
| | | //0 移除失败 |
| | | else if (removeSceneAllData.removeSceneData.Result == 0) |
| | | { |
| | | CommonPage.Instance.ShowErrorInfoAlert(R.MyInternationalizationString.FailedPleaseTryAgain); |
| | | CommonFormResouce.ShowTip(Language.StringByID(R.MyInternationalizationString.FailedPleaseTryAgain)); |
| | | return; |
| | | } |
| | | //2 没有该场景 |
| | | else if (removeSceneAllData.removeSceneData.Result == 2) |
| | | { |
| | | room.RemoveScene(scene); |
| | | {
|
| | | HdlSceneLogic.Current.RemoveScene(scene); |
| | | //RefreshBodyView(); |
| | | RemoveFromParent(); |
| | | CommonPage.Instance.ShowErrorInfoAlert(R.MyInternationalizationString.TheSceneIsNull); |
| | | CommonFormResouce.ShowTip(Language.StringByID(R.MyInternationalizationString.TheSceneIsNull)); |
| | | return; |
| | | } |
| | | }; |
| | |
| | | if (sceneDeviceList.getSceneDeviceListInfo != null) |
| | | { |
| | | var deviceList = sceneDeviceList.getSceneDeviceListInfo.DeviceList; |
| | | var allDevice = Common.Room.AllRoomDeviceUIList; |
| | | var allScene = Common.Room.AllRoomSceneUIList; |
| | | var allDevice = HdlRoomLogic.Current.GetAllRoomListDevice(); |
| | | var allScene = HdlSceneLogic.Current.GetAllRoomSceneList(); |
| | | |
| | | if (deviceList != null && allDevice.Count != 0) |
| | | { |
| | |
| | | sceneView.Show(); |
| | | sceneView.EditorAction = (s, r) => |
| | | { |
| | | if(r.Id!=room.Id) |
| | | if (r.Id != room.Id) |
| | | { |
| | | RemoveFromParent(); |
| | | } |
| | |
| | | { |
| | | return; |
| | | } |
| | | CommonPage.Instance.ShowErrorInfoAlert(R.MyInternationalizationString.ControlSceneFail); |
| | | CommonFormResouce.ShowTip(Language.StringByID(R.MyInternationalizationString.ControlSceneFail)); |
| | | } |
| | | |
| | | scene.RemainTime = scene.SceneDelayTime; |