Mini Kabibi Habibi
Imports System
Imports System.Reflection
Imports System.Collections
Imports System.ComponentModel
Imports System.Drawing
Imports System.Windows.Forms
Imports DevExpress.XtraNavBar
Imports DevExpress.DXperience.Demos
Imports DevExpress.XtraBars
Imports DevExpress.LookAndFeel
Namespace XtraPrintingDemos
Public Class DemosInfo
Inherits ModulesInfo
Public Overloads Shared Sub ShowModule(ByVal name As String, ByVal groupControl As DevExpress.XtraEditors.GroupControl, ByVal lookAndFeel As DevExpress.LookAndFeel.DefaultLookAndFeel, ByVal caption As DevExpress.Utils.Frames.ApplicationCaption)
Dim item As ModuleInfo = DemosInfo.GetItem(name)
Dim currentCursor As Cursor = Cursor.Current
Cursor.Current = Cursors.WaitCursor
Try
Dim oldTutorial As Control = Nothing
If Not (Instance.CurrentModuleBase Is Nothing) Then
If Instance.CurrentModuleBase.Name = name Then
Return
End If
Instance.CurrentModuleBase.TModule.Visible = False
End If
Dim tutorial As TutorialControlBase = item.TModule '
tutorial.Bounds = groupControl.DisplayRectangle
Instance.CurrentModuleBase = item
tutorial.Visible = False
groupControl.Controls.Add(tutorial)
tutorial.Dock = DockStyle.Fill
tutorial.TutorialName = name
tutorial.Caption = caption
tutorial.Visible = True
tutorial.BringToFront()
tutorial.Focus()
If (Not item.WasShown) AndAlso TypeOf tutorial Is ModuleControl Then
CType(tutorial, ModuleControl).Activate()
If tutorial.GetType().Name <> "MainFeaturesControl" Then
item.WasShown = True
End If
End If
If Not (oldTutorial Is Nothing) Then
oldTutorial.Visible = False
End If
Finally
Cursor.Current = currentCursor
End Try
RaiseModuleChanged()
End Sub 'ShowModule
End Class 'DemosInfo
End Namespace 'XtraPrintingDemos