..
This commit is contained in:
@@ -8,7 +8,6 @@ using System.Globalization;
|
||||
using System.IO;
|
||||
using System.Linq;
|
||||
using System.Security.Cryptography.X509Certificates;
|
||||
using System.Text;
|
||||
using System.Windows.Forms;
|
||||
using System.Windows.Forms.VisualStyles;
|
||||
using static AGVEmulator.DevAGV;
|
||||
@@ -24,6 +23,10 @@ namespace AGVEmulator
|
||||
DevAGV AGV;
|
||||
DevXBE XBE;
|
||||
|
||||
public RemoteStatus _remoteStatus = new RemoteStatus();
|
||||
public ENIGProtocol.AGVErrorCode _remoteErrorCode = ENIGProtocol.AGVErrorCode.None;
|
||||
public string _remoteErrorMessage = "";
|
||||
|
||||
// Map Control
|
||||
private UnifiedAGVCanvas _agvCanvas;
|
||||
private VirtualAGV _visualAgv;
|
||||
@@ -980,6 +983,30 @@ namespace AGVEmulator
|
||||
var target = (byte)nudIDAgv.Value;
|
||||
this.XBE.SendPickOffExit(target);
|
||||
}
|
||||
|
||||
public void UpdateUIStatus()
|
||||
{
|
||||
if (this.InvokeRequired)
|
||||
{
|
||||
this.BeginInvoke(new Action(UpdateUIStatus));
|
||||
return;
|
||||
}
|
||||
|
||||
rtStatus.Text = _remoteStatus.ToString();
|
||||
tbErCode.Text = _remoteErrorCode.ToString();
|
||||
tbErmsg.Text = _remoteErrorMessage;
|
||||
|
||||
if (_remoteErrorCode != ENIGProtocol.AGVErrorCode.None)
|
||||
{
|
||||
tbErCode.BackColor = Color.Red;
|
||||
tbErCode.ForeColor = Color.White;
|
||||
}
|
||||
else
|
||||
{
|
||||
tbErCode.BackColor = SystemColors.Window;
|
||||
tbErCode.ForeColor = SystemColors.WindowText;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user