Better Config, Clean Up, Add Demo Groups

This commit is contained in:
Jonathan Jenne 2019-07-16 14:59:32 +02:00
parent a8ec4e8fd4
commit 0205f583c3
9 changed files with 216 additions and 165 deletions

View File

@ -9,23 +9,12 @@ Public Class ClassConfig
Public Property LoadDocumentView As Boolean = False Public Property LoadDocumentView As Boolean = False
Public Property ViewerWindowX As Integer = 0 Public Property ViewerWindowSize As Size = New Size(1024, 786)
Public Property ViewerWindowY As Integer = 0 Public Property ViewerWindowLocation As Point = New Point(0, 0)
Public Property ViewerWindowWidth As Integer = 1024 Public Property MatchWindowSize As Size = New Size(1024, 786)
Public Property ViewerWindowHeight As Integer = 786 Public Property MatchWindowLocation As Point = New Size(0, 0)
Public Property ResultDocWindowSize As Size = New Size(1024, 786)
Public Property MatchWindowX As Integer = 0 Public Property ResultDocWindowLocation As Point = New Size(0, 0)
Public Property MatchWindowY As Integer = 0 Public Property ResultDataWindowSize As Size = New Size(1024, 786)
Public Property MatchWindowWidth As Integer = 1024 Public Property ResultDataWindowLocation As Point = New Size(0, 0)
Public Property MatchWindowHeight As Integer = 786
Public Property ResultDocWindowX As Integer = 0
Public Property ResultDocWindowY As Integer = 0
Public Property ResultDocWindowWidth As Integer = 1024
Public Property ResultDocWindowHeight As Integer = 786
Public Property ResultDataWindowX As Integer = 0
Public Property ResultDataWindowY As Integer = 0
Public Property ResultDataWindowWidth As Integer = 1024
Public Property ResultDataWindowHeight As Integer = 786
End Class End Class

View File

@ -40,13 +40,8 @@ Public Class ClassInit
LogConfig.Debug = Not .LogErrorsOnly LogConfig.Debug = Not .LogErrorsOnly
End With End With
'Dim configResult As Boolean
'configResult = LoadMyConfig() Return True
'If configResult = False Then
' Throw New Exception("Unexpected error inm Initialisieren der Basis-Einstellungen. Weitere Informationen finden Sie in der Logdatei.")
'Else
' Return False
'End If
End Function End Function
Private Function DecryptConnectionString(EncryptedConnectionString As String) As String Private Function DecryptConnectionString(EncryptedConnectionString As String) As String

View File

@ -61,13 +61,13 @@ Public Class frmDocView
ResetSearch() ResetSearch()
UpdateMainUi() UpdateMainUi()
If ConfigManager.Config.ViewerWindowX > 0 And ConfigManager.Config.ViewerWindowY > 0 Then If Not ConfigManager.Config.ViewerWindowLocation.IsEmpty Then
Dim oLocation As New Point(ConfigManager.Config.ViewerWindowX, ConfigManager.Config.ViewerWindowY) Location = ConfigManager.Config.ViewerWindowLocation
Location = oLocation
End If End If
Dim oSize As New Size(ConfigManager.Config.ViewerWindowWidth, ConfigManager.Config.ViewerWindowHeight) If Not ConfigManager.Config.ViewerWindowSize.IsEmpty Then
Size = oSize Size = ConfigManager.Config.ViewerWindowSize
End If
End Sub End Sub
Public Sub Load_File_from_Path(filepath As String) Public Sub Load_File_from_Path(filepath As String)
@ -755,10 +755,8 @@ Public Class frmDocView
Private Sub frmDocView_Closing(sender As Object, e As CancelEventArgs) Handles Me.Closing Private Sub frmDocView_Closing(sender As Object, e As CancelEventArgs) Handles Me.Closing
Try Try
ConfigManager.Config.ViewerWindowHeight = Size.Height ConfigManager.Config.ViewerWindowLocation = Location
ConfigManager.Config.ViewerWindowWidth = Size.Width ConfigManager.Config.ViewerWindowSize = Size
ConfigManager.Config.ViewerWindowX = Location.X
ConfigManager.Config.ViewerWindowY = Location.Y
ConfigManager.Save() ConfigManager.Save()
Catch ex As Exception Catch ex As Exception
Logger.Error(ex) Logger.Error(ex)

View File

