using Mesnac.Action.Base; using Mesnac.Controls.Base; using Mesnac.Controls.Default; using Mesnac.Controls.Default.GCTS; using System; using System.Collections.Generic; using System.Linq; using System.Text; using System.Threading.Tasks; namespace Mesnac.Action.ChemicalWeighing.ProjectDebug { public class XFFLQHXFY_DebugAction : ChemicalWeighingAction, IAction { public void Run(RuntimeParameter runtime) { base.RunIni(runtime); //必须调用 XFFLQHXFY_GCTS CurrentSB2 = runtime.Sender as XFFLQHXFY_GCTS; string _sbvNumber = CurrentSB2.StatusName; ICSharpCode.Core.LoggingService.Debug(_sbvNumber + "器件状态设置"); if (_sbvNumber == "") { ICSharpCode.Core.LoggingService.Warn(String.Format("请设置正确的名称!")); return; } else { FrmProjectDebug frmProjectDebug = new FrmProjectDebug(); frmProjectDebug.FormText = CurrentSB2.Name; frmProjectDebug.PlcName = CurrentSB2.StatusName; frmProjectDebug.PlcValue = CurrentSB2.Status.ToString(); frmProjectDebug.ShowDialog(); } } } }