using System; using System.Windows.Forms; using Mesnac.Action.Base; using Mesnac.Action.ChemicalWeighing.LjProdcutLine; namespace Mesnac.Action.ChemicalWeighing.LjPlanning { public class AddAction:ChemicalWeighingAction, IAction { public static event EventHandler OnAdd; private DbMCControl _materialGridControl = null; //物料列表控件 private RuntimeParameter _runtime; public void Run(RuntimeParameter runtime) { base.RunIni(runtime); //必须调用 this._runtime = runtime; FrmPlanning frm = new FrmPlanning(); DialogResult result = frm.ShowDialog(); this._runtime.BaseControl.MCEnabled = false; if (result == DialogResult.OK) { if (OnAdd != null) { OnAdd(this._runtime.BaseControl.MCRoot, System.EventArgs.Empty); } frm.Dispose(); } this._runtime.BaseControl.MCEnabled = true; } } }