@ -24,12 +24,30 @@ Partial Class frmProfileMatch
Private Sub InitializeComponent() Private Sub InitializeComponent()
Dim TileItemElement1 As DevExpress.XtraEditors.TileItemElement = New DevExpress.XtraEditors.TileItemElement() Dim TileItemElement1 As DevExpress.XtraEditors.TileItemElement = New DevExpress.XtraEditors.TileItemElement()
Dim resources As System.ComponentModel.ComponentResourceManager = New System.ComponentModel.ComponentResourceManager(GetType(frmProfileMatch)) Dim resources As System.ComponentModel.ComponentResourceManager = New System.ComponentModel.ComponentResourceManager(GetType(frmProfileMatch))
Dim TileItemElement2 As DevExpress.XtraEditors.TileItemElement = New DevExpress.XtraEditors.TileItemElement()
Dim TileItemElement3 As DevExpress.XtraEditors.TileItemElement = New DevExpress.XtraEditors.TileItemElement()
Dim TileItemElement4 As DevExpress.XtraEditors.TileItemElement = New DevExpress.XtraEditors.TileItemElement()
Dim TileItemElement5 As DevExpress.XtraEditors.TileItemElement = New DevExpress.XtraEditors.TileItemElement()
Dim TileItemElement7 As DevExpress.XtraEditors.TileItemElement = New DevExpress.XtraEditors.TileItemElement()
Dim TileItemElement8 As DevExpress.XtraEditors.TileItemElement = New DevExpress.XtraEditors.TileItemElement()
Dim TileItemElement6 As DevExpress.XtraEditors.TileItemElement = New DevExpress.XtraEditors.TileItemElement()
Me.Label1 = New System.Windows.Forms.Label() Me.Label1 = New System.Windows.Forms.Label()
Me.TileControl1 = New DevExpress.XtraEditors.TileControl() Me.TileControl1 = New DevExpress.XtraEditors.TileControl()
Me.TileGroup2 = New DevExpress.XtraEditors.TileGroup() Me.TileGroup2 = New DevExpress.XtraEditors.TileGroup()
Me.TileItem1 = New DevExpress.XtraEditors.TileItem() Me.TileItem1 = New DevExpress.XtraEditors.TileItem()
Me.TileGroupProfiles = New DevExpress.XtraEditors.TileGroup() Me.TileGroupDocumentsData = New DevExpress.XtraEditors.TileGroup()
Me.SimpleButton1 = New DevExpress.XtraEditors.SimpleButton() Me.SimpleButton1 = New DevExpress.XtraEditors.SimpleButton()
Me.Panel1 = New System.Windows.Forms.Panel()
Me.TileGroupDocuments = New DevExpress.XtraEditors.TileGroup()
Me.TileGroupData = New DevExpress.XtraEditors.TileGroup()
Me.TileItem2 = New DevExpress.XtraEditors.TileItem()
Me.TileItem3 = New DevExpress.XtraEditors.TileItem()
Me.TileItem4 = New DevExpress.XtraEditors.TileItem()
Me.TileItem5 = New DevExpress.XtraEditors.TileItem()
Me.TileItem6 = New DevExpress.XtraEditors.TileItem()
Me.TileItem7 = New DevExpress.XtraEditors.TileItem()
Me.TileItem8 = New DevExpress.XtraEditors.TileItem()
Me.Panel1.SuspendLayout()
Me.SuspendLayout() Me.SuspendLayout()
' '
'Label1 'Label1
@ -46,6 +64,13 @@ Partial Class frmProfileMatch
' '
'TileControl1 'TileControl1
' '
Me.TileControl1.AllowDragTilesBetweenGroups = False
Me.TileControl1.AppearanceGroupText.BackColor = System.Drawing.Color.Transparent
Me.TileControl1.AppearanceGroupText.Font = New System.Drawing.Font("Tahoma", 12.0!, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, CType(0, Byte))
Me.TileControl1.AppearanceGroupText.ForeColor = System.Drawing.Color.White
Me.TileControl1.AppearanceGroupText.Options.UseBackColor = True
Me.TileControl1.AppearanceGroupText.Options.UseFont = True
Me.TileControl1.AppearanceGroupText.Options.UseForeColor = True
Me.TileControl1.AppearanceItem.Normal.BackColor = System.Drawing.Color.FromArgb(CType(CType(165, Byte), Integer), CType(CType(36, Byte), Integer), CType(CType(49, Byte), Integer)) Me.TileControl1.AppearanceItem.Normal.BackColor = System.Drawing.Color.FromArgb(CType(CType(165, Byte), Integer), CType(CType(36, Byte), Integer), CType(CType(49, Byte), Integer))
Me.TileControl1.AppearanceItem.Normal.BorderColor = System.Drawing.Color.FromArgb(CType(CType(165, Byte), Integer), CType(CType(36, Byte), Integer), CType(CType(49, Byte), Integer)) Me.TileControl1.AppearanceItem.Normal.BorderColor = System.Drawing.Color.FromArgb(CType(CType(165, Byte), Integer), CType(CType(36, Byte), Integer), CType(CType(49, Byte), Integer))
Me.TileControl1.AppearanceItem.Normal.Font = New System.Drawing.Font("Tahoma", 12.0!, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, CType(0, Byte)) Me.TileControl1.AppearanceItem.Normal.Font = New System.Drawing.Font("Tahoma", 12.0!, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, CType(0, Byte))
@ -55,14 +80,19 @@ Partial Class frmProfileMatch
Me.TileControl1.AppearanceItem.Normal.Options.UseFont = True Me.TileControl1.AppearanceItem.Normal.Options.UseFont = True
Me.TileControl1.AppearanceItem.Normal.Options.UseForeColor = True Me.TileControl1.AppearanceItem.Normal.Options.UseForeColor = True
Me.TileControl1.BackColor = System.Drawing.Color.FromArgb(CType(CType(64, Byte), Integer), CType(CType(64, Byte), Integer), CType(CType(64, Byte), Integer)) Me.TileControl1.BackColor = System.Drawing.Color.FromArgb(CType(CType(64, Byte), Integer), CType(CType(64, Byte), Integer), CType(CType(64, Byte), Integer))
Me.TileControl1.Dock = System.Windows.Forms.DockStyle.Top Me.TileControl1.Dock = System.Windows.Forms.DockStyle.Fill
Me.TileControl1.Groups.Add(Me.TileGroup2) Me.TileControl1.Groups.Add(Me.TileGroup2)
Me.TileControl1.Groups.Add(Me.TileGroupProfiles) Me.TileControl1.Groups.Add(Me.TileGroupDocumentsData)
Me.TileControl1.ItemSize = 135 Me.TileControl1.Groups.Add(Me.TileGroupDocuments)
Me.TileControl1.Groups.Add(Me.TileGroupData)
Me.TileControl1.ItemCheckMode = DevExpress.XtraEditors.TileItemCheckMode.Multiple
Me.TileControl1.ItemSize = 150
Me.TileControl1.Location = New System.Drawing.Point(0, 0) Me.TileControl1.Location = New System.Drawing.Point(0, 0)
Me.TileControl1.MaxId = 4 Me.TileControl1.MaxId = 18
Me.TileControl1.Name = "TileControl1" Me.TileControl1.Name = "TileControl1"
Me.TileControl1.Size = New System.Drawing.Size(713, 384) Me.TileControl1.Position = 33
Me.TileControl1.ShowGroupText = True
Me.TileControl1.Size = New System.Drawing.Size(1087, 481)
Me.TileControl1.TabIndex = 6 Me.TileControl1.TabIndex = 6
Me.TileControl1.Text = "TileControl1" Me.TileControl1.Text = "TileControl1"
' '
@ -70,7 +100,6 @@ Partial Class frmProfileMatch
' '
Me.TileGroup2.Items.Add(Me.TileItem1) Me.TileGroup2.Items.Add(Me.TileItem1)
Me.TileGroup2.Name = "TileGroup2" Me.TileGroup2.Name = "TileGroup2"
Me.TileGroup2.Text = "Allgemein"
' '
'TileItem1 'TileItem1
' '
@ -81,32 +110,116 @@ Partial Class frmProfileMatch
Me.TileItem1.ItemSize = DevExpress.XtraEditors.TileItemSize.Medium Me.TileItem1.ItemSize = DevExpress.XtraEditors.TileItemSize.Medium
Me.TileItem1.Name = "TileItem1" Me.TileItem1.Name = "TileItem1"
' '
'TileGroupProfiles 'TileGroupDocumentsData
' '
Me.TileGroupProfiles.Name = "TileGroupProfiles" Me.TileGroupDocumentsData.Items.Add(Me.TileItem2)
Me.TileGroupDocumentsData.Items.Add(Me.TileItem3)
Me.TileGroupDocumentsData.Items.Add(Me.TileItem4)
Me.TileGroupDocumentsData.Items.Add(Me.TileItem5)
Me.TileGroupDocumentsData.Name = "TileGroupDocumentsData"
Me.TileGroupDocumentsData.Text = "Dokumente und Daten"
' '
'SimpleButton1 'SimpleButton1
' '
Me.SimpleButton1.Anchor = CType((System.Windows.Forms.AnchorStyles.Bottom Or System.Windows.Forms.AnchorStyles.Right), System.Windows.Forms.AnchorStyles) Me.SimpleButton1.Anchor = CType((System.Windows.Forms.AnchorStyles.Bottom Or System.Windows.Forms.AnchorStyles.Right), System.Windows.Forms.AnchorStyles)
Me.SimpleButton1.Appearance.Font = New System.Drawing.Font("Tahoma", 12.0!, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, CType(0, Byte)) Me.SimpleButton1.Appearance.Font = New System.Drawing.Font("Tahoma", 12.0!, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, CType(0, Byte))
Me.SimpleButton1.Appearance.Options.UseFont = True Me.SimpleButton1.Appearance.Options.UseFont = True
Me.SimpleButton1.ButtonStyle = DevExpress.XtraEditors.Controls.BorderStyles.UltraFlat
Me.SimpleButton1.ImageOptions.Image = CType(resources.GetObject("SimpleButton1.ImageOptions.Image"), System.Drawing.Image) Me.SimpleButton1.ImageOptions.Image = CType(resources.GetObject("SimpleButton1.ImageOptions.Image"), System.Drawing.Image)
Me.SimpleButton1.Location = New System.Drawing.Point(564, 394) Me.SimpleButton1.Location = New System.Drawing.Point(938, 14)
Me.SimpleButton1.Name = "SimpleButton1" Me.SimpleButton1.Name = "SimpleButton1"
Me.SimpleButton1.Size = New System.Drawing.Size(137, 45) Me.SimpleButton1.Size = New System.Drawing.Size(137, 45)
Me.SimpleButton1.TabIndex = 7 Me.SimpleButton1.TabIndex = 7
Me.SimpleButton1.Text = "Abbruch" Me.SimpleButton1.Text = "Abbruch"
' '
'Panel1
'
Me.Panel1.Controls.Add(Me.SimpleButton1)
Me.Panel1.Dock = System.Windows.Forms.DockStyle.Bottom
Me.Panel1.Location = New System.Drawing.Point(0, 481)
Me.Panel1.Name = "Panel1"
Me.Panel1.Size = New System.Drawing.Size(1087, 71)
Me.Panel1.TabIndex = 8
'
'TileGroupDocuments
'
Me.TileGroupDocuments.Name = "TileGroupDocuments"
Me.TileGroupDocuments.Text = "Dokumente"
'
'TileGroupData
'
Me.TileGroupData.Items.Add(Me.TileItem8)
Me.TileGroupData.Items.Add(Me.TileItem6)
Me.TileGroupData.Items.Add(Me.TileItem7)
Me.TileGroupData.Name = "TileGroupData"
Me.TileGroupData.Text = "Daten"
'
'TileItem2
'
TileItemElement2.Text = "TileItem2"
Me.TileItem2.Elements.Add(TileItemElement2)
Me.TileItem2.Id = 8
Me.TileItem2.ItemSize = DevExpress.XtraEditors.TileItemSize.Medium
Me.TileItem2.Name = "TileItem2"
'
'TileItem3
'
Me.TileItem3.AppearanceItem.Selected.BorderColor = System.Drawing.Color.FromArgb(CType(CType(255, Byte), Integer), CType(CType(128, Byte), Integer), CType(CType(0, Byte), Integer))
Me.TileItem3.AppearanceItem.Selected.Options.UseBorderColor = True
TileItemElement3.Text = "TileItem3"
Me.TileItem3.Elements.Add(TileItemElement3)
Me.TileItem3.Id = 9
Me.TileItem3.ItemSize = DevExpress.XtraEditors.TileItemSize.Medium
Me.TileItem3.Name = "TileItem3"
'
'TileItem4
'
TileItemElement4.Text = "TileItem4"
Me.TileItem4.Elements.Add(TileItemElement4)
Me.TileItem4.Id = 10
Me.TileItem4.ItemSize = DevExpress.XtraEditors.TileItemSize.Medium
Me.TileItem4.Name = "TileItem4"
'
'TileItem5
'
TileItemElement5.Text = "TileItem5"
Me.TileItem5.Elements.Add(TileItemElement5)
Me.TileItem5.Id = 11
Me.TileItem5.ItemSize = DevExpress.XtraEditors.TileItemSize.Medium
Me.TileItem5.Name = "TileItem5"
'
'TileItem6
'
TileItemElement7.Text = "TileItem6"
Me.TileItem6.Elements.Add(TileItemElement7)
Me.TileItem6.Id = 13
Me.TileItem6.ItemSize = DevExpress.XtraEditors.TileItemSize.Medium
Me.TileItem6.Name = "TileItem6"
'
'TileItem7
'
TileItemElement8.Text = "TileItem7"
Me.TileItem7.Elements.Add(TileItemElement8)
Me.TileItem7.Id = 14
Me.TileItem7.ItemSize = DevExpress.XtraEditors.TileItemSize.Medium
Me.TileItem7.Name = "TileItem7"
'
'TileItem8
'
TileItemElement6.Text = "TileItem8"
Me.TileItem8.Elements.Add(TileItemElement6)
Me.TileItem8.Id = 17
Me.TileItem8.ItemSize = DevExpress.XtraEditors.TileItemSize.Wide
Me.TileItem8.Name = "TileItem8"
'
'frmProfileMatch 'frmProfileMatch
' '
Me.Appearance.Options.UseFont = True Me.Appearance.Options.UseFont = True
Me.AutoScaleDimensions = New System.Drawing.SizeF(7.0!, 15.0!) Me.AutoScaleDimensions = New System.Drawing.SizeF(7.0!, 15.0!)
Me.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font Me.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font
Me.ClientSize = New System.Drawing.Size(713, 447) Me.ClientSize = New System.Drawing.Size(1087, 552)
Me.Controls.Add(Me.SimpleButton1)
Me.Controls.Add(Me.Label1) Me.Controls.Add(Me.Label1)
Me.Controls.Add(Me.TileControl1) Me.Controls.Add(Me.TileControl1)
Me.Controls.Add(Me.Panel1)
Me.Font = New System.Drawing.Font("Calibri", 9.75!, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, CType(0, Byte)) Me.Font = New System.Drawing.Font("Calibri", 9.75!, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, CType(0, Byte))
Me.Icon = CType(resources.GetObject("$this.Icon"), System.Drawing.Icon) Me.Icon = CType(resources.GetObject("$this.Icon"), System.Drawing.Icon)
Me.MaximizeBox = False Me.MaximizeBox = False
@ -116,6 +229,7 @@ Partial Class frmProfileMatch
Me.StartPosition = System.Windows.Forms.FormStartPosition.CenterParent Me.StartPosition = System.Windows.Forms.FormStartPosition.CenterParent
Me.Text = "Profile Match" Me.Text = "Profile Match"
Me.TopMost = True Me.TopMost = True
Me.Panel1.ResumeLayout(False)
Me.ResumeLayout(False) Me.ResumeLayout(False)
Me.PerformLayout() Me.PerformLayout()
@ -124,6 +238,16 @@ Partial Class frmProfileMatch
Friend WithEvents TileControl1 As DevExpress.XtraEditors.TileControl Friend WithEvents TileControl1 As DevExpress.XtraEditors.TileControl
Friend WithEvents TileGroup2 As DevExpress.XtraEditors.TileGroup Friend WithEvents TileGroup2 As DevExpress.XtraEditors.TileGroup
Friend WithEvents TileItem1 As DevExpress.XtraEditors.TileItem Friend WithEvents TileItem1 As DevExpress.XtraEditors.TileItem
Friend WithEvents TileGroupProfiles As DevExpress.XtraEditors.TileGroup Friend WithEvents TileGroupDocumentsData As DevExpress.XtraEditors.TileGroup
Friend WithEvents SimpleButton1 As DevExpress.XtraEditors.SimpleButton Friend WithEvents SimpleButton1 As DevExpress.XtraEditors.SimpleButton
Friend WithEvents Panel1 As Panel
Friend WithEvents TileGroupDocuments As DevExpress.XtraEditors.TileGroup
Friend WithEvents TileGroupData As DevExpress.XtraEditors.TileGroup
Friend WithEvents TileItem2 As DevExpress.XtraEditors.TileItem
Friend WithEvents TileItem3 As DevExpress.XtraEditors.TileItem
Friend WithEvents TileItem4 As DevExpress.XtraEditors.TileItem
Friend WithEvents TileItem5 As DevExpress.XtraEditors.TileItem
Friend WithEvents TileItem8 As DevExpress.XtraEditors.TileItem
Friend WithEvents TileItem6 As DevExpress.XtraEditors.TileItem
Friend WithEvents TileItem7 As DevExpress.XtraEditors.TileItem
End Class End Class

