This commit is contained in:
chi
2025-05-23 11:01:22 +09:00
parent 34130e9c86
commit 80cf98901b
10 changed files with 1921 additions and 1982 deletions

View File

@@ -10,6 +10,7 @@ using System.Windows.Forms;
using Project.StateMachine;
using COMM;
using AR;
using Microsoft.IdentityModel.Tokens;
namespace Project.ViewForm
{
@@ -29,6 +30,7 @@ namespace Project.ViewForm
this.mapctl = new AGVMapControl.MapControl();
this.mapctl.Dock = DockStyle.Fill;
this.mapctl.Visible = true;
this.mapctl.Font = this.panel1.Font;
this.mapctl.BackColor = Color.FromArgb(32, 32, 32);
this.panel1.Controls.Add(mapctl);
}
@@ -39,6 +41,21 @@ namespace Project.ViewForm
ctlAuto1.dev_bms = PUB.BMS;
ctlAuto1.dev_xbe = PUB.XBE;
this.timer1.Start();
PUB.AGV.DataReceive += AGV_DataReceive;
var fn = new System.IO.FileInfo( AR.UTIL.CurrentPath+ "\\sample.route");
if (fn.Exists) this.mapctl.LoadFromFile(fn.FullName);
}
private void AGV_DataReceive(object sender, arDev.Narumi.DataEventArgs e)
{
switch (e.DataType)
{
case arDev.Narumi.DataType.TAG:
var tagno = PUB.AGV.data.TagNo;
this.mapctl.AGVMoveToRFID(tagno.ToString());
break;
}
}
private void CtlAuto1_ButtonClick(CtlAuto.UIButton idx)
@@ -63,6 +80,7 @@ namespace Project.ViewForm
timer1.Stop();
PUB.sm.StepChanged -= Sm_StepChanged;
this.ctlAuto1.ButtonClick -= CtlAuto1_ButtonClick;
PUB.AGV.DataReceive -= AGV_DataReceive;
}
bool tmrun = false;