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 ViewerWindowX As Integer = 0
Public Property ViewerWindowY As Integer = 0
Public Property ViewerWindowWidth As Integer = 1024
Public Property ViewerWindowHeight As Integer = 786
Public Property MatchWindowX As Integer = 0
Public Property MatchWindowY As Integer = 0
Public Property MatchWindowWidth As Integer = 1024
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
Public Property ViewerWindowSize As Size = New Size(1024, 786)
Public Property ViewerWindowLocation As Point = New Point(0, 0)
Public Property MatchWindowSize As Size = New Size(1024, 786)
Public Property MatchWindowLocation As Point = New Size(0, 0)
Public Property ResultDocWindowSize As Size = New Size(1024, 786)
Public Property ResultDocWindowLocation As Point = New Size(0, 0)
Public Property ResultDataWindowSize As Size = New Size(1024, 786)
Public Property ResultDataWindowLocation As Point = New Size(0, 0)
End Class

View File

@ -40,13 +40,8 @@ Public Class ClassInit
LogConfig.Debug = Not .LogErrorsOnly
End With
'Dim configResult As Boolean
'configResult = LoadMyConfig()
'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
Return True
End Function
Private Function DecryptConnectionString(EncryptedConnectionString As String) As String

View File

@ -61,13 +61,13 @@ Public Class frmDocView
ResetSearch()
UpdateMainUi()
If ConfigManager.Config.ViewerWindowX > 0 And ConfigManager.Config.ViewerWindowY > 0 Then
Dim oLocation As New Point(ConfigManager.Config.ViewerWindowX, ConfigManager.Config.ViewerWindowY)
Location = oLocation
If Not ConfigManager.Config.ViewerWindowLocation.IsEmpty Then
Location = ConfigManager.Config.ViewerWindowLocation
End If
Dim oSize As New Size(ConfigManager.Config.ViewerWindowWidth, ConfigManager.Config.ViewerWindowHeight)
Size = oSize
If Not ConfigManager.Config.ViewerWindowSize.IsEmpty Then
Size = ConfigManager.Config.ViewerWindowSize
End If
End Sub
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
Try
ConfigManager.Config.ViewerWindowHeight = Size.Height
ConfigManager.Config.ViewerWindowWidth = Size.Width
ConfigManager.Config.ViewerWindowX = Location.X
ConfigManager.Config.ViewerWindowY = Location.Y
ConfigManager.Config.ViewerWindowLocation = Location
ConfigManager.Config.ViewerWindowSize = Size
ConfigManager.Save()
Catch ex As Exception
Logger.Error(ex)

View File

@ -24,12 +24,30 @@ Partial Class frmProfileMatch
Private Sub InitializeComponent()
Dim TileItemElement1 As DevExpress.XtraEditors.TileItemElement = New DevExpress.XtraEditors.TileItemElement()
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.TileControl1 = New DevExpress.XtraEditors.TileControl()
Me.TileGroup2 = New DevExpress.XtraEditors.TileGroup()
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.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()
'
'Label1
@ -46,6 +64,13 @@ Partial Class frmProfileMatch
'
'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.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))
@ -55,14 +80,19 @@ Partial Class frmProfileMatch
Me.TileControl1.AppearanceItem.Normal.Options.UseFont = 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.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.TileGroupProfiles)
Me.TileControl1.ItemSize = 135
Me.TileControl1.Groups.Add(Me.TileGroupDocumentsData)
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.MaxId = 4
Me.TileControl1.MaxId = 18
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.Text = "TileControl1"
'
@ -70,7 +100,6 @@ Partial Class frmProfileMatch
'
Me.TileGroup2.Items.Add(Me.TileItem1)
Me.TileGroup2.Name = "TileGroup2"
Me.TileGroup2.Text = "Allgemein"
'
'TileItem1
'
@ -81,32 +110,116 @@ Partial Class frmProfileMatch
Me.TileItem1.ItemSize = DevExpress.XtraEditors.TileItemSize.Medium
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
'
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.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.Location = New System.Drawing.Point(564, 394)
Me.SimpleButton1.Location = New System.Drawing.Point(938, 14)
Me.SimpleButton1.Name = "SimpleButton1"
Me.SimpleButton1.Size = New System.Drawing.Size(137, 45)
Me.SimpleButton1.TabIndex = 7
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
'
Me.Appearance.Options.UseFont = True
Me.AutoScaleDimensions = New System.Drawing.SizeF(7.0!, 15.0!)
Me.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font
Me.ClientSize = New System.Drawing.Size(713, 447)
Me.Controls.Add(Me.SimpleButton1)
Me.ClientSize = New System.Drawing.Size(1087, 552)
Me.Controls.Add(Me.Label1)
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.Icon = CType(resources.GetObject("$this.Icon"), System.Drawing.Icon)
Me.MaximizeBox = False
@ -116,6 +229,7 @@ Partial Class frmProfileMatch
Me.StartPosition = System.Windows.Forms.FormStartPosition.CenterParent
Me.Text = "Profile Match"
Me.TopMost = True
Me.Panel1.ResumeLayout(False)
Me.ResumeLayout(False)
Me.PerformLayout()
@ -124,6 +238,16 @@ Partial Class frmProfileMatch
Friend WithEvents TileControl1 As DevExpress.XtraEditors.TileControl
Friend WithEvents TileGroup2 As DevExpress.XtraEditors.TileGroup
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 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

