示例#1
0
        public void LoadAll()
        {
            var Started = DateTime.Now;
            var mData   = Engine.dbManager.ReadTable("SELECT * FROM system_modeldata");

            foreach (DataRow Data in mData.Rows)
            {
                var Model = new RoomModel((string)Data["name"],
                                          (int)Data["door_x"],
                                          (int)Data["door_y"],
                                          (Double)Data["door_z"],
                                          (int)Data["door_direction"],
                                          (string)Data["modeldata"],
                                          "", false);

                Models.Add(Model.Name, Model);
            }

            var Expire = (DateTime.Now - Started);

            Engine.Logging.WriteTagLine("Cache", "Loaded {0} Room Models in {1} s and {2} ms", Models.Count, Expire.Seconds, Expire.Milliseconds);
        }
示例#2
0
        public void LoadAll()
        {
            var Started = DateTime.Now;
            var mData = Engine.dbManager.ReadTable("SELECT * FROM system_modeldata");

            foreach (DataRow Data in mData.Rows)
            {
                var Model = new RoomModel((string)Data["name"],
              (int)Data["door_x"],
              (int)Data["door_y"],
              (Double)Data["door_z"],
              (int)Data["door_direction"],
              (string)Data["modeldata"],
              "", false);

                Models.Add(Model.Name, Model);
            }

            var Expire = (DateTime.Now - Started);
            Engine.Logging.WriteTagLine("Cache", "Loaded {0} Room Models in {1} s and {2} ms", Models.Count, Expire.Seconds, Expire.Milliseconds);
        }