Imports System.Threading
Imports System.Environment

Namespace State
    ''' <summary>
    ''' Helper Class to hold User State
    ''' </summary>
    Public Class UserState
        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 Int16
        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
        ''' </summary>
        Public Sub New()
            Language = Thread.CurrentThread.CurrentCulture.Name
            UserName = Environment.UserName
            MachineName = Environment.MachineName
        End Sub
    End Class
End Namespace

