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.
|
|
|
|
using Mesnac.Action.Base;
|
|
|
|
|
using System;
|
|
|
|
|
using System.Collections.Generic;
|
|
|
|
|
using System.Linq;
|
|
|
|
|
using System.Text;
|
|
|
|
|
using System.Threading.Tasks;
|
|
|
|
|
using System.Windows.Forms;
|
|
|
|
|
|
|
|
|
|
namespace Mesnac.Action.ChemicalWeighing.ProjectDebug
|
|
|
|
|
{
|
|
|
|
|
class ModifyAction : ChemicalWeighingAction, IAction
|
|
|
|
|
{
|
|
|
|
|
public void Run(RuntimeParameter runtime)
|
|
|
|
|
{
|
|
|
|
|
base.RunIni(runtime); //必须要调用
|
|
|
|
|
ComboBox comboBox = base.GetControlById("MCCombobox1") as ComboBox;
|
|
|
|
|
if (comboBox == null )
|
|
|
|
|
{
|
|
|
|
|
ICSharpCode.Core.LoggingService<ModifyAction>.Warn("{工程调试-打开} 缺少ComboBox控件...");
|
|
|
|
|
runtime.IsReturn = false;
|
|
|
|
|
return;
|
|
|
|
|
}
|
|
|
|
|
string str = comboBox.SelectedValue.ToString();
|
|
|
|
|
if (str != "" && str != null)
|
|
|
|
|
{
|
|
|
|
|
var writeResult16 = BasePlcHelper.Instance.PlcWriteByRunName(str, new object[] { 1 });
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|