ZooFlow: switch to Checkedit, small changes in frmIndex

This commit is contained in:
Jonathan Jenne 2021-12-15 13:53:30 +01:00
parent df2eed96e8
commit 3820c1a611
8 changed files with 106 additions and 78 deletions

View File

@ -18,6 +18,7 @@ Public Class ControlCreator
Private Const TYPE_BOOLEAN = "BOOLEAN" Private Const TYPE_BOOLEAN = "BOOLEAN"
Private Const TYPE_DATE = "DATE" Private Const TYPE_DATE = "DATE"
Private Const TYPE_INTEGER = "INTEGER" Private Const TYPE_INTEGER = "INTEGER"
Private Const TYPE_VARCHAR = "VARCHAR"
Private Const PLACEHOLDER_NULL = "$NULL" Private Const PLACEHOLDER_NULL = "$NULL"
Private Const VECTORSEPARATOR = "" Private Const VECTORSEPARATOR = ""
@ -34,11 +35,14 @@ Public Class ControlCreator
''' </summary> ''' </summary>
''' <returns>The Datatable which contains the Control's Data</returns> ''' <returns>The Datatable which contains the Control's Data</returns>
Public Property OnLookupData As Func(Of Control, String, Integer, DataTable) Public Property OnLookupData As Func(Of Control, String, Integer, DataTable)
Public Class ControlMeta Public Class ControlMeta
Public Property IndexName As String Public Property IndexName As String
Public Property IndexType As String Public Property IndexType As String
Public Property ControlType As String
Public Property MultipleValues As Boolean = False Public Property MultipleValues As Boolean = False
End Class End Class
Public Sub New(LogConfig As LogConfig, Panel As Panel, Form As Form) Public Sub New(LogConfig As LogConfig, Panel As Panel, Form As Form)
Me.Form = Form Me.Form = Form
Me.Panel = Panel Me.Panel = Panel
@ -46,6 +50,17 @@ Public Class ControlCreator
Me.Logger = LogConfig.GetLogger Me.Logger = LogConfig.GetLogger
End Sub End Sub
Function AddLabel(pIndexName As String, hinweis As String, ylbl As Integer, anz As String) As Label
Dim lbl As New Label With {
.Name = "lbl" & pIndexName,
.AutoSize = True,
.Text = hinweis,
.Location = New Point(11, ylbl)
}
Return lbl
End Function
Public Function AddDateTimePicker(pIndexname As String, pY As Integer, pDefaultValue As String) As DateEdit Public Function AddDateTimePicker(pIndexname As String, pY As Integer, pDefaultValue As String) As DateEdit
Dim oPicker As New DateEdit With { Dim oPicker As New DateEdit With {
.Name = "dtp" & pIndexname, .Name = "dtp" & pIndexname,
@ -53,7 +68,8 @@ Public Class ControlCreator
.Location = New Point(DEFAULT_POSITION_X, pY), .Location = New Point(DEFAULT_POSITION_X, pY),
.Tag = New ControlMeta() With { .Tag = New ControlMeta() With {
.IndexName = pIndexname, .IndexName = pIndexname,
.IndexType = TYPE_DATE .IndexType = TYPE_DATE,
.ControlType = "dtp"
} }
} }
@ -73,9 +89,10 @@ Public Class ControlCreator
.Name = "txt" & pIndexname, .Name = "txt" & pIndexname,
.Size = New Size(DEFAULT_WIDTH, DEFAULT_HEIGHT), .Size = New Size(DEFAULT_WIDTH, DEFAULT_HEIGHT),
.Location = New Point(DEFAULT_POSITION_X, pY), .Location = New Point(DEFAULT_POSITION_X, pY),
.Tag = New ControlMeta() With { .Tag = New ControlMeta() With {
.IndexName = pIndexname, .IndexName = pIndexname,
.IndexType = pDataType .IndexType = pDataType,
.ControlType = "txt"
} }
} }
@ -98,12 +115,12 @@ Public Class ControlCreator
Return oEdit Return oEdit
End Function End Function
Public Sub OnTextBoxFocus(sender As TextEdit, e As EventArgs) Private Sub OnTextBoxFocus(sender As TextEdit, e As EventArgs)
sender.BackColor = HightlightColor sender.BackColor = HightlightColor
sender.SelectAll() sender.SelectAll()
End Sub End Sub
Public Sub OnTextBoxTextChanged(sender As TextEdit, e As System.EventArgs) Private Sub OnTextBoxTextChanged(sender As TextEdit, e As System.EventArgs)
Using oGraphics As Graphics = sender.CreateGraphics() Using oGraphics As Graphics = sender.CreateGraphics()
Dim oNewWidth = oGraphics.MeasureString(sender.Text, sender.Font).Width + 15 Dim oNewWidth = oGraphics.MeasureString(sender.Text, sender.Font).Width + 15
If oNewWidth >= DEFAULT_WIDTH Then If oNewWidth >= DEFAULT_WIDTH Then
@ -112,11 +129,11 @@ Public Class ControlCreator
End Using End Using
End Sub End Sub
Public Sub OnTextBoxLostFocus(sender As TextEdit, e As EventArgs) Private Sub OnTextBoxLostFocus(sender As TextEdit, e As EventArgs)
sender.BackColor = Color.White sender.BackColor = Color.White
End Sub End Sub
Public Sub OnTextBoxKeyUp(sender As TextEdit, e As KeyEventArgs) Private Sub OnTextBoxKeyUp(sender As TextEdit, e As KeyEventArgs)
If sender.Text = String.Empty Then If sender.Text = String.Empty Then
Exit Sub Exit Sub
End If End If
@ -130,17 +147,18 @@ Public Class ControlCreator
End If End If
End Sub End Sub
Public Function AddCheckBox(pIndexname As String, pY As Integer, pDefaultValue As String, pCaption As String) Public Function AddCheckBox(pIndexname As String, pY As Integer, pDefaultValue As String, pCaption As String) As CheckEdit
Try Try
Dim oValue As Boolean = False Dim oValue As Boolean = False
Dim oCheckBox As New CheckBox With { Dim oCheckBox As New CheckEdit With {
.Name = "chk" & pIndexname, .Name = "chk" & pIndexname,
.AutoSize = False, .AutoSize = False,
.Size = New Size(DEFAULT_WIDTH, DEFAULT_HEIGHT), .Size = New Size(DEFAULT_WIDTH, DEFAULT_HEIGHT),
.Location = New Point(DEFAULT_POSITION_X, pY), .Location = New Point(DEFAULT_POSITION_X, pY),
.Tag = New ControlMeta() With { .Tag = New ControlMeta() With {
.IndexName = pIndexname, .IndexName = pIndexname,
.IndexType = TYPE_BOOLEAN .IndexType = TYPE_BOOLEAN,
.ControlType = "chk"
} }
} }
@ -178,7 +196,8 @@ Public Class ControlCreator
.Name = "cmbMulti" & pIndexname, .Name = "cmbMulti" & pIndexname,
.Tag = New ControlMeta() With { .Tag = New ControlMeta() With {
.IndexName = pIndexname, .IndexName = pIndexname,
.IndexType = pDataType .IndexType = pDataType,
.ControlType = "cmbMulti"
} }
} }

