Mini Kabibi Habibi
Imports Microsoft.VisualBasic
Imports System
Imports System.Drawing
Imports System.Collections
Imports System.ComponentModel
Imports System.Windows.Forms
Imports DevExpress.Utils
Imports DevExpress.XtraBars
Imports DevExpress.LookAndFeel
Imports DevExpress.DXperience.Demos
Imports System.IO
Imports DevExpress.XtraPrinting.Preview
Imports DevExpress.XtraReports.UI
Imports DevExpress.Tutorials
Namespace XtraReportsDemos
Public Class frmMain
Inherits DevExpress.DXperience.Demos.RibbonMainForm
Protected Overrides Sub SetFormParam()
Me.Icon = ResourceImageHelper.CreateIconFromResources("AppIcon.ico", GetType(frmMain).Assembly)
End Sub
Protected Overrides ReadOnly Property DemoName() As String
Get
Return "DevExpress Reports Demo (VB code)"
End Get
End Property
Protected Overloads Overrides Sub ShowModule(ByVal name As String, ByVal group As DevExpress.XtraEditors.GroupControl, ByVal lookAndFeel As DevExpress.LookAndFeel.DefaultLookAndFeel, ByVal caption As DevExpress.Utils.Frames.ApplicationCaption)
DemosInfo.ShowModule(name, group, caption, RibbonMenuManager)
End Sub
<STAThread()> _
Shared Sub Main()
Dim path As String = FilesHelper.FindingFileName(AppDomain.CurrentDomain.BaseDirectory, "Data\nwind.mdb", False)
ConnectionHelper.ApplyDataDirectory(System.IO.Path.GetDirectoryName(path))
DevExpress.UserSkins.BonusSkins.Register()
Application.Run(New frmMain())
End Sub
Protected Overrides Sub FillNavBar()
MyBase.FillNavBar()
Me.navBarControl1.SkinExplorerBarViewScrollStyle = DevExpress.XtraNavBar.SkinExplorerBarViewScrollStyle.ScrollBar
'Me.navBarControl1.LargeImages = Nothing
End Sub
Protected Overrides Sub ShowAbout()
DevExpress.Utils.About.AboutForm.Show(GetType(XtraReport), DevExpress.Utils.About.ProductKind.XtraReports, DevExpress.Utils.About.ProductInfoStage.Registered)
End Sub
End Class
Public Class DemosInfo
Inherits ModulesInfo
Public Overloads Shared Sub ShowModule(ByVal name As String, ByVal group As DevExpress.XtraEditors.GroupControl, ByVal caption As DevExpress.Utils.Frames.ApplicationCaption, ByVal manager As RibbonMenuManager)
Dim item As DevExpress.DXperience.Demos.ModuleInfo = DemosInfo.GetItem(name)
Dim currentCursor As Cursor = Cursor.Current
Cursor.Current = Cursors.WaitCursor
Try
Dim oldTutorial As Control = Nothing
If Instance.CurrentModuleBase IsNot Nothing Then
If Instance.CurrentModuleBase.Name = name Then
Return
End If
Instance.CurrentModuleBase.TModule.Visible = False
End If
Dim tutorial As TutorialControlBase = TryCast(item.TModule, TutorialControlBase)
tutorial.Bounds = group.DisplayRectangle
Instance.CurrentModuleBase = item
tutorial.Visible = False
group.Controls.Add(tutorial)
tutorial.Dock = DockStyle.Fill
tutorial.RibbonMenuManager = manager
tutorial.TutorialName = name
tutorial.Caption = caption
tutorial.Visible = True
tutorial.BringToFront()
tutorial.Focus()
If oldTutorial IsNot Nothing Then
oldTutorial.Visible = False
End If
Finally
Cursor.Current = currentCursor
End Try
RaiseModuleChanged()
End Sub
End Class
Public Class About
Inherits ucAboutPage
Public Sub New()
InitializeComponent()
End Sub
Protected Overrides ReadOnly Property ProductText() As String
Get
Return "Introducing XtraReports - our next generation of multi-platform reporting solutions for Windows Forms! With full Microsoft Visual Studio .NET integration, flexible architecture and an outstanding set of special tools, XtraReports is essential for creating even the most complex reports in the shortest possible time." & Constants.vbCrLf & Constants.vbCrLf & "As with all Developer Express .NET components, full source code is available and your purchase is backed by a 60-day no questions asked money back guarantee."
End Get
End Property
Protected Overrides ReadOnly Property ProductImage() As Image
Get
Return DevExpress.Utils.ResourceImageHelper.CreateImageFromResources("DevExpress.XtraReports.Images.XtraReports.png", GetType(XtraReport).Assembly)
End Get
End Property
Protected Overrides ReadOnly Property ProductImageLight() As Image
Get
Return DevExpress.Utils.ResourceImageHelper.CreateImageFromResources("DevExpress.XtraReports.Images.XtraReports_light.png", GetType(XtraReport).Assembly)
End Get
End Property
Protected Overrides ReadOnly Property ProductKind() As DevExpress.Utils.About.ProductKind
Get
Return DevExpress.Utils.About.ProductKind.XtraReports
End Get
End Property
Private Sub InitializeComponent()
Me.SuspendLayout()
'
' About
'
Me.AutoScaleDimensions = New System.Drawing.SizeF(6.0F, 13.0F)
Me.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font
Me.Name = "About"
Me.Size = New System.Drawing.Size(439, 260)
Me.ResumeLayout(False)
End Sub
Protected Overloads Overrides Sub Dispose(ByVal disposing As Boolean)
If disposing Then
If Not components Is Nothing Then
components.Dispose()
End If
End If
MyBase.Dispose(disposing)
End Sub
Private components As System.ComponentModel.IContainer = Nothing
End Class
End Namespace