This commit is contained in:
gongxh
2022-05-18 10:15:49 +08:00
parent 099335e6b3
commit 7240b17c1e
10 changed files with 72 additions and 58 deletions

View File

@@ -69,7 +69,7 @@ namespace CleanMachineHMI
Type frmType = Global.FrmModelList.Where(s => s.FormType == enumFormType).FirstOrDefault().Form;
if (isDefaultPage)
{
kryptonNavigator1.Pages[0].Controls.Clear();
//kryptonNavigator1.Pages[0].Text = enumFormType.ToString();
@@ -106,14 +106,14 @@ namespace CleanMachineHMI
{
KryptonPage tmpPage1 = new KryptonPage { Text = enumFormType.ToString(), Name = enumFormType.ToString() };
this.SetSingleControlText(tmpPage1);
ButtonSpecAny bsa = new ButtonSpecAny();
bsa.Style = PaletteButtonStyle.FormClose;
bsa.Type = PaletteButtonSpecStyle.FormClose;
bsa.Tag = tmpPage1;
bsa.Click += btnClose_Click;
kryptonNavigator1.Pages.Add(tmpPage1);
//if (enumFormType.ToString() != "IoMonitor")
//{
kryptonNavigator1.SelectedPage = tmpPage1;
@@ -146,13 +146,13 @@ namespace CleanMachineHMI
{
ButtonSpecAny bsa = sender as ButtonSpecAny;
var page = bsa.Tag as KryptonPage;
foreach(var ctrl in page.Controls)
foreach (var ctrl in page.Controls)
{
if (ctrl is Control)
{
(ctrl as Control).Visible = false;
}
}
}
@@ -325,7 +325,13 @@ namespace CleanMachineHMI
private void ShowWarningMsg()
{
PlcItem item = PlcOperationHelper.Instance.PlcItemMd_D_List.FirstOrDefault(x => x.PlcItemCode == "AlarmPopUpMsg");
if (!PlcOperationHelper.Instance.PlcItemMd_D_List.TryGetValue("AlarmPopUpMsg", out var item))
{
return;
}
// PlcItem item = PlcOperationHelper.Instance.PlcItemMd_D_List.FirstOrDefault(x => x.PlcItemCode == "AlarmPopUpMsg");
char[] tmpCharArr = Convert.ToString(Convert.ToInt32(item.PlcItemValue), 2).PadLeft(16, '0').Reverse().ToArray();
if (tmpCharArr.Contains('1'))
{
@@ -890,7 +896,7 @@ namespace CleanMachineHMI
private void frmMainNew_Shown(object sender, EventArgs e)
{
// InitControl();
// InitControl();
}
private void InitControl()
{