刷新界面
protected override void StatusUpdate(Panda.Model.DTO.Modbus.VFC.DeviceVFCInfo data)
{
#region 更新界面状态
try
{
BeginInvoke(new Action(() =>
{
#region 更新界面状态
if (data == null)
{
return;
}
titleRunStatus.Elements[0].Text = data.RunStatus ? "正在运行":"已停止";
titleA.Elements[0].Text = data.A.ToString("f2");
titleBar.Elements[0].Text = data.BAR.ToString("f2");
titleHZ.Elements[0].Text = data.HZ.ToString("f2");
if (data.RunStatus)
{
tileBarItem5.Text = "关闭变频";
tileBarItem5.AppearanceItem.Normal.BackColor = Color.Green;
}
else {
tileBarItem5.Text = "打开变频";
tileBarItem5.AppearanceItem.Normal.BackColor = Color.Orange;
}
if (data.WarnStatus == 0)
{
tileBarItem5.Elements[1].Text = "";
}
else
{
tileBarItem5.Elements[1].Text = "警报请检查设备";
}
#endregion
}));
}
catch (Exception ex)
{
Panda.Framework.LogHelper.WriteExceptionLog("程序操作异常", ex);
}
#endregion
}