45 lines
1.5 KiB
VB.net
45 lines
1.5 KiB
VB.net
Imports System.Threading
|
|
|
|
Namespace State
|
|
''' <summary>
|
|
''' Helper Class to hold User State
|
|
''' </summary>
|
|
Public Class UserState
|
|
Public Const LANG_DE_DE As String = "de-DE"
|
|
Public Const LANG_EN_US As String = "en-US"
|
|
|
|
Public Property UserId As Integer
|
|
Public Property UserName As String
|
|
Public Property Surname As String
|
|
Public Property GivenName As String
|
|
Public Property ShortName As String
|
|
Public Property Email As String
|
|
Public Property MachineName As String
|
|
Public Property DateFormat As String
|
|
Public Property Language As String
|
|
Public Property LanguageId As Integer
|
|
Public Property IsAdmin As Boolean = False
|
|
|
|
Public Property HideBasicConfig As Boolean = False
|
|
|
|
''' <summary>
|
|
''' Initialize user object with values that can be read from the environment. Only meant for Global Application State
|
|
''' </summary>
|
|
Public Sub New()
|
|
Language = Thread.CurrentThread.CurrentCulture.Name
|
|
UserName = System.Environment.UserName
|
|
MachineName = System.Environment.MachineName
|
|
End Sub
|
|
|
|
''' <summary>
|
|
''' Initialize user object with user id. Mandatory for sending user data between systems.
|
|
''' </summary>
|
|
''' <param name="pUserId"></param>
|
|
Public Sub New(pUserId As Integer)
|
|
MyBase.New()
|
|
UserId = pUserId
|
|
End Sub
|
|
End Class
|
|
End Namespace
|
|
|