MS Änderungen login

This commit is contained in:
Digital Data - Marlon Schreiber
2018-06-20 12:50:55 +02:00
parent bb412d1141
commit e38b5366a7
10 changed files with 658 additions and 96 deletions

View File

@@ -1,11 +1,12 @@
Imports System.Threading
Imports System.ComponentModel
Imports System.Threading
Imports DD_LIB_Standards
Public Class frmMain
Dim WithEvents Hotkey As New clsHotkey(Me)
Private PID As Integer
Private WithEvents _Watcher As ClipboardWatcher = ClipboardWatcher.Singleton
Private Sub frmClipboardWatch_Disposed(ByVal sender As Object, _
Private Sub frmClipboardWatch_Disposed(ByVal sender As Object,
ByVal e As EventArgs) Handles Me.Disposed
_Watcher.Dispose()
End Sub
@@ -94,13 +95,13 @@ Public Class frmMain
Private Sub frmMain_FormClosing(sender As Object, e As FormClosingEventArgs) Handles Me.FormClosing
clsLogger.Add(">> Logout time: " & Now.ToString, False)
If ERROR_INIT = "INVALID USER" Then
If ERROR_INIT = "INVALID USER" Or ERROR_INIT = "NO CLIENT" Then
Exit Sub
End If
Try
'Dim sql = String.Format("UPDATE TBDD_USER SET LOGGED_IN = 0, LOGGED_WHERE = '{0}' WHERE (LOWER(USERNAME) = LOWER('{1}'))", "", USER_USERNAME)
'clsDatabase.Execute_non_Query(sql, True)
Dim sql = "DELETE FROM TBDD_USER_MODULE_LOG_IN WHERE USER_ID = " & USER_GUID & " AND UPPER(MODULE) = UPPER('Clipboard-Watcher')"
Dim sql = "DELETE FROM TBDD_USER_MODULE_LOG_IN WHERE USER_ID = " & USER_ID & " AND UPPER(MODULE) = UPPER('Clipboard-Watcher')"
clsDatabase.Execute_non_Query(sql, True)
ClassWindowLocation.SaveFormLocationSize(Me, "")
My.Settings.Save()
@@ -140,6 +141,15 @@ Public Class frmMain
End If
If clsDatabase.DB_DEFAULT_INITIALIZED = True Then
If ERROR_INIT <> "" Then
If ERROR_INIT = "NO CLIENT" Then
MsgBox("You are not related to a client!" & vbNewLine & "Please contact the system administrator!", MsgBoxStyle.Exclamation)
Else
MsgBox("Sorry Something went wrong in user configuration!" & vbNewLine & "Please contact the system administrator!", MsgBoxStyle.Exclamation)
End If
Exit Sub
End If
Me.NotifyIconMain.Visible = True
clsHotkey.Refresh_Profile_Links()
Hotkey.AddHotKey(Keys.T, clsHotkey.MODKEY.MOD_CONTROL, 354522017)
@@ -266,4 +276,7 @@ Public Class frmMain
Me.Hide()
End Sub
Private Sub frmMain_Closing(sender As Object, e As CancelEventArgs) Handles Me.Closing
End Sub
End Class