Syscmd.Project.OpenUserMenu()
RibbonTabs.Clear
Dim Products As List(Of String)
Dim Customers As List(Of String)
Products = DataTables("功能导航").GetValues("功能区")
For Each Product As String In Products
Dim gn As New RibbonMenu.Tab(Product)
If RibbonTabs.Contains(Product) Then
Return Nothing
Else
gn.Text = Product
RibbonTabs.Add(gn)
End If
Customers = DataTables("功能导航").GetValues("功能组","功能区 = '" & Product & "'")
For Each Customer As String In Customers
Output.Show(Customer)
Dim g As New RibbonMenu.Group(Customer)
g.Text = Customer
RibbonTabs(Product).Groups.Add(g)
Dim drs As List(Of DataRow) = DataTables("功能导航").Select("功能区 = '" & Product & "' And 功能组='" & Customer & "'","序号")
For Each dr As DataRow In drs
Dim b As New RibbonMenu.Button(dr("模块名称"))
b.Text = dr("模块标题")
b.LargeImage = GetImage(ProjectPath & "Images\" & dr("模块名称") & ".Ico")
b.TextImageRelation = TextImageRelationEnum.ImageAboveText
g.Items.Add(b)
Next
Next
Next
[此贴子已经被作者于2016/6/20 9:49:59编辑过]