diff --git a/GUIs.ZooFlow/frmFlowForm.Designer.vb b/GUIs.ZooFlow/frmFlowForm.Designer.vb index fcb82602..1d969d59 100644 --- a/GUIs.ZooFlow/frmFlowForm.Designer.vb +++ b/GUIs.ZooFlow/frmFlowForm.Designer.vb @@ -75,6 +75,7 @@ Partial Class frmFlowForm Me.colSecondary = New DevExpress.XtraGrid.Views.BandedGrid.BandedGridColumn() Me.AdornerUIManager1 = New DevExpress.Utils.VisualEffects.AdornerUIManager(Me.components) Me.TaskBadge = New DevExpress.Utils.VisualEffects.Badge() + Me.LabelControl1 = New DevExpress.XtraEditors.LabelControl() Me.ContextMenuSystray.SuspendLayout() CType(Me.PictureBoxPM, System.ComponentModel.ISupportInitialize).BeginInit() CType(Me.PictureBoxSearch, System.ComponentModel.ISupportInitialize).BeginInit() @@ -175,7 +176,7 @@ Partial Class frmFlowForm Or System.Windows.Forms.AnchorStyles.Right), System.Windows.Forms.AnchorStyles) Me.PictureBoxSearch.Cursor = System.Windows.Forms.Cursors.Hand Me.PictureBoxSearch.ItemHitTestType = DevExpress.XtraEditors.ItemHitTestType.BoundingBox - Me.PictureBoxSearch.Location = New System.Drawing.Point(21, 280) + Me.PictureBoxSearch.Location = New System.Drawing.Point(21, 442) Me.PictureBoxSearch.Name = "PictureBoxSearch" Me.PictureBoxSearch.Size = New System.Drawing.Size(158, 50) Me.PictureBoxSearch.SizeMode = DevExpress.XtraEditors.SvgImageSizeMode.Zoom @@ -195,7 +196,7 @@ Partial Class frmFlowForm Me.pnlQuicksearch1.Controls.Add(Me.PictureEditQuicksearch1) Me.pnlQuicksearch1.Controls.Add(Me.lblQuicksearch1) Me.pnlQuicksearch1.Dock = System.Windows.Forms.DockStyle.Bottom - Me.pnlQuicksearch1.Location = New System.Drawing.Point(0, 335) + Me.pnlQuicksearch1.Location = New System.Drawing.Point(0, 497) Me.pnlQuicksearch1.Name = "pnlQuicksearch1" Me.pnlQuicksearch1.Size = New System.Drawing.Size(202, 75) Me.pnlQuicksearch1.TabIndex = 16 @@ -320,7 +321,7 @@ Partial Class frmFlowForm Me.barDockControlBottom.Appearance.Options.UseBackColor = True Me.barDockControlBottom.CausesValidation = False Me.barDockControlBottom.Dock = System.Windows.Forms.DockStyle.Bottom - Me.barDockControlBottom.Location = New System.Drawing.Point(0, 612) + Me.barDockControlBottom.Location = New System.Drawing.Point(0, 774) Me.barDockControlBottom.Manager = Me.BarManager1 Me.barDockControlBottom.Size = New System.Drawing.Size(202, 26) ' @@ -330,7 +331,7 @@ Partial Class frmFlowForm Me.barDockControlLeft.Dock = System.Windows.Forms.DockStyle.Left Me.barDockControlLeft.Location = New System.Drawing.Point(0, 0) Me.barDockControlLeft.Manager = Me.BarManager1 - Me.barDockControlLeft.Size = New System.Drawing.Size(0, 612) + Me.barDockControlLeft.Size = New System.Drawing.Size(0, 774) ' 'barDockControlRight ' @@ -338,7 +339,7 @@ Partial Class frmFlowForm Me.barDockControlRight.Dock = System.Windows.Forms.DockStyle.Right Me.barDockControlRight.Location = New System.Drawing.Point(202, 0) Me.barDockControlRight.Manager = Me.BarManager1 - Me.barDockControlRight.Size = New System.Drawing.Size(0, 612) + Me.barDockControlRight.Size = New System.Drawing.Size(0, 774) ' 'BarButtonItem2 ' @@ -371,7 +372,7 @@ Partial Class frmFlowForm Me.lblQuicksearch1.Appearance.Font = New System.Drawing.Font("Segoe UI", 9.0!, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, CType(0, Byte)) Me.lblQuicksearch1.Appearance.Options.UseFont = True Me.lblQuicksearch1.AutoSizeMode = DevExpress.XtraEditors.LabelAutoSizeMode.None - Me.lblQuicksearch1.Location = New System.Drawing.Point(21, 3) + Me.lblQuicksearch1.Location = New System.Drawing.Point(21, 5) Me.lblQuicksearch1.Name = "lblQuicksearch1" Me.lblQuicksearch1.Size = New System.Drawing.Size(158, 18) Me.lblQuicksearch1.TabIndex = 0 @@ -382,7 +383,7 @@ Partial Class frmFlowForm Me.Panel3.Anchor = CType(((System.Windows.Forms.AnchorStyles.Bottom Or System.Windows.Forms.AnchorStyles.Left) _ Or System.Windows.Forms.AnchorStyles.Right), System.Windows.Forms.AnchorStyles) Me.Panel3.BackColor = System.Drawing.Color.FromArgb(CType(CType(165, Byte), Integer), CType(CType(36, Byte), Integer), CType(CType(49, Byte), Integer)) - Me.Panel3.Location = New System.Drawing.Point(21, 272) + Me.Panel3.Location = New System.Drawing.Point(21, 434) Me.Panel3.Name = "Panel3" Me.Panel3.Size = New System.Drawing.Size(158, 2) Me.Panel3.TabIndex = 17 @@ -413,19 +414,20 @@ Partial Class frmFlowForm ' Me.Panel2.Controls.Add(Me.GridControl1) Me.Panel2.Controls.Add(Me.PictureBoxPM) + Me.Panel2.Controls.Add(Me.LabelControl1) Me.Panel2.Controls.Add(Me.Panel3) Me.Panel2.Controls.Add(Me.pnlQuicksearch1) Me.Panel2.Controls.Add(Me.PictureBoxSearch) Me.Panel2.Dock = System.Windows.Forms.DockStyle.Fill Me.Panel2.Location = New System.Drawing.Point(0, 202) Me.Panel2.Name = "Panel2" - Me.Panel2.Size = New System.Drawing.Size(202, 410) + Me.Panel2.Size = New System.Drawing.Size(202, 572) Me.Panel2.TabIndex = 17 ' 'GridControl1 ' Me.GridControl1.Anchor = System.Windows.Forms.AnchorStyles.Bottom - Me.GridControl1.Location = New System.Drawing.Point(21, 84) + Me.GridControl1.Location = New System.Drawing.Point(21, 246) Me.GridControl1.MainView = Me.RecentFilesView Me.GridControl1.MenuManager = Me.BarManager1 Me.GridControl1.Name = "GridControl1" @@ -495,6 +497,18 @@ Partial Class frmFlowForm Me.TaskBadge.TargetElement = Me.PictureBoxPM Me.TaskBadge.TargetElementRegion = DevExpress.Utils.VisualEffects.TargetElementRegion.Control ' + 'LabelControl1 + ' + Me.LabelControl1.Anchor = System.Windows.Forms.AnchorStyles.Bottom + Me.LabelControl1.Appearance.Font = New System.Drawing.Font("Segoe UI", 9.0!, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, CType(0, Byte)) + Me.LabelControl1.Appearance.Options.UseFont = True + Me.LabelControl1.AutoSizeMode = DevExpress.XtraEditors.LabelAutoSizeMode.None + Me.LabelControl1.Location = New System.Drawing.Point(21, 222) + Me.LabelControl1.Name = "LabelControl1" + Me.LabelControl1.Size = New System.Drawing.Size(158, 18) + Me.LabelControl1.TabIndex = 0 + Me.LabelControl1.Text = "Zuletzt bearbeitet" + ' 'frmFlowForm ' Me.AllowDrop = True @@ -505,7 +519,7 @@ Partial Class frmFlowForm Me.Appearance.Options.UseForeColor = True Me.AutoScaleDimensions = New System.Drawing.SizeF(6.0!, 13.0!) Me.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font - Me.ClientSize = New System.Drawing.Size(202, 638) + Me.ClientSize = New System.Drawing.Size(202, 800) Me.Controls.Add(Me.Panel2) Me.Controls.Add(Me.Panel1) Me.Controls.Add(Me.barDockControlLeft) @@ -582,4 +596,5 @@ Partial Class frmFlowForm Friend WithEvents colSecondary As DevExpress.XtraGrid.Views.BandedGrid.BandedGridColumn Friend WithEvents colPrimary As DevExpress.XtraGrid.Views.BandedGrid.BandedGridColumn Friend WithEvents GridBand1 As DevExpress.XtraGrid.Views.BandedGrid.GridBand + Friend WithEvents LabelControl1 As LabelControl End Class diff --git a/GUIs.ZooFlow/frmFlowForm.vb b/GUIs.ZooFlow/frmFlowForm.vb index 8f34f8e2..19aa1698 100644 --- a/GUIs.ZooFlow/frmFlowForm.vb +++ b/GUIs.ZooFlow/frmFlowForm.vb @@ -9,18 +9,15 @@ Imports DigitalData.GUIs.ZooFlow.ClipboardWatcher Imports DigitalData.Modules Imports DigitalData.Modules.Logging Imports DigitalData.Modules.Language.Utils -Imports DigitalData.Modules.Messaging Imports DigitalData.Modules.Windows Imports DigitalData.Modules.ZooFlow Imports DigitalData.GUIs.Common.Base Imports DigitalData.GUIs.Common -Imports DigitalData.Controls.SQLConfig Imports DigitalData.Modules.Language Imports DevExpress.LookAndFeel Imports System.Threading.Tasks Imports System.Threading Imports DigitalData.Controls.MessageBoxEx -Imports System.ComponentModel Public Class frmFlowForm #Region "Sidebar DllImport" @@ -262,7 +259,7 @@ Public Class frmFlowForm End If Next - Dim oSql = $"SELECT TOP 10 * FROM VWIDB_DOCRESULT_DE WHERE [Changed who] = 'SchreiberM' ORDER BY [Changed when] DESC" + Dim oSql = $"SELECT TOP 10 * FROM VWIDB_DOCRESULT_DE WHERE [Changed who] = '{My.Application.User.UserName}' ORDER BY [Changed when] DESC" Dim AccessedFilesTable = Await My.Database.GetDatatableIDBAsync(oSql) GridControl1.DataSource = AccessedFilesTable @@ -303,7 +300,7 @@ Public Class frmFlowForm ProfileLoader = New ClassProfileLoader(My.LogConfig, My.Database) ProfileLoader.LoadProfiles() Catch ex As Exception - ShowErrorMessage(ex) + ErrorHandler.ShowErrorMessage(ex, "Init Search FLOW") End Try Else My.Application.ClipboardWatcher.MonitoringActive = False @@ -587,15 +584,6 @@ Public Class frmFlowForm Next End Function - Private Function FormLoaded_Visible() As Boolean - For Each frm As Form In Application.OpenForms - If frm.Name.Equals("frmSearchStart") Or frm.Name.Equals("frmGlobix_Index") Or frm.Name.Equals("frmAdmin_Start") Then - Return False - End If - Next - - Return True - End Function Private Sub NotifyIcon_DoubleClick(sender As Object, e As EventArgs) Handles NotifyIcon.DoubleClick If Visible = False Then @@ -605,10 +593,6 @@ Public Class frmFlowForm End If End Sub - Private Sub PictureBox1_DragEnter(sender As Object, e As DragEventArgs) - Drag_Enter(sender, e) - End Sub - Sub Drag_Enter(sender As Object, e As DragEventArgs) If e.Data.GetDataPresent(DataFormats.FileDrop) Then e.Effect = DragDropEffects.All @@ -646,11 +630,7 @@ Public Class frmFlowForm End If End Function - Private Async Sub PictureBox1_DragDrop(sender As Object, e As DragEventArgs) - Await DragDropForm(e) - End Sub - - Private Async Function Globix_CheckDroppedFiles(pDroppedFiles As List(Of FileDrop.DroppedFile)) As Threading.Tasks.Task + Private Async Function Globix_CheckDroppedFiles(pDroppedFiles As List(Of FileDrop.DroppedFile)) As Task Try Await My.Database.ExecuteNonQueryECMAsync($"DELETE FROM TBGI_FILES_USER WHERE WORKED = 1 AND USER@WORK = '{My.Application.User.UserName}'") @@ -853,7 +833,7 @@ Public Class frmFlowForm My.UIConfigManager.Save() End Sub - Private Sub TimerFolderwatch_Tick_1(sender As Object, e As EventArgs) Handles TimerFolderwatch.Tick + Private Sub TimerFolderwatch_Tick(sender As Object, e As EventArgs) Handles TimerFolderwatch.Tick Try ' JenneJ, 11.02.2019: @@ -1126,71 +1106,12 @@ Public Class frmFlowForm End If End Function - Async Function GetSearchResults(pSearchText As String) As Task - Dim oSQL = $"EXEC PRIDB_SEARCH_TEXT_GET_RESULTS {My.Application.User.UserId},'{pSearchText}',''" - Await My.Database.GetDatatableIDBAsync(DocResultBaseSearch) - End Function - - Async Function RunQuickSearch1(pSearchText As String) As Threading.Tasks.Task - Dim oHandle = SplashScreenManager.ShowOverlayForm(Me) - - Try - Dim oSQL = $"EXEC PRIDB_SEARCH_TEXT_GET_RESULTS {My.Application.User.UserId},'{pSearchText}',''" - Dim oParams = New DocumentResultList.Params() With { - .WindowGuid = "QuickFlowSearch1", - .WindowTitle = GetResultWindowString(pSearchText), - .OperationModeOverride = DigitalData.Modules.ZooFlow.Constants.OperationMode.ZooFlow, - .ProfileGuid = 354521, - .ShowBackNavigation = False - } - - If Await My.Database.ExecuteNonQueryIDBAsync(oSQL) = True Then - Dim oDTDocResult = Await My.Database.GetDatatableIDBAsync(DocResultBaseSearch) - - If oDTDocResult.Rows.Count > 0 Then - Logger.Debug($"Quicksearch1 got {oDTDocResult.Rows.Count} results") - oParams.Results.Add(New DocumentResultList.DocumentResult() With { - .Title = GetResultWindowString(pSearchText), - .Datatable = oDTDocResult - }) - - ' disable file list if we have only one document - If oDTDocResult.Rows.Count = 1 Then - oParams.ShowFileList = False - End If - - Dim oForm As New frmDocumentResultList(My.LogConfig, Environment, oParams) - oForm.Show() - oForm.BringToFront() - oForm.Focus() - - Else - Dim oMessage As String - If My.Application.User.Language = "de-DE" Then - oMessage = "Kein Ergebnis" - Else - oMessage = "No results" - End If - NotifyIcon.ShowBalloonTip(20000, $"Info", oMessage, ToolTipIcon.Info) - - End If - End If - - Catch ex As Exception - Logger.Error(ex) - MsgBox("Unhandled exception in RunQuickSearch1: " & ex.Message, MsgBoxStyle.Critical) - Finally - SplashScreenManager.CloseOverlayForm(oHandle) - End Try - End Function - Private Async Sub TextEdit1_KeyUp(sender As Object, e As KeyEventArgs) Handles txtQuicksearch1.KeyUp If e.KeyCode = Keys.Return Then Await CheckQuickSearch1() End If End Sub - Private Async Function CheckQuickSearch1() As Threading.Tasks.Task Dim oSearchText = txtQuicksearch1.Text @@ -1201,7 +1122,7 @@ Public Class frmFlowForm Try Dim oResult = Await Search.Run(oSearchText) If oResult.OK = False Then - NotifyIcon.ShowBalloonTip(5_000, "Info", oResult.ErrorMessage, ToolTipIcon.Info) + NotifyIcon.ShowBalloonTip(20_000, "Info", oResult.ErrorMessage, ToolTipIcon.Info) End If Catch ex As Exception