黄学彪
2020-04-08 4dce704aaf8587cf3f91cf88f2208315a03c4cbb
ZigbeeApp/Shared/Phone/Category/CategoryMainForm.cs
@@ -107,12 +107,18 @@
                if (UserCenterResourse.ResidenceOption.CategoryPageSwitchIndex == 0)
                {
                    //添加场景
                    Add_Scene();
                    var form = new AddOrEditorSceneForm();
                    form.AddForm(new object[] { null });
                    form.SceneChangedEvent += (scene, roomId) =>
                    {
                        //刷新bodyView
                        this.RefreshBodyView();
                    };
                }
                else if (UserCenterResourse.ResidenceOption.CategoryPageSwitchIndex == 2)
                {
                    //添加自动化
                    Add_Automation();
                    Device.Logic.SkipView.SkipAddLogic(0);
                }
            };
        }
@@ -897,30 +903,6 @@
                timeStr += sec + secondText;
            }
            return timeStr;
        }
        /// <summary>
        /// 添加场景(郭雪城的代码)
        /// </summary>
        private void Add_Scene()
        {
            var scene = new Device.Category.CategoryAddScene();
            UserView.HomePage.Instance.AddChidren(scene);
            UserView.HomePage.Instance.PageIndex += 1;
            scene.Show();
            scene.AddAction = () =>
            {
                //刷新bodyView
                this.RefreshBodyView();
            };
        }
        /// <summary>
        /// 添加自动化(郭雪城的代码)
        /// </summary>
        private void Add_Automation()
        {
            Shared.Phone.Device.Logic.SkipView.SkipAddLogic(0);
        }
        #endregion