修改
This commit is contained in:
@@ -131,7 +131,7 @@ namespace CleanMachineHMI.FrmUserControl
|
||||
{
|
||||
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)
|
||||
{
|
||||
|
||||
@@ -147,7 +147,7 @@ namespace CleanMachineHMI.FrmUserControl
|
||||
|
||||
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)
|
||||
{
|
||||
|
||||
@@ -162,9 +162,9 @@ namespace CleanMachineHMI.FrmUserControl
|
||||
}
|
||||
|
||||
|
||||
Show_X_Y_Status(PlcOperationHelper.Instance.PlcItemMd_X_List);
|
||||
Show_X_Y_Status(PlcOperationHelper.Instance.PlcItemMd_X_List.Values);
|
||||
|
||||
Show_X_Y_Status(PlcOperationHelper.Instance.PlcItemMd_Y_List);
|
||||
Show_X_Y_Status(PlcOperationHelper.Instance.PlcItemMd_Y_List.Values);
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
|
||||
@@ -127,7 +127,7 @@ namespace CleanMachineHMI.FrmUserControl
|
||||
{
|
||||
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)
|
||||
{
|
||||
var IO = new IOBlock();
|
||||
@@ -147,7 +147,7 @@ namespace CleanMachineHMI.FrmUserControl
|
||||
|
||||
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)
|
||||
{
|
||||
var IO = new IOBlock();
|
||||
@@ -168,9 +168,9 @@ namespace CleanMachineHMI.FrmUserControl
|
||||
}
|
||||
|
||||
|
||||
Show_X_Y_Status(PlcOperationHelper.Instance.PlcItemMd_X_List);
|
||||
Show_X_Y_Status(PlcOperationHelper.Instance.PlcItemMd_X_List.Values);
|
||||
|
||||
Show_X_Y_Status(PlcOperationHelper.Instance.PlcItemMd_Y_List);
|
||||
Show_X_Y_Status(PlcOperationHelper.Instance.PlcItemMd_Y_List.Values);
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
|
||||
@@ -71,6 +71,8 @@ namespace CleanMachineHMI.FrmUserControl
|
||||
private void btn_logout_Click(object sender, EventArgs e)
|
||||
{
|
||||
Global.LoginForm.Show();
|
||||
Global.UserInfo = null;
|
||||
Global.SysThIsRunFlag = false;
|
||||
Global.MainFormNew.Hide();
|
||||
}
|
||||
}
|
||||
|
||||
@@ -155,11 +155,11 @@ namespace CleanMachineHMI.FrmUserControl
|
||||
List<PlcItem> tmpMdList;
|
||||
if (!string.IsNullOrEmpty(ktb_plcMsg.Text.Trim()))
|
||||
{
|
||||
tmpMdList = PlcOperationHelper.Instance. PlcItemMdList.FindAll(x => x.PlcItemCode.Contains(ktb_plcMsg.Text.Trim()) || x.PlcItemName.Contains(ktb_plcMsg.Text.Trim()));
|
||||
tmpMdList = PlcOperationHelper.Instance. PlcItemMdList.Values.ToList().FindAll(x => x.PlcItemCode.Contains(ktb_plcMsg.Text.Trim()) || x.PlcItemName.Contains(ktb_plcMsg.Text.Trim()));
|
||||
}
|
||||
else
|
||||
{
|
||||
tmpMdList = PlcOperationHelper.Instance.PlcItemMdList;
|
||||
tmpMdList = PlcOperationHelper.Instance.PlcItemMdList.Values.ToList();
|
||||
}
|
||||
if (tmpMdList != null && tmpMdList.Count > 0)
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user