28 lines
922 B
VB.net
28 lines
922 B
VB.net
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
|