JJ 21.09.15 Splashscreen
This commit is contained in:
81
app/DD-Record-Organiser/ClassInit.vb
Normal file
81
app/DD-Record-Organiser/ClassInit.vb
Normal file
@@ -0,0 +1,81 @@
|
|||||||
|
Imports System.ComponentModel
|
||||||
|
|
||||||
|
Public Class ClassInit
|
||||||
|
Public Sub New()
|
||||||
|
End Sub
|
||||||
|
|
||||||
|
Public Sub InitLogger()
|
||||||
|
ClassLogger.Init("", Environment.UserName)
|
||||||
|
'Throw New Exception("Dummy Fehler!")
|
||||||
|
End Sub
|
||||||
|
|
||||||
|
Public Sub InitDatabase()
|
||||||
|
Dim dbResult As Boolean
|
||||||
|
|
||||||
|
MySettings_Load()
|
||||||
|
If MyConnectionString <> String.Empty Then
|
||||||
|
dbResult = ClassDatabase.Init()
|
||||||
|
Else
|
||||||
|
frmConfig_Basic.ShowDialog()
|
||||||
|
dbResult = ClassDatabase.Init()
|
||||||
|
End If
|
||||||
|
|
||||||
|
If dbResult = False Then
|
||||||
|
Throw New Exception("Fehler beim Initialisieren der Datenbank. Weitere Informationen finden Sie in der Logdatei.")
|
||||||
|
End If
|
||||||
|
End Sub
|
||||||
|
|
||||||
|
Public Sub InitWindream()
|
||||||
|
Dim configResult As Boolean
|
||||||
|
configResult = Settings_LoadBasicConfig()
|
||||||
|
|
||||||
|
If configResult = False Then
|
||||||
|
Throw New Exception("Fehler beim Initialisieren der Windream-Einstellungen. Weitere Informationen finden Sie in der Logdatei.")
|
||||||
|
End If
|
||||||
|
End Sub
|
||||||
|
|
||||||
|
Public Sub InitUserLogin()
|
||||||
|
Dim sql = sql_UserID
|
||||||
|
sql = sql.Replace("@user", Environment.UserName)
|
||||||
|
ClassLogger.Add(">> Username: " & Environment.UserName, False)
|
||||||
|
|
||||||
|
USER_GUID = ClassDatabase.Execute_Scalar(sql)
|
||||||
|
If USER_GUID Is Nothing Then
|
||||||
|
ClassLogger.Add(" - User: " & Environment.UserName & " nicht in der Userverwaltung hinterlegt!", False)
|
||||||
|
'MsgBox("Achtung: Sie sind nicht in der Userverwaltung hinterlegt." & vbNewLine & "Bitte setzen Sie sich mit dem Systembetreuer in Verbindung!", MsgBoxStyle.Critical, "Achtung:")
|
||||||
|
'Me.Close()
|
||||||
|
Throw New Exception("Sie sind nicht in der Userverwaltung hinterlegt." & vbNewLine & "Bitte setzen Sie sich mit dem Systembetreuer in Verbindung!")
|
||||||
|
Else
|
||||||
|
sql = "SELECT MODULE_RECORD_ORG FROM TBDD_USER WHERE (LOWER(USERNAME) = LOWER('@user'))"
|
||||||
|
sql = sql.Replace("@user", Environment.UserName)
|
||||||
|
If ClassDatabase.Execute_Scalar(sql) = False Then
|
||||||
|
ClassLogger.Add(" - User: " & Environment.UserName & " nicht für Modul freigegben!", False)
|
||||||
|
'MsgBox("Achtung: Sie sind nicht für die Nutzung dieses Moduls freigeschaltet." & vbNewLine & "Bitte setzen Sie sich mit dem Systembetreuer in Verbindung!", MsgBoxStyle.Critical, "Achtung:")
|
||||||
|
Throw New Exception("Sie sind nicht für die Nutzung dieses Moduls freigeschaltet." & vbNewLine & "Bitte setzen Sie sich mit dem Systembetreuer in Verbindung!")
|
||||||
|
'Me.Close()
|
||||||
|
Else
|
||||||
|
'Am System anmelden
|
||||||
|
sql = sql_User_Login
|
||||||
|
sql = sql.Replace("@LogInOut", 1)
|
||||||
|
sql = sql.Replace("@ANGEMELDETWO", Environment.MachineName)
|
||||||
|
sql = sql.Replace("@user", Environment.UserName)
|
||||||
|
ClassDatabase.Execute_non_Query(sql)
|
||||||
|
sql = "INSERT INTO TBDD_USER_MODULE_LOG_IN (USER_ID,MODULE) VALUES (" & USER_GUID & ",'RECORD_ORGANIZER')"
|
||||||
|
ClassDatabase.Execute_non_Query(sql)
|
||||||
|
sql = "SELECT RECORD_ADMIN FROM TBDD_USER WHERE (LOWER(USERNAME) = LOWER('@user'))"
|
||||||
|
sql = sql.Replace("@user", Environment.UserName)
|
||||||
|
USER_IS_ADMIN = ClassDatabase.Execute_Scalar(sql)
|
||||||
|
'If USER_IS_ADMIN = True Then
|
||||||
|
' 'Admin
|
||||||
|
' pageAdmin.Visible = True
|
||||||
|
'End If
|
||||||
|
|
||||||
|
sql = "SELECT COUNT(*) AS Expr1 FROM TBDD_USER_MODULE_LOG_IN WHERE MODULE = 'RECORD_ORGANIZER'"
|
||||||
|
Dim anzahl = ClassDatabase.Execute_Scalar(sql)
|
||||||
|
USERS_LOGGED_IN = CInt(anzahl)
|
||||||
|
'LabelLoggedIn.Caption = "Anzahl Angemeldete User: " & anzahl.ToString
|
||||||
|
End If
|
||||||
|
End If
|
||||||
|
End Sub
|
||||||
|
|
||||||
|
End Class
|
||||||
@@ -267,6 +267,7 @@
|
|||||||
<Compile Include="ClassFunctionCommandsUI.vb" />
|
<Compile Include="ClassFunctionCommandsUI.vb" />
|
||||||
<Compile Include="ClassHelper.vb" />
|
<Compile Include="ClassHelper.vb" />
|
||||||
<Compile Include="ClassImport_Windream.vb" />
|
<Compile Include="ClassImport_Windream.vb" />
|
||||||
|
<Compile Include="ClassInit.vb" />
|
||||||
<Compile Include="ClassLayout.vb" />
|
<Compile Include="ClassLayout.vb" />
|
||||||
<Compile Include="ClassLogger.vb" />
|
<Compile Include="ClassLogger.vb" />
|
||||||
<Compile Include="ClassDatabase.vb" />
|
<Compile Include="ClassDatabase.vb" />
|
||||||
|
|||||||
@@ -24,6 +24,12 @@ Module ModuleMySettings
|
|||||||
Public vFILE_DELIMITER As String = "_"
|
Public vFILE_DELIMITER As String = "_"
|
||||||
|
|
||||||
Public USER_IS_ADMIN = False
|
Public USER_IS_ADMIN = False
|
||||||
|
Public USERS_LOGGED_IN = 0
|
||||||
|
Public USER_GUID = 0
|
||||||
|
|
||||||
|
Public sql_User_Login As String = "UPDATE TBDD_USER SET LOGGED_IN = @LogInOut, LOGGED_WHERE = '@ANGEMELDETWO' WHERE (LOWER(USERNAME) = LOWER('@user'))"
|
||||||
|
Public sql_UserID As String = "SELECT GUID FROM TBDD_USER WHERE (LOWER(USERNAME) = LOWER('@user'))"
|
||||||
|
|
||||||
Dim rowresult As String = ""
|
Dim rowresult As String = ""
|
||||||
Public Function MySettings_Load()
|
Public Function MySettings_Load()
|
||||||
Try
|
Try
|
||||||
|
|||||||
@@ -1,14 +1,16 @@
|
|||||||
DevExpress.XtraBars.Navigation.TileNavPane, DevExpress.XtraBars.v14.2, Version=14.2.3.0, Culture=neutral, PublicKeyToken=b88d1754d700e49a
|
|
||||||
DevExpress.XtraVerticalGrid.PropertyGridControl, DevExpress.XtraVerticalGrid.v14.2, Version=14.2.3.0, Culture=neutral, PublicKeyToken=b88d1754d700e49a
|
|
||||||
DevExpress.XtraNavBar.NavBarControl, DevExpress.XtraNavBar.v14.2, Version=14.2.3.0, Culture=neutral, PublicKeyToken=b88d1754d700e49a
|
|
||||||
DevExpress.XtraWizard.WizardControl, DevExpress.XtraWizard.v14.2, Version=14.2.3.0, Culture=neutral, PublicKeyToken=b88d1754d700e49a
|
|
||||||
DevExpress.XtraGrid.GridControl, DevExpress.XtraGrid.v14.2, Version=14.2.3.0, Culture=neutral, PublicKeyToken=b88d1754d700e49a
|
|
||||||
DevExpress.XtraVerticalGrid.VGridControl, DevExpress.XtraVerticalGrid.v14.2, Version=14.2.3.0, Culture=neutral, PublicKeyToken=b88d1754d700e49a
|
|
||||||
DevExpress.XtraEditors.DateEdit, DevExpress.XtraEditors.v14.2, Version=14.2.3.0, Culture=neutral, PublicKeyToken=b88d1754d700e49a
|
|
||||||
DevExpress.XtraScheduler.SchedulerControl, DevExpress.XtraScheduler.v14.2, Version=14.2.3.0, Culture=neutral, PublicKeyToken=b88d1754d700e49a
|
|
||||||
DevExpress.XtraTreeList.TreeList, DevExpress.XtraTreeList.v14.2, Version=14.2.3.0, Culture=neutral, PublicKeyToken=b88d1754d700e49a
|
|
||||||
DevExpress.XtraBars.Ribbon.RibbonControl, DevExpress.XtraBars.v14.2, Version=14.2.3.0, Culture=neutral, PublicKeyToken=b88d1754d700e49a
|
|
||||||
DevExpress.XtraBars.Navigation.OfficeNavigationBar, DevExpress.XtraBars.v14.2, Version=14.2.3.0, Culture=neutral, PublicKeyToken=b88d1754d700e49a
|
|
||||||
DevExpress.XtraEditors.CheckEdit, DevExpress.XtraEditors.v14.2, Version=14.2.3.0, Culture=neutral, PublicKeyToken=b88d1754d700e49a
|
|
||||||
DevExpress.XtraEditors.TileControl, DevExpress.XtraEditors.v14.2, Version=14.2.3.0, Culture=neutral, PublicKeyToken=b88d1754d700e49a
|
|
||||||
DevExpress.XtraEditors.TextEdit, DevExpress.XtraEditors.v14.2, Version=14.2.3.0, Culture=neutral, PublicKeyToken=b88d1754d700e49a
|
DevExpress.XtraEditors.TextEdit, DevExpress.XtraEditors.v14.2, Version=14.2.3.0, Culture=neutral, PublicKeyToken=b88d1754d700e49a
|
||||||
|
DevExpress.XtraNavBar.NavBarControl, DevExpress.XtraNavBar.v14.2, Version=14.2.3.0, Culture=neutral, PublicKeyToken=b88d1754d700e49a
|
||||||
|
DevExpress.XtraVerticalGrid.VGridControl, DevExpress.XtraVerticalGrid.v14.2, Version=14.2.3.0, Culture=neutral, PublicKeyToken=b88d1754d700e49a
|
||||||
|
DevExpress.XtraGrid.GridControl, DevExpress.XtraGrid.v14.2, Version=14.2.3.0, Culture=neutral, PublicKeyToken=b88d1754d700e49a
|
||||||
|
DevExpress.XtraEditors.ProgressBarControl, DevExpress.XtraEditors.v14.2, Version=14.2.3.0, Culture=neutral, PublicKeyToken=b88d1754d700e49a
|
||||||
|
DevExpress.XtraScheduler.SchedulerControl, DevExpress.XtraScheduler.v14.2, Version=14.2.3.0, Culture=neutral, PublicKeyToken=b88d1754d700e49a
|
||||||
|
DevExpress.XtraWizard.WizardControl, DevExpress.XtraWizard.v14.2, Version=14.2.3.0, Culture=neutral, PublicKeyToken=b88d1754d700e49a
|
||||||
|
DevExpress.XtraEditors.CheckEdit, DevExpress.XtraEditors.v14.2, Version=14.2.3.0, Culture=neutral, PublicKeyToken=b88d1754d700e49a
|
||||||
|
DevExpress.XtraBars.Ribbon.RibbonControl, DevExpress.XtraBars.v14.2, Version=14.2.3.0, Culture=neutral, PublicKeyToken=b88d1754d700e49a
|
||||||
|
DevExpress.XtraEditors.DateEdit, DevExpress.XtraEditors.v14.2, Version=14.2.3.0, Culture=neutral, PublicKeyToken=b88d1754d700e49a
|
||||||
|
DevExpress.XtraEditors.ButtonEdit, DevExpress.XtraEditors.v14.2, Version=14.2.3.0, Culture=neutral, PublicKeyToken=b88d1754d700e49a
|
||||||
|
DevExpress.XtraBars.Navigation.OfficeNavigationBar, DevExpress.XtraBars.v14.2, Version=14.2.3.0, Culture=neutral, PublicKeyToken=b88d1754d700e49a
|
||||||
|
DevExpress.XtraBars.Navigation.TileNavPane, DevExpress.XtraBars.v14.2, Version=14.2.3.0, Culture=neutral, PublicKeyToken=b88d1754d700e49a
|
||||||
|
DevExpress.XtraEditors.TileControl, DevExpress.XtraEditors.v14.2, Version=14.2.3.0, Culture=neutral, PublicKeyToken=b88d1754d700e49a
|
||||||
|
DevExpress.XtraVerticalGrid.PropertyGridControl, DevExpress.XtraVerticalGrid.v14.2, Version=14.2.3.0, Culture=neutral, PublicKeyToken=b88d1754d700e49a
|
||||||
|
DevExpress.XtraTreeList.TreeList, DevExpress.XtraTreeList.v14.2, Version=14.2.3.0, Culture=neutral, PublicKeyToken=b88d1754d700e49a
|
||||||
|
|||||||
@@ -5,10 +5,12 @@ Imports System.ComponentModel
|
|||||||
|
|
||||||
Public Class frmMain
|
Public Class frmMain
|
||||||
|
|
||||||
Dim sql_User_Login As String = "UPDATE TBDD_USER SET LOGGED_IN = @LogInOut, LOGGED_WHERE = '@ANGEMELDETWO' WHERE (LOWER(USERNAME) = LOWER('@user'))"
|
'Ausgelagert in ModuleMySettings.vb
|
||||||
Dim sql_UserID As String = "SELECT GUID FROM TBDD_USER WHERE (LOWER(USERNAME) = LOWER('@user'))"
|
'Dim sql_User_Login As String = "UPDATE TBDD_USER SET LOGGED_IN = @LogInOut, LOGGED_WHERE = '@ANGEMELDETWO' WHERE (LOWER(USERNAME) = LOWER('@user'))"
|
||||||
|
'Dim sql_UserID As String = "SELECT GUID FROM TBDD_USER WHERE (LOWER(USERNAME) = LOWER('@user'))"
|
||||||
|
'Private USER_GUID
|
||||||
|
|
||||||
|
|
||||||
Private USER_GUID
|
|
||||||
Private Sub frmMain_FormClosing(sender As Object, e As FormClosingEventArgs) Handles Me.FormClosing
|
Private Sub frmMain_FormClosing(sender As Object, e As FormClosingEventArgs) Handles Me.FormClosing
|
||||||
Try
|
Try
|
||||||
Dim sql = sql_User_Login
|
Dim sql = sql_User_Login
|
||||||
@@ -73,6 +75,7 @@ Public Class frmMain
|
|||||||
Dim itemTitle As String = subRow.Item("MENU_ENTRY")
|
Dim itemTitle As String = subRow.Item("MENU_ENTRY")
|
||||||
Dim tag As String = subRow.Item("FORM_ID")
|
Dim tag As String = subRow.Item("FORM_ID")
|
||||||
Dim item As New BarButtonItem(ribbonMain.Manager, itemTitle)
|
Dim item As New BarButtonItem(ribbonMain.Manager, itemTitle)
|
||||||
|
|
||||||
Dim subimage As Bitmap = LoadImage(subRow.Item("ICON_PATH"))
|
Dim subimage As Bitmap = LoadImage(subRow.Item("ICON_PATH"))
|
||||||
|
|
||||||
item.RibbonStyle = RibbonItemStyles.SmallWithText
|
item.RibbonStyle = RibbonItemStyles.SmallWithText
|
||||||
@@ -196,67 +199,83 @@ Public Class frmMain
|
|||||||
LabelUser.Caption = Environment.UserName
|
LabelUser.Caption = Environment.UserName
|
||||||
LabelMachine.Caption = My.Computer.Name
|
LabelMachine.Caption = My.Computer.Name
|
||||||
|
|
||||||
ClassLogger.Init("", Environment.UserName)
|
SetBackground()
|
||||||
|
|
||||||
|
Dim splash As New frmSplash()
|
||||||
|
splash.ShowDialog()
|
||||||
|
|
||||||
|
'init
|
||||||
|
'ClassLogger.Init("", Environment.UserName)
|
||||||
|
|
||||||
' Status Labels setzen
|
' Status Labels setzen
|
||||||
SetBackground()
|
|
||||||
MySettings_Load()
|
|
||||||
If MyConnectionString <> String.Empty Then
|
'init
|
||||||
ClassDatabase.Init()
|
'MySettings_Load()
|
||||||
Else
|
|
||||||
frmConfig_Basic.ShowDialog()
|
'init
|
||||||
ClassDatabase.Init()
|
'If MyConnectionString <> String.Empty Then
|
||||||
|
' ClassDatabase.Init()
|
||||||
|
'Else
|
||||||
|
' frmConfig_Basic.ShowDialog()
|
||||||
|
' ClassDatabase.Init()
|
||||||
|
'End If
|
||||||
|
|
||||||
|
'init
|
||||||
|
'Settings_LoadBasicConfig()
|
||||||
|
|
||||||
|
'init
|
||||||
|
'Dim sql = sql_UserID
|
||||||
|
'sql = sql.Replace("@user", Environment.UserName)
|
||||||
|
'ClassLogger.Add(">> Username: " & Environment.UserName, False)
|
||||||
|
|
||||||
|
'USER_GUID = ClassDatabase.Execute_Scalar(sql)
|
||||||
|
'If USER_GUID Is Nothing Then
|
||||||
|
' ClassLogger.Add(" - User: " & Environment.UserName & " nicht in der Userverwaltung hinterlegt!", False)
|
||||||
|
' MsgBox("Achtung: Sie sind nicht in der Userverwaltung hinterlegt." & vbNewLine & "Bitte setzen Sie sich mit dem Systembetreuer in Verbindung!", MsgBoxStyle.Critical, "Achtung:")
|
||||||
|
' Me.Close()
|
||||||
|
'Else
|
||||||
|
' sql = "SELECT MODULE_RECORD_ORG FROM TBDD_USER WHERE (LOWER(USERNAME) = LOWER('@user'))"
|
||||||
|
' sql = sql.Replace("@user", Environment.UserName)
|
||||||
|
' If ClassDatabase.Execute_Scalar(sql) = False Then
|
||||||
|
' ClassLogger.Add(" - User: " & Environment.UserName & " nicht für Modul freigegben!", False)
|
||||||
|
' MsgBox("Achtung: Sie sind nicht für die Nutzung dieses Moduls freigeschaltet." & vbNewLine & "Bitte setzen Sie sich mit dem Systembetreuer in Verbindung!", MsgBoxStyle.Critical, "Achtung:")
|
||||||
|
' Me.Close()
|
||||||
|
' Else
|
||||||
|
' 'Am System anmelden
|
||||||
|
' sql = sql_User_Login
|
||||||
|
' sql = sql.Replace("@LogInOut", 1)
|
||||||
|
' sql = sql.Replace("@ANGEMELDETWO", Environment.MachineName)
|
||||||
|
' sql = sql.Replace("@user", Environment.UserName)
|
||||||
|
' ClassDatabase.Execute_non_Query(sql)
|
||||||
|
' sql = "INSERT INTO TBDD_USER_MODULE_LOG_IN (USER_ID,MODULE) VALUES (" & USER_GUID & ",'RECORD_ORGANIZER')"
|
||||||
|
' ClassDatabase.Execute_non_Query(sql)
|
||||||
|
' sql = "SELECT RECORD_ADMIN FROM TBDD_USER WHERE (LOWER(USERNAME) = LOWER('@user'))"
|
||||||
|
' sql = sql.Replace("@user", Environment.UserName)
|
||||||
|
' USER_IS_ADMIN = ClassDatabase.Execute_Scalar(sql)
|
||||||
|
' If USER_IS_ADMIN = True Then
|
||||||
|
' 'Admin
|
||||||
|
' pageAdmin.Visible = True
|
||||||
|
' End If
|
||||||
|
|
||||||
|
' sql = "SELECT COUNT(*) AS Expr1 FROM TBDD_USER_MODULE_LOG_IN WHERE MODULE = 'RECORD_ORGANIZER'"
|
||||||
|
' Dim anzahl = ClassDatabase.Execute_Scalar(sql)
|
||||||
|
' 'tslblUserLoggedin.Text = "Anzahl Angemeldete User: " & anzahl.ToString
|
||||||
|
' LabelLoggedIn.Caption = "Anzahl Angemeldete User: " & anzahl.ToString
|
||||||
|
' End If
|
||||||
|
'End If
|
||||||
|
|
||||||
|
If USER_IS_ADMIN = True Then
|
||||||
|
pageAdmin.Visible = True
|
||||||
End If
|
End If
|
||||||
|
|
||||||
Settings_LoadBasicConfig()
|
LabelLoggedIn.Caption = "Anzahl Angemeldete User: " & USERS_LOGGED_IN.ToString()
|
||||||
|
|
||||||
|
|
||||||
Dim sql = sql_UserID
|
|
||||||
sql = sql.Replace("@user", Environment.UserName)
|
|
||||||
ClassLogger.Add(">> Username: " & Environment.UserName, False)
|
|
||||||
|
|
||||||
USER_GUID = ClassDatabase.Execute_Scalar(sql)
|
|
||||||
If USER_GUID Is Nothing Then
|
|
||||||
ClassLogger.Add(" - User: " & Environment.UserName & " nicht in der Userverwaltung hinterlegt!", False)
|
|
||||||
MsgBox("Achtung: Sie sind nicht in der Userverwaltung hinterlegt." & vbNewLine & "Bitte setzen Sie sich mit dem Systembetreuer in Verbindung!", MsgBoxStyle.Critical, "Achtung:")
|
|
||||||
Me.Close()
|
|
||||||
Else
|
|
||||||
sql = "SELECT MODULE_RECORD_ORG FROM TBDD_USER WHERE (LOWER(USERNAME) = LOWER('@user'))"
|
|
||||||
sql = sql.Replace("@user", Environment.UserName)
|
|
||||||
If ClassDatabase.Execute_Scalar(sql) = False Then
|
|
||||||
ClassLogger.Add(" - User: " & Environment.UserName & " nicht für Modul freigegben!", False)
|
|
||||||
MsgBox("Achtung: Sie sind nicht für die Nutzung dieses Moduls freigeschaltet." & vbNewLine & "Bitte setzen Sie sich mit dem Systembetreuer in Verbindung!", MsgBoxStyle.Critical, "Achtung:")
|
|
||||||
Me.Close()
|
|
||||||
Else
|
|
||||||
'Am System anmelden
|
|
||||||
sql = sql_User_Login
|
|
||||||
sql = sql.Replace("@LogInOut", 1)
|
|
||||||
sql = sql.Replace("@ANGEMELDETWO", Environment.MachineName)
|
|
||||||
sql = sql.Replace("@user", Environment.UserName)
|
|
||||||
ClassDatabase.Execute_non_Query(sql)
|
|
||||||
sql = "INSERT INTO TBDD_USER_MODULE_LOG_IN (USER_ID,MODULE) VALUES (" & USER_GUID & ",'RECORD_ORGANIZER')"
|
|
||||||
ClassDatabase.Execute_non_Query(sql)
|
|
||||||
sql = "SELECT RECORD_ADMIN FROM TBDD_USER WHERE (LOWER(USERNAME) = LOWER('@user'))"
|
|
||||||
sql = sql.Replace("@user", Environment.UserName)
|
|
||||||
USER_IS_ADMIN = ClassDatabase.Execute_Scalar(sql)
|
|
||||||
If USER_IS_ADMIN = True Then
|
|
||||||
'Admin
|
|
||||||
pageAdmin.Visible = True
|
|
||||||
End If
|
|
||||||
|
|
||||||
sql = "SELECT COUNT(*) AS Expr1 FROM TBDD_USER_MODULE_LOG_IN WHERE MODULE = 'RECORD_ORGANIZER'"
|
|
||||||
Dim anzahl = ClassDatabase.Execute_Scalar(sql)
|
|
||||||
'tslblUserLoggedin.Text = "Anzahl Angemeldete User: " & anzahl.ToString
|
|
||||||
LabelLoggedIn.Caption = "Anzahl Angemeldete User: " & anzahl.ToString
|
|
||||||
End If
|
|
||||||
End If
|
|
||||||
'LoadMenuItems()
|
'LoadMenuItems()
|
||||||
LoadMenuItems2()
|
LoadMenuItems2()
|
||||||
LoadQuickStartItems()
|
LoadQuickStartItems()
|
||||||
VWPMO_WF_USER_ACTIVETableAdapter.Connection.ConnectionString = MyConnectionString
|
VWPMO_WF_USER_ACTIVETableAdapter.Connection.ConnectionString = MyConnectionString
|
||||||
VWPMO_WF_USER_ACTIVETableAdapter.Connection.ConnectionString = MyConnectionString
|
VWPMO_WF_USER_ACTIVETableAdapter.Connection.ConnectionString = MyConnectionString
|
||||||
|
|
||||||
|
|
||||||
Catch ex As Exception
|
Catch ex As Exception
|
||||||
MsgBox("Error in Load Form:" & vbNewLine & ex.Message, MsgBoxStyle.Critical)
|
MsgBox("Error in Load Form:" & vbNewLine & ex.Message, MsgBoxStyle.Critical)
|
||||||
End Try
|
End Try
|
||||||
|
|||||||
118
app/DD-Record-Organiser/frmSplash.Designer.vb
generated
118
app/DD-Record-Organiser/frmSplash.Designer.vb
generated
@@ -16,8 +16,6 @@ Partial Class frmSplash
|
|||||||
Friend WithEvents ApplicationTitle As System.Windows.Forms.Label
|
Friend WithEvents ApplicationTitle As System.Windows.Forms.Label
|
||||||
Friend WithEvents Version As System.Windows.Forms.Label
|
Friend WithEvents Version As System.Windows.Forms.Label
|
||||||
Friend WithEvents Copyright As System.Windows.Forms.Label
|
Friend WithEvents Copyright As System.Windows.Forms.Label
|
||||||
Friend WithEvents MainLayoutPanel As System.Windows.Forms.TableLayoutPanel
|
|
||||||
Friend WithEvents DetailsLayoutPanel As System.Windows.Forms.TableLayoutPanel
|
|
||||||
|
|
||||||
'Wird vom Windows Form-Designer benötigt.
|
'Wird vom Windows Form-Designer benötigt.
|
||||||
Private components As System.ComponentModel.IContainer
|
Private components As System.ComponentModel.IContainer
|
||||||
@@ -27,99 +25,113 @@ Partial Class frmSplash
|
|||||||
'Das Bearbeiten mit dem Code-Editor ist nicht möglich.
|
'Das Bearbeiten mit dem Code-Editor ist nicht möglich.
|
||||||
<System.Diagnostics.DebuggerStepThrough()> _
|
<System.Diagnostics.DebuggerStepThrough()> _
|
||||||
Private Sub InitializeComponent()
|
Private Sub InitializeComponent()
|
||||||
Me.MainLayoutPanel = New System.Windows.Forms.TableLayoutPanel()
|
|
||||||
Me.DetailsLayoutPanel = New System.Windows.Forms.TableLayoutPanel()
|
|
||||||
Me.Version = New System.Windows.Forms.Label()
|
Me.Version = New System.Windows.Forms.Label()
|
||||||
Me.Copyright = New System.Windows.Forms.Label()
|
Me.Copyright = New System.Windows.Forms.Label()
|
||||||
Me.ApplicationTitle = New System.Windows.Forms.Label()
|
Me.ApplicationTitle = New System.Windows.Forms.Label()
|
||||||
Me.MainLayoutPanel.SuspendLayout()
|
Me.lblStatus = New System.Windows.Forms.Label()
|
||||||
Me.DetailsLayoutPanel.SuspendLayout()
|
Me.pbStatus = New System.Windows.Forms.ProgressBar()
|
||||||
|
Me.TableLayoutPanel1 = New System.Windows.Forms.TableLayoutPanel()
|
||||||
|
Me.TableLayoutPanel1.SuspendLayout()
|
||||||
Me.SuspendLayout()
|
Me.SuspendLayout()
|
||||||
'
|
'
|
||||||
'MainLayoutPanel
|
|
||||||
'
|
|
||||||
Me.MainLayoutPanel.BackgroundImage = Global.DD_Record_Organiser.My.Resources.Resources.DD_Icons_ADDI
|
|
||||||
Me.MainLayoutPanel.BackgroundImageLayout = System.Windows.Forms.ImageLayout.Center
|
|
||||||
Me.MainLayoutPanel.ColumnCount = 2
|
|
||||||
Me.MainLayoutPanel.ColumnStyles.Add(New System.Windows.Forms.ColumnStyle(System.Windows.Forms.SizeType.Absolute, 243.0!))
|
|
||||||
Me.MainLayoutPanel.ColumnStyles.Add(New System.Windows.Forms.ColumnStyle(System.Windows.Forms.SizeType.Absolute, 100.0!))
|
|
||||||
Me.MainLayoutPanel.Controls.Add(Me.DetailsLayoutPanel, 1, 1)
|
|
||||||
Me.MainLayoutPanel.Controls.Add(Me.ApplicationTitle, 1, 0)
|
|
||||||
Me.MainLayoutPanel.Dock = System.Windows.Forms.DockStyle.Fill
|
|
||||||
Me.MainLayoutPanel.Location = New System.Drawing.Point(0, 0)
|
|
||||||
Me.MainLayoutPanel.Name = "MainLayoutPanel"
|
|
||||||
Me.MainLayoutPanel.RowStyles.Add(New System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Absolute, 308.0!))
|
|
||||||
Me.MainLayoutPanel.RowStyles.Add(New System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Absolute, 71.0!))
|
|
||||||
Me.MainLayoutPanel.Size = New System.Drawing.Size(574, 417)
|
|
||||||
Me.MainLayoutPanel.TabIndex = 0
|
|
||||||
'
|
|
||||||
'DetailsLayoutPanel
|
|
||||||
'
|
|
||||||
Me.DetailsLayoutPanel.Anchor = System.Windows.Forms.AnchorStyles.None
|
|
||||||
Me.DetailsLayoutPanel.BackColor = System.Drawing.Color.Transparent
|
|
||||||
Me.DetailsLayoutPanel.ColumnCount = 1
|
|
||||||
Me.DetailsLayoutPanel.ColumnStyles.Add(New System.Windows.Forms.ColumnStyle(System.Windows.Forms.SizeType.Absolute, 247.0!))
|
|
||||||
Me.DetailsLayoutPanel.ColumnStyles.Add(New System.Windows.Forms.ColumnStyle(System.Windows.Forms.SizeType.Absolute, 142.0!))
|
|
||||||
Me.DetailsLayoutPanel.Controls.Add(Me.Version, 0, 0)
|
|
||||||
Me.DetailsLayoutPanel.Controls.Add(Me.Copyright, 0, 1)
|
|
||||||
Me.DetailsLayoutPanel.Location = New System.Drawing.Point(285, 323)
|
|
||||||
Me.DetailsLayoutPanel.Name = "DetailsLayoutPanel"
|
|
||||||
Me.DetailsLayoutPanel.RowStyles.Add(New System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Percent, 33.0!))
|
|
||||||
Me.DetailsLayoutPanel.RowStyles.Add(New System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Percent, 33.0!))
|
|
||||||
Me.DetailsLayoutPanel.Size = New System.Drawing.Size(247, 79)
|
|
||||||
Me.DetailsLayoutPanel.TabIndex = 1
|
|
||||||
'
|
|
||||||
'Version
|
'Version
|
||||||
'
|
'
|
||||||
Me.Version.Anchor = System.Windows.Forms.AnchorStyles.None
|
|
||||||
Me.Version.BackColor = System.Drawing.Color.Transparent
|
Me.Version.BackColor = System.Drawing.Color.Transparent
|
||||||
Me.Version.Font = New System.Drawing.Font("Franklin Gothic Medium", 9.0!, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, CType(0, Byte))
|
Me.Version.Dock = System.Windows.Forms.DockStyle.Fill
|
||||||
Me.Version.Location = New System.Drawing.Point(3, 9)
|
Me.Version.Font = New System.Drawing.Font("Segoe UI", 9.0!, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, CType(0, Byte))
|
||||||
|
Me.Version.Location = New System.Drawing.Point(3, 0)
|
||||||
Me.Version.Name = "Version"
|
Me.Version.Name = "Version"
|
||||||
Me.Version.Size = New System.Drawing.Size(241, 20)
|
Me.Version.Size = New System.Drawing.Size(241, 21)
|
||||||
Me.Version.TabIndex = 1
|
Me.Version.TabIndex = 1
|
||||||
Me.Version.Text = "Version {0}.{1:00}"
|
Me.Version.Text = "Version {0}.{1:00}"
|
||||||
|
Me.Version.TextAlign = System.Drawing.ContentAlignment.MiddleLeft
|
||||||
'
|
'
|
||||||
'Copyright
|
'Copyright
|
||||||
'
|
'
|
||||||
Me.Copyright.Anchor = System.Windows.Forms.AnchorStyles.None
|
|
||||||
Me.Copyright.BackColor = System.Drawing.Color.Transparent
|
Me.Copyright.BackColor = System.Drawing.Color.Transparent
|
||||||
Me.Copyright.Font = New System.Drawing.Font("Microsoft Sans Serif", 9.0!, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, CType(0, Byte))
|
Me.Copyright.Dock = System.Windows.Forms.DockStyle.Fill
|
||||||
Me.Copyright.Location = New System.Drawing.Point(3, 39)
|
Me.Copyright.Font = New System.Drawing.Font("Segoe UI", 9.0!, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, CType(0, Byte))
|
||||||
|
Me.Copyright.Location = New System.Drawing.Point(3, 21)
|
||||||
Me.Copyright.Name = "Copyright"
|
Me.Copyright.Name = "Copyright"
|
||||||
Me.Copyright.Size = New System.Drawing.Size(241, 40)
|
Me.Copyright.Size = New System.Drawing.Size(241, 21)
|
||||||
Me.Copyright.TabIndex = 2
|
Me.Copyright.TabIndex = 2
|
||||||
Me.Copyright.Text = "Copyright"
|
Me.Copyright.Text = "Copyright"
|
||||||
|
Me.Copyright.TextAlign = System.Drawing.ContentAlignment.MiddleLeft
|
||||||
'
|
'
|
||||||
'ApplicationTitle
|
'ApplicationTitle
|
||||||
'
|
'
|
||||||
Me.ApplicationTitle.Anchor = System.Windows.Forms.AnchorStyles.None
|
Me.ApplicationTitle.Anchor = System.Windows.Forms.AnchorStyles.None
|
||||||
Me.ApplicationTitle.BackColor = System.Drawing.Color.Transparent
|
Me.ApplicationTitle.BackColor = System.Drawing.Color.Transparent
|
||||||
Me.ApplicationTitle.Font = New System.Drawing.Font("Microsoft Sans Serif", 18.0!, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, CType(0, Byte))
|
Me.ApplicationTitle.Font = New System.Drawing.Font("Segoe UI", 18.0!, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, CType(0, Byte))
|
||||||
Me.ApplicationTitle.Location = New System.Drawing.Point(294, 48)
|
Me.ApplicationTitle.Location = New System.Drawing.Point(343, 210)
|
||||||
Me.ApplicationTitle.Name = "ApplicationTitle"
|
Me.ApplicationTitle.Name = "ApplicationTitle"
|
||||||
Me.ApplicationTitle.Size = New System.Drawing.Size(228, 212)
|
Me.ApplicationTitle.Size = New System.Drawing.Size(219, 136)
|
||||||
Me.ApplicationTitle.TabIndex = 0
|
Me.ApplicationTitle.TabIndex = 0
|
||||||
Me.ApplicationTitle.Text = "Anwendungstitel"
|
Me.ApplicationTitle.Text = "Anwendungstitel"
|
||||||
Me.ApplicationTitle.TextAlign = System.Drawing.ContentAlignment.BottomLeft
|
Me.ApplicationTitle.TextAlign = System.Drawing.ContentAlignment.BottomLeft
|
||||||
'
|
'
|
||||||
|
'lblStatus
|
||||||
|
'
|
||||||
|
Me.lblStatus.AutoSize = True
|
||||||
|
Me.lblStatus.BackColor = System.Drawing.SystemColors.Control
|
||||||
|
Me.lblStatus.Font = New System.Drawing.Font("Segoe UI", 9.0!, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, CType(0, Byte))
|
||||||
|
Me.lblStatus.Location = New System.Drawing.Point(4, 376)
|
||||||
|
Me.lblStatus.Name = "lblStatus"
|
||||||
|
Me.lblStatus.Size = New System.Drawing.Size(79, 15)
|
||||||
|
Me.lblStatus.TabIndex = 1
|
||||||
|
Me.lblStatus.Text = "Statusanzeige"
|
||||||
|
Me.lblStatus.TextAlign = System.Drawing.ContentAlignment.MiddleCenter
|
||||||
|
'
|
||||||
|
'pbStatus
|
||||||
|
'
|
||||||
|
Me.pbStatus.Dock = System.Windows.Forms.DockStyle.Bottom
|
||||||
|
Me.pbStatus.Location = New System.Drawing.Point(0, 394)
|
||||||
|
Me.pbStatus.Name = "pbStatus"
|
||||||
|
Me.pbStatus.Size = New System.Drawing.Size(574, 23)
|
||||||
|
Me.pbStatus.TabIndex = 0
|
||||||
|
'
|
||||||
|
'TableLayoutPanel1
|
||||||
|
'
|
||||||
|
Me.TableLayoutPanel1.ColumnCount = 1
|
||||||
|
Me.TableLayoutPanel1.ColumnStyles.Add(New System.Windows.Forms.ColumnStyle())
|
||||||
|
Me.TableLayoutPanel1.Controls.Add(Me.Copyright, 0, 1)
|
||||||
|
Me.TableLayoutPanel1.Controls.Add(Me.Version, 0, 0)
|
||||||
|
Me.TableLayoutPanel1.Location = New System.Drawing.Point(343, 349)
|
||||||
|
Me.TableLayoutPanel1.Name = "TableLayoutPanel1"
|
||||||
|
Me.TableLayoutPanel1.RowCount = 2
|
||||||
|
Me.TableLayoutPanel1.RowStyles.Add(New System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Percent, 50.0!))
|
||||||
|
Me.TableLayoutPanel1.RowStyles.Add(New System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Percent, 50.0!))
|
||||||
|
Me.TableLayoutPanel1.RowStyles.Add(New System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Absolute, 20.0!))
|
||||||
|
Me.TableLayoutPanel1.Size = New System.Drawing.Size(219, 42)
|
||||||
|
Me.TableLayoutPanel1.TabIndex = 2
|
||||||
|
'
|
||||||
'frmSplash
|
'frmSplash
|
||||||
'
|
'
|
||||||
Me.AutoScaleDimensions = New System.Drawing.SizeF(6.0!, 13.0!)
|
Me.AutoScaleDimensions = New System.Drawing.SizeF(6.0!, 13.0!)
|
||||||
Me.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font
|
Me.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font
|
||||||
|
Me.BackgroundImage = Global.DD_Record_Organiser.My.Resources.Resources.DD_Icons_ADDI
|
||||||
|
Me.BackgroundImageLayout = System.Windows.Forms.ImageLayout.Center
|
||||||
Me.ClientSize = New System.Drawing.Size(574, 417)
|
Me.ClientSize = New System.Drawing.Size(574, 417)
|
||||||
Me.ControlBox = False
|
Me.ControlBox = False
|
||||||
Me.Controls.Add(Me.MainLayoutPanel)
|
Me.Controls.Add(Me.TableLayoutPanel1)
|
||||||
|
Me.Controls.Add(Me.lblStatus)
|
||||||
|
Me.Controls.Add(Me.ApplicationTitle)
|
||||||
|
Me.Controls.Add(Me.pbStatus)
|
||||||
|
Me.DoubleBuffered = True
|
||||||
Me.FormBorderStyle = System.Windows.Forms.FormBorderStyle.FixedSingle
|
Me.FormBorderStyle = System.Windows.Forms.FormBorderStyle.FixedSingle
|
||||||
Me.MaximizeBox = False
|
Me.MaximizeBox = False
|
||||||
Me.MinimizeBox = False
|
Me.MinimizeBox = False
|
||||||
Me.Name = "frmSplash"
|
Me.Name = "frmSplash"
|
||||||
Me.ShowInTaskbar = False
|
Me.ShowInTaskbar = False
|
||||||
Me.StartPosition = System.Windows.Forms.FormStartPosition.CenterScreen
|
Me.StartPosition = System.Windows.Forms.FormStartPosition.CenterScreen
|
||||||
Me.MainLayoutPanel.ResumeLayout(False)
|
Me.TransparencyKey = System.Drawing.Color.White
|
||||||
Me.DetailsLayoutPanel.ResumeLayout(False)
|
Me.TableLayoutPanel1.ResumeLayout(False)
|
||||||
Me.ResumeLayout(False)
|
Me.ResumeLayout(False)
|
||||||
|
Me.PerformLayout()
|
||||||
|
|
||||||
End Sub
|
End Sub
|
||||||
|
Friend WithEvents lblStatus As System.Windows.Forms.Label
|
||||||
|
Friend WithEvents pbStatus As System.Windows.Forms.ProgressBar
|
||||||
|
Friend WithEvents TableLayoutPanel1 As System.Windows.Forms.TableLayoutPanel
|
||||||
|
|
||||||
End Class
|
End Class
|
||||||
|
|||||||
@@ -1,8 +1,11 @@
|
|||||||
Public NotInheritable Class frmSplash
|
Imports System.ComponentModel
|
||||||
|
|
||||||
|
Public NotInheritable Class frmSplash
|
||||||
|
|
||||||
'TODO: Dieses Formular kann einfach als Begrüßungsbildschirm für die Anwendung festgelegt werden, indem Sie zur Registerkarte "Anwendung"
|
'TODO: Dieses Formular kann einfach als Begrüßungsbildschirm für die Anwendung festgelegt werden, indem Sie zur Registerkarte "Anwendung"
|
||||||
' des Projekt-Designers wechseln (Menü "Projekt", Option "Eigenschaften").
|
' des Projekt-Designers wechseln (Menü "Projekt", Option "Eigenschaften").
|
||||||
|
Private InitSteps As Integer = 4
|
||||||
|
Private bw As New BackgroundWorker()
|
||||||
|
|
||||||
Private Sub frmSplash_Load(ByVal sender As Object, ByVal e As System.EventArgs) Handles Me.Load
|
Private Sub frmSplash_Load(ByVal sender As Object, ByVal e As System.EventArgs) Handles Me.Load
|
||||||
'Richten Sie den Dialogtext zur Laufzeit gemäß den Assemblyinformationen der Anwendung ein.
|
'Richten Sie den Dialogtext zur Laufzeit gemäß den Assemblyinformationen der Anwendung ein.
|
||||||
@@ -29,8 +32,63 @@
|
|||||||
Version.Text = System.String.Format(Version.Text, My.Application.Info.Version.Major, My.Application.Info.Version.Minor)
|
Version.Text = System.String.Format(Version.Text, My.Application.Info.Version.Major, My.Application.Info.Version.Minor)
|
||||||
|
|
||||||
'Copyrightinformationen
|
'Copyrightinformationen
|
||||||
Copyright.Text = My.Application.Info.Copyright
|
Copyright.Text = My.Application.Info.Copyright & " " & My.Application.Info.CompanyName
|
||||||
Me.BringToFront()
|
Me.BringToFront()
|
||||||
|
|
||||||
|
InitProgram()
|
||||||
End Sub
|
End Sub
|
||||||
|
|
||||||
|
Private Sub InitProgram()
|
||||||
|
bw.WorkerReportsProgress = True
|
||||||
|
AddHandler bw.DoWork, AddressOf bw_DoWork
|
||||||
|
AddHandler bw.ProgressChanged, AddressOf bw_ProgressChanged
|
||||||
|
AddHandler bw.RunWorkerCompleted, AddressOf bw_RunWorkerCompleted
|
||||||
|
|
||||||
|
bw.RunWorkerAsync()
|
||||||
|
End Sub
|
||||||
|
|
||||||
|
Private Function CalcProgress(_step As Integer)
|
||||||
|
Return _step * (100 / InitSteps)
|
||||||
|
End Function
|
||||||
|
|
||||||
|
|
||||||
|
Private Sub bw_DoWork(sender As Object, e As System.ComponentModel.DoWorkEventArgs)
|
||||||
|
Dim Init = New ClassInit()
|
||||||
|
|
||||||
|
bw.ReportProgress(CalcProgress(1), "Initialisiere Logger")
|
||||||
|
Init.InitLogger()
|
||||||
|
|
||||||
|
System.Threading.Thread.Sleep(500)
|
||||||
|
|
||||||
|
bw.ReportProgress(CalcProgress(2), "Initialisiere Datenbank")
|
||||||
|
Init.InitDatabase()
|
||||||
|
|
||||||
|
System.Threading.Thread.Sleep(500)
|
||||||
|
|
||||||
|
bw.ReportProgress(CalcProgress(3), "Initialisiere Windream-Einstellungen")
|
||||||
|
Init.InitWindream()
|
||||||
|
|
||||||
|
System.Threading.Thread.Sleep(500)
|
||||||
|
|
||||||
|
bw.ReportProgress(CalcProgress(4), "Initialisiere Benutzer")
|
||||||
|
Init.InitUserLogin()
|
||||||
|
|
||||||
|
System.Threading.Thread.Sleep(300)
|
||||||
|
End Sub
|
||||||
|
|
||||||
|
Private Sub bw_ProgressChanged(sender As Object, e As System.ComponentModel.ProgressChangedEventArgs)
|
||||||
|
pbStatus.Value = e.ProgressPercentage
|
||||||
|
lblStatus.Text = e.UserState.ToString()
|
||||||
|
End Sub
|
||||||
|
|
||||||
|
Private Sub bw_RunWorkerCompleted(sender As Object, e As System.ComponentModel.RunWorkerCompletedEventArgs)
|
||||||
|
' Bei Fehler MsgBox anzeigen und Programm beenden
|
||||||
|
If e.Error IsNot Nothing Then
|
||||||
|
MsgBox(e.Error.Message, MsgBoxStyle.Critical, "Fehler beim Initialisieren")
|
||||||
|
Application.Exit()
|
||||||
|
End If
|
||||||
|
|
||||||
|
' Wenn kein Fehler, Splashscreen schließen
|
||||||
|
Me.Close()
|
||||||
|
End Sub
|
||||||
End Class
|
End Class
|
||||||
|
|||||||
84
app/DD-Record-Organiser/nveup4i1.png
Normal file
84
app/DD-Record-Organiser/nveup4i1.png
Normal file
@@ -0,0 +1,84 @@
|
|||||||
|
Public NotInheritable Class frmSplash
|
||||||
|
|
||||||
|
'TODO: Dieses Formular kann einfach als Begrüßungsbildschirm für die Anwendung festgelegt werden, indem Sie zur Registerkarte "Anwendung"
|
||||||
|
' des Projekt-Designers wechseln (Menü "Projekt", Option "Eigenschaften").
|
||||||
|
Private Init As ClassInit
|
||||||
|
Private InitSteps As Integer = 4
|
||||||
|
|
||||||
|
Private Sub frmSplash_Load(ByVal sender As Object, ByVal e As System.EventArgs) Handles Me.Load
|
||||||
|
'Richten Sie den Dialogtext zur Laufzeit gemäß den Assemblyinformationen der Anwendung ein.
|
||||||
|
|
||||||
|
'TODO: Die Assemblyinformationen der Anwendung im Bereich "Anwendung" des Dialogfelds für die
|
||||||
|
' Projekteigenschaften (im Menü "Projekt") anpassen.
|
||||||
|
|
||||||
|
'Anwendungstitel
|
||||||
|
If My.Application.Info.Title <> "" Then
|
||||||
|
ApplicationTitle.Text = My.Application.Info.Title
|
||||||
|
Else
|
||||||
|
'Wenn der Anwendungstitel fehlt, Anwendungsnamen ohne Erweiterung verwenden
|
||||||
|
ApplicationTitle.Text = System.IO.Path.GetFileNameWithoutExtension(My.Application.Info.AssemblyName)
|
||||||
|
End If
|
||||||
|
|
||||||
|
'Verwenden Sie zum Formatieren der Versionsinformationen den Text, der zur Entwurfszeit in der Versionskontrolle festgelegt wurde, als
|
||||||
|
' Formatierungszeichenfolge. Dies ermöglicht ggf. eine effektive Lokalisierung.
|
||||||
|
' Build- und Revisionsinformationen können durch Verwendung des folgenden Codes und durch Ändern
|
||||||
|
' des Entwurfszeittexts der Versionskontrolle in "Version {0}.{1:00}.{2}.{3}" oder einen ähnlichen Text eingeschlossen werden. Weitere Informationen erhalten Sie unter
|
||||||
|
' String.Format() in der Hilfe.
|
||||||
|
'
|
||||||
|
' Version.Text = System.String.Format(Version.Text, My.Application.Info.Version.Major, My.Application.Info.Version.Minor, My.Application.Info.Version.Build, My.Application.Info.Version.Revision)
|
||||||
|
|
||||||
|
Version.Text = System.String.Format(Version.Text, My.Application.Info.Version.Major, My.Application.Info.Version.Minor)
|
||||||
|
|
||||||
|
'Copyrightinformationen
|
||||||
|
Copyright.Text = My.Application.Info.Copyright
|
||||||
|
Me.BringToFront()
|
||||||
|
|
||||||
|
InitProgram()
|
||||||
|
End Sub
|
||||||
|
|
||||||
|
Private Sub InitProgram()
|
||||||
|
Init = New ClassInit()
|
||||||
|
BackgroundWorker1.RunWorkerAsync()
|
||||||
|
End Sub
|
||||||
|
|
||||||
|
Private Function CalcProgress(_step As Integer)
|
||||||
|
Return _step * (100 / InitSteps)
|
||||||
|
End Function
|
||||||
|
|
||||||
|
|
||||||
|
Private Sub BackgroundWorker1_DoWork(sender As Object, e As System.ComponentModel.DoWorkEventArgs) Handles BackgroundWorker1.DoWork
|
||||||
|
BackgroundWorker1.ReportProgress(CalcProgress(1), "Initialisiere Logger")
|
||||||
|
Init.InitLogger()
|
||||||
|
|
||||||
|
System.Threading.Thread.Sleep(100)
|
||||||
|
|
||||||
|
BackgroundWorker1.ReportProgress(CalcProgress(2), "Initialisiere Datenbank")
|
||||||
|
Init.InitDatabase()
|
||||||
|
|
||||||
|
System.Threading.Thread.Sleep(100)
|
||||||
|
|
||||||
|
BackgroundWorker1.ReportProgress(CalcProgress(3), "Initialisiere Windream-Einstellungen")
|
||||||
|
Init.InitWindream()
|
||||||
|
|
||||||
|
System.Threading.Thread.Sleep(100)
|
||||||
|
|
||||||
|
BackgroundWorker1.ReportProgress(CalcProgress(4), "Initialisiere Benutzer")
|
||||||
|
Init.InitUserLogin()
|
||||||
|
End Sub
|
||||||
|
|
||||||
|
Private Sub BackgroundWorker1_ProgressChanged(sender As Object, e As System.ComponentModel.ProgressChangedEventArgs) Handles BackgroundWorker1.ProgressChanged
|
||||||
|
pbStatus.Value = e.ProgressPercentage
|
||||||
|
lblStatus.Text = e.UserState.ToString()
|
||||||
|
End Sub
|
||||||
|
|
||||||
|
Private Sub BackgroundWorker1_RunWorkerCompleted(sender As Object, e As System.ComponentModel.RunWorkerCompletedEventArgs) Handles BackgroundWorker1.RunWorkerCompleted
|
||||||
|
' Bei Fehler MsgBox anzeigen und Programm beenden
|
||||||
|
If e.Error IsNot Nothing Then
|
||||||
|
MsgBox(e.Error.Message, MsgBoxStyle.Critical, "Fehler beim Initialisieren")
|
||||||
|
Application.Exit()
|
||||||
|
End If
|
||||||
|
|
||||||
|
' Wenn kein Fehler, Splashscreen schließen
|
||||||
|
Me.Close()
|
||||||
|
End Sub
|
||||||
|
End Class
|
||||||
Reference in New Issue
Block a user