View File

@ -2,18 +2,18 @@
Public Class frmProfileMatch
Private Sub frmProfileMatch_Load(sender As Object, e As EventArgs) Handles Me.Load
If ConfigManager.Config.MatchWindowX > 0 And ConfigManager.Config.MatchWindowY > 0 Then
Dim oLocation As New Point(ConfigManager.Config.MatchWindowX, ConfigManager.Config.MatchWindowY)
Location = oLocation
If Not ConfigManager.Config.MatchWindowLocation.IsEmpty Then
Location = ConfigManager.Config.MatchWindowLocation
End If
Dim oSize As New Size(ConfigManager.Config.MatchWindowWidth, ConfigManager.Config.MatchWindowHeight)
Size = oSize
If Not ConfigManager.Config.MatchWindowSize.IsEmpty Then
Size = ConfigManager.Config.MatchWindowSize
End If
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
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
CreateTiles()
CurrDocSearch2Load = Nothing
@ -24,7 +24,7 @@ Public Class frmProfileMatch
Dim oPrimaryFont As New Font("Segoe UI", 12, FontStyle.Bold)
Dim oSecondaryFont As New Font("Segoe UI", 10)
Dim oGroup = TileControl1.Groups.Item("TileGroupProfiles")
Dim oGroup = TileControl1.Groups.Item("TileGroupDocuments")
oGroup.Items.Clear()
For Each oRow As DataRow In CurrDT_PROFILE_MATCH.Rows
@ -39,7 +39,7 @@ Public Class frmProfileMatch
Dim oCommentElement = New TileItemElement()
oCommentElement.Text = oRow.Item("COMMENT")
oCommentElement.TextAlignment = TileItemContentAlignment.BottomLeft
oCommentElement.TextAlignment = TileItemContentAlignment.MiddleLeft
oCommentElement.Appearance.Normal.Font = oSecondaryFont
oItem.Elements.Add(oCommentElement)
@ -66,20 +66,18 @@ Public Class frmProfileMatch
End Sub
Sub OpenResults_Doc()
Dim ofrmresult As Form = New frmResultDoc
ofrmresult.Show()
Dim oFrmResultDoc As Form = New frmResultDoc
oFrmResultDoc.Show()
End Sub
Sub OpenResults_Data()
Dim ofrmresult As Form = New frmResultSQL
ofrmresult.Show()
Dim oFrmResultData As Form = New frmResultSQL
oFrmResultData.Show()
End Sub
Private Sub frmProfileMatch_FormClosing(sender As Object, e As FormClosingEventArgs) Handles Me.FormClosing
Try
ConfigManager.Config.MatchWindowHeight = Size.Height
ConfigManager.Config.MatchWindowWidth = Size.Width
ConfigManager.Config.MatchWindowX = Location.X
ConfigManager.Config.MatchWindowY = Location.Y
ConfigManager.Config.MatchWindowSize = Size
ConfigManager.Config.MatchWindowLocation = Location
ConfigManager.Save()
Catch ex As Exception
Logger.Error(ex)

View File

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

View File

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

View File

@ -1,15 +1,12 @@
Imports System.ComponentModel
Imports System.Threading
Public NotInheritable Class frmSplash
'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").
Private InitSteps As Integer = 6
Private InitSteps As Integer = 3
Private bw As New BackgroundWorker()
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
If e.KeyCode = Keys.Escape Then
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
'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)
'Copyrightinformationen
Copyright.Text = My.Application.Info.Copyright & " " & My.Application.Info.CompanyName
Me.BringToFront()
BringToFront()
InitProgram()
End Sub
@ -55,8 +30,6 @@ Public NotInheritable Class frmSplash
AddHandler bw.ProgressChanged, AddressOf bw_ProgressChanged
AddHandler bw.RunWorkerCompleted, AddressOf bw_RunWorkerCompleted
' mainForm = My.Forms.frmMain
bw.RunWorkerAsync()
End Sub
@ -70,34 +43,23 @@ Public NotInheritable Class frmSplash
Dim Init = New ClassInit()
bw.ReportProgress(CalcProgress(1), "Initializing Logger")
Init.InitLogger()
System.Threading.Thread.Sleep(500)
Thread.Sleep(500)
bw.ReportProgress(CalcProgress(2), "Initializing Database")
Init.InitBasics()
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 ERROR_INIT = "" Then
ERROR_INIT = "INVALID USER"
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
ERROR_INIT = "DATABASE"
End If