Zooflow: Implement Single file Search Results, Rework client wrt Address parsing
This commit is contained in:
@@ -23,7 +23,7 @@ Partial Class frmSQLDesigner
|
||||
<System.Diagnostics.DebuggerStepThrough()> _
|
||||
Private Sub InitializeComponent()
|
||||
Dim resources As System.ComponentModel.ComponentResourceManager = New System.ComponentModel.ComponentResourceManager(GetType(frmSQLDesigner))
|
||||
Dim DataGridViewCellStyle4 As System.Windows.Forms.DataGridViewCellStyle = New System.Windows.Forms.DataGridViewCellStyle()
|
||||
Dim DataGridViewCellStyle1 As System.Windows.Forms.DataGridViewCellStyle = New System.Windows.Forms.DataGridViewCellStyle()
|
||||
Me.Label14 = New System.Windows.Forms.Label()
|
||||
Me.cmbConnection = New System.Windows.Forms.ComboBox()
|
||||
Me.Label2 = New System.Windows.Forms.Label()
|
||||
@@ -211,8 +211,8 @@ Partial Class frmSQLDesigner
|
||||
'
|
||||
Me.dgvPlaceholders.AllowUserToAddRows = False
|
||||
Me.dgvPlaceholders.AllowUserToDeleteRows = False
|
||||
DataGridViewCellStyle4.BackColor = System.Drawing.Color.Cyan
|
||||
Me.dgvPlaceholders.AlternatingRowsDefaultCellStyle = DataGridViewCellStyle4
|
||||
DataGridViewCellStyle1.BackColor = System.Drawing.Color.Cyan
|
||||
Me.dgvPlaceholders.AlternatingRowsDefaultCellStyle = DataGridViewCellStyle1
|
||||
Me.dgvPlaceholders.ColumnHeadersHeightSizeMode = System.Windows.Forms.DataGridViewColumnHeadersHeightSizeMode.AutoSize
|
||||
Me.dgvPlaceholders.Columns.AddRange(New System.Windows.Forms.DataGridViewColumn() {Me.colPlaceholder, Me.colReplace})
|
||||
Me.dgvPlaceholders.Enabled = False
|
||||
@@ -280,7 +280,7 @@ Partial Class frmSQLDesigner
|
||||
Me.RibbonControl1.Pages.AddRange(New DevExpress.XtraBars.Ribbon.RibbonPage() {Me.RibbonPage1})
|
||||
Me.RibbonControl1.RepositoryItems.AddRange(New DevExpress.XtraEditors.Repository.RepositoryItem() {Me.RepositoryItemComboBox1, Me.RepositoryItemLookUpEdit1, Me.RepositoryItemLookUpEdit2, Me.RepositoryItemLookUpEdit3})
|
||||
Me.RibbonControl1.ShowApplicationButton = DevExpress.Utils.DefaultBoolean.[False]
|
||||
Me.RibbonControl1.Size = New System.Drawing.Size(995, 158)
|
||||
Me.RibbonControl1.Size = New System.Drawing.Size(997, 158)
|
||||
Me.RibbonControl1.StatusBar = Me.RibbonStatusBar1
|
||||
'
|
||||
'BarButtonItem1
|
||||
@@ -365,10 +365,10 @@ Partial Class frmSQLDesigner
|
||||
'RibbonStatusBar1
|
||||
'
|
||||
Me.RibbonStatusBar1.ItemLinks.Add(Me.bsiInfo)
|
||||
Me.RibbonStatusBar1.Location = New System.Drawing.Point(0, 564)
|
||||
Me.RibbonStatusBar1.Location = New System.Drawing.Point(0, 588)
|
||||
Me.RibbonStatusBar1.Name = "RibbonStatusBar1"
|
||||
Me.RibbonStatusBar1.Ribbon = Me.RibbonControl1
|
||||
Me.RibbonStatusBar1.Size = New System.Drawing.Size(995, 24)
|
||||
Me.RibbonStatusBar1.Size = New System.Drawing.Size(997, 24)
|
||||
'
|
||||
'RibbonPage2
|
||||
'
|
||||
@@ -385,7 +385,7 @@ Partial Class frmSQLDesigner
|
||||
Me.GridControl1.MainView = Me.GridView1
|
||||
Me.GridControl1.MenuManager = Me.RibbonControl1
|
||||
Me.GridControl1.Name = "GridControl1"
|
||||
Me.GridControl1.Size = New System.Drawing.Size(691, 133)
|
||||
Me.GridControl1.Size = New System.Drawing.Size(693, 157)
|
||||
Me.GridControl1.TabIndex = 124
|
||||
Me.GridControl1.ViewCollection.AddRange(New DevExpress.XtraGrid.Views.Base.BaseView() {Me.GridView1})
|
||||
'
|
||||
@@ -399,7 +399,7 @@ Partial Class frmSQLDesigner
|
||||
Me.Appearance.Options.UseFont = True
|
||||
Me.AutoScaleDimensions = New System.Drawing.SizeF(7.0!, 17.0!)
|
||||
Me.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font
|
||||
Me.ClientSize = New System.Drawing.Size(995, 588)
|
||||
Me.ClientSize = New System.Drawing.Size(997, 612)
|
||||
Me.Controls.Add(Me.GridControl1)
|
||||
Me.Controls.Add(Me.lblAttributeAuto)
|
||||
Me.Controls.Add(Me.btnAddAttributeAuto)
|
||||
|
||||
@@ -52,9 +52,7 @@ Namespace My
|
||||
|
||||
My.Application.Service.Client = New Client(LogConfig, oAppServerAddress, oAppServerPort)
|
||||
If Not IsNothing(My.Application.Service.Client) Then
|
||||
If My.Application.Service.Client.Connect() Then
|
||||
My.Application.Service.IsActive = True
|
||||
End If
|
||||
My.Application.Service.Client.Connect()
|
||||
End If
|
||||
Catch ex As Exception
|
||||
_Logger.Warn($"Could not initialize the AppServer: {ex.Message}")
|
||||
|
||||
@@ -119,15 +119,13 @@ Public Class ClassInit
|
||||
End If
|
||||
End If
|
||||
|
||||
MyApplication.Service.Address = My.SystemConfig.AppServerConfig
|
||||
Dim oServerData = Client.ParseServiceAddress(My.SystemConfig.AppServerConfig)
|
||||
' These Properties need to be set directly on
|
||||
|
||||
My.Application.Service.Client = New Client(LogConfig, oServerData.Item1, oServerData.Item2)
|
||||
My.Application.Service.Address = My.SystemConfig.AppServerConfig
|
||||
My.Application.Service.Client = New Client(LogConfig, My.SystemConfig.AppServerConfig)
|
||||
|
||||
If Not IsNothing(My.Application.Service.Client) Then
|
||||
If My.Application.Service.Client.Connect() Then
|
||||
MyApplication.Service.IsActive = True
|
||||
End If
|
||||
My.Application.Service.Client.Connect()
|
||||
End If
|
||||
Catch ex As Exception
|
||||
Logger.Error(ex)
|
||||
|
||||
@@ -8,8 +8,6 @@ Public Class SearchRunner
|
||||
|
||||
Private Const SEARCH_FACT_DATE_DEFAULT As String = "ADDED_WHEN"
|
||||
|
||||
Private Environment As Environment
|
||||
|
||||
Private Const CREATED_TOMORROW As String = "TOMORROW"
|
||||
Private Const CREATED_TODAY As String = "ECM_CREATED_TODAY"
|
||||
Private Const CREATED_YESTERDAY As String = "ECM_CREATED_YESTERDAY"
|
||||
@@ -49,18 +47,30 @@ Public Class SearchRunner
|
||||
Public Property BaseSearchSQL As String
|
||||
Public Property ExplicitDate As Boolean = False
|
||||
|
||||
Public Sub New(pLogConfig As LogConfig, pEnvironment As Environment)
|
||||
Private Environment As Environment
|
||||
Private SearchTitle As String
|
||||
|
||||
Public Sub New(pLogConfig As LogConfig, pEnvironment As Environment, pSearchTitle As String)
|
||||
MyBase.New(pLogConfig)
|
||||
Environment = pEnvironment
|
||||
SearchTitle = pSearchTitle
|
||||
End Sub
|
||||
|
||||
Public Async Function Run(pSearchTerm As String) As Threading.Tasks.Task(Of SearchResult)
|
||||
Return Await Run(pSearchTerm, Nothing, Nothing)
|
||||
End Function
|
||||
|
||||
Public Async Function Run(pSearchTerm As String, pDateFrom As Date, pDateTo As Date) As Threading.Tasks.Task(Of SearchResult)
|
||||
If pDateFrom.Equals(Date.MinValue) = False Then
|
||||
ExplicitDate = True
|
||||
End If
|
||||
|
||||
Dim oSearchTerm = pSearchTerm
|
||||
Dim oParams = New DocumentResultList.Params() With {
|
||||
.WindowGuid = "FlowSearch",
|
||||
.WindowGuid = SearchTitle,
|
||||
.WindowTitle = GetResultWindowString(oSearchTerm),
|
||||
.OperationModeOverride = Modules.ZooFlow.Constants.OperationMode.ZooFlow,
|
||||
.ProfileGuid = 354522,
|
||||
.ProfileGuid = 35452,
|
||||
.ColumnNames = New DocumentResultList.ColumnNames With {
|
||||
.ObjectIdColumn = "DocID"
|
||||
},
|
||||
@@ -88,9 +98,14 @@ Public Class SearchRunner
|
||||
Dim oDTDocResult = Await My.Database.GetDatatableIDBAsync(BaseSearchSQL)
|
||||
If oDTDocResult.Rows.Count > 0 Then
|
||||
oParams.Results.Add(New DocumentResultList.DocumentResult() With {
|
||||
.Title = "FlowSearchXYZ",
|
||||
.Title = SearchTitle,
|
||||
.Datatable = oDTDocResult
|
||||
})
|
||||
|
||||
If oDTDocResult.Rows.Count = 1 Then
|
||||
oParams.ShowFileList = False
|
||||
End If
|
||||
|
||||
Dim oForm As New frmDocumentResultList(My.LogConfig, Environment, oParams)
|
||||
|
||||
' TODO: Implement, not needed right now
|
||||
|
||||
@@ -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)
|
||||
SearchRunner = New SearchRunner(My.LogConfig, My.Application.GetEnvironment, "FlowSearch")
|
||||
|
||||
Try
|
||||
If My.Application.User.Language = "de-DE" Then
|
||||
|
||||
@@ -13,7 +13,7 @@ Public Class frmFlowSearch2
|
||||
End If
|
||||
Next
|
||||
|
||||
SearchRunner = New SearchRunner(My.LogConfig, My.Application.GetEnvironment)
|
||||
SearchRunner = New SearchRunner(My.LogConfig, My.Application.GetEnvironment, "FlowSearch")
|
||||
SearchRunner.BaseSearchSQL = BaseSearchSQL
|
||||
|
||||
Dim osql = $"EXEC PRIDB_SEARCH_AUTOSUGGEST '{My.Application.User.Language}',{My.Application.User.UserId}"
|
||||
|
||||
@@ -670,6 +670,10 @@
|
||||
<Project>{40384b94-1f94-4249-9a5a-d02e0b346738}</Project>
|
||||
<Name>GlobalIndexer</Name>
|
||||
</ProjectReference>
|
||||
<ProjectReference Include="..\MessageBoxEx\MessageBoxEx.vbproj">
|
||||
<Project>{ef29f400-be45-4283-9d18-ca7acd9accc9}</Project>
|
||||
<Name>MessageBoxEx</Name>
|
||||
</ProjectReference>
|
||||
<ProjectReference Include="..\Modules.Base\Base\Base.vbproj">
|
||||
<Project>{6ea0c51f-c2b1-4462-8198-3de0b32b74f8}</Project>
|
||||
<Name>Base</Name>
|
||||
|
||||
@@ -19,6 +19,7 @@ Imports DigitalData.Modules.Language
|
||||
Imports DevExpress.LookAndFeel
|
||||
Imports System.Threading.Tasks
|
||||
Imports System.Threading
|
||||
Imports DigitalData.Controls.MessageBoxEx
|
||||
|
||||
Public Class frmFlowForm
|
||||
#Region "Sidebar DllImport"
|
||||
@@ -488,8 +489,11 @@ Public Class frmFlowForm
|
||||
End Sub
|
||||
|
||||
Sub ExitZooflow()
|
||||
Dim oResult As DialogResult = MessageBox.Show("Are you sure you want to close ZooFlow?", "Exit Zooflow", MessageBoxButtons.YesNo, MessageBoxIcon.Question)
|
||||
If oResult = DialogResult.Yes Then
|
||||
Dim oMsgBox As New MsgBoxEx("Are you sure you want to close ZooFlow?", "Exit Zooflow", MessageBoxIcon.Question)
|
||||
oMsgBox.SetButtons("Yes", "No")
|
||||
oMsgBox.ShowDialog()
|
||||
|
||||
If oMsgBox.Result = MsgBoxEx.DialogBoxResult.Button1 Then
|
||||
Close()
|
||||
Else
|
||||
ESCHitCount = 0
|
||||
@@ -1153,6 +1157,12 @@ Public Class frmFlowForm
|
||||
.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()
|
||||
@@ -1272,5 +1282,9 @@ Public Class frmFlowForm
|
||||
Dim oForm = New frmFlowSearch2()
|
||||
oForm.Show()
|
||||
End Sub
|
||||
|
||||
Private Sub PictureEditQuicksearch1_EditValueChanged(sender As Object, e As EventArgs) Handles PictureEditQuicksearch1.EditValueChanged
|
||||
|
||||
End Sub
|
||||
End Class
|
||||
|
||||
|
||||
@@ -20,7 +20,7 @@ Public Class frmServiceConfig
|
||||
txtServicePort.Text = oAddress.Item2
|
||||
End If
|
||||
|
||||
If My.Application.Service.IsActive Then
|
||||
If My.Application.Service.Client.IsOnline Then
|
||||
txtStatus.Text = STATUS_CONNECTED
|
||||
End If
|
||||
|
||||
|
||||
Reference in New Issue
Block a user