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 System;
|
|
|
|
|
using System.Collections.Generic;
|
|
|
|
|
using System.Net.NetworkInformation;
|
|
|
|
|
using System.Text;
|
|
|
|
|
using System.Linq;
|
|
|
|
|
using System.Data;
|
|
|
|
|
using System.Threading;
|
|
|
|
|
using Mesnac.Action.Base;
|
|
|
|
|
using Mesnac.Controls.Base;
|
|
|
|
|
using System.Windows.Forms;
|
|
|
|
|
using Mesnac.Codd.Session;
|
|
|
|
|
using System.IO;
|
|
|
|
|
using Mesnac.Action.Feeding.Qingquan.BasicInfo;
|
|
|
|
|
using Mesnac.Controls.Default;
|
|
|
|
|
|
|
|
|
|
namespace Mesnac.Action.Feeding.Qingquan.FeedingPlc
|
|
|
|
|
{
|
|
|
|
|
public class TextToPlc : FeedingAction, IAction
|
|
|
|
|
{
|
|
|
|
|
public void Run(RuntimeParameter runtime)
|
|
|
|
|
{
|
|
|
|
|
base.RunIni(runtime);
|
|
|
|
|
foreach (MCTextBox textbox in base.GetTControls<MCTextBox>())
|
|
|
|
|
{
|
|
|
|
|
if (!string.IsNullOrWhiteSpace(textbox.TextName))
|
|
|
|
|
{
|
|
|
|
|
object[] buff = new object[1];
|
|
|
|
|
int isend = 0;
|
|
|
|
|
if (int.TryParse(textbox.Text, out isend))
|
|
|
|
|
{
|
|
|
|
|
buff[0] = isend;
|
|
|
|
|
PlcData.Instance.PlcWriteByEquipKey(textbox.TextName, buff);
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|