View File

@ -2,18 +2,18 @@
Public Class frmProfileMatch Public Class frmProfileMatch
Private Sub frmProfileMatch_Load(sender As Object, e As EventArgs) Handles Me.Load Private Sub frmProfileMatch_Load(sender As Object, e As EventArgs) Handles Me.Load
If ConfigManager.Config.MatchWindowX > 0 And ConfigManager.Config.MatchWindowY > 0 Then If Not ConfigManager.Config.MatchWindowLocation.IsEmpty Then
Dim oLocation As New Point(ConfigManager.Config.MatchWindowX, ConfigManager.Config.MatchWindowY) Location = ConfigManager.Config.MatchWindowLocation
Location = oLocation
End If End If
Dim oSize As New Size(ConfigManager.Config.MatchWindowWidth, ConfigManager.Config.MatchWindowHeight) If Not ConfigManager.Config.MatchWindowSize.IsEmpty Then
Size = oSize Size = ConfigManager.Config.MatchWindowSize
End If
If USER_LANGUAGE = "de-DE" Then If USER_LANGUAGE = "de-DE" Then
Me.Label1.Text = $"Clipboard Watcher hat mehr als einen Match für Ihre Suche [{CURR_MATCH_RESULT}] gefunden:" Me.Label1.Text = $"Clipboard Watcher hat mehr als einen Match für Ihre Suche nach ""{CURR_MATCH_RESULT}"" gefunden:"
Else Else
Me.Label1.Text = $"Clipboard Watcher found more than on match for Your search [{CURR_MATCH_RESULT}]:" Me.Label1.Text = $"Clipboard Watcher found more than on match for your search for ""{CURR_MATCH_RESULT}"":"
End If End If
CreateTiles() CreateTiles()
CurrDocSearch2Load = Nothing CurrDocSearch2Load = Nothing
@ -24,7 +24,7 @@ Public Class frmProfileMatch
Dim oPrimaryFont As New Font("Segoe UI", 12, FontStyle.Bold) Dim oPrimaryFont As New Font("Segoe UI", 12, FontStyle.Bold)
Dim oSecondaryFont As New Font("Segoe UI", 10) Dim oSecondaryFont As New Font("Segoe UI", 10)
Dim oGroup = TileControl1.Groups.Item("TileGroupProfiles") Dim oGroup = TileControl1.Groups.Item("TileGroupDocuments")
oGroup.Items.Clear() oGroup.Items.Clear()
For Each oRow As DataRow In CurrDT_PROFILE_MATCH.Rows For Each oRow As DataRow In CurrDT_PROFILE_MATCH.Rows
@ -39,7 +39,7 @@ Public Class frmProfileMatch
Dim oCommentElement = New TileItemElement() Dim oCommentElement = New TileItemElement()
oCommentElement.Text = oRow.Item("COMMENT") oCommentElement.Text = oRow.Item("COMMENT")
oCommentElement.TextAlignment = TileItemContentAlignment.BottomLeft oCommentElement.TextAlignment = TileItemContentAlignment.MiddleLeft
oCommentElement.Appearance.Normal.Font = oSecondaryFont oCommentElement.Appearance.Normal.Font = oSecondaryFont
oItem.Elements.Add(oCommentElement) oItem.Elements.Add(oCommentElement)
@ -66,20 +66,18 @@ Public Class frmProfileMatch
End Sub End Sub
Sub OpenResults_Doc() Sub OpenResults_Doc()
Dim ofrmresult As Form = New frmResultDoc Dim oFrmResultDoc As Form = New frmResultDoc
ofrmresult.Show() oFrmResultDoc.Show()
End Sub End Sub
Sub OpenResults_Data() Sub OpenResults_Data()
Dim ofrmresult As Form = New frmResultSQL Dim oFrmResultData As Form = New frmResultSQL
ofrmresult.Show() oFrmResultData.Show()
End Sub End Sub
Private Sub frmProfileMatch_FormClosing(sender As Object, e As FormClosingEventArgs) Handles Me.FormClosing Private Sub frmProfileMatch_FormClosing(sender As Object, e As FormClosingEventArgs) Handles Me.FormClosing
Try Try
ConfigManager.Config.MatchWindowHeight = Size.Height ConfigManager.Config.MatchWindowSize = Size
ConfigManager.Config.MatchWindowWidth = Size.Width ConfigManager.Config.MatchWindowLocation = Location
ConfigManager.Config.MatchWindowX = Location.X
ConfigManager.Config.MatchWindowY = Location.Y
ConfigManager.Save() ConfigManager.Save()
Catch ex As Exception Catch ex As Exception
Logger.Error(ex) Logger.Error(ex)

