using DevExpress.Data.Filtering.Helpers; using Mesnac.Action.Base; using Mesnac.Action.ChemicalWeighing.Entity; using Mesnac.Action.ChemicalWeighing.Entity.PptPlan; using Mesnac.Action.ChemicalWeighing.Product.XlPlan; using Mesnac.Communication; using System; using System.Collections.Generic; using System.ComponentModel; using System.Linq; using System.Text; using System.Threading; using System.Threading.Tasks; using System.Timers; using System.Windows.Forms; namespace Mesnac.Action.ChemicalWeighing.Show { /// /// 手动称量确认 /// public class Conf2WeightAction : ChemicalWeighingAction, IAction { #region 字段定义 bool flag = true; public static bool IsFirstRun = true; //是否首次运行 private RuntimeParameter _runtime; private DbMCControl _clientGridControl = null; //本地计划控件 #endregion public void Run(RuntimeParameter runtime) { base.RunIni(runtime); #region 首次执行,进行事件订阅 if (IsFirstRun) { ICSharpCode.Core.LoggingService.Debug("溶剂上料确认-窗体初始化业务..."); } #endregion #region 初始化 #region 初始化 string msg1 = "确认要完成称量吗?"; //确认删除当前配方(配方名:{0})吗? DialogResult result = MessageBox.Show(msg1, Mesnac.Basic.LanguageHelper.Caption, MessageBoxButtons.YesNo, MessageBoxIcon.Question); if (result == DialogResult.Yes) { BasePlcHelper.Instance.PlcWriteByDataKey(BasePlcHelper.Instance.solvent_Configweight2, new object[] { 1 }); // 人工确认 MessageBox.Show("确认成功!"); } #endregion #endregion } #region 方法定义 #region 网格事件处理方法 /// /// 初始化网格样式 /// /// DataGridView网格控件对象 private void InitGridViewEvent(DataGridView dgv) { } #endregion #region 初始化界面控件数据 /// /// 初始化界面控件数据 /// private void InitData() { } #endregion #endregion } }