using System;
using System.Collections.Generic;
using Shared.Phone.Device.Category;
namespace Shared.Common
{
///
/// 在分类场景中使用,展示要加上房间的名称
///
[System.Serializable]
public class SceneRoomUI
{
///
/// 场景信息
///
public SceneUI sceneUI;
///
/// 房间
///
public Room room;
///
/// 所有的场景和房间信息
///
public static void GetAllSceneRoomUIList()
{
//选择场景--所有房间的所有场景
AllSceneRoomUIList.Clear();
List sceneIdList = new List { };
foreach (var r in Shared.Common.Room.Lists)
{
if (r.SceneUIList.Count == 0)
{
continue;
}
foreach (var scene in r.SceneUIList)
{
if (scene == null)
{
continue;
}
if(!sceneIdList.Contains(scene.Id))
{
var sceneRoomUI = new SceneRoomUI { sceneUI = scene, room = r };
sceneIdList.Add(scene.Id);
AllSceneRoomUIList.Add(sceneRoomUI);
}
}
}
}
///
/// 所有的场景和房间信息 -请先调用 GetAllSceneRoomUIList
///
[Newtonsoft.Json.JsonIgnore]
public static List AllSceneRoomUIList = new List { };
}
}