View File

@ -25,10 +25,17 @@ Public Class frmResultDoc
MyBase.New MyBase.New
' Dieser Aufruf ist für den Designer erforderlich. ' Dieser Aufruf ist für den Designer erforderlich.
InitializeComponent() InitializeComponent()
' Fügen Sie Initialisierungen nach dem InitializeComponent()-Aufruf hinzu. ' Fügen Sie Initialisierungen nach dem InitializeComponent()-Aufruf hinzu.
_frmDocView = frmDocView _frmProfileMatch = Nothing
_frmSQL = frmResultSQL End Sub
_frmProfileMatch = frmProfileMatch
Public Sub New(ProfileMatchForm As frmProfileMatch)
' Dieser Aufruf ist für den Designer erforderlich.
InitializeComponent()
' Fügen Sie Initialisierungen nach dem InitializeComponent()-Aufruf hinzu.
_frmProfileMatch = ProfileMatchForm
End Sub End Sub
Private Class DocSearch Private Class DocSearch
@ -41,19 +48,23 @@ Public Class frmResultDoc
Private Async Sub frmResultDoc_Load(sender As Object, e As EventArgs) Handles Me.Load Private Async Sub frmResultDoc_Load(sender As Object, e As EventArgs) Handles Me.Load
ToolStripDropDownButtonFile.Visible = False ToolStripDropDownButtonFile.Visible = False
If ConfigManager.Config.ResultDocWindowX > 0 And ConfigManager.Config.ResultDocWindowY > 0 Then If Not ConfigManager.Config.ResultDocWindowLocation.IsEmpty Then
Dim oLocation As New Point(ConfigManager.Config.ResultDocWindowX, ConfigManager.Config.ResultDocWindowY) Location = ConfigManager.Config.ResultDocWindowLocation
Location = oLocation
End If End If
Dim oSize As New Size(ConfigManager.Config.ResultDocWindowWidth, ConfigManager.Config.ResultDocWindowHeight) If Not ConfigManager.Config.ResultDocWindowSize.IsEmpty Then
Size = oSize Size = ConfigManager.Config.ResultDocWindowSize
End If
Dim oFrmResultSQL As New frmResultSQL()
_frmSQL = oFrmResultSQL
_frmSQL.Show()
GridViewDocSearch1.ShowLoadingPanel() GridViewDocSearch1.ShowLoadingPanel()
Dim oSearches = Await LoadSearchesAsync() Dim oSearches = Await LoadSearchesAsync()
Await Task.Delay(4000) 'DEBUG Await Task.Delay(1000) 'DEBUG
For Each oSearch As DocSearch In oSearches For Each oSearch As DocSearch In oSearches
RefreshTabDoc(oSearch.ProfileId, oSearch.DataTable, oSearch.TabIndex, oSearch.TabCaption) RefreshTabDoc(oSearch.ProfileId, oSearch.DataTable, oSearch.TabIndex, oSearch.TabCaption)
@ -465,10 +476,8 @@ Public Class frmResultDoc
Private Sub frmResultDoc_FormClosing(sender As Object, e As FormClosingEventArgs) Handles Me.FormClosing Private Sub frmResultDoc_FormClosing(sender As Object, e As FormClosingEventArgs) Handles Me.FormClosing
Try Try
ConfigManager.Config.ResultDocWindowHeight = Size.Height ConfigManager.Config.ResultDocWindowSize = Size
ConfigManager.Config.ResultDocWindowWidth = Size.Width ConfigManager.Config.ResultDocWindowLocation = Location
ConfigManager.Config.ResultDocWindowX = Location.X
ConfigManager.Config.ResultDocWindowY = Location.Y
ConfigManager.Save() ConfigManager.Save()
Catch ex As Exception Catch ex As Exception
Logger.Error(ex) Logger.Error(ex)

