From fbe33a615f1c4e798a0f8e58163e68c3ce789614 Mon Sep 17 00:00:00 2001
From: lg <123456>
Date: 星期四, 20 十一月 2025 10:17:49 +0800
Subject: [PATCH] 初始化标准版
---
DevApp/Gs.DevApp/DevFrm/QC/DefectCode.cs | 69 +++++++++++++++++++---------------
1 files changed, 39 insertions(+), 30 deletions(-)
diff --git a/DevApp/Gs.DevApp/DevFrm/QC/DefectCode.cs b/DevApp/Gs.DevApp/DevFrm/QC/DefectCode.cs
index 2eb8c05..ee98b78 100644
--- a/DevApp/Gs.DevApp/DevFrm/QC/DefectCode.cs
+++ b/DevApp/Gs.DevApp/DevFrm/QC/DefectCode.cs
@@ -20,10 +20,9 @@
public DefectCode(string _strType)
{
InitializeComponent();
- strType = _strType;
toolBarMenu1.btnLoadClick += ToolBarMenu1_btnLoadClick;
this.toolBarMenu1.btnQueryClick += ToolBarMenu1_btnQueryClick;
-
+ strType = _strType;
tlMenu.IndicatorWidth = 50;
tlMenu.CustomDrawNodeIndicator += (s, ee) =>
{
@@ -47,6 +46,13 @@
frm.UpdateParent += (s2, ee2) =>
{
getPageList(1);
+ // 渚嬪锛岄�氳繃ID鏌ユ壘鑺傜偣锛�
+ TreeListNode node = tlMenu.FindNodeByKeyID(strUpGuid);
+ if (node != null)
+ {
+ node.Expanded = true; // 灞曞紑鑺傜偣
+ tlMenu.MakeNodeVisible(node); // 纭繚鍙
+ }
};
frm.ShowDialog();
};
@@ -88,11 +94,11 @@
tlMenu.DeleteNode(tlMenu.FocusedNode);
}
else
- ToolBox.MsgHelper.Warning("鎻愮ず锛�" + _rtn.rtnMsg);
+ ToolBox.MsgHelper.ShowError("鎻愮ず锛�" + _rtn.rtnMsg);
}
catch (Exception ex)
{
- ToolBox.MsgHelper.Warning("鎻愮ず锛�" + ex.Message);
+ ToolBox.MsgHelper.ShowError("鎻愮ず锛�" + ex.Message);
}
}
};
@@ -109,11 +115,36 @@
frm.UpdateParent += (s2, ee2) =>
{
getPageList(1);
+ // 渚嬪锛岄�氳繃ID鏌ユ壘鑺傜偣锛�
+ TreeListNode node = tlMenu.FindNodeByKeyID(strGuid);
+ if (node !=null)
+ {
+ node.Expanded = true; // 灞曞紑鑺傜偣
+ tlMenu.MakeNodeVisible(node); // 纭繚鍙
+ }
};
frm.ShowDialog();
};
}
-
+ /// <summary>
+ /// 鏌ヨ浜嬩欢
+ /// </summary>
+ /// <param name="sender"></param>
+ /// <param name="e"></param>
+ private void ToolBarMenu1_btnQueryClick(object sender, EventArgs e)
+ {
+ Gs.DevApp.ToolBox.MsgHelper.ShowInformation("璇ョ獥浣撲笉鏀寔鏌ヨ锛岃嫢鎯虫洿鏂伴〉闈紝璇风偣鍑� 鍒锋柊");
+ }
+ /// <summary>
+ /// 鍒锋柊浜嬩欢
+ /// </summary>
+ /// <param name="sender"></param>
+ /// <param name="e"></param>
+ private void ToolBarMenu1_btnLoadClick(object sender, EventArgs e)
+ {
+ _filterList.Clear();
+ getPageList(1);
+ }
/// <summary>
/// 鍙抽敭寮瑰嚭鑿滃崟,濡傛灉鏄锛屽鍔犲瓙椤圭洰锛屽惁鍒欏鍔犱富椤�
/// </summary>
@@ -146,32 +177,10 @@
toolStripMenuItemAdd.Visible = false;
toolStripMenuItemEdt.Visible = false;
toolStripMenuItemDel.Visible = false;
- toolStripMenuItemRoot.Visible = true;
+ toolStripMenuItemRoot.Visible = false;//2025/07//11鏀逛负涓嶅鍔犱富椤圭洰浜�
cms1.Show(tlMenu, e.Location);
}
}
- }
-
-
- /// <summary>
- /// 鏌ヨ浜嬩欢
- /// </summary>
- /// <param name="sender"></param>
- /// <param name="e"></param>
- private void ToolBarMenu1_btnQueryClick(object sender, EventArgs e)
- {
- Gs.DevApp.ToolBox.MsgHelper.ShowInformation("璇ョ獥浣撲笉鏀寔鏌ヨ锛岃嫢鎯虫洿鏂伴〉闈紝璇风偣鍑� 鍒锋柊");
- }
-
- /// <summary>
- /// 鍒锋柊浜嬩欢
- /// </summary>
- /// <param name="sender"></param>
- /// <param name="e"></param>
- private void ToolBarMenu1_btnLoadClick(object sender, EventArgs e)
- {
- _filterList.Clear();
- getPageList(1);
}
/// <summary>
///
@@ -194,9 +203,9 @@
tlMenu.KeyFieldName = "guid";
tlMenu.ParentFieldName = "pid";
tlMenu.EndUpdate();
- //this.tlMenu.CollapseAll();
+ this.tlMenu.CollapseAll();
// this.tlMenu.ExpandAll();
- this.tlMenu.ExpandToLevel(0);
+ // this.tlMenu.ExpandToLevel(0);
}
catch (Exception ex)
{
--
Gitblit v1.9.3