| | |
| | | bodyView.BackgroundColor = CSS_Color.BackgroundColor; |
| | | new TopViewDiv(bodyView, Language.StringByID(StringId.CombinedDimming)).LoadTopView(); |
| | | |
| | | |
| | | |
| | | var contentView = new VerticalScrolViewLayout() |
| | | contentView = new VerticalScrolViewLayout() |
| | | { |
| | | Y = Application.GetRealHeight(64), |
| | | Height = Application.GetRealHeight(667 - 64), |
| | |
| | | /// </summary> |
| | | void LoadMethod_AllElection() |
| | | { |
| | | btnAllRoomText.MouseUpEventHandler += (sender, e) => |
| | | btnAllRoomText.MouseUpEventHandler = (sender, e) => |
| | | { |
| | | btnChooseAll.IsSelected = !btnChooseAll.IsSelected; |
| | | |
| | | for (int i = 0; i < contentView.ChildrenCount; i++) |
| | | try |
| | | { |
| | | var view = contentView.GetChildren(i); |
| | | if (view.GetType() == typeof(FrameLayout)) |
| | | btnChooseAll.IsSelected = !btnChooseAll.IsSelected; |
| | | |
| | | for (int i = 0; i < contentView.ChildrenCount; i++) |
| | | { |
| | | if (view.Tag != null && view.Tag.ToString() == "row") |
| | | var view = contentView.GetChildren(i); |
| | | if (view.GetType() == typeof(FrameLayout)) |
| | | { |
| | | for (int j = 0; j < (view as FrameLayout).ChildrenCount; j++) |
| | | if (view.Tag != null && view.Tag.ToString() == "row") |
| | | { |
| | | var btn = (view as FrameLayout).GetChildren(j); |
| | | if (btn.GetType() == typeof(Button)) |
| | | for (int j = 0; j < (view as FrameLayout).ChildrenCount; j++) |
| | | { |
| | | if (btn.Tag != null && btn.Tag.ToString() == "ChooseIcon") |
| | | var btn = (view as FrameLayout).GetChildren(j); |
| | | if (btn.GetType() == typeof(Button)) |
| | | { |
| | | (btn as Button).IsSelected = btnChooseAll.IsSelected; |
| | | if (btn.Tag != null && btn.Tag.ToString() == "ChooseIcon") |
| | | { |
| | | (btn as Button).IsSelected = btnChooseAll.IsSelected; |
| | | } |
| | | } |
| | | } |
| | | } |
| | | } |
| | | } |
| | | } |
| | | function.roomIds.Clear(); |
| | | if (btnChooseAll.IsSelected) |
| | | { |
| | | foreach (var room in Entity.SpatialInfo.CurrentSpatial.RoomList) |
| | | function.roomIds.Clear(); |
| | | if (btnChooseAll.IsSelected) |
| | | { |
| | | if (btnChooseAll.IsSelected) |
| | | foreach (var room in Entity.SpatialInfo.CurrentSpatial.RoomList) |
| | | { |
| | | function.roomIds.Add(room.roomId); |
| | | if (btnChooseAll.IsSelected) |
| | | { |
| | | function.roomIds.Add(room.roomId); |
| | | } |
| | | } |
| | | } |
| | | }catch(Exception ex) |
| | | { |
| | | MainPage.Log($"GroupChooseRoom 全选按钮事件 error : {ex.Message}"); |
| | | Application.RunOnMainThread(() => { |
| | | this.RemoveFromParent(); |
| | | }); |
| | | } |
| | | }; |
| | | } |