jj: client suite
This commit is contained in:
27
EDMI_ClientSuite/ClassLayout.vb
Normal file
27
EDMI_ClientSuite/ClassLayout.vb
Normal file
@@ -0,0 +1,27 @@
|
||||
Imports System.IO
|
||||
Imports DevExpress.Utils.Serializing
|
||||
|
||||
Public Class ClassLayout
|
||||
Public Const LAYOUT_FOLDER = "Layout"
|
||||
|
||||
Public Enum LayoutName
|
||||
LayoutMain
|
||||
End Enum
|
||||
|
||||
Public Enum LayoutComponent
|
||||
DockManager
|
||||
DocumentManager
|
||||
End Enum
|
||||
|
||||
Public Shared Function GetLayoutPath(LayoutName As LayoutName, Component As LayoutComponent) As String
|
||||
Dim oFileName As String = $"{LayoutName.ToString}-{Component.ToString}.xml"
|
||||
Return IO.Path.Combine(GetAppDataFolder(), LAYOUT_FOLDER, oFileName)
|
||||
End Function
|
||||
|
||||
Private Shared Function GetAppDataFolder() As String
|
||||
Dim oLocalAppData = Environment.GetFolderPath(Environment.SpecialFolder.LocalApplicationData)
|
||||
Dim oProduct = My.Application.Info.ProductName
|
||||
Dim oCompany = My.Application.Info.CompanyName
|
||||
Return Path.Combine(oLocalAppData, oCompany, oProduct)
|
||||
End Function
|
||||
End Class
|
||||
Reference in New Issue
Block a user