..
This commit is contained in:
@@ -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;
|
||||
|
||||
Reference in New Issue
Block a user