EPR类企业管理系统

在我们现有系统基础上或全新开发,提供定制服务
为您的企业高效快速实施ERP,WMS,MES,CRM管理系统
全面管控物料仓库、销售业务、采购业务、仓库业务
生产过程、质量检验、组织架构、业务报表


定制
QQ:460-3528

开发
QQ群:3360-90194

源码
微信:136-3650-3721

如何:使用WinForms仪表板设计器显示自定义窗体

本主题介绍如何将自定义窗体显示为WinForms Dashboard Designer,用于在WinForms XAF应用程序中创建和修改仪表板。例如,可能需要自定义菜单(添加自定义栏项目或删除某些默认栏项目)。

Imports DevExpress.ExpressApp
Imports DevExpress.ExpressApp.Dashboards.Win
Imports DevExpress.Persistent.Base

Namespace CustomDashboardDesignerForm.Module.Win.Controllers
    Public Class CustomDashboardDesignerFormController
        Inherits ObjectViewController(Of ObjectView, IDashboardData)

        Private showDashboardDesignerController As WinShowDashboardDesignerController
        Protected Overrides Sub OnActivated()
            MyBase.OnActivated()
            showDashboardDesignerController = Frame.GetController(Of WinShowDashboardDesignerController)()
            If showDashboardDesignerController IsNot Nothing Then
                AddHandler showDashboardDesignerController.DashboardDesignerManager.CreateCustomForm, AddressOf Manager_CreateCustomForm
            End If
        End Sub
        Private Sub Manager_CreateCustomForm(ByVal sender As Object, ByVal e As CreateCustomFormEventArgs)
            e.Form = New CustomDashboardDesignerForm()
        End Sub
        Protected Overrides Sub OnDeactivated()
            MyBase.OnDeactivated()
            If showDashboardDesignerController IsNot Nothing Then
                RemoveHandler showDashboardDesignerController.DashboardDesignerManager.CreateCustomForm, AddressOf Manager_CreateCustomForm
            End If
        End Sub
    End Class
End Namespace

转载保留此链接,注明出处