From d569f44a62fa915d4f01a80c21e617f676b6c5ea Mon Sep 17 00:00:00 2001 From: gxc <guoxuecheng@guoxuechengdeMacBook-Pro.local> Date: 星期五, 18 十月 2019 10:12:10 +0800 Subject: [PATCH] 2019.10.18 --- ZigbeeApp/Shared/Phone/Device/Logic/DeviceTarget.cs | 122 +++++++++++++++++++--------------------- 1 files changed, 58 insertions(+), 64 deletions(-) diff --git a/ZigbeeApp/Shared/Phone/Device/Logic/DeviceTarget.cs b/ZigbeeApp/Shared/Phone/Device/Logic/DeviceTarget.cs old mode 100644 new mode 100755 index c5377a2..d40a92b --- a/ZigbeeApp/Shared/Phone/Device/Logic/DeviceTarget.cs +++ b/ZigbeeApp/Shared/Phone/Device/Logic/DeviceTarget.cs @@ -11,13 +11,13 @@ public class DeviceTarget : FrameLayout { - public DeviceTarget() + public DeviceTarget () { Tag = "Logic"; } - public void Show() + public void Show () { - + this.BackgroundColor = ZigbeeColor.Current.LogicTopViewBackgroundColor; var topFrameLayout = new FrameLayout @@ -28,30 +28,29 @@ AddChidren(topFrameLayout); - var titleName = new Button - { - //Text = "娣诲姞鎵ц鐩爣", - TextID = MyInternationalizationString.addImplementationgoals, + var titleName = new Button { + TextID = MyInternationalizationString.addaction, TextSize = 17, TextColor = ZigbeeColor.Current.LogicTextBlackColor, + TextAlignment = TextAlignment.CenterLeft, + X = Application.GetRealWidth(150), }; - topFrameLayout.AddChidren(titleName); + topFrameLayout.AddChidren (titleName); - var back = new Button - { - Width = Application.GetRealWidth(110), - Height = Application.GetRealHeight(110), - X = Application.GetRealWidth(20), + var back = new Button { + Width = Application.GetRealWidth (110), + Height = Application.GetRealHeight (110), + X = Application.GetRealWidth (20), Gravity = Gravity.CenterVertical, UnSelectedImagePath = "ZigeeLogic/Back.png", }; - topFrameLayout.AddChidren(back); + topFrameLayout.AddChidren (back); back.MouseDownEventHandler += (sender, e) => { - RemoveFromParent(); + RemoveFromParent (); }; - - var middle = new VerticalScrolViewLayout(); + + var middle = new VerticalScrolViewLayout (); middle.Y = topFrameLayout.Bottom; middle.Height = Application.GetRealHeight(1920 - 220); middle.BackgroundColor = ZigbeeColor.Current.LogicBackgroundColor; @@ -63,30 +62,28 @@ Height = Application.GetRealHeight(180), //BackgroundColor = 0xff323232, }; - middle.AddChidren(deviceRowLayout); + middle.AddChidren (deviceRowLayout); - var device = new Button - { - Width = Application.GetRealWidth(400), + var device = new Button { + Width = Application.GetRealWidth (400), TextID = MyInternationalizationString.device, //Text = "璁惧", TextSize = 16, TextAlignment = TextAlignment.CenterLeft, - X = Application.GetRealWidth(40), + X = Application.GetRealWidth (40), TextColor = ZigbeeColor.Current.LogicTextBlackColor, }; - deviceRowLayout.AddChidren(device); + deviceRowLayout.AddChidren (device); - var btndeviceback = new Button - { - Width = Application.GetRealWidth(110), - Height = Application.GetRealHeight(110), + var btndeviceback = new Button { + Width = Application.GetRealWidth (110), + Height = Application.GetRealHeight (110), UnSelectedImagePath = "ZigeeLogic/next.png", SelectedImagePath = "ZigeeLogic/NextSelecte.png", - X = Application.GetRealWidth(1080 - 140),//550 + X = Application.GetRealWidth (1080-140),//550 Gravity = Gravity.CenterVertical, }; - deviceRowLayout.AddChidren(btndeviceback); + deviceRowLayout.AddChidren (btndeviceback); EventHandler<MouseEventArgs> deviceclick = (sender, e) => { Common.Logic.LogicDviceList.Clear(); @@ -100,60 +97,57 @@ logicDevicePage.Show(); }; - deviceRowLayout.MouseUpEventHandler += deviceclick; - device.MouseUpEventHandler += deviceclick; - btndeviceback.MouseUpEventHandler += deviceclick; - #endregion + deviceRowLayout.MouseUpEventHandler += deviceclick; + device.MouseUpEventHandler += deviceclick; + btndeviceback.MouseUpEventHandler += deviceclick; +#endregion #region ----- 鍦烘櫙------ - var sceneRowLayout = new RowLayout - { - Height = Application.GetRealHeight(180), + var sceneRowLayout = new RowLayout { + Height = Application.GetRealHeight (180), //BackgroundColor = 0xff323232, - Y = deviceRowLayout.Bottom, + Y=deviceRowLayout.Bottom, }; - middle.AddChidren(sceneRowLayout); + middle.AddChidren (sceneRowLayout); - var scene = new Button - { - Width = Application.GetRealWidth(400), + var scene = new Button { + Width = Application.GetRealWidth (400), TextID = MyInternationalizationString.scene, //Text = "鍦烘櫙", TextSize = 16, TextAlignment = TextAlignment.CenterLeft, - X = Application.GetRealWidth(40), + X = Application.GetRealWidth (40), TextColor = ZigbeeColor.Current.LogicTextBlackColor, }; - sceneRowLayout.AddChidren(scene); + sceneRowLayout.AddChidren (scene); - var btnsceneback = new Button - { - Width = Application.GetRealWidth(110), - Height = Application.GetRealHeight(110), + var btnsceneback = new Button { + Width = Application.GetRealWidth (110), + Height = Application.GetRealHeight (110), UnSelectedImagePath = "ZigeeLogic/next.png", SelectedImagePath = "ZigeeLogic/NextSelecte.png", - X = Application.GetRealWidth(1080 - 140),//550 + X = Application.GetRealWidth (1080-140),//550 Gravity = Gravity.CenterVertical, }; - sceneRowLayout.AddChidren(btnsceneback); + sceneRowLayout.AddChidren (btnsceneback); EventHandler<MouseEventArgs> sceneclick = (sender, e) => { - CommonPage.Loading.Start(); - System.Threading.Tasks.Task.Run(() => { - Application.RunOnMainThread(() => { - CommonPage.Loading.Hide(); - var addScenePage = new AddScenePage(); - UserView.HomePage.Instance.AddChidren(addScenePage); + CommonPage.Loading.Start (); + System.Threading.Tasks.Task.Run (() => { + Application.RunOnMainThread (() => { + CommonPage.Loading.Hide (); + var addScenePage = new AddScenePage (); + UserView.HomePage.Instance.AddChidren (addScenePage); UserView.HomePage.Instance.PageIndex += 1; - addScenePage.Show(); + addScenePage.Show (); }); }); }; - sceneRowLayout.MouseUpEventHandler += sceneclick; - scene.MouseUpEventHandler += sceneclick; - btnsceneback.MouseUpEventHandler += sceneclick; - #endregion + sceneRowLayout.MouseUpEventHandler += sceneclick; + scene.MouseUpEventHandler += sceneclick; + btnsceneback.MouseUpEventHandler += sceneclick; +#endregion #region ----- 瀹夐槻妯″紡------ ///瀹夐槻妯″紡 @@ -251,9 +245,9 @@ { Height = Application.GetRealHeight(180), //BackgroundColor = 0xff323232, - Y = securityRowLayout.Bottom, + Y=securityRowLayout.Bottom, }; - //middle.AddChidren(delayedRowLayout); + //middle.AddChidren(delayedRowLayout); var delayed = new Button { @@ -290,10 +284,10 @@ delayedRowLayout.MouseUpEventHandler += delayedclick; delayed.MouseUpEventHandler += delayedclick; btndelayedback.MouseUpEventHandler += delayedclick; - #endregion +#endregion } - public static void DelayTimeView(Dictionary<string, object> delayactionsInfo = null) + public static void DelayTimeView(Dictionary<string, object> delayactionsInfo=null) { var listValues = new List<string>(); for (int i = 0; i < 60; i++) -- Gitblit v1.8.0