黄学彪
2019-10-28 1f5636d69332170ea3a41c76c9519f6ff6f0a8d9
ZigbeeApp/Shared/Phone/Device/Room/AddRoomScene.cs
old mode 100644 new mode 100755
@@ -137,10 +137,10 @@
                            tList.Add($"{i} {Language.StringByID(R.MyInternationalizationString.Second)}");
                        }
                        //1-60秒
                        PickerView.Show(tList, (obj) =>
                        {
                            targetDevice.DelayTime = int.Parse(obj.Split(' ')[0]);
                        }, Language.StringByID(R.MyInternationalizationString.Confrim));
                        //PickerView.Show(tList, (obj) =>
                        //{
                            //targetDevice.DelayTime = int.Parse(obj.Split(' ')[0]);
                        //}, Language.StringByID(R.MyInternationalizationString.Confrim));
                    };
                    devRight.MouseUpEventHandler += (sender, e) =>
                    {
@@ -202,10 +202,10 @@
                        //时间间隔
                        else if (targetDevice.Type == 1)
                        {
                            var delayTimeView = new CategorySceneSelectedDelayTime();
                            var delayTimeView = new SelectDelayTime();
                            UserView.HomePage.Instance.AddChidren(delayTimeView);
                            UserView.HomePage.Instance.PageIndex += 1;
                            delayTimeView.Show(1, targetDevice.SceneTargetDeviceUIID,-1,true);
                            //delayTimeView.Show(1, targetDevice.SceneTargetDeviceUIID,-1,true);
                        }
                        //场景
                        else if (targetDevice.Type == 2)
@@ -236,7 +236,19 @@
        {
            CurrentRoom = room;
            #region topview
            var topBGView = new FrameLayout()
            {
                Height = Application.GetRealHeight(CommonPage.Navigation_Height),
                BackgroundColor = ZigbeeColor.Current.GXCTopViewBackgroundColor
            };
            AddChidren(topBGView);
            var topView = new FrameLayout()
            {
                Y = Application.GetRealHeight(CommonPage.NavigationTitle_Y),
                Height = Application.GetRealHeight(CommonPage.Navigation_Height - CommonPage.NavigationTitle_Y),
                BackgroundColor = ZigbeeColor.Current.GXCTopViewBackgroundColor,
            };
            AddChidren(topView);
            var topBGView = new FrameLayout()
            {
                Height = Application.GetRealHeight(CommonPage.Navigation_Height),
                BackgroundColor = ZigbeeColor.Current.GXCTopViewBackgroundColor
            };
            AddChidren(topBGView);
            var topView = new FrameLayout()
            {
                Y = Application.GetRealHeight(CommonPage.NavigationTitle_Y),
                Height = Application.GetRealHeight(CommonPage.Navigation_Height - CommonPage.NavigationTitle_Y),
                BackgroundColor = ZigbeeColor.Current.GXCTopViewBackgroundColor,
            };
            AddChidren(topView);
            var title = new Button()
            {
@@ -249,7 +261,16 @@
            };
            topView.AddChidren(title);
            var back = new Button()
            {
                X = Application.GetRealWidth(CommonPage.Navigation_X),
                Height = Application.GetMinRealAverage(110),
                Width = Application.GetMinRealAverage(110),
                UnSelectedImagePath = "Item/Back.png",
                SelectedImagePath = "Item/BackSelected.png",
                Gravity = Gravity.CenterVertical
            };
            topView.AddChidren(back);
            var back = new Button()
            {
                X = Application.GetRealWidth(CommonPage.Navigation_X),
                Height = Application.GetMinRealAverage(110),
                Width = Application.GetMinRealAverage(110),
                UnSelectedImagePath = "Item/Back.png",
                SelectedImagePath = "Item/BackSelected.png",
                Gravity = Gravity.CenterVertical
            };
            topView.AddChidren(back);
            back.MouseUpEventHandler += (sender, e) =>
            {
                this.RemoveFromParent();
@@ -370,46 +391,44 @@
                Y = zoneFL.Bottom,
                Height = Application.GetRealHeight(170),
            };
            midFL.AddChidren(targetFL);
            var targetTip = new Button()
            var targetAddFL = new FrameLayout()
            {
                X = Application.GetRealWidth(50),
                Height = Application.GetRealHeight(70),
                Width = Application.GetRealWidth(300),
                TextAlignment = TextAlignment.CenterLeft,
                TextSize = 12,
                TextColor = ZigbeeColor.Current.GXCButtonTipColor,
                //TextID = R.MyInternationalizationString.BelongModel,
                Y = zoneFL.Bottom,
                Height = Application.GetRealHeight(170),
            };
            //targetFL.AddChidren(targetTip);
            midFL.AddChidren(targetFL);
            var target = new Button()
            {
                X = Application.GetRealWidth(50),
                //Y = deviceNameTip.Bottom,
                Height = Application.GetRealHeight(100) - 1,
                Width = Application.GetRealWidth(500),
                TextAlignment = TextAlignment.CenterLeft,
                TextSize = 20,
                TextColor = ZigbeeColor.Current.GXCTextBlackColor,
                TextID=R.MyInternationalizationString.AddRoomScentTargetAction,
                TextID=R.MyInternationalizationString.AddScentTargetAction,
                Gravity=Gravity.CenterVertical
            };
            targetFL.AddChidren(target);
            targetAddFL.AddChidren(target);
            var targetAdd = new Device.CommonForm.SelectedStatuButton()
            {
                X = Application.GetRealWidth(CommonPage.AppRealWidth - 150),
                Width = Application.GetMinRealAverage(110),
                Height = Application.GetMinRealAverage(110),
                Width = Application.GetMinRealAverage(72),
                Height = Application.GetMinRealAverage(72),
                UnSelectedImagePath = "Item/Add.png",
                SelectedImagePath="Item/AddSelected.png",
                Gravity = Gravity.CenterVertical
            };
            targetFL.AddChidren(targetAdd);
            var targetLine = new Button()
            {
                Y = targetFL.Height-1,
                Height = 1,
                BackgroundColor = ZigbeeColor.Current.GXCLineColor
                Width=Application.GetRealWidth(965),
                Gravity=Gravity.CenterHorizontal,
                BackgroundColor = ZigbeeColor.Current.GXCGrayLineColor2
            };
            targetFL.AddChidren(targetLine);
@@ -422,7 +441,7 @@
            };
            midFL.AddChidren(TargetListScrolView);
            confirmBtn = new CommonForm.CompleteButton()
            confirmBtn = new CommonForm.CompleteButton(1,2,3)
            {
                TextID = R.MyInternationalizationString.ConfirmAdd,
            };
@@ -449,9 +468,9 @@
                Shared.Phone.UserView.HomePage.Instance.AddChidren(localPic);
                Shared.Phone.UserView.HomePage.Instance.PageIndex += 1;
                localPic.Show();
                localPic.action = () =>
                localPic.action = (imgPath) =>
                {
                    backGround.UnSelectedImagePath = ImagePath;
                    backGround.UnSelectedImagePath = imgPath;
                    IconType = 0;
                };
@@ -685,10 +704,10 @@
                selectedTimerBtn.MouseUpEventHandler += (send, ee) =>
                {
                    selectFL.RemoveFromParent();
                    var delayTimeView = new CategorySceneSelectedDelayTime();
                    var delayTimeView = new SelectDelayTime();
                    UserView.HomePage.Instance.AddChidren(delayTimeView);
                    UserView.HomePage.Instance.PageIndex += 1;
                    delayTimeView.Show(-1,"",-1,true);
                    //delayTimeView.Show(-1,"",-1,true);
                };
                cancelBtn.MouseUpEventHandler += (send, ee) =>
                {