From d6b4e510f1430d19bc48da6894cf707bbe3c226d Mon Sep 17 00:00:00 2001
From: gxc <guoxuecheng@guoxuechengdeMacBook-Pro.local>
Date: 星期二, 29 十月 2019 14:25:15 +0800
Subject: [PATCH] 2019.10.29-2

---
 ZigbeeApp/Shared/Phone/Device/Logic/DoorLockLogic/AddAction.cs |  207 +++++++++++++++++++++++++++++++++++++++++++++++++++
 1 files changed, 207 insertions(+), 0 deletions(-)

diff --git a/ZigbeeApp/Shared/Phone/Device/Logic/DoorLockLogic/AddAction.cs b/ZigbeeApp/Shared/Phone/Device/Logic/DoorLockLogic/AddAction.cs
new file mode 100755
index 0000000..139489c
--- /dev/null
+++ b/ZigbeeApp/Shared/Phone/Device/Logic/DoorLockLogic/AddAction.cs
@@ -0,0 +1,207 @@
+锘縰sing System;
+using Shared;
+using Shared.Common;
+using Shared.R;
+
+namespace Shared.Phone.Device.Logic.DoorLockLogic
+{
+    public class AddAction : FrameLayout
+    {
+
+        public AddAction()
+        {
+            Tag = "LockLogic";
+        }
+        public void Show()
+        {
+
+
+            #region  鏈�涓婇潰鐨勫竷灞�浠g爜
+            var topRowLayout = new RowLayout
+            {
+                BackgroundColor = ZigbeeColor.Current.LogicTopBackgroundColor,
+                Height = Application.GetRealHeight(184),
+                LineColor = ZigbeeColor.Current.LogicRowLayoutTopLineColor,
+            };
+            this.AddChidren(topRowLayout);
+
+            var titleName = new Button
+            {
+                TextSize = 16,
+                TextColor = ZigbeeColor.Current.LogicTextBlackColor,
+                TextAlignment = TextAlignment.CenterLeft,
+                X = Application.GetRealWidth(176),
+                Width = Application.GetRealWidth(400),
+                Height = Application.GetRealHeight(69),
+                Y = Application.GetRealHeight(92),
+                TextID = MyInternationalizationString.addaction,
+            };
+            topRowLayout.AddChidren(titleName);
+
+            var clickBtn = new Button
+            {
+                Width = Application.GetRealWidth(81 + 51),
+                Height = Application.GetRealHeight(58 + 40),
+                Y = Application.GetRealHeight(98 - 40),
+            };
+            topRowLayout.AddChidren(clickBtn);
+            clickBtn.MouseDownEventHandler += (sender, e) =>
+            {
+                RemoveFromParent();
+            };
+
+            var back = new Button
+            {
+                Width = Application.GetRealWidth(30),
+                Height = Application.GetRealHeight(51),
+                X = Application.GetRealWidth(81),
+                Y = Application.GetRealHeight(98),
+                //Gravity = Gravity.CenterVertical;
+                UnSelectedImagePath = "ZigeeLogic/back.png",
+            };
+            topRowLayout.AddChidren(back);
+            back.MouseDownEventHandler += (sender, e) => {
+                RemoveFromParent();
+            };
+            #endregion
+
+
+            var middle = new FrameLayout
+            {
+                Y = topRowLayout.Bottom,
+                Height = Application.GetRealHeight(1920 - 184),
+                BackgroundColor = ZigbeeColor.Current.LogicMiddleBackgroundColor,
+            };
+            this.AddChidren(middle);
+
+            #region ----- 璁惧------    
+            var deviceframelayout = new FrameLayout
+            {
+                Height = Application.GetRealHeight(160),
+                BackgroundColor = ZigbeeColor.Current.LogicBlankBackgroundColor,
+            };
+            middle.AddChidren(deviceframelayout);
+
+            var deviceiconBtn = new Button
+            {
+                Width = Application.GetRealWidth(81),
+                Height = Application.GetRealHeight(81),
+                X = Application.GetRealWidth(58),
+                Y = Application.GetRealHeight(55),
+                UnSelectedImagePath = "ZigeeLogic/function.png",
+
+            };
+            deviceframelayout.AddChidren(deviceiconBtn);
+
+            var devicerow = new RowLayout
+            {
+                Y = Application.GetRealHeight(30),
+                Width = Application.GetRealWidth(850),
+                Height = Application.GetRealHeight(130),
+                X = Application.GetRealWidth(176),
+                LineColor = ZigbeeColor.Current.LogicRowLayoutLineColor,
+            };
+            deviceframelayout.AddChidren(devicerow);
+
+
+            var btndevice = new Button
+            {
+                TextID = MyInternationalizationString.device,
+                TextAlignment = TextAlignment.CenterLeft,
+                TextColor = ZigbeeColor.Current.LogicTextBlackColor,
+            };
+            devicerow.AddChidren(btndevice);
+
+            var btndeviceback = new Button
+            {
+                Width = Application.GetRealWidth(58),
+                Height = Application.GetRealHeight(58),
+                X = Application.GetRealWidth(789),
+                Gravity = Gravity.CenterVertical,
+                UnSelectedImagePath = "ZigeeLogic/next.png",
+
+            };
+            devicerow.AddChidren(btndeviceback);
+
+            EventHandler<MouseEventArgs> devicestateclick = (sender, e) =>
+            {
+                var lockAddDevice = new LockAddDevice();
+                UserView.HomePage.Instance.AddChidren(lockAddDevice);
+                UserView.HomePage.Instance.PageIndex += 1;
+                lockAddDevice.Show();
+            };
+            deviceframelayout.MouseUpEventHandler += devicestateclick;
+            btndevice.MouseUpEventHandler += devicestateclick;
+            btndeviceback.MouseUpEventHandler += devicestateclick;
+            deviceiconBtn.MouseUpEventHandler += devicestateclick;
+            devicerow.MouseUpEventHandler += devicestateclick;
+            #endregion
+
+            #region ----- 鍦烘櫙------
+
+
+            var sceneframelayout = new FrameLayout
+            {
+                Height = Application.GetRealHeight(160),
+                BackgroundColor = ZigbeeColor.Current.LogicBlankBackgroundColor,
+                Y = deviceframelayout.Bottom,
+            };
+            middle.AddChidren(sceneframelayout);
+
+            var sceneiconBtn = new Button
+            {
+                Width = Application.GetRealWidth(81),
+                Height = Application.GetRealHeight(81),
+                X = Application.GetRealWidth(58),
+                Y = Application.GetRealHeight(55),
+                UnSelectedImagePath = "ZigeeLogic/scene.png",
+
+            };
+            sceneframelayout.AddChidren(sceneiconBtn);
+
+
+            var sceneRowLayout = new RowLayout
+            {
+                Y = Application.GetRealHeight(30),
+                Width = Application.GetRealWidth(850),
+                Height = Application.GetRealHeight(130),
+                X = Application.GetRealWidth(176),
+                LineColor = ZigbeeColor.Current.LogicRowLayoutLineColor,
+            };
+            sceneframelayout.AddChidren(sceneRowLayout);
+
+            var scene = new Button
+            {
+                TextID = MyInternationalizationString.scene,
+                TextAlignment = TextAlignment.CenterLeft,
+                TextColor = ZigbeeColor.Current.LogicTextBlackColor,
+            };
+            sceneRowLayout.AddChidren(scene);
+
+            var btnsceneback = new Button
+            {
+                Width = Application.GetRealWidth(58),
+                Height = Application.GetRealHeight(58),
+                X = Application.GetRealWidth(789),
+                Gravity = Gravity.CenterVertical,
+                UnSelectedImagePath = "ZigeeLogic/next.png",
+            };
+            sceneRowLayout.AddChidren(btnsceneback);
+
+            EventHandler<MouseEventArgs> sceneclick = (sender, e) =>
+            {
+                var lockAddScene = new LockAddScene();
+                UserView.HomePage.Instance.AddChidren(lockAddScene);
+                UserView.HomePage.Instance.PageIndex += 1;
+                lockAddScene.Show();
+            };
+            sceneRowLayout.MouseUpEventHandler += sceneclick;
+            scene.MouseUpEventHandler += sceneclick;
+            btnsceneback.MouseUpEventHandler += sceneclick;
+            sceneframelayout.MouseUpEventHandler += sceneclick;
+            sceneiconBtn.MouseUpEventHandler += sceneclick;
+            #endregion
+
+        }
+    }
+}

--
Gitblit v1.8.0