You cannot select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
lj_plc/Actions/ChemicalWeighing/Mesnac.Action.ChemicalWeighing/ManualControl/ManualControlAction.cs

42 lines
1.0 KiB
C#

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<DbMCControl> 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!");
}
}
}