主界面左侧菜单相关
This commit is contained in:
@@ -338,7 +338,7 @@ namespace Lskj.Main.Control
|
||||
{
|
||||
this.SetMenus();
|
||||
this.SetSearchMenus();
|
||||
if (!this._allMenus.Columns.Contains("groupcaption") || isFlowLayout)
|
||||
if (!CanUseLeftGroupTreeMenu())
|
||||
{
|
||||
this.tv_left.Visible = false;
|
||||
}
|
||||
@@ -803,6 +803,26 @@ namespace Lskj.Main.Control
|
||||
}
|
||||
}
|
||||
|
||||
private bool CanUseLeftGroupTreeMenu()
|
||||
{
|
||||
return "1".Equals((SystemInfo.Instance.MainLeftShowMode + "").Trim()) && this._allMenus.Columns.Contains("groupcaption") && !isFlowLayout;
|
||||
}
|
||||
|
||||
private void ResetLeftMenuBarPanel()
|
||||
{
|
||||
SetLeftGroupSeparatorVisible(false);
|
||||
this.pl_center_left.Padding = new Padding(4);
|
||||
this.pl_center_left.BackColor = Color.FromArgb(10, 87, 167);
|
||||
if (_leftGroupTreeView != null && this.pl_center_left.Controls.Contains(_leftGroupTreeView))
|
||||
{
|
||||
this.pl_center_left.Controls.Remove(_leftGroupTreeView);
|
||||
}
|
||||
if (this.pl_center_left.Controls.Contains(this.tv_left))
|
||||
{
|
||||
this.tv_left.Visible = false;
|
||||
}
|
||||
}
|
||||
|
||||
private ImageList GetLeftGroupTreeIcons()
|
||||
{
|
||||
if (_leftGroupTreeIcons != null) return _leftGroupTreeIcons;
|
||||
@@ -1083,7 +1103,11 @@ namespace Lskj.Main.Control
|
||||
List<DataRow> rows = this._allMenus.AsEnumerable().Where(n => (n["subsysid"] + "").Equals(ERPInfo.Instance.SubSysId) && !string.IsNullOrEmpty(n["menustruct"] + "")).ToList();
|
||||
if (rows != null && rows.Count > 0)
|
||||
{
|
||||
bool useLeftGroupTreeMenu = this._allMenus.Columns.Contains("groupcaption") && !isFlowLayout;
|
||||
bool useLeftGroupTreeMenu = CanUseLeftGroupTreeMenu();
|
||||
if (!useLeftGroupTreeMenu)
|
||||
{
|
||||
ResetLeftMenuBarPanel();
|
||||
}
|
||||
DataTable leftGroupTreeTable = useLeftGroupTreeMenu ? CreateLeftGroupTreeTable() : null;
|
||||
int buttonTop = Convert.ToInt32(0.05 * DpiY); // 按钮上边距
|
||||
int menuLeft = Convert.ToInt32(0.05 * DpiY), menuTop = Convert.ToInt32(0.05 * DpiY); // 模块距离左边距,模块距离顶部边距
|
||||
|
||||
Reference in New Issue
Block a user