jj: client suite
This commit is contained in:
74
EDMI_ClientSuite/frmMain.vb
Normal file
74
EDMI_ClientSuite/frmMain.vb
Normal file
@@ -0,0 +1,74 @@
|
||||
Imports DevExpress.XtraBars.Docking2010.Views
|
||||
Imports DevExpress.XtraBars.Docking2010
|
||||
Imports DevExpress.XtraBars.Docking2010.Views.Widget
|
||||
Imports System.ComponentModel
|
||||
Imports EDMI_ClientSuite.ClassLayout
|
||||
Imports System.IO
|
||||
|
||||
Public Class frmMain
|
||||
Public Sub New()
|
||||
InitializeComponent()
|
||||
|
||||
Dim oForm As New frmSplash()
|
||||
oForm.ShowDialog()
|
||||
End Sub
|
||||
|
||||
Private Sub FrmMain_Load(sender As Object, e As EventArgs) Handles Me.Load
|
||||
LabelCurrentUser.Caption = Environment.UserName
|
||||
LabelCurrentMachine.Caption = Environment.MachineName
|
||||
LabelCurrentVersion.Caption = My.Application.Info.Version.ToString
|
||||
|
||||
Dim oDashboard = New frmDashboard()
|
||||
oDashboard.MdiParent = DocumentManager.MdiParent
|
||||
oDashboard.Show()
|
||||
|
||||
LoadLayout()
|
||||
End Sub
|
||||
|
||||
Private Sub FrmMain_Closing(sender As Object, e As CancelEventArgs) Handles Me.Closing
|
||||
SaveLayout()
|
||||
End Sub
|
||||
|
||||
Private Sub LoadLayout()
|
||||
Dim oLayoutPathForDockManager As String = GetLayoutPath(LayoutName.LayoutMain, LayoutComponent.DockManager)
|
||||
Dim oLayoutPathForDocumentManager As String = GetLayoutPath(LayoutName.LayoutMain, LayoutComponent.DocumentManager)
|
||||
|
||||
If IO.File.Exists(oLayoutPathForDockManager) Then
|
||||
DockManager.RestoreLayoutFromXml(oLayoutPathForDockManager)
|
||||
End If
|
||||
|
||||
If IO.File.Exists(oLayoutPathForDocumentManager) Then
|
||||
DocumentManager.View.RestoreLayoutFromXml(oLayoutPathForDocumentManager)
|
||||
End If
|
||||
End Sub
|
||||
Private Sub SaveLayout()
|
||||
Dim oLayoutPathForDockManager As String = GetLayoutPath(LayoutName.LayoutMain, LayoutComponent.DockManager)
|
||||
Dim oLayoutPathForDocumentManager As String = GetLayoutPath(LayoutName.LayoutMain, LayoutComponent.DocumentManager)
|
||||
Dim oDirectory As String = Path.GetDirectoryName(oLayoutPathForDockManager)
|
||||
|
||||
If Not Directory.Exists(oDirectory) Then
|
||||
Directory.CreateDirectory(oDirectory)
|
||||
End If
|
||||
|
||||
DockManager.SaveLayoutToXml(oLayoutPathForDockManager)
|
||||
DocumentManager.View.SaveLayoutToXml(oLayoutPathForDocumentManager)
|
||||
End Sub
|
||||
|
||||
Private Sub BarButtonUserSettings_ItemClick(sender As Object, e As DevExpress.XtraBars.ItemClickEventArgs) Handles BarButtonUserSettings.ItemClick
|
||||
Dim frm As New frmUserBasics()
|
||||
frm.MdiParent = DocumentManager.MdiParent
|
||||
frm.Show()
|
||||
End Sub
|
||||
|
||||
Private Sub BarButtonDashboard_ItemClick(sender As Object, e As DevExpress.XtraBars.ItemClickEventArgs) Handles BarButtonDashboard.ItemClick
|
||||
Dim frm As New frmDashboard()
|
||||
frm.MdiParent = DocumentManager.MdiParent
|
||||
frm.Show()
|
||||
End Sub
|
||||
|
||||
Private Sub BarButtonItem1_ItemClick(sender As Object, e As DevExpress.XtraBars.ItemClickEventArgs) Handles BarButtonItem1.ItemClick
|
||||
Dim frm As New frmFileTest(MyLogConfig)
|
||||
frm.MdiParent = DocumentManager.MdiParent
|
||||
frm.Show()
|
||||
End Sub
|
||||
End Class
|
||||
Reference in New Issue
Block a user