HDL Home App 第二版本 旧平台金堂用 正在使用
黄学彪
2019-09-30 404cdc88627f942df7944af04ee05b9d527752d6
ZigbeeApp/Shared/Phone/Device/Logic/DeviceTarget.cs
old mode 100644 new mode 100755
@@ -28,17 +28,15 @@
            AddChidren(topFrameLayout);
            var titleName = new Button
            {
            var titleName = new Button {
                //Text = "添加执行目标",
                TextID = MyInternationalizationString.addImplementationgoals,
                //TextID = MyInternationalizationString.addImplementationgoals,
                TextSize = 17,
                TextColor = ZigbeeColor.Current.LogicTextBlackColor,
            };
            topFrameLayout.AddChidren(titleName);
            var back = new Button
            {
            var back = new Button {
                Width = Application.GetRealWidth(110),
                Height = Application.GetRealHeight(110),
                X = Application.GetRealWidth(20),
@@ -57,7 +55,6 @@
            middle.BackgroundColor = ZigbeeColor.Current.LogicBackgroundColor;
            this.AddChidren(middle);
            #region ----- 设备------
            var deviceRowLayout = new RowLayout
            {
                Height = Application.GetRealHeight(180),
@@ -65,8 +62,7 @@
            };
            middle.AddChidren(deviceRowLayout);
            var device = new Button
            {
            var device = new Button {
                Width = Application.GetRealWidth(400),
                TextID = MyInternationalizationString.device,
                //Text = "设备",
@@ -77,8 +73,7 @@
            };
            deviceRowLayout.AddChidren(device);
            var btndeviceback = new Button
            {
            var btndeviceback = new Button {
                Width = Application.GetRealWidth(110),
                Height = Application.GetRealHeight(110),
                UnSelectedImagePath = "ZigeeLogic/next.png",
@@ -103,19 +98,15 @@
            deviceRowLayout.MouseUpEventHandler += deviceclick;
            device.MouseUpEventHandler += deviceclick;
            btndeviceback.MouseUpEventHandler += deviceclick;
            #endregion
            #region ----- 场景------
            var sceneRowLayout = new RowLayout
            {
            var sceneRowLayout = new RowLayout {
                Height = Application.GetRealHeight(180),
                //BackgroundColor = 0xff323232,
                Y = deviceRowLayout.Bottom,
            };
            middle.AddChidren(sceneRowLayout);
            var scene = new Button
            {
            var scene = new Button {
                Width = Application.GetRealWidth(400),
                TextID = MyInternationalizationString.scene,
                //Text = "场景",
@@ -126,8 +117,7 @@
            };
            sceneRowLayout.AddChidren(scene);
            var btnsceneback = new Button
            {
            var btnsceneback = new Button {
                Width = Application.GetRealWidth(110),
                Height = Application.GetRealHeight(110),
                UnSelectedImagePath = "ZigeeLogic/next.png",
@@ -153,15 +143,57 @@
            sceneRowLayout.MouseUpEventHandler += sceneclick;
            scene.MouseUpEventHandler += sceneclick;
            btnsceneback.MouseUpEventHandler += sceneclick;
            #endregion
            #region ----- 安防模式------
            ///已有自动化
            var existenceRowLayout = new RowLayout
            {
                Height = Application.GetRealHeight(180),
                //BackgroundColor = 0xff323232,
                Y = sceneRowLayout.Bottom,
            };
            middle.AddChidren(existenceRowLayout);
            var existence = new Button
            {
                Width = Application.GetRealWidth(400),
                TextID = MyInternationalizationString.Alreadyautomated,
                //Text = "已有自动化",
                TextSize = 16,
                TextAlignment = TextAlignment.CenterLeft,
                X = Application.GetRealWidth(40),
                TextColor = ZigbeeColor.Current.LogicTextBlackColor,
            };
            existenceRowLayout.AddChidren(existence);
            var btnexistenceback = 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,
            };
            existenceRowLayout.AddChidren(btnexistenceback);
            EventHandler<MouseEventArgs> existenceclick = (sender, e) => {
                var logicListPage = new LogicListPage();
                UserView.HomePage.Instance.AddChidren(logicListPage);
                UserView.HomePage.Instance.PageIndex += 1;
                logicListPage.Show();
            };
            existenceRowLayout.MouseUpEventHandler += existenceclick;
            existence.MouseUpEventHandler += existenceclick;
            btnexistenceback.MouseUpEventHandler += existenceclick;
            ///安防模式
            var securityRowLayout = new RowLayout
            {
                Height = Application.GetRealHeight(180),
                //BackgroundColor = 0xff323232,
                Y = sceneRowLayout.Bottom,
                Y = existenceRowLayout.Bottom,
            };
            middle.AddChidren(securityRowLayout);
@@ -198,62 +230,16 @@
            securityRowLayout.MouseUpEventHandler += securityclick;
            security.MouseUpEventHandler += securityclick;
            btnsecurityback.MouseUpEventHandler += securityclick;
            #endregion
            #region ----- 已有自动化------
            ///已有自动化
            var existenceRowLayout = new RowLayout
            {
                Height = Application.GetRealHeight(180),
                //BackgroundColor = 0xff323232,
                Y = securityRowLayout.Bottom,
            };
            //middle.AddChidren(existenceRowLayout);
            var existence = new Button
            {
                Width = Application.GetRealWidth(400),
                TextID = MyInternationalizationString.Alreadyautomated,
                //Text = "已有自动化",
                TextSize = 16,
                TextAlignment = TextAlignment.CenterLeft,
                X = Application.GetRealWidth(40),
                TextColor = ZigbeeColor.Current.LogicTextBlackColor,
            };
            existenceRowLayout.AddChidren(existence);
            var btnexistenceback = 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,
            };
            existenceRowLayout.AddChidren(btnexistenceback);
            EventHandler<MouseEventArgs> existenceclick = (sender, e) => {
                var logicListPage = new LogicListPage();
                UserView.HomePage.Instance.AddChidren(logicListPage);
                UserView.HomePage.Instance.PageIndex += 1;
                logicListPage.Show();
            };
            existenceRowLayout.MouseUpEventHandler += existenceclick;
            existence.MouseUpEventHandler += existenceclick;
            btnexistenceback.MouseUpEventHandler += existenceclick;
            #endregion
            #region ----- 延时------
            var delayedRowLayout = new RowLayout
            {
                Height = Application.GetRealHeight(180),
                //BackgroundColor = 0xff323232,
                Y = securityRowLayout.Bottom,
            };
            //middle.AddChidren(delayedRowLayout);
           middle.AddChidren(delayedRowLayout);
            var delayed = new Button
            {
@@ -290,7 +276,7 @@
            delayedRowLayout.MouseUpEventHandler += delayedclick;
            delayed.MouseUpEventHandler += delayedclick;
            btndelayedback.MouseUpEventHandler += delayedclick;
            #endregion
        }
        public static void DelayTimeView(Dictionary<string, object> delayactionsInfo = null)