switch to monorepo for match & result forms
This commit is contained in:
@@ -3,10 +3,13 @@ Imports System.IO
|
||||
Imports System.Globalization
|
||||
Imports DD_Clipboard_Watcher.ClassConstants
|
||||
Imports DD_Clipboard_Watcher.ClassWindowAPI
|
||||
Imports DigitalData.Modules.ZooFlow
|
||||
Imports DigitalData.Modules.ClipboardWatcher
|
||||
|
||||
Public Class frmStart
|
||||
Dim WithEvents Hotkey As New ClassHotkey(Me)
|
||||
Private WithEvents Hotkey As New ClassHotkey(Me)
|
||||
Private WithEvents _Watcher As ClipboardWatcher = ClipboardWatcher.Singleton
|
||||
Private _MatchForm As frmMatch = Nothing
|
||||
|
||||
Public Sub New()
|
||||
' Dieser Aufruf ist für den Designer erforderlich.
|
||||
@@ -55,6 +58,8 @@ Public Class frmStart
|
||||
End If
|
||||
|
||||
End If
|
||||
|
||||
labelVersion.Text = String.Format(labelVersion.Text, My.Application.Info.Version.ToString)
|
||||
labelUser.Text = String.Format(labelUser.Text, USER_USERNAME)
|
||||
labelHotkey.Text = String.Format(labelHotkey.Text, $"{HotkeyFunctionKey.ToUpper}+{HotkeySearchKey.ToUpper}")
|
||||
End Sub
|
||||
@@ -123,19 +128,21 @@ Public Class frmStart
|
||||
|
||||
Dim oWindowInfo = GetWindowInfo()
|
||||
Dim ClipboardContents As String = Clipboard.GetText()
|
||||
Dim oProfileFilter As ClassProfileFilter
|
||||
Dim oProfileFilter As ProfileFilter
|
||||
Dim oFocusedControl As IntPtr = FocusedControlinActiveWindow(Handle)
|
||||
Try
|
||||
CurrMatchTreeView.Nodes.Clear()
|
||||
CurrMatchTreeView.ImageList = ImageList1
|
||||
CurrMatchTreeView.SelectedImageIndex = 0
|
||||
|
||||
oProfileFilter = New ClassProfileFilter(
|
||||
oProfileFilter = New ProfileFilter(
|
||||
LogConfig,
|
||||
DT_USER_PROFILES,
|
||||
DTPROFILE_REL_PROCESS,
|
||||
DTPROFILE_REL_WINDOW,
|
||||
DTPROFILE_REL_CONTROL,
|
||||
CurrMatchTreeView)
|
||||
CurrMatchTreeView
|
||||
)
|
||||
Catch ex As Exception
|
||||
Logger.Error(ex)
|
||||
MsgBox("Fehler beim Laden der Profile. Möglicherweise liegt ein Konfigurationsfehler vor. Mehr Informationen im Log.", MsgBoxStyle.Critical, Text)
|
||||
@@ -227,9 +234,45 @@ Public Class frmStart
|
||||
Exit Sub
|
||||
End If
|
||||
|
||||
Dim oForm As New frmProfileMatch()
|
||||
Dim oEnv = GetEnvironment()
|
||||
Dim oParams = New ClipboardWatcherParams() With {
|
||||
.ClipboardContents = CURRENT_CLIPBOARD_CONTENTS,
|
||||
.MatchingProfiles = oProfiles,
|
||||
.MatchTreeView = CurrMatchTreeView
|
||||
}
|
||||
|
||||
Dim oForm As New frmMatch(LogConfig, oEnv, oParams)
|
||||
_MatchForm = oForm
|
||||
oForm.ShowDialog()
|
||||
End Sub
|
||||
|
||||
Private Function GetEnvironment() As Environment
|
||||
Dim oUser As New State.UserState() With {
|
||||
.DateFormat = USER_DATE_FORMAT,
|
||||
.Email = USER_EMAIL,
|
||||
.GivenName = USER_PRENAME,
|
||||
.Language = USER_LANGUAGE,
|
||||
.MachineName = System.Environment.MachineName,
|
||||
.ShortName = USER_SHORTNAME,
|
||||
.Surname = USER_SURNAME,
|
||||
.UserId = USER_ID,
|
||||
.UserName = USER_USERNAME
|
||||
}
|
||||
|
||||
Dim oSettings As New State.SettingsState() With {
|
||||
.GdPictureKey = GDPICTURE_LICENSE
|
||||
}
|
||||
|
||||
Dim oEnvironment As New Environment() With {
|
||||
.Database = Database,
|
||||
.Modules = Nothing,
|
||||
.User = oUser,
|
||||
.Settings = oSettings
|
||||
}
|
||||
|
||||
Return oEnvironment
|
||||
End Function
|
||||
|
||||
Sub Change_Monitoring_State()
|
||||
If MONITORING_ACTIVE = True Then
|
||||
NotifyIconMain.ShowBalloonTip(30000, "Clipboard Watcher", "Clipboard-Watcher wurde deaktiviert!", ToolTipIcon.Info)
|
||||
@@ -340,10 +383,11 @@ Public Class frmStart
|
||||
lblrefresh.Text =
|
||||
ClassInit.CheckModuleData()
|
||||
lblrefresh.Text = $"Refreshed: {Now.ToShortTimeString} - UserLoggedIn: {USERCOUNT_LOGGED_IN}"
|
||||
|
||||
End Sub
|
||||
|
||||
Private Sub BisherigenAblaufAnzeigenToolStripMenuItem_Click(sender As Object, e As EventArgs) Handles BisherigenAblaufAnzeigenToolStripMenuItem.Click
|
||||
frmTreeView.ShowDialog()
|
||||
If _MatchForm IsNot Nothing Then
|
||||
_MatchForm.ShowTreeView()
|
||||
End If
|
||||
End Sub
|
||||
End Class
|
||||
|
||||
Reference in New Issue
Block a user