HDL Home App 第二版本 旧平台金堂用 正在使用
黄学彪
2019-10-10 2ed75b8b337048e5d75e6d9ec8307633134f02fd
ZigbeeApp/Shared/Phone/Device/Logic/DeviceTarget.cs
@@ -29,10 +29,11 @@
            var titleName = new Button {
                //Text = "添加执行目标",
                //TextID = MyInternationalizationString.addImplementationgoals,
                TextID = MyInternationalizationString.addaction,
                TextSize = 17,
                TextColor = ZigbeeColor.Current.LogicTextBlackColor,
                TextAlignment = TextAlignment.CenterLeft,
                X = Application.GetRealWidth(150),
            };
            topFrameLayout.AddChidren (titleName);
@@ -55,6 +56,7 @@
            middle.BackgroundColor = ZigbeeColor.Current.LogicBackgroundColor;
            this.AddChidren(middle);
            #region ----- 设备------
            var deviceRowLayout = new RowLayout
            {
                Height = Application.GetRealHeight(180),
@@ -98,7 +100,9 @@
             deviceRowLayout.MouseUpEventHandler += deviceclick;
             device.MouseUpEventHandler += deviceclick;
             btndeviceback.MouseUpEventHandler += deviceclick;
#endregion
            #region ----- 场景------
            var sceneRowLayout = new RowLayout {
                Height = Application.GetRealHeight (180),
                //BackgroundColor = 0xff323232,
@@ -143,16 +147,63 @@
             sceneRowLayout.MouseUpEventHandler += sceneclick;
             scene.MouseUpEventHandler += sceneclick;
             btnsceneback.MouseUpEventHandler += sceneclick;
#endregion
            #region ----- 安防模式------
            ///安防模式
            var securityRowLayout = new RowLayout
            {
                Height = Application.GetRealHeight(180),
                //BackgroundColor = 0xff323232,
                Y = sceneRowLayout.Bottom,
            };
            middle.AddChidren(securityRowLayout);
            var security = new Button
            {
                Width = Application.GetRealWidth(400),
                TextID = MyInternationalizationString.securitymode,
                //Text = "安防模式",
                TextSize = 16,
                TextAlignment = TextAlignment.CenterLeft,
                X = Application.GetRealWidth(40),
                TextColor = ZigbeeColor.Current.LogicTextBlackColor,
            };
            securityRowLayout.AddChidren(security);
            var btnsecurityback = new Button
            {
                Width = Application.GetRealWidth(110),
                Height = Application.GetRealHeight(110),
                UnSelectedImagePath = "ZigeeLogic/next.png",
                SelectedImagePath = "ZigeeLogic/NextSelecte.png",
                X = Application.GetRealWidth(1080 - 140),//550
                Gravity = Gravity.CenterVertical,
            };
            securityRowLayout.AddChidren(btnsecurityback);
            EventHandler<MouseEventArgs> securityclick = (sender, e) => {
                var securityMode = new SecurityMode();
                UserView.HomePage.Instance.AddChidren(securityMode);
                UserView.HomePage.Instance.PageIndex += 1;
                securityMode.Show();
            };
            securityRowLayout.MouseUpEventHandler += securityclick;
            security.MouseUpEventHandler += securityclick;
            btnsecurityback.MouseUpEventHandler += securityclick;
            #endregion
            #region ----- 已有自动化------
            ///已有自动化
            var existenceRowLayout = new RowLayout
            {
                Height = Application.GetRealHeight(180),
                //BackgroundColor = 0xff323232,
                Y = sceneRowLayout.Bottom,
                Y = securityRowLayout.Bottom,
            };
            middle.AddChidren(existenceRowLayout);
            //middle.AddChidren(existenceRowLayout);
            var existence = new Button
            {
@@ -187,59 +238,16 @@
            existenceRowLayout.MouseUpEventHandler += existenceclick;
            existence.MouseUpEventHandler += existenceclick;
            btnexistenceback.MouseUpEventHandler += existenceclick;
            #endregion
            ///安防模式
            var securityRowLayout = new RowLayout
            {
                Height = Application.GetRealHeight(180),
                //BackgroundColor = 0xff323232,
                Y = existenceRowLayout.Bottom,
            };
            middle.AddChidren(securityRowLayout);
            var security = new Button
            {
                Width = Application.GetRealWidth(400),
                TextID = MyInternationalizationString.securitymode,
                //Text = "安防模式",
                TextSize = 16,
                TextAlignment = TextAlignment.CenterLeft,
                X = Application.GetRealWidth(40),
                TextColor = ZigbeeColor.Current.LogicTextBlackColor,
            };
            securityRowLayout.AddChidren(security);
            var btnsecurityback = new Button
            {
                Width = Application.GetRealWidth(110),
                Height = Application.GetRealHeight(110),
                UnSelectedImagePath = "ZigeeLogic/next.png",
                SelectedImagePath = "ZigeeLogic/NextSelecte.png",
                X = Application.GetRealWidth(1080 - 140),//550
                Gravity = Gravity.CenterVertical,
            };
            securityRowLayout.AddChidren(btnsecurityback);
            EventHandler<MouseEventArgs>securityclick = (sender, e) => {
                var securityMode = new SecurityMode();
                UserView.HomePage.Instance.AddChidren(securityMode);
                UserView.HomePage.Instance.PageIndex += 1;
                securityMode.Show();
            };
            securityRowLayout.MouseUpEventHandler += securityclick;
            security.MouseUpEventHandler += securityclick;
            btnsecurityback.MouseUpEventHandler += securityclick;
            #region ----- 延时------
            var delayedRowLayout = new RowLayout
            {
                Height = Application.GetRealHeight(180),
                //BackgroundColor = 0xff323232,
                Y=securityRowLayout.Bottom,
            };
           middle.AddChidren(delayedRowLayout);
           //middle.AddChidren(delayedRowLayout);
            var delayed = new Button
            {
@@ -276,7 +284,7 @@
            delayedRowLayout.MouseUpEventHandler += delayedclick;
            delayed.MouseUpEventHandler += delayedclick;
            btndelayedback.MouseUpEventHandler += delayedclick;
#endregion
        }
        public static  void DelayTimeView(Dictionary<string, object> delayactionsInfo=null)