wxr
2020-06-15 b8e94316e41eba72d927d5ca7d931b26139ee8ff
HDL_ON/Entity/Room.cs
@@ -4,11 +4,28 @@
namespace HDL_ON.Entity
{
    /// <summary>
    /// 房间对象
    /// 房间命名规则 typeof (Room).Name + "_" + etNameBox.Text.Trim ();
    /// </summary>
    [System.Serializable]
    [Serializable]
    public class Floor
    {
        /// <summary>
        /// 楼层名称
        /// </summary>
        public string name = "1 F";
        /// <summary>
        /// 楼层ID
        /// </summary>
        public string sid;
    }
    /// <summary>
    /// 房间对象
    /// </summary>
    [Serializable]
    public class Room
    {
        /// <summary>
@@ -22,7 +39,7 @@
        /// <summary>
        /// 楼层索引
        /// </summary>
        public int floorIndex = -1;
        public string floorId = "";
        /// <summary>
        /// 房间背景
@@ -31,19 +48,22 @@
        /// <summary>
        /// 楼层
        /// </summary>
        public string floor {
        public string floor
        {
            get
            {
                string str = "";
                if (floorIndex != -1)
                if (DB_ResidenceData.residenceData.floors.Count > 0)
                {
                    if (floorIndex < DB_ResidenceData.residenceData.floors.Count)
                        str = DB_ResidenceData.residenceData.floors[floorIndex];
                    var f = DB_ResidenceData.residenceData.floors.Find((obj) => obj.sid == floorId);
                    if (f != null)
                    {
                        return f.name;
                    }
                }
                return str;
                return "";
            }
        }
        /// <summary>
        /// 房间功能列表
@@ -64,4 +84,4 @@
            functions = funcList;
        }
    }
}
}