WIP Panel Manager

This commit is contained in:
Jonathan Jenne
2019-03-08 15:00:47 +01:00
parent 3ee971fd14
commit e7e6d73411
13 changed files with 388 additions and 35 deletions

View File

@@ -8,8 +8,10 @@ Imports DevExpress.LookAndFeel
Imports DevExpress.XtraBars.Ribbon
Imports DevExpress.XtraBars.Docking
Imports DevExpress.XtraGrid
Imports DevExpress.XtraBars.Docking2010.Views
Public Class frmMain
Private _PanelManager As ClassPanelManager
Private _Timer As ClassTimer
Private _Loading As Boolean = True
@@ -44,6 +46,9 @@ Public Class frmMain
_Timer = New ClassTimer(My.LogConfig, Me, My.SysConfig.HeartbeatInterval)
AddHandler _Timer.OnlineChanged, AddressOf HandleOnlineChanged
' Initialize Panel Manager
_PanelManager = New ClassPanelManager(My.LogConfig, DocumentManager, DockManager)
' Show Service Status Label
SetOnlineLabel()
@@ -192,6 +197,8 @@ Public Class frmMain
End Sub
Private Sub MainNav_SelectedItemChanging(sender As Object, e As DevExpress.XtraBars.Navigation.SelectedItemChangingEventArgs) Handles MainNav.SelectedItemChanging
Select Case e.Item.Name
Case NavbarItemHome.Name
Dim oForm As New frmHome()
@@ -201,35 +208,6 @@ Public Class frmMain
Dim oForm As New frmSearch()
oForm.MdiParent = DocumentManager.MdiParent
oForm.Show()
Dim oSearchPanel = DockManager.AddPanel(DockingStyle.Bottom)
oSearchPanel.Options.ShowCloseButton = False
oSearchPanel.Options.ShowAutoHideButton = False
oSearchPanel.Text = "Search " & New Random().Next()
oSearchPanel.Controls.Add(New GridControl With {.Dock = DockStyle.Fill})
Dim oSearchPanel2 = DockManager.AddPanel(DockingStyle.Bottom)
oSearchPanel2.Options.ShowCloseButton = False
oSearchPanel2.Options.ShowAutoHideButton = False
oSearchPanel2.Text = "Search " & New Random().Next()
oSearchPanel2.Controls.Add(New GridControl With {.Dock = DockStyle.Fill})
oSearchPanel2.DockTo(oSearchPanel)
AddHandler oForm.FormClosed, Sub()
oSearchPanel.Close()
oSearchPanel2.Close()
End Sub
'AddHandler oForm.Deactivate, Sub()
' oSearchPanel.Visibility = DockVisibility.Hidden
' oSearchPanel2.Visibility = DockVisibility.Hidden
' End Sub
'AddHandler oForm.Activated, Sub()
' oSearchPanel2.Visibility = DockVisibility.Visible
' oSearchPanel.Visibility = DockVisibility.Visible
' End Sub
End Select
e.Cancel = True