From 1f6f024bddf48dea1c17c54ade1535a10ef7b39b Mon Sep 17 00:00:00 2001 From: WJC <wjc@hdlchina.com.cn> Date: 星期一, 23 三月 2020 17:16:37 +0800 Subject: [PATCH] 2020-03-23-2 --- ZigbeeApp/Shared/Phone/Device/Logic/DoorLockLogic/LockLogicList.cs | 67 ++++++--------------------------- 1 files changed, 12 insertions(+), 55 deletions(-) diff --git a/ZigbeeApp/Shared/Phone/Device/Logic/DoorLockLogic/LockLogicList.cs b/ZigbeeApp/Shared/Phone/Device/Logic/DoorLockLogic/LockLogicList.cs index 103104f..bcc6ffa 100644 --- a/ZigbeeApp/Shared/Phone/Device/Logic/DoorLockLogic/LockLogicList.cs +++ b/ZigbeeApp/Shared/Phone/Device/Logic/DoorLockLogic/LockLogicList.cs @@ -10,61 +10,17 @@ public LockLogicList() { - Tag = "LockLogicList"; + Tag = "Logic"; } VerticalRefreshLayout middle; 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 = 17, - TextColor = ZigbeeColor.Current.LogicTextBlackColor, - TextAlignment = TextAlignment.CenterLeft, - X = Application.GetRealWidth(176), - Width = Application.GetRealWidth(600), - Height = Application.GetRealHeight(69), - Y = Application.GetRealHeight(92), - TextID = MyInternationalizationString.linkageevent, - IsBold = true, - }; - 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(); - }; + #region 涓婇潰鐨勫竷灞�浠g爜 + TopView view = new TopView(); + this.AddChidren(view.TopRowView()); + view.toptitleNameBtn.TextID = MyInternationalizationString.linkageevent; + view.clickBtn.MouseDownEventHandler += (sender, e) => { RemoveFromParent(); }; var addiocn = new Button { @@ -74,7 +30,7 @@ UnSelectedImagePath = "ZigeeLogic/lockadd.png", Y = Application.GetRealHeight(184 - 72 - 20), }; - topRowLayout.AddChidren(addiocn); + view.topRowLayout.AddChidren(addiocn); addiocn.MouseUpEventHandler += (sender, e) => { //new涓�涓柊閫昏緫瀵硅薄锛� @@ -83,16 +39,16 @@ Common.Logic.CurrentLogic.LogicType = 1; Common.Logic.CurrentLogic.Relationship = 1; Common.Logic.CurrentLogic.LogicName = Language.StringByID(MyInternationalizationString.automation1); + //Common.Logic.CurrentLogic.LogicCustomPushText = Common.Logic.CurrentLogic.LogicName + Language.StringByID(MyInternationalizationString.defaulttext); var lockLogicCommunalPage = new LockLogicCommunalPage(); UserView.HomePage.Instance.AddChidren(lockLogicCommunalPage); UserView.HomePage.Instance.PageIndex += 1; lockLogicCommunalPage.Show(() => { }); }; #endregion - middle = new VerticalRefreshLayout { - Y = topRowLayout.Bottom, + Y = view.topRowLayout.Bottom, Height = Application.GetRealHeight(1920 - 184), BackgroundColor = ZigbeeColor.Current.LogicMiddleBackgroundColor, }; @@ -200,6 +156,7 @@ Height = Application.GetRealHeight(190), LineColor = ZigbeeColor.Current.LogicMiddleBackgroundColor, BackgroundColor = ZigbeeColor.Current.LogicBackgroundColor, + SubViewWidth = Application.GetRealWidth(184),//鏀瑰彉缂栬緫鎺т欢瀹藉害澶氬皯锛� }; middle.AddChidren(logicRowlayout); @@ -220,8 +177,8 @@ var logicswitchBtn = new Button { - Width = Application.GetMinRealAverage(104), - Height = Application.GetMinRealAverage(63), + Width = Application.GetRealWidth(104), + Height = Application.GetRealHeight(63), UnSelectedImagePath = "ZigeeLogic/logicclose.png", SelectedImagePath = "ZigeeLogic/logicopen.png", X = logicRowlayout.Width - Application.GetRealWidth(104 + 58), -- Gitblit v1.8.0