コード例 #1
0
        public void SetGoPiont(string GoPoint)
        {
            string BeginP = "";
            string EndP   = "";
            string ReBack = "";

            BeginP = GetValue(LocalPoint).Replace("_", "");
            if (LocalPoint.Trim() == "")
            {
                MessageBox.Show("无当前坐标!");
                return;
            }
            if (BeginP != GoPoint)
            {
                BeginP = "A" + BeginP;
                EndP   = "A" + GoPoint;
            }
            RoutePlanResult Tresult = planner.Paln(_ComData.nodeList, BeginP, EndP);

            foreach (string strln in Tresult.getPassedNodeIDs())
            {
                ReBack += "_" + strln;
            }

            string PassStr = ReBack + "_" + EndP;

            SetTask(PassStr.Replace("A", ""));
        }
コード例 #2
0
 private void printRouteResult(RoutePlanResult result)
 {
     Response.Write("<br />路径");
     string[] tmp = result.getPassedNodeIDs();
     for (int i = 0; i < tmp.Length; i++)
     {
         Response.Write(tmp[i] + "--");
     }
 }
コード例 #3
0
 private void printRouteResult(RoutePlanResult _result)
 {
     string[] tmp = _result.getPassedNodeIDs();
     for (int i = 0; i < tmp.Length; i++)
     {
         Response.Write(tmp[i] + "-->");
     }
     Response.Write(ddlEnd.SelectedValue);
     Response.Write("<br>");
 }
コード例 #4
0
 private void printRouteResult(RoutePlanResult _result)
 {
     Response.Write("</br>路径:");
     //获取最短路径结果中,所有的节点
     string[] tmp = _result.getPassedNodeIDs();
     for (int i = 0; i < tmp.Length; i++)
     {
         Response.Write(tmp[i] + "-->");
     }
 }
コード例 #5
0
ファイル: WinRule.cs プロジェクト: huangjlcom/WinRoot
        private void button2_Click(object sender, EventArgs e)
        {
            if (comboBox2.Text == comboBox4.Text)
            {
                MessageBox.Show("不能同在一个地标上!");
                return;
            }
            LocalPoint = this.comboBox4.Text;

            string Fction = "";
            string BeginP = "A14";
            string EndP   = "A11";
            string ReBack = "";

            if (LocalPoint.Trim() == "")
            {
                MessageBox.Show("无当前坐标!");
                return;
            }
            if (LocalPoint != comboBox2.Text)
            {
                BeginP = "A" + LocalPoint;
                EndP   = "A" + comboBox2.Text;
            }
            RoutePlanResult Tresult = planner.Paln(_ComData.nodeList, BeginP, EndP);

            foreach (string strln in Tresult.getPassedNodeIDs())
            {
                Fction += ">" + strln;
                ReBack += "_" + strln;
            }
            Fction  = Fction + "->" + EndP;
            PassStr = ReBack + "_" + EndP;

            if (_hts.ContainsKey(comboBox5.Text))
            {
                if (MessageBox.Show("已经设置过AGV#" + comboBox5.Text + ",是否要覆盖之前设置", "提示!", MessageBoxButtons.YesNo) == System.Windows.Forms.DialogResult.Yes)
                {
                    _hts[comboBox5.Text] = PassStr;
                    return;
                }
                else
                {
                    return;
                }
            }
            _hts.Add(comboBox5.Text, PassStr);
            this.richTextBox1.Text += "\nAGV#编号: " + comboBox5.Text + " 已设置,";
            richTextBox1.Text      += " 路径:" + Fction.Replace("A", "");

            DevID = comboBox5.Text;
        }
コード例 #6
0
ファイル: UCKG.cs プロジェクト: huangjlcom/WinRoot
        public void SetCall()
        {
            string          Fction  = "";
            string          BeginP  = "A14";
            string          EndP    = "A11";
            RoutePlanResult Tresult = planner.Paln(_ComData.nodeList, BeginP, EndP);

            foreach (string strln in Tresult.getPassedNodeIDs())
            {
                Fction += strln;
            }
            CreateNode(Fction + EndP);
        }
コード例 #7
0
        private string DetailedRoute(RoutePlanResult result)
        {
            string[] point = result.getPassedNodeIDs();
            string   route = "";

            for (int i = 0; i < point.Length; i++)
            {
                route += point[i] + "--->";
            }
            route += ddlEnd.SelectedValue;

            return(route);
        }
コード例 #8
0
        private void button3_Click(object sender, EventArgs e)
        {
            if (comboBox5.Text == comboBox4.Text)
            {
                MessageBox.Show("不能同在一个地标上!");
                return;
            }
            LocalPoint              = this.comboBox4.Text;
            this.richTextBox1.Text += "\n AGV#" + comboBox2.Text + ">> 起始地标: " + LocalPoint + " 开往目的地标:" + comboBox5.Text + " 已设定。";
            string Fction = "";
            string BeginP = "A14";
            string EndP   = "A11";
            string ReBack = "";

            if (LocalPoint.Trim() == "")
            {
                MessageBox.Show("无当前坐标!");
                return;
            }
            if (LocalPoint != comboBox5.Text)
            {
                BeginP = "A" + LocalPoint;
                EndP   = "A" + comboBox5.Text;
            }
            RoutePlanResult Tresult = planner.Paln(_ComData.nodeList, BeginP, EndP);

            foreach (string strln in Tresult.getPassedNodeIDs())
            {
                Fction += "->" + strln;
                ReBack += "_" + strln;
            }
            Fction  = Fction + "->>" + EndP;
            PassStr = ReBack + "_" + EndP;

            richTextBox1.Text += " 路径:" + Fction.Replace("A", "");

            DevID = comboBox2.Text;
        }