修改结构
This commit is contained in:
@@ -9,7 +9,7 @@ using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
using System.Windows.Forms;
|
||||
|
||||
using CleanMachine.Model;
|
||||
namespace CleanMachineHMI
|
||||
{
|
||||
public partial class frmIoMonitorNew : KryptonForm
|
||||
@@ -67,7 +67,7 @@ namespace CleanMachineHMI
|
||||
{
|
||||
lock (lockObj)
|
||||
{
|
||||
BasPlcItemMd item = sender as BasPlcItemMd;
|
||||
PlcItem item = sender as PlcItem;
|
||||
Invoke(new Action(() =>
|
||||
{
|
||||
if (item.PlcItemDataType == 2)
|
||||
@@ -117,7 +117,7 @@ namespace CleanMachineHMI
|
||||
{
|
||||
lock (lockObj)
|
||||
{
|
||||
BasPlcItemMd item = sender as BasPlcItemMd;
|
||||
PlcItem item = sender as PlcItem;
|
||||
Invoke(new Action(() =>
|
||||
{
|
||||
if (item.PlcItemDataType == 2)
|
||||
@@ -170,8 +170,8 @@ namespace CleanMachineHMI
|
||||
{
|
||||
if (GlobalHelper.PlcItemMd_X_List != null && GlobalHelper.PlcItemMd_X_List.Count > 0)
|
||||
{
|
||||
List<BasPlcItemMd> tempLst = GlobalHelper.PlcItemMd_X_List.OrderBy(x => Convert.ToInt32(x.PlcItemPriAddress)).ToList();
|
||||
foreach (BasPlcItemMd item in tempLst)
|
||||
List<PlcItem> tempLst = GlobalHelper.PlcItemMd_X_List.OrderBy(x => Convert.ToInt32(x.PlcItemPriAddress)).ToList();
|
||||
foreach (PlcItem item in tempLst)
|
||||
{
|
||||
Invoke(new Action(() =>
|
||||
{
|
||||
@@ -187,8 +187,8 @@ namespace CleanMachineHMI
|
||||
|
||||
if (GlobalHelper.PlcItemMd_Y_List != null && GlobalHelper.PlcItemMd_Y_List.Count > 0)
|
||||
{
|
||||
List<BasPlcItemMd> tempLst = GlobalHelper.PlcItemMd_Y_List.OrderBy(x => Convert.ToInt32(x.PlcItemPriAddress)).ToList();
|
||||
foreach (BasPlcItemMd item in tempLst)
|
||||
List<PlcItem> tempLst = GlobalHelper.PlcItemMd_Y_List.OrderBy(x => Convert.ToInt32(x.PlcItemPriAddress)).ToList();
|
||||
foreach (PlcItem item in tempLst)
|
||||
{
|
||||
Invoke(new Action(() =>
|
||||
{
|
||||
@@ -222,7 +222,7 @@ namespace CleanMachineHMI
|
||||
string plcItemNameAddress = pic.Name.Replace("picb_", "");
|
||||
if (plcItemNameAddress.StartsWith("M"))
|
||||
{
|
||||
BasPlcItemMd tmpPlc = GlobalHelper.PlcItemMd_M_List.First(x => x.PlcItemPriAddress == plcItemNameAddress.Replace("M", ""));
|
||||
PlcItem tmpPlc = GlobalHelper.PlcItemMd_M_List.First(x => x.PlcItemPriAddress == plcItemNameAddress.Replace("M", ""));
|
||||
if (tmpPlc != null)
|
||||
{
|
||||
ttp.SetToolTip(pic, tmpPlc.PlcItemName);
|
||||
@@ -230,7 +230,7 @@ namespace CleanMachineHMI
|
||||
}
|
||||
else
|
||||
{
|
||||
BasPlcItemMd tmpPlc = GlobalHelper.PlcItemMd_X_List.First(x => x.PlcItemPriAddress == Convert.ToInt32(plcItemNameAddress.Replace("X", ""), 10).ToString());
|
||||
PlcItem tmpPlc = GlobalHelper.PlcItemMd_X_List.First(x => x.PlcItemPriAddress == Convert.ToInt32(plcItemNameAddress.Replace("X", ""), 10).ToString());
|
||||
if (tmpPlc != null)
|
||||
{
|
||||
ttp.SetToolTip(pic, tmpPlc.PlcItemName);
|
||||
|
||||
Reference in New Issue
Block a user