From 7167334c0e89dd84827d59e726123d14776e3a09 Mon Sep 17 00:00:00 2001 From: 陈嘉乐 <cjl@hdlchina.com.cn> Date: 星期二, 16 六月 2020 11:14:13 +0800 Subject: [PATCH] 2020-06-16-1 --- HDL_ON/UI/UI2/FuntionControlView/ChooseRoomPage.cs | 41 ++++++++++++++++++++++++++++++++++++----- 1 files changed, 36 insertions(+), 5 deletions(-) diff --git a/HDL_ON/UI/UI2/FuntionControlView/ChooseRoomPage.cs b/HDL_ON/UI/UI2/FuntionControlView/ChooseRoomPage.cs index b723f7a..b1b2340 100644 --- a/HDL_ON/UI/UI2/FuntionControlView/ChooseRoomPage.cs +++ b/HDL_ON/UI/UI2/FuntionControlView/ChooseRoomPage.cs @@ -5,7 +5,10 @@ namespace HDL_ON.UI { - public class ChooseRoomPage : FrameLayout + /// <summary> + /// 鍔熻兘鍒嗛厤鎴块棿鐣岄潰 + /// </summary> + public partial class ChooseRoomPage : FrameLayout { #region 鎺т欢鍒楄〃 FrameLayout bodyView; @@ -13,21 +16,34 @@ /// 鍐呭鍔犺浇鍖哄煙 /// </summary> VerticalScrolViewLayout contentView; + + Button btnChooseAll; + #endregion #region 灞�閮ㄥ彉閲� + + Function function; + /// <summary> + /// 鍥炶皟浜嬩欢 + /// </summary> + Action backAction; #endregion - public ChooseRoomPage() + public ChooseRoomPage(Function func,Action action) { bodyView = this; + function = func; + backAction = action; } - + /// <summary> + /// 鍔犺浇椤甸潰 + /// </summary> public void LoadPage() { bodyView.BackgroundColor = CSS_Color.BackgroundColor; - new PublicAssmebly().LoadTopView(bodyView, Language.StringByID(StringId.LocationManagement)); + new TopViewDiv(bodyView, Language.StringByID(StringId.LocationManagement)).LoadTopView(backAction); contentView = new VerticalScrolViewLayout() { @@ -54,7 +70,7 @@ }; allRoomView.AddChidren(btnAllRoomText); - Button btnChooseAll = new Button() + btnChooseAll = new Button() { X = Application.GetRealWidth(331), Gravity = Gravity.CenterVertical, @@ -62,6 +78,7 @@ Height = Application.GetMinRealAverage(28), UnSelectedImagePath = "Public/ChooseIcon.png", SelectedImagePath = "Public/ChooseOnIcon.png", + IsSelected = true }; allRoomView.AddChidren(btnChooseAll); @@ -71,6 +88,7 @@ { Height = Application.GetRealHeight(50), BackgroundColor = CSS_Color.MainBackgroundColor, + Tag = "row" }; contentView.AddChidren(roomView); @@ -102,10 +120,23 @@ Height = Application.GetMinRealAverage(28), UnSelectedImagePath = "Public/ChooseIcon.png", SelectedImagePath = "Public/ChooseOnIcon.png", + IsSelected = function.roomIdList.Contains(room.sid), + Tag = "ChooseIcon" }; roomView.AddChidren(btnChoose); + btnChoose.MouseUpEventHandler = (sender, e) => { + btnChoose.IsSelected = !btnChoose.IsSelected; + LoadEvent_RoomSelected(room, btnChoose.IsSelected); + }; + + if (!function.roomIdList.Contains(room.sid) && btnChooseAll.IsSelected) + { + btnChooseAll.IsSelected = false; + } } + + LoadEventLoad(); } } } \ No newline at end of file -- Gitblit v1.8.0