| | |
| | | public class SmartSpeakerRoomListPage : FrameLayout |
| | | { |
| | | /// <summary> |
| | | /// |
| | | /// bodyView |
| | | /// </summary> |
| | | FrameLayout bodyView; |
| | | |
| | | /// <summary> |
| | | /// 当前 |
| | | /// 当前主滑动View |
| | | /// </summary> |
| | | VerticalScrolViewLayout bodyScrolView; |
| | | /// <summary> |
| | |
| | | SpeakerInfo speakerInfo; |
| | | |
| | | /// <summary> |
| | | /// |
| | | /// 房间列表和无区域功能页面 |
| | | /// </summary> |
| | | /// <param name="speakerInfo">音箱参数</param> |
| | | public SmartSpeakerRoomListPage(SpeakerInfo speakerInfo) |
| | | { |
| | | bodyView = this; |
| | |
| | | } |
| | | |
| | | /// <summary> |
| | | /// |
| | | /// 加载视图 |
| | | /// </summary> |
| | | public void LoadPage() |
| | | { |
| | |
| | | }; |
| | | bodyView.AddChidren(bodyScrolView); |
| | | |
| | | |
| | | //LoadSmartSpeakertListView(bodyScrolView); |
| | | //加载房间列表 |
| | | ShowRoomListView(); |
| | | } |
| | | |
| | | /// <summary> |
| | | /// 加载房间列表,统计分享的数据 |
| | | /// 加载房间列表 |
| | | /// </summary> |
| | | void ShowRoomListView() |
| | | { |
| | |
| | | var titleView = new FrameLayout() |
| | | { |
| | | BackgroundColor = CSS_Color.MainBackgroundColor, |
| | | Height = Application.GetRealWidth(44), |
| | | Height = Application.GetRealWidth(53), |
| | | }; |
| | | bodyScrolView.AddChidren(titleView); |
| | | |
| | | var btnTitle = new Button() |
| | | //箭头图标 |
| | | var btnResidenceDownIcon = new Button() |
| | | { |
| | | X = Application.GetRealWidth(16), |
| | | Width = Application.GetMinRealAverage(16), |
| | | Height = Application.GetMinRealAverage(16), |
| | | X = Application.GetRealWidth(12), |
| | | Gravity = Gravity.CenterVertical, |
| | | UnSelectedImagePath = "Public/DownIcon.png", |
| | | }; |
| | | titleView.AddChidren(btnResidenceDownIcon); |
| | | //住宅标题 |
| | | var btnHomeTitle = new Button() |
| | | { |
| | | X = btnResidenceDownIcon.Right + Application.GetRealWidth(1), |
| | | TextAlignment = TextAlignment.CenterLeft, |
| | | TextColor = CSS_Color.FirstLevelTitleColor, |
| | | TextSize = CSS_FontSize.SubheadingFontSize, |
| | | TextID = StringId.UseArea, |
| | | TextSize = CSS_FontSize.PromptFontSize_FirstLevel, |
| | | Text = DB_ResidenceData.Instance.CurrentRegion.Name, |
| | | }; |
| | | titleView.AddChidren(btnTitle); |
| | | titleView.AddChidren(btnHomeTitle); |
| | | |
| | | var btnLine = new Button() |
| | | { |
| | | X = Application.GetRealWidth(16), |
| | | Y = titleView.Height - Application.GetRealHeight(2), |
| | | Width = Application.GetRealWidth(360), |
| | | Height = Application.GetRealHeight(1), |
| | | BackgroundColor = CSS_Color.DividingLineColor, |
| | | }; |
| | | titleView.AddChidren(btnLine); |
| | | //var btnLine = new Button() |
| | | //{ |
| | | // X = Application.GetRealWidth(16), |
| | | // Y = titleView.Height - Application.GetRealHeight(2), |
| | | // Width = Application.GetRealWidth(360), |
| | | // Height = Application.GetRealHeight(1), |
| | | // BackgroundColor = CSS_Color.DividingLineColor, |
| | | //}; |
| | | //titleView.AddChidren(btnLine); |
| | | |
| | | //--------------------------------------------- |
| | | //未分配区域的功能 |
| | |
| | | foreach (var function in allFunctionList) |
| | | { |
| | | function.roomIds.Remove(null); |
| | | if (function.roomIds.Count > 0) |
| | | { |
| | | //allocatedList.Add(function); |
| | | } |
| | | else |
| | | if (function.roomIds.Count == 0) |
| | | { |
| | | unallocatedList.Add(function); |
| | | } |
| | |
| | | |
| | | //roomIds大于0 代表分配到房间 |
| | | mScene.roomIds.Remove(null); |
| | | if (mScene.roomIds.Count > 0) |
| | | { |
| | | //allocatedList.Add(function); |
| | | } |
| | | else |
| | | if (mScene.roomIds.Count == 0) |
| | | { |
| | | globalSceneList.Add(mScene); |
| | | } |
| | |
| | | |
| | | try |
| | | { |
| | | //遍历加载房间分享个数统计状态RowLayout |
| | | //房间列表 |
| | | foreach (var room in SpatialInfo.CurrentSpatial.RoomList) |
| | | { |
| | | AddRoomFunctionRowLayout(room); |