View File

@ -18,17 +18,24 @@ Public Class frmResultSQL
Private DTDataSearchDefinition As DataTable Private DTDataSearchDefinition As DataTable
Private _activeGridView As GridView Private _activeGridView As GridView
#End Region #End Region
Public Sub New()
MyBase.New Private Sub frmResultDoc_Load(sender As Object, e As EventArgs) Handles Me.Load
' Dieser Aufruf ist für den Designer erforderlich. If Not ConfigManager.Config.ResultDataWindowSize.IsEmpty Then
InitializeComponent() Size = ConfigManager.Config.ResultDataWindowSize
' Fügen Sie Initialisierungen nach dem InitializeComponent()-Aufruf hinzu. End If
If Not ConfigManager.Config.ResultDataWindowLocation.IsEmpty Then
Location = ConfigManager.Config.ResultDataWindowLocation
End If
Load_Searches()
End Sub End Sub
Sub RefreshTabData(PROFILE_ID As Integer, ConID As Integer, SQLCommand As String, TabIndex As Integer, TabCaption As String) Sub RefreshTabData(PROFILE_ID As Integer, ConID As Integer, SQLCommand As String, TabIndex As Integer, TabCaption As String)
Try Try
SQLCommand = clsPatterns.ReplaceAllValues(SQLCommand, USER_PRENAME, USER_SURNAME, USER_SHORTNAME, USER_EMAIL, USER_ID, PROFILE_ID) SQLCommand = clsPatterns.ReplaceAllValues(SQLCommand, USER_PRENAME, USER_SURNAME, USER_SHORTNAME, USER_EMAIL, USER_ID, PROFILE_ID)
Dim myGridControl As DevExpress.XtraGrid.GridControl Dim myGridControl As GridControl
Dim myGridview As DevExpress.XtraGrid.Views.Grid.GridView Dim myGridview As GridView
Select Case TabIndex Select Case TabIndex
Case 0 Case 0
GridControlDocSearch1.DataSource = Nothing GridControlDocSearch1.DataSource = Nothing
@ -61,19 +68,6 @@ Public Class frmResultSQL
If Not IsNothing(oDatatable) Then If Not IsNothing(oDatatable) Then
XtraTabControlData.TabPages(TabIndex).Text = $"{TabCaption} ({oDatatable.Rows.Count})" XtraTabControlData.TabPages(TabIndex).Text = $"{TabCaption} ({oDatatable.Rows.Count})"
clsWMDocGrid.DTDocuments = oDatatable clsWMDocGrid.DTDocuments = oDatatable
'Select Case TabIndex
' Case 0
' GridControlDocSearch1.DataSource = oDatatable
' Case 1
' GridControlDocSearch2.DataSource = oDatatable
' Case 2
' GridControlDocSearch3.DataSource = oDatatable
' Case 3
' GridControlDocSearch4.DataSource = oDatatable
' Case 4
' GridControlDocSearch5.DataSource = oDatatable
'End Select
myGridControl.DataSource = oDatatable myGridControl.DataSource = oDatatable
myGridControl.ForceInitialize() myGridControl.ForceInitialize()
Dim oxmlPath As String = "" Dim oxmlPath As String = ""
@ -107,31 +101,16 @@ Public Class frmResultSQL
End Sub End Sub
Private Sub GridViewDocSearch1_ColumnWidthChanged(sender As Object, e As Views.Base.ColumnEventArgs) Handles GridViewDataSearch1.ColumnWidthChanged Private Sub GridViewDocSearch1_ColumnWidthChanged(sender As Object, e As Views.Base.ColumnEventArgs) Handles GridViewDataSearch1.ColumnWidthChanged
_activeGridView = GridViewDataSearch1 _activeGridView = GridViewDataSearch1
SaveDocGridLayout() SaveDocGridLayout()
End Sub End Sub
Private Sub frmResultDoc_Load(sender As Object, e As EventArgs) Handles Me.Load
If ConfigManager.Config.ResultDataWindowX > 0 And ConfigManager.Config.ResultDataWindowY > 0 Then
Dim oLocation As New Point(ConfigManager.Config.ResultDataWindowX, ConfigManager.Config.ResultDataWindowY)
Location = oLocation
End If
Dim oSize As New Size(ConfigManager.Config.ResultDataWindowWidth, ConfigManager.Config.ResultDataWindowHeight)
Size = oSize
Load_Searches()
End Sub
Sub Load_Searches() Sub Load_Searches()
If Not IsNothing(CurrDataSearch2Load) Then If Not IsNothing(CurrDataSearch2Load) Then
Dim oSQL = $"SELECT * FROM TBCW_PROF_DATA_SEARCH WHERE ACTIVE = 1 AND PROFILE_ID in ({CurrDataSearch2Load}) ORDER BY TAB_INDEX" Dim oSQL = $"SELECT * FROM TBCW_PROF_DATA_SEARCH WHERE ACTIVE = 1 AND PROFILE_ID in ({CurrDataSearch2Load}) ORDER BY TAB_INDEX"
DTDataSearchDefinition = clsDatabase.Return_Datatable(oSQL) DTDataSearchDefinition = clsDatabase.Return_Datatable(oSQL)
Dim oindex As Integer
Dim ocounter As Integer = 0 Dim ocounter As Integer = 0
If CurrDataSearch2Load.ToString.Contains(",") Then If CurrDataSearch2Load.ToString.Contains(",") Then
@ -147,16 +126,13 @@ Public Class frmResultSQL
End Sub End Sub
Private Sub frmResultDoc_FormClosing(sender As Object, e As FormClosingEventArgs) Handles Me.FormClosing Private Sub frmResultDoc_FormClosing(sender As Object, e As FormClosingEventArgs) Handles Me.FormClosing
Try Try
ConfigManager.Config.ResultDataWindowHeight = Size.Height ConfigManager.Config.ResultDataWindowSize = Size
ConfigManager.Config.ResultDataWindowWidth = Size.Width ConfigManager.Config.ResultDataWindowLocation = Location
ConfigManager.Config.ResultDataWindowX = Location.X
ConfigManager.Config.ResultDataWindowY = Location.Y
ConfigManager.Save() ConfigManager.Save()
Catch ex As Exception Catch ex As Exception
Logger.Error(ex) Logger.Error(ex)
Logger.Info("Error in Save FormLayout: " & ex.Message) Logger.Info("Error in Save FormLayout: " & ex.Message)
End Try End Try
End Sub End Sub
Private Sub ToolStripMenuItem1_Click(sender As Object, e As EventArgs) Handles ToolStripMenuItem1.Click Private Sub ToolStripMenuItem1_Click(sender As Object, e As EventArgs) Handles ToolStripMenuItem1.Click

