Ejemplo n.º 1
0
        /// <summary>
        /// 加载所有地图数据
        /// </summary>
        /// <returns></returns>
        public ObservableCollection <Ga_Map> GetMapRegulate()
        {
            ObservableCollection <Ga_Map> ga_s = new ObservableCollection <Ga_Map>();
            MySqlDataReader mySql = IO_AGVMapService.MapArray();

            while (mySql.Read())
            {
                ga_s.Add(new Ga_Map()
                {
                    Name       = mySql["Name"].ToString(),
                    Width      = Convert.ToDouble(mySql["Width"].ToString()),
                    Height     = Convert.ToDouble(mySql["Height"].ToString()),
                    ID         = Convert.ToInt32(mySql["ID"].ToString()),
                    CreateTime = UTC.ConvertLongDateTime(long.Parse(mySql["CreateTime"].ToString())).ToString("yyyy-MM-dd HH:mm:ss")
                });
            }
            mySql.Close();
            return(ga_s);
        }