Prepare for Version 2.0.0.0

This commit is contained in:
Jonathan Jenne
2019-07-31 15:37:48 +02:00
parent 257ed65246
commit 71559c9ca5
44 changed files with 13768 additions and 7629 deletions

View File

@@ -13,8 +13,24 @@ Public Class frmAdministration
End Class
Dim PID As Integer
Private Sub frmAdministration_Load(sender As Object, e As EventArgs) Handles MyBase.Load
Load_Profiles()
Load_ProfileTypes()
Load_Logs()
lbllicenseCount.Text = LICENSE_COUNT
If LICENSE_DATE.ToString.Contains("2099") Then
lblLicenseDate.Text = "Unlimited"
Else
lblLicenseDate.Text = LICENSE_DATE
End If
End Sub
Private Sub TBCW_PROFILESBindingNavigatorSaveItem_Click(sender As Object, e As EventArgs) Handles TBCW_PROFILESBindingNavigatorSaveItem.Click
Save_Profile()
clsHotkey.Refresh_Profile_Links()
Me.TableAdapterManager.UpdateAll(Me.MyDataset)
@@ -30,11 +46,12 @@ Public Class frmAdministration
Sub Load_ProfileTypes()
Dim oTypeNames As New Dictionary(Of Integer, String) From {
{0, "Dokumente und Daten"},
{1, "Nur Dokumente"},
{2, "Nur Daten"}
{ClassConstants.PROFILE_TYPE_DATA_DOCS, "Dokumente und Daten"},
{ClassConstants.PROFILE_TYPE_DOCS_ONLY, "Nur Dokumente"},
{ClassConstants.PROFILE_TYPE_DATA_ONLY, "Nur Daten"}
}
MyDataset.TBWH_PROFILE_TYPE.Rows.Clear()
For Each oTypeName As KeyValuePair(Of Integer, String) In oTypeNames
Dim oRow = MyDataset.TBWH_PROFILE_TYPE.NewTBWH_PROFILE_TYPERow()
oRow.TYPE_ID = oTypeName.Key
@@ -43,6 +60,10 @@ Public Class frmAdministration
Next
End Sub
Sub Load_Logs()
End Sub
Sub Save_Profile()
Try
@@ -59,18 +80,7 @@ Public Class frmAdministration
MsgBox("Unexpected Error in Save Profile: " & vbNewLine & ex.Message, MsgBoxStyle.Critical)
End Try
End Sub
Private Sub frmAdministration_Load(sender As Object, e As EventArgs) Handles MyBase.Load
Load_Profiles()
Load_ProfileTypes()
lbllicenseCount.Text = LICENSE_COUNT
If LICENSE_DATE.ToString.Contains("2099") Then
lblLicenseDate.Text = "Unlimited"
Else
lblLicenseDate.Text = LICENSE_DATE
End If
End Sub
Sub Status_Changed(text As String, col As System.Drawing.Color)
statuslabel.Text = text
statuslabel.BackColor = col
@@ -79,6 +89,8 @@ Public Class frmAdministration
Private Sub TBCW_PROFILESBindingSource_AddingNew(sender As Object, e As System.ComponentModel.AddingNewEventArgs) Handles TBCW_PROFILESBindingSource.AddingNew
MyDataset.TBCW_PROFILES.ADDED_WHOColumn.DefaultValue = Environment.UserName
MyDataset.TBCW_PROFILES.PROFILE_TYPEColumn.DefaultValue = 0
XtraTabControl3.SelectedTabPage = TabPageGeneralSettings
End Sub
Private Sub btnaddSearch_Click(sender As Object, e As EventArgs) Handles btnaddSearch.Click
@@ -219,16 +231,13 @@ Public Class frmAdministration
End Sub
Private Sub Load_Profile_Process()
Try
If IsNothing(GUIDTextBox.Text) Or GUIDTextBox.Text = "" Then
Exit Sub
End If
Me.TBCW_PROFILE_PROCESSTableAdapter.Connection.ConnectionString = MyConnectionString
Me.TBCW_PROFILE_PROCESSTableAdapter.Fill(Me.MyDataset.TBCW_PROFILE_PROCESS, GUIDTextBox.Text)
Catch ex As System.Exception
MsgBox("Unexpected Error in Load_Profile_Process: " & vbNewLine & ex.Message, MsgBoxStyle.Critical)
End Try
If IsNothing(GUIDTextBox.Text) Or GUIDTextBox.Text = "" Then
Exit Sub
End If
If CtrlApplicationAssignment1.Process_Load(GUIDTextBox.Text) = False Then
MsgBox("Unexpected Error while loading processes:", MsgBoxStyle.Critical)
End If
End Sub
Private Sub WD_SEARCHTextBox_MouseHover(sender As Object, e As EventArgs) Handles WD_SEARCHTextBox.MouseHover
@@ -350,7 +359,7 @@ Public Class frmAdministration
End Try
End Sub
Private Sub ToolStripButton6_Click(sender As Object, e As EventArgs) Handles ToolStripButton6.Click
Private Sub ToolStripButton6_Click(sender As Object, e As EventArgs)
Dim oForm As New frmProcessCapture()
Dim oResult = oForm.ShowDialog()
@@ -372,49 +381,57 @@ Public Class frmAdministration
End If
End Sub
Private Sub ToolStripButton5_Click(sender As Object, e As EventArgs) Handles ToolStripButton5.Click
Try
Dim oGuid = GridViewProcessProfile.GetFocusedRowCellValue(GridViewProcessProfile.Columns("GUID"))
Dim oSQL = String.Format("DELETE FROM TBCW_PROFILE_PROCESS WHERE GUID = {0}", oGuid)
If clsDatabase.Execute_non_Query(oSQL) Then
Load_Profile_Process()
End If
Catch ex As Exception
MsgBox("Unexpected Error in deleting ProfileProcess-Relation: " & vbNewLine & ex.Message, MsgBoxStyle.Critical)
End Try
End Sub
Private Sub GridViewProcessProfile_FocusedRowChanged(sender As Object, e As DevExpress.XtraGrid.Views.Base.FocusedRowChangedEventArgs) Handles GridViewProcessProfile.FocusedRowChanged
If e.FocusedRowHandle < 0 Then
Exit Sub
End If
Dim oSelectedRow As DataRow = GridViewProcessProfile.GetDataRow(e.FocusedRowHandle)
Dim oProcessName As String = oSelectedRow.Item("PROC_NAME")
SelectedProcessName = oProcessName
TBCW_PROF_REL_WINDOWTableAdapter.Connection.ConnectionString = MyConnectionString
TBCW_PROF_REL_WINDOWTableAdapter.Fill(MyDataset.TBCW_PROF_REL_WINDOW, SelectedProcessName, GUIDTextBox.Text)
End Sub
Private Sub ToolStripButton7_Click(sender As Object, e As EventArgs) Handles ToolStripButton7.Click
Try
TBCW_PROF_REL_WINDOWBindingSource.EndEdit()
If Not IsNothing(MyDataset.TBCW_PROF_REL_WINDOW.GetChanges) Then
CHANGED_WHOTextBox3.Text = Environment.UserName
TBCW_PROF_REL_WINDOWBindingSource.EndEdit()
TBCW_PROF_REL_WINDOWTableAdapter.Update(MyDataset.TBCW_PROF_REL_WINDOW)
End If
TBCW_PROF_REL_WINDOWTableAdapter.Fill(MyDataset.TBCW_PROF_REL_WINDOW, SelectedProcessName, GUIDTextBox.Text)
Catch ex As Exception
MsgBox("Unexpected Error in Save Profile: " & vbNewLine & ex.Message, MsgBoxStyle.Critical)
End Try
End Sub
Private Sub TBCW_PROF_REL_WINDOWBindingSource_AddingNew(sender As Object, e As System.ComponentModel.AddingNewEventArgs) Handles TBCW_PROF_REL_WINDOWBindingSource.AddingNew
Private Sub TBCW_PROF_REL_WINDOWBindingSource_AddingNew(sender As Object, e As System.ComponentModel.AddingNewEventArgs)
MyDataset.TBCW_PROF_REL_WINDOW.ADDED_WHOColumn.DefaultValue = Environment.UserName
MyDataset.TBCW_PROF_REL_WINDOW.PROFILE_IDColumn.DefaultValue = GUIDTextBox.Text
MyDataset.TBCW_PROF_REL_WINDOW.PROCESS_NAMEColumn.DefaultValue = SelectedProcessName
End Sub
Private Sub BarButtonProcessAssign_ItemClick_1(sender As Object, e As DevExpress.XtraBars.ItemClickEventArgs) Handles BarButtonProcessAssign.ItemClick
If CtrlApplicationAssignment1.Process_CreateAssignment(GUIDTextBox.Text) = False Then
MsgBox("Error while assigning process!", MsgBoxStyle.Critical, "Clipboard Watcher")
End If
Status_Changed("Prozess gespeichert - " & Now.ToString, Color.Yellow)
End Sub
Private Sub BarButtonProcessDelete_ItemClick_1(sender As Object, e As DevExpress.XtraBars.ItemClickEventArgs) Handles BarButtonProcessDelete.ItemClick
If MsgBox($"Wollen Sie den Prozess löschen?" & vbNewLine & "Dies wird alle Fenster löschen, die diesem Prozess zugeordnet sind!", MsgBoxStyle.Exclamation Or MsgBoxStyle.YesNo, "Prozess löschen") = MsgBoxResult.No Then
Exit Sub
End If
If CtrlApplicationAssignment1.Process_DeleteAssignment() = False Then
MsgBox("Error while deleting assignment of process!", MsgBoxStyle.Critical, "Clipboard Watcher")
End If
Status_Changed("Prozess gelöscht - " & Now.ToString, Color.Yellow)
End Sub
Private Sub BarButtonWindowAssign_ItemClick(sender As Object, e As DevExpress.XtraBars.ItemClickEventArgs) Handles BarButtonWindowAssign.ItemClick
If CtrlApplicationAssignment1.Window_CreateAssignment(GUIDTextBox.Text) = False Then
MsgBox("Error while assigning window!", MsgBoxStyle.Critical, "Clipboard Watcher")
End If
Status_Changed("Fenster gespeichert - " & Now.ToString, Color.Yellow)
End Sub
Private Sub BarButtonWindowDelete_ItemClick(sender As Object, e As DevExpress.XtraBars.ItemClickEventArgs) Handles BarButtonWindowDelete.ItemClick
If MsgBox($"Wollen Sie das Fenster löschen?" & vbNewLine & "Dies wird alle Controls löschen, die diesem Fenster zugeordnet sind!", MsgBoxStyle.Exclamation Or MsgBoxStyle.YesNo, "Prozess löschen") = MsgBoxResult.No Then
Exit Sub
End If
If CtrlApplicationAssignment1.Window_DeleteAssignment() = False Then
MsgBox("Error while deleting assignment of window!", MsgBoxStyle.Critical, "Clipboard Watcher")
End If
Status_Changed("Fenster gelöscht - " & Now.ToString, Color.Yellow)
End Sub
Private Sub BarButtonWindowSave_ItemClick(sender As Object, e As DevExpress.XtraBars.ItemClickEventArgs) Handles BarButtonWindowSave.ItemClick
If CtrlApplicationAssignment1.Window_SaveAssignment() = False Then
MsgBox("Error while saving assignment of window!", MsgBoxStyle.Critical, "Clipboard Watcher")
End If
Status_Changed("Fenster gespeichert - " & Now.ToString, Color.Yellow)
End Sub
End Class