View File

@ -1,4 +1,4 @@
Public Class ControlMeta Public Class _ControlMeta
Public Property IndexName As String Public Property IndexName As String
Public Property IndexType As String Public Property IndexType As String
Public Property MultipleValues As Boolean = False Public Property MultipleValues As Boolean = False

View File

@ -1,5 +1,4 @@
Imports System.ComponentModel Imports System.ComponentModel
Imports DigitalData.GUIs.ZooFlow.My
Imports DigitalData.Modules.Logging Imports DigitalData.Modules.Logging
Public Class ClassInitLoader Public Class ClassInitLoader
@ -76,7 +75,7 @@ Public Class ClassInitLoader
Dim oPercentComplete As Integer = CInt(Math.Truncate(oStepCounter / Steps.Count * 100)) Dim oPercentComplete As Integer = CInt(Math.Truncate(oStepCounter / Steps.Count * 100))
_Worker.ReportProgress(oPercentComplete) _Worker.ReportProgress(oPercentComplete)
Threading.Thread.Sleep(200) Threading.Thread.Sleep(100)
Next Next
e.Result = oMyApplication e.Result = oMyApplication

View File

@ -5,6 +5,8 @@ Imports DigitalData.GUIs.ZooFlow.frmGlobix_Index
Imports DigitalData.Modules.EDMI.API Imports DigitalData.Modules.EDMI.API
Imports DigitalData.Modules.EDMI.API.EDMIServiceReference Imports DigitalData.Modules.EDMI.API.EDMIServiceReference
Imports DigitalData.Modules.Logging Imports DigitalData.Modules.Logging
Imports DigitalData.GUIs.GlobalIndexer.ControlCreator
Imports DevExpress.XtraEditors
Public Class ClassValidator Public Class ClassValidator
Inherits BaseClass Inherits BaseClass
@ -18,19 +20,30 @@ Public Class ClassValidator
ManualIndexes = pManualIndexes ManualIndexes = pManualIndexes
End Sub End Sub
Public Function GetControlMeta(pControl As Control) As ControlMeta
Dim oMeta As ControlMeta = Nothing
If TypeOf pControl.Tag Is ControlMeta Then
oMeta = DirectCast(pControl.Tag, ControlMeta)
End If
Return oMeta
End Function
Function ValidateControls(pPanel As Panel, pDocType As DocType) As Boolean Function ValidateControls(pPanel As Panel, pDocType As DocType) As Boolean
Try Try
Logger.Debug("Starting [ValidateControls]") Logger.Debug("Starting [ValidateControls]")
Dim result As Boolean = True Dim result As Boolean = True
For Each oControl As Control In pPanel.Controls For Each oControl As Control In pPanel.Controls
Dim oMeta As ControlMeta = GetControlMeta(oControl)
If oControl.Name.StartsWith("lbl") Then ' Labels do not need to validated
If TypeOf oControl Is Label Then
Continue For Continue For
End If End If
' ========================= TEXT BOX ========================= ' ========================= TEXT BOX =========================
If oControl.Name.StartsWith("txt") Then If oMeta.ControlType = "txt" Then
Dim oTextBox As DevExpress.XtraEditors.TextEdit = oControl Dim oTextBox As DevExpress.XtraEditors.TextEdit = oControl
If oTextBox.Text = "" Then If oTextBox.Text = "" Then
Dim oIndexName = GetIndexName(oTextBox, "txt") Dim oIndexName = GetIndexName(oTextBox, "txt")
@ -45,7 +58,7 @@ Public Class ClassValidator
End If End If
' ========================= LOOKUP ========================= ' ========================= LOOKUP =========================
If oControl.Name.StartsWith("cmbMulti") Then If oMeta.ControlType = "cmbMulti" Then
Dim oLookup = DirectCast(oControl, LookupControl3) Dim oLookup = DirectCast(oControl, LookupControl3)
Dim oValues As List(Of String) = oLookup.Properties.SelectedValues Dim oValues As List(Of String) = oLookup.Properties.SelectedValues
@ -60,7 +73,8 @@ Public Class ClassValidator
End If End If
End If End If
ElseIf oControl.Name.StartsWith("cmbSingle") Then End If
If oMeta.ControlType = "cmbSingle" Then
Dim cmbSingle As TextBox = oControl Dim cmbSingle As TextBox = oControl
If cmbSingle.Text = "" Then If cmbSingle.Text = "" Then
@ -73,9 +87,10 @@ Public Class ClassValidator
Return False Return False
End If End If
End If End If
End If
ElseIf oControl.Name.StartsWith("cmb") Then If oMeta.ControlType = "cmb" Then
Dim cmb As ComboBox = oControl Dim cmb As Windows.Forms.ComboBox = oControl
If cmb.Text = "" Then If cmb.Text = "" Then
Dim oIndexName = GetIndexName(cmb, "cmb") Dim oIndexName = GetIndexName(cmb, "cmb")
Dim oOptional = TestIsIndexOptional(pDocType, oIndexName) Dim oOptional = TestIsIndexOptional(pDocType, oIndexName)
@ -86,11 +101,10 @@ Public Class ClassValidator
Return False Return False
End If End If
End If End If
End If End If
' ========================= DATE PICKER ========================= ' ========================= DATE PICKER =========================
If oControl.Name.StartsWith("dtp") Then If oMeta.ControlType = "dtp" Then
Dim dtp As DevExpress.XtraEditors.DateEdit = oControl Dim dtp As DevExpress.XtraEditors.DateEdit = oControl
Dim oIndexName As String = GetIndexName(dtp, "dtp") Dim oIndexName As String = GetIndexName(dtp, "dtp")
@ -106,19 +120,11 @@ Public Class ClassValidator
End If End If
' ========================= CHECK BOX ========================= ' ========================= CHECK BOX =========================
If oControl.Name.StartsWith("chk") Then If oMeta.ControlType = "chk" Then
Dim chk As CheckBox = oControl 'TODO: Implement Itermediate state and then validation for checkbox
Dim chk As CheckEdit = oControl
'result = True 'result = True
End If End If
'If TypeOf (oControl) Is Button Then
' Continue For
'End If
'If oControl.Name.StartsWith("lbl") = False And result = False Then
' Logger.Info("Die Überprüfung der manuellen Indices ist fehlerhaft. Bitte informieren Sie den Systembetreuer")
' Return False
'End If
Next Next
Return True Return True
@ -133,13 +139,15 @@ Public Class ClassValidator
Dim oAttributeValues As New List(Of UserAttributeValue) Dim oAttributeValues As New List(Of UserAttributeValue)
For Each oControl As Control In pPanel.Controls For Each oControl As Control In pPanel.Controls
Dim oMeta As ControlMeta = GetControlMeta(oControl)
If oControl.Name.StartsWith("lbl") Then ' Labels do not have values
If TypeOf oControl Is Label Then
Continue For Continue For
End If End If
' ========================= TEXTBOX ========================= ' ========================= TEXTBOX =========================
If oControl.Name.StartsWith("txt") Then If oMeta.ControlType = "txt" Then
Dim oTextBox As DevExpress.XtraEditors.TextEdit = oControl Dim oTextBox As DevExpress.XtraEditors.TextEdit = oControl
Dim oIndexName = GetIndexName(oTextBox, "txt") Dim oIndexName = GetIndexName(oTextBox, "txt")
@ -155,7 +163,7 @@ Public Class ClassValidator
End If End If
' ========================= LOOKUP ========================= ' ========================= LOOKUP =========================
If oControl.Name.StartsWith("cmbMulti") Then If oMeta.ControlType = "cmbMulti" Then
Dim oLookup = DirectCast(oControl, LookupControl3) Dim oLookup = DirectCast(oControl, LookupControl3)
Dim oValues As List(Of String) = oLookup.Properties.SelectedValues Dim oValues As List(Of String) = oLookup.Properties.SelectedValues
Dim oIndexName = GetIndexName(oLookup, "cmbMulti") Dim oIndexName = GetIndexName(oLookup, "cmbMulti")
@ -170,7 +178,9 @@ Public Class ClassValidator
}) })
ElseIf oControl.Name.StartsWith("cmbSingle") Then End If
If oMeta.ControlType = "cmbSingle" Then
Dim cmbSingle As TextBox = oControl Dim cmbSingle As TextBox = oControl
Dim oIndexName = GetIndexName(cmbSingle, "cmbSingle") Dim oIndexName = GetIndexName(cmbSingle, "cmbSingle")
@ -178,12 +188,13 @@ Public Class ClassValidator
End If End If
oAttributeValues.Add(New UserAttributeValue With { oAttributeValues.Add(New UserAttributeValue With {
.Name = oIndexName, .Name = oIndexName,
.Values = WrapIndexValue(cmbSingle.Text), .Values = WrapIndexValue(cmbSingle.Text),
.ControlName = cmbSingle.Name .ControlName = cmbSingle.Name
}) })
End If
ElseIf oControl.Name.StartsWith("cmb") Then If oMeta.ControlType = "cmb" Then
Dim cmb As ComboBox = oControl Dim cmb As ComboBox = oControl
Dim oIndexName = GetIndexName(cmb, "cmb") Dim oIndexName = GetIndexName(cmb, "cmb")
@ -198,7 +209,7 @@ Public Class ClassValidator
End If End If
' ========================= DATE PICKER ========================= ' ========================= DATE PICKER =========================
If oControl.Name.StartsWith("dtp") Then If oMeta.ControlType = "dtp" Then
Dim dtp As DevExpress.XtraEditors.DateEdit = oControl Dim dtp As DevExpress.XtraEditors.DateEdit = oControl
Dim oIndexName As String = GetIndexName(dtp, "dtp") Dim oIndexName As String = GetIndexName(dtp, "dtp")
@ -210,8 +221,8 @@ Public Class ClassValidator
End If End If
' ========================= CHECK BOX ========================= ' ========================= CHECK BOX =========================
If oControl.Name.StartsWith("chk") Then If oMeta.ControlType = "chk" Then
Dim chk As CheckBox = oControl Dim chk As CheckEdit = oControl
Dim oIndexName As String = GetIndexName(chk, "chk") Dim oIndexName As String = GetIndexName(chk, "chk")