View File

@ -1,15 +1,12 @@
Imports System.ComponentModel Imports System.ComponentModel
Imports System.Threading
Public NotInheritable Class frmSplash Public NotInheritable Class frmSplash
'TODO: Dieses Formular kann einfach als Begrüßungsbildschirm für die Anwendung festgelegt werden, indem Sie zur Registerkarte "Anwendung" 'TODO: Dieses Formular kann einfach als Begrüßungsbildschirm für die Anwendung festgelegt werden, indem Sie zur Registerkarte "Anwendung"
' des Projekt-Designers wechseln (Menü "Projekt", Option "Eigenschaften"). ' des Projekt-Designers wechseln (Menü "Projekt", Option "Eigenschaften").
Private InitSteps As Integer = 6 Private InitSteps As Integer = 3
Private bw As New BackgroundWorker() Private bw As New BackgroundWorker()
Private mainForm As Form Private mainForm As Form
Private Sub frmSplash_FormClosing(sender As Object, e As FormClosingEventArgs) Handles Me.FormClosing
End Sub
Private Sub frmSplash_KeyUp(sender As Object, e As KeyEventArgs) Handles Me.KeyUp Private Sub frmSplash_KeyUp(sender As Object, e As KeyEventArgs) Handles Me.KeyUp
If e.KeyCode = Keys.Escape Then If e.KeyCode = Keys.Escape Then
ESC_Hidden = True ESC_Hidden = True
@ -19,32 +16,10 @@ Public NotInheritable Class frmSplash
Private Sub frmSplash_Load(ByVal sender As Object, ByVal e As System.EventArgs) Handles Me.Load Private Sub frmSplash_Load(ByVal sender As Object, ByVal e As System.EventArgs) Handles Me.Load
'Richten Sie den Dialogtext zur Laufzeit gemäß den Assemblyinformationen der Anwendung ein.
'TODO: Die Assemblyinformationen der Anwendung im Bereich "Anwendung" des Dialogfelds für die
' Projekteigenschaften (im Menü "Projekt") anpassen.
'Anwendungstitel
'If My.Application.Info.Title <> "" Then
' ApplicationTitle.Text = My.Application.Info.Title
'Else
' 'Wenn der Anwendungstitel fehlt, Anwendungsnamen ohne Erweiterung verwenden
' ApplicationTitle.Text = System.IO.Path.GetFileNameWithoutExtension(My.Application.Info.AssemblyName)
'End If
'Verwenden Sie zum Formatieren der Versionsinformationen den Text, der zur Entwurfszeit in der Versionskontrolle festgelegt wurde, als
' Formatierungszeichenfolge. Dies ermöglicht ggf. eine effektive Lokalisierung.
' Build- und Revisionsinformationen können durch Verwendung des folgenden Codes und durch Ändern
' des Entwurfszeittexts der Versionskontrolle in "Version {0}.{1:00}.{2}.{3}" oder einen ähnlichen Text eingeschlossen werden. Weitere Informationen erhalten Sie unter
' String.Format() in der Hilfe.
'
' Version.Text = System.String.Format(Version.Text, My.Application.Info.Version.Major, My.Application.Info.Version.Minor, My.Application.Info.Version.Build, My.Application.Info.Version.Revision)
Version.Text = String.Format("Version {0}", My.Application.Info.Version.ToString) Version.Text = String.Format("Version {0}", My.Application.Info.Version.ToString)
'Copyrightinformationen
Copyright.Text = My.Application.Info.Copyright & " " & My.Application.Info.CompanyName Copyright.Text = My.Application.Info.Copyright & " " & My.Application.Info.CompanyName
Me.BringToFront()
BringToFront()
InitProgram() InitProgram()
End Sub End Sub
@ -55,8 +30,6 @@ Public NotInheritable Class frmSplash
AddHandler bw.ProgressChanged, AddressOf bw_ProgressChanged AddHandler bw.ProgressChanged, AddressOf bw_ProgressChanged
AddHandler bw.RunWorkerCompleted, AddressOf bw_RunWorkerCompleted AddHandler bw.RunWorkerCompleted, AddressOf bw_RunWorkerCompleted
' mainForm = My.Forms.frmMain
bw.RunWorkerAsync() bw.RunWorkerAsync()
End Sub End Sub
@ -70,34 +43,23 @@ Public NotInheritable Class frmSplash
Dim Init = New ClassInit() Dim Init = New ClassInit()
bw.ReportProgress(CalcProgress(1), "Initializing Logger") bw.ReportProgress(CalcProgress(1), "Initializing Logger")
Init.InitLogger() Init.InitLogger()
System.Threading.Thread.Sleep(500) Thread.Sleep(500)
bw.ReportProgress(CalcProgress(2), "Initializing Database") bw.ReportProgress(CalcProgress(2), "Initializing Database")
Init.InitBasics() Init.InitBasics()
If Init.InitDatabase() = True Then If Init.InitDatabase() = True Then
System.Threading.Thread.Sleep(500) Thread.Sleep(500)
bw.ReportProgress(CalcProgress(4), "Initializing User-Configuration") bw.ReportProgress(CalcProgress(3), "Initializing User-Configuration")
If ClassInit.InitUserLogin = False Then If ClassInit.InitUserLogin = False Then
If ERROR_INIT = "" Then If ERROR_INIT = "" Then
ERROR_INIT = "INVALID USER" ERROR_INIT = "INVALID USER"
End If End If
End If End If
Thread.Sleep(500)
System.Threading.Thread.Sleep(800)
'bw.ReportProgress(CalcProgress(5), "Initializing Addons")
'Init.InitAddons()
'System.Threading.Thread.Sleep(500)
bw.ReportProgress(CalcProgress(6), "Initializing Frontend")
' InitInterface wurde in frmMain integriert
'Init.InitInterface(mainForm)
System.Threading.Thread.Sleep(500)
Else Else
ERROR_INIT = "DATABASE" ERROR_INIT = "DATABASE"
End If End If