Beispiel #1
0
        /// <summary>
        /// AGV添加到地图的新方法
        /// </summary>
        /// <param name="agvname"></param>
        /// <param name="site"></param>
        /// <param name="rate"></param>
        public static void AddAgvToModuleNew(string agvname, int site = 23, int dessite = 0, float rate = 0)
        {
            AgvPoint p = AgvLineMaster.GetMPointOnLine(agvname, site, dessite, rate);

            if (p != null)
            {
                _agvModules.Add(new AgvModule(agvname, new Point(p.X, p.Y), site));
            }
        }
Beispiel #2
0
        /// <summary>
        /// 新更新AGV坐标方法方法
        /// </summary>
        /// <param name="name"></param>
        /// <param name="siteid"></param>
        /// <param name="rate"></param>
        /// <param name="dessite"></param>
        public static void UpdateAgvSiteNew(string name, int siteid, int dessite = 0, float rate = -1)
        {
            AgvModule agv = _agvModules.Find(c => { return(c._name.Equals(name)); });

            if (agv != null)
            {
                agvPoint = AgvLineMaster.GetMPointOnLine(name, siteid, dessite, rate);
                if (agvPoint != null)
                {
                    agv.Update(new Point(agvPoint.X, agvPoint.Y));
                }
            }
        }
Beispiel #3
0
        /// <summary>
        /// AGV添加到地图的新方法
        /// </summary>
        /// <param name="agvname"></param>
        /// <param name="site"></param>
        /// <param name="rate"></param>
        public static void AddAgvToModuleNew(bool isalive, string agvname, int site = 33, int dessite = 0, float rate = 0)
        {
            AgvPoint p = AgvLineMaster.GetMPointOnLine(agvname, site, dessite, rate);

            if (p != null)
            {
                AgvModule agvm = new AgvModule(agvname, new Point(p.X, p.Y), site);
                agvm.UpdateAgvStatus(isalive);
                agvm.PointSite = dessite;
                _agvModules.Add(agvm);
                FLog.Log("添加" + agvname + ",地标:" + site + ",地标:" + p.X + "," + p.Y);
            }
            else
            {
                FLog.Log("找不到地标对应地图位置:" + agvname + ",地标:" + site);
            }
        }
Beispiel #4
0
        private void PontDownBtn_Click(object sender, EventArgs e)
        {
            if (LinePointSelectedIndex == -1)
            {
                MessageBox.Show("请先选择点");
                return;
            }

            if (LinePointSelectedIndex + 1 >= AgvLineDatas[AgvLineSelectedIndex].Points.Count - 1)
            {
                return;
            }
            AgvPoint downP = AgvLineDatas[AgvLineSelectedIndex].Points[LinePointSelectedIndex + 1];

            AgvLineDatas[AgvLineSelectedIndex].Points[LinePointSelectedIndex + 1] = AgvLineDatas[AgvLineSelectedIndex].Points[LinePointSelectedIndex];
            AgvLineDatas[AgvLineSelectedIndex].Points[LinePointSelectedIndex]     = downP;

            LinePointListViewRefresh();
        }
Beispiel #5
0
        private void PointUpBtn_Click(object sender, EventArgs e)
        {
            if (LinePointSelectedIndex == -1)
            {
                MessageBox.Show("请先选择点");
                return;
            }

            if (LinePointSelectedIndex == 0)
            {
                return;
            }
            AgvPoint upP = AgvLineDatas[AgvLineSelectedIndex].Points[LinePointSelectedIndex - 1];

            AgvLineDatas[AgvLineSelectedIndex].Points[LinePointSelectedIndex - 1] = AgvLineDatas[AgvLineSelectedIndex].Points[LinePointSelectedIndex];
            AgvLineDatas[AgvLineSelectedIndex].Points[LinePointSelectedIndex]     = upP;

            LinePointListViewRefresh();
        }