Hauptfenster
This commit is contained in:
@@ -85,23 +85,29 @@ Public Class frmLogin
|
||||
lblVersion.ContextMenuStrip = ctxUpdate
|
||||
If Application.ProductVersion.StartsWith("0") Then lblVersion.Text += " BETA"
|
||||
|
||||
'STARTPARAMETER - DP
|
||||
'STARTPARAMETER - DP
|
||||
Dim PARAM = ""
|
||||
Dim parameter() As String = Environment.GetCommandLineArgs().ToArray
|
||||
If (parameter.Count - 1) >= 1 Then 'Höher als 1 weil der index 0 der Pfad zum programm ist
|
||||
PARAM = parameter(1)
|
||||
End If
|
||||
|
||||
' Dim exename = IO.Path.GetFileName(Application.ExecutablePath)
|
||||
If PARAM = "" Then 'nur wenn keinee Startparameter gesetzt sind...
|
||||
|
||||
If System.AppDomain.CurrentDomain.BaseDirectory = "\\share01\Programme\AVISO\" OrElse System.AppDomain.CurrentDomain.BaseDirectory = "\\share01\f\Programme\AVISO\" OrElse System.AppDomain.CurrentDomain.BaseDirectory = "\\install\Programme\AVISO\" OrElse
|
||||
If Not File.Exists(Application.StartupPath & "\BACKUP.txt") Then
|
||||
If AppDomain.CurrentDomain.BaseDirectory.ToString.StartsWith("\\") Then
|
||||
MsgBox("AVISO kann nur lokal gestartet werden." & vbNewLine & "Bei Fragen bitte an die EDV wenden.")
|
||||
Exit Sub
|
||||
End If
|
||||
If System.AppDomain.CurrentDomain.BaseDirectory = "\\share01\Programme\AVISO\" OrElse System.AppDomain.CurrentDomain.BaseDirectory = "\\share01\f\Programme\AVISO\" OrElse System.AppDomain.CurrentDomain.BaseDirectory = "\\install\Programme\AVISO\" OrElse
|
||||
System.AppDomain.CurrentDomain.BaseDirectory = "\\share01\Programme\AVISO_INSTALL\" OrElse System.AppDomain.CurrentDomain.BaseDirectory = "\\share01\f\Programme\AVISO_INSTALL\" OrElse System.AppDomain.CurrentDomain.BaseDirectory = "\\install\Programme\AVISO_INSTALL\" OrElse
|
||||
System.AppDomain.CurrentDomain.BaseDirectory = "F:\PROGRAMME\AVISO\" OrElse System.AppDomain.CurrentDomain.BaseDirectory = "F:\PROGRAMME\AVISO_INSTALL\" OrElse
|
||||
System.AppDomain.CurrentDomain.BaseDirectory.Contains("F:\") OrElse System.AppDomain.CurrentDomain.BaseDirectory.Contains("\\share") OrElse System.AppDomain.CurrentDomain.BaseDirectory.Contains("\\install") Then
|
||||
MsgBox("Programm kann im Quellpfad " & System.AppDomain.CurrentDomain.BaseDirectory & " nicht gestartet werden!" & vbNewLine & "Vorgang wird abgebrochen!", MsgBoxStyle.Critical)
|
||||
Application.Exit()
|
||||
Me.Close()
|
||||
Exit Sub
|
||||
MsgBox("Programm kann im Quellpfad " & System.AppDomain.CurrentDomain.BaseDirectory & " nicht gestartet werden!" & vbNewLine & "Vorgang wird abgebrochen!", MsgBoxStyle.Critical)
|
||||
Application.Exit()
|
||||
Me.Close()
|
||||
Exit Sub
|
||||
End If
|
||||
End If
|
||||
|
||||
End If
|
||||
@@ -142,7 +148,7 @@ Public Class frmLogin
|
||||
Try
|
||||
Dim WI = System.Security.Principal.WindowsIdentity.GetCurrent().Name
|
||||
If WI.Contains("\") Then
|
||||
Dim Split() = WI.split("\")
|
||||
Dim Split() = WI.Split("\")
|
||||
'Dim UsernameTMP = ADMIN.getUstName_ByAD(Split(0), Split(1))
|
||||
Dim firmaTmp = ADMIN.getUstFirma_ByAD(Split(0), Split(1))
|
||||
If firmaTmp = "" Then
|
||||
@@ -165,7 +171,7 @@ Public Class frmLogin
|
||||
' Me.Visible = False
|
||||
' Me.Hide()
|
||||
|
||||
|
||||
|
||||
If PARAM = "DIENSTPLAN" Then
|
||||
Me.ShowInTaskbar = False
|
||||
VERAG_PROG_ALLGEMEIN.cAllgemein.FIRMA = "VERAG"
|
||||
@@ -561,10 +567,7 @@ Public Class frmLogin
|
||||
' UPDATEUpdater
|
||||
|
||||
'todo prüfung nicht aus nw-laufwerk starten (start wit \\)
|
||||
If AppDomain.CurrentDomain.BaseDirectory.ToString.StartsWith("\\") Then
|
||||
MsgBox("AVISO kann nur lokal gestartet werden." & vbNewLine & "Bei Fragen bitte an die EDV wenden.")
|
||||
Exit Sub
|
||||
End If
|
||||
|
||||
|
||||
If cProgramFunctions.updateUpdater() Then
|
||||
MsgBox("Der Aviso-Updater wurde aktualisiert. Es muss ein Update durchgeführt werden.")
|
||||
|
||||
Reference in New Issue
Block a user