diff --git a/Controls.DocumentViewer/DocumentViewer.Designer.vb b/Controls.DocumentViewer/DocumentViewer.Designer.vb index 9e3aebd2..356666fb 100644 --- a/Controls.DocumentViewer/DocumentViewer.Designer.vb +++ b/Controls.DocumentViewer/DocumentViewer.Designer.vb @@ -129,7 +129,7 @@ Partial Class DocumentViewer Me.GdViewer.ScrollLargeChange = CType(50, Short) Me.GdViewer.ScrollSmallChange = CType(1, Short) Me.GdViewer.SilentMode = True - Me.GdViewer.Size = New System.Drawing.Size(1015, 557) + Me.GdViewer.Size = New System.Drawing.Size(1079, 557) Me.GdViewer.TabIndex = 0 Me.GdViewer.ViewRotation = System.Drawing.RotateFlipType.RotateNoneFlipNone Me.GdViewer.Zoom = 1.0R @@ -151,7 +151,6 @@ Partial Class DocumentViewer Me.RichEditControl1.ReadOnly = True Me.RichEditControl1.Size = New System.Drawing.Size(249, 161) Me.RichEditControl1.TabIndex = 8 - Me.RichEditControl1.Text = "RichEditControl1" Me.RichEditControl1.Visible = False ' 'BarManager1 @@ -164,7 +163,7 @@ Partial Class DocumentViewer Me.BarManager1.Form = Me Me.BarManager1.Items.AddRange(New DevExpress.XtraBars.BarItem() {Me.buttonPrint, Me.buttonFitPage, Me.buttonFitWidth, Me.buttonZoomIn, Me.buttonZoomOut, Me.buttonRotateRight, Me.buttonRotateLeft, Me.buttonFlipX, Me.buttonFlipY, Me.buttonSettings, Me.buttonPrevPage, Me.buttonNextPage, Me.buttonFirstPage, Me.buttonLastPage, Me.txtCurrentPage, Me.BarStaticItem1, Me.labelPageCount}) Me.BarManager1.MainMenu = Me.ToolbarDocumentViewer - Me.BarManager1.MaxItemId = 25 + Me.BarManager1.MaxItemId = 26 Me.BarManager1.RepositoryItems.AddRange(New DevExpress.XtraEditors.Repository.RepositoryItem() {Me.RepositoryItemTextEdit1, Me.RepositoryItemTextEdit2, Me.RepositoryItemColorEdit1, Me.RepositoryItemComboBox1}) ' 'ToolbarDocumentViewer @@ -318,7 +317,7 @@ Partial Class DocumentViewer Me.barDockControlTop.Dock = System.Windows.Forms.DockStyle.Top Me.barDockControlTop.Location = New System.Drawing.Point(0, 0) Me.barDockControlTop.Manager = Me.BarManager1 - Me.barDockControlTop.Size = New System.Drawing.Size(1015, 33) + Me.barDockControlTop.Size = New System.Drawing.Size(1079, 33) ' 'barDockControlBottom ' @@ -326,7 +325,7 @@ Partial Class DocumentViewer Me.barDockControlBottom.Dock = System.Windows.Forms.DockStyle.Bottom Me.barDockControlBottom.Location = New System.Drawing.Point(0, 590) Me.barDockControlBottom.Manager = Me.BarManager1 - Me.barDockControlBottom.Size = New System.Drawing.Size(1015, 0) + Me.barDockControlBottom.Size = New System.Drawing.Size(1079, 0) ' 'barDockControlLeft ' @@ -340,7 +339,7 @@ Partial Class DocumentViewer ' Me.barDockControlRight.CausesValidation = False Me.barDockControlRight.Dock = System.Windows.Forms.DockStyle.Right - Me.barDockControlRight.Location = New System.Drawing.Point(1015, 33) + Me.barDockControlRight.Location = New System.Drawing.Point(1079, 33) Me.barDockControlRight.Manager = Me.BarManager1 Me.barDockControlRight.Size = New System.Drawing.Size(0, 557) ' @@ -386,15 +385,15 @@ Partial Class DocumentViewer ' Me.AutoScaleDimensions = New System.Drawing.SizeF(6.0!, 13.0!) Me.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font - Me.Controls.Add(Me.SpreadsheetControl1) Me.Controls.Add(Me.RichEditControl1) + Me.Controls.Add(Me.SpreadsheetControl1) Me.Controls.Add(Me.GdViewer) Me.Controls.Add(Me.barDockControlLeft) Me.Controls.Add(Me.barDockControlRight) Me.Controls.Add(Me.barDockControlBottom) Me.Controls.Add(Me.barDockControlTop) Me.Name = "DocumentViewer" - Me.Size = New System.Drawing.Size(1015, 590) + Me.Size = New System.Drawing.Size(1079, 590) CType(Me.BarManager1, System.ComponentModel.ISupportInitialize).EndInit() CType(Me.RepositoryItemTextEdit2, System.ComponentModel.ISupportInitialize).EndInit() CType(Me.RepositoryItemTextEdit1, System.ComponentModel.ISupportInitialize).EndInit() diff --git a/Controls.DocumentViewer/DocumentViewer.resx b/Controls.DocumentViewer/DocumentViewer.resx index dc74ec2b..75a0f04e 100644 --- a/Controls.DocumentViewer/DocumentViewer.resx +++ b/Controls.DocumentViewer/DocumentViewer.resx @@ -126,7 +126,7 @@ - AAEAAAD/////AQAAAAAAAAAMAgAAAFlEZXZFeHByZXNzLkRhdGEudjE5LjIsIFZlcnNpb249MTkuMi4z + AAEAAAD/////AQAAAAAAAAAMAgAAAFlEZXZFeHByZXNzLkRhdGEudjIxLjIsIFZlcnNpb249MjEuMi40 LjAsIEN1bHR1cmU9bmV1dHJhbCwgUHVibGljS2V5VG9rZW49Yjg4ZDE3NTRkNzAwZTQ5YQUBAAAAHURl dkV4cHJlc3MuVXRpbHMuU3ZnLlN2Z0ltYWdlAQAAAAREYXRhBwICAAAACQMAAAAPAwAAAOcCAAAC77u/ PD94bWwgdmVyc2lvbj0nMS4wJyBlbmNvZGluZz0nVVRGLTgnPz4NCjxzdmcgeD0iMHB4IiB5PSIwcHgi @@ -146,7 +146,7 @@ - AAEAAAD/////AQAAAAAAAAAMAgAAAFlEZXZFeHByZXNzLkRhdGEudjE5LjIsIFZlcnNpb249MTkuMi4z + AAEAAAD/////AQAAAAAAAAAMAgAAAFlEZXZFeHByZXNzLkRhdGEudjIxLjIsIFZlcnNpb249MjEuMi40 LjAsIEN1bHR1cmU9bmV1dHJhbCwgUHVibGljS2V5VG9rZW49Yjg4ZDE3NTRkNzAwZTQ5YQUBAAAAHURl dkV4cHJlc3MuVXRpbHMuU3ZnLlN2Z0ltYWdlAQAAAAREYXRhBwICAAAACQMAAAAPAwAAANcCAAAC77u/ PD94bWwgdmVyc2lvbj0nMS4wJyBlbmNvZGluZz0nVVRGLTgnPz4NCjxzdmcgdmlld0JveD0iMCAwIDIw @@ -166,7 +166,7 @@ - AAEAAAD/////AQAAAAAAAAAMAgAAAFlEZXZFeHByZXNzLkRhdGEudjE5LjIsIFZlcnNpb249MTkuMi4z + AAEAAAD/////AQAAAAAAAAAMAgAAAFlEZXZFeHByZXNzLkRhdGEudjIxLjIsIFZlcnNpb249MjEuMi40 LjAsIEN1bHR1cmU9bmV1dHJhbCwgUHVibGljS2V5VG9rZW49Yjg4ZDE3NTRkNzAwZTQ5YQUBAAAAHURl dkV4cHJlc3MuVXRpbHMuU3ZnLlN2Z0ltYWdlAQAAAAREYXRhBwICAAAACQMAAAAPAwAAAJcCAAAC77u/ PD94bWwgdmVyc2lvbj0nMS4wJyBlbmNvZGluZz0nVVRGLTgnPz4NCjxzdmcgdmlld0JveD0iMCAwIDIw @@ -185,7 +185,7 @@ - AAEAAAD/////AQAAAAAAAAAMAgAAAFlEZXZFeHByZXNzLkRhdGEudjE5LjIsIFZlcnNpb249MTkuMi4z + AAEAAAD/////AQAAAAAAAAAMAgAAAFlEZXZFeHByZXNzLkRhdGEudjIxLjIsIFZlcnNpb249MjEuMi40 LjAsIEN1bHR1cmU9bmV1dHJhbCwgUHVibGljS2V5VG9rZW49Yjg4ZDE3NTRkNzAwZTQ5YQUBAAAAHURl dkV4cHJlc3MuVXRpbHMuU3ZnLlN2Z0ltYWdlAQAAAAREYXRhBwICAAAACQMAAAAPAwAAAPMCAAAC77u/ PD94bWwgdmVyc2lvbj0nMS4wJyBlbmNvZGluZz0nVVRGLTgnPz4NCjxzdmcgeD0iMHB4IiB5PSIwcHgi @@ -205,7 +205,7 @@ - AAEAAAD/////AQAAAAAAAAAMAgAAAFlEZXZFeHByZXNzLkRhdGEudjE5LjIsIFZlcnNpb249MTkuMi4z + AAEAAAD/////AQAAAAAAAAAMAgAAAFlEZXZFeHByZXNzLkRhdGEudjIxLjIsIFZlcnNpb249MjEuMi40 LjAsIEN1bHR1cmU9bmV1dHJhbCwgUHVibGljS2V5VG9rZW49Yjg4ZDE3NTRkNzAwZTQ5YQUBAAAAHURl dkV4cHJlc3MuVXRpbHMuU3ZnLlN2Z0ltYWdlAQAAAAREYXRhBwICAAAACQMAAAAPAwAAAM8CAAAC77u/ PD94bWwgdmVyc2lvbj0nMS4wJyBlbmNvZGluZz0nVVRGLTgnPz4NCjxzdmcgeD0iMHB4IiB5PSIwcHgi @@ -224,7 +224,7 @@ - AAEAAAD/////AQAAAAAAAAAMAgAAAFlEZXZFeHByZXNzLkRhdGEudjE5LjIsIFZlcnNpb249MTkuMi4z + AAEAAAD/////AQAAAAAAAAAMAgAAAFlEZXZFeHByZXNzLkRhdGEudjIxLjIsIFZlcnNpb249MjEuMi40 LjAsIEN1bHR1cmU9bmV1dHJhbCwgUHVibGljS2V5VG9rZW49Yjg4ZDE3NTRkNzAwZTQ5YQUBAAAAHURl dkV4cHJlc3MuVXRpbHMuU3ZnLlN2Z0ltYWdlAQAAAAREYXRhBwICAAAACQMAAAAPAwAAAHIBAAAC77u/ PD94bWwgdmVyc2lvbj0nMS4wJyBlbmNvZGluZz0nVVRGLTgnPz4NCjxzdmcgdmlld0JveD0iMCAwIDIw @@ -238,7 +238,7 @@ - AAEAAAD/////AQAAAAAAAAAMAgAAAFlEZXZFeHByZXNzLkRhdGEudjE5LjIsIFZlcnNpb249MTkuMi4z + AAEAAAD/////AQAAAAAAAAAMAgAAAFlEZXZFeHByZXNzLkRhdGEudjIxLjIsIFZlcnNpb249MjEuMi40 LjAsIEN1bHR1cmU9bmV1dHJhbCwgUHVibGljS2V5VG9rZW49Yjg4ZDE3NTRkNzAwZTQ5YQUBAAAAHURl dkV4cHJlc3MuVXRpbHMuU3ZnLlN2Z0ltYWdlAQAAAAREYXRhBwICAAAACQMAAAAPAwAAAHMBAAAC77u/ PD94bWwgdmVyc2lvbj0nMS4wJyBlbmNvZGluZz0nVVRGLTgnPz4NCjxzdmcgdmlld0JveD0iMCAwIDIw @@ -252,7 +252,7 @@ - AAEAAAD/////AQAAAAAAAAAMAgAAAFlEZXZFeHByZXNzLkRhdGEudjE5LjIsIFZlcnNpb249MTkuMi4z + AAEAAAD/////AQAAAAAAAAAMAgAAAFlEZXZFeHByZXNzLkRhdGEudjIxLjIsIFZlcnNpb249MjEuMi40 LjAsIEN1bHR1cmU9bmV1dHJhbCwgUHVibGljS2V5VG9rZW49Yjg4ZDE3NTRkNzAwZTQ5YQUBAAAAHURl dkV4cHJlc3MuVXRpbHMuU3ZnLlN2Z0ltYWdlAQAAAAREYXRhBwICAAAACQMAAAAPAwAAAIIBAAAC77u/ PD94bWwgdmVyc2lvbj0nMS4wJyBlbmNvZGluZz0nVVRGLTgnPz4NCjxzdmcgdmlld0JveD0iMCAwIDIw @@ -266,7 +266,7 @@ - AAEAAAD/////AQAAAAAAAAAMAgAAAFlEZXZFeHByZXNzLkRhdGEudjE5LjIsIFZlcnNpb249MTkuMi4z + AAEAAAD/////AQAAAAAAAAAMAgAAAFlEZXZFeHByZXNzLkRhdGEudjIxLjIsIFZlcnNpb249MjEuMi40 LjAsIEN1bHR1cmU9bmV1dHJhbCwgUHVibGljS2V5VG9rZW49Yjg4ZDE3NTRkNzAwZTQ5YQUBAAAAHURl dkV4cHJlc3MuVXRpbHMuU3ZnLlN2Z0ltYWdlAQAAAAREYXRhBwICAAAACQMAAAAPAwAAAIABAAAC77u/ PD94bWwgdmVyc2lvbj0nMS4wJyBlbmNvZGluZz0nVVRGLTgnPz4NCjxzdmcgdmlld0JveD0iMCAwIDIw @@ -280,7 +280,7 @@ - AAEAAAD/////AQAAAAAAAAAMAgAAAFlEZXZFeHByZXNzLkRhdGEudjE5LjIsIFZlcnNpb249MTkuMi4z + AAEAAAD/////AQAAAAAAAAAMAgAAAFlEZXZFeHByZXNzLkRhdGEudjIxLjIsIFZlcnNpb249MjEuMi40 LjAsIEN1bHR1cmU9bmV1dHJhbCwgUHVibGljS2V5VG9rZW49Yjg4ZDE3NTRkNzAwZTQ5YQUBAAAAHURl dkV4cHJlc3MuVXRpbHMuU3ZnLlN2Z0ltYWdlAQAAAAREYXRhBwICAAAACQMAAAAPAwAAANUBAAAC77u/ PD94bWwgdmVyc2lvbj0nMS4wJyBlbmNvZGluZz0nVVRGLTgnPz4NCjxzdmcgdmlld0JveD0iMCAwIDIw @@ -295,7 +295,7 @@ - AAEAAAD/////AQAAAAAAAAAMAgAAAFlEZXZFeHByZXNzLkRhdGEudjE5LjIsIFZlcnNpb249MTkuMi4z + AAEAAAD/////AQAAAAAAAAAMAgAAAFlEZXZFeHByZXNzLkRhdGEudjIxLjIsIFZlcnNpb249MjEuMi40 LjAsIEN1bHR1cmU9bmV1dHJhbCwgUHVibGljS2V5VG9rZW49Yjg4ZDE3NTRkNzAwZTQ5YQUBAAAAHURl dkV4cHJlc3MuVXRpbHMuU3ZnLlN2Z0ltYWdlAQAAAAREYXRhBwICAAAACQMAAAAPAwAAAP8AAAAC77u/ PD94bWwgdmVyc2lvbj0nMS4wJyBlbmNvZGluZz0nVVRGLTgnPz4NCjxzdmcgdmlld0JveD0iMCAwIDIw @@ -307,7 +307,7 @@ - AAEAAAD/////AQAAAAAAAAAMAgAAAFlEZXZFeHByZXNzLkRhdGEudjE5LjIsIFZlcnNpb249MTkuMi4z + AAEAAAD/////AQAAAAAAAAAMAgAAAFlEZXZFeHByZXNzLkRhdGEudjIxLjIsIFZlcnNpb249MjEuMi40 LjAsIEN1bHR1cmU9bmV1dHJhbCwgUHVibGljS2V5VG9rZW49Yjg4ZDE3NTRkNzAwZTQ5YQUBAAAAHURl dkV4cHJlc3MuVXRpbHMuU3ZnLlN2Z0ltYWdlAQAAAAREYXRhBwICAAAACQMAAAAPAwAAAP0AAAAC77u/ PD94bWwgdmVyc2lvbj0nMS4wJyBlbmNvZGluZz0nVVRGLTgnPz4NCjxzdmcgdmlld0JveD0iMCAwIDIw @@ -319,7 +319,7 @@ - AAEAAAD/////AQAAAAAAAAAMAgAAAFlEZXZFeHByZXNzLkRhdGEudjE5LjIsIFZlcnNpb249MTkuMi4z + AAEAAAD/////AQAAAAAAAAAMAgAAAFlEZXZFeHByZXNzLkRhdGEudjIxLjIsIFZlcnNpb249MjEuMi40 LjAsIEN1bHR1cmU9bmV1dHJhbCwgUHVibGljS2V5VG9rZW49Yjg4ZDE3NTRkNzAwZTQ5YQUBAAAAHURl dkV4cHJlc3MuVXRpbHMuU3ZnLlN2Z0ltYWdlAQAAAAREYXRhBwICAAAACQMAAAAPAwAAAM4BAAAC77u/ PD94bWwgdmVyc2lvbj0nMS4wJyBlbmNvZGluZz0nVVRGLTgnPz4NCjxzdmcgdmlld0JveD0iMCAwIDIw @@ -334,7 +334,7 @@ - AAEAAAD/////AQAAAAAAAAAMAgAAAFlEZXZFeHByZXNzLkRhdGEudjE5LjIsIFZlcnNpb249MTkuMi4z + AAEAAAD/////AQAAAAAAAAAMAgAAAFlEZXZFeHByZXNzLkRhdGEudjIxLjIsIFZlcnNpb249MjEuMi40 LjAsIEN1bHR1cmU9bmV1dHJhbCwgUHVibGljS2V5VG9rZW49Yjg4ZDE3NTRkNzAwZTQ5YQUBAAAAHURl dkV4cHJlc3MuVXRpbHMuU3ZnLlN2Z0ltYWdlAQAAAAREYXRhBwICAAAACQMAAAAPAwAAAGQEAAAC77u/ PD94bWwgdmVyc2lvbj0nMS4wJyBlbmNvZGluZz0nVVRGLTgnPz4NCjxzdmcgdmlld0JveD0iMCAwIDIw diff --git a/Controls.DocumentViewer/DocumentViewer.vb b/Controls.DocumentViewer/DocumentViewer.vb index 9a9350ff..a8bb89b6 100644 --- a/Controls.DocumentViewer/DocumentViewer.vb +++ b/Controls.DocumentViewer/DocumentViewer.vb @@ -1,11 +1,7 @@ Imports System.IO -Imports System.ComponentModel -Imports System.Globalization -Imports System.Text.RegularExpressions Imports DevExpress Imports DevExpress.Spreadsheet Imports DevExpress.XtraRichEdit.Commands -Imports DevExpress.XtraRichEdit Imports DevExpress.Office.Utils Imports GdPicture14 Imports DigitalData.Modules.Logging @@ -30,6 +26,11 @@ Public Class DocumentViewer Excel End Enum + Private Enum FileLoadMode + File + Stream + End Enum + Private _ViewerMode As ViewerMode Private _currentSearchOccurence As Integer = 0 Private _toggleGamma As Boolean = True @@ -40,10 +41,14 @@ Public Class DocumentViewer Private _email As Email2 Private _Config As ConfigManager(Of Config) Private _Annotations As Annotations + Private _AnnotationsPending As Boolean = False Private _hide_file_info_from_user As Boolean = False + + Private _FileStream As Stream Private _FilePath As String Private _Fileinfo As FileInfo + Private _FileLoadMode As FileLoadMode = FileLoadMode.File ' List of all created temp files when converting msg files Private _TempFiles As New List(Of String) @@ -54,6 +59,11 @@ Public Class DocumentViewer Public Property FileLoaded As Boolean = False + Public ReadOnly Property AnnotationsSaved As Boolean + Get + Return Not _AnnotationsPending + End Get + End Property ''' ''' Initialize the Viewer @@ -72,7 +82,55 @@ Public Class DocumentViewer _Config = New ConfigManager(Of Config)(pLogConfig, oConfigPath) End Sub + ''' + ''' Load a file from a path and display it + ''' + Public Sub LoadFile(FilePath As String) + FileLoaded = False + If _licenseKey = String.Empty Then + _logger.Warn("License key was not provided. File {0} not loaded.", FilePath) + Exit Sub + End If + + If FilePath Is Nothing OrElse FilePath.Trim().Length = 0 Then + _logger.Warn("FilePath was not provided. File not loaded.") + Exit Sub + End If + + _FilePath = FilePath + _FileLoadMode = FileLoadMode.File + _Fileinfo = New FileInfo(FilePath) + + _logger.Info("Loading File [{0}] from Filesystem", FilePath) + FileLoaded = DoLoadFile(FilePath) + + SetViewerMode(_Fileinfo.Extension) + UpdateMainUi() + End Sub + + ''' + ''' Load a file from a stream and display it + ''' + Public Sub LoadFile(FileName As String, Stream As Stream) + FileLoaded = False + + If _licenseKey = String.Empty Then + _logger.Warn("License key was not provided. File [{0}] not loaded.", FileName) + Exit Sub + End If + + Dim oExtension As String = FileName.Substring(FileName.LastIndexOf(".")) + + _FileStream = Stream + _FileLoadMode = FileLoadMode.Stream + + _logger.Info("Loading file [{0}] from Stream", FileName) + FileLoaded = DoLoadFile(Stream, oExtension) + + SetViewerMode(oExtension) + UpdateMainUi() + End Sub ''' ''' Terminate Viewer, freeing up resources and deleting temp files @@ -93,63 +151,42 @@ Public Class DocumentViewer End Try End Sub - ''' - ''' Load a file and display it - ''' - ''' - Public Sub LoadFile(FilePath As String) - FileLoaded = False - - If _licenseKey = String.Empty Then - _logger.Warn("License key was not provided. File {0} not loaded.", FilePath) - Exit Sub - End If - - If FilePath Is Nothing OrElse FilePath.Trim().Length = 0 Then - _logger.Warn("FilePath was not provided. File not loaded.") - Exit Sub - End If - - _logger.Info("Loading File {0}", FilePath) - - FileLoaded = DoLoadFile(FilePath) - _FilePath = FilePath - _Fileinfo = New FileInfo(FilePath) - - SetViewerMode(_Fileinfo.Extension) - UpdateMainUi() - End Sub - - Public Sub LoadFile(FileName As String, Stream As Stream) - FileLoaded = False - - If _licenseKey = String.Empty Then - _logger.Warn("License key was not provided. File [{0}] not loaded.", FileName) - Exit Sub - End If - - Dim oExtension As String = FileName.Substring(FileName.LastIndexOf(".")) - - _logger.Info("Loading File [{0}]", FileName) - - FileLoaded = DoLoadFile(Stream, oExtension) - - SetViewerMode(oExtension) - UpdateMainUi() - End Sub - Public Function AddAnnotation(pText As String) As Boolean - Dim oFontStyle = System.Drawing.FontStyle.Bold Or System.Drawing.FontStyle.Underline - GdViewer.AddTextAnnotationInteractive(pText, Color.Black, "Arial", oFontStyle, 12, True, Color.Red, Color.White, 1, 0) + Dim oFontStyle = FontStyle.Regular + Dim oFontColor = Color.Black + Dim oFontFamily = "Arial" + Dim oFontSize = 8 + Dim oBorderColor = Color.Red + Dim oBackColor = Color.LightYellow + Dim oOpacity = 1.0F + Dim oRotation = 0.0F + + GdViewer.AddTextAnnotationInteractive(pText, oFontColor, oFontFamily, oFontStyle, oFontSize, Fill:=True, oBorderColor, oBackColor, oOpacity, oRotation) + _AnnotationsPending = True Return True End Function - Public Sub Save() - If GdViewer.SaveDocumentToPDF(_FilePath) = GdPictureStatus.OK Then - _logger.Debug("PDF Successfully saved") + + + Public Function Save() As Boolean + Dim oSaveResult As GdPictureStatus = GdPictureStatus.OK + + If GdViewer.BurnAnnotationsToPage(True, False) = GdPictureStatus.OK Then + If _FileLoadMode = FileLoadMode.Stream Then + oSaveResult = GdViewer.SaveDocumentToPDF(_FileStream) + Else + oSaveResult = GdViewer.SaveDocumentToPDF(_FilePath) + End If End If - End Sub + + If oSaveResult = GdPictureStatus.OK Then + _AnnotationsPending = False + Return True + Else + Return False + End If + End Function Public Sub CloseDocument() Try @@ -455,12 +492,13 @@ Public Class DocumentViewer SpreadsheetControl1.Dock = DockStyle.Fill Case Else - 'ToolbarDocumentViewer.Visible = True - GdViewer.ZoomMode = ViewerZoomMode.ZoomModeWidthViewer GdViewer.DocumentAlignment = ViewerDocumentAlignment.DocumentAlignmentTopCenter + GdViewer.ForceTemporaryMode = True + GdViewer.AnnotationDropShadow = True GdViewer.DisplayFromFile(FilePath) + End Select UpdateMainUi() @@ -528,13 +566,13 @@ Public Class DocumentViewer SpreadsheetControl1.Dock = DockStyle.Fill Case Else - 'ToolbarDocumentViewer.Visible = True - GdViewer.ZoomMode = ViewerZoomMode.ZoomModeWidthViewer GdViewer.DocumentAlignment = ViewerDocumentAlignment.DocumentAlignmentTopCenter GdViewer.ForceTemporaryMode = True + GdViewer.AnnotationDropShadow = True GdViewer.DisplayFromStream(Stream) + End Select UpdateMainUi() diff --git a/Controls.DocumentViewer/My Project/AssemblyInfo.vb b/Controls.DocumentViewer/My Project/AssemblyInfo.vb index 2b33b547..af56e964 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/GUIs.Common/My Project/AssemblyInfo.vb b/GUIs.Common/My Project/AssemblyInfo.vb index bbb7697f..a42d5f4f 100644 --- a/GUIs.Common/My Project/AssemblyInfo.vb +++ b/GUIs.Common/My Project/AssemblyInfo.vb @@ -31,5 +31,5 @@ Imports System.Runtime.InteropServices ' übernehmen, indem Sie "*" eingeben: ' - - + + diff --git a/GUIs.Common/frmDialog.Designer.vb b/GUIs.Common/frmDialog.Designer.vb index 68f05cd8..96a2263f 100644 --- a/GUIs.Common/frmDialog.Designer.vb +++ b/GUIs.Common/frmDialog.Designer.vb @@ -26,17 +26,15 @@ Partial Class frmDialog Me.btnPositive = New DevExpress.XtraEditors.SimpleButton() Me.btnNegative = New DevExpress.XtraEditors.SimpleButton() Me.pnlContent = New DevExpress.XtraEditors.PanelControl() + Me.txtContent2 = New DevExpress.XtraEditors.LabelControl() Me.SvgImageBox1 = New DevExpress.XtraEditors.SvgImageBox() - Me.PanelControl1 = New DevExpress.XtraEditors.PanelControl() Me.pnlHeader = New DevExpress.XtraEditors.PanelControl() Me.txtTitle = New DevExpress.XtraEditors.LabelControl() Me.pnlFooter = New DevExpress.XtraEditors.PanelControl() Me.SvgImageCollection1 = New DevExpress.Utils.SvgImageCollection(Me.components) - Me.txtContent2 = New DevExpress.XtraEditors.LabelControl() CType(Me.pnlContent, System.ComponentModel.ISupportInitialize).BeginInit() Me.pnlContent.SuspendLayout() CType(Me.SvgImageBox1, System.ComponentModel.ISupportInitialize).BeginInit() - CType(Me.PanelControl1, System.ComponentModel.ISupportInitialize).BeginInit() CType(Me.pnlHeader, System.ComponentModel.ISupportInitialize).BeginInit() Me.pnlHeader.SuspendLayout() CType(Me.pnlFooter, System.ComponentModel.ISupportInitialize).BeginInit() @@ -50,7 +48,7 @@ Partial Class frmDialog Me.btnPositive.DialogResult = System.Windows.Forms.DialogResult.OK Me.btnPositive.ImageOptions.SvgImage = Global.DigitalData.GUIs.Common.My.Resources.Resources.actions_checkcircled Me.btnPositive.ImageOptions.SvgImageSize = New System.Drawing.Size(16, 16) - Me.btnPositive.Location = New System.Drawing.Point(386, 5) + Me.btnPositive.Location = New System.Drawing.Point(386, 6) Me.btnPositive.Name = "btnPositive" Me.btnPositive.Size = New System.Drawing.Size(100, 23) Me.btnPositive.TabIndex = 0 @@ -62,7 +60,7 @@ Partial Class frmDialog Me.btnNegative.DialogResult = System.Windows.Forms.DialogResult.Cancel Me.btnNegative.ImageOptions.SvgImage = Global.DigitalData.GUIs.Common.My.Resources.Resources.cancel Me.btnNegative.ImageOptions.SvgImageSize = New System.Drawing.Size(16, 16) - Me.btnNegative.Location = New System.Drawing.Point(280, 5) + Me.btnNegative.Location = New System.Drawing.Point(280, 6) Me.btnNegative.Name = "btnNegative" Me.btnNegative.Size = New System.Drawing.Size(100, 23) Me.btnNegative.TabIndex = 1 @@ -72,17 +70,30 @@ Partial Class frmDialog ' Me.pnlContent.Controls.Add(Me.txtContent2) Me.pnlContent.Controls.Add(Me.SvgImageBox1) - Me.pnlContent.Controls.Add(Me.PanelControl1) Me.pnlContent.Dock = System.Windows.Forms.DockStyle.Fill Me.pnlContent.Location = New System.Drawing.Point(0, 40) Me.pnlContent.Name = "pnlContent" - Me.pnlContent.Size = New System.Drawing.Size(498, 145) + Me.pnlContent.Size = New System.Drawing.Size(498, 131) Me.pnlContent.TabIndex = 3 ' + 'txtContent2 + ' + Me.txtContent2.Appearance.Font = New System.Drawing.Font("Segoe UI", 9.0!, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, CType(0, Byte)) + Me.txtContent2.Appearance.Options.UseFont = True + Me.txtContent2.Appearance.Options.UseTextOptions = True + Me.txtContent2.Appearance.TextOptions.VAlignment = DevExpress.Utils.VertAlignment.Top + Me.txtContent2.Appearance.TextOptions.WordWrap = DevExpress.Utils.WordWrap.Wrap + Me.txtContent2.AutoSizeMode = DevExpress.XtraEditors.LabelAutoSizeMode.None + Me.txtContent2.Location = New System.Drawing.Point(71, 6) + Me.txtContent2.Name = "txtContent2" + Me.txtContent2.Size = New System.Drawing.Size(415, 119) + Me.txtContent2.TabIndex = 3 + Me.txtContent2.Text = "LabelControl1" + ' 'SvgImageBox1 ' Me.SvgImageBox1.BackColor = System.Drawing.Color.Transparent - Me.SvgImageBox1.Location = New System.Drawing.Point(22, 16) + Me.SvgImageBox1.Location = New System.Drawing.Point(5, 6) Me.SvgImageBox1.Name = "SvgImageBox1" Me.SvgImageBox1.Size = New System.Drawing.Size(60, 60) Me.SvgImageBox1.SizeMode = DevExpress.XtraEditors.SvgImageSizeMode.Zoom @@ -90,16 +101,6 @@ Partial Class frmDialog Me.SvgImageBox1.TabStop = False Me.SvgImageBox1.Text = "SvgImageBox1" ' - 'PanelControl1 - ' - Me.PanelControl1.Appearance.BackColor = System.Drawing.Color.FromArgb(CType(CType(240, Byte), Integer), CType(CType(240, Byte), Integer), CType(CType(240, Byte), Integer)) - Me.PanelControl1.Appearance.Options.UseBackColor = True - Me.PanelControl1.BorderStyle = DevExpress.XtraEditors.Controls.BorderStyles.NoBorder - Me.PanelControl1.Location = New System.Drawing.Point(12, 6) - Me.PanelControl1.Name = "PanelControl1" - Me.PanelControl1.Size = New System.Drawing.Size(80, 80) - Me.PanelControl1.TabIndex = 2 - ' 'pnlHeader ' Me.pnlHeader.Appearance.BackColor = System.Drawing.Color.FromArgb(CType(CType(165, Byte), Integer), CType(CType(36, Byte), Integer), CType(CType(19, Byte), Integer)) @@ -132,9 +133,9 @@ Partial Class frmDialog Me.pnlFooter.Controls.Add(Me.btnPositive) Me.pnlFooter.Controls.Add(Me.btnNegative) Me.pnlFooter.Dock = System.Windows.Forms.DockStyle.Bottom - Me.pnlFooter.Location = New System.Drawing.Point(0, 185) + Me.pnlFooter.Location = New System.Drawing.Point(0, 171) Me.pnlFooter.Name = "pnlFooter" - Me.pnlFooter.Size = New System.Drawing.Size(498, 40) + Me.pnlFooter.Size = New System.Drawing.Size(498, 39) Me.pnlFooter.TabIndex = 5 ' 'SvgImageCollection1 @@ -145,25 +146,11 @@ Partial Class frmDialog Me.SvgImageCollection1.Add("info", "image://svgimages/outlook inspired/about.svg") Me.SvgImageCollection1.Add("question", "image://svgimages/icon builder/actions_question.svg") ' - 'txtContent2 - ' - Me.txtContent2.Appearance.Font = New System.Drawing.Font("Segoe UI", 9.75!, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, CType(0, Byte)) - Me.txtContent2.Appearance.Options.UseFont = True - Me.txtContent2.Appearance.Options.UseTextOptions = True - Me.txtContent2.Appearance.TextOptions.VAlignment = DevExpress.Utils.VertAlignment.Top - Me.txtContent2.Appearance.TextOptions.WordWrap = DevExpress.Utils.WordWrap.Wrap - Me.txtContent2.AutoSizeMode = DevExpress.XtraEditors.LabelAutoSizeMode.None - Me.txtContent2.Location = New System.Drawing.Point(98, 16) - Me.txtContent2.Name = "txtContent2" - Me.txtContent2.Size = New System.Drawing.Size(388, 124) - Me.txtContent2.TabIndex = 3 - Me.txtContent2.Text = "LabelControl1" - ' 'frmDialog ' Me.AutoScaleDimensions = New System.Drawing.SizeF(6.0!, 13.0!) Me.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font - Me.ClientSize = New System.Drawing.Size(498, 225) + Me.ClientSize = New System.Drawing.Size(498, 210) Me.Controls.Add(Me.pnlContent) Me.Controls.Add(Me.pnlFooter) Me.Controls.Add(Me.pnlHeader) @@ -177,7 +164,6 @@ Partial Class frmDialog CType(Me.pnlContent, System.ComponentModel.ISupportInitialize).EndInit() Me.pnlContent.ResumeLayout(False) CType(Me.SvgImageBox1, System.ComponentModel.ISupportInitialize).EndInit() - CType(Me.PanelControl1, System.ComponentModel.ISupportInitialize).EndInit() CType(Me.pnlHeader, System.ComponentModel.ISupportInitialize).EndInit() Me.pnlHeader.ResumeLayout(False) Me.pnlHeader.PerformLayout() @@ -195,6 +181,5 @@ Partial Class frmDialog Friend WithEvents SvgImageBox1 As DevExpress.XtraEditors.SvgImageBox Friend WithEvents SvgImageCollection1 As DevExpress.Utils.SvgImageCollection Friend WithEvents txtTitle As DevExpress.XtraEditors.LabelControl - Friend WithEvents PanelControl1 As DevExpress.XtraEditors.PanelControl Friend WithEvents txtContent2 As DevExpress.XtraEditors.LabelControl End Class diff --git a/GUIs.Test.TestGUI/frmMsgBox.Designer.vb b/GUIs.Test.TestGUI/frmMsgBox.Designer.vb index 1c128ada..be13370d 100644 --- a/GUIs.Test.TestGUI/frmMsgBox.Designer.vb +++ b/GUIs.Test.TestGUI/frmMsgBox.Designer.vb @@ -24,6 +24,7 @@ Partial Class frmMsgBox Private Sub InitializeComponent() Me.SimpleButton1 = New DevExpress.XtraEditors.SimpleButton() Me.SimpleButton2 = New DevExpress.XtraEditors.SimpleButton() + Me.SimpleButton3 = New DevExpress.XtraEditors.SimpleButton() Me.SuspendLayout() ' 'SimpleButton1 @@ -42,11 +43,20 @@ Partial Class frmMsgBox Me.SimpleButton2.TabIndex = 0 Me.SimpleButton2.Text = "SimpleButton1" ' + 'SimpleButton3 + ' + Me.SimpleButton3.Location = New System.Drawing.Point(350, 12) + Me.SimpleButton3.Name = "SimpleButton3" + Me.SimpleButton3.Size = New System.Drawing.Size(163, 23) + Me.SimpleButton3.TabIndex = 0 + Me.SimpleButton3.Text = "SimpleButton1" + ' 'frmMsgBox ' 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.SimpleButton3) Me.Controls.Add(Me.SimpleButton2) Me.Controls.Add(Me.SimpleButton1) Me.Name = "frmMsgBox" @@ -57,4 +67,5 @@ Partial Class frmMsgBox Friend WithEvents SimpleButton1 As DevExpress.XtraEditors.SimpleButton Friend WithEvents SimpleButton2 As DevExpress.XtraEditors.SimpleButton + Friend WithEvents SimpleButton3 As DevExpress.XtraEditors.SimpleButton End Class diff --git a/GUIs.Test.TestGUI/frmMsgBox.vb b/GUIs.Test.TestGUI/frmMsgBox.vb index 072d83e8..d7fac5f1 100644 --- a/GUIs.Test.TestGUI/frmMsgBox.vb +++ b/GUIs.Test.TestGUI/frmMsgBox.vb @@ -27,4 +27,9 @@ Public Class frmMsgBox Private Sub frmMsgBox_Load(sender As Object, e As EventArgs) Handles MyBase.Load End Sub + + Private Sub SimpleButton3_Click(sender As Object, e As EventArgs) Handles SimpleButton3.Click + Dim CURRENT_NEWFILENAME = "\\Windream\Objects\DigitalData-IDB\2022\02\01\TestDoctype1\more\even-more\big\empty\folders\haha\Brainpool_Logo-22_02_01.pdf" + FormHelper.ShowQuestionMessage($"File sucessfully processed!{vbNewLine}Path:{vbNewLine}{vbNewLine}{vbNewLine}{vbNewLine}{CURRENT_NEWFILENAME}", CURRENT_NEWFILENAME.Count) + End Sub End Class \ No newline at end of file diff --git a/GUIs.ZooFlow/Modules/Globix/frmFileflow_Duplicate.vb b/GUIs.ZooFlow/Modules/Globix/frmFileflow_Duplicate.vb index 71bcec74..650f83b1 100644 --- a/GUIs.ZooFlow/Modules/Globix/frmFileflow_Duplicate.vb +++ b/GUIs.ZooFlow/Modules/Globix/frmFileflow_Duplicate.vb @@ -2,7 +2,7 @@ Imports DigitalData.Modules.ZooFlow Public Class frmFileflow_Duplicate Dim omessagetext As String - Private Search As SearchRunner + Private Search As Search.SearchRunner Private Property Environment As Environment Public Sub New(pFilename As String, pDate As String) @@ -18,7 +18,7 @@ Public Class frmFileflow_Duplicate End If Environment = My.Application.GetEnvironment() - Search = New SearchRunner(My.LogConfig, Environment, "FlowSearch") With { + Search = New Search.SearchRunner(My.LogConfig, Environment, "FlowSearch") With { .BaseSearchSQL = SQL_FLOW_SEARCH_BASE } End Sub diff --git a/GUIs.ZooFlow/My Project/Resources.Designer.vb b/GUIs.ZooFlow/My Project/Resources.Designer.vb index e3a991ac..a592bbea 100644 --- a/GUIs.ZooFlow/My Project/Resources.Designer.vb +++ b/GUIs.ZooFlow/My Project/Resources.Designer.vb @@ -710,6 +710,16 @@ Namespace My.Resources End Get End Property + ''' + ''' Sucht eine lokalisierte Ressource vom Typ DevExpress.Utils.Svg.SvgImage. + ''' + Friend ReadOnly Property bo_security_permission_action() As DevExpress.Utils.Svg.SvgImage + Get + Dim obj As Object = ResourceManager.GetObject("bo_security_permission_action", resourceCulture) + Return CType(obj,DevExpress.Utils.Svg.SvgImage) + End Get + End Property + ''' ''' Sucht eine lokalisierte Ressource vom Typ DevExpress.Utils.Svg.SvgImage. ''' diff --git a/GUIs.ZooFlow/My Project/Resources.resx b/GUIs.ZooFlow/My Project/Resources.resx index e943300a..3bf9ef69 100644 --- a/GUIs.ZooFlow/My Project/Resources.resx +++ b/GUIs.ZooFlow/My Project/Resources.resx @@ -148,9 +148,6 @@ ..\Resources\action_add_16xMD.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a - - ..\Resources\StatusAnnotations_Stop_32xLG.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a - ..\Resources\allowuserstoeditranges.svg;DevExpress.Utils.Svg.SvgImage, DevExpress.Data.v21.2, Version=21.2.4.0, Culture=neutral, PublicKeyToken=b88d1754d700e49a @@ -202,9 +199,6 @@ ..\Resources\2_ZOO_FLOW_Abo.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a - - ..\Resources\ZooFlow_Sidebar_individuelle_suche.svg;DevExpress.Utils.Svg.SvgImage, DevExpress.Data.v21.2, Version=21.2.4.0, Culture=neutral, PublicKeyToken=b88d1754d700e49a - ..\Resources\editquery.svg;DevExpress.Utils.Svg.SvgImage, DevExpress.Data.v21.2, Version=21.2.4.0, Culture=neutral, PublicKeyToken=b88d1754d700e49a @@ -244,8 +238,11 @@ ..\Resources\Flow.PNG;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a - - ..\Resources\action_add_16xLG.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a + + ..\Resources\unlink.svg;DevExpress.Utils.Svg.SvgImage, DevExpress.Data.v21.2, Version=21.2.4.0, Culture=neutral, PublicKeyToken=b88d1754d700e49a + + + ..\Resources\Checked-outforEdit_13297.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a ..\Resources\nextview.svg;DevExpress.Utils.Svg.SvgImage, DevExpress.Data.v21.2, Version=21.2.4.0, Culture=neutral, PublicKeyToken=b88d1754d700e49a @@ -313,6 +310,9 @@ ..\Resources\actions_check3.svg;DevExpress.Utils.Svg.SvgImage, DevExpress.Data.v21.2, Version=21.2.4.0, Culture=neutral, PublicKeyToken=b88d1754d700e49a + + ..\Resources\definednameuseinformula2.svg;DevExpress.Utils.Svg.SvgImage, DevExpress.Data.v21.2, Version=21.2.4.0, Culture=neutral, PublicKeyToken=b88d1754d700e49a + ..\Resources\save5.svg;DevExpress.Utils.Svg.SvgImage, DevExpress.Data.v21.2, Version=21.2.4.0, Culture=neutral, PublicKeyToken=b88d1754d700e49a @@ -349,8 +349,8 @@ ..\Resources\actions_addcircled1.svg;DevExpress.Utils.Svg.SvgImage, DevExpress.Data.v21.2, Version=21.2.4.0, Culture=neutral, PublicKeyToken=b88d1754d700e49a - - ..\Resources\documentproperties.svg;DevExpress.Utils.Svg.SvgImage, DevExpress.Data.v21.2, Version=21.2.4.0, Culture=neutral, PublicKeyToken=b88d1754d700e49a + + ..\Resources\ZooFlow_G_DevExpress.svg;DevExpress.Utils.Svg.SvgImage, DevExpress.Data.v21.2, Version=21.2.4.0, Culture=neutral, PublicKeyToken=b88d1754d700e49a ..\Resources\1_LOGO_ZOO_FLOW.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a @@ -373,9 +373,6 @@ ..\Resources\new4.svg;DevExpress.Utils.Svg.SvgImage, DevExpress.Data.v21.2, Version=21.2.4.0, Culture=neutral, PublicKeyToken=b88d1754d700e49a - - ..\Resources\ZooFlow_G_DevExpress.svg;DevExpress.Utils.Svg.SvgImage, DevExpress.Data.v21.2, Version=21.2.4.0, Culture=neutral, PublicKeyToken=b88d1754d700e49a - ..\Resources\save6.svg;DevExpress.Utils.Svg.SvgImage, DevExpress.Data.v21.2, Version=21.2.4.0, Culture=neutral, PublicKeyToken=b88d1754d700e49a @@ -394,9 +391,6 @@ ..\Resources\doublenext1.svg;DevExpress.Utils.Svg.SvgImage, DevExpress.Data.v21.2, Version=21.2.4.0, Culture=neutral, PublicKeyToken=b88d1754d700e49a - - ..\Resources\ZooFlow_drop.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a - ..\Resources\GLOBIX_short.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a @@ -424,6 +418,9 @@ ..\Resources\managedatasource1.svg;DevExpress.Utils.Svg.SvgImage, DevExpress.Data.v21.2, Version=21.2.4.0, Culture=neutral, PublicKeyToken=b88d1754d700e49a + + ..\Resources\Checked-outforEdit_Color_13297.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a + ..\Resources\pagesetup.svg;DevExpress.Utils.Svg.SvgImage, DevExpress.Data.v21.2, Version=21.2.4.0, Culture=neutral, PublicKeyToken=b88d1754d700e49a @@ -442,12 +439,12 @@ ..\Resources\Editdatasetwithdesigner_8449.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a - - ..\Resources\1_LOGO_ZOO_FLOW_DROP2.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a - ..\Resources\definednameuseinformula1.svg;DevExpress.Utils.Svg.SvgImage, DevExpress.Data.v21.2, Version=21.2.4.0, Culture=neutral, PublicKeyToken=b88d1754d700e49a + + ..\Resources\properties.svg;DevExpress.Utils.Svg.SvgImage, DevExpress.Data.v21.2, Version=21.2.4.0, Culture=neutral, PublicKeyToken=b88d1754d700e49a + ..\Resources\2_LUPE_INAKTIV_ZOO.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a @@ -469,9 +466,6 @@ ..\Resources\del5.svg;DevExpress.Utils.Svg.SvgImage, DevExpress.Data.v21.2, Version=21.2.4.0, Culture=neutral, PublicKeyToken=b88d1754d700e49a - - ..\Resources\actions_edit1.svg;DevExpress.Utils.Svg.SvgImage, DevExpress.Data.v21.2, Version=21.2.4.0, Culture=neutral, PublicKeyToken=b88d1754d700e49a - ..\Resources\new1.svg;DevExpress.Utils.Svg.SvgImage, DevExpress.Data.v21.2, Version=21.2.4.0, Culture=neutral, PublicKeyToken=b88d1754d700e49a @@ -508,12 +502,15 @@ ..\Resources\doublenext2.svg;DevExpress.Utils.Svg.SvgImage, DevExpress.Data.v21.2, Version=21.2.4.0, Culture=neutral, PublicKeyToken=b88d1754d700e49a - - ..\Resources\properties.svg;DevExpress.Utils.Svg.SvgImage, DevExpress.Data.v21.2, Version=21.2.4.0, Culture=neutral, PublicKeyToken=b88d1754d700e49a + + ..\Resources\Compare_RefreshScriptPreview.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a ..\Resources\new3.svg;DevExpress.Utils.Svg.SvgImage, DevExpress.Data.v21.2, Version=21.2.4.0, Culture=neutral, PublicKeyToken=b88d1754d700e49a + + ..\Resources\actions_deletecircled3.svg;DevExpress.Utils.Svg.SvgImage, DevExpress.Data.v21.2, Version=21.2.4.0, Culture=neutral, PublicKeyToken=b88d1754d700e49a + ..\Resources\actions_check.svg;DevExpress.Utils.Svg.SvgImage, DevExpress.Data.v21.2, Version=21.2.4.0, Culture=neutral, PublicKeyToken=b88d1754d700e49a @@ -526,8 +523,8 @@ ..\Resources\actions_calendar1.svg;DevExpress.Utils.Svg.SvgImage, DevExpress.Data.v21.2, Version=21.2.4.0, Culture=neutral, PublicKeyToken=b88d1754d700e49a - - ..\Resources\bo_category.svg;DevExpress.Utils.Svg.SvgImage, DevExpress.Data.v21.2, Version=21.2.4.0, Culture=neutral, PublicKeyToken=b88d1754d700e49a + + ..\Resources\switchrowcolumns.svg;DevExpress.Utils.Svg.SvgImage, DevExpress.Data.v21.2, Version=21.2.4.0, Culture=neutral, PublicKeyToken=b88d1754d700e49a ..\Resources\actions_deletecircled5.svg;DevExpress.Utils.Svg.SvgImage, DevExpress.Data.v21.2, Version=21.2.4.0, Culture=neutral, PublicKeyToken=b88d1754d700e49a @@ -538,8 +535,11 @@ ..\Resources\ZOOFLOW_DRAG_PROGRESSIVE.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a - - ..\Resources\Compare_RefreshScriptPreview.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a + + ..\Resources\documentproperties.svg;DevExpress.Utils.Svg.SvgImage, DevExpress.Data.v21.2, Version=21.2.4.0, Culture=neutral, PublicKeyToken=b88d1754d700e49a + + + ..\Resources\StatusAnnotations_Information_16xLG_color.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a ..\Resources\renamedatasource.svg;DevExpress.Utils.Svg.SvgImage, DevExpress.Data.v21.2, Version=21.2.4.0, Culture=neutral, PublicKeyToken=b88d1754d700e49a @@ -547,12 +547,15 @@ ..\Resources\actions_addcircled4.svg;DevExpress.Utils.Svg.SvgImage, DevExpress.Data.v21.2, Version=21.2.4.0, Culture=neutral, PublicKeyToken=b88d1754d700e49a - - ..\Resources\Checked-outforEdit_13297.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a + + ..\Resources\StatusAnnotations_Stop_32xLG.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a ..\Resources\bell_delete.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a + + ..\Resources\save8.svg;DevExpress.Utils.Svg.SvgImage, DevExpress.Data.v21.2, Version=21.2.4.0, Culture=neutral, PublicKeyToken=b88d1754d700e49a + ..\Resources\save9.svg;DevExpress.Utils.Svg.SvgImage, DevExpress.Data.v21.2, Version=21.2.4.0, Culture=neutral, PublicKeyToken=b88d1754d700e49a @@ -562,14 +565,14 @@ ..\Resources\bo_validation1.svg;DevExpress.Utils.Svg.SvgImage, DevExpress.Data.v21.2, Version=21.2.4.0, Culture=neutral, PublicKeyToken=b88d1754d700e49a - - ..\Resources\actions_deletecircled3.svg;DevExpress.Utils.Svg.SvgImage, DevExpress.Data.v21.2, Version=21.2.4.0, Culture=neutral, PublicKeyToken=b88d1754d700e49a + + ..\Resources\action_add_16xLG.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a ..\Resources\ZooFlow_Sidebar_TOP.svg;DevExpress.Utils.Svg.SvgImage, DevExpress.Data.v21.2, Version=21.2.4.0, Culture=neutral, PublicKeyToken=b88d1754d700e49a - - ..\Resources\definednameuseinformula2.svg;DevExpress.Utils.Svg.SvgImage, DevExpress.Data.v21.2, Version=21.2.4.0, Culture=neutral, PublicKeyToken=b88d1754d700e49a + + ..\Resources\ZooFlow_Sidebar_individuelle_suche.svg;DevExpress.Utils.Svg.SvgImage, DevExpress.Data.v21.2, Version=21.2.4.0, Culture=neutral, PublicKeyToken=b88d1754d700e49a ..\Resources\actions_calendar.svg;DevExpress.Utils.Svg.SvgImage, DevExpress.Data.v21.2, Version=21.2.4.0, Culture=neutral, PublicKeyToken=b88d1754d700e49a @@ -589,8 +592,8 @@ ..\Resources\ZooFlow_PM_DevExpress.svg;DevExpress.Utils.Svg.SvgImage, DevExpress.Data.v21.2, Version=21.2.4.0, Culture=neutral, PublicKeyToken=b88d1754d700e49a - - ..\Resources\StatusAnnotations_Information_16xLG_color.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a + + ..\Resources\actions_edit1.svg;DevExpress.Utils.Svg.SvgImage, DevExpress.Data.v21.2, Version=21.2.4.0, Culture=neutral, PublicKeyToken=b88d1754d700e49a ..\Resources\del.svg;DevExpress.Utils.Svg.SvgImage, DevExpress.Data.v21.2, Version=21.2.4.0, Culture=neutral, PublicKeyToken=b88d1754d700e49a @@ -604,23 +607,23 @@ ..\Resources\2_ZOO_FLOW_Abo_MouseOver.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a - - ..\Resources\Checked-outforEdit_Color_13297.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a + + ..\Resources\ZooFlow_drop.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a ..\Resources\about4.svg;DevExpress.Utils.Svg.SvgImage, DevExpress.Data.v21.2, Version=21.2.4.0, Culture=neutral, PublicKeyToken=b88d1754d700e49a - - ..\Resources\switchrowcolumns.svg;DevExpress.Utils.Svg.SvgImage, DevExpress.Data.v21.2, Version=21.2.4.0, Culture=neutral, PublicKeyToken=b88d1754d700e49a + + ..\Resources\undo.svg;DevExpress.Utils.Svg.SvgImage, DevExpress.Data.v21.2, Version=21.2.4.0, Culture=neutral, PublicKeyToken=b88d1754d700e49a + + + ..\Resources\1_LOGO_ZOO_FLOW_DROP2.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a ..\Resources\bo_document.svg;DevExpress.Utils.Svg.SvgImage, DevExpress.Data.v21.2, Version=21.2.4.0, Culture=neutral, PublicKeyToken=b88d1754d700e49a - - ..\Resources\actions_addcircled3.svg;DevExpress.Utils.Svg.SvgImage, DevExpress.Data.v21.2, Version=21.2.4.0, Culture=neutral, PublicKeyToken=b88d1754d700e49a - - - ..\Resources\save8.svg;DevExpress.Utils.Svg.SvgImage, DevExpress.Data.v21.2, Version=21.2.4.0, Culture=neutral, PublicKeyToken=b88d1754d700e49a + + ..\Resources\bo_category.svg;DevExpress.Utils.Svg.SvgImage, DevExpress.Data.v21.2, Version=21.2.4.0, Culture=neutral, PublicKeyToken=b88d1754d700e49a ..\Resources\servermode.svg;DevExpress.Utils.Svg.SvgImage, DevExpress.Data.v21.2, Version=21.2.4.0, Culture=neutral, PublicKeyToken=b88d1754d700e49a @@ -634,8 +637,8 @@ ..\Resources\definednameuseinformula3.svg;DevExpress.Utils.Svg.SvgImage, DevExpress.Data.v21.2, Version=21.2.4.0, Culture=neutral, PublicKeyToken=b88d1754d700e49a - - ..\Resources\unlink.svg;DevExpress.Utils.Svg.SvgImage, DevExpress.Data.v21.2, Version=21.2.4.0, Culture=neutral, PublicKeyToken=b88d1754d700e49a + + ..\Resources\actions_addcircled3.svg;DevExpress.Utils.Svg.SvgImage, DevExpress.Data.v21.2, Version=21.2.4.0, Culture=neutral, PublicKeyToken=b88d1754d700e49a ..\Resources\1_LOGO_ZOO_FLOW1.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a @@ -649,7 +652,7 @@ ..\Resources\del3.svg;DevExpress.Utils.Svg.SvgImage, DevExpress.Data.v21.2, Version=21.2.4.0, Culture=neutral, PublicKeyToken=b88d1754d700e49a - - ..\Resources\undo.svg;DevExpress.Utils.Svg.SvgImage, DevExpress.Data.v21.2, Version=21.2.4.0, Culture=neutral, PublicKeyToken=b88d1754d700e49a + + ..\Resources\bo_security_permission_action.svg;DevExpress.Utils.Svg.SvgImage, DevExpress.Data.v21.2, Version=21.2.4.0, Culture=neutral, PublicKeyToken=b88d1754d700e49a \ No newline at end of file diff --git a/GUIs.ZooFlow/Resources/bo_security_permission_action.svg b/GUIs.ZooFlow/Resources/bo_security_permission_action.svg new file mode 100644 index 00000000..a6defff0 --- /dev/null +++ b/GUIs.ZooFlow/Resources/bo_security_permission_action.svg @@ -0,0 +1,8 @@ + + + + + + \ No newline at end of file diff --git a/GUIs.ZooFlow/Search/frmFlowSearch1.Designer.vb b/GUIs.ZooFlow/Search/Old/frmFlowSearch1.Designer.vb similarity index 100% rename from GUIs.ZooFlow/Search/frmFlowSearch1.Designer.vb rename to GUIs.ZooFlow/Search/Old/frmFlowSearch1.Designer.vb diff --git a/GUIs.ZooFlow/Search/frmFlowSearch1.resx b/GUIs.ZooFlow/Search/Old/frmFlowSearch1.resx similarity index 100% rename from GUIs.ZooFlow/Search/frmFlowSearch1.resx rename to GUIs.ZooFlow/Search/Old/frmFlowSearch1.resx diff --git a/GUIs.ZooFlow/Search/frmFlowSearch1.vb b/GUIs.ZooFlow/Search/Old/frmFlowSearch1.vb similarity index 98% rename from GUIs.ZooFlow/Search/frmFlowSearch1.vb rename to GUIs.ZooFlow/Search/Old/frmFlowSearch1.vb index 0817b62c..2ff03abf 100644 --- a/GUIs.ZooFlow/Search/frmFlowSearch1.vb +++ b/GUIs.ZooFlow/Search/Old/frmFlowSearch1.vb @@ -8,7 +8,7 @@ Imports DigitalData.Modules.ZooFlow Public Class frmFlowSearch1 Private Environment As Environment Private Logger As Logger - Private SearchRunner As SearchRunner + Private SearchRunner As Search.SearchRunner Private Property BaseSearchSQL As String Private Property TogglesDate As List(Of ToggleSwitch) @@ -117,7 +117,7 @@ Public Class frmFlowSearch1 Private Sub frmFlowSearch1_Load(sender As Object, e As EventArgs) Handles Me.Load Logger = My.LogConfig.GetLogger() - SearchRunner = New SearchRunner(My.LogConfig, My.Application.GetEnvironment, "FlowSearch") + SearchRunner = New Search.SearchRunner(My.LogConfig, My.Application.GetEnvironment, "FlowSearch") Try If My.Application.User.Language = "de-DE" Then diff --git a/GUIs.ZooFlow/Search/SearchLoader.vb b/GUIs.ZooFlow/Search/SearchLoader.vb new file mode 100644 index 00000000..7cf80c67 --- /dev/null +++ b/GUIs.ZooFlow/Search/SearchLoader.vb @@ -0,0 +1,181 @@ +Imports System.IO +Imports System.Xml.Serialization +Imports DevExpress.Utils +Imports DevExpress.Utils.Svg +Imports DigitalData.GUIs.ZooFlow.frmSearchFlow +Imports DigitalData.GUIs.ZooFlow.Search.SearchToken +Imports DigitalData.Modules.Base +Imports DigitalData.Modules.Config +Imports DigitalData.Modules.Logging +Imports DigitalData.Modules.Language + +Namespace Search + Public Class SearchLoader + Inherits BaseClass + + Private Const CUSTOM_SEARCH_DIRECTORY = "" + + Private ReadOnly Images As SvgImageCollection + Private ReadOnly Config As ConfigManager(Of UIConfig) + 'Private ReadOnly Serializer As New XmlSerializer(GetType(CustomSearch)) + + Public Property CustomSearches As List(Of CustomSearch) + + Public Sub New(pLogConfig As LogConfig, pConfig As ConfigManager(Of UIConfig), pSvgImages As SvgImageCollection) + MyBase.New(pLogConfig) + Images = pSvgImages + Config = pConfig + End Sub + + Private Function GetSearchDirectoryPath() As String + Dim oConfigPath As String = Config.UserConfigPath + Dim oConfigDirectory As String = IO.Path.Combine(IO.Path.GetDirectoryName(oConfigPath), CUSTOM_SEARCH_DIRECTORY) + + If IO.Directory.Exists(oConfigDirectory) = False Then + Try + IO.Directory.CreateDirectory(oConfigDirectory) + Catch ex As Exception + Logger.Error(ex) + End Try + End If + + Return oConfigDirectory + End Function + + Public Sub CreateCustomSearch(pTitle As String, pDescription As String, pTokens As List(Of Token), pImage As String) + Dim oSearch As New CustomSearch With { + .Name = pTitle, + .Description = pDescription, + .Tokens = pTokens, + .Image = Images.Item(pImage) + } + CustomSearches.Add(oSearch) + + 'Dim oDirectoryPath As String = GetSearchDirectoryPath() + 'Dim oFilePath As String = IO.Path.Combine(oDirectoryPath, Utils.ConvertTextToSlug(pTitle)) + 'Dim oBuffer As Byte() = SerializeSearch(oSearch) + + 'IO.File.WriteAllBytes(oFilePath, oBuffer) + End Sub + + Public Function LoadSearches() As List(Of SavedSearch) + Dim oSearches As New List(Of SavedSearch) + Dim oCustomSearches = LoadCustomSearches() + Dim oPredefinedSearches = LoadPredefinedSearches() + + Return oSearches. + Concat(oCustomSearches). + Concat(oPredefinedSearches). + ToList() + End Function + + Public Function LoadCustomSearches() As List(Of SavedSearch) + Return New List(Of SavedSearch) + End Function + + Public Function LoadPredefinedSearches() As List(Of SavedSearch) + Return New List(Of SavedSearch) From { + New PredefinedDateSearch() With { + .Name = "Heute", + .Description = "Dokumente, die heute abgelegt wurden", + .DateConstraint = SearchRunner.DateConstraint.Today, + .Image = Images.Item("today") + }, + New PredefinedDateSearch() With { + .Name = "Gestern", + .Description = "Dokumente, die gestern abgelegt wurden", + .DateConstraint = SearchRunner.DateConstraint.Yesterday, + .Image = Images.Item("yesterday") + }, + New PredefinedDateSearch() With { + .Name = "Letzte 7 Tage", + .Description = "Dokumente, die in den letzten 7 Tagen abgelegt wurden", + .DateConstraint = SearchRunner.DateConstraint.Last7Days, + .Image = Images.Item("week") + }, + New PredefinedDateSearch() With { + .Name = "Dieser Monat", + .Description = "Dokumente, die in diesem Monat abgelegt wurden", + .DateConstraint = SearchRunner.DateConstraint.CurrentMonth, + .Image = Images.Item("month") + }, + New PredefinedDateSearch() With { + .Name = "Letzter Monat", + .Description = "Dokumente, die im letzten Monat abgelegt wurden", + .DateConstraint = SearchRunner.DateConstraint.LastMonth, + .Image = Images.Item("month") + }, + New PredefinedDateSearch() With { + .Name = "Dieses Jahr", + .Description = "Dokumente, die in diesem Jahr abgelegt wurden", + .DateConstraint = SearchRunner.DateConstraint.CurrentYear, + .Image = Images.Item("year") + }, + New PredefinedDateSearch() With { + .Name = "Letztes Jahr", + .Description = "Dokumente, die im letzten Jahr abgelegt wurden", + .DateConstraint = SearchRunner.DateConstraint.LastYear, + .Image = Images.Item("year") + } + } + End Function + + 'Private Function SerializeSearch(pSearch As CustomSearch) As Byte() + ' Try + ' Using oStream As New MemoryStream + ' Serializer.Serialize(oStream, pSearch) + ' Return oStream.ToArray() + ' End Using + ' Catch ex As Exception + ' Logger.Error(ex) + ' Return Nothing + ' End Try + 'End Function + + 'Private Function DeserializeSearch(pBytes As Byte()) As CustomSearch + ' Try + ' Using oStream As New MemoryStream(pBytes) + ' Return Serializer.Deserialize(oStream) + ' End Using + ' Catch ex As Exception + ' Logger.Error(ex) + ' Return Nothing + ' End Try + 'End Function + + Public Class PredefinedSQLSearch + Public Property SQLCommand As String + End Class + + Public Class PredefinedDateSearch + Inherits SavedSearch + + Public Overrides Property GroupText As String = "Vordefiniert" + + Public Property DateConstraint As SearchRunner.DateConstraint + End Class + + Public Class CustomSearch + Inherits SavedSearch + + Public Overrides Property GroupText As String = "Eigene" + + Public Tokens As New List(Of Token) + End Class + + Public MustInherit Class SavedSearch + Public Property Name As String + Public Property Description As String + + Public Property Image As SvgImage + Public Property Count As Integer = 0 + Public Overridable Property GroupText As String = "Vordefiniert" + + Public ReadOnly Property DisplayName As String + Get + Return Name + End Get + End Property + End Class + End Class +End Namespace diff --git a/GUIs.ZooFlow/Search/SearchRunner.vb b/GUIs.ZooFlow/Search/SearchRunner.vb index 25a3877d..f8a5c515 100644 --- a/GUIs.ZooFlow/Search/SearchRunner.vb +++ b/GUIs.ZooFlow/Search/SearchRunner.vb @@ -4,268 +4,269 @@ Imports DigitalData.Modules.Logging Imports DigitalData.Modules.ZooFlow Imports System.Threading.Tasks -Public Class SearchRunner - Inherits BaseClass +Namespace Search + Public Class SearchRunner + Inherits BaseClass - Private Const SEARCH_FACT_DATE_DEFAULT As String = "ADDED_WHEN" + Private Const SEARCH_FACT_DATE_DEFAULT As String = "ADDED_WHEN" - Public Const CREATED_TOMORROW As String = "TOMORROW" - Public Const CREATED_TODAY As String = "ECM_CREATED_TODAY" - Public Const CREATED_YESTERDAY As String = "ECM_CREATED_YESTERDAY" - Public Const CREATED_LAST_7_DAYS As String = "ECM_CREATED_LAST7DAYS" - Public Const CREATED_YEAR_CURRENT As String = "ECM_CREATED_YEAR_CURRENT" - Public Const CREATED_YEAR_LAST As String = "ECM_CREATED_YEAR_LAST" - Public Const CREATED_MONTH_CURR As String = "ECM_CREATED_MONTH_CURRENT" - Public Const CREATED_MONTH_LAST As String = "ECM_CREATED_MONTH_LAST" + Public Const CREATED_TOMORROW As String = "TOMORROW" + Public Const CREATED_TODAY As String = "ECM_CREATED_TODAY" + Public Const CREATED_YESTERDAY As String = "ECM_CREATED_YESTERDAY" + Public Const CREATED_LAST_7_DAYS As String = "ECM_CREATED_LAST7DAYS" + Public Const CREATED_YEAR_CURRENT As String = "ECM_CREATED_YEAR_CURRENT" + Public Const CREATED_YEAR_LAST As String = "ECM_CREATED_YEAR_LAST" + Public Const CREATED_MONTH_CURR As String = "ECM_CREATED_MONTH_CURRENT" + Public Const CREATED_MONTH_LAST As String = "ECM_CREATED_MONTH_LAST" - Public Enum DateConstraint - Today - Tomorrow - Yesterday - Last7Days - CurrentMonth - LastMonth - CurrentYear - LastYear - Undefined - End Enum + Public Enum DateConstraint + Today + Tomorrow + Yesterday + Last7Days + CurrentMonth + LastMonth + CurrentYear + LastYear + Undefined + End Enum - Public Enum TokenOperator - [And] - [Or] - End Enum + Public Enum TokenOperator + [And] + [Or] + End Enum - Public Event NeedsRefresh As EventHandler(Of Integer) - Public Event Closed As EventHandler(Of Integer) + Public Event NeedsRefresh As EventHandler(Of Integer) + Public Event Closed As EventHandler(Of Integer) - Private Property _ActiveDateConstraint As String = String.Empty - Public ReadOnly Property ActiveDateConstraint As String - Get - Return _ActiveDateConstraint - End Get - End Property + Private Property _ActiveDateConstraint As String = String.Empty + Public ReadOnly Property ActiveDateConstraint As String + Get + Return _ActiveDateConstraint + End Get + End Property - Private _ActiveDateAttribute As String = SEARCH_FACT_DATE_DEFAULT - Private _ActiveTokenOperator As TokenOperator = TokenOperator.And + Private _ActiveDateAttribute As String = SEARCH_FACT_DATE_DEFAULT + Private _ActiveTokenOperator As TokenOperator = TokenOperator.And - Public ReadOnly Property ActiveDateAttribute As String - Get - Return _ActiveDateAttribute - End Get - End Property + Public ReadOnly Property ActiveDateAttribute As String + Get + Return _ActiveDateAttribute + End Get + End Property - Public Property BaseSearchSQL As String - Public Property ExplicitDate As Boolean = False + Public Property BaseSearchSQL As String + Public Property ExplicitDate As Boolean = False - Private ReadOnly Environment As Environment - Private ReadOnly SearchId As String - Private ReadOnly UserId As Integer - Private ReadOnly UserLanguage As String + Private ReadOnly Environment As Environment + Private ReadOnly SearchId As String + Private ReadOnly UserId As Integer + Private ReadOnly UserLanguage As String - Public Sub New(pLogConfig As LogConfig, pEnvironment As Environment, pSearchId As String) - MyBase.New(pLogConfig) - Environment = pEnvironment - SearchId = pSearchId - UserId = My.Application.User.UserId - UserLanguage = My.Application.User.Language - End Sub + Public Sub New(pLogConfig As LogConfig, pEnvironment As Environment, pSearchId As String) + MyBase.New(pLogConfig) + Environment = pEnvironment + SearchId = pSearchId + UserId = My.Application.User.UserId + UserLanguage = My.Application.User.Language + End Sub - Public Function RunWithDataTable(pDatatable As DataTable) As SearchResult - Return RunWithDataTable(pDatatable, "Suche") - End Function + Public Function RunWithDataTable(pDatatable As DataTable) As SearchResult + Return RunWithDataTable(pDatatable, "Suche") + End Function - Public Function RunWithDataTable(pDatatable As DataTable, pTitle As String) As SearchResult - Dim oParams = GetParams(pTitle) - oParams.Results.Add(New DocumentResultList.DocumentResult() With { + Public Function RunWithDataTable(pDatatable As DataTable, pTitle As String) As SearchResult + Dim oParams = GetParams(pTitle) + oParams.Results.Add(New DocumentResultList.DocumentResult() With { .Title = pTitle, .Datatable = pDatatable }) - If pDatatable.Rows.Count = 1 Then - oParams.ShowFileList = False - End If + If pDatatable.Rows.Count = 1 Then + oParams.ShowFileList = False + End If - Dim oForm As New frmDocumentResultList(My.LogConfig, Environment, oParams) + Dim oForm As New frmDocumentResultList(My.LogConfig, Environment, oParams) - ' TODO: Implement, not needed right now - 'AddHandler oForm.NeedsRefresh, AddressOf Form_NeedsRefresh - AddHandler oForm.FormClosed, AddressOf Form_Closed + ' TODO: Implement, not needed right now + 'AddHandler oForm.NeedsRefresh, AddressOf Form_NeedsRefresh + AddHandler oForm.FormClosed, AddressOf Form_Closed - oForm.Show() + oForm.Show() - Return New SearchResult(pDatatable.Rows.Count) - End Function + Return New SearchResult(pDatatable.Rows.Count) + End Function - ''' - ''' Only search for Term. Used for sidebar quicksearch. - ''' - Public Async Function RunWithSearchTerm(pSearchTerm As String) As Task(Of SearchResult) - Return Await RunWithSearchTerm(New SearchOptions With {.SearchString = pSearchTerm}) - End Function + ''' + ''' Only search for Term. Used for sidebar quicksearch. + ''' + Public Async Function RunWithSearchTerm(pSearchTerm As String) As Task(Of SearchResult) + Return Await RunWithSearchTerm(New SearchOptions With {.SearchString = pSearchTerm}) + End Function - Public Async Function RunWithSearchTerm(pSearchTerm As String, pDateFrom As Date, pDateTo As Date, pSearchTitle As String) As Task(Of SearchResult) - Return Await RunWithSearchTerm(New SearchOptions With { + Public Async Function RunWithSearchTerm(pSearchTerm As String, pDateFrom As Date, pDateTo As Date, pSearchTitle As String) As Task(Of SearchResult) + Return Await RunWithSearchTerm(New SearchOptions With { .SearchString = pSearchTerm, .SearchTitle = pSearchTitle, .DateFrom = pDateFrom, .DateTo = pDateTo }) - End Function + End Function - Public Async Function RunWithTokens(pTokens As IEnumerable(Of Search.SearchToken.Token)) As Task(Of SearchResult) - Return Await RunWithSearchTerm(New SearchOptions With { + Public Async Function RunWithTokens(pTokens As IEnumerable(Of Search.SearchToken.Token)) As Task(Of SearchResult) + Return Await RunWithSearchTerm(New SearchOptions With { .SearchTokens = pTokens }) - End Function + End Function - Public Async Function RunWithTokens(pTokens As IEnumerable(Of Search.SearchToken.Token), pDateFrom As Date, pDateTo As Date, pSearchTitle As String) As Task(Of SearchResult) - If pTokens.Count = 0 And + Public Async Function RunWithTokens(pTokens As IEnumerable(Of Search.SearchToken.Token), pDateFrom As Date, pDateTo As Date, pSearchTitle As String) As Task(Of SearchResult) + If pTokens.Count = 0 And pDateFrom = Date.MinValue And pDateTo = Date.MinValue And _ActiveDateConstraint = String.Empty Then - Return New SearchResult(0) - End If + Return New SearchResult(0) + End If - Return Await RunWithSearchTerm(New SearchOptions With { + Return Await RunWithSearchTerm(New SearchOptions With { .SearchTokens = pTokens, .DateFrom = pDateFrom, .DateTo = pDateTo }) - End Function + End Function - 'Public Async Function RunWithSearchTerm(pSearchTerm As String, pDateFrom As Date, pDateTo As Date) As Task(Of SearchResult) - ' Return Await RunWithSearchTerm(pSearchTerm, pDateFrom, pDateTo, Nothing, Nothing) - 'End Function + 'Public Async Function RunWithSearchTerm(pSearchTerm As String, pDateFrom As Date, pDateTo As Date) As Task(Of SearchResult) + ' Return Await RunWithSearchTerm(pSearchTerm, pDateFrom, pDateTo, Nothing, Nothing) + 'End Function - Private Async Function RunWithSearchTerm(pOptions As SearchOptions) As Task(Of SearchResult) - Dim oDateConstraint = Await GetDateConstraint(pOptions.DateFrom, pOptions.DateTo) - Dim oWindowTitle = GetResultWindowString(pOptions.SearchString, pOptions.SearchTitle) - Dim oParams = GetParams(oWindowTitle) - Dim oTokens = pOptions.SearchTokens - Dim oSearchTerm = pOptions.SearchString + Private Async Function RunWithSearchTerm(pOptions As SearchOptions) As Task(Of SearchResult) + Dim oDateConstraint = Await GetDateConstraint(pOptions.DateFrom, pOptions.DateTo) + Dim oWindowTitle = GetResultWindowString(pOptions.SearchString, pOptions.SearchTitle) + Dim oParams = GetParams(oWindowTitle) + Dim oTokens = pOptions.SearchTokens + Dim oSearchTerm = pOptions.SearchString - Dim oSQL + Dim oSQL - If oTokens IsNot Nothing AndAlso oTokens.Count > 0 Then - Await InsertSearchTokens(oTokens) - oSQL = $"EXEC PRIDB_SEARCH_GET_TOKEN_RESULT_DOCS {UserId}, '{oDateConstraint}', '{UserLanguage}'" - ElseIf oSearchTerm IsNot Nothing Then - oSQL = $"EXEC PRIDB_SEARCH_GET_TEXT_RESULTS {UserId},'{pOptions.SearchString}','{oDateConstraint}', '{UserLanguage}'" - Else - oSQL = $"EXEC PRIDB_SEARCH_GET_TEXT_RESULTS {UserId},'{String.Empty}','{oDateConstraint}', '{UserLanguage}'" - End If - - If Await My.Database.ExecuteNonQueryIDBAsync(oSQL) = True Then - Dim oDTDocResult = Await My.Database.GetDatatableIDBAsync(BaseSearchSQL) - - If oDTDocResult Is Nothing Then - Return New SearchResult("Error in Search Query") + If oTokens IsNot Nothing AndAlso oTokens.Count > 0 Then + Await InsertSearchTokens(oTokens) + oSQL = $"EXEC PRIDB_SEARCH_GET_TOKEN_RESULT_DOCS {UserId}, '{oDateConstraint}', '{UserLanguage}'" + ElseIf oSearchTerm IsNot Nothing Then + oSQL = $"EXEC PRIDB_SEARCH_GET_TEXT_RESULTS {UserId},'{pOptions.SearchString}','{oDateConstraint}', '{UserLanguage}'" + Else + oSQL = $"EXEC PRIDB_SEARCH_GET_TEXT_RESULTS {UserId},'{String.Empty}','{oDateConstraint}', '{UserLanguage}'" End If - Dim oRowCount = oDTDocResult.Rows.Count - If oRowCount > 0 Then - oParams.Results.Add(New DocumentResultList.DocumentResult() With { + If Await My.Database.ExecuteNonQueryIDBAsync(oSQL) = True Then + Dim oDTDocResult = Await My.Database.GetDatatableIDBAsync(BaseSearchSQL) + + If oDTDocResult Is Nothing Then + Return New SearchResult("Error in Search Query") + End If + + Dim oRowCount = oDTDocResult.Rows.Count + If oRowCount > 0 Then + oParams.Results.Add(New DocumentResultList.DocumentResult() With { .Title = SearchId, .Datatable = oDTDocResult }) - If oDTDocResult.Rows.Count = 1 Then - oParams.ShowFileList = False + If oDTDocResult.Rows.Count = 1 Then + oParams.ShowFileList = False + End If + + Dim oForm As New frmDocumentResultList(My.LogConfig, Environment, oParams) + + ' TODO: Implement + 'AddHandler oForm.NeedsRefresh, AddressOf Form_NeedsRefresh + AddHandler oForm.FormClosed, AddressOf Form_Closed + + oForm.Show() + + Return New SearchResult(oRowCount) + Else + Return New SearchResult(oRowCount) + End If - - Dim oForm As New frmDocumentResultList(My.LogConfig, Environment, oParams) - - ' TODO: Implement - 'AddHandler oForm.NeedsRefresh, AddressOf Form_NeedsRefresh - AddHandler oForm.FormClosed, AddressOf Form_Closed - - oForm.Show() - - Return New SearchResult(oRowCount) Else - Return New SearchResult(oRowCount) + Return New SearchResult("Error in Search Function") End If - Else - Return New SearchResult("Error in Search Function") + End Function - End If - End Function + Private Async Function GetDateConstraint(pDateFrom As Date, pDateTo As Date) As Task(Of String) + Dim oSimpleDateConstraint = $"{_ActiveDateAttribute}~{_ActiveDateConstraint}" + Dim oExplicitConstraint = Await MaybeSetExplicitDateConstraint(pDateFrom, pDateTo) - Private Async Function GetDateConstraint(pDateFrom As Date, pDateTo As Date) As Task(Of String) - Dim oSimpleDateConstraint = $"{_ActiveDateAttribute}~{_ActiveDateConstraint}" - Dim oExplicitConstraint = Await MaybeSetExplicitDateConstraint(pDateFrom, pDateTo) + If IsNothing(oExplicitConstraint) Then + Return oSimpleDateConstraint + Else + Return oExplicitConstraint + End If + End Function - If IsNothing(oExplicitConstraint) Then - Return oSimpleDateConstraint - Else - Return oExplicitConstraint - End If - End Function + Private Async Function InsertSearchTokens(pTokens As IEnumerable(Of Search.SearchToken.Token)) As Task + Logger.Debug("Deleting previous user tokens..") + Await My.Database.ExecuteNonQueryIDBAsync($"DELETE FROM TBIDB_SEARCH_INPUT_USER WHERE USR_ID = {UserId}") - Private Async Function InsertSearchTokens(pTokens As IEnumerable(Of Search.SearchToken.Token)) As Task - Logger.Debug("Deleting previous user tokens..") - Await My.Database.ExecuteNonQueryIDBAsync($"DELETE FROM TBIDB_SEARCH_INPUT_USER WHERE USR_ID = {UserId}") + If pTokens Is Nothing Then + Logger.Warn("Token Object was nothing!") + Exit Function + End If - If pTokens Is Nothing Then - Logger.Warn("Token Object was nothing!") - Exit Function - End If + If pTokens.Count = 0 Then + Logger.Warn("Token Object was empty!") + Exit Function + End If - If pTokens.Count = 0 Then - Logger.Warn("Token Object was empty!") - Exit Function - End If + Dim oOperatorString - Dim oOperatorString - - Select Case _ActiveTokenOperator - Case TokenOperator.Or - oOperatorString = "OR" - Case Else - oOperatorString = "AND" - End Select + Select Case _ActiveTokenOperator + Case TokenOperator.Or + oOperatorString = "OR" + Case Else + oOperatorString = "AND" + End Select - For Each oToken In pTokens - Dim oSQLInsert As String = $" + For Each oToken In pTokens + Dim oSQLInsert As String = $" INSERT INTO [dbo].[TBIDB_SEARCH_INPUT_USER] ([USR_ID], [ATTR_ID], [ATTR_TITLE], [TERM_ID], [OPERATOR]) VALUES ({UserId}, {oToken.AttributeId}, '{oToken.AttributeTitle}', {oToken.TermId}, '{oOperatorString}')" - Dim oResult = Await My.Database.ExecuteNonQueryIDBAsync(oSQLInsert) - Logger.Warn("Inserting Tokens failed!") - Next - End Function + Dim oResult = Await My.Database.ExecuteNonQueryIDBAsync(oSQLInsert) + Logger.Warn("Inserting Tokens failed!") + Next + End Function - Private Async Function MaybeSetExplicitDateConstraint(pDateFrom As Date, pDateTo As Date) As Task(Of String) - If pDateFrom.Equals(Date.MinValue) = False Then - ExplicitDate = True + Private Async Function MaybeSetExplicitDateConstraint(pDateFrom As Date, pDateTo As Date) As Task(Of String) + If pDateFrom.Equals(Date.MinValue) = False Then + ExplicitDate = True - Dim oDateTo As Date - If pDateTo.Equals(Date.MinValue) Then - oDateTo = pDateFrom - Else - oDateTo = pDateTo + Dim oDateTo As Date + If pDateTo.Equals(Date.MinValue) Then + oDateTo = pDateFrom + Else + oDateTo = pDateTo + End If + Dim oProc = $"EXEC PRIDB_SEARCH_ADD_USR_DATE {UserId},'{pDateFrom}','{oDateTo}'" + If Await My.Database.ExecuteNonQueryIDBAsync(oProc) = True Then + Return $"{_ActiveDateAttribute}~DATEPART" + Else + Return Nothing + End If End If - Dim oProc = $"EXEC PRIDB_SEARCH_ADD_USR_DATE {UserId},'{pDateFrom}','{oDateTo}'" - If Await My.Database.ExecuteNonQueryIDBAsync(oProc) = True Then - Return $"{_ActiveDateAttribute}~DATEPART" - Else - Return Nothing - End If - End If - Return Nothing - End Function + Return Nothing + End Function - Private Sub Form_Closed(sender As Object, e As EventArgs) - RaiseEvent Closed(sender, 0) - End Sub + Private Sub Form_Closed(sender As Object, e As EventArgs) + RaiseEvent Closed(sender, 0) + End Sub - Private Function GetParams(pWindowTitle As String) As DocumentResultList.Params - Dim oParams = New DocumentResultList.Params() With { + Private Function GetParams(pWindowTitle As String) As DocumentResultList.Params + Dim oParams = New DocumentResultList.Params() With { .WindowGuid = SearchId, .WindowTitle = pWindowTitle, .OperationModeOverride = Modules.ZooFlow.Constants.OperationMode.ZooFlow, @@ -275,143 +276,145 @@ Public Class SearchRunner }, .ShowBackNavigation = False } - Return oParams - End Function + Return oParams + End Function - Private Function GetResultWindowString(pSearchContent As String, pWindowTitle As String) As String - Dim oWindowString + Private Function GetResultWindowString(pSearchContent As String, pWindowTitle As String) As String + Dim oWindowString - ' This is the default title - If UserLanguage = State.UserState.LANG_DE_DE Then - oWindowString = $"Suche" - Else - oWindowString = $"Search" - End If - - ' If a Search String is given, we might take this - If pSearchContent <> String.Empty Then - If UserLanguage = State.UserState.LANG_DE_DE Then - Return $"Suche Nach '{pSearchContent}'" + ' This is the default title + If UserLanguage = DigitalData.Modules.ZooFlow.State.UserState.LANG_DE_DE Then + oWindowString = $"Suche" Else - Return $"Search For '{pSearchContent}'" + oWindowString = $"Search" End If - End If - ' Window Title overrides everything - If pWindowTitle IsNot Nothing Then - oWindowString = pWindowTitle - End If + ' If a Search String is given, we might take this + If pSearchContent <> String.Empty Then + If UserLanguage = DigitalData.Modules.ZooFlow.State.UserState.LANG_DE_DE Then + Return $"Suche Nach '{pSearchContent}'" + Else + Return $"Search For '{pSearchContent}'" + End If + End If - Return oWindowString - End Function + ' Window Title overrides everything + If pWindowTitle IsNot Nothing Then + oWindowString = pWindowTitle + End If - Public Sub SetDateConstraint() - _ActiveDateConstraint = String.Empty - End Sub + Return oWindowString + End Function - Public Sub SetDateConstraint(pConstraintName As String) - _ActiveDateConstraint = pConstraintName - End Sub - - Public Sub SetDateConstraint(pConstraint As DateConstraint) - _ActiveDateConstraint = DateConstraintToConstant(pConstraint) - End Sub - - Public Sub SetTokenOperator(pOperator As TokenOperator) - _ActiveTokenOperator = pOperator - End Sub - - Public Function DateConstraintToConstant(pConstraint As DateConstraint) As String - Select Case pConstraint - Case DateConstraint.Today - Return CREATED_TODAY - - Case DateConstraint.Yesterday - Return CREATED_YESTERDAY - - Case DateConstraint.Tomorrow - Return CREATED_TOMORROW - - Case DateConstraint.Last7Days - Return CREATED_LAST_7_DAYS - - Case DateConstraint.CurrentMonth - Return CREATED_MONTH_CURR - - Case DateConstraint.LastMonth - Return CREATED_MONTH_LAST - - Case DateConstraint.CurrentYear - Return CREATED_YEAR_CURRENT - - Case DateConstraint.LastYear - Return CREATED_YEAR_LAST - - Case Else - Return String.Empty - - End Select - End Function - Public Function ConstantToDateConstraint(pConstant As String) As DateConstraint - Select Case pConstant - Case CREATED_TODAY - Return DateConstraint.Today - Case CREATED_YESTERDAY - Return DateConstraint.Yesterday - Case CREATED_TOMORROW - Return DateConstraint.Tomorrow - Case CREATED_LAST_7_DAYS - Return DateConstraint.Last7Days - Case CREATED_MONTH_CURR - Return DateConstraint.CurrentMonth - Case CREATED_MONTH_LAST - Return DateConstraint.LastMonth - Case CREATED_YEAR_CURRENT - Return DateConstraint.CurrentYear - Case CREATED_YEAR_LAST - Return DateConstraint.LastYear - Case Else - Return DateConstraint.Undefined - End Select - End Function - - Public Sub SetDateAttribute(pAttributeName As String) - _ActiveDateAttribute = pAttributeName - End Sub - - Public Sub SetDateAttribute() - _ActiveDateAttribute = SEARCH_FACT_DATE_DEFAULT - End Sub - - Public Class SearchOptions - Public SearchTitle As String - - Public SearchString As String - Public SearchTokens As IEnumerable(Of Search.SearchToken.Token) - - Public DateFrom As Date - Public DateTo As Date - End Class - - Public Class SearchResult - Public OK As Boolean = True - Public Count As Integer = 0 - Public ErrorMessage As String = String.Empty - - ''' - ''' Returns a positive Search Result - ''' - Public Sub New(pCountResults As Integer) - Count = pCountResults + Public Sub SetDateConstraint() + _ActiveDateConstraint = String.Empty End Sub - ''' - ''' Returns a failed search result with an error message - ''' - ''' - Public Sub New(pMessage As String) - OK = False - ErrorMessage = pMessage + Public Sub SetDateConstraint(pConstraintName As String) + _ActiveDateConstraint = pConstraintName End Sub + + Public Sub SetDateConstraint(pConstraint As DateConstraint) + _ActiveDateConstraint = DateConstraintToConstant(pConstraint) + End Sub + + Public Sub SetTokenOperator(pOperator As TokenOperator) + _ActiveTokenOperator = pOperator + End Sub + + Public Function DateConstraintToConstant(pConstraint As DateConstraint) As String + Select Case pConstraint + Case DateConstraint.Today + Return CREATED_TODAY + + Case DateConstraint.Yesterday + Return CREATED_YESTERDAY + + Case DateConstraint.Tomorrow + Return CREATED_TOMORROW + + Case DateConstraint.Last7Days + Return CREATED_LAST_7_DAYS + + Case DateConstraint.CurrentMonth + Return CREATED_MONTH_CURR + + Case DateConstraint.LastMonth + Return CREATED_MONTH_LAST + + Case DateConstraint.CurrentYear + Return CREATED_YEAR_CURRENT + + Case DateConstraint.LastYear + Return CREATED_YEAR_LAST + + Case Else + Return String.Empty + + End Select + End Function + Public Function ConstantToDateConstraint(pConstant As String) As DateConstraint + Select Case pConstant + Case CREATED_TODAY + Return DateConstraint.Today + Case CREATED_YESTERDAY + Return DateConstraint.Yesterday + Case CREATED_TOMORROW + Return DateConstraint.Tomorrow + Case CREATED_LAST_7_DAYS + Return DateConstraint.Last7Days + Case CREATED_MONTH_CURR + Return DateConstraint.CurrentMonth + Case CREATED_MONTH_LAST + Return DateConstraint.LastMonth + Case CREATED_YEAR_CURRENT + Return DateConstraint.CurrentYear + Case CREATED_YEAR_LAST + Return DateConstraint.LastYear + Case Else + Return DateConstraint.Undefined + End Select + End Function + + Public Sub SetDateAttribute(pAttributeName As String) + _ActiveDateAttribute = pAttributeName + End Sub + + Public Sub SetDateAttribute() + _ActiveDateAttribute = SEARCH_FACT_DATE_DEFAULT + End Sub + + Public Class SearchOptions + Public SearchTitle As String + + Public SearchString As String + Public SearchTokens As IEnumerable(Of Search.SearchToken.Token) + + Public DateFrom As Date + Public DateTo As Date + End Class + + Public Class SearchResult + Public OK As Boolean = True + Public Count As Integer = 0 + Public ErrorMessage As String = String.Empty + + ''' + ''' Returns a positive Search Result + ''' + Public Sub New(pCountResults As Integer) + Count = pCountResults + End Sub + + ''' + ''' Returns a failed search result with an error message + ''' + ''' + Public Sub New(pMessage As String) + OK = False + ErrorMessage = pMessage + End Sub + End Class End Class -End Class +End Namespace + diff --git a/GUIs.ZooFlow/Search/frmFlowSearch2/TokenEditEx.vb b/GUIs.ZooFlow/Search/TokenEditEx.vb similarity index 99% rename from GUIs.ZooFlow/Search/frmFlowSearch2/TokenEditEx.vb rename to GUIs.ZooFlow/Search/TokenEditEx.vb index de1af5a7..27ef7d98 100644 --- a/GUIs.ZooFlow/Search/frmFlowSearch2/TokenEditEx.vb +++ b/GUIs.ZooFlow/Search/TokenEditEx.vb @@ -64,7 +64,7 @@ Public Class TokenEditViewInfoEx End Class - + Public Class TokenEditEx Inherits TokenEdit diff --git a/GUIs.ZooFlow/Search/frmFlowSearch2.Designer.vb b/GUIs.ZooFlow/Search/frmSearchFlow.Designer.vb similarity index 75% rename from GUIs.ZooFlow/Search/frmFlowSearch2.Designer.vb rename to GUIs.ZooFlow/Search/frmSearchFlow.Designer.vb index e58a63bf..214b3628 100644 --- a/GUIs.ZooFlow/Search/frmFlowSearch2.Designer.vb +++ b/GUIs.ZooFlow/Search/frmSearchFlow.Designer.vb @@ -1,5 +1,5 @@  _ -Partial Class frmFlowSearch2 +Partial Class frmSearchFlow Inherits DevExpress.XtraBars.Ribbon.RibbonForm 'Das Formular überschreibt den Löschvorgang, um die Komponentenliste zu bereinigen. @@ -23,16 +23,22 @@ Partial Class frmFlowSearch2 _ Private Sub InitializeComponent() Me.components = New System.ComponentModel.Container() + Dim ItemTemplate1 As DevExpress.XtraGrid.Views.Tile.ItemTemplate = New DevExpress.XtraGrid.Views.Tile.ItemTemplate() + Dim TableColumnDefinition1 As DevExpress.XtraEditors.TableLayout.TableColumnDefinition = New DevExpress.XtraEditors.TableLayout.TableColumnDefinition() + Dim TableColumnDefinition2 As DevExpress.XtraEditors.TableLayout.TableColumnDefinition = New DevExpress.XtraEditors.TableLayout.TableColumnDefinition() + Dim TileViewItemElement1 As DevExpress.XtraGrid.Views.Tile.TileViewItemElement = New DevExpress.XtraGrid.Views.Tile.TileViewItemElement() + Dim TileViewItemElement2 As DevExpress.XtraGrid.Views.Tile.TileViewItemElement = New DevExpress.XtraGrid.Views.Tile.TileViewItemElement() + Dim TableRowDefinition1 As DevExpress.XtraEditors.TableLayout.TableRowDefinition = New DevExpress.XtraEditors.TableLayout.TableRowDefinition() Dim TableColumnDefinition3 As DevExpress.XtraEditors.TableLayout.TableColumnDefinition = New DevExpress.XtraEditors.TableLayout.TableColumnDefinition() Dim TableColumnDefinition4 As DevExpress.XtraEditors.TableLayout.TableColumnDefinition = New DevExpress.XtraEditors.TableLayout.TableColumnDefinition() + Dim TableRowDefinition2 As DevExpress.XtraEditors.TableLayout.TableRowDefinition = New DevExpress.XtraEditors.TableLayout.TableRowDefinition() Dim TableRowDefinition3 As DevExpress.XtraEditors.TableLayout.TableRowDefinition = New DevExpress.XtraEditors.TableLayout.TableRowDefinition() - Dim TableRowDefinition4 As DevExpress.XtraEditors.TableLayout.TableRowDefinition = New DevExpress.XtraEditors.TableLayout.TableRowDefinition() + Dim TileViewItemElement3 As DevExpress.XtraGrid.Views.Tile.TileViewItemElement = New DevExpress.XtraGrid.Views.Tile.TileViewItemElement() Dim TileViewItemElement4 As DevExpress.XtraGrid.Views.Tile.TileViewItemElement = New DevExpress.XtraGrid.Views.Tile.TileViewItemElement() Dim TileViewItemElement5 As DevExpress.XtraGrid.Views.Tile.TileViewItemElement = New DevExpress.XtraGrid.Views.Tile.TileViewItemElement() - Dim TileViewItemElement6 As DevExpress.XtraGrid.Views.Tile.TileViewItemElement = New DevExpress.XtraGrid.Views.Tile.TileViewItemElement() Me.colName = New DevExpress.XtraGrid.Columns.TileViewColumn() - Me.colDescription = New DevExpress.XtraGrid.Columns.TileViewColumn() Me.colImage = New DevExpress.XtraGrid.Columns.TileViewColumn() + Me.colDescription = New DevExpress.XtraGrid.Columns.TileViewColumn() Me.RibbonControl1 = New DevExpress.XtraBars.Ribbon.RibbonControl() Me.lblResults = New DevExpress.XtraBars.BarStaticItem() Me.chkOperatorAnd = New DevExpress.XtraBars.BarCheckItem() @@ -42,21 +48,22 @@ Partial Class frmFlowSearch2 Me.chkSearchEverywhere = New DevExpress.XtraBars.BarCheckItem() Me.BarButtonItem1 = New DevExpress.XtraBars.BarButtonItem() Me.BarButtonItem2 = New DevExpress.XtraBars.BarButtonItem() + Me.btnSaveSearch = New DevExpress.XtraBars.BarButtonItem() Me.RibbonPage1 = New DevExpress.XtraBars.Ribbon.RibbonPage() Me.RibbonPageGroup1 = New DevExpress.XtraBars.Ribbon.RibbonPageGroup() Me.RibbonPageGroup2 = New DevExpress.XtraBars.Ribbon.RibbonPageGroup() Me.RibbonPageGroup5 = New DevExpress.XtraBars.Ribbon.RibbonPageGroup() + Me.RibbonPageGroup3 = New DevExpress.XtraBars.Ribbon.RibbonPageGroup() Me.RepositoryItemMarqueeProgressBar1 = New DevExpress.XtraEditors.Repository.RepositoryItemMarqueeProgressBar() Me.RibbonStatusBar1 = New DevExpress.XtraBars.Ribbon.RibbonStatusBar() Me.RibbonPage2 = New DevExpress.XtraBars.Ribbon.RibbonPage() Me.PanelControl1 = New DevExpress.XtraEditors.PanelControl() Me.PanelControl2 = New DevExpress.XtraEditors.PanelControl() Me.LayoutControl1 = New DevExpress.XtraLayout.LayoutControl() - Me.TokenEditEx1 = New DigitalData.GUIs.ZooFlow.TokenEditEx() - Me.GridPredefinedSearches = New DevExpress.XtraGrid.GridControl() - Me.TileView1 = New DevExpress.XtraGrid.Views.Tile.TileView() - Me.colCount = New DevExpress.XtraGrid.Columns.TileViewColumn() - Me.GridView1 = New DevExpress.XtraGrid.Views.Grid.GridView() + Me.txtSearchInput = New DigitalData.GUIs.ZooFlow.TokenEditEx() + Me.GridSearches = New DevExpress.XtraGrid.GridControl() + Me.ViewSearches = New DevExpress.XtraGrid.Views.Tile.TileView() + Me.colGroupText = New DevExpress.XtraGrid.Columns.TileViewColumn() Me.DateEditFrom = New DevExpress.XtraEditors.DateEdit() Me.DateEditTo = New DevExpress.XtraEditors.DateEdit() Me.CheckEdit1 = New DevExpress.XtraEditors.ToggleSwitch() @@ -80,10 +87,9 @@ Partial Class frmFlowSearch2 Me.PanelControl2.SuspendLayout() CType(Me.LayoutControl1, System.ComponentModel.ISupportInitialize).BeginInit() Me.LayoutControl1.SuspendLayout() - CType(Me.TokenEditEx1.Properties, System.ComponentModel.ISupportInitialize).BeginInit() - CType(Me.GridPredefinedSearches, System.ComponentModel.ISupportInitialize).BeginInit() - CType(Me.TileView1, System.ComponentModel.ISupportInitialize).BeginInit() - CType(Me.GridView1, System.ComponentModel.ISupportInitialize).BeginInit() + CType(Me.txtSearchInput.Properties, System.ComponentModel.ISupportInitialize).BeginInit() + CType(Me.GridSearches, System.ComponentModel.ISupportInitialize).BeginInit() + CType(Me.ViewSearches, System.ComponentModel.ISupportInitialize).BeginInit() CType(Me.DateEditFrom.Properties.CalendarTimeProperties, System.ComponentModel.ISupportInitialize).BeginInit() CType(Me.DateEditFrom.Properties, System.ComponentModel.ISupportInitialize).BeginInit() CType(Me.DateEditTo.Properties.CalendarTimeProperties, System.ComponentModel.ISupportInitialize).BeginInit() @@ -111,6 +117,14 @@ Partial Class frmFlowSearch2 Me.colName.Visible = True Me.colName.VisibleIndex = 0 ' + 'colImage + ' + Me.colImage.Caption = "Image" + Me.colImage.FieldName = "Image" + Me.colImage.Name = "colImage" + Me.colImage.Visible = True + Me.colImage.VisibleIndex = 2 + ' 'colDescription ' Me.colDescription.Caption = "Beschreibung" @@ -119,21 +133,13 @@ Partial Class frmFlowSearch2 Me.colDescription.Visible = True Me.colDescription.VisibleIndex = 1 ' - 'colImage - ' - Me.colImage.Caption = "Image" - Me.colImage.FieldName = "Image" - Me.colImage.Name = "colImage" - Me.colImage.Visible = True - Me.colImage.VisibleIndex = 3 - ' 'RibbonControl1 ' Me.RibbonControl1.ColorScheme = DevExpress.XtraBars.Ribbon.RibbonControlColorScheme.Green Me.RibbonControl1.ExpandCollapseItem.Id = 0 - Me.RibbonControl1.Items.AddRange(New DevExpress.XtraBars.BarItem() {Me.RibbonControl1.ExpandCollapseItem, Me.RibbonControl1.SearchEditItem, Me.lblResults, Me.chkOperatorAnd, Me.chkOperatorOr, Me.chkDatefilter2, Me.BarCheckItem4, Me.chkSearchEverywhere, Me.BarButtonItem1, Me.BarButtonItem2}) + Me.RibbonControl1.Items.AddRange(New DevExpress.XtraBars.BarItem() {Me.RibbonControl1.ExpandCollapseItem, Me.RibbonControl1.SearchEditItem, Me.lblResults, Me.chkOperatorAnd, Me.chkOperatorOr, Me.chkDatefilter2, Me.BarCheckItem4, Me.chkSearchEverywhere, Me.BarButtonItem1, Me.BarButtonItem2, Me.btnSaveSearch}) Me.RibbonControl1.Location = New System.Drawing.Point(0, 0) - Me.RibbonControl1.MaxItemId = 23 + Me.RibbonControl1.MaxItemId = 24 Me.RibbonControl1.Name = "RibbonControl1" Me.RibbonControl1.Pages.AddRange(New DevExpress.XtraBars.Ribbon.RibbonPage() {Me.RibbonPage1}) Me.RibbonControl1.RepositoryItems.AddRange(New DevExpress.XtraEditors.Repository.RepositoryItem() {Me.RepositoryItemMarqueeProgressBar1}) @@ -207,9 +213,16 @@ Partial Class frmFlowSearch2 Me.BarButtonItem2.ImageOptions.SvgImage = Global.DigitalData.GUIs.ZooFlow.My.Resources.Resources.undo Me.BarButtonItem2.Name = "BarButtonItem2" ' + 'btnSaveSearch + ' + Me.btnSaveSearch.Caption = "Aktuelle Eingabe als Suche speichern" + Me.btnSaveSearch.Id = 23 + Me.btnSaveSearch.ImageOptions.SvgImage = Global.DigitalData.GUIs.ZooFlow.My.Resources.Resources.bo_security_permission_action + Me.btnSaveSearch.Name = "btnSaveSearch" + ' 'RibbonPage1 ' - Me.RibbonPage1.Groups.AddRange(New DevExpress.XtraBars.Ribbon.RibbonPageGroup() {Me.RibbonPageGroup1, Me.RibbonPageGroup2, Me.RibbonPageGroup5}) + Me.RibbonPage1.Groups.AddRange(New DevExpress.XtraBars.Ribbon.RibbonPageGroup() {Me.RibbonPageGroup1, Me.RibbonPageGroup2, Me.RibbonPageGroup5, Me.RibbonPageGroup3}) Me.RibbonPage1.Name = "RibbonPage1" Me.RibbonPage1.Text = "Suche" ' @@ -230,11 +243,19 @@ Partial Class frmFlowSearch2 ' 'RibbonPageGroup5 ' + Me.RibbonPageGroup5.Enabled = False Me.RibbonPageGroup5.ItemLinks.Add(Me.chkOperatorAnd) Me.RibbonPageGroup5.ItemLinks.Add(Me.chkOperatorOr) Me.RibbonPageGroup5.Name = "RibbonPageGroup5" Me.RibbonPageGroup5.Text = "Begriffsverknüpfung" ' + 'RibbonPageGroup3 + ' + Me.RibbonPageGroup3.Enabled = False + Me.RibbonPageGroup3.ItemLinks.Add(Me.btnSaveSearch) + Me.RibbonPageGroup3.Name = "RibbonPageGroup3" + Me.RibbonPageGroup3.Text = "Eigene Suchen" + ' 'RepositoryItemMarqueeProgressBar1 ' Me.RepositoryItemMarqueeProgressBar1.Name = "RepositoryItemMarqueeProgressBar1" @@ -243,7 +264,7 @@ Partial Class frmFlowSearch2 ' Me.RibbonStatusBar1.BackColor = System.Drawing.Color.Red Me.RibbonStatusBar1.ItemLinks.Add(Me.lblResults) - Me.RibbonStatusBar1.Location = New System.Drawing.Point(0, 639) + Me.RibbonStatusBar1.Location = New System.Drawing.Point(0, 672) Me.RibbonStatusBar1.Name = "RibbonStatusBar1" Me.RibbonStatusBar1.Ribbon = Me.RibbonControl1 Me.RibbonStatusBar1.Size = New System.Drawing.Size(954, 24) @@ -260,7 +281,7 @@ Partial Class frmFlowSearch2 Me.PanelControl1.Location = New System.Drawing.Point(0, 158) Me.PanelControl1.Name = "PanelControl1" Me.PanelControl1.Padding = New System.Windows.Forms.Padding(30) - Me.PanelControl1.Size = New System.Drawing.Size(954, 481) + Me.PanelControl1.Size = New System.Drawing.Size(954, 514) Me.PanelControl1.TabIndex = 3 ' 'PanelControl2 @@ -270,14 +291,14 @@ Partial Class frmFlowSearch2 Me.PanelControl2.Location = New System.Drawing.Point(32, 32) Me.PanelControl2.Margin = New System.Windows.Forms.Padding(0) Me.PanelControl2.Name = "PanelControl2" - Me.PanelControl2.Size = New System.Drawing.Size(890, 417) + Me.PanelControl2.Size = New System.Drawing.Size(890, 450) Me.PanelControl2.TabIndex = 3 ' 'LayoutControl1 ' Me.LayoutControl1.BackColor = System.Drawing.Color.FromArgb(CType(CType(240, Byte), Integer), CType(CType(240, Byte), Integer), CType(CType(240, Byte), Integer)) - Me.LayoutControl1.Controls.Add(Me.TokenEditEx1) - Me.LayoutControl1.Controls.Add(Me.GridPredefinedSearches) + Me.LayoutControl1.Controls.Add(Me.txtSearchInput) + Me.LayoutControl1.Controls.Add(Me.GridSearches) Me.LayoutControl1.Controls.Add(Me.DateEditFrom) Me.LayoutControl1.Controls.Add(Me.DateEditTo) Me.LayoutControl1.Controls.Add(Me.CheckEdit1) @@ -288,63 +309,95 @@ Partial Class frmFlowSearch2 Me.LayoutControl1.OptionsView.GroupStyle = DevExpress.Utils.GroupStyle.Title Me.LayoutControl1.OptionsView.ItemBorderColor = System.Drawing.Color.Transparent Me.LayoutControl1.Root = Me.Root - Me.LayoutControl1.Size = New System.Drawing.Size(886, 413) + Me.LayoutControl1.Size = New System.Drawing.Size(886, 446) Me.LayoutControl1.TabIndex = 0 Me.LayoutControl1.Text = "LayoutControl1" ' - 'TokenEditEx1 + 'txtSearchInput ' - Me.TokenEditEx1.Location = New System.Drawing.Point(10, 10) - Me.TokenEditEx1.MenuManager = Me.RibbonControl1 - Me.TokenEditEx1.Name = "TokenEditEx1" - Me.TokenEditEx1.Properties.Appearance.BackColor = System.Drawing.Color.White - Me.TokenEditEx1.Properties.Appearance.Font = New System.Drawing.Font("Segoe UI", 15.75!, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, CType(0, Byte)) - Me.TokenEditEx1.Properties.Appearance.Options.UseBackColor = True - Me.TokenEditEx1.Properties.Appearance.Options.UseFont = True - Me.TokenEditEx1.Properties.NullText = "Suchbegriff eingeben.." - Me.TokenEditEx1.Properties.PopupFilterMode = DevExpress.XtraEditors.TokenEditPopupFilterMode.Contains - Me.TokenEditEx1.Properties.Separators.AddRange(New String() {","}) - Me.TokenEditEx1.Properties.ShowDropDownOnClick = DevExpress.Utils.DefaultBoolean.[False] - Me.TokenEditEx1.Size = New System.Drawing.Size(866, 44) - Me.TokenEditEx1.StyleController = Me.LayoutControl1 - Me.TokenEditEx1.TabIndex = 4 + Me.txtSearchInput.Location = New System.Drawing.Point(10, 10) + Me.txtSearchInput.MenuManager = Me.RibbonControl1 + Me.txtSearchInput.Name = "txtSearchInput" + Me.txtSearchInput.Properties.Appearance.BackColor = System.Drawing.Color.White + Me.txtSearchInput.Properties.Appearance.Font = New System.Drawing.Font("Segoe UI", 15.75!, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, CType(0, Byte)) + Me.txtSearchInput.Properties.Appearance.Options.UseBackColor = True + Me.txtSearchInput.Properties.Appearance.Options.UseFont = True + Me.txtSearchInput.Properties.NullText = "Suchbegriff eingeben.." + Me.txtSearchInput.Properties.PopupFilterMode = DevExpress.XtraEditors.TokenEditPopupFilterMode.Contains + Me.txtSearchInput.Properties.Separators.AddRange(New String() {","}) + Me.txtSearchInput.Properties.ShowDropDownOnClick = DevExpress.Utils.DefaultBoolean.[False] + Me.txtSearchInput.Size = New System.Drawing.Size(866, 44) + Me.txtSearchInput.StyleController = Me.LayoutControl1 + Me.txtSearchInput.TabIndex = 4 ' - 'GridPredefinedSearches + 'GridSearches ' - Me.GridPredefinedSearches.Location = New System.Drawing.Point(14, 100) - Me.GridPredefinedSearches.MainView = Me.TileView1 - Me.GridPredefinedSearches.MenuManager = Me.RibbonControl1 - Me.GridPredefinedSearches.Name = "GridPredefinedSearches" - Me.GridPredefinedSearches.Size = New System.Drawing.Size(858, 93) - Me.GridPredefinedSearches.TabIndex = 1 - Me.GridPredefinedSearches.ViewCollection.AddRange(New DevExpress.XtraGrid.Views.Base.BaseView() {Me.TileView1, Me.GridView1}) + Me.GridSearches.Location = New System.Drawing.Point(14, 100) + Me.GridSearches.MainView = Me.ViewSearches + Me.GridSearches.MenuManager = Me.RibbonControl1 + Me.GridSearches.Name = "GridSearches" + Me.GridSearches.Size = New System.Drawing.Size(858, 184) + Me.GridSearches.TabIndex = 1 + Me.GridSearches.ViewCollection.AddRange(New DevExpress.XtraGrid.Views.Base.BaseView() {Me.ViewSearches}) ' - 'TileView1 + 'ViewSearches ' - Me.TileView1.Columns.AddRange(New DevExpress.XtraGrid.Columns.GridColumn() {Me.colName, Me.colDescription, Me.colCount, Me.colImage}) - Me.TileView1.GridControl = Me.GridPredefinedSearches - Me.TileView1.Name = "TileView1" - Me.TileView1.OptionsTiles.AllowItemHover = True - Me.TileView1.OptionsTiles.ItemSize = New System.Drawing.Size(190, 80) - Me.TileView1.OptionsTiles.Orientation = System.Windows.Forms.Orientation.Vertical - Me.TileView1.OptionsTiles.RowCount = 2 - Me.TileView1.OptionsTiles.VerticalContentAlignment = DevExpress.Utils.VertAlignment.Center - TableColumnDefinition3.Length.Value = 35.0R + Me.ViewSearches.Columns.AddRange(New DevExpress.XtraGrid.Columns.GridColumn() {Me.colName, Me.colDescription, Me.colImage, Me.colGroupText}) + Me.ViewSearches.ColumnSet.GroupColumn = Me.colGroupText + Me.ViewSearches.GridControl = Me.GridSearches + Me.ViewSearches.Name = "ViewSearches" + Me.ViewSearches.OptionsTiles.AllowItemHover = True + Me.ViewSearches.OptionsTiles.IndentBetweenGroups = 20 + Me.ViewSearches.OptionsTiles.ItemPadding = New System.Windows.Forms.Padding(10, 4, 10, 4) + Me.ViewSearches.OptionsTiles.ItemSize = New System.Drawing.Size(170, 70) + Me.ViewSearches.OptionsTiles.Orientation = System.Windows.Forms.Orientation.Vertical + Me.ViewSearches.OptionsTiles.RowCount = 2 + Me.ViewSearches.OptionsTiles.VerticalContentAlignment = DevExpress.Utils.VertAlignment.Center + Me.ViewSearches.SortInfo.AddRange(New DevExpress.XtraGrid.Columns.GridColumnSortInfo() {New DevExpress.XtraGrid.Columns.GridColumnSortInfo(Me.colGroupText, DevExpress.Data.ColumnSortOrder.Ascending)}) + TableColumnDefinition1.Length.Value = 35.0R + TableColumnDefinition1.PaddingRight = 5 + TableColumnDefinition2.Length.Value = 129.0R + ItemTemplate1.Columns.Add(TableColumnDefinition1) + ItemTemplate1.Columns.Add(TableColumnDefinition2) + TileViewItemElement1.Column = Me.colName + TileViewItemElement1.ColumnIndex = 1 + TileViewItemElement1.ImageOptions.ImageAlignment = DevExpress.XtraEditors.TileItemContentAlignment.MiddleCenter + TileViewItemElement1.ImageOptions.ImageScaleMode = DevExpress.XtraEditors.TileItemImageScaleMode.Squeeze + TileViewItemElement1.Text = "colName" + TileViewItemElement1.TextAlignment = DevExpress.XtraEditors.TileItemContentAlignment.MiddleCenter + TileViewItemElement2.Column = Me.colImage + TileViewItemElement2.ImageOptions.ImageAlignment = DevExpress.XtraEditors.TileItemContentAlignment.MiddleCenter + TileViewItemElement2.ImageOptions.ImageScaleMode = DevExpress.XtraEditors.TileItemImageScaleMode.Squeeze + TileViewItemElement2.Text = "colImage" + TileViewItemElement2.TextAlignment = DevExpress.XtraEditors.TileItemContentAlignment.MiddleCenter + ItemTemplate1.Elements.Add(TileViewItemElement1) + ItemTemplate1.Elements.Add(TileViewItemElement2) + ItemTemplate1.Name = "DefaultSmall" + TableRowDefinition1.Length.Value = 43.0R + ItemTemplate1.Rows.Add(TableRowDefinition1) + Me.ViewSearches.Templates.Add(ItemTemplate1) + TableColumnDefinition3.Length.Value = 30.0R TableColumnDefinition3.PaddingRight = 5 TableColumnDefinition4.Length.Value = 129.0R - Me.TileView1.TileColumns.Add(TableColumnDefinition3) - Me.TileView1.TileColumns.Add(TableColumnDefinition4) - TableRowDefinition3.Length.Value = 21.0R - TableRowDefinition4.Length.Value = 43.0R - Me.TileView1.TileRows.Add(TableRowDefinition3) - Me.TileView1.TileRows.Add(TableRowDefinition4) - TileViewItemElement4.Appearance.Normal.Font = New System.Drawing.Font("Segoe UI", 9.75!, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, CType(0, Byte)) - TileViewItemElement4.Appearance.Normal.Options.UseFont = True - TileViewItemElement4.Column = Me.colName - TileViewItemElement4.ColumnIndex = 1 + Me.ViewSearches.TileColumns.Add(TableColumnDefinition3) + Me.ViewSearches.TileColumns.Add(TableColumnDefinition4) + TableRowDefinition2.Length.Value = 17.0R + TableRowDefinition3.Length.Value = 45.0R + Me.ViewSearches.TileRows.Add(TableRowDefinition2) + Me.ViewSearches.TileRows.Add(TableRowDefinition3) + TileViewItemElement3.Appearance.Normal.Font = New System.Drawing.Font("Tahoma", 8.25!, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, CType(0, Byte)) + TileViewItemElement3.Appearance.Normal.Options.UseFont = True + TileViewItemElement3.Column = Me.colName + TileViewItemElement3.ColumnIndex = 1 + TileViewItemElement3.ImageOptions.ImageAlignment = DevExpress.XtraEditors.TileItemContentAlignment.MiddleCenter + TileViewItemElement3.ImageOptions.ImageScaleMode = DevExpress.XtraEditors.TileItemImageScaleMode.Squeeze + TileViewItemElement3.Text = "colName" + TileViewItemElement3.TextAlignment = DevExpress.XtraEditors.TileItemContentAlignment.MiddleCenter + TileViewItemElement4.Column = Me.colImage TileViewItemElement4.ImageOptions.ImageAlignment = DevExpress.XtraEditors.TileItemContentAlignment.MiddleCenter TileViewItemElement4.ImageOptions.ImageScaleMode = DevExpress.XtraEditors.TileItemImageScaleMode.Squeeze - TileViewItemElement4.Text = "colName" + TileViewItemElement4.RowIndex = 1 + TileViewItemElement4.Text = "colImage" TileViewItemElement4.TextAlignment = DevExpress.XtraEditors.TileItemContentAlignment.MiddleCenter TileViewItemElement5.Column = Me.colDescription TileViewItemElement5.ColumnIndex = 1 @@ -353,33 +406,22 @@ Partial Class frmFlowSearch2 TileViewItemElement5.RowIndex = 1 TileViewItemElement5.Text = "colDescription" TileViewItemElement5.TextAlignment = DevExpress.XtraEditors.TileItemContentAlignment.MiddleCenter - TileViewItemElement6.Column = Me.colImage - TileViewItemElement6.ImageOptions.ImageAlignment = DevExpress.XtraEditors.TileItemContentAlignment.MiddleCenter - TileViewItemElement6.ImageOptions.ImageScaleMode = DevExpress.XtraEditors.TileItemImageScaleMode.Squeeze - TileViewItemElement6.RowIndex = 1 - TileViewItemElement6.Text = "colImage" - TileViewItemElement6.TextAlignment = DevExpress.XtraEditors.TileItemContentAlignment.MiddleCenter - Me.TileView1.TileTemplate.Add(TileViewItemElement4) - Me.TileView1.TileTemplate.Add(TileViewItemElement5) - Me.TileView1.TileTemplate.Add(TileViewItemElement6) + Me.ViewSearches.TileTemplate.Add(TileViewItemElement3) + Me.ViewSearches.TileTemplate.Add(TileViewItemElement4) + Me.ViewSearches.TileTemplate.Add(TileViewItemElement5) ' - 'colCount + 'colGroupText ' - Me.colCount.Caption = "Anzahl" - Me.colCount.FieldName = "Count" - Me.colCount.Name = "colCount" - Me.colCount.Visible = True - Me.colCount.VisibleIndex = 2 - ' - 'GridView1 - ' - Me.GridView1.GridControl = Me.GridPredefinedSearches - Me.GridView1.Name = "GridView1" + Me.colGroupText.Caption = "Gruppe" + Me.colGroupText.FieldName = "GroupText" + Me.colGroupText.Name = "colGroupText" + Me.colGroupText.Visible = True + Me.colGroupText.VisibleIndex = 3 ' 'DateEditFrom ' Me.DateEditFrom.EditValue = Nothing - Me.DateEditFrom.Location = New System.Drawing.Point(95, 236) + Me.DateEditFrom.Location = New System.Drawing.Point(95, 327) Me.DateEditFrom.MenuManager = Me.RibbonControl1 Me.DateEditFrom.Name = "DateEditFrom" Me.DateEditFrom.Properties.Buttons.AddRange(New DevExpress.XtraEditors.Controls.EditorButton() {New DevExpress.XtraEditors.Controls.EditorButton(DevExpress.XtraEditors.Controls.ButtonPredefines.Combo)}) @@ -391,7 +433,7 @@ Partial Class frmFlowSearch2 'DateEditTo ' Me.DateEditTo.EditValue = Nothing - Me.DateEditTo.Location = New System.Drawing.Point(95, 288) + Me.DateEditTo.Location = New System.Drawing.Point(95, 379) Me.DateEditTo.MenuManager = Me.RibbonControl1 Me.DateEditTo.Name = "DateEditTo" Me.DateEditTo.Properties.Buttons.AddRange(New DevExpress.XtraEditors.Controls.EditorButton() {New DevExpress.XtraEditors.Controls.EditorButton(DevExpress.XtraEditors.Controls.ButtonPredefines.Combo)}) @@ -402,7 +444,7 @@ Partial Class frmFlowSearch2 ' 'CheckEdit1 ' - Me.CheckEdit1.Location = New System.Drawing.Point(4, 263) + Me.CheckEdit1.Location = New System.Drawing.Point(4, 354) Me.CheckEdit1.MenuManager = Me.RibbonControl1 Me.CheckEdit1.Name = "CheckEdit1" Me.CheckEdit1.Properties.OffText = "Datum bis deaktiviert" @@ -413,7 +455,7 @@ Partial Class frmFlowSearch2 ' 'ComboBoxDateAttributes ' - Me.ComboBoxDateAttributes.Location = New System.Drawing.Point(95, 318) + Me.ComboBoxDateAttributes.Location = New System.Drawing.Point(95, 409) Me.ComboBoxDateAttributes.MenuManager = Me.RibbonControl1 Me.ComboBoxDateAttributes.Name = "ComboBoxDateAttributes" Me.ComboBoxDateAttributes.Properties.Buttons.AddRange(New DevExpress.XtraEditors.Controls.EditorButton() {New DevExpress.XtraEditors.Controls.EditorButton(DevExpress.XtraEditors.Controls.ButtonPredefines.Combo)}) @@ -428,7 +470,7 @@ Partial Class frmFlowSearch2 Me.Root.Items.AddRange(New DevExpress.XtraLayout.BaseLayoutItem() {Me.LayoutControlGroupDate2, Me.LayoutControlGroup3, Me.LayoutControlItem7}) Me.Root.Name = "Root" Me.Root.Padding = New DevExpress.XtraLayout.Utils.Padding(0, 0, 0, 0) - Me.Root.Size = New System.Drawing.Size(886, 413) + Me.Root.Size = New System.Drawing.Size(886, 446) Me.Root.TextVisible = False ' 'LayoutControlGroupDate2 @@ -439,10 +481,10 @@ Partial Class frmFlowSearch2 Me.LayoutControlGroupDate2.AppearanceGroup.Options.UseBorderColor = True Me.LayoutControlGroupDate2.BestFitWeight = 0 Me.LayoutControlGroupDate2.Items.AddRange(New DevExpress.XtraLayout.BaseLayoutItem() {Me.LayoutControlItem2, Me.LayoutControlItem4, Me.EmptySpaceItem1, Me.LayoutControlItem6, Me.LayoutControlItem8}) - Me.LayoutControlGroupDate2.Location = New System.Drawing.Point(0, 207) + Me.LayoutControlGroupDate2.Location = New System.Drawing.Point(0, 298) Me.LayoutControlGroupDate2.Name = "LayoutControlGroupDate2" Me.LayoutControlGroupDate2.Padding = New DevExpress.XtraLayout.Utils.Padding(0, 0, 0, 0) - Me.LayoutControlGroupDate2.Size = New System.Drawing.Size(886, 206) + Me.LayoutControlGroupDate2.Size = New System.Drawing.Size(886, 148) Me.LayoutControlGroupDate2.Text = "Eigenes Datum" Me.LayoutControlGroupDate2.Visibility = DevExpress.XtraLayout.Utils.LayoutVisibility.Never ' @@ -472,7 +514,7 @@ Partial Class frmFlowSearch2 Me.EmptySpaceItem1.AllowHotTrack = False Me.EmptySpaceItem1.Location = New System.Drawing.Point(0, 112) Me.EmptySpaceItem1.Name = "EmptySpaceItem1" - Me.EmptySpaceItem1.Size = New System.Drawing.Size(882, 68) + Me.EmptySpaceItem1.Size = New System.Drawing.Size(882, 10) Me.EmptySpaceItem1.TextSize = New System.Drawing.Size(0, 0) ' 'LayoutControlItem6 @@ -501,21 +543,21 @@ Partial Class frmFlowSearch2 Me.LayoutControlGroup3.Items.AddRange(New DevExpress.XtraLayout.BaseLayoutItem() {Me.LayoutControlItem3}) Me.LayoutControlGroup3.Location = New System.Drawing.Point(0, 64) Me.LayoutControlGroup3.Name = "LayoutControlGroup3" - Me.LayoutControlGroup3.Size = New System.Drawing.Size(886, 143) + Me.LayoutControlGroup3.Size = New System.Drawing.Size(886, 234) Me.LayoutControlGroup3.Text = "Meine Suchen" ' 'LayoutControlItem3 ' - Me.LayoutControlItem3.Control = Me.GridPredefinedSearches + Me.LayoutControlItem3.Control = Me.GridSearches Me.LayoutControlItem3.Location = New System.Drawing.Point(0, 0) Me.LayoutControlItem3.Name = "LayoutControlItem3" - Me.LayoutControlItem3.Size = New System.Drawing.Size(862, 97) + Me.LayoutControlItem3.Size = New System.Drawing.Size(862, 188) Me.LayoutControlItem3.TextSize = New System.Drawing.Size(0, 0) Me.LayoutControlItem3.TextVisible = False ' 'LayoutControlItem7 ' - Me.LayoutControlItem7.Control = Me.TokenEditEx1 + Me.LayoutControlItem7.Control = Me.txtSearchInput Me.LayoutControlItem7.Location = New System.Drawing.Point(0, 0) Me.LayoutControlItem7.Name = "LayoutControlItem7" Me.LayoutControlItem7.Padding = New DevExpress.XtraLayout.Utils.Padding(10, 10, 10, 10) @@ -525,22 +567,23 @@ Partial Class frmFlowSearch2 ' 'SvgImageCollection1 ' - Me.SvgImageCollection1.Add("yesterday", "image://svgimages/scheduling/dayview.svg") + Me.SvgImageCollection1.Add("today", "image://svgimages/scheduling/dayview.svg") Me.SvgImageCollection1.Add("month", "image://svgimages/scheduling/monthview.svg") Me.SvgImageCollection1.Add("week", "image://svgimages/scheduling/next7days.svg") Me.SvgImageCollection1.Add("year", "image://svgimages/scheduling/groupbynone.svg") - Me.SvgImageCollection1.Add("today", "image://svgimages/scheduling/today.svg") + Me.SvgImageCollection1.Add("yesterday", "image://svgimages/scheduling/today.svg") + Me.SvgImageCollection1.Add("invoice", "image://svgimages/business objects/bo_invoice.svg") ' - 'frmFlowSearch2 + 'frmSearchFlow ' Me.AutoScaleDimensions = New System.Drawing.SizeF(6.0!, 13.0!) Me.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font - Me.ClientSize = New System.Drawing.Size(954, 663) + Me.ClientSize = New System.Drawing.Size(954, 696) Me.Controls.Add(Me.PanelControl1) Me.Controls.Add(Me.RibbonStatusBar1) Me.Controls.Add(Me.RibbonControl1) Me.IconOptions.SvgImage = Global.DigitalData.GUIs.ZooFlow.My.Resources.Resources.ZooFlow_CW_DevExpress - Me.Name = "frmFlowSearch2" + Me.Name = "frmSearchFlow" Me.Ribbon = Me.RibbonControl1 Me.StatusBar = Me.RibbonStatusBar1 Me.Text = "Search Flow" @@ -552,10 +595,9 @@ Partial Class frmFlowSearch2 Me.PanelControl2.ResumeLayout(False) CType(Me.LayoutControl1, System.ComponentModel.ISupportInitialize).EndInit() Me.LayoutControl1.ResumeLayout(False) - CType(Me.TokenEditEx1.Properties, System.ComponentModel.ISupportInitialize).EndInit() - CType(Me.GridPredefinedSearches, System.ComponentModel.ISupportInitialize).EndInit() - CType(Me.TileView1, System.ComponentModel.ISupportInitialize).EndInit() - CType(Me.GridView1, System.ComponentModel.ISupportInitialize).EndInit() + CType(Me.txtSearchInput.Properties, System.ComponentModel.ISupportInitialize).EndInit() + CType(Me.GridSearches, System.ComponentModel.ISupportInitialize).EndInit() + CType(Me.ViewSearches, System.ComponentModel.ISupportInitialize).EndInit() CType(Me.DateEditFrom.Properties.CalendarTimeProperties, System.ComponentModel.ISupportInitialize).EndInit() CType(Me.DateEditFrom.Properties, System.ComponentModel.ISupportInitialize).EndInit() CType(Me.DateEditTo.Properties.CalendarTimeProperties, System.ComponentModel.ISupportInitialize).EndInit() @@ -586,12 +628,10 @@ Partial Class frmFlowSearch2 Friend WithEvents PanelControl2 As DevExpress.XtraEditors.PanelControl Friend WithEvents LayoutControl1 As DevExpress.XtraLayout.LayoutControl Friend WithEvents Root As DevExpress.XtraLayout.LayoutControlGroup - Friend WithEvents GridPredefinedSearches As DevExpress.XtraGrid.GridControl - Friend WithEvents TileView1 As DevExpress.XtraGrid.Views.Tile.TileView + Friend WithEvents GridSearches As DevExpress.XtraGrid.GridControl + Friend WithEvents ViewSearches As DevExpress.XtraGrid.Views.Tile.TileView Friend WithEvents colName As DevExpress.XtraGrid.Columns.TileViewColumn Friend WithEvents colDescription As DevExpress.XtraGrid.Columns.TileViewColumn - Friend WithEvents colCount As DevExpress.XtraGrid.Columns.TileViewColumn - Friend WithEvents GridView1 As DevExpress.XtraGrid.Views.Grid.GridView Friend WithEvents DateEditFrom As DevExpress.XtraEditors.DateEdit Friend WithEvents LayoutControlGroupDate2 As DevExpress.XtraLayout.LayoutControlGroup Friend WithEvents LayoutControlItem2 As DevExpress.XtraLayout.LayoutControlItem @@ -606,7 +646,7 @@ Partial Class frmFlowSearch2 Friend WithEvents RepositoryItemMarqueeProgressBar1 As DevExpress.XtraEditors.Repository.RepositoryItemMarqueeProgressBar Friend WithEvents SvgImageCollection1 As DevExpress.Utils.SvgImageCollection Friend WithEvents colImage As DevExpress.XtraGrid.Columns.TileViewColumn - Friend WithEvents TokenEditEx1 As TokenEditEx + Friend WithEvents txtSearchInput As TokenEditEx Friend WithEvents LayoutControlItem7 As DevExpress.XtraLayout.LayoutControlItem Friend WithEvents ComboBoxDateAttributes As DevExpress.XtraEditors.ComboBoxEdit Friend WithEvents LayoutControlItem8 As DevExpress.XtraLayout.LayoutControlItem @@ -620,4 +660,7 @@ Partial Class frmFlowSearch2 Friend WithEvents BarButtonItem1 As DevExpress.XtraBars.BarButtonItem Friend WithEvents BarButtonItem2 As DevExpress.XtraBars.BarButtonItem Friend WithEvents RibbonPageGroup1 As DevExpress.XtraBars.Ribbon.RibbonPageGroup + Friend WithEvents colGroupText As DevExpress.XtraGrid.Columns.TileViewColumn + Friend WithEvents btnSaveSearch As DevExpress.XtraBars.BarButtonItem + Friend WithEvents RibbonPageGroup3 As DevExpress.XtraBars.Ribbon.RibbonPageGroup End Class diff --git a/GUIs.ZooFlow/Search/frmFlowSearch2.resx b/GUIs.ZooFlow/Search/frmSearchFlow.resx similarity index 100% rename from GUIs.ZooFlow/Search/frmFlowSearch2.resx rename to GUIs.ZooFlow/Search/frmSearchFlow.resx diff --git a/GUIs.ZooFlow/Search/frmFlowSearch2.vb b/GUIs.ZooFlow/Search/frmSearchFlow.vb similarity index 74% rename from GUIs.ZooFlow/Search/frmFlowSearch2.vb rename to GUIs.ZooFlow/Search/frmSearchFlow.vb index d9d53bfc..a825326e 100644 --- a/GUIs.ZooFlow/Search/frmFlowSearch2.vb +++ b/GUIs.ZooFlow/Search/frmSearchFlow.vb @@ -12,9 +12,10 @@ Imports DigitalData.GUIs.ZooFlow.Search.SearchToken Imports DigitalData.Modules.Language Imports DigitalData.Modules.Logging -Public Class frmFlowSearch2 +Public Class frmSearchFlow Private ReadOnly LogConfig As LogConfig = My.LogConfig Private ReadOnly Logger = My.LogConfig.GetLogger() + Private SearchLoader As SearchLoader Private SearchRunner As SearchRunner Private TokenTable As DataTable = Nothing @@ -25,7 +26,7 @@ Public Class frmFlowSearch2 Private TokenListAttrValues As New Dictionary(Of String, Object) Private Sub frmFlowSearch2_Load(sender As Object, e As EventArgs) Handles MyBase.Load - + SearchLoader = New SearchLoader(My.LogConfig, My.UIConfigManager, SvgImageCollection1) SearchRunner = New SearchRunner(My.LogConfig, My.Application.GetEnvironment, "FlowSearch") With { .BaseSearchSQL = SQL_FLOW_SEARCH_BASE } @@ -34,12 +35,15 @@ Public Class frmFlowSearch2 ComboBoxDateAttributes.Properties.Items.AddRange(LoadDateAttributes()) ComboBoxDateAttributes.SelectedIndex = 0 - GridPredefinedSearches.DataSource = LoadPredefinedSearches() + Dim oSearchBindingList As New BindingSource() With { + .DataSource = SearchLoader.LoadSearches() + } + GridSearches.DataSource = oSearchBindingList Dim oTokens = GetTokensFromTable(Of AttributeValueToken)(TokenTable) - AddTokens(TokenEditEx1, oTokens) + AddTokens(txtSearchInput, oTokens) - TileView1.FocusedRowHandle = GridControl.InvalidRowHandle + ViewSearches.FocusedRowHandle = GridControl.InvalidRowHandle FormLoading = False End Sub @@ -97,65 +101,20 @@ Public Class frmFlowSearch2 End Function - Private Function LoadPredefinedSearches() As List(Of PredefinedSearch) - Return New List(Of PredefinedSearch) From { - New PredefinedDateSearch() With { - .Name = "Heute", - .Description = "Dokumente, die heute abgelegt wurden", - .DateConstraint = SearchRunner.DateConstraint.Today, - .Image = SvgImageCollection1.Item("today") - }, - New PredefinedDateSearch() With { - .Name = "Gestern", - .Description = "Dokumente, die gestern abgelegt wurden", - .DateConstraint = SearchRunner.DateConstraint.Yesterday, - .Image = SvgImageCollection1.Item("yesterday") - }, - New PredefinedDateSearch() With { - .Name = "Letzte 7 Tage", - .Description = "Dokumente, die in den letzten 7 Tagen abgelegt wurden", - .DateConstraint = SearchRunner.DateConstraint.Last7Days, - .Image = SvgImageCollection1.Item("week") - }, - New PredefinedDateSearch() With { - .Name = "Dieser Monat", - .Description = "Dokumente, die in diesem Monat abgelegt wurden", - .DateConstraint = SearchRunner.DateConstraint.CurrentMonth, - .Image = SvgImageCollection1.Item("month") - }, - New PredefinedDateSearch() With { - .Name = "Letzter Monat", - .Description = "Dokumente, die im letzten Monat abgelegt wurden", - .DateConstraint = SearchRunner.DateConstraint.LastMonth, - .Image = SvgImageCollection1.Item("month") - }, - New PredefinedDateSearch() With { - .Name = "Dieses Jahr", - .Description = "Dokumente, die in diesem Jahr abgelegt wurden", - .DateConstraint = SearchRunner.DateConstraint.CurrentYear, - .Image = SvgImageCollection1.Item("year") - }, - New PredefinedDateSearch() With { - .Name = "Letztes Jahr", - .Description = "Dokumente, die im letzten Jahr abgelegt wurden", - .DateConstraint = SearchRunner.DateConstraint.LastYear, - .Image = SvgImageCollection1.Item("year") - } - } - End Function + Private Function GetTokens() As IEnumerable(Of Token) - Dim oTokens = TokenEditEx1.GetTokenList() + Dim oTokens = txtSearchInput.GetTokenList() Return oTokens.Select(Of Token)(Function(token) token.Value).ToList() End Function - Private Async Sub SearchControl2_KeyUp(sender As Object, e As KeyEventArgs) Handles TokenEditEx1.KeyUp - If e.KeyCode = Keys.Enter And TokenEditEx1.IsPopupOpen = False Then + Private Async Sub SearchControl2_KeyUp(sender As Object, e As KeyEventArgs) Handles txtSearchInput.KeyUp + If e.KeyCode = Keys.Enter And txtSearchInput.IsPopupOpen = False Then Await RunSearch2(GetTokens()) End If End Sub - Private Async Sub TileView1_ItemClick(sender As Object, e As TileViewItemClickEventArgs) Handles TileView1.ItemClick + Private Async Sub TileView1_ItemClick(sender As Object, e As TileViewItemClickEventArgs) Handles ViewSearches.ItemClick Await RunSearch2(GetTokens()) End Sub @@ -169,9 +128,9 @@ Public Class frmFlowSearch2 Try ' If the user clicked on a Search Tile, it will set the date constraint for this search - Dim oSearch = TileView1.GetRow(TileView1.FocusedRowHandle) - If oSearch IsNot Nothing AndAlso TypeOf oSearch Is PredefinedDateSearch Then - Dim oDateSearch As PredefinedDateSearch = oSearch + Dim oSearch = ViewSearches.GetRow(ViewSearches.FocusedRowHandle) + If oSearch IsNot Nothing AndAlso TypeOf oSearch Is SearchLoader.PredefinedDateSearch Then + Dim oDateSearch As SearchLoader.PredefinedDateSearch = oSearch oSearchTitle = oDateSearch.DisplayName SearchRunner.SetDateConstraint(oDateSearch.DateConstraint) Else @@ -217,7 +176,7 @@ Public Class frmFlowSearch2 End If ' Reset the clicked tile - TileView1.FocusedRowHandle = GridControl.InvalidRowHandle + ViewSearches.FocusedRowHandle = GridControl.InvalidRowHandle Catch ex As Exception MsgBox(ex.Message) @@ -255,30 +214,6 @@ Public Class frmFlowSearch2 LookAndFeelHelper.ForceDefaultLookAndFeelChanged() End Sub - Friend Class PredefinedSearch - Public Property Name As String - Public Property Description As String - Public Property Image As SvgImage - Public Property Count As Integer = 0 - - Public ReadOnly Property DisplayName As String - Get - Return Name - End Get - End Property - - End Class - - Friend Class PredefinedSQLSearch - Public Property SQLCommand As String - End Class - - Friend Class PredefinedDateSearch - Inherits PredefinedSearch - - Public DateConstraint As SearchRunner.DateConstraint - End Class - Private Sub CheckEdit1_Properties_EditValueChanged(sender As Object, e As EventArgs) Handles CheckEdit1.Properties.EditValueChanged DateEditTo.Enabled = CheckEdit1.IsOn End Sub @@ -302,7 +237,7 @@ Public Class frmFlowSearch2 Next End Sub - Private Sub SearchControl2_CustomDrawTokenGlyph(sender As Object, e As TokenEditCustomDrawTokenGlyphEventArgs) Handles TokenEditEx1.CustomDrawTokenGlyph + Private Sub SearchControl2_CustomDrawTokenGlyph(sender As Object, e As TokenEditCustomDrawTokenGlyphEventArgs) Handles txtSearchInput.CustomDrawTokenGlyph ' Set Background according to token type Select Case e.Value.GetType() Case GetType(AttributeValueToken) @@ -327,9 +262,9 @@ Public Class frmFlowSearch2 End If End Sub - Private Sub TokenEditEx1_Properties_TokenAdding(sender As Object, e As TokenEditTokenAddingEventArgs) Handles TokenEditEx1.Properties.TokenAdding + Private Sub TokenEditEx1_Properties_TokenAdding(sender As Object, e As TokenEditTokenAddingEventArgs) Handles txtSearchInput.Properties.TokenAdding ' Prevent adding more than two tokens for now - If TokenEditEx1.GetTokenList.Count >= 2 Then + If txtSearchInput.GetTokenList.Count >= 2 Then e.Cancel = True End If End Sub @@ -360,8 +295,8 @@ Public Class frmFlowSearch2 RibbonPageGroup5.Enabled = True End If - ClearTokens(TokenEditEx1) - SetTokens(TokenEditEx1, oTokens) + ClearTokens(txtSearchInput) + SetTokens(txtSearchInput, oTokens) End Sub Private Sub chkOperatorAnd_CheckedChanged(sender As Object, e As DevExpress.XtraBars.ItemClickEventArgs) Handles chkOperatorAnd.CheckedChanged @@ -376,7 +311,7 @@ Public Class frmFlowSearch2 End If End Sub - Private Sub TokenEditEx1_Properties_TokenAdded(sender As Object, e As TokenEditTokenAddedEventArgs) Handles TokenEditEx1.Properties.TokenAdded + Private Sub TokenEditEx1_Properties_TokenAdded(sender As Object, e As TokenEditTokenAddedEventArgs) Handles txtSearchInput.Properties.TokenAdded End Sub @@ -386,7 +321,23 @@ Public Class frmFlowSearch2 DateEditTo.EditValue = Nothing CheckEdit1.IsOn = False ComboBoxDateAttributes.SelectedIndex = 0 - TokenEditEx1.EditValue = Nothing + txtSearchInput.EditValue = Nothing FormLoading = False End Sub + + Private Sub TileView1_CustomItemTemplate(sender As Object, e As TileViewCustomItemTemplateEventArgs) Handles ViewSearches.CustomItemTemplate + Dim oSearch = ViewSearches.GetRow(e.RowHandle) + + 'If TypeOf oSearch Is PredefinedDateSearch Then + ' e.Template = e.Templates.Item("DefaultSmall") + 'Else + ' e.Template = e.Templates.Item("Default") + 'End If + e.Template = e.Templates.Item("Default") + End Sub + + Private Sub btnSaveSearch_ItemClick(sender As Object, e As DevExpress.XtraBars.ItemClickEventArgs) Handles btnSaveSearch.ItemClick + SearchLoader.CreateCustomSearch("TestSearch", "Some Stuff", GetTokens(), "invoice") + GridSearches.DataSource = SearchLoader.LoadSearches() + End Sub End Class \ No newline at end of file diff --git a/GUIs.ZooFlow/ZooFlow.vbproj b/GUIs.ZooFlow/ZooFlow.vbproj index b83cdd79..c498953d 100644 --- a/GUIs.ZooFlow/ZooFlow.vbproj +++ b/GUIs.ZooFlow/ZooFlow.vbproj @@ -347,7 +347,8 @@ MyDataset.xsd - + + Component @@ -392,16 +393,16 @@ Form - + frmFlowSearch1.vb - + Form - - frmFlowSearch2.vb + + frmSearchFlow.vb - + Form @@ -550,11 +551,11 @@ frmGlobix_Index.vb - + frmFlowSearch1.vb - - frmFlowSearch2.vb + + frmSearchFlow.vb frmSearchNeu.vb @@ -1127,6 +1128,7 @@ + diff --git a/GUIs.ZooFlow/frmFlowForm.vb b/GUIs.ZooFlow/frmFlowForm.vb index fba61f07..fb7ec3cd 100644 --- a/GUIs.ZooFlow/frmFlowForm.vb +++ b/GUIs.ZooFlow/frmFlowForm.vb @@ -160,7 +160,7 @@ Public Class frmFlowForm Private Init As ClassInit Private FileEx As Filesystem.File Private Modules As ClassModules - Private Search As SearchRunner + Private Search As Search.SearchRunner Private FormHelper As FormHelper ' Globix Helper Classes @@ -231,7 +231,7 @@ Public Class frmFlowForm 'ErrorHandler = New BaseErrorHandler(My.LogConfig, Logger, Me) Modules = New ClassModules(My.LogConfig, My.SystemConfig) FileEx = New Filesystem.File(My.LogConfig) - Search = New SearchRunner(My.LogConfig, Environment, "FlowSearch") With { + Search = New Search.SearchRunner(My.LogConfig, Environment, "FlowSearch") With { .BaseSearchSQL = SQL_FLOW_SEARCH_BASE } @@ -525,7 +525,7 @@ Public Class frmFlowForm Exit Sub End If - Dim oForm As New frmFlowSearch2() + Dim oForm As New frmSearchFlow() oForm.Show() oForm.BringToFront() @@ -1227,7 +1227,7 @@ Public Class frmFlowForm End Sub Private Sub SucheEntwurfToolStripMenuItem_Click(sender As Object, e As EventArgs) Handles SucheEntwurfToolStripMenuItem.Click - Dim oForm = New frmFlowSearch2() + Dim oForm = New frmSearchFlow() oForm.Show() End Sub