View File

@ -113,9 +113,7 @@ Partial Class frmGlobix_Index
' '
'checkItemTopMost 'checkItemTopMost
' '
Me.checkItemTopMost.BindableChecked = True
Me.checkItemTopMost.Caption = "Andere Fenster überdecken" Me.checkItemTopMost.Caption = "Andere Fenster überdecken"
Me.checkItemTopMost.Checked = True
Me.checkItemTopMost.Id = 6 Me.checkItemTopMost.Id = 6
Me.checkItemTopMost.ImageOptions.SvgImage = CType(resources.GetObject("checkItemTopMost.ImageOptions.SvgImage"), DevExpress.Utils.Svg.SvgImage) Me.checkItemTopMost.ImageOptions.SvgImage = CType(resources.GetObject("checkItemTopMost.ImageOptions.SvgImage"), DevExpress.Utils.Svg.SvgImage)
Me.checkItemTopMost.Name = "checkItemTopMost" Me.checkItemTopMost.Name = "checkItemTopMost"

View File

@ -520,6 +520,6 @@
</value> </value>
</data> </data>
<metadata name="GlobixDataset.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a"> <metadata name="GlobixDataset.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
<value>17, 17</value> <value>189, 17</value>
</metadata> </metadata>
</root> </root>

View File

@ -14,6 +14,7 @@ Imports DigitalData.Modules.Language
Imports DigitalData.Modules.Language.Utils Imports DigitalData.Modules.Language.Utils
Imports DigitalData.Modules.Logging Imports DigitalData.Modules.Logging
Imports DigitalData.Modules.Patterns Imports DigitalData.Modules.Patterns
Imports DevExpress.XtraEditors
Public Class frmGlobix_Index Public Class frmGlobix_Index
#Region "+++++ Variablen ++++++" #Region "+++++ Variablen ++++++"
@ -69,7 +70,7 @@ Public Class frmGlobix_Index
My.Application.Globix.INDEXING_ACTIVE = True My.Application.Globix.INDEXING_ACTIVE = True
End Sub 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 Cursor = Cursors.Default
SplashScreenManager.ShowWaitForm() SplashScreenManager.ShowWaitForm()
@ -85,7 +86,7 @@ Public Class frmGlobix_Index
My.Application.Globix.CURRENT_ISATTACHMENT = False My.Application.Globix.CURRENT_ISATTACHMENT = False
Dim oSql = $"SELECT HANDLE_TYPE FROM TBGI_FILES_USER WHERE GUID = {My.Application.Globix.CurrentWorkfile.Id}" 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 My.Application.Globix.DeleteOriginalFile = My.UIConfig.Globix.DeleteOriginalFile
SplitContainerControl1.SplitterPosition = My.UIConfig.Globix.SplitterDistanceViewer SplitContainerControl1.SplitterPosition = My.UIConfig.Globix.SplitterDistanceViewer
@ -111,7 +112,7 @@ Public Class frmGlobix_Index
SetFilePreview(My.UIConfig.Globix.FilePreview) 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 My.Application.Globix.MULTIINDEXING_ACTIVE = False
If MultifileCount > 0 Then If MultifileCount > 0 Then
@ -146,7 +147,7 @@ Public Class frmGlobix_Index
End If End If
Else 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" 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 For Each oRoW As DataRow In oRegexDoctypeTable.Rows
Dim oOnlyFilename = Path.GetFileName(My.Application.Globix.CurrentWorkfile.FilePath) Dim oOnlyFilename = Path.GetFileName(My.Application.Globix.CurrentWorkfile.FilePath)
@ -380,23 +381,6 @@ Public Class frmGlobix_Index
End Try End Try
End Function 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)) Private Sub LoadIndexe_Man(pManualIndexes As List(Of ManualIndex))
Try Try
@ -430,7 +414,7 @@ Public Class frmGlobix_Index
Dim oDataType = oIndex.DataType Dim oDataType = oIndex.DataType
If oDataType <> "BOOLEAN" Then If oDataType <> "BOOLEAN" Then
addLabel(oControlName, oIndex.LabelCaption, oLabelPosition, oControlCount) oControls.AddLabel(oControlName, oIndex.LabelCaption, oLabelPosition, oControlCount)
End If End If
'Dim oDefaultValue = Check_HistoryValues(oControlName, oIndex.DocTypeName) 'Dim oDefaultValue = Check_HistoryValues(oControlName, oIndex.DocTypeName)
@ -444,7 +428,7 @@ Public Class frmGlobix_Index
Select Case oIndex.DataType Select Case oIndex.DataType
Case "BOOLEAN" Case "BOOLEAN"
Dim oCheckbox As CheckBox = oControls.AddCheckBox(oControlName, oControlPosition, oDefaultValue, oIndex.LabelCaption) Dim oCheckbox = oControls.AddCheckBox(oControlName, oControlPosition, oDefaultValue, oIndex.LabelCaption)
oControl = oCheckbox oControl = oCheckbox
Case "INTEGER" Case "INTEGER"
@ -504,7 +488,7 @@ Public Class frmGlobix_Index
End If End If
Try Try
Dim oMeta = DirectCast(pControl.Tag, GlobalIndexer.ControlMeta) Dim oMeta = DirectCast(pControl.Tag, ControlCreator.ControlMeta)
Dim oIndexName As String = oMeta.IndexName Dim oIndexName As String = oMeta.IndexName
Dim oSQL = $"SELECT * FROM TBDD_INDEX_MAN WHERE SQL_RESULT LIKE '%{oIndexName}%' AND DOK_ID = {SelectedDocType.Guid}" 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) Dim oDatatable As DataTable = My.DatabaseECM.GetDatatable(oSQL)
@ -552,7 +536,7 @@ Public Class frmGlobix_Index
Continue For Continue For
End If End If
Dim oMeta = DirectCast(oControl.Tag, GlobalIndexer.ControlMeta) Dim oMeta = DirectCast(oControl.Tag, ControlCreator.ControlMeta)
Dim oIndex As String = oMeta.IndexName Dim oIndex As String = oMeta.IndexName
If oIndex = IndexName Then If oIndex = IndexName Then
@ -628,6 +612,10 @@ Public Class frmGlobix_Index
Return oResult Return oResult
End Function End Function
Sub ShowError(text As String)
labelError.Visibility = DevExpress.XtraBars.BarItemVisibility.Always
labelError.Caption = text
End Sub
Sub ClearError() Sub ClearError()
labelError.Visibility = DevExpress.XtraBars.BarItemVisibility.Never labelError.Visibility = DevExpress.XtraBars.BarItemVisibility.Never
@ -783,7 +771,6 @@ Public Class frmGlobix_Index
Logger.Info("Imported file got ObjectId [{0}]", oResult.ObjectId) Logger.Info("Imported file got ObjectId [{0}]", oResult.ObjectId)
If oResult.OK Then If oResult.OK Then
MsgBox("Die Datei wurde erfolgreich verarbeitet!", MsgBoxStyle.Information, Text)
Return True Return True
Else Else
Logger.Warn("Import failed with message: [{0}] and details [{1}]", oResult.ErrorMessage, oResult.ErrorDetails) 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) Logger.Info("Importing file with DocumentType [{0}]", oDokart.Name)
Dim oResult = Await GlobixFlowNew(oDokart) Dim oResult = Await GlobixFlowNew(oDokart)
If oResult = True Then 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.CloseDocument()
DocumentViewer1.Done() DocumentViewer1.Done()
@ -821,11 +818,15 @@ Public Class frmGlobix_Index
End Sub End Sub
Private Sub PreviewItem_CheckedChanged(sender As Object, e As DevExpress.XtraBars.ItemClickEventArgs) Handles PreviewItem.CheckedChanged 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 End Sub
Private Sub checkItemTopMost_CheckedChanged(sender As Object, e As DevExpress.XtraBars.ItemClickEventArgs) Handles checkItemTopMost.CheckedChanged Private Sub checkItemTopMost_CheckedChanged(sender As Object, e As DevExpress.XtraBars.ItemClickEventArgs) Handles checkItemTopMost.CheckedChanged
My.UIConfig.Globix.TopMost = checkItemTopMost.Checked If FormLoaded Then
My.UIConfigManager.Save() My.UIConfig.Globix.TopMost = checkItemTopMost.Checked
My.UIConfigManager.Save()
End If
End Sub End Sub
End Class End Class

View File

@ -85,7 +85,7 @@ namespace ZUGFeRDRESTService.Controllers
{ {
_logger.Debug("Start processing request to ValidationController"); _logger.Debug("Start processing request to ValidationController");
CrossIndustryDocumentType oDocument; object oDocument;
PropertyValues.CheckPropertyValuesResult oResult = new PropertyValues.CheckPropertyValuesResult(); PropertyValues.CheckPropertyValuesResult oResult = new PropertyValues.CheckPropertyValuesResult();
try try