ms
This commit is contained in:
112
GUIs.ZooFlow/Globix/ClassEmailHeaderExtractor.vb
Normal file
112
GUIs.ZooFlow/Globix/ClassEmailHeaderExtractor.vb
Normal file
@@ -0,0 +1,112 @@
|
||||
Imports Independentsoft
|
||||
Imports System.Text.RegularExpressions
|
||||
|
||||
Public Class ClassEmailHeaderExtractor
|
||||
''' <summary>
|
||||
''' Extrahiert die Headerinformationen aus einer .msg Datei mithilfe der MSG.NET Klasse
|
||||
''' </summary>
|
||||
''' <param name="path">Der Pfad einer .msg Datei</param>
|
||||
''' <returns>Headerinformationen als String oder Nothing wenn ein Fehler aufgetreten ist.</returns>
|
||||
Public Shared Function getMessageHeaders(path As String)
|
||||
Try
|
||||
Dim msg As New Msg.Message(path)
|
||||
Dim headers = msg.TransportMessageHeaders.Replace(vbCrLf, " ")
|
||||
Return headers
|
||||
Catch ex As Exception
|
||||
Return Nothing
|
||||
End Try
|
||||
End Function
|
||||
|
||||
''' <summary>
|
||||
''' Extrahiert die Headerinformationen aus einem msg Objekt mithilfe der MSG.NET Klasse
|
||||
''' </summary>
|
||||
''' <param name="msg">Eine Email vom Typ Msg.Message</param>
|
||||
''' <returns>Headerinformationen als String oder Nothing wenn ein Fehler aufgetreten ist.</returns>
|
||||
Public Shared Function getMessageHeaders(msg As Msg.Message)
|
||||
Try
|
||||
Dim headers = msg.TransportMessageHeaders.Replace(vbCrLf, " ")
|
||||
Return headers
|
||||
Catch ex As Exception
|
||||
Return Nothing
|
||||
End Try
|
||||
End Function
|
||||
|
||||
''' <summary>
|
||||
''' Extrahiert aus den Headerinformationen anhand einer Liste von Regular Expressions eine Absenderadresse.
|
||||
''' </summary>
|
||||
''' <param name="messageHeaders">Headerinformationen die von getMessageHeaders erzeugt wurden.</param>
|
||||
''' <param name="RegexList">Eine Liste von Regular Expressions</param>
|
||||
''' <param name="RegexGroup">Die Ergebnisgruppe, die die Adresse enthält</param>
|
||||
''' <returns>Eine Emailadresse oder Nothing, wenn keine der Regular Expressions ein Ergebnis lieferte.</returns>
|
||||
Public Shared Function extractFromAddress(messageHeaders As String, RegexList As List(Of Regex), Optional RegexGroup As Integer = 1)
|
||||
If IsNothing(messageHeaders) Then
|
||||
Return Nothing
|
||||
End If
|
||||
|
||||
For Each rx In RegexList
|
||||
Dim match As Match = rx.Match(messageHeaders)
|
||||
Dim email As String = match.Groups(RegexGroup).Value
|
||||
|
||||
If Not String.IsNullOrWhiteSpace(email) Then
|
||||
Return email
|
||||
End If
|
||||
Next
|
||||
|
||||
Return Nothing
|
||||
End Function
|
||||
Public Shared Function extractFromHeader(messageHeaders As String, Regex As String)
|
||||
Try
|
||||
Dim result
|
||||
Dim i As Integer = 0
|
||||
If IsNothing(messageHeaders) Then
|
||||
Return Nothing
|
||||
End If
|
||||
' einen Regulären Ausdruck laden
|
||||
Dim strRegex As String = Regex
|
||||
Dim myRegex As New Regex(strRegex, RegexOptions.IgnorePatternWhitespace)
|
||||
Dim strTargetString As String = messageHeaders.Trim
|
||||
' die Vorkommen im String auslesen
|
||||
For Each myMatch As Match In myRegex.Matches(strTargetString)
|
||||
If myMatch.Success Then
|
||||
If myMatch.Value <> "" Then
|
||||
If i = 0 Then
|
||||
result = myMatch.Value.ToString
|
||||
Else
|
||||
result = result & ";" & myMatch.Value.ToString
|
||||
End If
|
||||
i += 1
|
||||
End If
|
||||
End If
|
||||
Next
|
||||
Return result
|
||||
Catch ex As Exception
|
||||
MsgBox("Unexpected Error in extractFromHeader: " & vbNewLine & ex.Message, MsgBoxStyle.Critical)
|
||||
Return Nothing
|
||||
End Try
|
||||
|
||||
End Function
|
||||
|
||||
''' <summary>
|
||||
''' Extrahiert aus den Headerinformationen anhand einer Liste von Regular Expressions eine Empfängeradresse.
|
||||
''' </summary>
|
||||
''' <param name="messageHeaders">Headerinformationen die von getMessageHeaders erzeugt wurden.</param>
|
||||
''' <param name="RegexList">Eine Liste von Regular Expressions</param>
|
||||
''' <param name="RegexGroup">Die Ergebnisgruppe, die die Adresse enthält</param>
|
||||
''' <returns>Eine Emailadresse oder Nothing, wenn keine der Regular Expressions ein Ergebnis lieferte.</returns>
|
||||
Public Shared Function extractToAddress(messageHeaders As String, RegexList As List(Of Regex), Optional RegexGroup As Integer = 1)
|
||||
If IsNothing(messageHeaders) Then
|
||||
Return Nothing
|
||||
End If
|
||||
|
||||
For Each rx In RegexList
|
||||
Dim match As Match = rx.Match(messageHeaders)
|
||||
Dim email As String = match.Groups(RegexGroup).Value
|
||||
|
||||
If Not String.IsNullOrWhiteSpace(email) Then
|
||||
Return email
|
||||
End If
|
||||
Next
|
||||
|
||||
Return Nothing
|
||||
End Function
|
||||
End Class
|
||||
@@ -8,7 +8,7 @@ Public Class ClassFileDrop
|
||||
Private clsFilehandle As ClassFilehandle
|
||||
Public Sub New(LogConfig As LogConfig)
|
||||
_LOGGER = LogConfig.GetLogger()
|
||||
clsFilehandle = New ClassFilehandle(LogConfig)
|
||||
clsFilehandle = New ClassFilehandle()
|
||||
End Sub
|
||||
Public Function Drop_File(e As DragEventArgs)
|
||||
Try
|
||||
|
||||
@@ -7,8 +7,8 @@ Imports Independentsoft
|
||||
|
||||
Public Class ClassFilehandle
|
||||
Private _LOGGER As Logger
|
||||
Public Sub New(LogConfig As LogConfig)
|
||||
_LOGGER = LogConfig.GetLogger()
|
||||
Public Sub New()
|
||||
_LOGGER = My.LogConfig.GetLogger
|
||||
End Sub
|
||||
''' <summary>
|
||||
''' Diese Funktion entfernt alle Zeichen aus dem übergebenen String
|
||||
|
||||
201
GUIs.ZooFlow/Globix/ClassFolderwatcher.vb
Normal file
201
GUIs.ZooFlow/Globix/ClassFolderwatcher.vb
Normal file
@@ -0,0 +1,201 @@
|
||||
Imports System.IO
|
||||
Imports DigitalData.Modules.Logging
|
||||
|
||||
Public Class ClassFolderwatcher
|
||||
Public Shared FWFolderWatcher As FileSystemWatcher
|
||||
Public Shared FWScan As FileSystemWatcher
|
||||
Private clsFilehandle As ClassFilehandle
|
||||
Private Logger As Logger
|
||||
|
||||
Public Sub New()
|
||||
Logger = My.LogConfig.GetLogger()
|
||||
clsFilehandle = New ClassFilehandle()
|
||||
End Sub
|
||||
|
||||
Public Function Restart_FolderWatch()
|
||||
Try
|
||||
If FWFolderWatcher.EnableRaisingEvents = True Then
|
||||
'Gestartet also Stoppen
|
||||
FWFolderWatcher.EnableRaisingEvents = False
|
||||
My.Application.Globix.Folderwatchstarted = False
|
||||
'FolderWatch neu instanzieren
|
||||
FWFolderWatcher = New System.IO.FileSystemWatcher(My.Application.Globix.CURRENT_FOLDERWATCH, "*.*")
|
||||
Logger.Info(" >> FolderWatch neu instanziert")
|
||||
FWFolderWatcher.IncludeSubdirectories = False
|
||||
FWFolderWatcher.EnableRaisingEvents = True
|
||||
AddHandler FWFolderWatcher.Created, AddressOf OnCreated
|
||||
My.Application.Globix.Folderwatchstarted = True
|
||||
'SaveConfigValue("my.Application.Globix.Folderwatchstarted", "True")
|
||||
My.UIConfig.Globix.FolderWatchStarted = True
|
||||
My.UIConfigManager.Save()
|
||||
End If
|
||||
Catch ex As Exception
|
||||
Logger.Info($"Error in Restart_FolderWatch: {ex.Message}")
|
||||
Logger.Error(ex.Message)
|
||||
End Try
|
||||
End Function
|
||||
Public Function Restart_FolderWatchSCAN()
|
||||
Try
|
||||
If FWScan.EnableRaisingEvents = True Then
|
||||
'Gestartet also Stoppen
|
||||
FWScan.EnableRaisingEvents = False
|
||||
'FolderWatch neu instanzieren
|
||||
FWScan = New System.IO.FileSystemWatcher(My.Application.Globix.CURRENT_SCAN_FOLDERWATCH, "*.*")
|
||||
Logger.Info(" >> FolderWatchScan neu instanziert")
|
||||
FWScan.IncludeSubdirectories = False
|
||||
FWScan.EnableRaisingEvents = True
|
||||
AddHandler FWScan.Created, AddressOf OnCreated
|
||||
'SaveConfigValue("FWSCAN_started", "True")
|
||||
My.UIConfig.Globix.FolderWatchScanStarted = True
|
||||
My.UIConfigManager.Save()
|
||||
End If
|
||||
Catch ex As Exception
|
||||
Logger.Info($"Error in Restart_FolderWatchSCAN: {ex.Message}")
|
||||
Logger.Error(ex.Message)
|
||||
End Try
|
||||
End Function
|
||||
Public Function StartStop_FolderWatch()
|
||||
Try
|
||||
If My.Application.Globix.CURRENT_FOLDERWATCH = "" Then
|
||||
'MsgBox("Bitte definieren Sie einen Überwachungsordner:", MsgBoxStyle.Exclamation)
|
||||
Return False
|
||||
End If
|
||||
If FWFolderWatcher Is Nothing Then
|
||||
FWFolderWatcher = New System.IO.FileSystemWatcher(My.Application.Globix.CURRENT_FOLDERWATCH, "*.*")
|
||||
Logger.Info(" >> FolderWatch Gestartet")
|
||||
FWFolderWatcher.IncludeSubdirectories = False
|
||||
FWFolderWatcher.EnableRaisingEvents = True
|
||||
AddHandler FWFolderWatcher.Created, AddressOf OnCreated
|
||||
My.Application.Globix.Folderwatchstarted = True
|
||||
'SaveConfigValue("my.Application.Globix.Folderwatchstarted", "True")
|
||||
My.UIConfig.Globix.FolderWatchStarted = True
|
||||
My.UIConfigManager.Save()
|
||||
Return 1
|
||||
End If
|
||||
If FWFolderWatcher.EnableRaisingEvents = False Then
|
||||
' Dim watcher As New FileSystemWatcher()
|
||||
' watcher.Path = CURRENT_FOLDERWATCH
|
||||
FWFolderWatcher = New System.IO.FileSystemWatcher(My.Application.Globix.CURRENT_FOLDERWATCH, "*.*")
|
||||
Logger.Info(" >> FolderWatch Gestartet")
|
||||
FWFolderWatcher.IncludeSubdirectories = False
|
||||
FWFolderWatcher.EnableRaisingEvents = True
|
||||
AddHandler FWFolderWatcher.Created, AddressOf OnCreated
|
||||
My.Application.Globix.Folderwatchstarted = True
|
||||
'SaveConfigValue("my.Application.Globix.Folderwatchstarted", "True")
|
||||
My.UIConfig.Globix.FolderWatchStarted = True
|
||||
My.UIConfigManager.Save()
|
||||
Return 1
|
||||
Else
|
||||
'Gestartet also Stoppen
|
||||
FWFolderWatcher.EnableRaisingEvents = False
|
||||
My.Application.Globix.Folderwatchstarted = False
|
||||
Logger.Info(" >> FolderWatch gestoppt")
|
||||
'SaveConfigValue("my.Application.Globix.Folderwatchstarted", "False")
|
||||
My.UIConfig.Globix.FolderWatchStarted = False
|
||||
My.UIConfigManager.Save()
|
||||
Return 0
|
||||
End If
|
||||
|
||||
Catch ex As Exception
|
||||
MsgBox("Error in StartStop_FolderWatch:" & vbNewLine & ex.Message, MsgBoxStyle.Critical)
|
||||
Return 99
|
||||
End Try
|
||||
End Function
|
||||
Public Function StartStop_FolderWatchSCAN() As Integer
|
||||
Try
|
||||
If My.Application.Globix.CURRENT_SCAN_FOLDERWATCH = "" Then
|
||||
If FWFolderWatcher.EnableRaisingEvents = True Then
|
||||
Stop_FWSCAN()
|
||||
Return 0
|
||||
Else
|
||||
If My.Application.User.Language = "de-DE" Then
|
||||
MsgBox("Bitte definieren Sie einen Überwachungsordner für Scan-Eingänge:", MsgBoxStyle.Exclamation)
|
||||
Else
|
||||
MsgBox("Please define a watchfolder for Scanning:", MsgBoxStyle.Exclamation)
|
||||
End If
|
||||
|
||||
Return False
|
||||
End If
|
||||
End If
|
||||
If FWScan Is Nothing Then
|
||||
FWScan = New System.IO.FileSystemWatcher(My.Application.Globix.CURRENT_SCAN_FOLDERWATCH, "*.*")
|
||||
Logger.Info(" >> FolderWatch Scan Gestartet")
|
||||
FWScan.IncludeSubdirectories = False
|
||||
FWScan.EnableRaisingEvents = True
|
||||
AddHandler FWScan.Created, AddressOf OnCreated
|
||||
My.UIConfig.Globix.FolderWatchScanStarted = True
|
||||
My.UIConfigManager.Save()
|
||||
Return 1
|
||||
End If
|
||||
If FWScan.EnableRaisingEvents = False Then
|
||||
' Dim watcher As New FileSystemWatcher()
|
||||
' watcher.Path = CURRENT_FOLDERWATCH
|
||||
FWScan = New System.IO.FileSystemWatcher(My.Application.Globix.CURRENT_SCAN_FOLDERWATCH, "*.*")
|
||||
Logger.Info(" >> FolderWatch Scan Gestartet")
|
||||
FWScan.IncludeSubdirectories = False
|
||||
FWScan.EnableRaisingEvents = True
|
||||
AddHandler FWScan.Created, AddressOf OnCreated
|
||||
My.UIConfig.Globix.FolderWatchScanStarted = True
|
||||
My.UIConfigManager.Save()
|
||||
Return 1
|
||||
Else
|
||||
'Gestartet also Stoppen
|
||||
FWScan.EnableRaisingEvents = False
|
||||
Logger.Info(" >> FolderWatch Scan gestoppt")
|
||||
'SaveConfigValue("FWSCAN_started", "False")
|
||||
My.UIConfig.Globix.FolderWatchScanStarted = False
|
||||
My.UIConfigManager.Save()
|
||||
Return 0
|
||||
End If
|
||||
|
||||
Catch ex As Exception
|
||||
MsgBox("Error in StartStop_FolderWatchSCAN:" & vbNewLine & ex.Message, MsgBoxStyle.Critical)
|
||||
Return 99
|
||||
End Try
|
||||
End Function
|
||||
Public Function Stop_FWSCAN()
|
||||
If FWFolderWatcher.EnableRaisingEvents = True Then
|
||||
'Gestartet also Stoppen
|
||||
FWFolderWatcher.EnableRaisingEvents = False
|
||||
My.Application.Globix.Folderwatchstarted = False
|
||||
Logger.Info(" >> FolderWatch gestoppt")
|
||||
'SaveConfigValue("my.Application.Globix.Folderwatchstarted", "False")
|
||||
My.UIConfig.Globix.FolderWatchStarted = True
|
||||
My.UIConfigManager.Save()
|
||||
Return True
|
||||
Else
|
||||
Return False
|
||||
End If
|
||||
End Function
|
||||
Private Sub OnCreated(source As Object, e As FileSystemEventArgs)
|
||||
Try
|
||||
If Not IsNothing(My.Application.Globix.DTEXCLUDE_FILES) Then
|
||||
For Each row As DataRow In My.Application.Globix.DTEXCLUDE_FILES.Rows
|
||||
Dim content As String = row.Item(0).ToString.ToLower
|
||||
If e.FullPath.ToLower.Contains(content) Then
|
||||
Exit Sub
|
||||
End If
|
||||
Next
|
||||
End If
|
||||
|
||||
|
||||
Dim handleType As String
|
||||
If e.FullPath.ToLower.EndsWith(".msg") Then
|
||||
handleType = "|FW_OUTLOOK_MESSAGE|"
|
||||
Else
|
||||
handleType = "|FW_SIMPLEINDEXER|"
|
||||
End If
|
||||
'Die Datei übergeben
|
||||
Logger.Info(">> OnCreated-File:" & e.FullPath)
|
||||
If My.Application.Globix.FileExistsinDropTable(e.FullPath) = False Then
|
||||
clsFilehandle.Decide_FileHandle(e.FullPath, handleType)
|
||||
Else
|
||||
Logger.Info(">> Folderwatcher: File already exists:" & e.FullPath)
|
||||
End If
|
||||
|
||||
Catch ex As Exception
|
||||
MsgBox(ex.Message, MsgBoxStyle.Critical, "Error in folder_watch_Created")
|
||||
End Try
|
||||
|
||||
End Sub
|
||||
End Class
|
||||
688
GUIs.ZooFlow/Globix/GlobixDataset.Designer.vb
generated
Normal file
688
GUIs.ZooFlow/Globix/GlobixDataset.Designer.vb
generated
Normal file
@@ -0,0 +1,688 @@
|
||||
'------------------------------------------------------------------------------
|
||||
' <auto-generated>
|
||||
' Dieser Code wurde von einem Tool generiert.
|
||||
' Laufzeitversion:4.0.30319.42000
|
||||
'
|
||||
' Änderungen an dieser Datei können falsches Verhalten verursachen und gehen verloren, wenn
|
||||
' der Code erneut generiert wird.
|
||||
' </auto-generated>
|
||||
'------------------------------------------------------------------------------
|
||||
|
||||
Option Strict Off
|
||||
Option Explicit On
|
||||
|
||||
|
||||
|
||||
'''<summary>
|
||||
'''Represents a strongly typed in-memory cache of data.
|
||||
'''</summary>
|
||||
<Global.System.Serializable(), _
|
||||
Global.System.ComponentModel.DesignerCategoryAttribute("code"), _
|
||||
Global.System.ComponentModel.ToolboxItem(true), _
|
||||
Global.System.Xml.Serialization.XmlSchemaProviderAttribute("GetTypedDataSetSchema"), _
|
||||
Global.System.Xml.Serialization.XmlRootAttribute("GlobixDataset"), _
|
||||
Global.System.ComponentModel.Design.HelpKeywordAttribute("vs.data.DataSet")> _
|
||||
Partial Public Class GlobixDataset
|
||||
Inherits Global.System.Data.DataSet
|
||||
|
||||
Private tableTBTEMP_INDEXRESULTS As TBTEMP_INDEXRESULTSDataTable
|
||||
|
||||
Private _schemaSerializationMode As Global.System.Data.SchemaSerializationMode = Global.System.Data.SchemaSerializationMode.IncludeSchema
|
||||
|
||||
<Global.System.Diagnostics.DebuggerNonUserCodeAttribute(), _
|
||||
Global.System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")> _
|
||||
Public Sub New()
|
||||
MyBase.New
|
||||
Me.BeginInit
|
||||
Me.InitClass
|
||||
Dim schemaChangedHandler As Global.System.ComponentModel.CollectionChangeEventHandler = AddressOf Me.SchemaChanged
|
||||
AddHandler MyBase.Tables.CollectionChanged, schemaChangedHandler
|
||||
AddHandler MyBase.Relations.CollectionChanged, schemaChangedHandler
|
||||
Me.EndInit
|
||||
End Sub
|
||||
|
||||
<Global.System.Diagnostics.DebuggerNonUserCodeAttribute(), _
|
||||
Global.System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")> _
|
||||
Protected Sub New(ByVal info As Global.System.Runtime.Serialization.SerializationInfo, ByVal context As Global.System.Runtime.Serialization.StreamingContext)
|
||||
MyBase.New(info, context, false)
|
||||
If (Me.IsBinarySerialized(info, context) = true) Then
|
||||
Me.InitVars(false)
|
||||
Dim schemaChangedHandler1 As Global.System.ComponentModel.CollectionChangeEventHandler = AddressOf Me.SchemaChanged
|
||||
AddHandler Me.Tables.CollectionChanged, schemaChangedHandler1
|
||||
AddHandler Me.Relations.CollectionChanged, schemaChangedHandler1
|
||||
Return
|
||||
End If
|
||||
Dim strSchema As String = CType(info.GetValue("XmlSchema", GetType(String)),String)
|
||||
If (Me.DetermineSchemaSerializationMode(info, context) = Global.System.Data.SchemaSerializationMode.IncludeSchema) Then
|
||||
Dim ds As Global.System.Data.DataSet = New Global.System.Data.DataSet()
|
||||
ds.ReadXmlSchema(New Global.System.Xml.XmlTextReader(New Global.System.IO.StringReader(strSchema)))
|
||||
If (Not (ds.Tables("TBTEMP_INDEXRESULTS")) Is Nothing) Then
|
||||
MyBase.Tables.Add(New TBTEMP_INDEXRESULTSDataTable(ds.Tables("TBTEMP_INDEXRESULTS")))
|
||||
End If
|
||||
Me.DataSetName = ds.DataSetName
|
||||
Me.Prefix = ds.Prefix
|
||||
Me.Namespace = ds.Namespace
|
||||
Me.Locale = ds.Locale
|
||||
Me.CaseSensitive = ds.CaseSensitive
|
||||
Me.EnforceConstraints = ds.EnforceConstraints
|
||||
Me.Merge(ds, false, Global.System.Data.MissingSchemaAction.Add)
|
||||
Me.InitVars
|
||||
Else
|
||||
Me.ReadXmlSchema(New Global.System.Xml.XmlTextReader(New Global.System.IO.StringReader(strSchema)))
|
||||
End If
|
||||
Me.GetSerializationData(info, context)
|
||||
Dim schemaChangedHandler As Global.System.ComponentModel.CollectionChangeEventHandler = AddressOf Me.SchemaChanged
|
||||
AddHandler MyBase.Tables.CollectionChanged, schemaChangedHandler
|
||||
AddHandler Me.Relations.CollectionChanged, schemaChangedHandler
|
||||
End Sub
|
||||
|
||||
<Global.System.Diagnostics.DebuggerNonUserCodeAttribute(), _
|
||||
Global.System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0"), _
|
||||
Global.System.ComponentModel.Browsable(false), _
|
||||
Global.System.ComponentModel.DesignerSerializationVisibility(Global.System.ComponentModel.DesignerSerializationVisibility.Content)> _
|
||||
Public ReadOnly Property TBTEMP_INDEXRESULTS() As TBTEMP_INDEXRESULTSDataTable
|
||||
Get
|
||||
Return Me.tableTBTEMP_INDEXRESULTS
|
||||
End Get
|
||||
End Property
|
||||
|
||||
<Global.System.Diagnostics.DebuggerNonUserCodeAttribute(), _
|
||||
Global.System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0"), _
|
||||
Global.System.ComponentModel.BrowsableAttribute(true), _
|
||||
Global.System.ComponentModel.DesignerSerializationVisibilityAttribute(Global.System.ComponentModel.DesignerSerializationVisibility.Visible)> _
|
||||
Public Overrides Property SchemaSerializationMode() As Global.System.Data.SchemaSerializationMode
|
||||
Get
|
||||
Return Me._schemaSerializationMode
|
||||
End Get
|
||||
Set
|
||||
Me._schemaSerializationMode = value
|
||||
End Set
|
||||
End Property
|
||||
|
||||
<Global.System.Diagnostics.DebuggerNonUserCodeAttribute(), _
|
||||
Global.System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0"), _
|
||||
Global.System.ComponentModel.DesignerSerializationVisibilityAttribute(Global.System.ComponentModel.DesignerSerializationVisibility.Hidden)> _
|
||||
Public Shadows ReadOnly Property Tables() As Global.System.Data.DataTableCollection
|
||||
Get
|
||||
Return MyBase.Tables
|
||||
End Get
|
||||
End Property
|
||||
|
||||
<Global.System.Diagnostics.DebuggerNonUserCodeAttribute(), _
|
||||
Global.System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0"), _
|
||||
Global.System.ComponentModel.DesignerSerializationVisibilityAttribute(Global.System.ComponentModel.DesignerSerializationVisibility.Hidden)> _
|
||||
Public Shadows ReadOnly Property Relations() As Global.System.Data.DataRelationCollection
|
||||
Get
|
||||
Return MyBase.Relations
|
||||
End Get
|
||||
End Property
|
||||
|
||||
<Global.System.Diagnostics.DebuggerNonUserCodeAttribute(), _
|
||||
Global.System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")> _
|
||||
Protected Overrides Sub InitializeDerivedDataSet()
|
||||
Me.BeginInit
|
||||
Me.InitClass
|
||||
Me.EndInit
|
||||
End Sub
|
||||
|
||||
<Global.System.Diagnostics.DebuggerNonUserCodeAttribute(), _
|
||||
Global.System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")> _
|
||||
Public Overrides Function Clone() As Global.System.Data.DataSet
|
||||
Dim cln As GlobixDataset = CType(MyBase.Clone,GlobixDataset)
|
||||
cln.InitVars
|
||||
cln.SchemaSerializationMode = Me.SchemaSerializationMode
|
||||
Return cln
|
||||
End Function
|
||||
|
||||
<Global.System.Diagnostics.DebuggerNonUserCodeAttribute(), _
|
||||
Global.System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")> _
|
||||
Protected Overrides Function ShouldSerializeTables() As Boolean
|
||||
Return false
|
||||
End Function
|
||||
|
||||
<Global.System.Diagnostics.DebuggerNonUserCodeAttribute(), _
|
||||
Global.System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")> _
|
||||
Protected Overrides Function ShouldSerializeRelations() As Boolean
|
||||
Return false
|
||||
End Function
|
||||
|
||||
<Global.System.Diagnostics.DebuggerNonUserCodeAttribute(), _
|
||||
Global.System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")> _
|
||||
Protected Overrides Sub ReadXmlSerializable(ByVal reader As Global.System.Xml.XmlReader)
|
||||
If (Me.DetermineSchemaSerializationMode(reader) = Global.System.Data.SchemaSerializationMode.IncludeSchema) Then
|
||||
Me.Reset
|
||||
Dim ds As Global.System.Data.DataSet = New Global.System.Data.DataSet()
|
||||
ds.ReadXml(reader)
|
||||
If (Not (ds.Tables("TBTEMP_INDEXRESULTS")) Is Nothing) Then
|
||||
MyBase.Tables.Add(New TBTEMP_INDEXRESULTSDataTable(ds.Tables("TBTEMP_INDEXRESULTS")))
|
||||
End If
|
||||
Me.DataSetName = ds.DataSetName
|
||||
Me.Prefix = ds.Prefix
|
||||
Me.Namespace = ds.Namespace
|
||||
Me.Locale = ds.Locale
|
||||
Me.CaseSensitive = ds.CaseSensitive
|
||||
Me.EnforceConstraints = ds.EnforceConstraints
|
||||
Me.Merge(ds, false, Global.System.Data.MissingSchemaAction.Add)
|
||||
Me.InitVars
|
||||
Else
|
||||
Me.ReadXml(reader)
|
||||
Me.InitVars
|
||||
End If
|
||||
End Sub
|
||||
|
||||
<Global.System.Diagnostics.DebuggerNonUserCodeAttribute(), _
|
||||
Global.System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")> _
|
||||
Protected Overrides Function GetSchemaSerializable() As Global.System.Xml.Schema.XmlSchema
|
||||
Dim stream As Global.System.IO.MemoryStream = New Global.System.IO.MemoryStream()
|
||||
Me.WriteXmlSchema(New Global.System.Xml.XmlTextWriter(stream, Nothing))
|
||||
stream.Position = 0
|
||||
Return Global.System.Xml.Schema.XmlSchema.Read(New Global.System.Xml.XmlTextReader(stream), Nothing)
|
||||
End Function
|
||||
|
||||
<Global.System.Diagnostics.DebuggerNonUserCodeAttribute(), _
|
||||
Global.System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")> _
|
||||
Friend Overloads Sub InitVars()
|
||||
Me.InitVars(true)
|
||||
End Sub
|
||||
|
||||
<Global.System.Diagnostics.DebuggerNonUserCodeAttribute(), _
|
||||
Global.System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")> _
|
||||
Friend Overloads Sub InitVars(ByVal initTable As Boolean)
|
||||
Me.tableTBTEMP_INDEXRESULTS = CType(MyBase.Tables("TBTEMP_INDEXRESULTS"),TBTEMP_INDEXRESULTSDataTable)
|
||||
If (initTable = true) Then
|
||||
If (Not (Me.tableTBTEMP_INDEXRESULTS) Is Nothing) Then
|
||||
Me.tableTBTEMP_INDEXRESULTS.InitVars
|
||||
End If
|
||||
End If
|
||||
End Sub
|
||||
|
||||
<Global.System.Diagnostics.DebuggerNonUserCodeAttribute(), _
|
||||
Global.System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")> _
|
||||
Private Sub InitClass()
|
||||
Me.DataSetName = "GlobixDataset"
|
||||
Me.Prefix = ""
|
||||
Me.Namespace = "http://tempuri.org/GlobixDataset.xsd"
|
||||
Me.EnforceConstraints = true
|
||||
Me.SchemaSerializationMode = Global.System.Data.SchemaSerializationMode.IncludeSchema
|
||||
Me.tableTBTEMP_INDEXRESULTS = New TBTEMP_INDEXRESULTSDataTable()
|
||||
MyBase.Tables.Add(Me.tableTBTEMP_INDEXRESULTS)
|
||||
End Sub
|
||||
|
||||
<Global.System.Diagnostics.DebuggerNonUserCodeAttribute(), _
|
||||
Global.System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")> _
|
||||
Private Function ShouldSerializeTBTEMP_INDEXRESULTS() As Boolean
|
||||
Return false
|
||||
End Function
|
||||
|
||||
<Global.System.Diagnostics.DebuggerNonUserCodeAttribute(), _
|
||||
Global.System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")> _
|
||||
Private Sub SchemaChanged(ByVal sender As Object, ByVal e As Global.System.ComponentModel.CollectionChangeEventArgs)
|
||||
If (e.Action = Global.System.ComponentModel.CollectionChangeAction.Remove) Then
|
||||
Me.InitVars
|
||||
End If
|
||||
End Sub
|
||||
|
||||
<Global.System.Diagnostics.DebuggerNonUserCodeAttribute(), _
|
||||
Global.System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")> _
|
||||
Public Shared Function GetTypedDataSetSchema(ByVal xs As Global.System.Xml.Schema.XmlSchemaSet) As Global.System.Xml.Schema.XmlSchemaComplexType
|
||||
Dim ds As GlobixDataset = New GlobixDataset()
|
||||
Dim type As Global.System.Xml.Schema.XmlSchemaComplexType = New Global.System.Xml.Schema.XmlSchemaComplexType()
|
||||
Dim sequence As Global.System.Xml.Schema.XmlSchemaSequence = New Global.System.Xml.Schema.XmlSchemaSequence()
|
||||
Dim any As Global.System.Xml.Schema.XmlSchemaAny = New Global.System.Xml.Schema.XmlSchemaAny()
|
||||
any.Namespace = ds.Namespace
|
||||
sequence.Items.Add(any)
|
||||
type.Particle = sequence
|
||||
Dim dsSchema As Global.System.Xml.Schema.XmlSchema = ds.GetSchemaSerializable
|
||||
If xs.Contains(dsSchema.TargetNamespace) Then
|
||||
Dim s1 As Global.System.IO.MemoryStream = New Global.System.IO.MemoryStream()
|
||||
Dim s2 As Global.System.IO.MemoryStream = New Global.System.IO.MemoryStream()
|
||||
Try
|
||||
Dim schema As Global.System.Xml.Schema.XmlSchema = Nothing
|
||||
dsSchema.Write(s1)
|
||||
Dim schemas As Global.System.Collections.IEnumerator = xs.Schemas(dsSchema.TargetNamespace).GetEnumerator
|
||||
Do While schemas.MoveNext
|
||||
schema = CType(schemas.Current,Global.System.Xml.Schema.XmlSchema)
|
||||
s2.SetLength(0)
|
||||
schema.Write(s2)
|
||||
If (s1.Length = s2.Length) Then
|
||||
s1.Position = 0
|
||||
s2.Position = 0
|
||||
|
||||
Do While ((s1.Position <> s1.Length) _
|
||||
AndAlso (s1.ReadByte = s2.ReadByte))
|
||||
|
||||
|
||||
Loop
|
||||
If (s1.Position = s1.Length) Then
|
||||
Return type
|
||||
End If
|
||||
End If
|
||||
|
||||
Loop
|
||||
Finally
|
||||
If (Not (s1) Is Nothing) Then
|
||||
s1.Close
|
||||
End If
|
||||
If (Not (s2) Is Nothing) Then
|
||||
s2.Close
|
||||
End If
|
||||
End Try
|
||||
End If
|
||||
xs.Add(dsSchema)
|
||||
Return type
|
||||
End Function
|
||||
|
||||
<Global.System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")> _
|
||||
Public Delegate Sub TBTEMP_INDEXRESULTSRowChangeEventHandler(ByVal sender As Object, ByVal e As TBTEMP_INDEXRESULTSRowChangeEvent)
|
||||
|
||||
'''<summary>
|
||||
'''Represents the strongly named DataTable class.
|
||||
'''</summary>
|
||||
<Global.System.Serializable(), _
|
||||
Global.System.Xml.Serialization.XmlSchemaProviderAttribute("GetTypedTableSchema")> _
|
||||
Partial Public Class TBTEMP_INDEXRESULTSDataTable
|
||||
Inherits Global.System.Data.TypedTableBase(Of TBTEMP_INDEXRESULTSRow)
|
||||
|
||||
Private columnIndexname As Global.System.Data.DataColumn
|
||||
|
||||
Private columnValue As Global.System.Data.DataColumn
|
||||
|
||||
Private columnDokumentart As Global.System.Data.DataColumn
|
||||
|
||||
<Global.System.Diagnostics.DebuggerNonUserCodeAttribute(), _
|
||||
Global.System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")> _
|
||||
Public Sub New()
|
||||
MyBase.New
|
||||
Me.TableName = "TBTEMP_INDEXRESULTS"
|
||||
Me.BeginInit
|
||||
Me.InitClass
|
||||
Me.EndInit
|
||||
End Sub
|
||||
|
||||
<Global.System.Diagnostics.DebuggerNonUserCodeAttribute(), _
|
||||
Global.System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")> _
|
||||
Friend Sub New(ByVal table As Global.System.Data.DataTable)
|
||||
MyBase.New
|
||||
Me.TableName = table.TableName
|
||||
If (table.CaseSensitive <> table.DataSet.CaseSensitive) Then
|
||||
Me.CaseSensitive = table.CaseSensitive
|
||||
End If
|
||||
If (table.Locale.ToString <> table.DataSet.Locale.ToString) Then
|
||||
Me.Locale = table.Locale
|
||||
End If
|
||||
If (table.Namespace <> table.DataSet.Namespace) Then
|
||||
Me.Namespace = table.Namespace
|
||||
End If
|
||||
Me.Prefix = table.Prefix
|
||||
Me.MinimumCapacity = table.MinimumCapacity
|
||||
End Sub
|
||||
|
||||
<Global.System.Diagnostics.DebuggerNonUserCodeAttribute(), _
|
||||
Global.System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")> _
|
||||
Protected Sub New(ByVal info As Global.System.Runtime.Serialization.SerializationInfo, ByVal context As Global.System.Runtime.Serialization.StreamingContext)
|
||||
MyBase.New(info, context)
|
||||
Me.InitVars
|
||||
End Sub
|
||||
|
||||
<Global.System.Diagnostics.DebuggerNonUserCodeAttribute(), _
|
||||
Global.System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")> _
|
||||
Public ReadOnly Property IndexnameColumn() As Global.System.Data.DataColumn
|
||||
Get
|
||||
Return Me.columnIndexname
|
||||
End Get
|
||||
End Property
|
||||
|
||||
<Global.System.Diagnostics.DebuggerNonUserCodeAttribute(), _
|
||||
Global.System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")> _
|
||||
Public ReadOnly Property ValueColumn() As Global.System.Data.DataColumn
|
||||
Get
|
||||
Return Me.columnValue
|
||||
End Get
|
||||
End Property
|
||||
|
||||
<Global.System.Diagnostics.DebuggerNonUserCodeAttribute(), _
|
||||
Global.System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")> _
|
||||
Public ReadOnly Property DokumentartColumn() As Global.System.Data.DataColumn
|
||||
Get
|
||||
Return Me.columnDokumentart
|
||||
End Get
|
||||
End Property
|
||||
|
||||
<Global.System.Diagnostics.DebuggerNonUserCodeAttribute(), _
|
||||
Global.System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0"), _
|
||||
Global.System.ComponentModel.Browsable(false)> _
|
||||
Public ReadOnly Property Count() As Integer
|
||||
Get
|
||||
Return Me.Rows.Count
|
||||
End Get
|
||||
End Property
|
||||
|
||||
<Global.System.Diagnostics.DebuggerNonUserCodeAttribute(), _
|
||||
Global.System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")> _
|
||||
Public Default ReadOnly Property Item(ByVal index As Integer) As TBTEMP_INDEXRESULTSRow
|
||||
Get
|
||||
Return CType(Me.Rows(index),TBTEMP_INDEXRESULTSRow)
|
||||
End Get
|
||||
End Property
|
||||
|
||||
<Global.System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")> _
|
||||
Public Event TBTEMP_INDEXRESULTSRowChanging As TBTEMP_INDEXRESULTSRowChangeEventHandler
|
||||
|
||||
<Global.System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")> _
|
||||
Public Event TBTEMP_INDEXRESULTSRowChanged As TBTEMP_INDEXRESULTSRowChangeEventHandler
|
||||
|
||||
<Global.System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")> _
|
||||
Public Event TBTEMP_INDEXRESULTSRowDeleting As TBTEMP_INDEXRESULTSRowChangeEventHandler
|
||||
|
||||
<Global.System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")> _
|
||||
Public Event TBTEMP_INDEXRESULTSRowDeleted As TBTEMP_INDEXRESULTSRowChangeEventHandler
|
||||
|
||||
<Global.System.Diagnostics.DebuggerNonUserCodeAttribute(), _
|
||||
Global.System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")> _
|
||||
Public Overloads Sub AddTBTEMP_INDEXRESULTSRow(ByVal row As TBTEMP_INDEXRESULTSRow)
|
||||
Me.Rows.Add(row)
|
||||
End Sub
|
||||
|
||||
<Global.System.Diagnostics.DebuggerNonUserCodeAttribute(), _
|
||||
Global.System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")> _
|
||||
Public Overloads Function AddTBTEMP_INDEXRESULTSRow(ByVal Indexname As String, ByVal Value As String, ByVal Dokumentart As String) As TBTEMP_INDEXRESULTSRow
|
||||
Dim rowTBTEMP_INDEXRESULTSRow As TBTEMP_INDEXRESULTSRow = CType(Me.NewRow,TBTEMP_INDEXRESULTSRow)
|
||||
Dim columnValuesArray() As Object = New Object() {Indexname, Value, Dokumentart}
|
||||
rowTBTEMP_INDEXRESULTSRow.ItemArray = columnValuesArray
|
||||
Me.Rows.Add(rowTBTEMP_INDEXRESULTSRow)
|
||||
Return rowTBTEMP_INDEXRESULTSRow
|
||||
End Function
|
||||
|
||||
<Global.System.Diagnostics.DebuggerNonUserCodeAttribute(), _
|
||||
Global.System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")> _
|
||||
Public Overrides Function Clone() As Global.System.Data.DataTable
|
||||
Dim cln As TBTEMP_INDEXRESULTSDataTable = CType(MyBase.Clone,TBTEMP_INDEXRESULTSDataTable)
|
||||
cln.InitVars
|
||||
Return cln
|
||||
End Function
|
||||
|
||||
<Global.System.Diagnostics.DebuggerNonUserCodeAttribute(), _
|
||||
Global.System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")> _
|
||||
Protected Overrides Function CreateInstance() As Global.System.Data.DataTable
|
||||
Return New TBTEMP_INDEXRESULTSDataTable()
|
||||
End Function
|
||||
|
||||
<Global.System.Diagnostics.DebuggerNonUserCodeAttribute(), _
|
||||
Global.System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")> _
|
||||
Friend Sub InitVars()
|
||||
Me.columnIndexname = MyBase.Columns("Indexname")
|
||||
Me.columnValue = MyBase.Columns("Value")
|
||||
Me.columnDokumentart = MyBase.Columns("Dokumentart")
|
||||
End Sub
|
||||
|
||||
<Global.System.Diagnostics.DebuggerNonUserCodeAttribute(), _
|
||||
Global.System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")> _
|
||||
Private Sub InitClass()
|
||||
Me.columnIndexname = New Global.System.Data.DataColumn("Indexname", GetType(String), Nothing, Global.System.Data.MappingType.Element)
|
||||
MyBase.Columns.Add(Me.columnIndexname)
|
||||
Me.columnValue = New Global.System.Data.DataColumn("Value", GetType(String), Nothing, Global.System.Data.MappingType.Element)
|
||||
MyBase.Columns.Add(Me.columnValue)
|
||||
Me.columnDokumentart = New Global.System.Data.DataColumn("Dokumentart", GetType(String), Nothing, Global.System.Data.MappingType.Element)
|
||||
MyBase.Columns.Add(Me.columnDokumentart)
|
||||
End Sub
|
||||
|
||||
<Global.System.Diagnostics.DebuggerNonUserCodeAttribute(), _
|
||||
Global.System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")> _
|
||||
Public Function NewTBTEMP_INDEXRESULTSRow() As TBTEMP_INDEXRESULTSRow
|
||||
Return CType(Me.NewRow,TBTEMP_INDEXRESULTSRow)
|
||||
End Function
|
||||
|
||||
<Global.System.Diagnostics.DebuggerNonUserCodeAttribute(), _
|
||||
Global.System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")> _
|
||||
Protected Overrides Function NewRowFromBuilder(ByVal builder As Global.System.Data.DataRowBuilder) As Global.System.Data.DataRow
|
||||
Return New TBTEMP_INDEXRESULTSRow(builder)
|
||||
End Function
|
||||
|
||||
<Global.System.Diagnostics.DebuggerNonUserCodeAttribute(), _
|
||||
Global.System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")> _
|
||||
Protected Overrides Function GetRowType() As Global.System.Type
|
||||
Return GetType(TBTEMP_INDEXRESULTSRow)
|
||||
End Function
|
||||
|
||||
<Global.System.Diagnostics.DebuggerNonUserCodeAttribute(), _
|
||||
Global.System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")> _
|
||||
Protected Overrides Sub OnRowChanged(ByVal e As Global.System.Data.DataRowChangeEventArgs)
|
||||
MyBase.OnRowChanged(e)
|
||||
If (Not (Me.TBTEMP_INDEXRESULTSRowChangedEvent) Is Nothing) Then
|
||||
RaiseEvent TBTEMP_INDEXRESULTSRowChanged(Me, New TBTEMP_INDEXRESULTSRowChangeEvent(CType(e.Row,TBTEMP_INDEXRESULTSRow), e.Action))
|
||||
End If
|
||||
End Sub
|
||||
|
||||
<Global.System.Diagnostics.DebuggerNonUserCodeAttribute(), _
|
||||
Global.System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")> _
|
||||
Protected Overrides Sub OnRowChanging(ByVal e As Global.System.Data.DataRowChangeEventArgs)
|
||||
MyBase.OnRowChanging(e)
|
||||
If (Not (Me.TBTEMP_INDEXRESULTSRowChangingEvent) Is Nothing) Then
|
||||
RaiseEvent TBTEMP_INDEXRESULTSRowChanging(Me, New TBTEMP_INDEXRESULTSRowChangeEvent(CType(e.Row,TBTEMP_INDEXRESULTSRow), e.Action))
|
||||
End If
|
||||
End Sub
|
||||
|
||||
<Global.System.Diagnostics.DebuggerNonUserCodeAttribute(), _
|
||||
Global.System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")> _
|
||||
Protected Overrides Sub OnRowDeleted(ByVal e As Global.System.Data.DataRowChangeEventArgs)
|
||||
MyBase.OnRowDeleted(e)
|
||||
If (Not (Me.TBTEMP_INDEXRESULTSRowDeletedEvent) Is Nothing) Then
|
||||
RaiseEvent TBTEMP_INDEXRESULTSRowDeleted(Me, New TBTEMP_INDEXRESULTSRowChangeEvent(CType(e.Row,TBTEMP_INDEXRESULTSRow), e.Action))
|
||||
End If
|
||||
End Sub
|
||||
|
||||
<Global.System.Diagnostics.DebuggerNonUserCodeAttribute(), _
|
||||
Global.System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")> _
|
||||
Protected Overrides Sub OnRowDeleting(ByVal e As Global.System.Data.DataRowChangeEventArgs)
|
||||
MyBase.OnRowDeleting(e)
|
||||
If (Not (Me.TBTEMP_INDEXRESULTSRowDeletingEvent) Is Nothing) Then
|
||||
RaiseEvent TBTEMP_INDEXRESULTSRowDeleting(Me, New TBTEMP_INDEXRESULTSRowChangeEvent(CType(e.Row,TBTEMP_INDEXRESULTSRow), e.Action))
|
||||
End If
|
||||
End Sub
|
||||
|
||||
<Global.System.Diagnostics.DebuggerNonUserCodeAttribute(), _
|
||||
Global.System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")> _
|
||||
Public Sub RemoveTBTEMP_INDEXRESULTSRow(ByVal row As TBTEMP_INDEXRESULTSRow)
|
||||
Me.Rows.Remove(row)
|
||||
End Sub
|
||||
|
||||
<Global.System.Diagnostics.DebuggerNonUserCodeAttribute(), _
|
||||
Global.System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")> _
|
||||
Public Shared Function GetTypedTableSchema(ByVal xs As Global.System.Xml.Schema.XmlSchemaSet) As Global.System.Xml.Schema.XmlSchemaComplexType
|
||||
Dim type As Global.System.Xml.Schema.XmlSchemaComplexType = New Global.System.Xml.Schema.XmlSchemaComplexType()
|
||||
Dim sequence As Global.System.Xml.Schema.XmlSchemaSequence = New Global.System.Xml.Schema.XmlSchemaSequence()
|
||||
Dim ds As GlobixDataset = New GlobixDataset()
|
||||
Dim any1 As Global.System.Xml.Schema.XmlSchemaAny = New Global.System.Xml.Schema.XmlSchemaAny()
|
||||
any1.Namespace = "http://www.w3.org/2001/XMLSchema"
|
||||
any1.MinOccurs = New Decimal(0)
|
||||
any1.MaxOccurs = Decimal.MaxValue
|
||||
any1.ProcessContents = Global.System.Xml.Schema.XmlSchemaContentProcessing.Lax
|
||||
sequence.Items.Add(any1)
|
||||
Dim any2 As Global.System.Xml.Schema.XmlSchemaAny = New Global.System.Xml.Schema.XmlSchemaAny()
|
||||
any2.Namespace = "urn:schemas-microsoft-com:xml-diffgram-v1"
|
||||
any2.MinOccurs = New Decimal(1)
|
||||
any2.ProcessContents = Global.System.Xml.Schema.XmlSchemaContentProcessing.Lax
|
||||
sequence.Items.Add(any2)
|
||||
Dim attribute1 As Global.System.Xml.Schema.XmlSchemaAttribute = New Global.System.Xml.Schema.XmlSchemaAttribute()
|
||||
attribute1.Name = "namespace"
|
||||
attribute1.FixedValue = ds.Namespace
|
||||
type.Attributes.Add(attribute1)
|
||||
Dim attribute2 As Global.System.Xml.Schema.XmlSchemaAttribute = New Global.System.Xml.Schema.XmlSchemaAttribute()
|
||||
attribute2.Name = "tableTypeName"
|
||||
attribute2.FixedValue = "TBTEMP_INDEXRESULTSDataTable"
|
||||
type.Attributes.Add(attribute2)
|
||||
type.Particle = sequence
|
||||
Dim dsSchema As Global.System.Xml.Schema.XmlSchema = ds.GetSchemaSerializable
|
||||
If xs.Contains(dsSchema.TargetNamespace) Then
|
||||
Dim s1 As Global.System.IO.MemoryStream = New Global.System.IO.MemoryStream()
|
||||
Dim s2 As Global.System.IO.MemoryStream = New Global.System.IO.MemoryStream()
|
||||
Try
|
||||
Dim schema As Global.System.Xml.Schema.XmlSchema = Nothing
|
||||
dsSchema.Write(s1)
|
||||
Dim schemas As Global.System.Collections.IEnumerator = xs.Schemas(dsSchema.TargetNamespace).GetEnumerator
|
||||
Do While schemas.MoveNext
|
||||
schema = CType(schemas.Current,Global.System.Xml.Schema.XmlSchema)
|
||||
s2.SetLength(0)
|
||||
schema.Write(s2)
|
||||
If (s1.Length = s2.Length) Then
|
||||
s1.Position = 0
|
||||
s2.Position = 0
|
||||
|
||||
Do While ((s1.Position <> s1.Length) _
|
||||
AndAlso (s1.ReadByte = s2.ReadByte))
|
||||
|
||||
|
||||
Loop
|
||||
If (s1.Position = s1.Length) Then
|
||||
Return type
|
||||
End If
|
||||
End If
|
||||
|
||||
Loop
|
||||
Finally
|
||||
If (Not (s1) Is Nothing) Then
|
||||
s1.Close
|
||||
End If
|
||||
If (Not (s2) Is Nothing) Then
|
||||
s2.Close
|
||||
End If
|
||||
End Try
|
||||
End If
|
||||
xs.Add(dsSchema)
|
||||
Return type
|
||||
End Function
|
||||
End Class
|
||||
|
||||
'''<summary>
|
||||
'''Represents strongly named DataRow class.
|
||||
'''</summary>
|
||||
Partial Public Class TBTEMP_INDEXRESULTSRow
|
||||
Inherits Global.System.Data.DataRow
|
||||
|
||||
Private tableTBTEMP_INDEXRESULTS As TBTEMP_INDEXRESULTSDataTable
|
||||
|
||||
<Global.System.Diagnostics.DebuggerNonUserCodeAttribute(), _
|
||||
Global.System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")> _
|
||||
Friend Sub New(ByVal rb As Global.System.Data.DataRowBuilder)
|
||||
MyBase.New(rb)
|
||||
Me.tableTBTEMP_INDEXRESULTS = CType(Me.Table,TBTEMP_INDEXRESULTSDataTable)
|
||||
End Sub
|
||||
|
||||
<Global.System.Diagnostics.DebuggerNonUserCodeAttribute(), _
|
||||
Global.System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")> _
|
||||
Public Property Indexname() As String
|
||||
Get
|
||||
Try
|
||||
Return CType(Me(Me.tableTBTEMP_INDEXRESULTS.IndexnameColumn),String)
|
||||
Catch e As Global.System.InvalidCastException
|
||||
Throw New Global.System.Data.StrongTypingException("Der Wert für Spalte Indexname in Tabelle TBTEMP_INDEXRESULTS ist DBNull.", e)
|
||||
End Try
|
||||
End Get
|
||||
Set
|
||||
Me(Me.tableTBTEMP_INDEXRESULTS.IndexnameColumn) = value
|
||||
End Set
|
||||
End Property
|
||||
|
||||
<Global.System.Diagnostics.DebuggerNonUserCodeAttribute(), _
|
||||
Global.System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")> _
|
||||
Public Property Value() As String
|
||||
Get
|
||||
Try
|
||||
Return CType(Me(Me.tableTBTEMP_INDEXRESULTS.ValueColumn),String)
|
||||
Catch e As Global.System.InvalidCastException
|
||||
Throw New Global.System.Data.StrongTypingException("Der Wert für Spalte Value in Tabelle TBTEMP_INDEXRESULTS ist DBNull.", e)
|
||||
End Try
|
||||
End Get
|
||||
Set
|
||||
Me(Me.tableTBTEMP_INDEXRESULTS.ValueColumn) = value
|
||||
End Set
|
||||
End Property
|
||||
|
||||
<Global.System.Diagnostics.DebuggerNonUserCodeAttribute(), _
|
||||
Global.System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")> _
|
||||
Public Property Dokumentart() As String
|
||||
Get
|
||||
Try
|
||||
Return CType(Me(Me.tableTBTEMP_INDEXRESULTS.DokumentartColumn),String)
|
||||
Catch e As Global.System.InvalidCastException
|
||||
Throw New Global.System.Data.StrongTypingException("Der Wert für Spalte Dokumentart in Tabelle TBTEMP_INDEXRESULTS ist DBNull.", e)
|
||||
End Try
|
||||
End Get
|
||||
Set
|
||||
Me(Me.tableTBTEMP_INDEXRESULTS.DokumentartColumn) = value
|
||||
End Set
|
||||
End Property
|
||||
|
||||
<Global.System.Diagnostics.DebuggerNonUserCodeAttribute(), _
|
||||
Global.System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")> _
|
||||
Public Function IsIndexnameNull() As Boolean
|
||||
Return Me.IsNull(Me.tableTBTEMP_INDEXRESULTS.IndexnameColumn)
|
||||
End Function
|
||||
|
||||
<Global.System.Diagnostics.DebuggerNonUserCodeAttribute(), _
|
||||
Global.System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")> _
|
||||
Public Sub SetIndexnameNull()
|
||||
Me(Me.tableTBTEMP_INDEXRESULTS.IndexnameColumn) = Global.System.Convert.DBNull
|
||||
End Sub
|
||||
|
||||
<Global.System.Diagnostics.DebuggerNonUserCodeAttribute(), _
|
||||
Global.System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")> _
|
||||
Public Function IsValueNull() As Boolean
|
||||
Return Me.IsNull(Me.tableTBTEMP_INDEXRESULTS.ValueColumn)
|
||||
End Function
|
||||
|
||||
<Global.System.Diagnostics.DebuggerNonUserCodeAttribute(), _
|
||||
Global.System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")> _
|
||||
Public Sub SetValueNull()
|
||||
Me(Me.tableTBTEMP_INDEXRESULTS.ValueColumn) = Global.System.Convert.DBNull
|
||||
End Sub
|
||||
|
||||
<Global.System.Diagnostics.DebuggerNonUserCodeAttribute(), _
|
||||
Global.System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")> _
|
||||
Public Function IsDokumentartNull() As Boolean
|
||||
Return Me.IsNull(Me.tableTBTEMP_INDEXRESULTS.DokumentartColumn)
|
||||
End Function
|
||||
|
||||
<Global.System.Diagnostics.DebuggerNonUserCodeAttribute(), _
|
||||
Global.System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")> _
|
||||
Public Sub SetDokumentartNull()
|
||||
Me(Me.tableTBTEMP_INDEXRESULTS.DokumentartColumn) = Global.System.Convert.DBNull
|
||||
End Sub
|
||||
End Class
|
||||
|
||||
'''<summary>
|
||||
'''Row event argument class
|
||||
'''</summary>
|
||||
<Global.System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")> _
|
||||
Public Class TBTEMP_INDEXRESULTSRowChangeEvent
|
||||
Inherits Global.System.EventArgs
|
||||
|
||||
Private eventRow As TBTEMP_INDEXRESULTSRow
|
||||
|
||||
Private eventAction As Global.System.Data.DataRowAction
|
||||
|
||||
<Global.System.Diagnostics.DebuggerNonUserCodeAttribute(), _
|
||||
Global.System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")> _
|
||||
Public Sub New(ByVal row As TBTEMP_INDEXRESULTSRow, ByVal action As Global.System.Data.DataRowAction)
|
||||
MyBase.New
|
||||
Me.eventRow = row
|
||||
Me.eventAction = action
|
||||
End Sub
|
||||
|
||||
<Global.System.Diagnostics.DebuggerNonUserCodeAttribute(), _
|
||||
Global.System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")> _
|
||||
Public ReadOnly Property Row() As TBTEMP_INDEXRESULTSRow
|
||||
Get
|
||||
Return Me.eventRow
|
||||
End Get
|
||||
End Property
|
||||
|
||||
<Global.System.Diagnostics.DebuggerNonUserCodeAttribute(), _
|
||||
Global.System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")> _
|
||||
Public ReadOnly Property Action() As Global.System.Data.DataRowAction
|
||||
Get
|
||||
Return Me.eventAction
|
||||
End Get
|
||||
End Property
|
||||
End Class
|
||||
End Class
|
||||
9
GUIs.ZooFlow/Globix/GlobixDataset.xsc
Normal file
9
GUIs.ZooFlow/Globix/GlobixDataset.xsc
Normal file
@@ -0,0 +1,9 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<!--<autogenerated>
|
||||
This code was generated by a tool.
|
||||
Changes to this file may cause incorrect behavior and will be lost if
|
||||
the code is regenerated.
|
||||
</autogenerated>-->
|
||||
<DataSetUISetting Version="1.00" xmlns="urn:schemas-microsoft-com:xml-msdatasource">
|
||||
<TableUISettings />
|
||||
</DataSetUISetting>
|
||||
27
GUIs.ZooFlow/Globix/GlobixDataset.xsd
Normal file
27
GUIs.ZooFlow/Globix/GlobixDataset.xsd
Normal file
@@ -0,0 +1,27 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<xs:schema id="GlobixDataset" targetNamespace="http://tempuri.org/GlobixDataset.xsd" xmlns:mstns="http://tempuri.org/GlobixDataset.xsd" xmlns="http://tempuri.org/GlobixDataset.xsd" xmlns:xs="http://www.w3.org/2001/XMLSchema" xmlns:msdata="urn:schemas-microsoft-com:xml-msdata" xmlns:msprop="urn:schemas-microsoft-com:xml-msprop" attributeFormDefault="qualified" elementFormDefault="qualified">
|
||||
<xs:annotation>
|
||||
<xs:appinfo source="urn:schemas-microsoft-com:xml-msdatasource">
|
||||
<DataSource DefaultConnectionIndex="0" FunctionsComponentName="QueriesTableAdapter" Modifier="AutoLayout, AnsiClass, Class, Public" SchemaSerializationMode="IncludeSchema" xmlns="urn:schemas-microsoft-com:xml-msdatasource">
|
||||
<Connections />
|
||||
<Tables />
|
||||
<Sources />
|
||||
</DataSource>
|
||||
</xs:appinfo>
|
||||
</xs:annotation>
|
||||
<xs:element name="GlobixDataset" msdata:IsDataSet="true" msdata:UseCurrentLocale="true" msprop:EnableTableAdapterManager="true" msprop:Generator_DataSetName="GlobixDataset" msprop:Generator_UserDSName="GlobixDataset">
|
||||
<xs:complexType>
|
||||
<xs:choice minOccurs="0" maxOccurs="unbounded">
|
||||
<xs:element name="TBTEMP_INDEXRESULTS" msprop:Generator_TableClassName="TBTEMP_INDEXRESULTSDataTable" msprop:Generator_TableVarName="tableTBTEMP_INDEXRESULTS" msprop:Generator_TablePropName="TBTEMP_INDEXRESULTS" msprop:Generator_RowDeletingName="TBTEMP_INDEXRESULTSRowDeleting" msprop:Generator_RowChangingName="TBTEMP_INDEXRESULTSRowChanging" msprop:Generator_RowEvHandlerName="TBTEMP_INDEXRESULTSRowChangeEventHandler" msprop:Generator_RowDeletedName="TBTEMP_INDEXRESULTSRowDeleted" msprop:Generator_UserTableName="TBTEMP_INDEXRESULTS" msprop:Generator_RowChangedName="TBTEMP_INDEXRESULTSRowChanged" msprop:Generator_RowEvArgName="TBTEMP_INDEXRESULTSRowChangeEvent" msprop:Generator_RowClassName="TBTEMP_INDEXRESULTSRow">
|
||||
<xs:complexType>
|
||||
<xs:sequence>
|
||||
<xs:element name="Indexname" msprop:Generator_ColumnVarNameInTable="columnIndexname" msprop:Generator_ColumnPropNameInRow="Indexname" msprop:Generator_ColumnPropNameInTable="IndexnameColumn" msprop:Generator_UserColumnName="Indexname" type="xs:string" minOccurs="0" />
|
||||
<xs:element name="Value" msprop:Generator_ColumnVarNameInTable="columnValue" msprop:Generator_ColumnPropNameInRow="Value" msprop:Generator_ColumnPropNameInTable="ValueColumn" msprop:Generator_UserColumnName="Value" type="xs:string" minOccurs="0" />
|
||||
<xs:element name="Dokumentart" msprop:Generator_ColumnVarNameInTable="columnDokumentart" msprop:Generator_ColumnPropNameInRow="Dokumentart" msprop:Generator_ColumnPropNameInTable="DokumentartColumn" msprop:Generator_UserColumnName="Dokumentart" type="xs:string" minOccurs="0" />
|
||||
</xs:sequence>
|
||||
</xs:complexType>
|
||||
</xs:element>
|
||||
</xs:choice>
|
||||
</xs:complexType>
|
||||
</xs:element>
|
||||
</xs:schema>
|
||||
12
GUIs.ZooFlow/Globix/GlobixDataset.xss
Normal file
12
GUIs.ZooFlow/Globix/GlobixDataset.xss
Normal file
@@ -0,0 +1,12 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<!--<autogenerated>
|
||||
This code was generated by a tool to store the dataset designer's layout information.
|
||||
Changes to this file may cause incorrect behavior and will be lost if
|
||||
the code is regenerated.
|
||||
</autogenerated>-->
|
||||
<DiagramLayout xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema" ex:showrelationlabel="False" ViewPortX="-10" ViewPortY="-10" xmlns:ex="urn:schemas-microsoft-com:xml-msdatasource-layout-extended" xmlns="urn:schemas-microsoft-com:xml-msdatasource-layout">
|
||||
<Shapes>
|
||||
<Shape ID="DesignTable:TBTEMP_INDEXRESULTS" ZOrder="1" X="0" Y="0" Height="86" Width="208" AdapterExpanded="true" DataTableExpanded="true" OldAdapterHeight="0" OldDataTableHeight="0" SplitterPosition="86" />
|
||||
</Shapes>
|
||||
<Connectors />
|
||||
</DiagramLayout>
|
||||
@@ -53,7 +53,7 @@ Public Class GlobixPatterns
|
||||
_Logger.Debug($"inputString BEFORE replacing: [{result}]")
|
||||
result = ReplaceInternalValues(result)
|
||||
result = ReplaceControlValues(result, panel)
|
||||
result = ReplaceIDBAttributes(My.Application.Globix.CURRENT_DOC_ID, result, pissql)
|
||||
result = ReplaceIDBAttributes(My.Application.Globix.CURRENT_IDB_OBJ_ID, result, pissql)
|
||||
result = ReplaceUserValues(result, prename, surname, shortname, language, email, userId, profileId)
|
||||
_Logger.Debug($"inputString AFTER replacing: [{result}]")
|
||||
Return result
|
||||
|
||||
@@ -1,4 +1,6 @@
|
||||
Namespace Globix
|
||||
Imports System.IO
|
||||
|
||||
Namespace Globix
|
||||
Public Class State
|
||||
Public Property DT_FUNCTION_REGEX As DataTable
|
||||
Public Property DTACTUAL_FILES As DataTable
|
||||
@@ -7,13 +9,18 @@
|
||||
Public Property TEMP_FILES As List(Of String) = New List(Of String)
|
||||
Public Property CurrMessageID As String
|
||||
Public Property CURRENT_FILENAME As String
|
||||
Public Property CURRENT_FOLDERWATCH As String
|
||||
Public Property CURRENT_SCAN_FOLDERWATCH As String
|
||||
Public Property CURRENT_WORKFILE_GUID As Long
|
||||
Public Property CURRENT_WORKFILE As String
|
||||
Public Property CURRENT_WORKFILE_EXTENSION As String
|
||||
Public Property CURRENT_NEWFILENAME As String
|
||||
Public Property CURRENT_DOC_ID As Long
|
||||
Public Property ABORT_INDEXING As Boolean = False
|
||||
Public Property CURRENT_MESSAGEDATE As String
|
||||
|
||||
Public Property CURRENT_MESSAGESUBJECT As String
|
||||
Public Property CURRENT_IDB_OBJ_ID As Long
|
||||
Public Property INDEXING_ACTIVE As Boolean = False
|
||||
Public Property ABORT_INDEXING As Boolean = False
|
||||
Public Property CURRENT_ISATTACHMENT As Boolean = False
|
||||
Public Property CURR_DELETE_ORIGIN As Boolean = False
|
||||
Public Property CURRENT_DROPTYPE As String
|
||||
@@ -32,7 +39,10 @@
|
||||
Public Property VERSION_DELIMITER As String
|
||||
Public Property CURRENT_MESSAGEID As String
|
||||
Public Property CURRENT_BusinessEntity As String
|
||||
Public Property Folderwatchstarted As Boolean = False
|
||||
|
||||
Public Property DTEXCLUDE_FILES As DataTable
|
||||
Public PATH_FileExclusions As String = Path.Combine(Application.UserAppDataPath(), "FileExclusions.xml")
|
||||
Public Function FileExistsinDropTable(Filename As String) As Boolean
|
||||
Dim oSQL As String
|
||||
Try
|
||||
@@ -53,6 +63,71 @@
|
||||
End Try
|
||||
|
||||
End Function
|
||||
Public Function LoadFileExclusion() As Boolean
|
||||
Dim rowresult As String = ""
|
||||
Try
|
||||
'if file doesn't exist, create the file with its default xml table
|
||||
If Not File.Exists(PATH_FileExclusions) Then
|
||||
DTEXCLUDE_FILES = CreateExclusionTable()
|
||||
DTEXCLUDE_FILES.WriteXml(PATH_FileExclusions)
|
||||
End If
|
||||
DTEXCLUDE_FILES = GetTablefromXML()
|
||||
|
||||
'For Each Row As DataRow In DT.Rows
|
||||
' rowresult &= Row.Item("FILE_CONTAIN")
|
||||
' Select Case Row.Item("FILE_^^CONTAIN")
|
||||
|
||||
' End Select
|
||||
|
||||
'Next
|
||||
Return True
|
||||
Catch ex As Exception
|
||||
MsgBox("Error in ModuleUserSavings-LoadFileExclusion" & vbNewLine & ex.Message, MsgBoxStyle.Critical)
|
||||
Return False
|
||||
End Try
|
||||
Return True
|
||||
|
||||
End Function
|
||||
Private Function CreateExclusionTable() As DataTable
|
||||
Try
|
||||
' Create sample Customers table, in order
|
||||
' to demonstrate the behavior of the DataTableReader.
|
||||
Dim oMyExclusions As New DataTable
|
||||
oMyExclusions.TableName = "TBEXCLUSION"
|
||||
|
||||
' Create two columns, ID and Name.
|
||||
oMyExclusions.Columns.Add("FILE_CONTAIN", GetType(System.String))
|
||||
Dim newRow As DataRow = oMyExclusions.NewRow()
|
||||
newRow("FILE_CONTAIN") = "Thumbs"
|
||||
oMyExclusions.Rows.Add(newRow)
|
||||
Dim newRow1 As DataRow = oMyExclusions.NewRow()
|
||||
newRow1("FILE_CONTAIN") = "\~$"
|
||||
oMyExclusions.Rows.Add(newRow1)
|
||||
Dim newRow2 As DataRow = oMyExclusions.NewRow()
|
||||
newRow2("FILE_CONTAIN") = ".db"
|
||||
oMyExclusions.Rows.Add(newRow2)
|
||||
Dim newRow3 As DataRow = oMyExclusions.NewRow()
|
||||
newRow3("FILE_CONTAIN") = "desktop.ini"
|
||||
oMyExclusions.Rows.Add(newRow3)
|
||||
oMyExclusions.AcceptChanges()
|
||||
Return oMyExclusions
|
||||
Catch ex As Exception
|
||||
MsgBox("Error in CreateExclusionTable" & vbNewLine & ex.Message, MsgBoxStyle.Critical)
|
||||
Return Nothing
|
||||
End Try
|
||||
End Function
|
||||
Private Function GetTablefromXML() As DataTable
|
||||
Try
|
||||
Dim DS As New DataSet
|
||||
DS.ReadXml(PATH_FileExclusions)
|
||||
Return DS.Tables(0)
|
||||
Catch ex As Exception
|
||||
MsgBox("Error in GetTablefromXML" & vbNewLine & ex.Message, MsgBoxStyle.Critical)
|
||||
Return Nothing
|
||||
End Try
|
||||
|
||||
End Function
|
||||
|
||||
End Class
|
||||
End Namespace
|
||||
|
||||
|
||||
199
GUIs.ZooFlow/Globix/frmGlobixBasicConfig.Designer.vb
generated
Normal file
199
GUIs.ZooFlow/Globix/frmGlobixBasicConfig.Designer.vb
generated
Normal file
@@ -0,0 +1,199 @@
|
||||
<Global.Microsoft.VisualBasic.CompilerServices.DesignerGenerated()> _
|
||||
Partial Class frmGlobixBasicConfig
|
||||
Inherits DevExpress.XtraEditors.XtraForm
|
||||
|
||||
'Das Formular überschreibt den Löschvorgang, um die Komponentenliste zu bereinigen.
|
||||
<System.Diagnostics.DebuggerNonUserCode()> _
|
||||
Protected Overrides Sub Dispose(ByVal disposing As Boolean)
|
||||
Try
|
||||
If disposing AndAlso components IsNot Nothing Then
|
||||
components.Dispose()
|
||||
End If
|
||||
Finally
|
||||
MyBase.Dispose(disposing)
|
||||
End Try
|
||||
End Sub
|
||||
|
||||
'Wird vom Windows Form-Designer benötigt.
|
||||
Private components As System.ComponentModel.IContainer
|
||||
|
||||
'Hinweis: Die folgende Prozedur ist für den Windows Form-Designer erforderlich.
|
||||
'Das Bearbeiten ist mit dem Windows Form-Designer möglich.
|
||||
'Das Bearbeiten mit dem Code-Editor ist nicht möglich.
|
||||
<System.Diagnostics.DebuggerStepThrough()> _
|
||||
Private Sub InitializeComponent()
|
||||
Dim DataGridViewCellStyle3 As System.Windows.Forms.DataGridViewCellStyle = New System.Windows.Forms.DataGridViewCellStyle()
|
||||
Me.Label1 = New System.Windows.Forms.Label()
|
||||
Me.Label2 = New System.Windows.Forms.Label()
|
||||
Me.txtFolderWatch = New System.Windows.Forms.TextBox()
|
||||
Me.txtScanFolderWatch = New System.Windows.Forms.TextBox()
|
||||
Me.Button1 = New System.Windows.Forms.Button()
|
||||
Me.Button2 = New System.Windows.Forms.Button()
|
||||
Me.OpenFileDialog1 = New System.Windows.Forms.OpenFileDialog()
|
||||
Me.Label8 = New System.Windows.Forms.Label()
|
||||
Me.DataGridView1 = New System.Windows.Forms.DataGridView()
|
||||
Me.btnSaveExclusionFiles = New System.Windows.Forms.Button()
|
||||
Me.btnstartstop2 = New System.Windows.Forms.Button()
|
||||
Me.btnstartstop1 = New System.Windows.Forms.Button()
|
||||
CType(Me.DataGridView1, System.ComponentModel.ISupportInitialize).BeginInit()
|
||||
Me.SuspendLayout()
|
||||
'
|
||||
'Label1
|
||||
'
|
||||
Me.Label1.AutoSize = True
|
||||
Me.Label1.Location = New System.Drawing.Point(9, 13)
|
||||
Me.Label1.Name = "Label1"
|
||||
Me.Label1.Size = New System.Drawing.Size(295, 13)
|
||||
Me.Label1.TabIndex = 0
|
||||
Me.Label1.Text = "Definieren Sie hier den Ordner welcher überwacht wird:"
|
||||
'
|
||||
'Label2
|
||||
'
|
||||
Me.Label2.AutoSize = True
|
||||
Me.Label2.Location = New System.Drawing.Point(12, 93)
|
||||
Me.Label2.Name = "Label2"
|
||||
Me.Label2.Size = New System.Drawing.Size(392, 13)
|
||||
Me.Label2.TabIndex = 1
|
||||
Me.Label2.Text = "Definieren Sie hier den Ordner der für Scan2Folder verwendet werden soll:"
|
||||
'
|
||||
'txtFolderWatch
|
||||
'
|
||||
Me.txtFolderWatch.Location = New System.Drawing.Point(12, 30)
|
||||
Me.txtFolderWatch.Name = "txtFolderWatch"
|
||||
Me.txtFolderWatch.Size = New System.Drawing.Size(679, 22)
|
||||
Me.txtFolderWatch.TabIndex = 2
|
||||
'
|
||||
'txtScanFolderWatch
|
||||
'
|
||||
Me.txtScanFolderWatch.Location = New System.Drawing.Point(12, 109)
|
||||
Me.txtScanFolderWatch.Name = "txtScanFolderWatch"
|
||||
Me.txtScanFolderWatch.Size = New System.Drawing.Size(679, 22)
|
||||
Me.txtScanFolderWatch.TabIndex = 3
|
||||
'
|
||||
'Button1
|
||||
'
|
||||
Me.Button1.Location = New System.Drawing.Point(697, 30)
|
||||
Me.Button1.Name = "Button1"
|
||||
Me.Button1.Size = New System.Drawing.Size(29, 23)
|
||||
Me.Button1.TabIndex = 4
|
||||
Me.Button1.Text = "..."
|
||||
Me.Button1.UseVisualStyleBackColor = True
|
||||
'
|
||||
'Button2
|
||||
'
|
||||
Me.Button2.Location = New System.Drawing.Point(697, 107)
|
||||
Me.Button2.Name = "Button2"
|
||||
Me.Button2.Size = New System.Drawing.Size(29, 23)
|
||||
Me.Button2.TabIndex = 5
|
||||
Me.Button2.Text = "..."
|
||||
Me.Button2.UseVisualStyleBackColor = True
|
||||
'
|
||||
'OpenFileDialog1
|
||||
'
|
||||
Me.OpenFileDialog1.FileName = "OpenFileDialog1"
|
||||
'
|
||||
'Label8
|
||||
'
|
||||
Me.Label8.AutoSize = True
|
||||
Me.Label8.ImeMode = System.Windows.Forms.ImeMode.NoControl
|
||||
Me.Label8.Location = New System.Drawing.Point(9, 186)
|
||||
Me.Label8.Name = "Label8"
|
||||
Me.Label8.Size = New System.Drawing.Size(453, 26)
|
||||
Me.Label8.TabIndex = 16
|
||||
Me.Label8.Text = "Definieren Sie hier Inhalte von Dateinamen welche von der Folderwatch-Überwachung" &
|
||||
"" & Global.Microsoft.VisualBasic.ChrW(13) & Global.Microsoft.VisualBasic.ChrW(10) & "ausgenommen werden sollen:"
|
||||
'
|
||||
'DataGridView1
|
||||
'
|
||||
DataGridViewCellStyle3.BackColor = System.Drawing.Color.Aqua
|
||||
Me.DataGridView1.AlternatingRowsDefaultCellStyle = DataGridViewCellStyle3
|
||||
Me.DataGridView1.Anchor = CType(((System.Windows.Forms.AnchorStyles.Top Or System.Windows.Forms.AnchorStyles.Bottom) _
|
||||
Or System.Windows.Forms.AnchorStyles.Left), System.Windows.Forms.AnchorStyles)
|
||||
Me.DataGridView1.ColumnHeadersHeightSizeMode = System.Windows.Forms.DataGridViewColumnHeadersHeightSizeMode.AutoSize
|
||||
Me.DataGridView1.Location = New System.Drawing.Point(12, 215)
|
||||
Me.DataGridView1.Name = "DataGridView1"
|
||||
Me.DataGridView1.Size = New System.Drawing.Size(192, 223)
|
||||
Me.DataGridView1.TabIndex = 14
|
||||
'
|
||||
'btnSaveExclusionFiles
|
||||
'
|
||||
Me.btnSaveExclusionFiles.Image = Global.DigitalData.GUIs.ZooFlow.My.Resources.Resources.save_16xLG
|
||||
Me.btnSaveExclusionFiles.ImageAlign = System.Drawing.ContentAlignment.MiddleLeft
|
||||
Me.btnSaveExclusionFiles.ImeMode = System.Windows.Forms.ImeMode.NoControl
|
||||
Me.btnSaveExclusionFiles.Location = New System.Drawing.Point(210, 215)
|
||||
Me.btnSaveExclusionFiles.Name = "btnSaveExclusionFiles"
|
||||
Me.btnSaveExclusionFiles.Size = New System.Drawing.Size(94, 29)
|
||||
Me.btnSaveExclusionFiles.TabIndex = 15
|
||||
Me.btnSaveExclusionFiles.Text = "Speichern"
|
||||
Me.btnSaveExclusionFiles.TextAlign = System.Drawing.ContentAlignment.MiddleRight
|
||||
Me.btnSaveExclusionFiles.UseVisualStyleBackColor = True
|
||||
'
|
||||
'btnstartstop2
|
||||
'
|
||||
Me.btnstartstop2.Image = Global.DigitalData.GUIs.ZooFlow.My.Resources.Resources.bell_go
|
||||
Me.btnstartstop2.ImageAlign = System.Drawing.ContentAlignment.MiddleLeft
|
||||
Me.btnstartstop2.ImeMode = System.Windows.Forms.ImeMode.NoControl
|
||||
Me.btnstartstop2.Location = New System.Drawing.Point(518, 138)
|
||||
Me.btnstartstop2.Margin = New System.Windows.Forms.Padding(4)
|
||||
Me.btnstartstop2.Name = "btnstartstop2"
|
||||
Me.btnstartstop2.Size = New System.Drawing.Size(173, 25)
|
||||
Me.btnstartstop2.TabIndex = 10
|
||||
Me.btnstartstop2.Text = "Überwachung starten"
|
||||
Me.btnstartstop2.TextAlign = System.Drawing.ContentAlignment.MiddleRight
|
||||
Me.btnstartstop2.UseVisualStyleBackColor = True
|
||||
'
|
||||
'btnstartstop1
|
||||
'
|
||||
Me.btnstartstop1.Image = Global.DigitalData.GUIs.ZooFlow.My.Resources.Resources.bell_go
|
||||
Me.btnstartstop1.ImageAlign = System.Drawing.ContentAlignment.MiddleLeft
|
||||
Me.btnstartstop1.ImeMode = System.Windows.Forms.ImeMode.NoControl
|
||||
Me.btnstartstop1.Location = New System.Drawing.Point(518, 59)
|
||||
Me.btnstartstop1.Margin = New System.Windows.Forms.Padding(4)
|
||||
Me.btnstartstop1.Name = "btnstartstop1"
|
||||
Me.btnstartstop1.Size = New System.Drawing.Size(173, 25)
|
||||
Me.btnstartstop1.TabIndex = 6
|
||||
Me.btnstartstop1.Text = "Überwachung starten"
|
||||
Me.btnstartstop1.TextAlign = System.Drawing.ContentAlignment.MiddleRight
|
||||
Me.btnstartstop1.UseVisualStyleBackColor = True
|
||||
'
|
||||
'frmGlobixBasicConfig
|
||||
'
|
||||
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.Label8)
|
||||
Me.Controls.Add(Me.DataGridView1)
|
||||
Me.Controls.Add(Me.btnSaveExclusionFiles)
|
||||
Me.Controls.Add(Me.btnstartstop2)
|
||||
Me.Controls.Add(Me.btnstartstop1)
|
||||
Me.Controls.Add(Me.Button2)
|
||||
Me.Controls.Add(Me.Button1)
|
||||
Me.Controls.Add(Me.txtScanFolderWatch)
|
||||
Me.Controls.Add(Me.txtFolderWatch)
|
||||
Me.Controls.Add(Me.Label2)
|
||||
Me.Controls.Add(Me.Label1)
|
||||
Me.FormBorderStyle = System.Windows.Forms.FormBorderStyle.Fixed3D
|
||||
Me.MaximizeBox = False
|
||||
Me.MinimizeBox = False
|
||||
Me.Name = "frmGlobixBasicConfig"
|
||||
Me.Text = "Basiskonfiguration Globix"
|
||||
Me.TopMost = True
|
||||
CType(Me.DataGridView1, System.ComponentModel.ISupportInitialize).EndInit()
|
||||
Me.ResumeLayout(False)
|
||||
Me.PerformLayout()
|
||||
|
||||
End Sub
|
||||
|
||||
Friend WithEvents Label1 As Label
|
||||
Friend WithEvents Label2 As Label
|
||||
Friend WithEvents txtFolderWatch As TextBox
|
||||
Friend WithEvents txtScanFolderWatch As TextBox
|
||||
Friend WithEvents Button1 As Button
|
||||
Friend WithEvents Button2 As Button
|
||||
Friend WithEvents OpenFileDialog1 As OpenFileDialog
|
||||
Friend WithEvents btnstartstop1 As Button
|
||||
Friend WithEvents btnstartstop2 As Button
|
||||
Friend WithEvents Label8 As Label
|
||||
Friend WithEvents DataGridView1 As DataGridView
|
||||
Friend WithEvents btnSaveExclusionFiles As Button
|
||||
End Class
|
||||
123
GUIs.ZooFlow/Globix/frmGlobixBasicConfig.resx
Normal file
123
GUIs.ZooFlow/Globix/frmGlobixBasicConfig.resx
Normal file
@@ -0,0 +1,123 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<root>
|
||||
<!--
|
||||
Microsoft ResX Schema
|
||||
|
||||
Version 2.0
|
||||
|
||||
The primary goals of this format is to allow a simple XML format
|
||||
that is mostly human readable. The generation and parsing of the
|
||||
various data types are done through the TypeConverter classes
|
||||
associated with the data types.
|
||||
|
||||
Example:
|
||||
|
||||
... ado.net/XML headers & schema ...
|
||||
<resheader name="resmimetype">text/microsoft-resx</resheader>
|
||||
<resheader name="version">2.0</resheader>
|
||||
<resheader name="reader">System.Resources.ResXResourceReader, System.Windows.Forms, ...</resheader>
|
||||
<resheader name="writer">System.Resources.ResXResourceWriter, System.Windows.Forms, ...</resheader>
|
||||
<data name="Name1"><value>this is my long string</value><comment>this is a comment</comment></data>
|
||||
<data name="Color1" type="System.Drawing.Color, System.Drawing">Blue</data>
|
||||
<data name="Bitmap1" mimetype="application/x-microsoft.net.object.binary.base64">
|
||||
<value>[base64 mime encoded serialized .NET Framework object]</value>
|
||||
</data>
|
||||
<data name="Icon1" type="System.Drawing.Icon, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
|
||||
<value>[base64 mime encoded string representing a byte array form of the .NET Framework object]</value>
|
||||
<comment>This is a comment</comment>
|
||||
</data>
|
||||
|
||||
There are any number of "resheader" rows that contain simple
|
||||
name/value pairs.
|
||||
|
||||
Each data row contains a name, and value. The row also contains a
|
||||
type or mimetype. Type corresponds to a .NET class that support
|
||||
text/value conversion through the TypeConverter architecture.
|
||||
Classes that don't support this are serialized and stored with the
|
||||
mimetype set.
|
||||
|
||||
The mimetype is used for serialized objects, and tells the
|
||||
ResXResourceReader how to depersist the object. This is currently not
|
||||
extensible. For a given mimetype the value must be set accordingly:
|
||||
|
||||
Note - application/x-microsoft.net.object.binary.base64 is the format
|
||||
that the ResXResourceWriter will generate, however the reader can
|
||||
read any of the formats listed below.
|
||||
|
||||
mimetype: application/x-microsoft.net.object.binary.base64
|
||||
value : The object must be serialized with
|
||||
: System.Runtime.Serialization.Formatters.Binary.BinaryFormatter
|
||||
: and then encoded with base64 encoding.
|
||||
|
||||
mimetype: application/x-microsoft.net.object.soap.base64
|
||||
value : The object must be serialized with
|
||||
: System.Runtime.Serialization.Formatters.Soap.SoapFormatter
|
||||
: and then encoded with base64 encoding.
|
||||
|
||||
mimetype: application/x-microsoft.net.object.bytearray.base64
|
||||
value : The object must be serialized into a byte array
|
||||
: using a System.ComponentModel.TypeConverter
|
||||
: and then encoded with base64 encoding.
|
||||
-->
|
||||
<xsd:schema id="root" xmlns="" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:msdata="urn:schemas-microsoft-com:xml-msdata">
|
||||
<xsd:import namespace="http://www.w3.org/XML/1998/namespace" />
|
||||
<xsd:element name="root" msdata:IsDataSet="true">
|
||||
<xsd:complexType>
|
||||
<xsd:choice maxOccurs="unbounded">
|
||||
<xsd:element name="metadata">
|
||||
<xsd:complexType>
|
||||
<xsd:sequence>
|
||||
<xsd:element name="value" type="xsd:string" minOccurs="0" />
|
||||
</xsd:sequence>
|
||||
<xsd:attribute name="name" use="required" type="xsd:string" />
|
||||
<xsd:attribute name="type" type="xsd:string" />
|
||||
<xsd:attribute name="mimetype" type="xsd:string" />
|
||||
<xsd:attribute ref="xml:space" />
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
<xsd:element name="assembly">
|
||||
<xsd:complexType>
|
||||
<xsd:attribute name="alias" type="xsd:string" />
|
||||
<xsd:attribute name="name" type="xsd:string" />
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
<xsd:element name="data">
|
||||
<xsd:complexType>
|
||||
<xsd:sequence>
|
||||
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
|
||||
<xsd:element name="comment" type="xsd:string" minOccurs="0" msdata:Ordinal="2" />
|
||||
</xsd:sequence>
|
||||
<xsd:attribute name="name" type="xsd:string" use="required" msdata:Ordinal="1" />
|
||||
<xsd:attribute name="type" type="xsd:string" msdata:Ordinal="3" />
|
||||
<xsd:attribute name="mimetype" type="xsd:string" msdata:Ordinal="4" />
|
||||
<xsd:attribute ref="xml:space" />
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
<xsd:element name="resheader">
|
||||
<xsd:complexType>
|
||||
<xsd:sequence>
|
||||
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
|
||||
</xsd:sequence>
|
||||
<xsd:attribute name="name" type="xsd:string" use="required" />
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
</xsd:choice>
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
</xsd:schema>
|
||||
<resheader name="resmimetype">
|
||||
<value>text/microsoft-resx</value>
|
||||
</resheader>
|
||||
<resheader name="version">
|
||||
<value>2.0</value>
|
||||
</resheader>
|
||||
<resheader name="reader">
|
||||
<value>System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
||||
</resheader>
|
||||
<resheader name="writer">
|
||||
<value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
||||
</resheader>
|
||||
<metadata name="OpenFileDialog1.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
|
||||
<value>17, 17</value>
|
||||
</metadata>
|
||||
</root>
|
||||
219
GUIs.ZooFlow/Globix/frmGlobixBasicConfig.vb
Normal file
219
GUIs.ZooFlow/Globix/frmGlobixBasicConfig.vb
Normal file
@@ -0,0 +1,219 @@
|
||||
Imports DigitalData.Modules.Logging
|
||||
|
||||
Public Class frmGlobixBasicConfig
|
||||
Private Logger As Logger
|
||||
Private oReload As Boolean = False
|
||||
Private clsFW As ClassFolderwatcher
|
||||
Public Sub New()
|
||||
|
||||
' Dieser Aufruf ist für den Designer erforderlich.
|
||||
InitializeComponent()
|
||||
|
||||
' Fügen Sie Initialisierungen nach dem InitializeComponent()-Aufruf hinzu.
|
||||
|
||||
End Sub
|
||||
|
||||
Private Sub Button1_Click(sender As Object, e As EventArgs) Handles Button1.Click
|
||||
Dim fbdialog As New FolderBrowserDialog
|
||||
If txtFolderWatch.Text <> "" Then
|
||||
fbdialog.SelectedPath = txtFolderWatch.Text
|
||||
End If
|
||||
If fbdialog.ShowDialog() = DialogResult.OK Then
|
||||
CheckFolder(fbdialog.SelectedPath, "DEFAULT")
|
||||
End If
|
||||
End Sub
|
||||
|
||||
Private Sub Button2_Click(sender As Object, e As EventArgs) Handles Button2.Click
|
||||
Dim fbdialog As New FolderBrowserDialog
|
||||
If txtScanFolderWatch.Text <> "" Then
|
||||
fbdialog.SelectedPath = txtScanFolderWatch.Text
|
||||
End If
|
||||
If fbdialog.ShowDialog() = DialogResult.OK Then
|
||||
CheckFolder(fbdialog.SelectedPath, "SCAN")
|
||||
End If
|
||||
End Sub
|
||||
Sub CheckFolder(pMypath As String, FOLDER_TYPE As String)
|
||||
Try
|
||||
If pMypath = "" Then
|
||||
My.Database.ExecuteNonQuery("DELETE FROM TBGI_FOLDERWATCH_USER WHERE USER_ID = " & My.Application.User.UserId & " AND FOLDER_TYPE = '" & FOLDER_TYPE & "'")
|
||||
If FOLDER_TYPE = "SCAN" Then
|
||||
My.Application.Globix.CURRENT_SCAN_FOLDERWATCH = ""
|
||||
My.UIConfig.Globix.FolderWatchScanStarted = False
|
||||
My.UIConfigManager.Save()
|
||||
Else
|
||||
My.Application.Globix.Folderwatchstarted = False
|
||||
'SaveConfigValue("FW_started", "False")
|
||||
My.UIConfig.Globix.FolderWatchStarted = False
|
||||
My.UIConfigManager.Save()
|
||||
My.Application.Globix.CURRENT_FOLDERWATCH = ""
|
||||
End If
|
||||
|
||||
Exit Sub
|
||||
End If
|
||||
Try
|
||||
If (Not System.IO.Directory.Exists(pMypath)) Then
|
||||
System.IO.Directory.CreateDirectory(pMypath)
|
||||
End If
|
||||
Catch ex As Exception
|
||||
Logger.Info(" >> Unexpected error in CheckFolder: " & pMypath)
|
||||
Logger.Error(ex.Message)
|
||||
Logger.Info(" >> " & ex.Message)
|
||||
If My.Application.User.Language = "de-DE" Then
|
||||
MsgBox("Unexpected error in ECheckFolder: " & pMypath & vbNewLine & "Bitte überprüfen Sie die Rechte!" & vbNewLine & ex.Message, MsgBoxStyle.Critical)
|
||||
Else
|
||||
MsgBox("Error in creating Hotfolder: " & pMypath & vbNewLine & "Please check the rights!" & vbNewLine & ex.Message, MsgBoxStyle.Critical)
|
||||
End If
|
||||
|
||||
Exit Sub
|
||||
End Try
|
||||
|
||||
Dim folderwatch = My.Database.GetScalarValue("SELECT GUID FROM TBGI_FOLDERWATCH_USER WHERE USER_ID = " & My.Application.User.UserId & " AND FOLDER_TYPE = '" & FOLDER_TYPE & "'")
|
||||
Dim oSql As String
|
||||
If folderwatch Is Nothing Then
|
||||
oSql = "INSERT INTO TBGI_FOLDERWATCH_USER (USER_ID, FOLDER_PATH, FOLDER_TYPE, ADDED_WHO) VALUES (" & My.Application.User.UserId & ",'" & pMypath & "','" & FOLDER_TYPE & "','" & My.Application.User.UserName & "')"
|
||||
Else
|
||||
oSql = "UPDATE TBGI_FOLDERWATCH_USER SET FOLDER_PATH = '" & pMypath & "', CHANGED_WHO = '" & My.Application.User.UserName & "' where GUID = " & folderwatch
|
||||
End If
|
||||
If My.Database.ExecuteNonQuery(oSql) Then
|
||||
folderwatch = My.Database.GetScalarValue("SELECT FOLDER_PATH FROM TBGI_FOLDERWATCH_USER WHERE USER_ID = " & My.Application.User.UserId & " AND FOLDER_TYPE = '" & FOLDER_TYPE & "'")
|
||||
|
||||
If FOLDER_TYPE = "SCAN" Then
|
||||
My.Application.Globix.CURRENT_SCAN_FOLDERWATCH = folderwatch
|
||||
Me.txtScanFolderWatch.Text = My.Application.Globix.CURRENT_SCAN_FOLDERWATCH
|
||||
Else
|
||||
My.Application.Globix.CURRENT_FOLDERWATCH = folderwatch
|
||||
Me.txtFolderWatch.Text = My.Application.Globix.CURRENT_FOLDERWATCH
|
||||
End If
|
||||
End If
|
||||
If My.Application.Globix.Folderwatchstarted = True And FOLDER_TYPE = "DEFAULT" Then
|
||||
clsFW.Restart_FolderWatch()
|
||||
End If
|
||||
If My.UIConfig.Globix.FolderWatchScanStarted = True And FOLDER_TYPE = "SCAN" Then
|
||||
clsFW.Restart_FolderWatchSCAN()
|
||||
End If
|
||||
Catch ex As Exception
|
||||
MsgBox(ex.Message, MsgBoxStyle.Critical, "Error in CheckFolder:")
|
||||
End Try
|
||||
|
||||
End Sub
|
||||
|
||||
Private Sub frmGlobixBasicConfig_Load(sender As Object, e As EventArgs) Handles Me.Load
|
||||
Logger = My.LogConfig.GetLogger()
|
||||
clsFW = New ClassFolderwatcher()
|
||||
Try
|
||||
oReload = True
|
||||
Dim oFolderwatch = My.Database.GetScalarValue("SELECT FOLDER_PATH FROM TBGI_FOLDERWATCH_USER WHERE FOLDER_TYPE = 'DEFAULT' AND USER_ID = " & My.Application.User.UserId)
|
||||
If Not oFolderwatch Is Nothing Then
|
||||
My.Application.Globix.CURRENT_FOLDERWATCH = oFolderwatch
|
||||
End If
|
||||
Me.txtFolderWatch.Text = My.Application.Globix.CURRENT_FOLDERWATCH
|
||||
Dim oSCANFolderwatch = My.Database.GetScalarValue("SELECT FOLDER_PATH FROM TBGI_FOLDERWATCH_USER WHERE FOLDER_TYPE = 'SCAN' AND USER_ID = " & My.Application.User.UserId)
|
||||
If Not oSCANFolderwatch Is Nothing Then
|
||||
My.Application.Globix.CURRENT_SCAN_FOLDERWATCH = oSCANFolderwatch
|
||||
End If
|
||||
Me.txtFolderWatch.Text = My.Application.Globix.CURRENT_FOLDERWATCH
|
||||
Me.txtScanFolderWatch.Text = My.Application.Globix.CURRENT_SCAN_FOLDERWATCH
|
||||
|
||||
If Not ClassFolderwatcher.FWFolderWatcher Is Nothing Then
|
||||
If ClassFolderwatcher.FWFolderWatcher.EnableRaisingEvents = True Then
|
||||
If My.Application.User.Language = "de-DE" Then
|
||||
btnstartstop1.Text = "Überwachung stoppen"
|
||||
Else
|
||||
btnstartstop1.Text = "Stop hotfolder"
|
||||
End If
|
||||
|
||||
btnstartstop1.Image = My.Resources.bell_delete
|
||||
Else
|
||||
If My.Application.User.Language = "de-DE" Then
|
||||
btnstartstop1.Text = "Überwachung starten"
|
||||
Else
|
||||
btnstartstop1.Text = "Start hotfolder"
|
||||
End If
|
||||
|
||||
btnstartstop1.Image = My.Resources.bell_go
|
||||
End If
|
||||
Else
|
||||
If My.Application.User.Language = "de-DE" Then
|
||||
btnstartstop1.Text = "Überwachung starten"
|
||||
Else
|
||||
btnstartstop1.Text = "Start hotfolder"
|
||||
End If
|
||||
|
||||
|
||||
btnstartstop1.Image = My.Resources.bell_go
|
||||
End If
|
||||
|
||||
If Not ClassFolderwatcher.FWScan Is Nothing Then
|
||||
If ClassFolderwatcher.FWScan.EnableRaisingEvents = True Then
|
||||
If My.Application.User.Language = "de-DE" Then
|
||||
btnstartstop2.Text = "Überwachung stoppen"
|
||||
Else
|
||||
btnstartstop2.Text = "Stop hotfolder"
|
||||
End If
|
||||
|
||||
btnstartstop2.Image = My.Resources.bell_delete
|
||||
Else
|
||||
If My.Application.User.Language = "de-DE" Then
|
||||
btnstartstop2.Text = "Überwachung starten"
|
||||
Else
|
||||
btnstartstop2.Text = "Stop hotfolder"
|
||||
End If
|
||||
|
||||
btnstartstop2.Image = My.Resources.bell_go
|
||||
End If
|
||||
Else
|
||||
If My.Application.User.Language = "de-DE" Then
|
||||
btnstartstop2.Text = "Überwachung starten"
|
||||
Else
|
||||
btnstartstop2.Text = "Stop hotfolder"
|
||||
End If
|
||||
|
||||
btnstartstop2.Image = My.Resources.bell_go
|
||||
End If
|
||||
oReload = False
|
||||
Me.DataGridView1.DataSource = My.Application.Globix.DTEXCLUDE_FILES
|
||||
Catch ex As Exception
|
||||
|
||||
End Try
|
||||
End Sub
|
||||
|
||||
Private Sub txtFolderWatch_TextChanged(sender As Object, e As EventArgs) Handles txtFolderWatch.TextChanged
|
||||
If oReload = True Then Exit Sub
|
||||
CheckFolder(txtFolderWatch.Text, "DEFAULT")
|
||||
End Sub
|
||||
|
||||
Private Sub txtScanFolderWatch_TextChanged(sender As Object, e As EventArgs) Handles txtScanFolderWatch.TextChanged
|
||||
If oReload = True Then Exit Sub
|
||||
CheckFolder(txtScanFolderWatch.Text, "SCAN")
|
||||
End Sub
|
||||
|
||||
Private Sub btnSaveExclusionFiles_Click(sender As Object, e As EventArgs) Handles btnSaveExclusionFiles.Click
|
||||
My.Application.Globix.DTEXCLUDE_FILES.AcceptChanges()
|
||||
My.Application.Globix.DTEXCLUDE_FILES.WriteXml(My.Application.Globix.PATH_FileExclusions)
|
||||
MsgBox("Changes saved.", MsgBoxStyle.Information)
|
||||
End Sub
|
||||
|
||||
Private Sub btnstartstop2_Click(sender As Object, e As EventArgs) Handles btnstartstop2.Click
|
||||
If My.Application.Globix.CURRENT_SCAN_FOLDERWATCH <> "" Then
|
||||
CheckFWSCAN_State()
|
||||
End If
|
||||
End Sub
|
||||
Sub CheckFWSCAN_State()
|
||||
Select Case clsFW.StartStop_FolderWatchSCAN()
|
||||
Case 1
|
||||
If My.Application.User.Language = "de-DE" Then
|
||||
btnstartstop2.Text = "Überwachung stoppen"
|
||||
Else
|
||||
btnstartstop2.Text = "Stop Hotfolder"
|
||||
End If
|
||||
btnstartstop2.Image = My.Resources.bell_delete
|
||||
Case 0
|
||||
If My.Application.User.Language = "de-DE" Then
|
||||
btnstartstop2.Text = "Überwachung starten"
|
||||
Else
|
||||
btnstartstop2.Text = "Start Hotfolder"
|
||||
End If
|
||||
btnstartstop2.Image = My.Resources.bell_go
|
||||
End Select
|
||||
End Sub
|
||||
End Class
|
||||
205
GUIs.ZooFlow/Globix/frmGlobixMissingInput.Designer.vb
generated
Normal file
205
GUIs.ZooFlow/Globix/frmGlobixMissingInput.Designer.vb
generated
Normal file
@@ -0,0 +1,205 @@
|
||||
<Global.Microsoft.VisualBasic.CompilerServices.DesignerGenerated()> _
|
||||
Partial Class frmGlobixMissingInput
|
||||
Inherits DevExpress.XtraBars.Ribbon.RibbonForm
|
||||
|
||||
'Das Formular überschreibt den Löschvorgang, um die Komponentenliste zu bereinigen.
|
||||
<System.Diagnostics.DebuggerNonUserCode()> _
|
||||
Protected Overrides Sub Dispose(ByVal disposing As Boolean)
|
||||
Try
|
||||
If disposing AndAlso components IsNot Nothing Then
|
||||
components.Dispose()
|
||||
End If
|
||||
Finally
|
||||
MyBase.Dispose(disposing)
|
||||
End Try
|
||||
End Sub
|
||||
|
||||
'Wird vom Windows Form-Designer benötigt.
|
||||
Private components As System.ComponentModel.IContainer
|
||||
|
||||
'Hinweis: Die folgende Prozedur ist für den Windows Form-Designer erforderlich.
|
||||
'Das Bearbeiten ist mit dem Windows Form-Designer möglich.
|
||||
'Das Bearbeiten mit dem Code-Editor ist nicht möglich.
|
||||
<System.Diagnostics.DebuggerStepThrough()> _
|
||||
Private Sub InitializeComponent()
|
||||
Me.RibbonControl1 = New DevExpress.XtraBars.Ribbon.RibbonControl()
|
||||
Me.RibbonPage1 = New DevExpress.XtraBars.Ribbon.RibbonPage()
|
||||
Me.RibbonPageGroup1 = New DevExpress.XtraBars.Ribbon.RibbonPageGroup()
|
||||
Me.RibbonPageGroup2 = New DevExpress.XtraBars.Ribbon.RibbonPageGroup()
|
||||
Me.RibbonStatusBar1 = New DevExpress.XtraBars.Ribbon.RibbonStatusBar()
|
||||
Me.RibbonPage2 = New DevExpress.XtraBars.Ribbon.RibbonPage()
|
||||
Me.btnAccept = New System.Windows.Forms.Button()
|
||||
Me.txtSearchtext = New System.Windows.Forms.TextBox()
|
||||
Me.Label3 = New System.Windows.Forms.Label()
|
||||
Me.txtInput = New System.Windows.Forms.TextBox()
|
||||
Me.Label2 = New System.Windows.Forms.Label()
|
||||
Me.lblMissingElementName = New System.Windows.Forms.Label()
|
||||
Me.Label1 = New System.Windows.Forms.Label()
|
||||
CType(Me.RibbonControl1, System.ComponentModel.ISupportInitialize).BeginInit()
|
||||
Me.SuspendLayout()
|
||||
'
|
||||
'RibbonControl1
|
||||
'
|
||||
Me.RibbonControl1.CommandLayout = DevExpress.XtraBars.Ribbon.CommandLayout.Simplified
|
||||
Me.RibbonControl1.ExpandCollapseItem.Id = 0
|
||||
Me.RibbonControl1.Items.AddRange(New DevExpress.XtraBars.BarItem() {Me.RibbonControl1.ExpandCollapseItem, Me.RibbonControl1.SearchEditItem})
|
||||
Me.RibbonControl1.Location = New System.Drawing.Point(0, 0)
|
||||
Me.RibbonControl1.MaxItemId = 1
|
||||
Me.RibbonControl1.Name = "RibbonControl1"
|
||||
Me.RibbonControl1.Pages.AddRange(New DevExpress.XtraBars.Ribbon.RibbonPage() {Me.RibbonPage1})
|
||||
Me.RibbonControl1.ShowApplicationButton = DevExpress.Utils.DefaultBoolean.[False]
|
||||
Me.RibbonControl1.ShowPageHeadersMode = DevExpress.XtraBars.Ribbon.ShowPageHeadersMode.Hide
|
||||
Me.RibbonControl1.Size = New System.Drawing.Size(607, 66)
|
||||
Me.RibbonControl1.StatusBar = Me.RibbonStatusBar1
|
||||
'
|
||||
'RibbonPage1
|
||||
'
|
||||
Me.RibbonPage1.Groups.AddRange(New DevExpress.XtraBars.Ribbon.RibbonPageGroup() {Me.RibbonPageGroup1, Me.RibbonPageGroup2})
|
||||
Me.RibbonPage1.Name = "RibbonPage1"
|
||||
Me.RibbonPage1.Text = "RibbonPage1"
|
||||
'
|
||||
'RibbonPageGroup1
|
||||
'
|
||||
Me.RibbonPageGroup1.Name = "RibbonPageGroup1"
|
||||
Me.RibbonPageGroup1.Text = "RibbonPageGroup1"
|
||||
'
|
||||
'RibbonPageGroup2
|
||||
'
|
||||
Me.RibbonPageGroup2.Name = "RibbonPageGroup2"
|
||||
Me.RibbonPageGroup2.Text = "RibbonPageGroup2"
|
||||
'
|
||||
'RibbonStatusBar1
|
||||
'
|
||||
Me.RibbonStatusBar1.Location = New System.Drawing.Point(0, 389)
|
||||
Me.RibbonStatusBar1.Name = "RibbonStatusBar1"
|
||||
Me.RibbonStatusBar1.Ribbon = Me.RibbonControl1
|
||||
Me.RibbonStatusBar1.Size = New System.Drawing.Size(607, 22)
|
||||
'
|
||||
'RibbonPage2
|
||||
'
|
||||
Me.RibbonPage2.Name = "RibbonPage2"
|
||||
Me.RibbonPage2.Text = "RibbonPage2"
|
||||
'
|
||||
'btnAccept
|
||||
'
|
||||
Me.btnAccept.Anchor = CType(((System.Windows.Forms.AnchorStyles.Top Or System.Windows.Forms.AnchorStyles.Left) _
|
||||
Or System.Windows.Forms.AnchorStyles.Right), System.Windows.Forms.AnchorStyles)
|
||||
Me.btnAccept.Font = New System.Drawing.Font("Tahoma", 9.75!)
|
||||
Me.btnAccept.Image = Global.DigitalData.GUIs.ZooFlow.My.Resources.Resources.action_add_16xLG
|
||||
Me.btnAccept.ImageAlign = System.Drawing.ContentAlignment.MiddleLeft
|
||||
Me.btnAccept.ImeMode = System.Windows.Forms.ImeMode.NoControl
|
||||
Me.btnAccept.Location = New System.Drawing.Point(12, 348)
|
||||
Me.btnAccept.Name = "btnAccept"
|
||||
Me.btnAccept.Size = New System.Drawing.Size(583, 35)
|
||||
Me.btnAccept.TabIndex = 9
|
||||
Me.btnAccept.Text = "OK - Apply manual Input"
|
||||
Me.btnAccept.UseVisualStyleBackColor = True
|
||||
'
|
||||
'txtSearchtext
|
||||
'
|
||||
Me.txtSearchtext.Anchor = CType(((System.Windows.Forms.AnchorStyles.Top Or System.Windows.Forms.AnchorStyles.Left) _
|
||||
Or System.Windows.Forms.AnchorStyles.Right), System.Windows.Forms.AnchorStyles)
|
||||
Me.txtSearchtext.Location = New System.Drawing.Point(12, 204)
|
||||
Me.txtSearchtext.Multiline = True
|
||||
Me.txtSearchtext.Name = "txtSearchtext"
|
||||
Me.txtSearchtext.ReadOnly = True
|
||||
Me.txtSearchtext.ScrollBars = System.Windows.Forms.ScrollBars.Both
|
||||
Me.txtSearchtext.Size = New System.Drawing.Size(580, 138)
|
||||
Me.txtSearchtext.TabIndex = 13
|
||||
Me.txtSearchtext.TabStop = False
|
||||
'
|
||||
'Label3
|
||||
'
|
||||
Me.Label3.AutoSize = True
|
||||
Me.Label3.ImeMode = System.Windows.Forms.ImeMode.NoControl
|
||||
Me.Label3.Location = New System.Drawing.Point(9, 188)
|
||||
Me.Label3.Name = "Label3"
|
||||
Me.Label3.Size = New System.Drawing.Size(88, 13)
|
||||
Me.Label3.TabIndex = 12
|
||||
Me.Label3.Text = "Evaluation-Text:"
|
||||
'
|
||||
'txtInput
|
||||
'
|
||||
Me.txtInput.Anchor = CType(((System.Windows.Forms.AnchorStyles.Top Or System.Windows.Forms.AnchorStyles.Left) _
|
||||
Or System.Windows.Forms.AnchorStyles.Right), System.Windows.Forms.AnchorStyles)
|
||||
Me.txtInput.Font = New System.Drawing.Font("Tahoma", 12.0!)
|
||||
Me.txtInput.Location = New System.Drawing.Point(12, 145)
|
||||
Me.txtInput.Name = "txtInput"
|
||||
Me.txtInput.Size = New System.Drawing.Size(580, 27)
|
||||
Me.txtInput.TabIndex = 7
|
||||
'
|
||||
'Label2
|
||||
'
|
||||
Me.Label2.AutoSize = True
|
||||
Me.Label2.Font = New System.Drawing.Font("Tahoma", 9.75!)
|
||||
Me.Label2.ImeMode = System.Windows.Forms.ImeMode.NoControl
|
||||
Me.Label2.Location = New System.Drawing.Point(9, 126)
|
||||
Me.Label2.Name = "Label2"
|
||||
Me.Label2.Size = New System.Drawing.Size(193, 16)
|
||||
Me.Label2.TabIndex = 11
|
||||
Me.Label2.Text = "Please input the value manually:"
|
||||
'
|
||||
'lblMissingElementName
|
||||
'
|
||||
Me.lblMissingElementName.AutoSize = True
|
||||
Me.lblMissingElementName.Font = New System.Drawing.Font("Tahoma", 9.75!, CType((System.Drawing.FontStyle.Bold Or System.Drawing.FontStyle.Italic), System.Drawing.FontStyle))
|
||||
Me.lblMissingElementName.ImeMode = System.Windows.Forms.ImeMode.NoControl
|
||||
Me.lblMissingElementName.Location = New System.Drawing.Point(274, 102)
|
||||
Me.lblMissingElementName.Name = "lblMissingElementName"
|
||||
Me.lblMissingElementName.Size = New System.Drawing.Size(50, 16)
|
||||
Me.lblMissingElementName.TabIndex = 10
|
||||
Me.lblMissingElementName.Text = "Label2"
|
||||
'
|
||||
'Label1
|
||||
'
|
||||
Me.Label1.AutoSize = True
|
||||
Me.Label1.Font = New System.Drawing.Font("Tahoma", 9.75!)
|
||||
Me.Label1.ImeMode = System.Windows.Forms.ImeMode.NoControl
|
||||
Me.Label1.Location = New System.Drawing.Point(9, 102)
|
||||
Me.Label1.Name = "Label1"
|
||||
Me.Label1.Size = New System.Drawing.Size(259, 16)
|
||||
Me.Label1.TabIndex = 8
|
||||
Me.Label1.Text = "No Content found for the following element:"
|
||||
'
|
||||
'frmGlobixMissingInput
|
||||
'
|
||||
Me.AutoScaleDimensions = New System.Drawing.SizeF(6.0!, 13.0!)
|
||||
Me.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font
|
||||
Me.ClientSize = New System.Drawing.Size(607, 411)
|
||||
Me.Controls.Add(Me.btnAccept)
|
||||
Me.Controls.Add(Me.txtSearchtext)
|
||||
Me.Controls.Add(Me.Label3)
|
||||
Me.Controls.Add(Me.txtInput)
|
||||
Me.Controls.Add(Me.Label2)
|
||||
Me.Controls.Add(Me.lblMissingElementName)
|
||||
Me.Controls.Add(Me.Label1)
|
||||
Me.Controls.Add(Me.RibbonStatusBar1)
|
||||
Me.Controls.Add(Me.RibbonControl1)
|
||||
Me.MaximizeBox = False
|
||||
Me.MinimizeBox = False
|
||||
Me.Name = "frmGlobixMissingInput"
|
||||
Me.Ribbon = Me.RibbonControl1
|
||||
Me.StartPosition = System.Windows.Forms.FormStartPosition.CenterScreen
|
||||
Me.StatusBar = Me.RibbonStatusBar1
|
||||
Me.Text = "Fehlende Eingabe"
|
||||
Me.TopMost = True
|
||||
CType(Me.RibbonControl1, System.ComponentModel.ISupportInitialize).EndInit()
|
||||
Me.ResumeLayout(False)
|
||||
Me.PerformLayout()
|
||||
|
||||
End Sub
|
||||
|
||||
Friend WithEvents RibbonControl1 As DevExpress.XtraBars.Ribbon.RibbonControl
|
||||
Friend WithEvents RibbonPage1 As DevExpress.XtraBars.Ribbon.RibbonPage
|
||||
Friend WithEvents RibbonPageGroup1 As DevExpress.XtraBars.Ribbon.RibbonPageGroup
|
||||
Friend WithEvents RibbonPageGroup2 As DevExpress.XtraBars.Ribbon.RibbonPageGroup
|
||||
Friend WithEvents RibbonStatusBar1 As DevExpress.XtraBars.Ribbon.RibbonStatusBar
|
||||
Friend WithEvents RibbonPage2 As DevExpress.XtraBars.Ribbon.RibbonPage
|
||||
Friend WithEvents btnAccept As Button
|
||||
Friend WithEvents txtSearchtext As TextBox
|
||||
Friend WithEvents Label3 As Label
|
||||
Friend WithEvents txtInput As TextBox
|
||||
Friend WithEvents Label2 As Label
|
||||
Friend WithEvents lblMissingElementName As Label
|
||||
Friend WithEvents Label1 As Label
|
||||
End Class
|
||||
120
GUIs.ZooFlow/Globix/frmGlobixMissingInput.resx
Normal file
120
GUIs.ZooFlow/Globix/frmGlobixMissingInput.resx
Normal file
@@ -0,0 +1,120 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<root>
|
||||
<!--
|
||||
Microsoft ResX Schema
|
||||
|
||||
Version 2.0
|
||||
|
||||
The primary goals of this format is to allow a simple XML format
|
||||
that is mostly human readable. The generation and parsing of the
|
||||
various data types are done through the TypeConverter classes
|
||||
associated with the data types.
|
||||
|
||||
Example:
|
||||
|
||||
... ado.net/XML headers & schema ...
|
||||
<resheader name="resmimetype">text/microsoft-resx</resheader>
|
||||
<resheader name="version">2.0</resheader>
|
||||
<resheader name="reader">System.Resources.ResXResourceReader, System.Windows.Forms, ...</resheader>
|
||||
<resheader name="writer">System.Resources.ResXResourceWriter, System.Windows.Forms, ...</resheader>
|
||||
<data name="Name1"><value>this is my long string</value><comment>this is a comment</comment></data>
|
||||
<data name="Color1" type="System.Drawing.Color, System.Drawing">Blue</data>
|
||||
<data name="Bitmap1" mimetype="application/x-microsoft.net.object.binary.base64">
|
||||
<value>[base64 mime encoded serialized .NET Framework object]</value>
|
||||
</data>
|
||||
<data name="Icon1" type="System.Drawing.Icon, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
|
||||
<value>[base64 mime encoded string representing a byte array form of the .NET Framework object]</value>
|
||||
<comment>This is a comment</comment>
|
||||
</data>
|
||||
|
||||
There are any number of "resheader" rows that contain simple
|
||||
name/value pairs.
|
||||
|
||||
Each data row contains a name, and value. The row also contains a
|
||||
type or mimetype. Type corresponds to a .NET class that support
|
||||
text/value conversion through the TypeConverter architecture.
|
||||
Classes that don't support this are serialized and stored with the
|
||||
mimetype set.
|
||||
|
||||
The mimetype is used for serialized objects, and tells the
|
||||
ResXResourceReader how to depersist the object. This is currently not
|
||||
extensible. For a given mimetype the value must be set accordingly:
|
||||
|
||||
Note - application/x-microsoft.net.object.binary.base64 is the format
|
||||
that the ResXResourceWriter will generate, however the reader can
|
||||
read any of the formats listed below.
|
||||
|
||||
mimetype: application/x-microsoft.net.object.binary.base64
|
||||
value : The object must be serialized with
|
||||
: System.Runtime.Serialization.Formatters.Binary.BinaryFormatter
|
||||
: and then encoded with base64 encoding.
|
||||
|
||||
mimetype: application/x-microsoft.net.object.soap.base64
|
||||
value : The object must be serialized with
|
||||
: System.Runtime.Serialization.Formatters.Soap.SoapFormatter
|
||||
: and then encoded with base64 encoding.
|
||||
|
||||
mimetype: application/x-microsoft.net.object.bytearray.base64
|
||||
value : The object must be serialized into a byte array
|
||||
: using a System.ComponentModel.TypeConverter
|
||||
: and then encoded with base64 encoding.
|
||||
-->
|
||||
<xsd:schema id="root" xmlns="" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:msdata="urn:schemas-microsoft-com:xml-msdata">
|
||||
<xsd:import namespace="http://www.w3.org/XML/1998/namespace" />
|
||||
<xsd:element name="root" msdata:IsDataSet="true">
|
||||
<xsd:complexType>
|
||||
<xsd:choice maxOccurs="unbounded">
|
||||
<xsd:element name="metadata">
|
||||
<xsd:complexType>
|
||||
<xsd:sequence>
|
||||
<xsd:element name="value" type="xsd:string" minOccurs="0" />
|
||||
</xsd:sequence>
|
||||
<xsd:attribute name="name" use="required" type="xsd:string" />
|
||||
<xsd:attribute name="type" type="xsd:string" />
|
||||
<xsd:attribute name="mimetype" type="xsd:string" />
|
||||
<xsd:attribute ref="xml:space" />
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
<xsd:element name="assembly">
|
||||
<xsd:complexType>
|
||||
<xsd:attribute name="alias" type="xsd:string" />
|
||||
<xsd:attribute name="name" type="xsd:string" />
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
<xsd:element name="data">
|
||||
<xsd:complexType>
|
||||
<xsd:sequence>
|
||||
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
|
||||
<xsd:element name="comment" type="xsd:string" minOccurs="0" msdata:Ordinal="2" />
|
||||
</xsd:sequence>
|
||||
<xsd:attribute name="name" type="xsd:string" use="required" msdata:Ordinal="1" />
|
||||
<xsd:attribute name="type" type="xsd:string" msdata:Ordinal="3" />
|
||||
<xsd:attribute name="mimetype" type="xsd:string" msdata:Ordinal="4" />
|
||||
<xsd:attribute ref="xml:space" />
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
<xsd:element name="resheader">
|
||||
<xsd:complexType>
|
||||
<xsd:sequence>
|
||||
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
|
||||
</xsd:sequence>
|
||||
<xsd:attribute name="name" type="xsd:string" use="required" />
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
</xsd:choice>
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
</xsd:schema>
|
||||
<resheader name="resmimetype">
|
||||
<value>text/microsoft-resx</value>
|
||||
</resheader>
|
||||
<resheader name="version">
|
||||
<value>2.0</value>
|
||||
</resheader>
|
||||
<resheader name="reader">
|
||||
<value>System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
||||
</resheader>
|
||||
<resheader name="writer">
|
||||
<value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
||||
</resheader>
|
||||
</root>
|
||||
18
GUIs.ZooFlow/Globix/frmGlobixMissingInput.vb
Normal file
18
GUIs.ZooFlow/Globix/frmGlobixMissingInput.vb
Normal file
@@ -0,0 +1,18 @@
|
||||
Public Class frmGlobixMissingInput
|
||||
Private Sub frmGlobixMissingInput_Load(sender As Object, e As EventArgs) Handles Me.Load
|
||||
Me.lblMissingElementName.Text = CURR_MISSING_PATTERN_NAME
|
||||
Me.txtSearchtext.Text = CURR_MISSING_SEARCH_STRING
|
||||
Me.txtInput.Text = ""
|
||||
End Sub
|
||||
|
||||
Private Sub frmGlobixMissingInput_Shown(sender As Object, e As EventArgs) Handles Me.Shown
|
||||
Me.txtInput.Focus()
|
||||
End Sub
|
||||
|
||||
Private Sub btnAccept_Click(sender As Object, e As EventArgs) Handles btnAccept.Click
|
||||
If txtInput.Text <> String.Empty Then
|
||||
CURR_MISSING_MANUAL_VALUE = txtInput.Text
|
||||
Me.Close()
|
||||
End If
|
||||
End Sub
|
||||
End Class
|
||||
12
GUIs.ZooFlow/Globix/frmGlobix_Index.Designer.vb
generated
12
GUIs.ZooFlow/Globix/frmGlobix_Index.Designer.vb
generated
@@ -53,12 +53,14 @@ Partial Class frmGlobix_Index
|
||||
Me.Label1 = New System.Windows.Forms.Label()
|
||||
Me.cmbDoctype = New System.Windows.Forms.ComboBox()
|
||||
Me.DocumentViewer1 = New DigitalData.Controls.DocumentViewer.DocumentViewer()
|
||||
Me.GlobixDataset = New DigitalData.GUIs.ZooFlow.GlobixDataset()
|
||||
CType(Me.RibbonControl1, System.ComponentModel.ISupportInitialize).BeginInit()
|
||||
CType(Me.SplitContainerControl1, System.ComponentModel.ISupportInitialize).BeginInit()
|
||||
Me.SplitContainerControl1.SuspendLayout()
|
||||
Me.Panel3.SuspendLayout()
|
||||
CType(Me.PictureEdit1.Properties, System.ComponentModel.ISupportInitialize).BeginInit()
|
||||
Me.Panel1.SuspendLayout()
|
||||
CType(Me.GlobixDataset, System.ComponentModel.ISupportInitialize).BeginInit()
|
||||
Me.SuspendLayout()
|
||||
'
|
||||
'RibbonControl1
|
||||
@@ -296,7 +298,7 @@ Partial Class frmGlobix_Index
|
||||
Me.Label1.ImeMode = System.Windows.Forms.ImeMode.NoControl
|
||||
Me.Label1.Location = New System.Drawing.Point(3, 3)
|
||||
Me.Label1.Name = "Label1"
|
||||
Me.Label1.Size = New System.Drawing.Size(178, 13)
|
||||
Me.Label1.Size = New System.Drawing.Size(192, 13)
|
||||
Me.Label1.TabIndex = 2
|
||||
Me.Label1.Text = "Bitte wählen Sie einen Ablage-Flow:"
|
||||
'
|
||||
@@ -320,6 +322,11 @@ Partial Class frmGlobix_Index
|
||||
Me.DocumentViewer1.Size = New System.Drawing.Size(404, 508)
|
||||
Me.DocumentViewer1.TabIndex = 0
|
||||
'
|
||||
'GlobixDataset
|
||||
'
|
||||
Me.GlobixDataset.DataSetName = "GlobixDataset"
|
||||
Me.GlobixDataset.SchemaSerializationMode = System.Data.SchemaSerializationMode.IncludeSchema
|
||||
'
|
||||
'frmGlobix_Index
|
||||
'
|
||||
Me.AutoScaleDimensions = New System.Drawing.SizeF(6.0!, 13.0!)
|
||||
@@ -332,6 +339,7 @@ Partial Class frmGlobix_Index
|
||||
Me.Ribbon = Me.RibbonControl1
|
||||
Me.StatusBar = Me.RibbonStatusBar1
|
||||
Me.Text = "frmGlobix_Index"
|
||||
Me.TopMost = True
|
||||
CType(Me.RibbonControl1, System.ComponentModel.ISupportInitialize).EndInit()
|
||||
CType(Me.SplitContainerControl1, System.ComponentModel.ISupportInitialize).EndInit()
|
||||
Me.SplitContainerControl1.ResumeLayout(False)
|
||||
@@ -339,6 +347,7 @@ Partial Class frmGlobix_Index
|
||||
CType(Me.PictureEdit1.Properties, System.ComponentModel.ISupportInitialize).EndInit()
|
||||
Me.Panel1.ResumeLayout(False)
|
||||
Me.Panel1.PerformLayout()
|
||||
CType(Me.GlobixDataset, System.ComponentModel.ISupportInitialize).EndInit()
|
||||
Me.ResumeLayout(False)
|
||||
Me.PerformLayout()
|
||||
|
||||
@@ -374,4 +383,5 @@ Partial Class frmGlobix_Index
|
||||
Friend WithEvents pnlIndex As Panel
|
||||
Friend WithEvents Panel3 As Panel
|
||||
Friend WithEvents PictureEdit1 As DevExpress.XtraEditors.PictureEdit
|
||||
Friend WithEvents GlobixDataset As GlobixDataset
|
||||
End Class
|
||||
|
||||
@@ -519,4 +519,7 @@
|
||||
Y2xhc3M9IlJlZCIgLz4NCiAgPC9nPg0KPC9zdmc+Cw==
|
||||
</value>
|
||||
</data>
|
||||
<metadata name="GlobixDataset.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
|
||||
<value>17, 17</value>
|
||||
</metadata>
|
||||
</root>
|
||||
@@ -1,10 +1,12 @@
|
||||
Option Explicit On
|
||||
|
||||
Imports System.DirectoryServices
|
||||
Imports System.IO
|
||||
Imports System.Security.AccessControl
|
||||
Imports System.Security.Principal
|
||||
Imports System.Text.RegularExpressions
|
||||
Imports DigitalData.Modules.Logging
|
||||
Imports Independentsoft
|
||||
|
||||
Public Class frmGlobix_Index
|
||||
#Region "+++++ Variablen ++++++"
|
||||
@@ -31,6 +33,8 @@ Public Class frmGlobix_Index
|
||||
Private clswindowLocation As ClassWindowLocation
|
||||
Private clsPatterns As GlobixPatterns
|
||||
Private clsPostProcessing As GlobixPostprocessing
|
||||
Private _DataASorDB As ClassDataASorDB
|
||||
Private _idbdata As ClassIDBData
|
||||
#End Region
|
||||
Public Sub New(LogConfig As LogConfig)
|
||||
|
||||
@@ -40,9 +44,11 @@ Public Class frmGlobix_Index
|
||||
' Fügen Sie Initialisierungen nach dem InitializeComponent()-Aufruf hinzu.
|
||||
_Logger = LogConfig.GetLogger()
|
||||
_LogConfig = LogConfig
|
||||
clswindowLocation = New ClassWindowLocation(_LogConfig)
|
||||
_DataASorDB = New ClassDataASorDB(LogConfig)
|
||||
clswindowLocation = New ClassWindowLocation(LogConfig)
|
||||
clsPatterns = New GlobixPatterns(LogConfig)
|
||||
clsPostProcessing = New GlobixPostprocessing(LogConfig)
|
||||
_idbdata = New ClassIDBData(LogConfig)
|
||||
End Sub
|
||||
|
||||
Private Sub frmGlobix_Index_Load(sender As Object, e As EventArgs) Handles MyBase.Load
|
||||
@@ -138,9 +144,10 @@ Public Class frmGlobix_Index
|
||||
SplitContainerControl1.SplitterPosition = My.UIConfig.Globix.SplitterDistanceViewer
|
||||
|
||||
|
||||
|
||||
My.Application.Globix.DTTBGI_REGEX_DOCTYPE = My.Database.GetDatatable("SELECT DISTINCT T1.DOCTYPE as DocType, T.* FROM TBGI_REGEX_DOCTYPE T, VWGI_DOCTYPE T1 WHERE T.DOCTYPE_ID = T1.DOCTYPE_ID")
|
||||
My.Application.Globix.CURR_INDEX_MAN_POSTPROCESSING = My.Database.GetDatatable("SELECT * FROM TBDD_INDEX_MAN_POSTPROCESSING")
|
||||
Dim oSQL As String = "SELECT DISTINCT T1.DOCTYPE as DocType, T.* FROM TBGI_REGEX_DOCTYPE T, VWGI_DOCTYPE T1 WHERE T.DOCTYPE_ID = T1.DOCTYPE_ID"
|
||||
My.Application.Globix.DTTBGI_REGEX_DOCTYPE = _DataASorDB.GetDatatable("DD_ECM", oSQL, "DTTBGI_REGEX_DOCTYPE", "", "")
|
||||
oSQL = "SELECT * FROM TBDD_INDEX_MAN_POSTPROCESSING"
|
||||
My.Application.Globix.CURR_INDEX_MAN_POSTPROCESSING = _DataASorDB.GetDatatable("DD_ECM", oSQL, "TBDD_INDEX_MAN_POSTPROCESSING", "", "")
|
||||
MULTIFILES = My.Database.GetScalarValue("SELECT COUNT(*) FROM TBGI_FILES_USER WHERE WORKED = 0 AND GUID <> " & My.Application.Globix.CURRENT_WORKFILE_GUID & " AND UPPER(USER@WORK) = UPPER('" & Environment.UserName & "')")
|
||||
My.Application.Globix.MULTIINDEXING_ACTIVE = False
|
||||
If MULTIFILES > 0 Then
|
||||
@@ -261,11 +268,15 @@ Public Class frmGlobix_Index
|
||||
|
||||
End Try
|
||||
End Sub
|
||||
Private Sub checkItemPreselection_CheckedChanged(sender As Object, e As DevExpress.XtraBars.ItemClickEventArgs) Handles checkItemPreselection.CheckedChanged
|
||||
My.UIConfig.Globix.ProfilePreselection = checkItemPreselection.Checked
|
||||
My.SystemConfigManager.Save()
|
||||
End Sub
|
||||
Sub Refresh_Dokart()
|
||||
Try
|
||||
Dim sql = String.Format("select * from VWGI_DOCTYPE where UPPER(USERNAME) = UPPER('{0}') ORDER BY SEQUENCE", Environment.UserName)
|
||||
_Logger.Debug("SQL DoctypeList: " & sql)
|
||||
DT_DOKART = My.Database.GetDatatable(sql)
|
||||
Dim oSql = String.Format("select * from VWGI_DOCTYPE where UPPER(USERNAME) = UPPER('{0}') ORDER BY SEQUENCE", My.Application.User.UserName)
|
||||
Dim oFilter = $"USERNAME like '%{My.Application.User.UserName}%'"
|
||||
DT_DOKART = _DataASorDB.GetDatatable("DD_ECM", oSql, "VWGI_DOCTYPE", oFilter, "SEQUENCE")
|
||||
cmbDoctype.DataSource = DT_DOKART
|
||||
cmbDoctype.ValueMember = DT_DOKART.Columns("DOCTYPE_ID").ColumnName
|
||||
cmbDoctype.DisplayMember = DT_DOKART.Columns("DOCTYPE").ColumnName
|
||||
@@ -295,8 +306,10 @@ Public Class frmGlobix_Index
|
||||
|
||||
|
||||
Me.pnlIndex.Controls.Clear()
|
||||
Dim sql As String = "Select * from TBDD_DOKUMENTART WHERE GUID = " & cmbDoctype.SelectedValue.ToString
|
||||
My.Application.Globix.CURR_DT_DOCTYPE = My.Database.GetDatatable(sql)
|
||||
|
||||
Dim oSql As String = "Select * from TBDD_DOKUMENTART WHERE GUID = " & cmbDoctype.SelectedValue.ToString
|
||||
Dim oFilter = "GUID = " & cmbDoctype.SelectedValue.ToString
|
||||
My.Application.Globix.CURR_DT_DOCTYPE = _DataASorDB.GetDatatable("DD_ECM", oSql, "TBDD_DOKUMENTART", oFilter, "")
|
||||
|
||||
|
||||
My.Application.Globix.CURRENT_DOCTYPE_DuplicateHandling = My.Application.Globix.CURR_DT_DOCTYPE.Rows(0).Item("DUPLICATE_HANDLING").ToString
|
||||
@@ -309,7 +322,9 @@ Public Class frmGlobix_Index
|
||||
Dim oSql
|
||||
Try
|
||||
oSql = "select T1.BEZEICHNUNG AS DOKUMENTART,T.* from TBDD_INDEX_MAN T, TBDD_DOKUMENTART T1 where T.ACTIVE = 1 AND T.DOK_ID = T1.GUID AND T.DOK_ID = " & dokartid & " ORDER BY T.SEQUENCE"
|
||||
DT_INDEXEMAN = My.Database.GetDatatable(oSql)
|
||||
|
||||
Dim oFilter = "DOK_ID = " & dokartid
|
||||
DT_INDEXEMAN = _DataASorDB.GetDatatable("DD_ECM", oSql, "DT_INDEXE_MAN", oFilter, "SEQUENCE")
|
||||
pnlIndex.Visible = True
|
||||
LoadIndexe_Man()
|
||||
Catch ex As System.Exception
|
||||
@@ -360,32 +375,32 @@ Public Class frmGlobix_Index
|
||||
addLabel(oControlName, oRow.Item("COMMENT").ToString, oLabelPosition, oControlCount)
|
||||
End If
|
||||
|
||||
'Dim DefaultValue = Check_HistoryValues(oControlName, oRow.Item("DOKUMENTART"))
|
||||
' If DefaultValue Is Nothing Then
|
||||
Dim DefaultValue = GetPlaceholderValue(oRow.Item("DEFAULT_VALUE"), My.Application.Globix.CURRENT_WORKFILE, My.Application.User.ShortName)
|
||||
' End If
|
||||
Dim oDefaultValue = Check_HistoryValues(oControlName, oRow.Item("DOKUMENTART"))
|
||||
If oDefaultValue Is Nothing Then
|
||||
oDefaultValue = GetPlaceholderValue(oRow.Item("DEFAULT_VALUE"), My.Application.Globix.CURRENT_WORKFILE, My.Application.User.ShortName)
|
||||
End If
|
||||
Select Case oDataType
|
||||
Case "BOOLEAN"
|
||||
Dim chk As CheckBox = oControls.AddCheckBox(oControlName, oControlPosition, DefaultValue, oRow.Item("COMMENT").ToString)
|
||||
Dim chk As CheckBox = oControls.AddCheckBox(oControlName, oControlPosition, oDefaultValue, oRow.Item("COMMENT").ToString)
|
||||
If Not IsNothing(chk) Then
|
||||
pnlIndex.Controls.Add(chk)
|
||||
End If
|
||||
Case "INTEGER"
|
||||
If (oSQLSuggestion = True And oRow.Item("SQL_RESULT").ToString.Length > 0) Or MultiSelect = True Then
|
||||
Dim oControl = oControls.AddVorschlag_ComboBox(oControlName, oControlPosition, oConnectionId, oRow.Item("SQL_RESULT"), MultiSelect, oDataType, DefaultValue, AddNewItems, PreventDuplicates, oSQLSuggestion)
|
||||
Dim oControl = oControls.AddVorschlag_ComboBox(oControlName, oControlPosition, oConnectionId, oRow.Item("SQL_RESULT"), MultiSelect, oDataType, oDefaultValue, AddNewItems, PreventDuplicates, oSQLSuggestion)
|
||||
If Not IsNothing(oControl) Then
|
||||
pnlIndex.Controls.Add(oControl)
|
||||
End If
|
||||
Else
|
||||
'nur eine Textbox
|
||||
Dim oControl = oControls.AddTextBox(oControlName, oControlPosition, DefaultValue, oDataType)
|
||||
Dim oControl = oControls.AddTextBox(oControlName, oControlPosition, oDefaultValue, oDataType)
|
||||
If Not IsNothing(oControl) Then
|
||||
pnlIndex.Controls.Add(oControl)
|
||||
End If
|
||||
End If
|
||||
Case "VARCHAR"
|
||||
If (oSQLSuggestion = True And oRow.Item("SQL_RESULT").ToString.Length > 0) Or MultiSelect = True Then
|
||||
Dim oControl = oControls.AddVorschlag_ComboBox(oControlName, oControlPosition, oConnectionId, oRow.Item("SQL_RESULT"), MultiSelect, oDataType, DefaultValue, AddNewItems, PreventDuplicates, oSQLSuggestion)
|
||||
Dim oControl = oControls.AddVorschlag_ComboBox(oControlName, oControlPosition, oConnectionId, oRow.Item("SQL_RESULT"), MultiSelect, oDataType, oDefaultValue, AddNewItems, PreventDuplicates, oSQLSuggestion)
|
||||
If Not IsNothing(oControl) Then
|
||||
pnlIndex.Controls.Add(oControl)
|
||||
End If
|
||||
@@ -396,7 +411,7 @@ Public Class frmGlobix_Index
|
||||
pnlIndex.Controls.Add(oControl)
|
||||
End If
|
||||
Else
|
||||
Dim VORBELGUNG As String = DefaultValue
|
||||
Dim VORBELGUNG As String = oDefaultValue
|
||||
Dim oControl = oControls.AddTextBox(oControlName, oControlPosition, VORBELGUNG, oDataType)
|
||||
If Not IsNothing(oControl) Then
|
||||
pnlIndex.Controls.Add(oControl)
|
||||
@@ -404,7 +419,7 @@ Public Class frmGlobix_Index
|
||||
End If
|
||||
End If
|
||||
Case "DATE"
|
||||
Dim oPicker = oControls.AddDateTimePicker(oControlName, oControlPosition, oDataType, DefaultValue)
|
||||
Dim oPicker = oControls.AddDateTimePicker(oControlName, oControlPosition, oDataType, oDefaultValue)
|
||||
pnlIndex.Controls.Add(oPicker)
|
||||
|
||||
Case Else
|
||||
@@ -475,26 +490,26 @@ Public Class frmGlobix_Index
|
||||
|
||||
Return oResult
|
||||
End Function
|
||||
'Function Check_HistoryValues(Indexname As String, Dokart As String) As String
|
||||
' Try
|
||||
' Dim result = Nothing
|
||||
' Dim DT As DataTable = MyDataset.TBTEMP_INDEXRESULTS
|
||||
' If DT.Rows.Count > 0 Then
|
||||
' For Each row As DataRow In DT.Rows
|
||||
' If row.Item("Indexname") = Indexname And row.Item("Dokumentart") = Dokart Then
|
||||
' result = row.Item("Value")
|
||||
' Return result
|
||||
' End If
|
||||
' Next
|
||||
' Else
|
||||
' Return Nothing
|
||||
' End If
|
||||
' Catch ex As Exception
|
||||
' _Logger.Error(ex)
|
||||
' MsgBox(ex.Message, MsgBoxStyle.Critical, "Unexpected error in Check_HistoryValues:")
|
||||
' Return Nothing
|
||||
' End Try
|
||||
'End Function
|
||||
Function Check_HistoryValues(Indexname As String, Dokart As String) As String
|
||||
Try
|
||||
Dim result = Nothing
|
||||
Dim DT As DataTable = GlobixDataset.TBTEMP_INDEXRESULTS
|
||||
If DT.Rows.Count > 0 Then
|
||||
For Each row As DataRow In DT.Rows
|
||||
If row.Item("Indexname") = Indexname And row.Item("Dokumentart") = Dokart Then
|
||||
result = row.Item("Value")
|
||||
Return result
|
||||
End If
|
||||
Next
|
||||
Else
|
||||
Return Nothing
|
||||
End If
|
||||
Catch ex As Exception
|
||||
_Logger.Error(ex)
|
||||
MsgBox(ex.Message, MsgBoxStyle.Critical, "Unexpected error in Check_HistoryValues:")
|
||||
Return Nothing
|
||||
End Try
|
||||
End Function
|
||||
Sub ClearError()
|
||||
labelError.Visibility = DevExpress.XtraBars.BarItemVisibility.Never
|
||||
labelError.Caption = String.Empty
|
||||
@@ -613,7 +628,7 @@ Public Class frmGlobix_Index
|
||||
ClearNotice()
|
||||
Me.Cursor = Cursors.WaitCursor
|
||||
Refresh_RegexTable()
|
||||
For Each rowregex As DataRow In My.Application.BASE_DATA_DT_REGEX.Rows
|
||||
For Each rowregex As DataRow In My.Application.Globix.DT_FUNCTION_REGEX.Rows
|
||||
If rowregex.Item("FUNCTION_NAME") = "CLEAN_FILENAME" Then
|
||||
My.Application.Globix.REGEX_CLEAN_FILENAME = rowregex.Item("REGEX")
|
||||
End If
|
||||
@@ -657,10 +672,14 @@ Public Class frmGlobix_Index
|
||||
If WORK_FILE() = True Then
|
||||
Me.Cursor = Cursors.Default
|
||||
If My.UIConfig.Globix.ShowIndexResult = True Then
|
||||
|
||||
NI_TYPE = "INFO"
|
||||
If My.Application.User.Language = "de-DE" Then
|
||||
MsgBox("Die Datei wurde erfolgreich verarbeitet!" & vbNewLine & "Ablagepfad:" & vbNewLine & My.Application.Globix.CURRENT_NEWFILENAME, MsgBoxStyle.Information, "Erfolgsmeldung")
|
||||
NI_TITLE = "Globix Flow erfolgreich"
|
||||
NI_MESSAGE = "Die Datei wurde erfolgreich verarbeitet"
|
||||
Else
|
||||
MsgBox("File sucessfully processed!" & vbNewLine & "Path:" & vbNewLine & My.Application.Globix.CURRENT_NEWFILENAME, MsgBoxStyle.Information, "Success")
|
||||
NI_TITLE = "Success Globix Flow"
|
||||
NI_MESSAGE = "File successfully processed"
|
||||
End If
|
||||
End If
|
||||
|
||||
@@ -677,7 +696,8 @@ Public Class frmGlobix_Index
|
||||
Private Function WORK_FILE()
|
||||
Try
|
||||
Dim oSQL = $"SELECT * ,CONVERT(VARCHAR(512),'') As IndexValueGUI,CONVERT(VARCHAR(512),'') As IndexValue_File,CONVERT(Bit,0) as Indexed FROM VWDDINDEX_MAN WHERE DOK_ID = {My.Application.Globix.CURRENT_DOCTYPE_ID}"
|
||||
My.Application.Globix.CURR_DT_MAN_INDEXE = My.Database.GetDatatable(oSQL)
|
||||
Dim oFilter = "DOK_ID = " & My.Application.Globix.CURRENT_DOCTYPE_ID
|
||||
My.Application.Globix.CURR_DT_MAN_INDEXE = _DataASorDB.GetDatatable("DD_ECM", oSQL, "VWDDINDEX_MAN", oFilter, "")
|
||||
|
||||
_Logger.Debug("Manuelle Indexe geladen")
|
||||
|
||||
@@ -947,16 +967,17 @@ Public Class frmGlobix_Index
|
||||
End If
|
||||
|
||||
|
||||
Dim oExportSuccessful As Boolean = False
|
||||
Dim oIDBImportResult As Boolean = False
|
||||
'Variable Folder
|
||||
If DropType = "|DROPFROMFSYSTEM|" Or DropType = "|OUTLOOK_ATTACHMENT|" Or DropType = "|ATTMNTEXTRACTED|" Or DropType = "|FW_SIMPLEINDEXER|" Then
|
||||
Move_File(My.Application.Globix.CURRENT_WORKFILE, My.Application.Globix.CURRENT_NEWFILENAME, My.Application.Globix.CURRENT_WORKFILE_EXTENSION, My.Application.Globix.FILE_DELIMITER)
|
||||
oIDBImportResult = ImportFile2IDB()
|
||||
|
||||
' oExportSuccessful = SINGLEFILE_2_WINDREAM(My.Application.Globix.CURR_D)
|
||||
ElseIf DropType = "|OUTLOOK_MESSAGE|" Or DropType = "|FW_MSGONLY|" Or DropType = "|MSGONLY|" Or DropType = "|FW_OUTLOOK_MESSAGE|" Then
|
||||
' oExportSuccessful = SINGLEFILE_2_WINDREAM(CURR_DOKART_OBJECTTYPE)
|
||||
oIDBImportResult = ImportFile2IDB()
|
||||
End If
|
||||
If oExportSuccessful = True Then
|
||||
If oIDBImportResult = True Then
|
||||
|
||||
'Kein Fehler in Export2windream
|
||||
oError = False
|
||||
If Write_Indizes() = True Then
|
||||
@@ -966,7 +987,7 @@ Public Class frmGlobix_Index
|
||||
Dim tempCur_WF = My.Application.Globix.CURRENT_WORKFILE.Replace("'", "''")
|
||||
Dim tempCur_New_FN = My.Application.Globix.CURRENT_NEWFILENAME.Replace("'", "''")
|
||||
Insert_String = sql_history_INSERT_INTO & ",ADDED_WHO) VALUES ('" & tempCur_WF & "','" & tempCur_New_FN & "'" & sql_history_Index_Values & ",'" & Environment.UserDomainName & "\" & Environment.UserName & "')"
|
||||
My.Database.GetScalarValue(Insert_String)
|
||||
My.Database.ExecuteNonQuery(Insert_String)
|
||||
If DropType.Contains("MSG") Or DropType = "|ATTMNTEXTRACTED|" Or DropType = "|OUTLOOK_ATTACHMENT|" Then
|
||||
If My.Application.Globix.CURRENT_MESSAGEID <> "" Then
|
||||
Dim max As String = "SELECT MAX(GUID) FROM TBGI_HISTORY"
|
||||
@@ -1000,11 +1021,13 @@ Public Class frmGlobix_Index
|
||||
End If
|
||||
Else
|
||||
oError = True
|
||||
|
||||
NI_TYPE = "ERROR"
|
||||
If My.Application.User.Language = "de-DE" Then
|
||||
MsgBox("Der Export nach windream war nicht erfolgreich - Check LogFile", MsgBoxStyle.Exclamation)
|
||||
NI_TITLE = "Fehler Globix-Import"
|
||||
NI_MESSAGE = "Der Import war nicht erfolgreich - Check LogFile"
|
||||
Else
|
||||
MsgBox("Export to windream was unsucessful - Check LogFile", MsgBoxStyle.Exclamation)
|
||||
NI_TITLE = "Error Globix-Import"
|
||||
NI_MESSAGE = "The import was not successful - Check LogFile"
|
||||
End If
|
||||
End If
|
||||
|
||||
@@ -1033,7 +1056,7 @@ Public Class frmGlobix_Index
|
||||
If oDTRESULT.Rows.Count = 0 Then
|
||||
Return False
|
||||
Else
|
||||
My.Application.Globix.CURRENT_DOC_ID = oDTRESULT.Rows(0).Item(0)
|
||||
My.Application.Globix.CURRENT_IDB_OBJ_ID = oDTRESULT.Rows(0).Item(0)
|
||||
Return True
|
||||
End If
|
||||
End If
|
||||
@@ -1042,6 +1065,7 @@ Public Class frmGlobix_Index
|
||||
|
||||
Catch ex As Exception
|
||||
_Logger.Error(ex)
|
||||
Return False
|
||||
End Try
|
||||
End Function
|
||||
Function Move_File(Quelle As String, _NewFilename As String, extension As String, _versionTz As String) As Boolean
|
||||
@@ -1059,6 +1083,10 @@ Public Class frmGlobix_Index
|
||||
My.Application.Globix.CURRENT_NEWFILENAME = neuername
|
||||
Loop
|
||||
End If
|
||||
Dim opath = Path.GetDirectoryName(My.Application.Globix.CURRENT_NEWFILENAME)
|
||||
If Directory.Exists(opath) = False Then
|
||||
Directory.CreateDirectory(opath)
|
||||
End If
|
||||
'Die Datei wird nun verschoben
|
||||
If My.Application.Globix.CURR_DELETE_ORIGIN = True Then
|
||||
My.Computer.FileSystem.MoveFile(My.Application.Globix.CURRENT_WORKFILE, My.Application.Globix.CURRENT_NEWFILENAME)
|
||||
@@ -1100,139 +1128,107 @@ Public Class frmGlobix_Index
|
||||
End Function
|
||||
Private Function Write_Indizes()
|
||||
Try
|
||||
Dim indexierung_erfolgreich As Boolean = False
|
||||
' 'Manuelle Indexe Indexieren
|
||||
' Dim DTMan As DataTable = MyDataset.VWDDINDEX_MAN
|
||||
' If DTMan.Rows.Count > 0 Then
|
||||
' Dim Count As Integer = 0
|
||||
' For Each row As DataRow In DTMan.Rows
|
||||
' Dim idxvalue = row.Item("IndexValueGUI")
|
||||
' Dim indexname = row.Item("WD_INDEX").ToString
|
||||
' _Logger.Debug($"Write_Indizes - Index [{indexname}]...")
|
||||
' Dim optional_Index = CBool(row.Item("OPTIONAL"))
|
||||
' Dim Indexed = CBool(row.Item("Indexed"))
|
||||
' If Indexed And idxvalue.ToString <> "" And idxvalue <> "EMPTY_OI" Then
|
||||
' If indexname <> String.Empty Then
|
||||
' If row.Item("SAVE_VALUE") = True Then
|
||||
' 'Den Indexwert zwischenspeichern
|
||||
' Dim DTTemp As DataTable = MyDataset.TBTEMP_INDEXRESULTS
|
||||
' Dim rowexists As Boolean = False
|
||||
' For Each rowTemp As DataRow In DTTemp.Rows
|
||||
' 'Wenn bereits ein Eintrag existiert.....
|
||||
' If rowTemp.Item("Dokumentart") = row.Item("DOKUMENTART") And rowTemp.Item("Indexname") = row.Item("INDEXNAME") Then
|
||||
' rowexists = True
|
||||
' '......überschreiben
|
||||
' rowTemp.Item("Value") = row.Item("IndexValueGUI")
|
||||
' End If
|
||||
' Next
|
||||
' '.....ansonsten neu anlegen
|
||||
' If rowexists = False Then
|
||||
' Dim newRow As DataRow = DTTemp.NewRow()
|
||||
' newRow("Dokumentart") = row.Item("DOKUMENTART").ToString
|
||||
' newRow("Indexname") = row.Item("INDEXNAME").ToString
|
||||
' newRow("Value") = row.Item("IndexValueGUI")
|
||||
' DTTemp.Rows.Add(newRow)
|
||||
' End If
|
||||
' End If
|
||||
Dim oSetVariableOK As Boolean = False
|
||||
Dim oAttributeValue As String
|
||||
Dim oAttributeName As String
|
||||
'Manuelle Indexe Indexieren
|
||||
If My.Application.Globix.CURR_DT_MAN_INDEXE.Rows.Count > 0 Then
|
||||
Dim Count As Integer = 0
|
||||
For Each row As DataRow In My.Application.Globix.CURR_DT_MAN_INDEXE.Rows
|
||||
|
||||
' _Logger.Debug($"Manueller Indexvalue [{idxvalue.ToString}]...NOW THE INDEXING...")
|
||||
' Count += 1
|
||||
oAttributeValue = row.Item("IndexValueGUI")
|
||||
oAttributeName = row.Item("WD_INDEX").ToString
|
||||
_Logger.Debug($"Write_Indizes - Index [{oAttributeName}]...")
|
||||
Dim oIsOptional = CBool(row.Item("OPTIONAL"))
|
||||
Dim oIndexed = CBool(row.Item("Indexed"))
|
||||
If oIndexed And oAttributeValue.ToString <> "" And oAttributeValue <> "EMPTY_OI" Then
|
||||
If oAttributeName <> String.Empty Then
|
||||
If row.Item("SAVE_VALUE") = True Then
|
||||
'Den Indexwert zwischenspeichern
|
||||
Dim oDTIndexResults As DataTable = GlobixDataset.TBTEMP_INDEXRESULTS
|
||||
Dim rowexists As Boolean = False
|
||||
For Each rowTemp As DataRow In oDTIndexResults.Rows
|
||||
'Wenn bereits ein Eintrag existiert.....
|
||||
If rowTemp.Item("Dokumentart") = row.Item("DOKUMENTART") And rowTemp.Item("Indexname") = row.Item("INDEXNAME") Then
|
||||
rowexists = True
|
||||
'......überschreiben
|
||||
rowTemp.Item("Value") = row.Item("IndexValueGUI")
|
||||
End If
|
||||
Next
|
||||
'.....ansonsten neu anlegen
|
||||
If rowexists = False Then
|
||||
Dim newRow As DataRow = oDTIndexResults.NewRow()
|
||||
newRow("Dokumentart") = row.Item("DOKUMENTART").ToString
|
||||
newRow("Indexname") = row.Item("INDEXNAME").ToString
|
||||
newRow("Value") = row.Item("IndexValueGUI")
|
||||
oDTIndexResults.Rows.Add(newRow)
|
||||
End If
|
||||
End If
|
||||
End If
|
||||
_Logger.Debug($"Manueller Indexvalue [{oAttributeValue.ToString}]...NOW THE INDEXING...")
|
||||
Count += 1
|
||||
' den Typ des Zielindexes auslesen
|
||||
Dim oIndexType As Integer = _idbdata.GetTypeOfIndex(oAttributeName)
|
||||
_Logger.Debug($"oIndexType [{oIndexType.ToString}]...")
|
||||
_Logger.Debug($"Indexing oIndexType < 8...")
|
||||
oSetVariableOK = _idbdata.SetVariableValue(oAttributeName, oAttributeValue)
|
||||
|
||||
'indexierung_erfolgreich = ClassWindream.DateiIndexieren(CURRENT_NEWFILENAME, indexname, idxvalue)
|
||||
If oSetVariableOK = False Then
|
||||
MsgBox("Error in Indexing file - See log", MsgBoxStyle.Critical)
|
||||
Return False
|
||||
Exit For
|
||||
End If
|
||||
Else
|
||||
_Logger.Debug("No Indexing Attributename: " & oAttributeName)
|
||||
_Logger.Debug("is optional? " & oIsOptional.ToString)
|
||||
End If
|
||||
'Else
|
||||
'_Logger.Debug("Indexvalue is empty or field is not indexed - Indexname: " & oAttributeName)
|
||||
'_Logger.Info("Indexvalue is empty or field is not indexed - Indexname: " & oAttributeName)
|
||||
'End If
|
||||
Next
|
||||
|
||||
' ' den Typ des Zielindexes auslesen
|
||||
' Dim oIndexType As Integer = WINDREAM.GetIndexType(indexname)
|
||||
' _Logger.Debug($"oIndexType [{oIndexType.ToString}]...")
|
||||
' If oIndexType < WINDREAM.WMObjectVariableValueTypeVector Then
|
||||
' _Logger.Debug($"Indexing oIndexType < WINDREAM.WMObjectVariableValueTypeVector...")
|
||||
' indexierung_erfolgreich = WINDREAM.SetFileIndex(CURRENT_NEWFILENAME, indexname, idxvalue, CURR_DOKART_OBJECTTYPE)
|
||||
' Else
|
||||
' Dim oSplitArray = Split(idxvalue, ClassConstants.VECTORSEPARATOR)
|
||||
' Dim oListofString As New List(Of String)
|
||||
' If oSplitArray.Count = 0 Then
|
||||
' oListofString.Add(idxvalue)
|
||||
' Else
|
||||
' For Each oStr In oSplitArray
|
||||
' oListofString.Add(oStr)
|
||||
' Next
|
||||
' End If
|
||||
End If
|
||||
oSetVariableOK = False
|
||||
'Automatische Indexe Indexieren
|
||||
If My.Application.Globix.CURR_DT_AUTO_INDEXE.Rows.Count > 0 Then
|
||||
Dim Count As Integer = 0
|
||||
For Each row As DataRow In My.Application.Globix.CURR_DT_AUTO_INDEXE.Rows
|
||||
oSetVariableOK = CBool(row.Item("Indexed"))
|
||||
oAttributeValue = row.Item("IndexValueGUI").ToString
|
||||
oAttributeName = row.Item("INDEXNAME").ToString
|
||||
If oSetVariableOK = True And oAttributeValue <> "" Then
|
||||
If oAttributeValue <> "EMPTY_OI" Then
|
||||
_Logger.Info("Auto Indexname: " & oAttributeName.ToString)
|
||||
_Logger.Info("oAttributeValue: " & oAttributeValue.ToString)
|
||||
Count += 1
|
||||
' den Typ des Zielindexes auslesen
|
||||
Dim indexType As Integer = _idbdata.GetTypeOfIndex(oAttributeName)
|
||||
oSetVariableOK = _idbdata.SetVariableValue(oAttributeName, oAttributeValue)
|
||||
|
||||
|
||||
' indexierung_erfolgreich = WINDREAM.SetFileIndex(CURRENT_NEWFILENAME, indexname, oListofString, CURR_DOKART_OBJECTTYPE)
|
||||
' End If
|
||||
|
||||
' 'indexierung_erfolgreich = ClassWindream.DateiIndexieren(CURRENT_NEWFILENAME, indexname, idxvalue)
|
||||
' If indexierung_erfolgreich = False Then
|
||||
' MsgBox("Error in Indexing file - See log", MsgBoxStyle.Critical)
|
||||
' Return False
|
||||
' Exit For
|
||||
' End If
|
||||
' Else
|
||||
|
||||
' _Logger.Debug("No Indexing: indexname: " & indexname)
|
||||
' _Logger.Debug("No Indexing: is optional? " & optional_Index.ToString)
|
||||
' End If
|
||||
' Else
|
||||
' _Logger.Debug("Indexvalue is empty or field is not indexed - Indexname: " & indexname)
|
||||
' _Logger.Info("Indexvalue is empty or field is not indexed - Indexname: " & indexname)
|
||||
' End If
|
||||
' Next
|
||||
|
||||
' End If
|
||||
' 'Automatische Indexe Indexieren
|
||||
' Dim DTAut As DataTable = MyDataset.VWDDINDEX_AUTOM
|
||||
' If DTAut.Rows.Count > 0 Then
|
||||
' Dim Count As Integer = 0
|
||||
' For Each row As DataRow In DTAut.Rows
|
||||
' Dim Indexed = CBool(row.Item("Indexed"))
|
||||
' Dim Indexvalue = row.Item("IndexValueGUI").ToString
|
||||
' Dim indexname = row.Item("INDEXNAME").ToString
|
||||
' If Indexed = True And Indexvalue <> "" Then
|
||||
' If Indexvalue <> "EMPTY_OI" Then
|
||||
' _Logger.Info("Auto Indexname: " & indexname.ToString)
|
||||
' _Logger.Info("Indexvalue: " & Indexvalue.ToString)
|
||||
' Count += 1
|
||||
|
||||
' ' den Typ des Zielindexes auslesen
|
||||
' Dim indexType As Integer = WINDREAM.GetIndexType(indexname)
|
||||
|
||||
' If indexType < WINDREAM.WMObjectVariableValueTypeVector Then
|
||||
' indexierung_erfolgreich = WINDREAM.SetFileIndex(CURRENT_NEWFILENAME, indexname, Indexvalue, CURR_DOKART_OBJECTTYPE)
|
||||
' Else
|
||||
' Dim oSplitArray = Split(Indexvalue, ClassConstants.VECTORSEPARATOR)
|
||||
' Dim oListofString As New List(Of String)
|
||||
' If oSplitArray.Count = 0 Then
|
||||
' oListofString.Add(Indexvalue)
|
||||
' Else
|
||||
' For Each oStr In oSplitArray
|
||||
' oListofString.Add(oStr)
|
||||
' Next
|
||||
' End If
|
||||
' indexierung_erfolgreich = WINDREAM.SetFileIndex(CURRENT_NEWFILENAME, indexname, oListofString, CURR_DOKART_OBJECTTYPE)
|
||||
' End If
|
||||
|
||||
' 'indexierung_erfolgreich = WINDREAM.SetFileIndex(CURRENT_NEWFILENAME, indexname, Indexvalue, CURR_DOKART_OBJECTTYPE)
|
||||
' If indexierung_erfolgreich = False Then
|
||||
' MsgBox("Error in indexing file - See log", MsgBoxStyle.Critical)
|
||||
' Return False
|
||||
' Exit For
|
||||
' End If
|
||||
' End If
|
||||
' End If
|
||||
' Next
|
||||
' End If
|
||||
' If DropType = "|OUTLOOK_MESSAGE|" Or DropType = "|FW_MSGONLY|" Or DropType = "|MSGONLY|" Or CURRENT_NEWFILENAME.EndsWith(".msg") Then
|
||||
' indexierung_erfolgreich = SetEmailIndices()
|
||||
' If indexierung_erfolgreich = False Then
|
||||
' MsgBox("Error in SetEmailIndices - See log", MsgBoxStyle.Critical)
|
||||
' Return False
|
||||
' End If
|
||||
' ElseIf DropType = "|ATTMNTEXTRACTED|" Or DropType = "|OUTLOOK_ATTACHMENT|" Then
|
||||
' indexierung_erfolgreich = SetAttachmentIndices()
|
||||
' If indexierung_erfolgreich = False Then
|
||||
' MsgBox("Error in SetEmailIndices - See log", MsgBoxStyle.Critical)
|
||||
' Return False
|
||||
' End If
|
||||
' End If
|
||||
If oSetVariableOK = False Then
|
||||
MsgBox("Error in indexing file - See log", MsgBoxStyle.Critical)
|
||||
Return False
|
||||
Exit For
|
||||
End If
|
||||
End If
|
||||
End If
|
||||
Next
|
||||
End If
|
||||
If DropType = "|OUTLOOK_MESSAGE|" Or DropType = "|FW_MSGONLY|" Or DropType = "|MSGONLY|" Or My.Application.Globix.CURRENT_NEWFILENAME.EndsWith(".msg") Then
|
||||
oSetVariableOK = SetEmailIndices()
|
||||
If oSetVariableOK = False Then
|
||||
MsgBox("Error in SetEmailIndices - See log", MsgBoxStyle.Critical)
|
||||
Return False
|
||||
End If
|
||||
ElseIf DropType = "|ATTMNTEXTRACTED|" Or DropType = "|OUTLOOK_ATTACHMENT|" Then
|
||||
oSetVariableOK = SetAttachmentIndices()
|
||||
If oSetVariableOK = False Then
|
||||
MsgBox("Error in SetEmailIndices - See log", MsgBoxStyle.Critical)
|
||||
Return False
|
||||
End If
|
||||
End If
|
||||
Return True
|
||||
Catch ex As Exception
|
||||
_Logger.Warn("Unexpected error in Write_Indizes - Fehler: " & vbNewLine & ex.Message)
|
||||
@@ -1622,7 +1618,52 @@ Public Class frmGlobix_Index
|
||||
Return False
|
||||
End Try
|
||||
End Function
|
||||
Private Function SetAttachmentIndices()
|
||||
Dim indexierung_erfolgreich As Boolean = True
|
||||
Try
|
||||
Dim DT As DataTable = My.Database.GetDatatable("SELECT * FROM TBGI_OBJECTTYPE_EMAIL_INDEX WHERE OBJECTTYPE = 'DEFAULT'")
|
||||
If DT.Rows.Count = 1 Then
|
||||
|
||||
If Not My.Application.Globix.CURRENT_MESSAGEID Is Nothing Then
|
||||
If My.Application.Globix.CURRENT_MESSAGEID <> "" Then
|
||||
indexierung_erfolgreich = _idbdata.SetVariableValue(DT.Rows(0).Item("IDX_EMAIL_ID").ToString, My.Application.Globix.CURRENT_MESSAGEID)
|
||||
If indexierung_erfolgreich = False Then
|
||||
MsgBox("Error in SetAttachmentIndices MESSAGE-ID - See log", MsgBoxStyle.Critical)
|
||||
Return False
|
||||
End If
|
||||
End If
|
||||
End If
|
||||
'Das Subject speichern
|
||||
If My.Application.Globix.CURRENT_MESSAGESUBJECT <> "" Then
|
||||
indexierung_erfolgreich = _idbdata.SetVariableValue(DT.Rows(0).Item("IDX_EMAIL_SUBJECT").ToString, My.Application.Globix.CURRENT_MESSAGESUBJECT)
|
||||
If indexierung_erfolgreich = False Then
|
||||
MsgBox("Error in SetAttachmentIndices SUBJECT - See log", MsgBoxStyle.Critical)
|
||||
Return False
|
||||
End If
|
||||
End If
|
||||
'Das MesageDate speichern
|
||||
If My.Application.Globix.CURRENT_MESSAGEDATE <> "" Then
|
||||
indexierung_erfolgreich = _idbdata.SetVariableValue(DT.Rows(0).Item("IDX_EMAIL_DATE_IN").ToString, My.Application.Globix.CURRENT_MESSAGEDATE)
|
||||
If indexierung_erfolgreich = False Then
|
||||
MsgBox("Error in SetAttachmentIndices DATE - See log", MsgBoxStyle.Critical)
|
||||
Return False
|
||||
End If
|
||||
End If
|
||||
'Kennzeichnen das es ein Anhang war!
|
||||
indexierung_erfolgreich = _idbdata.SetVariableValue(DT.Rows(0).Item("IDX_CHECK_ATTACHMENT").ToString, True)
|
||||
If indexierung_erfolgreich = False Then
|
||||
MsgBox("Error in SetAttachmentIndices ATTACHMENT Y/N - See log", MsgBoxStyle.Critical)
|
||||
Return False
|
||||
End If
|
||||
Return indexierung_erfolgreich
|
||||
End If
|
||||
Catch ex As Exception
|
||||
_Logger.Error(ex)
|
||||
MsgBox("Error in SetAttachmentIndices:" & vbNewLine & ex.Message, MsgBoxStyle.Critical)
|
||||
Return False
|
||||
End Try
|
||||
|
||||
End Function
|
||||
Function Indexwert_checkValueDB(indexname As String, wert As String)
|
||||
Try
|
||||
Dim oRow As DataRow
|
||||
@@ -1678,8 +1719,10 @@ Public Class frmGlobix_Index
|
||||
Try
|
||||
|
||||
Dim oSQL = $"SELECT * FROM VWDDINDEX_AUTOM WHERE DOCTYPE_ID = {My.Application.Globix.CURRENT_DOCTYPE_ID}"
|
||||
Dim oFilter = $"DOCTYPE_ID = {My.Application.Globix.CURRENT_DOCTYPE_ID}"
|
||||
My.Application.Globix.CURR_DT_AUTO_INDEXE = _DataASorDB.GetDatatable("DD_ECM", oSQL, "VWDDINDEX_AUTOM", oFilter, "")
|
||||
|
||||
|
||||
My.Application.Globix.CURR_DT_AUTO_INDEXE = My.Database.GetDatatable(oSQL)
|
||||
|
||||
Dim oRegex As New Regex("\[%{1}[a-zA-Z0-9\!\$\&\/\(\)\=\?\,\.\-\;\:_öÖüÜäÄ\#\'\+\*\~\{\}\@\€\<\>\ ]+]{1}")
|
||||
|
||||
@@ -1853,7 +1896,7 @@ Public Class frmGlobix_Index
|
||||
'FILE AND INDEX
|
||||
'Zuerst nur die Fälle für die Variante ONLY FILE/FOLDER
|
||||
Dim DTNB As DataTable = FilterDatatable(My.Application.Globix.CURR_INDEX_MAN_POSTPROCESSING, "IDXMAN_ID = " & idxid & " AND VARIANT = 'ONLY FILE/FOLDER'", "", "SEQUENCE", True)
|
||||
'ClassDatabase.Return_Datatable("SELECT * FROM TBDD_INDEX_MAN_POSTPROCESSING WHERE IDXMAN_ID = " & idxid & " AND VARIANT = 'ONLY FILE/FOLDER' ORDER BY SEQUENCE")
|
||||
|
||||
If DTNB Is Nothing = False Then
|
||||
If DTNB.Rows.Count > 0 Then
|
||||
value_post = clsPostProcessing.Get_Nachbearbeitung_Wert(wert_in, DTNB)
|
||||
@@ -1865,7 +1908,7 @@ Public Class frmGlobix_Index
|
||||
DTNB = Nothing
|
||||
|
||||
DTNB = FilterDatatable(My.Application.Globix.CURR_INDEX_MAN_POSTPROCESSING, "IDXMAN_ID = " & idxid & " AND VARIANT = 'FILE AND INDEX'", "", "SEQUENCE", True)
|
||||
'ClassDatabase.Return_Datatable("SELECT * FROM TBDD_INDEX_MAN_POSTPROCESSING WHERE IDXMAN_ID = " & idxid & " AND VARIANT = 'FILE AND INDEX' ORDER BY SEQUENCE")
|
||||
|
||||
If DTNB Is Nothing = False Then
|
||||
If DTNB.Rows.Count > 0 Then
|
||||
value_post = clsPostProcessing.Get_Nachbearbeitung_Wert(wert_in, DTNB)
|
||||
@@ -1887,6 +1930,331 @@ Public Class frmGlobix_Index
|
||||
GlobixFlow()
|
||||
End Sub
|
||||
|
||||
|
||||
Private Function SetEmailIndices()
|
||||
Dim indexierung_erfolgreich As Boolean = False
|
||||
Dim _step As String = "1"
|
||||
Try
|
||||
Dim msg As Msg.Message = New Msg.Message(My.Application.Globix.CURRENT_NEWFILENAME)
|
||||
Dim msgDisplayTo = msg.DisplayTo
|
||||
Dim msgInternetAccountName = msg.InternetAccountName
|
||||
|
||||
_Logger.Debug("")
|
||||
_Logger.Debug("msgInternetAccountName: " & msgInternetAccountName)
|
||||
_Logger.Debug("SenderName: " & msg.SenderName)
|
||||
_Logger.Debug("SenderEmailAddress: " & msg.SenderEmailAddress)
|
||||
_Logger.Debug("ReceivedByName: " & msg.ReceivedByName)
|
||||
_Logger.Debug("ReceivedByEmailAddress: " & msg.ReceivedByEmailAddress)
|
||||
_Logger.Debug("")
|
||||
|
||||
_step = "2"
|
||||
|
||||
Dim fromPattern As String = ""
|
||||
Dim toPattern As String = ""
|
||||
Dim messageIDPattern As String = ""
|
||||
Dim finalize_pattern As String = ""
|
||||
|
||||
' Email Header auslesen
|
||||
Dim headers As String = ClassEmailHeaderExtractor.getMessageHeaders(msg)
|
||||
|
||||
For Each rowregex As DataRow In My.Application.Globix.DT_FUNCTION_REGEX.Rows
|
||||
If rowregex.Item("FUNCTION_NAME") = "FROM_EMAIL_HEADER" Then
|
||||
fromPattern = rowregex.Item("REGEX")
|
||||
ElseIf rowregex.Item("FUNCTION_NAME") = "TO_EMAIL_HEADER" Then
|
||||
toPattern = rowregex.Item("REGEX")
|
||||
ElseIf rowregex.Item("FUNCTION_NAME") = "MESSAGE_ID" Then
|
||||
messageIDPattern = rowregex.Item("REGEX")
|
||||
ElseIf rowregex.Item("FUNCTION_NAME") = "FINALIZE" Then
|
||||
finalize_pattern = rowregex.Item("REGEX")
|
||||
End If
|
||||
Next
|
||||
|
||||
Dim DT As DataTable = My.Database.GetDatatable("SELECT * FROM TBGI_OBJECTTYPE_EMAIL_INDEX WHERE OBJECTTYPE = 'DEFAULT'")
|
||||
If IsNothing(DT) Then
|
||||
_Logger.Info("SELECT * FROM TBGI_OBJECTTYPE_EMAIL_INDEX RESULTED in NOTHING")
|
||||
Return False
|
||||
End If
|
||||
If DT.Rows.Count = 1 Then
|
||||
_step = "3"
|
||||
My.Application.Globix.CURRENT_MESSAGEDATE = ""
|
||||
My.Application.Globix.CURRENT_MESSAGESUBJECT = ""
|
||||
'Message-ID nur auswerten wenn vorher nicht gestzt wurde!
|
||||
If My.Application.Globix.CURRENT_MESSAGEID = "" Then
|
||||
If Not msg.InternetMessageId Is Nothing Then
|
||||
indexierung_erfolgreich = _idbdata.SetVariableValue(DT.Rows(0).Item("IDX_EMAIL_ID").ToString, msg.InternetMessageId)
|
||||
|
||||
'Die aktuelle Message-ID zwischenspeichern
|
||||
My.Application.Globix.CURRENT_MESSAGEID = msg.InternetMessageId
|
||||
If indexierung_erfolgreich = False Then
|
||||
MsgBox("Error in SetEmailIndices-EmailID - See log", MsgBoxStyle.Critical)
|
||||
Return False
|
||||
End If
|
||||
Else
|
||||
If messageIDPattern = String.Empty Then
|
||||
_Logger.Info("A messageID could not be read!")
|
||||
Else
|
||||
If Not IsNothing(headers) Then
|
||||
My.Application.Globix.CURRENT_MESSAGEID = ClassEmailHeaderExtractor.extractFromHeader(headers, messageIDPattern)
|
||||
If IsNothing(My.Application.Globix.CURRENT_MESSAGEID) Then
|
||||
My.Application.Globix.CURRENT_MESSAGEID = ""
|
||||
End If
|
||||
Else
|
||||
_Logger.Info("A messageID could not be read - messageheader nothing/messagIDpattern value!")
|
||||
End If
|
||||
End If
|
||||
|
||||
End If
|
||||
Else
|
||||
indexierung_erfolgreich = _idbdata.SetVariableValue(DT.Rows(0).Item("IDX_EMAIL_ID").ToStrin, My.Application.Globix.CURRENT_MESSAGEID)
|
||||
If indexierung_erfolgreich = False Then
|
||||
MsgBox("Error in SetEmailIndices-EmailID - See log", MsgBoxStyle.Critical)
|
||||
Return False
|
||||
End If
|
||||
End If
|
||||
_step = "4"
|
||||
' Regular Expressions vorbereiten
|
||||
|
||||
If fromPattern <> "" And toPattern <> "" Then
|
||||
_step = "4.1"
|
||||
Dim FromRegexList As New List(Of Regex)
|
||||
Dim ToRegexList As New List(Of Regex)
|
||||
Dim fromRegex As New Regex(fromPattern, RegexOptions.IgnoreCase)
|
||||
Dim toRegex As New Regex(toPattern, RegexOptions.IgnoreCase)
|
||||
|
||||
FromRegexList.Add(fromRegex)
|
||||
ToRegexList.Add(toRegex)
|
||||
|
||||
|
||||
Dim emailFrom
|
||||
Dim emailTo
|
||||
' Email Absender und Empfänger
|
||||
If headers Is Nothing Then
|
||||
_step = "4.2"
|
||||
If IsNothing(msgDisplayTo) Then
|
||||
_step = "4.3"
|
||||
_Logger.Info("DisplayTo in email is nothing - default will be set")
|
||||
emailTo = "NO RECIPIENT"
|
||||
Else
|
||||
_step = "4.4"
|
||||
emailTo = msgDisplayTo.ToString.Replace("'", "")
|
||||
End If
|
||||
If IsNothing(msgInternetAccountName) Then
|
||||
_step = "4.5"
|
||||
_Logger.Info("InternetAccountName in email is nothing - default will be set")
|
||||
emailFrom = ""
|
||||
Else
|
||||
_step = "4.6"
|
||||
emailFrom = msgInternetAccountName.ToString.Replace("'", "")
|
||||
End If
|
||||
Else
|
||||
_step = "5"
|
||||
_Logger.Info("emailTo and From Extraction via messageheader.")
|
||||
emailFrom = ClassEmailHeaderExtractor.extractFromHeader(headers, fromPattern) 'FromRegexList)
|
||||
|
||||
emailTo = ClassEmailHeaderExtractor.extractFromHeader(headers, toPattern) ' extractToAddress(headers, ToRegexList)
|
||||
|
||||
'Handler für leere emailTo-Adresse
|
||||
If IsNothing(emailTo) Then
|
||||
_step = "5.1"
|
||||
_Logger.Info("emailTo couldn't be extracted from messageheader...")
|
||||
If (headers.Contains("exc") Or headers.Contains("exchange")) Then
|
||||
_step = "5.2"
|
||||
_Logger.Info("...try with LDAP-option")
|
||||
Dim _email = GetUserEmailfromLDAP(msgDisplayTo)
|
||||
_step = "5.3"
|
||||
If _email <> "" Then
|
||||
emailTo = _email
|
||||
Else
|
||||
_Logger.Info(">> email-adress couldn't be read from LDAP with name '" & msgDisplayTo & "'")
|
||||
MsgBox("Could't get 'emailto' from messageHeader and later on with LDAP-Option." & vbNewLine & "Please check the dropped email and Configuration of Email-Indexing!", MsgBoxStyle.Exclamation)
|
||||
Return False
|
||||
End If
|
||||
Else
|
||||
_step = "5.4"
|
||||
CURR_MISSING_PATTERN_NAME = "Email To"
|
||||
CURR_MISSING_SEARCH_STRING = headers
|
||||
CURR_MISSING_MANUAL_VALUE = String.Empty
|
||||
frmGlobixMissingInput.ShowDialog()
|
||||
_step = "5.4.1"
|
||||
If CURR_MISSING_MANUAL_VALUE <> String.Empty Then
|
||||
_step = "5.4.2"
|
||||
emailTo = CURR_MISSING_MANUAL_VALUE
|
||||
Else
|
||||
_step = "5.4.3"
|
||||
_Logger.Info("no exchange patterns found in headers!")
|
||||
MsgBox("Could't get 'emailto' from messageHeader and exhange-Patterns weren't found." & vbNewLine & "Please check the dropped email and Configuration of Email-Indexing!", MsgBoxStyle.Exclamation)
|
||||
Return False
|
||||
End If
|
||||
|
||||
End If
|
||||
End If
|
||||
_step = "6"
|
||||
emailTo = ClassEmailHeaderExtractor.extractFromHeader(emailTo, finalize_pattern)
|
||||
emailFrom = ClassEmailHeaderExtractor.extractFromHeader(emailFrom, finalize_pattern)
|
||||
_step = "6.1"
|
||||
If Not IsNothing(emailFrom) Then
|
||||
emailFrom = emailFrom.Replace("<", "")
|
||||
emailFrom = emailFrom.Replace(">", "")
|
||||
Else
|
||||
_step = "6.1.x"
|
||||
_Logger.Info("emailFrom is Nothing?!")
|
||||
End If
|
||||
|
||||
If Not IsNothing(emailTo) Then
|
||||
_step = "6.1.1 " & emailTo.ToString
|
||||
emailTo = emailTo.Replace("<", "")
|
||||
emailTo = emailTo.Replace(">", "")
|
||||
_step = "6.2"
|
||||
Dim _duplicatesCheck As List(Of String) = New List(Of String)
|
||||
_duplicatesCheck = emailTo.ToString.Split(";").ToList
|
||||
' Filter distinct elements, and convert back into list.
|
||||
Dim result As List(Of String) = _duplicatesCheck.Distinct().ToList
|
||||
' Display result.
|
||||
Dim i As Integer = 0
|
||||
For Each element As String In result
|
||||
If i = 0 Then
|
||||
emailTo = element
|
||||
Else
|
||||
emailTo = emailTo & ";" & element
|
||||
End If
|
||||
i += 1
|
||||
Next
|
||||
Else
|
||||
_step = "6.3"
|
||||
_Logger.Info("emailTo is Nothing?!")
|
||||
End If
|
||||
|
||||
_Logger.Info("Headers-Content: ")
|
||||
_Logger.Info(headers.ToString)
|
||||
End If
|
||||
'Handler für leere emailFrom-Adresse
|
||||
If IsNothing(emailFrom) Then
|
||||
_step = "7"
|
||||
_Logger.Info("emailFrom couldn't be extracted from messageheader...")
|
||||
If Not IsNothing(msg.SenderEmailAddress) Then
|
||||
If msg.SenderEmailAddress <> String.Empty Then
|
||||
_step = "7.1"
|
||||
_Logger.Info("emailFrom via msg.SenderEmailAddress will be used instead!")
|
||||
emailFrom = msg.SenderEmailAddress.ToString.Replace("'", "")
|
||||
End If
|
||||
End If
|
||||
End If
|
||||
If IsNothing(emailFrom) Or emailFrom = String.Empty Then
|
||||
_step = "7.2"
|
||||
CURR_MISSING_PATTERN_NAME = "Email From"
|
||||
CURR_MISSING_SEARCH_STRING = emailFrom
|
||||
CURR_MISSING_MANUAL_VALUE = String.Empty
|
||||
frmGlobixMissingInput.ShowDialog()
|
||||
If CURR_MISSING_MANUAL_VALUE <> String.Empty Then
|
||||
_step = "7.3"
|
||||
emailFrom = CURR_MISSING_MANUAL_VALUE
|
||||
Else
|
||||
MsgBox("Could't get 'emailfrom' from messageHeader." & vbNewLine & "Please check the dropped email and Configuration of Email-Indexing!", MsgBoxStyle.Exclamation)
|
||||
Return False
|
||||
End If
|
||||
End If
|
||||
|
||||
_Logger.Info("emailFrom: " & emailFrom)
|
||||
_Logger.Info("emailTo: " & emailTo)
|
||||
'FROM
|
||||
If Not IsNothing(emailFrom) Then
|
||||
indexierung_erfolgreich = _idbdata.SetVariableValue(DT.Rows(0).Item("IDX_EMAIL_FROM").ToString, emailFrom)
|
||||
If indexierung_erfolgreich = False Then
|
||||
MsgBox("Error in SetEmailIndices [emailFrom] - See log", MsgBoxStyle.Critical)
|
||||
Return False
|
||||
End If
|
||||
Else
|
||||
_Logger.Info("emailFrom is still Nothing?!")
|
||||
_step = "7.4"
|
||||
End If
|
||||
'TO
|
||||
If Not IsNothing(emailTo) Then
|
||||
indexierung_erfolgreich = _idbdata.SetVariableValue(DT.Rows(0).Item("IDX_EMAIL_TO").ToString, emailTo)
|
||||
If indexierung_erfolgreich = False Then
|
||||
MsgBox("Error in SetEmailIndices [emailTo] - See log", MsgBoxStyle.Critical)
|
||||
Return False
|
||||
End If
|
||||
Else
|
||||
_Logger.Info("emailTo is still Nothing?!")
|
||||
_step = "7.5"
|
||||
End If
|
||||
|
||||
' Dim subj As String = ClassFormFunctions.CleanInput(msg.Subject)
|
||||
Dim subj As String = msg.Subject
|
||||
If IsNothing(subj) Or subj = "" Then
|
||||
_Logger.Info("msg subject is empty...DEFAULT will be set")
|
||||
subj = "No subject"
|
||||
MsgBox("Attention: Email was send without a subject - Default value 'No subject' will be used!", MsgBoxStyle.Exclamation)
|
||||
Else
|
||||
subj = encode_utf8(msg.Subject)
|
||||
If IsNothing(subj) Then
|
||||
subj = msg.Subject
|
||||
End If
|
||||
End If
|
||||
|
||||
_Logger.Info("Now all email-items will be indexed!")
|
||||
|
||||
_Logger.Info("subj: " & subj)
|
||||
indexierung_erfolgreich = _idbdata.SetVariableValue(DT.Rows(0).Item("IDX_EMAIL_SUBJECT").ToString, subj)
|
||||
My.Application.Globix.CURRENT_MESSAGESUBJECT = subj
|
||||
If indexierung_erfolgreich = False Then
|
||||
MsgBox("Error in SetEmailIndices [Subject] - See log", MsgBoxStyle.Critical)
|
||||
Return False
|
||||
End If
|
||||
_Logger.Info("MessageDeliveryTime: " & msg.MessageDeliveryTime)
|
||||
indexierung_erfolgreich = _idbdata.SetVariableValue(DT.Rows(0).Item("IDX_EMAIL_DATE_IN").ToString, msg.MessageDeliveryTime)
|
||||
My.Application.Globix.CURRENT_MESSAGEDATE = msg.MessageDeliveryTime
|
||||
If indexierung_erfolgreich = False Then
|
||||
MsgBox("Error in SetEmailIndices [Datein] - See log", MsgBoxStyle.Critical)
|
||||
Return False
|
||||
End If
|
||||
Else
|
||||
indexierung_erfolgreich = False
|
||||
End If
|
||||
|
||||
Return indexierung_erfolgreich
|
||||
End If
|
||||
Catch ex As Exception
|
||||
MsgBox("Error in SetEmailIndices:" & vbNewLine & ex.Message & vbNewLine & "Please check the configuration Email-Indexing!", MsgBoxStyle.Critical)
|
||||
_Logger.Warn("Error in SetEmailIndices (Step finisched: " & _step & "): " & ex.Message)
|
||||
_Logger.Error(ex)
|
||||
Return False
|
||||
End Try
|
||||
End Function
|
||||
Public Function GetUserEmailfromLDAP(ByVal userName As String) As String
|
||||
|
||||
Dim domainName As String = Environment.UserDomainName '"PutYourDomainNameHere" '< Change this value to your actual domain name. For example: "yahoo"
|
||||
Dim dommain As String = "com" '<change this value to your actual domain region. For example: "com" as in "yahoo.com"
|
||||
|
||||
Dim path As String = String.Format("LDAP://CN=User,DC={0}", domainName)
|
||||
Dim userEmail As String = String.Empty
|
||||
|
||||
Using search As DirectorySearcher = New DirectorySearcher(path)
|
||||
Dim result As SearchResult
|
||||
Try
|
||||
search.Filter = "(SAMAccountName=" & userName & ")"
|
||||
search.PropertiesToLoad.Add("mail")
|
||||
result = search.FindOne()
|
||||
Catch ex As Exception
|
||||
_Logger.Error(ex)
|
||||
search.Filter = ""
|
||||
search.Filter = "(GivenName=" & userName & ")"
|
||||
search.PropertiesToLoad.Add("mail")
|
||||
End Try
|
||||
|
||||
Try
|
||||
result = search.FindOne()
|
||||
If result IsNot Nothing Then userEmail = result.Properties("mail").ToString
|
||||
Catch ex As Exception
|
||||
_Logger.Info(">> Unexpected Error in GetUserEmail from LDAP: " & ex.Message)
|
||||
_Logger.Error(ex)
|
||||
End Try
|
||||
End Using
|
||||
|
||||
Return userEmail
|
||||
|
||||
End Function
|
||||
|
||||
Private Sub PictureEdit1_EditValueChanged(sender As Object, e As EventArgs) Handles PictureEdit1.EditValueChanged
|
||||
|
||||
End Sub
|
||||
|
||||
Reference in New Issue
Block a user