MS24112015

This commit is contained in:
SchreiberM
2015-11-24 11:13:04 +01:00
parent 80247e18dd
commit ad1308fe18
47 changed files with 5379 additions and 1570 deletions

View File

@@ -1,4 +1,5 @@
Public Class frmHotKey_Add
Dim Form_loaded As Boolean = False
Private Control_Sequence As Integer
Private Sub ObjektTypenEintragen()
Try
@@ -32,6 +33,8 @@
Me.TBHOTKEY_USER_PROFILETableAdapter.Connection.ConnectionString = MyConnectionString
Me.TBHOTKEY_PATTERNS_REWORKTableAdapter.Connection.ConnectionString = MyConnectionString
Me.TBHOTKEY_WINDOW_HOOKTableAdapter.Connection.ConnectionString = MyConnectionString
TabControlDetails.SelectedIndex = 0
TabControl1.SelectedIndex = 0
Load_Profiles()
load_users()
GroupBox1.Visible = True
@@ -240,12 +243,12 @@
Console.WriteLine(e.KeyCode)
End Sub
Private Sub TabControl1_SelectedIndexChanged(sender As Object, e As EventArgs) Handles TabControl1.SelectedIndexChanged
Select Case TabControl1.SelectedIndex
Private Sub TabControl1_SelectedIndexChanged(sender As Object, e As EventArgs) Handles TabControlMain.SelectedIndexChanged
Select Case TabControlMain.SelectedIndex
Case 0
TabControl2.SelectedIndex = 0
TabControl3.SelectedIndex = 0
TabControl1.SelectedIndex = 0
TabControlDetails.SelectedIndex = 0
Load_Profiles()
Case 1
If NAMETextBox.Text <> "" And CheckFormTitle_isOpen(WINDOW_NAMETextBox.Text) = True Then
@@ -335,17 +338,7 @@
TBHOTKEY_USER_PROFILETableAdapter.cmdInsert(userid, ListBox_Profiles.SelectedValue)
added += 1
End If
'If Not UserExists(USERNAME) Then
' SQL = "INSERT INTO TBDD_USER(PRENAME, NAME, USERNAME, EMAIL, MODULE_GI,ADDED_WHO) VALUES('" & PRENAME & "', '" & Name & "', '" & USERNAME & "','" & email & "'," & 1 & ",'" & Environment.UserName & "')"
' If ClassDatabase.Execute_non_Query(SQL) = True Then
' usersAdded = usersAdded + 1
' End If
'Else
' SQL = "UPDATE TBDD_USER SET MODULE_GI = 1 WHERE UPPER(USERNAME) = UPPER('" & USERNAME & "')"
' If ClassDatabase.Execute_non_Query(SQL) = True Then
' usersAdded = usersAdded + 1
' End If
'End If
Next
Else
@@ -377,9 +370,9 @@
Next
End Sub
Private Sub TabControl2_SelectedIndexChanged(sender As Object, e As EventArgs) Handles TabControl2.SelectedIndexChanged
Private Sub TabControl2_SelectedIndexChanged(sender As Object, e As EventArgs) Handles TabControl1.SelectedIndexChanged
GroupBoxPatterns.Visible = False
Select Case TabControl2.SelectedIndex
Select Case TabControl1.SelectedIndex
Case 0
GroupBoxPatterns.Visible = True
Case 2
@@ -406,7 +399,7 @@
Private Sub ListBox_Profiles_SelectedIndexChanged(sender As Object, e As EventArgs) Handles ListBox_Profiles.SelectedIndexChanged
If ListBox_Profiles.SelectedIndex <> -1 Then
Select Case TabControl2.SelectedIndex
Select Case TabControl1.SelectedIndex
Case 1
'Try
' TBHOTKEY_PROFILETableAdapter.FillByID(MyDataset.TBHOTKEY_PROFILE, ListBox_Profiles.SelectedValue)
@@ -458,17 +451,6 @@
TBHOTKEY_USER_PROFILETableAdapter.Delete(ID)
deleted += 1
End If
'If Not UserExists(USERNAME) Then
' SQL = "INSERT INTO TBDD_USER(PRENAME, NAME, USERNAME, EMAIL, MODULE_GI,ADDED_WHO) VALUES('" & PRENAME & "', '" & Name & "', '" & USERNAME & "','" & email & "'," & 1 & ",'" & Environment.UserName & "')"
' If ClassDatabase.Execute_non_Query(SQL) = True Then
' usersAdded = usersAdded + 1
' End If
'Else
' SQL = "UPDATE TBDD_USER SET MODULE_GI = 1 WHERE UPPER(USERNAME) = UPPER('" & USERNAME & "')"
' If ClassDatabase.Execute_non_Query(SQL) = True Then
' usersAdded = usersAdded + 1
' End If
'End If
Next
Else
@@ -493,6 +475,26 @@
TBHOTKEY_PROFILEBindingSource.EndEdit()
TBHOTKEY_PROFILETableAdapter.Update(MyDataset.TBHOTKEY_PROFILE)
Me.lblSave.Visible = True
Dim result As MsgBoxResult
If USER_LANGUAGE = "de-DE" Then
result = MessageBox.Show("Wollen Sie die Änderungen im Hotkey-Profil auch in den Userprofilen vornehmen?", "Bestätigung erforderlich:", MessageBoxButtons.YesNo, MessageBoxIcon.Question)
Else
result = MessageBox.Show("Dow You want to update the userprofiles also with the changes in the profile?", "Confirmation required:", MessageBoxButtons.YesNo, MessageBoxIcon.Question)
End If
If result = MsgBoxResult.Yes Then
Try
Dim update = "UPDATE TBHOTKEY_USER_PROFILE SET WD_SEARCH = '" & WD_SEARCHTextBox.Text & "', HOTKEY1 = '" & HOTKEY1ComboBox.Text & "', HOTKEY2 = '" & HOTKEY2TextBox.Text & "' WHERE HKPROFILE_ID = " & GUIDTextBox.Text
If ClassDatabase.Execute_non_Query(update, True) Then
If USER_LANGUAGE = "de-DE" Then
MsgBox("User-Profile erfolgreich aktualisiert!", MsgBoxStyle.Information)
Else
MsgBox("Userprofiles successfull updated!", MsgBoxStyle.Information)
End If
End If
Catch ex As Exception
MsgBox("Error in Refresh Userprofiles: " & vbNewLine & ex.Message, MsgBoxStyle.Critical)
End Try
End If
Else
Me.lblSave.Visible = False
End If
@@ -729,4 +731,12 @@
TEXT1TextBox.ForeColor = Color.Black
End If
End Sub
Private Sub frmHotKey_Add_Shown(sender As Object, e As EventArgs) Handles Me.Shown
Form_loaded = True
If GUIDTextBox.Text <> String.Empty Then
GroupBoxPatterns.Visible = True
End If
End Sub
End Class