WIP
This commit is contained in:
@@ -2,6 +2,9 @@
|
||||
Public Class frmAdministration
|
||||
Private SelectedProcessName As String
|
||||
|
||||
Private Const MAX_DATA_SEARCHES = 5
|
||||
Private Const MAX_DOC_SEARCHES = 5
|
||||
|
||||
Class ProfileType
|
||||
Public Name As String
|
||||
Public Id As Int16
|
||||
@@ -82,7 +85,7 @@ Public Class frmAdministration
|
||||
MyDataset.TBCW_PROFILES.PROFILE_TYPEColumn.DefaultValue = 0
|
||||
MyDataset.TBCW_PROFILES.WD_SEARCHColumn.DefaultValue = String.Empty
|
||||
MyDataset.TBCW_PROFILES.REGEX_EXPRESSIONColumn.DefaultValue = ".+"
|
||||
MyDataset.TBCW_PROFILES.ACTIVEColumn.DefaultValue = False
|
||||
MyDataset.TBCW_PROFILES.ACTIVEColumn.DefaultValue = True
|
||||
|
||||
XtraTabControl3.SelectedTabPage = TabPageGeneralSettings
|
||||
End Sub
|
||||
@@ -108,9 +111,15 @@ Public Class frmAdministration
|
||||
|
||||
TBCW_PROF_DOC_SEARCHTableAdapter.Connection.ConnectionString = MyConnectionString
|
||||
TBCW_PROF_DOC_SEARCHTableAdapter.Fill(MyDataset.TBCW_PROF_DOC_SEARCH, GUIDTextBox.Text)
|
||||
If MyDataset.TBCW_PROF_DOC_SEARCH.Count = 0 Then
|
||||
LayoutControlDocs.Enabled = False
|
||||
End If
|
||||
|
||||
TBCW_PROF_DATA_SEARCHTableAdapter.Connection.ConnectionString = MyConnectionString
|
||||
TBCW_PROF_DATA_SEARCHTableAdapter.Fill(MyDataset.TBCW_PROF_DATA_SEARCH, GUIDTextBox.Text)
|
||||
If MyDataset.TBCW_PROF_DATA_SEARCH.Count = 0 Then
|
||||
LayoutControlData.Enabled = False
|
||||
End If
|
||||
Catch ex As Exception
|
||||
MsgBox("Unexpected Error in Refresh Profile User: " & vbNewLine & ex.Message, MsgBoxStyle.Critical)
|
||||
End Try
|
||||
@@ -232,17 +241,23 @@ Public Class frmAdministration
|
||||
End Sub
|
||||
|
||||
Private Sub TBCW_PROF_DATA_SEARCHBindingSource_AddingNew(sender As Object, e As System.ComponentModel.AddingNewEventArgs) Handles TBCW_PROF_DATA_SEARCHBindingSource.AddingNew
|
||||
|
||||
|
||||
MyDataset.TBCW_PROF_DATA_SEARCH.ADDED_WHOColumn.DefaultValue = Environment.UserName
|
||||
MyDataset.TBCW_PROF_DATA_SEARCH.PROFILE_IDColumn.DefaultValue = GUIDTextBox.Text
|
||||
MyDataset.TBCW_PROF_DATA_SEARCH.CONN_IDColumn.DefaultValue = 1
|
||||
MyDataset.TBCW_PROF_DATA_SEARCH.ACTIVEColumn.DefaultValue = False
|
||||
MyDataset.TBCW_PROF_DATA_SEARCH.ACTIVEColumn.DefaultValue = True
|
||||
|
||||
LayoutControlData.Enabled = True
|
||||
End Sub
|
||||
|
||||
Private Sub TBCW_PROF_DOC_SEARCHBindingSource_AddingNew(sender As Object, e As System.ComponentModel.AddingNewEventArgs) Handles TBCW_PROF_DOC_SEARCHBindingSource.AddingNew
|
||||
MyDataset.TBCW_PROF_DOC_SEARCH.ADDED_WHOColumn.DefaultValue = Environment.UserName
|
||||
MyDataset.TBCW_PROF_DOC_SEARCH.ACTIVEColumn.DefaultValue = False
|
||||
MyDataset.TBCW_PROF_DOC_SEARCH.ACTIVEColumn.DefaultValue = True
|
||||
MyDataset.TBCW_PROF_DOC_SEARCH.PROFILE_IDColumn.DefaultValue = GUIDTextBox.Text
|
||||
MyDataset.TBCW_PROF_DOC_SEARCH.CONN_IDColumn.DefaultValue = 1
|
||||
|
||||
LayoutControlDocs.Enabled = True
|
||||
End Sub
|
||||
|
||||
Private Sub ToolStripButton3_Click(sender As Object, e As EventArgs)
|
||||
@@ -302,7 +317,7 @@ Public Class frmAdministration
|
||||
MsgBox("Error while assigning process!", MsgBoxStyle.Critical, "Clipboard Watcher")
|
||||
End If
|
||||
|
||||
Status_Changed("Prozess gespeichert")
|
||||
Status_Changed("Prozess zugeordnet")
|
||||
End Sub
|
||||
|
||||
Private Sub BarButtonItem6_ItemClick(sender As Object, e As DevExpress.XtraBars.ItemClickEventArgs) Handles BarButtonItem6.ItemClick
|
||||
@@ -314,7 +329,7 @@ Public Class frmAdministration
|
||||
MsgBox("Error while deleting assignment of process!", MsgBoxStyle.Critical, "Clipboard Watcher")
|
||||
End If
|
||||
|
||||
Status_Changed("Prozess gelöscht")
|
||||
Status_Changed("Prozesszuordnung gelöscht")
|
||||
End Sub
|
||||
|
||||
Private Sub BarButtonItem7_ItemClick(sender As Object, e As DevExpress.XtraBars.ItemClickEventArgs) Handles BarButtonItem7.ItemClick
|
||||
@@ -322,7 +337,7 @@ Public Class frmAdministration
|
||||
MsgBox("Error while assigning window!", MsgBoxStyle.Critical, "Clipboard Watcher")
|
||||
End If
|
||||
|
||||
Status_Changed("Fenster gespeichert")
|
||||
Status_Changed("Fenster zugeordnet")
|
||||
End Sub
|
||||
|
||||
Private Sub BarButtonItem8_ItemClick(sender As Object, e As DevExpress.XtraBars.ItemClickEventArgs) Handles BarButtonItem8.ItemClick
|
||||
@@ -334,7 +349,7 @@ Public Class frmAdministration
|
||||
MsgBox("Error while deleting assignment of window!", MsgBoxStyle.Critical, "Clipboard Watcher")
|
||||
End If
|
||||
|
||||
Status_Changed("Fenster-Zuordnung gelöscht")
|
||||
Status_Changed("Fensterzuordnung gelöscht")
|
||||
End Sub
|
||||
|
||||
Private Sub BarButtonItem11_ItemClick(sender As Object, e As DevExpress.XtraBars.ItemClickEventArgs) Handles BarButtonItem11.ItemClick
|
||||
@@ -358,6 +373,8 @@ Public Class frmAdministration
|
||||
Refresh_ProfileData()
|
||||
|
||||
GridViewUserNotInProfile.ClearSelection()
|
||||
|
||||
Status_Changed($"{oSelectedRows.Count} Benutzer zugeordnet")
|
||||
Catch ex As Exception
|
||||
Logger.Error(ex)
|
||||
MsgBox("Unexpected Error while adding user-rights: " & vbNewLine & ex.Message, MsgBoxStyle.Critical)
|
||||
@@ -385,6 +402,8 @@ Public Class frmAdministration
|
||||
Refresh_ProfileData()
|
||||
|
||||
GridViewUserInProfile.ClearSelection()
|
||||
|
||||
Status_Changed($"{oSelectedRows.Count} Benutzerzuordnungen gelöscht")
|
||||
Catch ex As Exception
|
||||
Logger.Error(ex)
|
||||
MsgBox("Unexpected Error in deleting ProfileUserRelation: " & vbNewLine & ex.Message, MsgBoxStyle.Critical)
|
||||
@@ -409,6 +428,8 @@ Public Class frmAdministration
|
||||
|
||||
Refresh_Free_Groups(GUIDTextBox.Text)
|
||||
Refresh_ProfileData()
|
||||
|
||||
Status_Changed($"{oSelectedGroups.Count} Gruppen zugeordnet")
|
||||
Catch ex As Exception
|
||||
MsgBox("Unexpected Error while adding Group-Rights: " & vbNewLine & ex.Message, MsgBoxStyle.Critical)
|
||||
End Try
|
||||
@@ -432,6 +453,8 @@ Public Class frmAdministration
|
||||
|
||||
Refresh_Free_Groups(GUIDTextBox.Text)
|
||||
Refresh_ProfileData()
|
||||
|
||||
Status_Changed($"{oSelectedGroups.Count} Gruppenzuordnungen gelöscht")
|
||||
Catch ex As Exception
|
||||
MsgBox("Unexpected Error in deleting Group-Rights: " & vbNewLine & ex.Message, MsgBoxStyle.Critical)
|
||||
End Try
|
||||
@@ -506,6 +529,8 @@ Public Class frmAdministration
|
||||
If CtrlApplicationAssignment1.Window_SaveAssignment() = False Then
|
||||
MsgBox("Error while saving window", MsgBoxStyle.Critical, Text)
|
||||
End If
|
||||
|
||||
Status_Changed("Fensterzuordnung gespeichert")
|
||||
End Sub
|
||||
|
||||
Private Sub BarButtonItem17_ItemClick(sender As Object, e As DevExpress.XtraBars.ItemClickEventArgs) Handles BarButtonItem17.ItemClick
|
||||
@@ -514,6 +539,11 @@ Public Class frmAdministration
|
||||
End Sub
|
||||
|
||||
Private Sub BarButtonItem15_ItemClick(sender As Object, e As DevExpress.XtraBars.ItemClickEventArgs) Handles BarButtonItem15.ItemClick
|
||||
If TBCW_PROF_DOC_SEARCHBindingSource.Count = MAX_DOC_SEARCHES Then
|
||||
MsgBox($"Es können nicht mehr als {MAX_DOC_SEARCHES} Dokument-Suchen angelegt werden!", MsgBoxStyle.Exclamation, Text)
|
||||
Exit Sub
|
||||
End If
|
||||
|
||||
TBCW_PROF_DOC_SEARCHBindingSource.AddNew()
|
||||
End Sub
|
||||
|
||||
@@ -526,6 +556,7 @@ Public Class frmAdministration
|
||||
If result = MsgBoxResult.Yes Then
|
||||
TBCW_PROF_DATA_SEARCHTableAdapter.Delete(txtDATAGUID.Text)
|
||||
TBCW_PROF_DATA_SEARCHTableAdapter.Fill(MyDataset.TBCW_PROF_DATA_SEARCH, GUIDTextBox.Text)
|
||||
Status_Changed("Daten-Suche gelöscht")
|
||||
End If
|
||||
End Sub
|
||||
|
||||
@@ -536,6 +567,8 @@ Public Class frmAdministration
|
||||
CHANGED_WHOTextBox1.Text = Environment.UserName
|
||||
TBCW_PROF_DATA_SEARCHBindingSource.EndEdit()
|
||||
TBCW_PROF_DATA_SEARCHTableAdapter.Update(MyDataset.TBCW_PROF_DATA_SEARCH)
|
||||
TBCW_PROF_DATA_SEARCHTableAdapter.Fill(MyDataset.TBCW_PROF_DATA_SEARCH, GUIDTextBox.Text)
|
||||
Status_Changed("Daten-Suche gespeichert")
|
||||
End If
|
||||
Catch ex As NoNullAllowedException
|
||||
MsgBox("Ein oder mehrere Felder wurden nicht ausgefüllt:" & vbNewLine & ex.Message, MsgBoxStyle.Exclamation, Text)
|
||||
@@ -545,6 +578,11 @@ Public Class frmAdministration
|
||||
End Sub
|
||||
|
||||
Private Sub BarButtonItem20_ItemClick(sender As Object, e As DevExpress.XtraBars.ItemClickEventArgs) Handles BarButtonItem20.ItemClick
|
||||
If TBCW_PROF_DATA_SEARCHBindingSource.Count = MAX_DATA_SEARCHES Then
|
||||
MsgBox($"Es können nicht mehr als {MAX_DATA_SEARCHES} Daten-Suchen angelegt werden!", MsgBoxStyle.Exclamation, Text)
|
||||
Exit Sub
|
||||
End If
|
||||
|
||||
TBCW_PROF_DATA_SEARCHBindingSource.AddNew()
|
||||
End Sub
|
||||
|
||||
@@ -553,6 +591,7 @@ Public Class frmAdministration
|
||||
If result = MsgBoxResult.Yes Then
|
||||
TBCW_PROF_DOC_SEARCHTableAdapter.Delete(txtDOC_GUID.Text)
|
||||
TBCW_PROF_DOC_SEARCHTableAdapter.Fill(MyDataset.TBCW_PROF_DOC_SEARCH, GUIDTextBox.Text)
|
||||
Status_Changed("Dokument-Suche gelöscht")
|
||||
End If
|
||||
End Sub
|
||||
|
||||
@@ -563,6 +602,8 @@ Public Class frmAdministration
|
||||
CHANGED_WHOTextBox2.Text = Environment.UserName
|
||||
TBCW_PROF_DOC_SEARCHBindingSource.EndEdit()
|
||||
TBCW_PROF_DOC_SEARCHTableAdapter.Update(MyDataset.TBCW_PROF_DOC_SEARCH)
|
||||
TBCW_PROF_DOC_SEARCHTableAdapter.Fill(MyDataset.TBCW_PROF_DOC_SEARCH, GUIDTextBox.Text)
|
||||
Status_Changed("Dokument-Suche gespeichert")
|
||||
End If
|
||||
Catch ex As NoNullAllowedException
|
||||
MsgBox("Ein oder mehrere Felder wurden nicht ausgefüllt:" & vbNewLine & ex.Message, MsgBoxStyle.Exclamation, Text)
|
||||
|
||||
Reference in New Issue
Block a user