Ejemplo n.º 1
0
        /// <summary>
        /// 加载所有Tag
        /// </summary>
        /// <param name="painti"></param>
        public void LoadTag(long Times, bool Tagevent)
        {
            string    Key  = $"Tag_{Times}";
            DataTable Data = CachePlant.GetResult(Key, () =>
            {
                return(IO_AGVMapService.RataTable(Times.ToString()));
            });

            foreach (DataRow item in Data.Rows)
            {
                int id = Convert.ToInt32(item["TagName"].ToString());
                TagCreate(new Point()
                {
                    X = (Convert.ToDouble(item["X"].ToString()) * 10) - 19, Y = (Convert.ToDouble(item["Y"].ToString()) * 10) - 11.5
                }, Convert.ToInt32(item["TagName"].ToString()), true, Tagevent);
            }
        }