예제 #1
0
파일: MapInstrument.cs 프로젝트: GALAGV/ACS
        /// <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);
            }
        }