修改
This commit is contained in:
@@ -171,7 +171,7 @@ namespace CleanMachineHMI
|
||||
{
|
||||
if (PlcOperationHelper.Instance.PlcItemMd_X_List != null && PlcOperationHelper.Instance.PlcItemMd_X_List.Count > 0)
|
||||
{
|
||||
List<PlcItem> tempLst = PlcOperationHelper.Instance.PlcItemMd_X_List.OrderBy(x => Convert.ToInt32(x.PlcItemPriAddress)).ToList();
|
||||
List<PlcItem> tempLst = PlcOperationHelper.Instance.PlcItemMd_X_List.Values.OrderBy(x => Convert.ToInt32(x.PlcItemPriAddress)).ToList();
|
||||
foreach (PlcItem item in tempLst)
|
||||
{
|
||||
Invoke(new Action(() =>
|
||||
@@ -188,7 +188,7 @@ namespace CleanMachineHMI
|
||||
|
||||
if (PlcOperationHelper.Instance.PlcItemMd_Y_List != null && PlcOperationHelper.Instance.PlcItemMd_Y_List.Count > 0)
|
||||
{
|
||||
List<PlcItem> tempLst = PlcOperationHelper.Instance.PlcItemMd_Y_List.OrderBy(x => Convert.ToInt32(x.PlcItemPriAddress)).ToList();
|
||||
List<PlcItem> tempLst = PlcOperationHelper.Instance.PlcItemMd_Y_List.Values.OrderBy(x => Convert.ToInt32(x.PlcItemPriAddress)).ToList();
|
||||
foreach (PlcItem item in tempLst)
|
||||
{
|
||||
Invoke(new Action(() =>
|
||||
@@ -223,7 +223,7 @@ namespace CleanMachineHMI
|
||||
string plcItemNameAddress = pic.Name.Replace("picb_", "");
|
||||
if (plcItemNameAddress.StartsWith("M"))
|
||||
{
|
||||
PlcItem tmpPlc = PlcOperationHelper.Instance.PlcItemMd_M_List.First(x => x.PlcItemPriAddress == plcItemNameAddress.Replace("M", ""));
|
||||
PlcItem tmpPlc = PlcOperationHelper.Instance.PlcItemMd_M_List.Values.First(x => x.PlcItemPriAddress == plcItemNameAddress.Replace("M", ""));
|
||||
if (tmpPlc != null)
|
||||
{
|
||||
ttp.SetToolTip(pic, tmpPlc.PlcItemName);
|
||||
@@ -231,7 +231,7 @@ namespace CleanMachineHMI
|
||||
}
|
||||
else
|
||||
{
|
||||
PlcItem tmpPlc = PlcOperationHelper.Instance.PlcItemMd_X_List.First(x => x.PlcItemPriAddress == Convert.ToInt32(plcItemNameAddress.Replace("X", ""), 10).ToString());
|
||||
PlcItem tmpPlc = PlcOperationHelper.Instance.PlcItemMd_X_List.Values.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