using System;
using System.Collections.Generic;
namespace HDL_ON.Entity
{
///
/// 房间对象
/// 房间命名规则 typeof (Room).Name + "_" + etNameBox.Text.Trim ();
///
[System.Serializable]
public class Room
{
///
/// 房间名
///
public string name = "Room";
///
/// 房间ID
///
public string sid;
///
/// 楼层索引
///
public int floorIndex = -1;
///
/// 房间背景
///
public string backgroundImage = "Classification/Room/Roombg.png";
///
/// 楼层
///
public string floor {
get
{
string str = "";
if (floorIndex != -1)
{
if (floorIndex < DB_ResidenceData.residenceData.floors.Count)
str = DB_ResidenceData.residenceData.floors[floorIndex];
}
return str;
}
}
///
/// 房间功能列表
///
[Newtonsoft.Json.JsonIgnore]
public List functions = new List();
public void RefreshFunctions()
{
List funcList = new List();
foreach (var f in DB_ResidenceData.residenceData.functionList.functions)
{
if (f.roomIdList.Contains(sid) && sid != null)
{
funcList.Add(f);
}
}
functions = funcList;
}
}
}