ZooFlow: switch to Checkedit, small changes in frmIndex
This commit is contained in:
@@ -14,6 +14,7 @@ Imports DigitalData.Modules.Language
|
||||
Imports DigitalData.Modules.Language.Utils
|
||||
Imports DigitalData.Modules.Logging
|
||||
Imports DigitalData.Modules.Patterns
|
||||
Imports DevExpress.XtraEditors
|
||||
|
||||
Public Class frmGlobix_Index
|
||||
#Region "+++++ Variablen ++++++"
|
||||
@@ -69,7 +70,7 @@ Public Class frmGlobix_Index
|
||||
My.Application.Globix.INDEXING_ACTIVE = True
|
||||
End Sub
|
||||
|
||||
Private Sub frmGlobix_Index_Shown(sender As Object, e As EventArgs) Handles Me.Shown
|
||||
Private Async Sub frmGlobix_Index_Shown(sender As Object, e As EventArgs) Handles Me.Shown
|
||||
Cursor = Cursors.Default
|
||||
|
||||
SplashScreenManager.ShowWaitForm()
|
||||
@@ -85,7 +86,7 @@ Public Class frmGlobix_Index
|
||||
|
||||
My.Application.Globix.CURRENT_ISATTACHMENT = False
|
||||
Dim oSql = $"SELECT HANDLE_TYPE FROM TBGI_FILES_USER WHERE GUID = {My.Application.Globix.CurrentWorkfile.Id}"
|
||||
DropType = My.DatabaseECM.GetScalarValue(oSql)
|
||||
DropType = Await My.DatabaseECM.GetScalarValueAsync(oSql)
|
||||
|
||||
My.Application.Globix.DeleteOriginalFile = My.UIConfig.Globix.DeleteOriginalFile
|
||||
SplitContainerControl1.SplitterPosition = My.UIConfig.Globix.SplitterDistanceViewer
|
||||
@@ -111,7 +112,7 @@ Public Class frmGlobix_Index
|
||||
SetFilePreview(My.UIConfig.Globix.FilePreview)
|
||||
|
||||
|
||||
MultifileCount = My.DatabaseECM.GetScalarValue("SELECT COUNT(*) FROM TBGI_FILES_USER WHERE WORKED = 0 AND GUID <> " & My.Application.Globix.CurrentWorkfile.Id & " AND UPPER(USER@WORK) = UPPER('" & Environment.UserName & "')")
|
||||
MultifileCount = Await My.DatabaseECM.GetScalarValueAsync("SELECT COUNT(*) FROM TBGI_FILES_USER WHERE WORKED = 0 AND GUID <> " & My.Application.Globix.CurrentWorkfile.Id & " AND UPPER(USER@WORK) = UPPER('" & Environment.UserName & "')")
|
||||
My.Application.Globix.MULTIINDEXING_ACTIVE = False
|
||||
|
||||
If MultifileCount > 0 Then
|
||||
@@ -146,7 +147,7 @@ Public Class frmGlobix_Index
|
||||
End If
|
||||
Else
|
||||
oSql = "SELECT DISTINCT T1.DOCTYPE as DocType, T.* FROM TBGI_REGEX_DOCTYPE T, VWGI_DOCTYPE_USER T1 WHERE T.DOCTYPE_ID = T1.DOCTYPE_ID"
|
||||
Dim oRegexDoctypeTable = Database.GetDatatable("DTTBGI_REGEX_DOCTYPE", oSQL, ECM)
|
||||
Dim oRegexDoctypeTable = Database.GetDatatable("DTTBGI_REGEX_DOCTYPE", oSql, ECM)
|
||||
|
||||
For Each oRoW As DataRow In oRegexDoctypeTable.Rows
|
||||
Dim oOnlyFilename = Path.GetFileName(My.Application.Globix.CurrentWorkfile.FilePath)
|
||||
@@ -380,23 +381,6 @@ Public Class frmGlobix_Index
|
||||
|
||||
End Try
|
||||
End Function
|
||||
Sub addLabel(pIndexName As String, hinweis As String, ylbl As Integer, anz As String)
|
||||
Dim lbl As New Label With {
|
||||
.Name = "lbl" & pIndexName,
|
||||
.AutoSize = True,
|
||||
.Text = hinweis,
|
||||
.Location = New Point(11, ylbl)
|
||||
}
|
||||
|
||||
pnlIndex.Controls.Add(lbl)
|
||||
End Sub
|
||||
Sub ShowError(text As String)
|
||||
'lblerror.Visible = True
|
||||
'lblerror.Text = text
|
||||
'lblerror.ForeColor = Color.Red
|
||||
labelError.Visibility = DevExpress.XtraBars.BarItemVisibility.Always
|
||||
labelError.Caption = text
|
||||
End Sub
|
||||
|
||||
Private Sub LoadIndexe_Man(pManualIndexes As List(Of ManualIndex))
|
||||
Try
|
||||
@@ -430,7 +414,7 @@ Public Class frmGlobix_Index
|
||||
Dim oDataType = oIndex.DataType
|
||||
|
||||
If oDataType <> "BOOLEAN" Then
|
||||
addLabel(oControlName, oIndex.LabelCaption, oLabelPosition, oControlCount)
|
||||
oControls.AddLabel(oControlName, oIndex.LabelCaption, oLabelPosition, oControlCount)
|
||||
End If
|
||||
|
||||
'Dim oDefaultValue = Check_HistoryValues(oControlName, oIndex.DocTypeName)
|
||||
@@ -444,7 +428,7 @@ Public Class frmGlobix_Index
|
||||
|
||||
Select Case oIndex.DataType
|
||||
Case "BOOLEAN"
|
||||
Dim oCheckbox As CheckBox = oControls.AddCheckBox(oControlName, oControlPosition, oDefaultValue, oIndex.LabelCaption)
|
||||
Dim oCheckbox = oControls.AddCheckBox(oControlName, oControlPosition, oDefaultValue, oIndex.LabelCaption)
|
||||
oControl = oCheckbox
|
||||
|
||||
Case "INTEGER"
|
||||
@@ -504,7 +488,7 @@ Public Class frmGlobix_Index
|
||||
End If
|
||||
|
||||
Try
|
||||
Dim oMeta = DirectCast(pControl.Tag, GlobalIndexer.ControlMeta)
|
||||
Dim oMeta = DirectCast(pControl.Tag, ControlCreator.ControlMeta)
|
||||
Dim oIndexName As String = oMeta.IndexName
|
||||
Dim oSQL = $"SELECT * FROM TBDD_INDEX_MAN WHERE SQL_RESULT LIKE '%{oIndexName}%' AND DOK_ID = {SelectedDocType.Guid}"
|
||||
Dim oDatatable As DataTable = My.DatabaseECM.GetDatatable(oSQL)
|
||||
@@ -552,7 +536,7 @@ Public Class frmGlobix_Index
|
||||
Continue For
|
||||
End If
|
||||
|
||||
Dim oMeta = DirectCast(oControl.Tag, GlobalIndexer.ControlMeta)
|
||||
Dim oMeta = DirectCast(oControl.Tag, ControlCreator.ControlMeta)
|
||||
Dim oIndex As String = oMeta.IndexName
|
||||
|
||||
If oIndex = IndexName Then
|
||||
@@ -628,6 +612,10 @@ Public Class frmGlobix_Index
|
||||
Return oResult
|
||||
End Function
|
||||
|
||||
Sub ShowError(text As String)
|
||||
labelError.Visibility = DevExpress.XtraBars.BarItemVisibility.Always
|
||||
labelError.Caption = text
|
||||
End Sub
|
||||
|
||||
Sub ClearError()
|
||||
labelError.Visibility = DevExpress.XtraBars.BarItemVisibility.Never
|
||||
@@ -783,7 +771,6 @@ Public Class frmGlobix_Index
|
||||
Logger.Info("Imported file got ObjectId [{0}]", oResult.ObjectId)
|
||||
|
||||
If oResult.OK Then
|
||||
MsgBox("Die Datei wurde erfolgreich verarbeitet!", MsgBoxStyle.Information, Text)
|
||||
Return True
|
||||
Else
|
||||
Logger.Warn("Import failed with message: [{0}] and details [{1}]", oResult.ErrorMessage, oResult.ErrorDetails)
|
||||
@@ -812,6 +799,16 @@ Public Class frmGlobix_Index
|
||||
Logger.Info("Importing file with DocumentType [{0}]", oDokart.Name)
|
||||
Dim oResult = Await GlobixFlowNew(oDokart)
|
||||
If oResult = True Then
|
||||
'Dim oArgs As New XtraMessageBoxArgs With {
|
||||
' .LookAndFeel = LookAndFeel,
|
||||
' .Text = "Die Datei wurde erfolgreich verarbeitet!",
|
||||
' .Caption = Text
|
||||
'}
|
||||
'oArgs.AutoCloseOptions.Delay = 3000
|
||||
'oArgs.AutoCloseOptions.ShowTimerOnDefaultButton = True
|
||||
''oArgs.DoNotShowAgainCheckBoxVisible = True
|
||||
'XtraMessageBox.Show(oArgs)
|
||||
|
||||
DocumentViewer1.CloseDocument()
|
||||
DocumentViewer1.Done()
|
||||
|
||||
@@ -821,11 +818,15 @@ Public Class frmGlobix_Index
|
||||
End Sub
|
||||
|
||||
Private Sub PreviewItem_CheckedChanged(sender As Object, e As DevExpress.XtraBars.ItemClickEventArgs) Handles PreviewItem.CheckedChanged
|
||||
SetFilePreview(PreviewItem.Checked)
|
||||
If FormLoaded Then
|
||||
SetFilePreview(PreviewItem.Checked)
|
||||
End If
|
||||
End Sub
|
||||
|
||||
Private Sub checkItemTopMost_CheckedChanged(sender As Object, e As DevExpress.XtraBars.ItemClickEventArgs) Handles checkItemTopMost.CheckedChanged
|
||||
My.UIConfig.Globix.TopMost = checkItemTopMost.Checked
|
||||
My.UIConfigManager.Save()
|
||||
If FormLoaded Then
|
||||
My.UIConfig.Globix.TopMost = checkItemTopMost.Checked
|
||||
My.UIConfigManager.Save()
|
||||
End If
|
||||
End Sub
|
||||
End Class
|
||||
|
||||
Reference in New Issue
Block a user