diff --git a/Controls.DocumentViewer/DocumentViewer.vb b/Controls.DocumentViewer/DocumentViewer.vb index ceff7d12..683d63e8 100644 --- a/Controls.DocumentViewer/DocumentViewer.vb +++ b/Controls.DocumentViewer/DocumentViewer.vb @@ -30,7 +30,7 @@ Public Class DocumentViewer Private _hide_file_info_from_user As Boolean = False Private _FilePath As String - + Private _Fileinfo As FileInfo ' List of all created temp files when converting msg files Private _TempFiles As New List(Of String) @@ -80,6 +80,7 @@ Public Class DocumentViewer Dim oFileLoaded = DoLoadFile(FilePath) _FilePath = FilePath + _Fileinfo = New FileInfo(FilePath) If oFileLoaded = True Then FileLoaded = True @@ -129,8 +130,7 @@ Public Class DocumentViewer If Len(_FilePath) Then Exit Sub End If - Dim oFileInfo = New IO.FileInfo(_FilePath) - Dim oExtension As String = oFileInfo.Extension.ToUpper + Dim oExtension As String = _Fileinfo.Extension.ToUpper Select Case oExtension.ToUpper Case ".MSG" RichEditControl1.CreateNewDocument() diff --git a/Controls.DocumentViewer/My Project/AssemblyInfo.vb b/Controls.DocumentViewer/My Project/AssemblyInfo.vb index a5b4e6c2..78b029e0 100644 --- a/Controls.DocumentViewer/My Project/AssemblyInfo.vb +++ b/Controls.DocumentViewer/My Project/AssemblyInfo.vb @@ -31,5 +31,5 @@ Imports System.Runtime.InteropServices ' übernehmen, indem Sie "*" eingeben: ' - - + + diff --git a/Controls.LookupGrid/LookupControl3.vb b/Controls.LookupGrid/LookupControl3.vb index 2555aa2a..20ef0dd3 100644 --- a/Controls.LookupGrid/LookupControl3.vb +++ b/Controls.LookupGrid/LookupControl3.vb @@ -213,21 +213,17 @@ Public Class RepositoryItemLookupControl3 End Try End Sub - Public Overrides Sub EndInit() - MyBase.EndInit() + Public Overrides Sub CreateDefaultButton() + MyBase.CreateDefaultButton() - Dim oLookupFormButton = New EditorButton() With { + Dim oLookupFormButtonm = New EditorButton() With { .Kind = ButtonPredefines.Search, .Tag = TAG_BUTTON_LOOKUP_FORM, .Width = 20 } - ' Add button if it does not already exists - If Buttons.Contains(oLookupFormButton) = False Then - Buttons.Insert(0, oLookupFormButton) - ' Set the button which opens the dropdown - ActionButtonIndex = 1 - End If + Buttons.Item(0).Tag = TAG_DROPDOWN + Buttons.AddRange({oLookupFormButtonm}) End Sub Protected Overrides Sub RaiseQueryPopUp(e As CancelEventArgs) diff --git a/GUIs.ClipboardWatcher/ClipboardWatcher.vbproj b/GUIs.ClipboardWatcher/ClipboardWatcher.vbproj index 5a568159..e67450dd 100644 --- a/GUIs.ClipboardWatcher/ClipboardWatcher.vbproj +++ b/GUIs.ClipboardWatcher/ClipboardWatcher.vbproj @@ -46,6 +46,7 @@ False + False @@ -119,6 +120,12 @@ + + frmMatchLoading.vb + + + Form + @@ -134,6 +141,9 @@ My.Resources Designer + + frmMatchLoading.vb + diff --git a/GUIs.ClipboardWatcher/My Project/AssemblyInfo.vb b/GUIs.ClipboardWatcher/My Project/AssemblyInfo.vb index 93565b3c..2c58d797 100644 --- a/GUIs.ClipboardWatcher/My Project/AssemblyInfo.vb +++ b/GUIs.ClipboardWatcher/My Project/AssemblyInfo.vb @@ -12,7 +12,7 @@ Imports System.Runtime.InteropServices - + @@ -31,5 +31,5 @@ Imports System.Runtime.InteropServices ' übernehmen, indem Sie "*" eingeben: ' - - + + diff --git a/GUIs.ClipboardWatcher/frmMatch.Designer.vb b/GUIs.ClipboardWatcher/frmMatch.Designer.vb index e95c4479..dc79f6a0 100644 --- a/GUIs.ClipboardWatcher/frmMatch.Designer.vb +++ b/GUIs.ClipboardWatcher/frmMatch.Designer.vb @@ -28,6 +28,7 @@ Partial Class frmMatch Me.TileGroupData = New DevExpress.XtraEditors.TileGroup() Me.Label1 = New System.Windows.Forms.Label() Me.Label2 = New System.Windows.Forms.Label() + Me.SplashScreenManager1 = New DevExpress.XtraSplashScreen.SplashScreenManager(Me, GetType(Global.DigitalData.GUIs.ClipboardWatcher.frmMatchLoading), True, True) Me.SuspendLayout() ' 'TileControlMatch @@ -44,10 +45,10 @@ Partial Class frmMatch Me.TileControlMatch.Groups.Add(Me.TileGroupDocumentsData) Me.TileControlMatch.Groups.Add(Me.TileGroupDocuments) Me.TileControlMatch.Groups.Add(Me.TileGroupData) - Me.TileControlMatch.Location = New System.Drawing.Point(0, 0) + Me.TileControlMatch.Location = New System.Drawing.Point(0, 38) Me.TileControlMatch.Name = "TileControlMatch" Me.TileControlMatch.ShowGroupText = True - Me.TileControlMatch.Size = New System.Drawing.Size(800, 450) + Me.TileControlMatch.Size = New System.Drawing.Size(800, 382) Me.TileControlMatch.TabIndex = 0 Me.TileControlMatch.Text = "TileControl1" ' @@ -69,43 +70,47 @@ Partial Class frmMatch ' 'Label1 ' - Me.Label1.AutoSize = True Me.Label1.BackColor = System.Drawing.Color.FromArgb(CType(CType(165, Byte), Integer), CType(CType(36, Byte), Integer), CType(CType(49, Byte), Integer)) + Me.Label1.Dock = System.Windows.Forms.DockStyle.Top Me.Label1.Font = New System.Drawing.Font("Segoe UI Semibold", 12.0!, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, CType(0, Byte)) Me.Label1.ForeColor = System.Drawing.Color.White - Me.Label1.Location = New System.Drawing.Point(12, 9) + Me.Label1.Location = New System.Drawing.Point(0, 0) Me.Label1.Name = "Label1" - Me.Label1.Size = New System.Drawing.Size(408, 21) + Me.Label1.Padding = New System.Windows.Forms.Padding(5) + Me.Label1.Size = New System.Drawing.Size(800, 38) Me.Label1.TabIndex = 1 Me.Label1.Text = "Es wurde(n) {0} in {1} für Ihre Suche nach '{2}' gefunden:" ' 'Label2 ' - Me.Label2.Anchor = CType((System.Windows.Forms.AnchorStyles.Bottom Or System.Windows.Forms.AnchorStyles.Left), System.Windows.Forms.AnchorStyles) - Me.Label2.AutoSize = True Me.Label2.BackColor = System.Drawing.Color.FromArgb(CType(CType(165, Byte), Integer), CType(CType(36, Byte), Integer), CType(CType(49, Byte), Integer)) Me.Label2.Cursor = System.Windows.Forms.Cursors.Hand + Me.Label2.Dock = System.Windows.Forms.DockStyle.Bottom Me.Label2.Font = New System.Drawing.Font("Segoe UI", 9.75!, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, CType(0, Byte)) Me.Label2.ForeColor = System.Drawing.SystemColors.Control - Me.Label2.Location = New System.Drawing.Point(12, 424) + Me.Label2.Location = New System.Drawing.Point(0, 420) Me.Label2.Name = "Label2" - Me.Label2.Size = New System.Drawing.Size(205, 17) + Me.Label2.Padding = New System.Windows.Forms.Padding(5) + Me.Label2.Size = New System.Drawing.Size(800, 30) Me.Label2.TabIndex = 3 Me.Label2.Text = "Wie wurden die Profile gefunden?" ' + 'SplashScreenManager1 + ' + Me.SplashScreenManager1.ClosingDelay = 500 + ' 'frmMatch ' Me.AutoScaleDimensions = New System.Drawing.SizeF(6.0!, 13.0!) Me.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font Me.ClientSize = New System.Drawing.Size(800, 450) + Me.Controls.Add(Me.TileControlMatch) Me.Controls.Add(Me.Label2) Me.Controls.Add(Me.Label1) - Me.Controls.Add(Me.TileControlMatch) Me.IconOptions.ShowIcon = False Me.Name = "frmMatch" Me.Text = "Clipboard Watcher - Profile gefunden" Me.ResumeLayout(False) - Me.PerformLayout() End Sub @@ -115,4 +120,5 @@ Partial Class frmMatch Friend WithEvents TileGroupData As DevExpress.XtraEditors.TileGroup Friend WithEvents Label1 As System.Windows.Forms.Label Friend WithEvents Label2 As System.Windows.Forms.Label + Friend WithEvents SplashScreenManager1 As DevExpress.XtraSplashScreen.SplashScreenManager End Class diff --git a/GUIs.ClipboardWatcher/frmMatch.vb b/GUIs.ClipboardWatcher/frmMatch.vb index d01dd1f5..84170123 100644 --- a/GUIs.ClipboardWatcher/frmMatch.vb +++ b/GUIs.ClipboardWatcher/frmMatch.vb @@ -71,38 +71,48 @@ Public Class frmMatch Dim oCreatedTiles As Integer = oResult.Item1 Dim oMatchedProfiles As Integer = oResult.Item2 - If oCreatedTiles = -1 Then - Exit Sub - End If + Try + SplashScreenManager1.ShowWaitForm() + TileControlMatch.Enabled = False - If oCreatedTiles = 0 Then - _Logger.Warn("No Tiles Created: No Results found for ""{0}""", _Params.ClipboardContents) - Close() - End If - - Label1.Text = GetResultString(oCreatedTiles, oMatchedProfiles, _Params.ClipboardContents) - _Logger.Debug($"Created Tiles: {oCreatedTiles} ") - _Logger.Debug($"Matched Profiles: {oMatchedProfiles}") - - If oCreatedTiles = 1 Then - Dim oProfile As ProfileData = _Params.MatchingProfiles.First() - Dim oProfileSearch As New ProfileSearches(_LogConfig, _Environment, _Params) - - If oProfile.CountDocs > 0 And oProfile.CountData = 0 Then - _Logger.Debug($"ONLY Docs") - 'ONLY DOCS AND NÒ DATA - Dim oSearches = Await oProfileSearch.LoadDocumentSearchesAsync(oProfile.Guid) - OpenDocumentResults(oProfile, oSearches) - Hide() - ElseIf oProfile.CountDocs > 0 And oProfile.CountData > 0 Then - _Logger.Debug($"Docs AND Data") - ElseIf oProfile.CountDocs = 0 And oProfile.CountData > 0 Then - _Logger.Debug($"ONLY Data") - Dim oSearches = Await oProfileSearch.LoadDataSearchesAsync(oProfile.Guid) - OpenDataResults(oProfile, oSearches) - Hide() + If oCreatedTiles = -1 Then + Exit Sub End If - End If + + If oCreatedTiles = 0 Then + _Logger.Warn("No Tiles Created: No Results found for ""{0}""", _Params.ClipboardContents) + Close() + End If + + Label1.Text = GetResultString(oCreatedTiles, oMatchedProfiles, _Params.ClipboardContents) + _Logger.Debug($"Created Tiles: {oCreatedTiles} ") + _Logger.Debug($"Matched Profiles: {oMatchedProfiles}") + + If oCreatedTiles = 1 Then + Dim oProfile As ProfileData = _Params.MatchingProfiles.First() + Dim oProfileSearch As New ProfileSearches(_LogConfig, _Environment, _Params) + + If oProfile.CountDocs > 0 And oProfile.CountData = 0 Then + _Logger.Debug($"ONLY Docs") + 'ONLY DOCS AND NÒ DATA + Dim oSearches = Await oProfileSearch.LoadDocumentSearchesAsync(oProfile.Guid) + OpenDocumentResults(oProfile, oSearches) + Hide() + ElseIf oProfile.CountDocs > 0 And oProfile.CountData > 0 Then + _Logger.Debug($"Docs AND Data") + ElseIf oProfile.CountDocs = 0 And oProfile.CountData > 0 Then + _Logger.Debug($"ONLY Data") + Dim oSearches = Await oProfileSearch.LoadDataSearchesAsync(oProfile.Guid) + OpenDataResults(oProfile, oSearches) + Hide() + End If + End If + Catch ex As Exception + _Logger.Error(ex) + Finally + TileControlMatch.Enabled = True + SplashScreenManager1.CloseWaitForm() + End Try End Sub Private Sub frmMatch_Activated(sender As Object, e As EventArgs) Handles Me.Activated @@ -244,6 +254,9 @@ Public Class frmMatch Private Async Sub TileControlMatch_ItemClick(sender As Object, e As TileItemEventArgs) Handles TileControlMatch.ItemClick Try + SplashScreenManager1.ShowWaitForm() + TileControlMatch.Enabled = False + Dim oItem As TileItem = e.Item Dim oProfileId As Integer = oItem.Tag @@ -271,6 +284,9 @@ Public Class frmMatch Catch ex As Exception MsgBox($"Error while loading Searches: " & vbNewLine & ex.Message, MsgBoxStyle.Critical, Text) _Logger.Error(ex) + Finally + SplashScreenManager1.CloseWaitForm() + TileControlMatch.Enabled = True End Try End Sub diff --git a/GUIs.ClipboardWatcher/frmMatchLoading.Designer.vb b/GUIs.ClipboardWatcher/frmMatchLoading.Designer.vb new file mode 100644 index 00000000..08c416bd --- /dev/null +++ b/GUIs.ClipboardWatcher/frmMatchLoading.Designer.vb @@ -0,0 +1,89 @@ +Imports System.Windows.Forms + + +Partial Class frmMatchLoading + Inherits DevExpress.XtraWaitForm.WaitForm + + 'Form overrides dispose to clean up the component list. + + Protected Overrides Sub Dispose(ByVal disposing As Boolean) + Try + If disposing AndAlso components IsNot Nothing Then + components.Dispose() + End If + Finally + MyBase.Dispose(disposing) + End Try + End Sub + + 'Required by the Windows Form Designer + Private components As System.ComponentModel.IContainer + + 'NOTE: The following procedure is required by the Windows Form Designer + 'It can be modified using the Windows Form Designer. + 'Do not modify it using the code editor. + + Private Sub InitializeComponent() + Me.progressPanel1 = New DevExpress.XtraWaitForm.ProgressPanel() + Me.tableLayoutPanel1 = New System.Windows.Forms.TableLayoutPanel() + Me.tableLayoutPanel1.SuspendLayout() + Me.SuspendLayout() + ' + 'progressPanel1 + ' + Me.progressPanel1.Appearance.BackColor = System.Drawing.Color.Transparent + Me.progressPanel1.Appearance.Options.UseBackColor = True + Me.progressPanel1.AppearanceCaption.Font = New System.Drawing.Font("Microsoft Sans Serif", 12.0!) + Me.progressPanel1.AppearanceCaption.Options.UseFont = True + Me.progressPanel1.AppearanceDescription.Font = New System.Drawing.Font("Microsoft Sans Serif", 8.25!) + Me.progressPanel1.AppearanceDescription.Options.UseFont = True + Me.progressPanel1.BarAnimationElementThickness = 2 + Me.progressPanel1.Caption = "Bitte warten" + Me.progressPanel1.Description = "Ergebnisse werden geladen..." + Me.progressPanel1.Dock = System.Windows.Forms.DockStyle.Fill + Me.progressPanel1.ImageHorzOffset = 20 + Me.progressPanel1.Location = New System.Drawing.Point(0, 17) + Me.progressPanel1.Margin = New System.Windows.Forms.Padding(0, 3, 0, 3) + Me.progressPanel1.Name = "progressPanel1" + Me.progressPanel1.Size = New System.Drawing.Size(246, 39) + Me.progressPanel1.TabIndex = 0 + Me.progressPanel1.Text = "progressPanel1" + ' + 'tableLayoutPanel1 + ' + Me.tableLayoutPanel1.AutoSize = True + Me.tableLayoutPanel1.AutoSizeMode = System.Windows.Forms.AutoSizeMode.GrowAndShrink + Me.tableLayoutPanel1.BackColor = System.Drawing.Color.Transparent + Me.tableLayoutPanel1.ColumnCount = 1 + Me.tableLayoutPanel1.ColumnStyles.Add(New System.Windows.Forms.ColumnStyle(System.Windows.Forms.SizeType.Percent, 100.0!)) + Me.tableLayoutPanel1.Controls.Add(Me.progressPanel1, 0, 0) + Me.tableLayoutPanel1.Dock = System.Windows.Forms.DockStyle.Fill + Me.tableLayoutPanel1.Location = New System.Drawing.Point(0, 0) + Me.tableLayoutPanel1.Name = "tableLayoutPanel1" + Me.tableLayoutPanel1.Padding = New System.Windows.Forms.Padding(0, 14, 0, 14) + Me.tableLayoutPanel1.RowCount = 1 + Me.tableLayoutPanel1.RowStyles.Add(New System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Percent, 100.0!)) + Me.tableLayoutPanel1.Size = New System.Drawing.Size(246, 73) + Me.tableLayoutPanel1.TabIndex = 1 + ' + 'WaitForm1 + ' + Me.AutoScaleDimensions = New System.Drawing.SizeF(6.0!, 13.0!) + Me.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font + Me.AutoSize = True + Me.AutoSizeMode = System.Windows.Forms.AutoSizeMode.GrowAndShrink + Me.ClientSize = New System.Drawing.Size(246, 73) + Me.Controls.Add(Me.tableLayoutPanel1) + Me.DoubleBuffered = True + Me.Name = "WaitForm1" + Me.StartPosition = System.Windows.Forms.FormStartPosition.Manual + Me.Text = "Form1" + Me.tableLayoutPanel1.ResumeLayout(False) + Me.ResumeLayout(False) + Me.PerformLayout() + + End Sub + + Private WithEvents progressPanel1 As DevExpress.XtraWaitForm.ProgressPanel + Private WithEvents tableLayoutPanel1 As System.Windows.Forms.TableLayoutPanel +End Class diff --git a/GUIs.ClipboardWatcher/frmMatchLoading.resx b/GUIs.ClipboardWatcher/frmMatchLoading.resx new file mode 100644 index 00000000..1af7de15 --- /dev/null +++ b/GUIs.ClipboardWatcher/frmMatchLoading.resx @@ -0,0 +1,120 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + text/microsoft-resx + + + 2.0 + + + System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + \ No newline at end of file diff --git a/GUIs.ClipboardWatcher/frmMatchLoading.vb b/GUIs.ClipboardWatcher/frmMatchLoading.vb new file mode 100644 index 00000000..ab714860 --- /dev/null +++ b/GUIs.ClipboardWatcher/frmMatchLoading.vb @@ -0,0 +1,24 @@ +Public Class frmMatchLoading + Sub New + InitializeComponent() + Me.progressPanel1.AutoHeight = True + End Sub + + Public Overrides Sub SetCaption(ByVal caption As String) + MyBase.SetCaption(caption) + Me.progressPanel1.Caption = caption + End Sub + + Public Overrides Sub SetDescription(ByVal description As String) + MyBase.SetDescription(description) + Me.progressPanel1.Description = description + End Sub + + Public Overrides Sub ProcessCommand(ByVal cmd As System.Enum, ByVal arg As Object) + MyBase.ProcessCommand(cmd, arg) + End Sub + + Public Enum WaitFormCommand + SomeCommandId + End Enum +End Class diff --git a/GUIs.Common/Common.vbproj b/GUIs.Common/Common.vbproj index 26421b26..0f2ae57b 100644 --- a/GUIs.Common/Common.vbproj +++ b/GUIs.Common/Common.vbproj @@ -187,6 +187,10 @@ {25017513-0d97-49d3-98d7-ba76d9b251b0} EDMI.API + + {991d0231-4623-496d-8bd0-9ca906029cbc} + Filesystem + {d3c8cfed-d6f6-43a8-9bdf-454145d0352f} Language @@ -259,5 +263,8 @@ + + + \ No newline at end of file diff --git a/GUIs.Common/DocumentPropertyMenu/DocumentPropertyMenu.vb b/GUIs.Common/DocumentPropertyMenu/DocumentPropertyMenu.vb index 2c2965f9..67b75a67 100644 --- a/GUIs.Common/DocumentPropertyMenu/DocumentPropertyMenu.vb +++ b/GUIs.Common/DocumentPropertyMenu/DocumentPropertyMenu.vb @@ -102,22 +102,11 @@ Public Class DocumentPropertyMenu Exit Sub End If - Using oProc As New Process - Try - oProc.StartInfo.FileName = _FilePath - oProc.EnableRaisingEvents = True - AddHandler oProc.Exited, AddressOf Handle_OpenFile - - oProc.Start(_FilePath) - RaiseEvent FileOpened(Me, _FilePath) - Catch ex As Exception - _Logger.Error(ex) - End Try - End Using - End Sub - - Public Sub Handle_OpenFile(sender As Object, e As EventArgs) - RaiseEvent FileClosed(Me, _FilePath) + Try + RaiseEvent FileOpened(Me, _FilePath) + Catch ex As Exception + _Logger.Error(ex) + End Try End Sub Public Sub OpenFolder_Click(sender As Object, e As EventArgs) diff --git a/GUIs.Common/DocumentResultList/frmDocumentResultList.Designer.vb b/GUIs.Common/DocumentResultList/frmDocumentResultList.Designer.vb index 22a19878..ce4fc7c8 100644 --- a/GUIs.Common/DocumentResultList/frmDocumentResultList.Designer.vb +++ b/GUIs.Common/DocumentResultList/frmDocumentResultList.Designer.vb @@ -84,8 +84,11 @@ Partial Class frmDocumentResultList Me.RibbonControl.Pages.AddRange(New DevExpress.XtraBars.Ribbon.RibbonPage() {Me.RibbonPage1}) Me.RibbonControl.RepositoryItems.AddRange(New DevExpress.XtraEditors.Repository.RepositoryItem() {Me.RepositoryItemTextEdit1, Me.RepositoryItemTextEdit2}) Me.RibbonControl.ShowApplicationButton = DevExpress.Utils.DefaultBoolean.[False] - Me.RibbonControl.Size = New System.Drawing.Size(1189, 157) + Me.RibbonControl.ShowPageHeadersMode = DevExpress.XtraBars.Ribbon.ShowPageHeadersMode.Hide + Me.RibbonControl.ShowToolbarCustomizeItem = False + Me.RibbonControl.Size = New System.Drawing.Size(1189, 131) Me.RibbonControl.StatusBar = Me.RibbonStatusBar + Me.RibbonControl.Toolbar.ShowCustomizeItem = False ' 'SwitchMainContainerHorizontal ' @@ -189,6 +192,7 @@ Partial Class frmDocumentResultList ' 'labelCriticalError ' + Me.labelCriticalError.Alignment = DevExpress.XtraBars.BarItemLinkAlignment.Right Me.labelCriticalError.Caption = "Critical Error" Me.labelCriticalError.Id = 14 Me.labelCriticalError.ImageOptions.SvgImage = CType(resources.GetObject("labelCriticalError.ImageOptions.SvgImage"), DevExpress.Utils.Svg.SvgImage) @@ -202,13 +206,13 @@ Partial Class frmDocumentResultList ' 'labelWarning ' + Me.labelWarning.Alignment = DevExpress.XtraBars.BarItemLinkAlignment.Right Me.labelWarning.Caption = "Warning" Me.labelWarning.Id = 15 Me.labelWarning.ImageOptions.SvgImage = CType(resources.GetObject("labelWarning.ImageOptions.SvgImage"), DevExpress.Utils.Svg.SvgImage) Me.labelWarning.ItemAppearance.Normal.BackColor = System.Drawing.Color.White Me.labelWarning.ItemAppearance.Normal.Options.UseBackColor = True Me.labelWarning.Name = "labelWarning" - Me.labelWarning.PaintStyle = DevExpress.XtraBars.BarItemPaintStyle.CaptionGlyph Me.labelWarning.Visibility = DevExpress.XtraBars.BarItemVisibility.OnlyInCustomizing ' 'RibbonPage1 @@ -260,7 +264,7 @@ Partial Class frmDocumentResultList Me.SplitContainerControl1.Panel1.Text = "Panel1" Me.SplitContainerControl1.Panel2.Controls.Add(Me.SplitContainerControl2) Me.SplitContainerControl1.Panel2.Text = "Panel2" - Me.SplitContainerControl1.Size = New System.Drawing.Size(762, 492) + Me.SplitContainerControl1.Size = New System.Drawing.Size(762, 518) Me.SplitContainerControl1.SplitterPosition = 382 Me.SplitContainerControl1.TabIndex = 2 Me.SplitContainerControl1.Text = "SplitContainerControl1" @@ -272,7 +276,7 @@ Partial Class frmDocumentResultList Me.GridControl1.MainView = Me.GridView1 Me.GridControl1.MenuManager = Me.RibbonControl Me.GridControl1.Name = "GridControl1" - Me.GridControl1.Size = New System.Drawing.Size(382, 492) + Me.GridControl1.Size = New System.Drawing.Size(382, 518) Me.GridControl1.TabIndex = 0 Me.GridControl1.ViewCollection.AddRange(New DevExpress.XtraGrid.Views.Base.BaseView() {Me.GridView1}) ' @@ -313,7 +317,7 @@ Partial Class frmDocumentResultList Me.SplitContainerControl2.Panel1.Text = "Panel1" Me.SplitContainerControl2.Panel2.Controls.Add(Me.GridControl3) Me.SplitContainerControl2.Panel2.Text = "Panel2" - Me.SplitContainerControl2.Size = New System.Drawing.Size(370, 492) + Me.SplitContainerControl2.Size = New System.Drawing.Size(370, 518) Me.SplitContainerControl2.SplitterPosition = 223 Me.SplitContainerControl2.TabIndex = 0 Me.SplitContainerControl2.Text = "SplitContainerControl2" @@ -358,7 +362,7 @@ Partial Class frmDocumentResultList Me.GridControl3.MainView = Me.GridView3 Me.GridControl3.MenuManager = Me.RibbonControl Me.GridControl3.Name = "GridControl3" - Me.GridControl3.Size = New System.Drawing.Size(370, 259) + Me.GridControl3.Size = New System.Drawing.Size(370, 285) Me.GridControl3.TabIndex = 0 Me.GridControl3.ViewCollection.AddRange(New DevExpress.XtraGrid.Views.Base.BaseView() {Me.GridView3}) ' @@ -387,13 +391,13 @@ Partial Class frmDocumentResultList 'SplitContainerControl3 ' Me.SplitContainerControl3.Dock = System.Windows.Forms.DockStyle.Fill - Me.SplitContainerControl3.Location = New System.Drawing.Point(0, 157) + Me.SplitContainerControl3.Location = New System.Drawing.Point(0, 131) Me.SplitContainerControl3.Name = "SplitContainerControl3" Me.SplitContainerControl3.Panel1.Controls.Add(Me.SplitContainerControl1) Me.SplitContainerControl3.Panel1.Text = "Panel1" Me.SplitContainerControl3.Panel2.Controls.Add(Me.DocumentViewer1) Me.SplitContainerControl3.Panel2.Text = "Panel2" - Me.SplitContainerControl3.Size = New System.Drawing.Size(1189, 492) + Me.SplitContainerControl3.Size = New System.Drawing.Size(1189, 518) Me.SplitContainerControl3.SplitterPosition = 762 Me.SplitContainerControl3.TabIndex = 5 Me.SplitContainerControl3.Text = "SplitContainerControl3" @@ -404,7 +408,7 @@ Partial Class frmDocumentResultList Me.DocumentViewer1.FileLoaded = False Me.DocumentViewer1.Location = New System.Drawing.Point(0, 0) Me.DocumentViewer1.Name = "DocumentViewer1" - Me.DocumentViewer1.Size = New System.Drawing.Size(417, 492) + Me.DocumentViewer1.Size = New System.Drawing.Size(417, 518) Me.DocumentViewer1.TabIndex = 0 ' 'XtraSaveFileDialog @@ -421,8 +425,8 @@ Partial Class frmDocumentResultList Me.Controls.Add(Me.RibbonStatusBar) Me.Controls.Add(Me.RibbonControl) Me.IconOptions.Icon = CType(resources.GetObject("frmDocumentResultList.IconOptions.Icon"), System.Drawing.Icon) - Me.IconOptions.Image = Global.DigitalData.GUIs.Common.My.Resources.Resources.zoom_less Me.IconOptions.ShowIcon = False + Me.IconOptions.SvgImage = Global.DigitalData.GUIs.Common.My.Resources.Resources.grid Me.Name = "frmDocumentResultList" Me.Ribbon = Me.RibbonControl Me.StatusBar = Me.RibbonStatusBar diff --git a/GUIs.Common/DocumentResultList/frmDocumentResultList.vb b/GUIs.Common/DocumentResultList/frmDocumentResultList.vb index c4fd5b72..38f93e0e 100644 --- a/GUIs.Common/DocumentResultList/frmDocumentResultList.vb +++ b/GUIs.Common/DocumentResultList/frmDocumentResultList.vb @@ -1,23 +1,22 @@ -Imports System.Drawing +Imports System.ComponentModel +Imports System.Drawing Imports System.IO Imports System.Windows.Forms Imports DevExpress.Utils +Imports DevExpress.XtraEditors Imports DevExpress.XtraGrid Imports DevExpress.XtraGrid.Columns +Imports DevExpress.XtraGrid.Views.BandedGrid +Imports DevExpress.XtraGrid.Views.Base Imports DevExpress.XtraGrid.Views.Grid +Imports DevExpress.XtraGrid.Views.Grid.ViewInfo Imports DevExpress.XtraPrinting Imports DigitalData.Modules.Config -Imports DigitalData.Modules.Logging -Imports DigitalData.Modules.ZooFlow -Imports DigitalData.Modules.Language Imports DigitalData.Modules.EDMI.API Imports DigitalData.Modules.EDMI.API.Client -Imports DevExpress.XtraGrid.Views.Base -Imports DevExpress.XtraGrid.Views.BandedGrid -Imports System.ComponentModel -Imports DevExpress.XtraGrid.Views.Grid.ViewInfo -Imports DevExpress.XtraEditors.ViewInfo -Imports DevExpress.XtraEditors +Imports DigitalData.Modules.Language +Imports DigitalData.Modules.Logging +Imports DigitalData.Modules.ZooFlow Public Class frmDocumentResultList Implements IResultForm @@ -29,9 +28,10 @@ Public Class frmDocumentResultList Private COLUMN_DOCID As String = "DocID" Private COLUMN_ICON As String = "ICON" - Private _IsLoading As Boolean = True - Private _IDBClient As Client + Private Const FILE_OPEN_TIMER_INTERVAL As Integer = 500 + ' Helper Classes + Private _IDBClient As Client Private _LogConfig As LogConfig Private _Logger As Logger Private _Config As ConfigManager(Of DocumentResultConfig) @@ -39,12 +39,21 @@ Public Class frmDocumentResultList Private _Params As DocumentResultParams Private _ResultLists As List(Of DocumentResult) Private _Helpers As DocumentResultList + Private _Filesystem As DigitalData.Modules.Filesystem.File + ' Runtime variables + Private _IsLoading As Boolean = True Private _ActiveGrid As GridControl = Nothing Private _ActiveGridBand As GridBand = Nothing - Private _DocumentInfo As DocumentInfo = Nothing + ' TODO: Hashes for checking if the opened file was modified externally + Private _HashOriginalFile As String = Nothing + Private _HashOpenedFile As String = Nothing + + Private WithEvents _FileOpenTimer As New Timer + Private _FileOpenList As New Dictionary(Of Integer, String) + Private Property OperationMode As IResultForm.Mode Implements IResultForm.OperationMode Public Property ShouldReturnToPreviousForm As Boolean = False Implements IResultForm.ShouldReturnToPreviousForm @@ -64,10 +73,14 @@ Public Class frmDocumentResultList _Logger = LogConfig.GetLogger() _Config = New ConfigManager(Of DocumentResultConfig)(LogConfig, oConfigPath, oConfigPath) _Helpers = New DocumentResultList(LogConfig) + _Filesystem = New Modules.Filesystem.File(_LogConfig) _Environment = Environment _Params = Params _ResultLists = Params.Results + + _FileOpenTimer.Interval = FILE_OPEN_TIMER_INTERVAL + _FileOpenTimer.Start() End Sub Private Sub frmDocumentResultList_Load(sender As Object, e As EventArgs) Handles MyBase.Load @@ -140,21 +153,32 @@ Public Class frmDocumentResultList LoadFile_IDB(oRow) End If - If IsNothing(_DocumentInfo) Or DocumentViewer1.FileLoaded = False Then + If IsNothing(_DocumentInfo) Then Show_Warning("File could not be loaded!") End If If Not IsNothing(_DocumentInfo) Then - DocumentViewer1.LoadFile(_DocumentInfo.FullPath) - - If _DocumentInfo.AccessRight = Rights.AccessRight.VIEW_ONLY Then - DocumentViewer1.SetViewOnly(True) - RibbonPageGroup_Export.Visible = False + If _FileOpenList.ContainsValue(_DocumentInfo.FullPath) Then + Show_Warning("Die ausgewählte Datei befindet sich im Zugriff!") Else - DocumentViewer1.SetViewOnly(False) - RibbonPageGroup_Export.Visible = True + DocumentViewer1.LoadFile(_DocumentInfo.FullPath) + + If _DocumentInfo.AccessRight = Rights.AccessRight.VIEW_ONLY Then + DocumentViewer1.SetViewOnly(True) + RibbonPageGroup_Export.Visible = False + Else + DocumentViewer1.SetViewOnly(False) + RibbonPageGroup_Export.Visible = True + End If End If End If + + ' TODO: Create checksum after closing, compare and take action + If File.Exists(_DocumentInfo.FullPath) Then + _HashOriginalFile = _Filesystem.GetChecksum(_DocumentInfo.FullPath) + Else + _HashOriginalFile = Nothing + End If End If Catch ex As Exception _Logger.Error(ex) @@ -221,6 +245,10 @@ Public Class frmDocumentResultList End Try End Function + Private Sub ClearGridData() + GridControl1.DataSource = Nothing + End Sub + Private Sub LoadGridData(Result As DocumentResult) If Result.Datatable.Columns.Contains(COLUMN_DOCID) = False Then Throw New ApplicationException($"Datatable is missing DocId Column [{COLUMN_DOCID}] for search {Result.Title}!") @@ -335,10 +363,11 @@ Public Class frmDocumentResultList .Width = 20 .MaxWidth = 20 .MinWidth = 20 - .VisibleIndex = 0 End With - GridView.Bands.First().Columns.Add(oIconColumn) + Dim oFirstBand As GridBand = GridView.Bands.First() + oFirstBand.Columns.Add(oIconColumn) + oFirstBand.Columns.MoveTo(0, oIconColumn) End If Dim oCreated, oChanged As String @@ -487,7 +516,7 @@ Public Class frmDocumentResultList End Function Private Function GetDevexpressGrid_LayoutName(pGridView As GridView) Dim Filename As String = $"DevExpressGridViewDocResult_{pGridView.Name}UserLayout.xml" - Return System.IO.Path.Combine(_Config.UserConfigPath.Replace("UserConfig.xml", ""), Filename) + Return Path.Combine(_Config.UserConfigPath.Replace("UserConfig.xml", ""), Filename) End Function Private Function GetActiveGridControl() As GridControl If _ActiveGrid Is Nothing Then @@ -508,8 +537,10 @@ Public Class frmDocumentResultList End Sub Private Sub RestoreLayout(pGridView As GridView) Try - Dim oXml As String = GetDevexpressGrid_LayoutName(pGridView) - pGridView.RestoreLayoutFromXml(oXml, OptionsLayoutBase.FullLayout) + Dim oLayoutFile As String = GetDevexpressGrid_LayoutName(pGridView) + If File.Exists(oLayoutFile) Then + pGridView.RestoreLayoutFromXml(oLayoutFile, OptionsLayoutBase.FullLayout) + End If Catch ex As Exception _Logger.Error(ex) _Logger.Info("Error while restoring layout: " & ex.Message) @@ -545,7 +576,7 @@ Public Class frmDocumentResultList Dim oRow = GetActiveRow() If oRow IsNot Nothing Then - Dim oFilename = oRow.Item(COLUMN_FILEPATH) + Dim oFilename = _DocumentInfo.FullPath Dim oDirectory = IO.Path.GetDirectoryName(oFilename) Process.Start(oDirectory) End If @@ -556,23 +587,23 @@ Public Class frmDocumentResultList Private Sub OpenFile() Try - Dim oRow = GetActiveRow() - - If oRow IsNot Nothing Then - Dim oFilename = oRow.Item(COLUMN_FILEPATH) - Process.Start(oFilename) + If _DocumentInfo IsNot Nothing Then + Dim oFilename = _DocumentInfo.FullPath + DocumentPropertyMenu_FileOpened(Me, oFilename) End If Catch ex As Exception _Logger.Error(ex) End Try End Sub + + Private Sub CopyFileName() Try Dim oRow = GetActiveRow() If oRow IsNot Nothing Then - Dim oFilename = oRow.Item(COLUMN_FILEPATH) + Dim oFilename = _DocumentInfo.FullPath Clipboard.SetText(oFilename) End If Catch ex As Exception @@ -627,24 +658,22 @@ Public Class frmDocumentResultList End Sub Private Sub GridControl_DoubleClick(sender As Object, e As EventArgs) Handles GridControl1.DoubleClick, GridControl2.DoubleClick, GridControl3.DoubleClick - OpenFile() + If _DocumentInfo IsNot Nothing And _DocumentInfo.AccessRight > Rights.AccessRight.VIEW_ONLY Then + OpenFile() + End If End Sub - Private Sub GridView_PopupMenuShowing(sender As Object, e As PopupMenuShowingEventArgs) Handles GridView2.PopupMenuShowing, GridView3.PopupMenuShowing + Private Sub GridView_PopupMenuShowing(sender As Object, e As PopupMenuShowingEventArgs) _ + Handles GridView2.PopupMenuShowing, GridView3.PopupMenuShowing, GridView1.PopupMenuShowing Try Dim oView As GridView = sender If e.MenuType = GridMenuType.Row Then Dim oRowHandle = e.HitInfo.RowHandle Dim oRow As DataRow = oView.GetDataRow(oRowHandle) - Dim oFilepath As String = oRow.Item(COLUMN_FILEPATH) + Dim oFilepath As String = _DocumentInfo.FullPath Dim oObjectId As Long = oRow.Item(COLUMN_DOCID) - Dim oMenu As New DocumentPropertyMenu( - _LogConfig, - _Environment, - _IDBClient, - oFilepath, - oObjectId) + Dim oMenu As New DocumentPropertyMenu(_LogConfig, _Environment, _IDBClient, oFilepath, oObjectId) e.Menu.Items.Clear() @@ -653,7 +682,7 @@ Public Class frmDocumentResultList Next AddHandler oMenu.FileOpened, AddressOf DocumentPropertyMenu_FileOpened - AddHandler oMenu.FileClosed, AddressOf DocumentPropertyMenu_FileClosed + ' AddHandler oMenu.FileClosed, AddressOf DocumentPropertyMenu_FileClosed End If Catch ex As Exception _Logger.Error(ex) @@ -662,21 +691,55 @@ Public Class frmDocumentResultList End Sub Public Sub DocumentPropertyMenu_FileOpened(sender As Object, FilePath As String) + DocumentViewer1.CloseDocument() + Dim oProcess = Process.Start(New ProcessStartInfo With { + .FileName = FilePath + }) + _FileOpenList.Add(oProcess.Id, FilePath) End Sub - Public Sub DocumentPropertyMenu_FileClosed(sender As Object, FilePath As String) + Public Sub FileOpenTimer_Elapsed() Handles _FileOpenTimer.Tick + Try + Dim oProcesses = Process.GetProcesses() + Dim oIds = (From oProc In oProcesses + Select oProc.Id). + ToList() + Dim oNewFileOpenList As New Dictionary(Of Integer, String) + For Each oOpenFile In _FileOpenList + If oIds.Contains(oOpenFile.Key) Then + oNewFileOpenList.Add(oOpenFile.Key, oOpenFile.Value) + End If + Next + + If oNewFileOpenList.Count < _FileOpenList.Count Then + Dim oClosedFiles = _FileOpenList. + Except(oNewFileOpenList). + ToList() + + If oClosedFiles.Count = 1 Then + Dim oOpenFile = oClosedFiles.First() + DocumentViewer1.LoadFile(oOpenFile.Value) + Else + ClearGridData() + UpdateGridData() + End If + + _FileOpenList = oNewFileOpenList + End If + Catch ex As Exception + _Logger.Error(ex) + End Try End Sub - Public Sub Show_CriticalError(Message As String) labelCriticalError.Visibility = DevExpress.XtraBars.BarItemVisibility.Always labelCriticalError.Caption = Message End Sub Public Sub Show_Warning(Message As String) - labelWarning.Visibility = DevExpress.XtraBars.BarItemVisibility.Never + labelWarning.Visibility = DevExpress.XtraBars.BarItemVisibility.Always labelWarning.Caption = Message End Sub @@ -702,4 +765,39 @@ Public Class frmDocumentResultList Private Sub frmDocumentResultList_FormClosing(sender As Object, e As FormClosingEventArgs) Handles Me.FormClosing GridViewSave_Layout(_ActiveGrid.MainView) End Sub + + Private _DragBoxFromMouseDown As Rectangle + Private _ScreenOffset As Point + + Private Sub GridView1_MouseDown(sender As GridView, e As MouseEventArgs) Handles GridView1.MouseDown + If sender.FocusedRowHandle >= 0 Then + Dim oDragSize As Size = SystemInformation.DragSize + + _DragBoxFromMouseDown = New Rectangle(New Point(e.X - (oDragSize.Width / 2), + e.Y - (oDragSize.Height / 2)), oDragSize) + + Else + _DragBoxFromMouseDown = Rectangle.Empty + End If + End Sub + + Private Sub GridView1_MouseUp(sender As GridView, e As MouseEventArgs) Handles GridView1.MouseUp + _DragBoxFromMouseDown = Rectangle.Empty + End Sub + + Private Sub GridView1_MouseMove(sender As GridView, e As MouseEventArgs) Handles GridView1.MouseMove + If e.Button AndAlso e.Button = MouseButtons.Left Then + If _DragBoxFromMouseDown <> Rectangle.Empty And Not _DragBoxFromMouseDown.Contains(e.X, e.Y) Then + If _DocumentInfo IsNot Nothing AndAlso _DocumentInfo.AccessRight > Rights.AccessRight.VIEW_ONLY Then + _ScreenOffset = SystemInformation.WorkingArea.Location + + Dim oFullPath As String = _DocumentInfo.FullPath + Dim oFiles As String() = {oFullPath} + Dim oData As New DataObject(DataFormats.FileDrop, oFiles) + + sender.GridControl.DoDragDrop(oData, DragDropEffects.All) + End If + End If + End If + End Sub End Class \ No newline at end of file diff --git a/GUIs.Common/My Project/AssemblyInfo.vb b/GUIs.Common/My Project/AssemblyInfo.vb index fe2b51e3..e5b87030 100644 --- a/GUIs.Common/My Project/AssemblyInfo.vb +++ b/GUIs.Common/My Project/AssemblyInfo.vb @@ -12,7 +12,7 @@ Imports System.Runtime.InteropServices - + @@ -31,5 +31,5 @@ Imports System.Runtime.InteropServices ' übernehmen, indem Sie "*" eingeben: ' - - + + diff --git a/GUIs.Common/My Project/Resources.Designer.vb b/GUIs.Common/My Project/Resources.Designer.vb index 8cf1092f..f41318df 100644 --- a/GUIs.Common/My Project/Resources.Designer.vb +++ b/GUIs.Common/My Project/Resources.Designer.vb @@ -130,6 +130,16 @@ Namespace My.Resources End Get End Property + ''' + ''' Sucht eine lokalisierte Ressource vom Typ DevExpress.Utils.Svg.SvgImage. + ''' + Friend ReadOnly Property grid() As DevExpress.Utils.Svg.SvgImage + Get + Dim obj As Object = ResourceManager.GetObject("grid", resourceCulture) + Return CType(obj,DevExpress.Utils.Svg.SvgImage) + End Get + End Property + ''' ''' Sucht eine lokalisierte Ressource vom Typ System.Drawing.Bitmap. ''' diff --git a/GUIs.Common/My Project/Resources.resx b/GUIs.Common/My Project/Resources.resx index ef093278..cd9cb0fe 100644 --- a/GUIs.Common/My Project/Resources.resx +++ b/GUIs.Common/My Project/Resources.resx @@ -127,6 +127,9 @@ ..\Resources\tiff.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a + + ..\Resources\ZooFlow-Vergroessern.svg;DevExpress.Utils.Svg.SvgImage, DevExpress.Data.v19.2, Version=19.2.3.0, Culture=neutral, PublicKeyToken=b88d1754d700e49a + ..\Resources\pdf.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a @@ -148,28 +151,28 @@ ..\Resources\txt.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a - - ..\Resources\Article_32x32.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a + + ..\Resources\zoom_less.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a ..\Resources\png.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a + + ..\Resources\zoom_more.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a + + + ..\Resources\_blank.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a + ..\Resources\xls.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a ..\Resources\dxf.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a - - ..\Resources\_blank.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a + + ..\Resources\Article_32x32.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a - - ..\Resources\ZooFlow-Vergroessern.svg;DevExpress.Utils.Svg.SvgImage, DevExpress.Data.v19.2, Version=19.2.3.0, Culture=neutral, PublicKeyToken=b88d1754d700e49a - - - ..\Resources\zoom_less.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a - - - ..\Resources\zoom_more.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a + + ..\Resources\grid.svg;DevExpress.Utils.Svg.SvgImage, DevExpress.Data.v19.2, Version=19.2.3.0, Culture=neutral, PublicKeyToken=b88d1754d700e49a \ No newline at end of file diff --git a/GUIs.Common/Resources/grid.svg b/GUIs.Common/Resources/grid.svg new file mode 100644 index 00000000..8e9d48b0 --- /dev/null +++ b/GUIs.Common/Resources/grid.svg @@ -0,0 +1,22 @@ + + + + + + + + + + + \ No newline at end of file diff --git a/GUIs.Test.EDMIBenchmark/App.config b/GUIs.Test.EDMIBenchmark/App.config index ffaf5407..be83dbbe 100644 --- a/GUIs.Test.EDMIBenchmark/App.config +++ b/GUIs.Test.EDMIBenchmark/App.config @@ -1,6 +1,51 @@ - + - - - + + +
+ + + + + + Skin/Office 2019 Colorful + + + Fire Brick + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/GUIs.Test.EDMIBenchmark/Form1.Designer.vb b/GUIs.Test.EDMIBenchmark/Form1.Designer.vb index 9f6a0e20..a5d46b7e 100644 --- a/GUIs.Test.EDMIBenchmark/Form1.Designer.vb +++ b/GUIs.Test.EDMIBenchmark/Form1.Designer.vb @@ -24,7 +24,9 @@ Partial Class Form1 Private Sub InitializeComponent() Me.components = New System.ComponentModel.Container() Dim resources As System.ComponentModel.ComponentResourceManager = New System.ComponentModel.ComponentResourceManager(GetType(Form1)) - Dim DockingContainer2 As DevExpress.XtraBars.Docking2010.Views.Tabbed.DockingContainer = New DevExpress.XtraBars.Docking2010.Views.Tabbed.DockingContainer() + Dim DockingContainer1 As DevExpress.XtraBars.Docking2010.Views.Tabbed.DockingContainer = New DevExpress.XtraBars.Docking2010.Views.Tabbed.DockingContainer() + Me.DocumentGroup1 = New DevExpress.XtraBars.Docking2010.Views.Tabbed.DocumentGroup(Me.components) + Me.Document1 = New DevExpress.XtraBars.Docking2010.Views.Tabbed.Document(Me.components) Me.RibbonControl1 = New DevExpress.XtraBars.Ribbon.RibbonControl() Me.ButtonSelectFiles = New DevExpress.XtraBars.BarButtonItem() Me.ButtonImportFiles = New DevExpress.XtraBars.BarButtonItem() @@ -63,6 +65,7 @@ Partial Class Form1 Me.DockPanel1 = New DevExpress.XtraBars.Docking.DockPanel() Me.DockPanel1_Container = New DevExpress.XtraBars.Docking.ControlContainer() Me.listboxFiles = New DevExpress.XtraEditors.ListBoxControl() + Me.BindingSource1 = New System.Windows.Forms.BindingSource(Me.components) Me.DockPanel2 = New DevExpress.XtraBars.Docking.DockPanel() Me.DockPanel2_Container = New DevExpress.XtraBars.Docking.ControlContainer() Me.DocumentViewer1 = New DigitalData.Controls.DocumentViewer.DocumentViewer() @@ -70,12 +73,11 @@ Partial Class Form1 Me.DockPanel4_Container = New DevExpress.XtraBars.Docking.ControlContainer() Me.GridControl1 = New DevExpress.XtraGrid.GridControl() Me.GridView1 = New DevExpress.XtraGrid.Views.Grid.GridView() - Me.BindingSource1 = New System.Windows.Forms.BindingSource(Me.components) Me.Timer1 = New System.Windows.Forms.Timer(Me.components) Me.BarEditItem1 = New DevExpress.XtraBars.BarEditItem() Me.panelContainer1 = New DevExpress.XtraBars.Docking.DockPanel() - Me.Document1 = New DevExpress.XtraBars.Docking2010.Views.Tabbed.Document(Me.components) - Me.DocumentGroup1 = New DevExpress.XtraBars.Docking2010.Views.Tabbed.DocumentGroup(Me.components) + CType(Me.DocumentGroup1, System.ComponentModel.ISupportInitialize).BeginInit() + CType(Me.Document1, System.ComponentModel.ISupportInitialize).BeginInit() CType(Me.RibbonControl1, System.ComponentModel.ISupportInitialize).BeginInit() CType(Me.RepositoryItemTextEdit1, System.ComponentModel.ISupportInitialize).BeginInit() CType(Me.RepositoryItemTextEdit2, System.ComponentModel.ISupportInitialize).BeginInit() @@ -91,17 +93,29 @@ Partial Class Form1 Me.DockPanel1.SuspendLayout() Me.DockPanel1_Container.SuspendLayout() CType(Me.listboxFiles, System.ComponentModel.ISupportInitialize).BeginInit() + CType(Me.BindingSource1, System.ComponentModel.ISupportInitialize).BeginInit() Me.DockPanel2.SuspendLayout() Me.DockPanel2_Container.SuspendLayout() Me.DockPanel4.SuspendLayout() Me.DockPanel4_Container.SuspendLayout() CType(Me.GridControl1, System.ComponentModel.ISupportInitialize).BeginInit() CType(Me.GridView1, System.ComponentModel.ISupportInitialize).BeginInit() - CType(Me.BindingSource1, System.ComponentModel.ISupportInitialize).BeginInit() - CType(Me.Document1, System.ComponentModel.ISupportInitialize).BeginInit() - CType(Me.DocumentGroup1, System.ComponentModel.ISupportInitialize).BeginInit() Me.SuspendLayout() ' + 'DocumentGroup1 + ' + Me.DocumentGroup1.Items.AddRange(New DevExpress.XtraBars.Docking2010.Views.Tabbed.Document() {Me.Document1}) + ' + 'Document1 + ' + Me.Document1.Caption = "DockPanelGrid" + Me.Document1.ControlName = "DockPanel4" + Me.Document1.FloatLocation = New System.Drawing.Point(354, 490) + Me.Document1.FloatSize = New System.Drawing.Size(538, 200) + Me.Document1.Properties.AllowClose = DevExpress.Utils.DefaultBoolean.[True] + Me.Document1.Properties.AllowFloat = DevExpress.Utils.DefaultBoolean.[True] + Me.Document1.Properties.AllowFloatOnDoubleClick = DevExpress.Utils.DefaultBoolean.[True] + ' 'RibbonControl1 ' Me.RibbonControl1.ExpandCollapseItem.Id = 0 @@ -113,7 +127,7 @@ Partial Class Form1 Me.RibbonControl1.PageHeaderItemLinks.Add(Me.BarMdiChildrenListItem1) Me.RibbonControl1.Pages.AddRange(New DevExpress.XtraBars.Ribbon.RibbonPage() {Me.RibbonPage1}) Me.RibbonControl1.RepositoryItems.AddRange(New DevExpress.XtraEditors.Repository.RepositoryItem() {Me.RepositoryItemTextEdit1, Me.RepositoryItemTextEdit2, Me.RepositoryItemTextEdit3, Me.RepositoryItemTextEdit4}) - Me.RibbonControl1.Size = New System.Drawing.Size(1093, 159) + Me.RibbonControl1.Size = New System.Drawing.Size(1093, 157) Me.RibbonControl1.StatusBar = Me.RibbonStatusBar1 ' 'ButtonSelectFiles @@ -313,8 +327,8 @@ Partial Class Form1 ' Me.TabbedView1.DocumentGroups.AddRange(New DevExpress.XtraBars.Docking2010.Views.Tabbed.DocumentGroup() {Me.DocumentGroup1}) Me.TabbedView1.Documents.AddRange(New DevExpress.XtraBars.Docking2010.Views.BaseDocument() {Me.Document1}) - DockingContainer2.Element = Me.DocumentGroup1 - Me.TabbedView1.RootContainer.Nodes.AddRange(New DevExpress.XtraBars.Docking2010.Views.Tabbed.DockingContainer() {DockingContainer2}) + DockingContainer1.Element = Me.DocumentGroup1 + Me.TabbedView1.RootContainer.Nodes.AddRange(New DevExpress.XtraBars.Docking2010.Views.Tabbed.DockingContainer() {DockingContainer1}) ' 'DockManager1 ' @@ -338,22 +352,22 @@ Partial Class Form1 Me.DockPanel3.Dock = DevExpress.XtraBars.Docking.DockingStyle.Bottom Me.DockPanel3.FloatVertical = True Me.DockPanel3.ID = New System.Guid("b0b62b80-3cf3-4f78-a50d-4a79b9cabc39") - Me.DockPanel3.Location = New System.Drawing.Point(0, 0) + Me.DockPanel3.Location = New System.Drawing.Point(0, 496) Me.DockPanel3.Name = "DockPanel3" Me.DockPanel3.Options.ShowCloseButton = False Me.DockPanel3.OriginalSize = New System.Drawing.Size(200, 119) Me.DockPanel3.SavedDock = DevExpress.XtraBars.Docking.DockingStyle.Bottom Me.DockPanel3.SavedIndex = 0 - Me.DockPanel3.Size = New System.Drawing.Size(1310, 119) + Me.DockPanel3.Size = New System.Drawing.Size(1093, 119) Me.DockPanel3.Text = "Log" Me.DockPanel3.Visibility = DevExpress.XtraBars.Docking.DockVisibility.AutoHide ' 'DockPanel3_Container ' Me.DockPanel3_Container.Controls.Add(Me.listboxLog) - Me.DockPanel3_Container.Location = New System.Drawing.Point(3, 27) + Me.DockPanel3_Container.Location = New System.Drawing.Point(3, 47) Me.DockPanel3_Container.Name = "DockPanel3_Container" - Me.DockPanel3_Container.Size = New System.Drawing.Size(1304, 89) + Me.DockPanel3_Container.Size = New System.Drawing.Size(1087, 69) Me.DockPanel3_Container.TabIndex = 0 ' 'listboxLog @@ -361,7 +375,7 @@ Partial Class Form1 Me.listboxLog.Dock = System.Windows.Forms.DockStyle.Fill Me.listboxLog.Location = New System.Drawing.Point(0, 0) Me.listboxLog.Name = "listboxLog" - Me.listboxLog.Size = New System.Drawing.Size(1304, 89) + Me.listboxLog.Size = New System.Drawing.Size(1087, 69) Me.listboxLog.TabIndex = 0 ' 'DockPanel1 @@ -369,11 +383,11 @@ Partial Class Form1 Me.DockPanel1.Controls.Add(Me.DockPanel1_Container) Me.DockPanel1.Dock = DevExpress.XtraBars.Docking.DockingStyle.Left Me.DockPanel1.ID = New System.Guid("12b5eead-07cc-48c6-93a4-85cd0b4b82ce") - Me.DockPanel1.Location = New System.Drawing.Point(0, 159) + Me.DockPanel1.Location = New System.Drawing.Point(0, 157) Me.DockPanel1.Name = "DockPanel1" Me.DockPanel1.Options.ShowCloseButton = False Me.DockPanel1.OriginalSize = New System.Drawing.Size(297, 200) - Me.DockPanel1.Size = New System.Drawing.Size(297, 456) + Me.DockPanel1.Size = New System.Drawing.Size(297, 458) Me.DockPanel1.Text = "Files to Upload" ' 'DockPanel1_Container @@ -381,7 +395,7 @@ Partial Class Form1 Me.DockPanel1_Container.Controls.Add(Me.listboxFiles) Me.DockPanel1_Container.Location = New System.Drawing.Point(3, 46) Me.DockPanel1_Container.Name = "DockPanel1_Container" - Me.DockPanel1_Container.Size = New System.Drawing.Size(290, 407) + Me.DockPanel1_Container.Size = New System.Drawing.Size(290, 409) Me.DockPanel1_Container.TabIndex = 0 ' 'listboxFiles @@ -390,19 +404,22 @@ Partial Class Form1 Me.listboxFiles.Dock = System.Windows.Forms.DockStyle.Fill Me.listboxFiles.Location = New System.Drawing.Point(0, 0) Me.listboxFiles.Name = "listboxFiles" - Me.listboxFiles.Size = New System.Drawing.Size(290, 407) + Me.listboxFiles.Size = New System.Drawing.Size(290, 409) Me.listboxFiles.TabIndex = 1 ' + 'BindingSource1 + ' + ' 'DockPanel2 ' Me.DockPanel2.Controls.Add(Me.DockPanel2_Container) Me.DockPanel2.Dock = DevExpress.XtraBars.Docking.DockingStyle.Right Me.DockPanel2.ID = New System.Guid("e82850af-b594-49e9-ae83-36d4bf007da5") - Me.DockPanel2.Location = New System.Drawing.Point(893, 159) + Me.DockPanel2.Location = New System.Drawing.Point(893, 157) Me.DockPanel2.Name = "DockPanel2" Me.DockPanel2.Options.ShowCloseButton = False Me.DockPanel2.OriginalSize = New System.Drawing.Size(200, 200) - Me.DockPanel2.Size = New System.Drawing.Size(200, 456) + Me.DockPanel2.Size = New System.Drawing.Size(200, 458) Me.DockPanel2.Text = "Document Viewer" ' 'DockPanel2_Container @@ -410,15 +427,16 @@ Partial Class Form1 Me.DockPanel2_Container.Controls.Add(Me.DocumentViewer1) Me.DockPanel2_Container.Location = New System.Drawing.Point(4, 46) Me.DockPanel2_Container.Name = "DockPanel2_Container" - Me.DockPanel2_Container.Size = New System.Drawing.Size(193, 407) + Me.DockPanel2_Container.Size = New System.Drawing.Size(193, 409) Me.DockPanel2_Container.TabIndex = 0 ' 'DocumentViewer1 ' Me.DocumentViewer1.Dock = System.Windows.Forms.DockStyle.Fill + Me.DocumentViewer1.FileLoaded = False Me.DocumentViewer1.Location = New System.Drawing.Point(0, 0) Me.DocumentViewer1.Name = "DocumentViewer1" - Me.DocumentViewer1.Size = New System.Drawing.Size(193, 407) + Me.DocumentViewer1.Size = New System.Drawing.Size(193, 409) Me.DocumentViewer1.TabIndex = 0 ' 'DockPanel4 @@ -440,7 +458,7 @@ Partial Class Form1 Me.DockPanel4_Container.Controls.Add(Me.GridControl1) Me.DockPanel4_Container.Location = New System.Drawing.Point(0, 0) Me.DockPanel4_Container.Name = "DockPanel4_Container" - Me.DockPanel4_Container.Size = New System.Drawing.Size(590, 424) + Me.DockPanel4_Container.Size = New System.Drawing.Size(590, 426) Me.DockPanel4_Container.TabIndex = 0 ' 'GridControl1 @@ -451,7 +469,7 @@ Partial Class Form1 Me.GridControl1.MainView = Me.GridView1 Me.GridControl1.MenuManager = Me.RibbonControl1 Me.GridControl1.Name = "GridControl1" - Me.GridControl1.Size = New System.Drawing.Size(590, 424) + Me.GridControl1.Size = New System.Drawing.Size(590, 426) Me.GridControl1.TabIndex = 5 Me.GridControl1.ViewCollection.AddRange(New DevExpress.XtraGrid.Views.Base.BaseView() {Me.GridView1}) ' @@ -460,9 +478,6 @@ Partial Class Form1 Me.GridView1.GridControl = Me.GridControl1 Me.GridView1.Name = "GridView1" ' - 'BindingSource1 - ' - ' 'Timer1 ' Me.Timer1.Interval = 3000 @@ -487,20 +502,6 @@ Partial Class Form1 Me.panelContainer1.Size = New System.Drawing.Size(192, 145) Me.panelContainer1.Text = "panelContainer1" ' - 'Document1 - ' - Me.Document1.Caption = "DockPanelGrid" - Me.Document1.ControlName = "DockPanel4" - Me.Document1.FloatLocation = New System.Drawing.Point(354, 490) - Me.Document1.FloatSize = New System.Drawing.Size(538, 200) - Me.Document1.Properties.AllowClose = DevExpress.Utils.DefaultBoolean.[True] - Me.Document1.Properties.AllowFloat = DevExpress.Utils.DefaultBoolean.[True] - Me.Document1.Properties.AllowFloatOnDoubleClick = DevExpress.Utils.DefaultBoolean.[True] - ' - 'DocumentGroup1 - ' - Me.DocumentGroup1.Items.AddRange(New DevExpress.XtraBars.Docking2010.Views.Tabbed.Document() {Me.Document1}) - ' 'Form1 ' Me.AutoScaleDimensions = New System.Drawing.SizeF(6.0!, 13.0!) @@ -515,6 +516,8 @@ Partial Class Form1 Me.Ribbon = Me.RibbonControl1 Me.StatusBar = Me.RibbonStatusBar1 Me.Text = "Form1" + CType(Me.DocumentGroup1, System.ComponentModel.ISupportInitialize).EndInit() + CType(Me.Document1, System.ComponentModel.ISupportInitialize).EndInit() CType(Me.RibbonControl1, System.ComponentModel.ISupportInitialize).EndInit() CType(Me.RepositoryItemTextEdit1, System.ComponentModel.ISupportInitialize).EndInit() CType(Me.RepositoryItemTextEdit2, System.ComponentModel.ISupportInitialize).EndInit() @@ -530,15 +533,13 @@ Partial Class Form1 Me.DockPanel1.ResumeLayout(False) Me.DockPanel1_Container.ResumeLayout(False) CType(Me.listboxFiles, System.ComponentModel.ISupportInitialize).EndInit() + CType(Me.BindingSource1, System.ComponentModel.ISupportInitialize).EndInit() Me.DockPanel2.ResumeLayout(False) Me.DockPanel2_Container.ResumeLayout(False) Me.DockPanel4.ResumeLayout(False) Me.DockPanel4_Container.ResumeLayout(False) CType(Me.GridControl1, System.ComponentModel.ISupportInitialize).EndInit() CType(Me.GridView1, System.ComponentModel.ISupportInitialize).EndInit() - CType(Me.BindingSource1, System.ComponentModel.ISupportInitialize).EndInit() - CType(Me.Document1, System.ComponentModel.ISupportInitialize).EndInit() - CType(Me.DocumentGroup1, System.ComponentModel.ISupportInitialize).EndInit() Me.ResumeLayout(False) Me.PerformLayout() diff --git a/GUIs.Test.EDMIBenchmark/Form1.resx b/GUIs.Test.EDMIBenchmark/Form1.resx index e655131f..96070a10 100644 --- a/GUIs.Test.EDMIBenchmark/Form1.resx +++ b/GUIs.Test.EDMIBenchmark/Form1.resx @@ -335,15 +335,12 @@ 159 + + 316, 17 + 176, 18 - - 316, 17 - - - 316, 17 - 453, 17 diff --git a/GUIs.Test.TestGUI/frmLookup.Designer.vb b/GUIs.Test.TestGUI/frmLookup.Designer.vb index fe2490f7..65a79e84 100644 --- a/GUIs.Test.TestGUI/frmLookup.Designer.vb +++ b/GUIs.Test.TestGUI/frmLookup.Designer.vb @@ -28,17 +28,22 @@ Partial Class frmLookup Dim SerializableAppearanceObject3 As DevExpress.Utils.SerializableAppearanceObject = New DevExpress.Utils.SerializableAppearanceObject() Dim SerializableAppearanceObject4 As DevExpress.Utils.SerializableAppearanceObject = New DevExpress.Utils.SerializableAppearanceObject() Dim resources As System.ComponentModel.ComponentResourceManager = New System.ComponentModel.ComponentResourceManager(GetType(frmLookup)) + Dim EditorButtonImageOptions2 As DevExpress.XtraEditors.Controls.EditorButtonImageOptions = New DevExpress.XtraEditors.Controls.EditorButtonImageOptions() + Dim SerializableAppearanceObject5 As DevExpress.Utils.SerializableAppearanceObject = New DevExpress.Utils.SerializableAppearanceObject() + Dim SerializableAppearanceObject6 As DevExpress.Utils.SerializableAppearanceObject = New DevExpress.Utils.SerializableAppearanceObject() + Dim SerializableAppearanceObject7 As DevExpress.Utils.SerializableAppearanceObject = New DevExpress.Utils.SerializableAppearanceObject() + Dim SerializableAppearanceObject8 As DevExpress.Utils.SerializableAppearanceObject = New DevExpress.Utils.SerializableAppearanceObject() Me.GridControl1 = New DevExpress.XtraGrid.GridControl() Me.GridView1 = New DevExpress.XtraGrid.Views.Grid.GridView() Me.GridColumn1 = New DevExpress.XtraGrid.Columns.GridColumn() - Me.RepositoryItemLookupControl31 = New DigitalData.Controls.LookupGrid.RepositoryItemLookupControl3() - Me.RepositoryItemLookupControl31View = New DevExpress.XtraGrid.Views.Grid.GridView() + Me.RepositoryItemLookupControl34 = New DigitalData.Controls.LookupGrid.RepositoryItemLookupControl3() + Me.RepositoryItemLookupControl34View = New DevExpress.XtraGrid.Views.Grid.GridView() Me.LookupControl31 = New DigitalData.Controls.LookupGrid.LookupControl3() Me.LookupControl31View = New DevExpress.XtraGrid.Views.Grid.GridView() CType(Me.GridControl1, System.ComponentModel.ISupportInitialize).BeginInit() CType(Me.GridView1, System.ComponentModel.ISupportInitialize).BeginInit() - CType(Me.RepositoryItemLookupControl31, System.ComponentModel.ISupportInitialize).BeginInit() - CType(Me.RepositoryItemLookupControl31View, System.ComponentModel.ISupportInitialize).BeginInit() + CType(Me.RepositoryItemLookupControl34, System.ComponentModel.ISupportInitialize).BeginInit() + CType(Me.RepositoryItemLookupControl34View, System.ComponentModel.ISupportInitialize).BeginInit() CType(Me.LookupControl31.Properties, System.ComponentModel.ISupportInitialize).BeginInit() CType(Me.LookupControl31View, System.ComponentModel.ISupportInitialize).BeginInit() Me.SuspendLayout() @@ -48,8 +53,8 @@ Partial Class frmLookup Me.GridControl1.Location = New System.Drawing.Point(12, 12) Me.GridControl1.MainView = Me.GridView1 Me.GridControl1.Name = "GridControl1" - Me.GridControl1.RepositoryItems.AddRange(New DevExpress.XtraEditors.Repository.RepositoryItem() {Me.RepositoryItemLookupControl31}) - Me.GridControl1.Size = New System.Drawing.Size(400, 200) + Me.GridControl1.RepositoryItems.AddRange(New DevExpress.XtraEditors.Repository.RepositoryItem() {Me.RepositoryItemLookupControl34}) + Me.GridControl1.Size = New System.Drawing.Size(452, 375) Me.GridControl1.TabIndex = 1 Me.GridControl1.ViewCollection.AddRange(New DevExpress.XtraGrid.Views.Base.BaseView() {Me.GridView1}) ' @@ -62,45 +67,45 @@ Partial Class frmLookup 'GridColumn1 ' Me.GridColumn1.Caption = "GridColumn1" - Me.GridColumn1.ColumnEdit = Me.RepositoryItemLookupControl31 Me.GridColumn1.Name = "GridColumn1" Me.GridColumn1.Visible = True Me.GridColumn1.VisibleIndex = 0 ' - 'RepositoryItemLookupControl31 + 'RepositoryItemLookupControl34 ' - Me.RepositoryItemLookupControl31.ActionButtonIndex = 1 - Me.RepositoryItemLookupControl31.AllowAddNewValues = False - Me.RepositoryItemLookupControl31.AutoHeight = False - Me.RepositoryItemLookupControl31.Buttons.AddRange(New DevExpress.XtraEditors.Controls.EditorButton() {New DevExpress.XtraEditors.Controls.EditorButton(DevExpress.XtraEditors.Controls.ButtonPredefines.Search, "", 20, True, True, False, EditorButtonImageOptions1, New DevExpress.Utils.KeyShortcut(System.Windows.Forms.Keys.None), SerializableAppearanceObject1, SerializableAppearanceObject2, SerializableAppearanceObject3, SerializableAppearanceObject4, "", "openLookupForm", Nothing, DevExpress.Utils.ToolTipAnchor.[Default]), New DevExpress.XtraEditors.Controls.EditorButton(DevExpress.XtraEditors.Controls.ButtonPredefines.Combo)}) - Me.RepositoryItemLookupControl31.DataSource = Nothing - Me.RepositoryItemLookupControl31.MultiSelect = False - Me.RepositoryItemLookupControl31.Name = "RepositoryItemLookupControl31" - Me.RepositoryItemLookupControl31.PopupView = Me.RepositoryItemLookupControl31View - Me.RepositoryItemLookupControl31.PreventDuplicates = False - Me.RepositoryItemLookupControl31.ReadOnly = False - Me.RepositoryItemLookupControl31.SelectedValues = CType(resources.GetObject("RepositoryItemLookupControl31.SelectedValues"), System.Collections.Generic.List(Of String)) + Me.RepositoryItemLookupControl34.ActionButtonIndex = 1 + Me.RepositoryItemLookupControl34.AllowAddNewValues = False + Me.RepositoryItemLookupControl34.AutoHeight = False + Me.RepositoryItemLookupControl34.Buttons.AddRange(New DevExpress.XtraEditors.Controls.EditorButton() {New DevExpress.XtraEditors.Controls.EditorButton(DevExpress.XtraEditors.Controls.ButtonPredefines.Search, "", 20, True, True, False, EditorButtonImageOptions1, New DevExpress.Utils.KeyShortcut(System.Windows.Forms.Keys.None), SerializableAppearanceObject1, SerializableAppearanceObject2, SerializableAppearanceObject3, SerializableAppearanceObject4, "", "openLookupForm", Nothing, DevExpress.Utils.ToolTipAnchor.[Default]), New DevExpress.XtraEditors.Controls.EditorButton(DevExpress.XtraEditors.Controls.ButtonPredefines.Combo)}) + Me.RepositoryItemLookupControl34.DataSource = Nothing + Me.RepositoryItemLookupControl34.MultiSelect = False + Me.RepositoryItemLookupControl34.Name = "RepositoryItemLookupControl34" + Me.RepositoryItemLookupControl34.PopupView = Me.RepositoryItemLookupControl34View + Me.RepositoryItemLookupControl34.PreventDuplicates = False + Me.RepositoryItemLookupControl34.ReadOnly = False + Me.RepositoryItemLookupControl34.SelectedValues = CType(resources.GetObject("RepositoryItemLookupControl34.SelectedValues"), System.Collections.Generic.List(Of String)) ' - 'RepositoryItemLookupControl31View + 'RepositoryItemLookupControl34View ' - Me.RepositoryItemLookupControl31View.FocusRectStyle = DevExpress.XtraGrid.Views.Grid.DrawFocusRectStyle.RowFocus - Me.RepositoryItemLookupControl31View.Name = "RepositoryItemLookupControl31View" - Me.RepositoryItemLookupControl31View.OptionsSelection.EnableAppearanceFocusedCell = False - Me.RepositoryItemLookupControl31View.OptionsView.ShowGroupPanel = False + Me.RepositoryItemLookupControl34View.FocusRectStyle = DevExpress.XtraGrid.Views.Grid.DrawFocusRectStyle.RowFocus + Me.RepositoryItemLookupControl34View.Name = "RepositoryItemLookupControl34View" + Me.RepositoryItemLookupControl34View.OptionsSelection.EnableAppearanceFocusedCell = False + Me.RepositoryItemLookupControl34View.OptionsView.ShowGroupPanel = False ' 'LookupControl31 ' - Me.LookupControl31.Location = New System.Drawing.Point(539, 55) + Me.LookupControl31.Location = New System.Drawing.Point(562, 116) Me.LookupControl31.Name = "LookupControl31" + Me.LookupControl31.Properties.ActionButtonIndex = 1 Me.LookupControl31.Properties.AllowAddNewValues = False - Me.LookupControl31.Properties.Buttons.AddRange(New DevExpress.XtraEditors.Controls.EditorButton() {New DevExpress.XtraEditors.Controls.EditorButton(DevExpress.XtraEditors.Controls.ButtonPredefines.Combo)}) + Me.LookupControl31.Properties.Buttons.AddRange(New DevExpress.XtraEditors.Controls.EditorButton() {New DevExpress.XtraEditors.Controls.EditorButton(DevExpress.XtraEditors.Controls.ButtonPredefines.Search, "", 20, True, True, False, EditorButtonImageOptions2, New DevExpress.Utils.KeyShortcut(System.Windows.Forms.Keys.None), SerializableAppearanceObject5, SerializableAppearanceObject6, SerializableAppearanceObject7, SerializableAppearanceObject8, "", "openLookupForm", Nothing, DevExpress.Utils.ToolTipAnchor.[Default]), New DevExpress.XtraEditors.Controls.EditorButton(DevExpress.XtraEditors.Controls.ButtonPredefines.Combo)}) Me.LookupControl31.Properties.DataSource = Nothing Me.LookupControl31.Properties.MultiSelect = False Me.LookupControl31.Properties.PopupView = Me.LookupControl31View Me.LookupControl31.Properties.PreventDuplicates = False Me.LookupControl31.Properties.ReadOnly = False Me.LookupControl31.Properties.SelectedValues = CType(resources.GetObject("LookupControl31.Properties.SelectedValues"), System.Collections.Generic.List(Of String)) - Me.LookupControl31.Size = New System.Drawing.Size(100, 20) + Me.LookupControl31.Size = New System.Drawing.Size(157, 20) Me.LookupControl31.TabIndex = 2 ' 'LookupControl31View @@ -121,8 +126,8 @@ Partial Class frmLookup Me.Text = "Form1" CType(Me.GridControl1, System.ComponentModel.ISupportInitialize).EndInit() CType(Me.GridView1, System.ComponentModel.ISupportInitialize).EndInit() - CType(Me.RepositoryItemLookupControl31, System.ComponentModel.ISupportInitialize).EndInit() - CType(Me.RepositoryItemLookupControl31View, System.ComponentModel.ISupportInitialize).EndInit() + CType(Me.RepositoryItemLookupControl34, System.ComponentModel.ISupportInitialize).EndInit() + CType(Me.RepositoryItemLookupControl34View, System.ComponentModel.ISupportInitialize).EndInit() CType(Me.LookupControl31.Properties, System.ComponentModel.ISupportInitialize).EndInit() CType(Me.LookupControl31View, System.ComponentModel.ISupportInitialize).EndInit() Me.ResumeLayout(False) @@ -131,8 +136,8 @@ Partial Class frmLookup Friend WithEvents GridControl1 As DevExpress.XtraGrid.GridControl Friend WithEvents GridView1 As DevExpress.XtraGrid.Views.Grid.GridView Friend WithEvents GridColumn1 As DevExpress.XtraGrid.Columns.GridColumn - Friend WithEvents RepositoryItemLookupControl31 As DigitalData.Controls.LookupGrid.RepositoryItemLookupControl3 - Friend WithEvents RepositoryItemLookupControl31View As DevExpress.XtraGrid.Views.Grid.GridView + Friend WithEvents RepositoryItemLookupControl34 As DigitalData.Controls.LookupGrid.RepositoryItemLookupControl3 + Friend WithEvents RepositoryItemLookupControl34View As DevExpress.XtraGrid.Views.Grid.GridView Friend WithEvents LookupControl31 As DigitalData.Controls.LookupGrid.LookupControl3 Friend WithEvents LookupControl31View As DevExpress.XtraGrid.Views.Grid.GridView End Class diff --git a/GUIs.Test.TestGUI/frmLookup.resx b/GUIs.Test.TestGUI/frmLookup.resx index 4f340c6b..583b20a8 100644 --- a/GUIs.Test.TestGUI/frmLookup.resx +++ b/GUIs.Test.TestGUI/frmLookup.resx @@ -117,7 +117,7 @@ System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - + AAEAAAD/////AQAAAAAAAAAMAgAAAJoBbXNjb3JsaWIsIFZlcnNpb249NC4wLjAuMCwgQ3VsdHVyZT1u ZXV0cmFsLCBQdWJsaWNLZXlUb2tlbj1iNzdhNWM1NjE5MzRlMDg5XV0sIG1zY29ybGliLCBWZXJzaW9u diff --git a/GUIs.Test.TestGUI/frmLookup.vb b/GUIs.Test.TestGUI/frmLookup.vb index 4902254d..904bbe12 100644 --- a/GUIs.Test.TestGUI/frmLookup.vb +++ b/GUIs.Test.TestGUI/frmLookup.vb @@ -8,10 +8,22 @@ Public Class frmLookup _Datasource.Add($"item-{index}") Next + LookupControl31.Properties.DataSource = GetDatatable(10) Dim oEditor As New LookupControl3 GridControl1.DataSource = New List(Of String) From {"foo", "var"} + GridControl1.ForceInitialize() + + Dim oFirstColumn = GridView1.Columns.First() + Dim oEditor2 As New RepositoryItemLookupControl3() With { + .DataSource = GetDatatable(10), + .[ReadOnly] = False, + .MultiSelect = False + } + + GridControl1.RepositoryItems.Add(oEditor2) + GridView1.Columns(0).ColumnEdit = oEditor2 End Sub Private Function GetDatatable(Limit As Integer) As DataTable diff --git a/GUIs.Test.TestGUI/frmStart.Designer.vb b/GUIs.Test.TestGUI/frmStart.Designer.vb index b6b73b38..e029f4b5 100644 --- a/GUIs.Test.TestGUI/frmStart.Designer.vb +++ b/GUIs.Test.TestGUI/frmStart.Designer.vb @@ -41,7 +41,7 @@ Partial Class frmStart Me.Button2.Name = "Button2" Me.Button2.Size = New System.Drawing.Size(236, 55) Me.Button2.TabIndex = 0 - Me.Button2.Text = "Relations" + Me.Button2.Text = "LookupControl" Me.Button2.UseVisualStyleBackColor = True ' 'frmStart diff --git a/Modules.Database/MSSQLServer.vb b/Modules.Database/MSSQLServer.vb index deb8c1eb..93742d74 100644 --- a/Modules.Database/MSSQLServer.vb +++ b/Modules.Database/MSSQLServer.vb @@ -201,6 +201,52 @@ Public Class MSSQLServer End Try End Function + Public Function GetDatatableWithConnection2(SqlCommand As String, ConnectionString As String) As DataTable + Try + If TestCanConnect(ConnectionString) = False Then + Return Nothing + End If + + _Logger.Debug("GetDatatableWithConnection2: Running Query [{0}]", SqlCommand) + + Using oConnection = GetSQLConnection(ConnectionString) + Using oSQLCOmmand = oConnection.CreateCommand() + oSQLCOmmand.CommandText = SqlCommand + oSQLCOmmand.CommandTimeout = _Timeout + + Dim oTable As DataTable = New DataTable("DD_RESULT") + + Using oReader As SqlDataReader = oSQLCOmmand.ExecuteReader() + Dim oSchemaTable As DataTable = oReader.GetSchemaTable() + + For Each oRow As DataRow In oSchemaTable.Rows + Dim oDataColumn As New DataColumn + oDataColumn.ColumnName = oRow("ColumnName").ToString() + oDataColumn.DataType = Type.GetType(oRow("DataType").ToString()) + oTable.Columns.Add(oDataColumn) + Next + + While (oReader.Read()) + Dim oRow As DataRow = oTable.NewRow() + + For index = 0 To oTable.Columns.Count - 1 + oRow.Item(index) = oReader.Item(index) + Next + + oTable.Rows.Add(oRow) + End While + + Return oTable + End Using + End Using + End Using + Catch ex As Exception + _Logger.Warn($"GetDatatableWithConnection2 failed SQLCommand [{SqlCommand}] - ERROR: {ex.Message}") + + Return Nothing + End Try + End Function + Public Function ExecuteNonQuery(SQLCommand As String, Timeout As Integer) As Boolean Implements IDatabase.ExecuteNonQuery Try If TestCanConnect() = False Then