From 171bf03f3664226eeff2b20ee9bd2e914b63a17d Mon Sep 17 00:00:00 2001 From: wxr <464027401@qq.com> Date: 星期五, 13 三月 2020 09:18:50 +0800 Subject: [PATCH] 20200313 --- HDL_ON/UI/UI2/FuntionControlView/Curtain/RollingShutterPage.cs | 117 +++++++++++++++++++++++++++++++++------------------------- 1 files changed, 66 insertions(+), 51 deletions(-) diff --git a/HDL_ON/UI/UI2/FuntionControlView/Curtain/MotorCurtainFragment.cs b/HDL_ON/UI/UI2/FuntionControlView/Curtain/RollingShutterPage.cs similarity index 63% rename from HDL_ON/UI/UI2/FuntionControlView/Curtain/MotorCurtainFragment.cs rename to HDL_ON/UI/UI2/FuntionControlView/Curtain/RollingShutterPage.cs index 0016069..2bf6de6 100644 --- a/HDL_ON/UI/UI2/FuntionControlView/Curtain/MotorCurtainFragment.cs +++ b/HDL_ON/UI/UI2/FuntionControlView/Curtain/RollingShutterPage.cs @@ -2,28 +2,62 @@ using HDL_ON.Entity; using HDL_ON.UI.CSS; using Shared; + namespace HDL_ON.UI { - public class MotorCurtainFragment : FrameLayout + public partial class RollingShutterPage : FrameLayout { #region 鎺т欢闆嗗悎 FrameLayout bodyView; + /// <summary> + /// 鍔熻兘鍚嶇О鎸夐挳 + /// </summary> + Button btnFunctionName; + /// <summary> + /// 鎴块棿妤煎眰淇℃伅鎸夐挳 + /// </summary> + Button btnFromFoorAndRoom; + /// <summary> + /// 鏀惰棌鎸夐挳 + /// </summary> + Button btnCollection; + /// <summary> + /// 绐楀笜鍏抽棴鎸夐挳 + /// </summary> + Button btnCurtainClose; + /// <summary> + /// 绐楀笜鍋滄鎸夐挳 + /// </summary> + Button btnCurtainStop; + /// <summary> + /// 绐楀笜鎵撳紑鎸夐挳 + /// </summary> + Button btnCurtainOpen; #endregion #region 鍖哄煙鍙橀噺 Function function; + Button btnCollection_Out; + Button btnFunctionName_Out; + Button btnFromFloor_Out; + /// <summary> + /// 鍒锋柊鏄剧ず淇℃伅 + /// </summary> + Action actionRefresh; #endregion - public MotorCurtainFragment(Function func) + public RollingShutterPage(Function func) { bodyView = this; function = func; } - public void LoadPage() + public void LoadPage(Button btnCollectionIcon, Button btnFunctionNameOut, Button btnFromFloorOut) { bodyView.BackgroundColor = CSS_Color.BackgroundColor; - new PublicAssmebly().LoadTopView(bodyView, Language.StringByID(StringId.Curtain),function); + btnCollection_Out = btnCollectionIcon; + btnFunctionName_Out = btnFunctionNameOut; + btnFromFloor_Out = btnFromFloorOut; FrameLayout controlView = new FrameLayout() @@ -36,7 +70,7 @@ }; bodyView.AddChidren(controlView); - Button btnFunctionName = new Button() + btnFunctionName = new Button() { X = Application.GetRealWidth(16), Y = Application.GetRealHeight(14), @@ -49,7 +83,7 @@ }; controlView.AddChidren(btnFunctionName); - Button btnFromFoorAndRoom = new Button() + btnFromFoorAndRoom = new Button() { X = Application.GetRealWidth(16), Y = btnFunctionName.Bottom, @@ -62,14 +96,15 @@ }; controlView.AddChidren(btnFromFoorAndRoom); - var btnCollection = new Button() + btnCollection = new Button() { - X = Application.GetRealWidth(287), - Y = Application.GetRealHeight(21), - Width = Application.GetMinRealAverage(24), - Height = Application.GetMinRealAverage(24), - UnSelectedImagePath = "Collection/CollectionIcon.png", - SelectedImagePath = "Collection/CollectionGrayIcon.png", + X = Application.GetRealWidth(273), + Y = Application.GetRealHeight(14), + Width = Application.GetMinRealAverage(40), + Height = Application.GetMinRealAverage(40), + SelectedImagePath = "Collection/CollectionIcon.png", + UnSelectedImagePath = "Collection/CollectionGrayIcon.png", + IsSelected = function.collection }; controlView.AddChidren(btnCollection); @@ -79,10 +114,8 @@ Y = Application.GetRealHeight(130), Width = Application.GetRealWidth(250), Height = Application.GetRealWidth(177), - }; controlView.AddChidren(curtainSeekBar); - var btnMinusSignIcon = new Button() { @@ -121,60 +154,42 @@ }; controlView.AddChidren(btnPlusSgnIcon); - - var btnCurtainClose = new Button() + btnCurtainClose = new Button() { - X = Application.GetRealWidth(84), - Y = Application.GetRealHeight(470), - Width = Application.GetMinRealAverage(32), - Height = Application.GetMinRealAverage(32), + X = Application.GetRealWidth(64), + Y = Application.GetRealHeight(462), + Width = Application.GetMinRealAverage(40), + Height = Application.GetMinRealAverage(40), UnSelectedImagePath = "FunctionIcon/Curtain/CurtainCloseIcon.png", SelectedImagePath = "FunctionIcon/Curtain/CurtainCloseOnIcon.png", }; controlView.AddChidren(btnCurtainClose); - btnCurtainClose.MouseDownEventHandler += (sender, e) => { - btnCurtainClose.IsSelected = true; - }; - btnCurtainClose.MouseUpEventHandler += (sender, e) => { - btnCurtainClose.IsSelected = false; - }; - - var btnCurtainStop = new Button() + btnCurtainStop = new Button() { - X = Application.GetRealWidth(148), - Y = Application.GetRealHeight(470), - Width = Application.GetMinRealAverage(32), - Height = Application.GetMinRealAverage(32), + X = Application.GetRealWidth(144), + Y = Application.GetRealHeight(462), + Width = Application.GetMinRealAverage(40), + Height = Application.GetMinRealAverage(40), UnSelectedImagePath = "FunctionIcon/Curtain/CurtainStopIcon.png", SelectedImagePath = "FunctionIcon/Curtain/CurtainStopOnIcon.png", }; controlView.AddChidren(btnCurtainStop); - btnCurtainStop.MouseDownEventHandler += (sender, e) => { - btnCurtainStop.IsSelected = true; - }; - btnCurtainStop.MouseUpEventHandler += (sender, e) => { - btnCurtainStop.IsSelected = false; - }; - var btnCurtainOpen = new Button() + btnCurtainOpen = new Button() { - X = Application.GetRealWidth(212), - Y = Application.GetRealHeight(470), - Width = Application.GetMinRealAverage(32), - Height = Application.GetMinRealAverage(32), + X = Application.GetRealWidth(224), + Y = Application.GetRealHeight(462), + Width = Application.GetMinRealAverage(40), + Height = Application.GetMinRealAverage(40), UnSelectedImagePath = "FunctionIcon/Curtain/CurtainOpenIcon.png", SelectedImagePath = "FunctionIcon/Curtain/CurtainOpenOnIcon.png", }; controlView.AddChidren(btnCurtainOpen); - btnCurtainOpen.MouseDownEventHandler += (sender, e) => { - btnCurtainOpen.IsSelected = true; - }; - btnCurtainOpen.MouseUpEventHandler += (sender, e) => { - btnCurtainOpen.IsSelected = false; - }; + LoadEventList(); + new TopViewDiv(bodyView, Language.StringByID(StringId.LocationManagement)).LoadTopView(function, actionRefresh); } } -} \ No newline at end of file +} -- Gitblit v1.8.0