using Mesnac.Action.Base; using Mesnac.Controls.Base; using Mesnac.Controls.Default; using System; using System.Collections.Generic; using System.Linq; using System.Text; using System.Threading.Tasks; using System.Windows.Forms; namespace Mesnac.Action.ChemicalWeighing.ManualControl { class ManualControlAction : ChemicalWeighingAction, IAction { private RuntimeParameter _runtime; public void Run(RuntimeParameter runtime) { base.RunIni(runtime); //必须要调用 this._runtime = runtime; List mcControllist = GetAllDbMCControlsByOption(DbOptionTypes.Query);//获取所有待初始化控件 var Bottom1 = runtime.Sender; if (Bottom1 is MCButton) { MCButton button = (MCButton)Bottom1; string val = button.MCValue.ToString(); string mcKey = button.MCKey.ToString(); } MessageBox.Show("ClickSuccess!"); } } }