diff --git a/WIDigConsoleApp.sln b/WIDigConsoleApp.sln index c4a3c55..81d7c51 100644 --- a/WIDigConsoleApp.sln +++ b/WIDigConsoleApp.sln @@ -7,10 +7,10 @@ Project("{F184B08F-C81C-45F6-A57F-5ABD9991F28F}") = "WIDigConsoleApp", "WIDigCon EndProject Project("{F184B08F-C81C-45F6-A57F-5ABD9991F28F}") = "WIDigForm", "WIDigForm\WIDigForm.vbproj", "{75B536FE-5D8D-42A9-8519-0041FABC994B}" EndProject -Project("{930C7802-8A8C-48F9-8165-68863BCCD9DD}") = "SetupWIX", "SetupWIX\SetupWIX.wixproj", "{3943E21A-DD2B-4C74-B06F-9A39CAA70E11}" -EndProject Project("{930C7802-8A8C-48F9-8165-68863BCCD9DD}") = "SetupWIXVS19", "SetupWIXVS19\SetupWIXVS19.wixproj", "{3C1B87F6-CDE9-49AF-81BB-F697D8BC7D0E}" EndProject +Project("{F184B08F-C81C-45F6-A57F-5ABD9991F28F}") = "WiDigShared", "WiDigShared\WiDigShared.vbproj", "{A5D032D4-ABDC-44BF-8666-5FBE42AF0AB7}" +EndProject Global GlobalSection(SolutionConfigurationPlatforms) = preSolution Debug|Any CPU = Debug|Any CPU @@ -35,18 +35,20 @@ Global {75B536FE-5D8D-42A9-8519-0041FABC994B}.Release|Any CPU.Build.0 = Release|Any CPU {75B536FE-5D8D-42A9-8519-0041FABC994B}.Release|x86.ActiveCfg = Release|Any CPU {75B536FE-5D8D-42A9-8519-0041FABC994B}.Release|x86.Build.0 = Release|Any CPU - {3943E21A-DD2B-4C74-B06F-9A39CAA70E11}.Debug|Any CPU.ActiveCfg = Debug|x86 - {3943E21A-DD2B-4C74-B06F-9A39CAA70E11}.Debug|x86.ActiveCfg = Debug|x86 - {3943E21A-DD2B-4C74-B06F-9A39CAA70E11}.Debug|x86.Build.0 = Debug|x86 - {3943E21A-DD2B-4C74-B06F-9A39CAA70E11}.Release|Any CPU.ActiveCfg = Release|x86 - {3943E21A-DD2B-4C74-B06F-9A39CAA70E11}.Release|x86.ActiveCfg = Release|x86 - {3943E21A-DD2B-4C74-B06F-9A39CAA70E11}.Release|x86.Build.0 = Release|x86 {3C1B87F6-CDE9-49AF-81BB-F697D8BC7D0E}.Debug|Any CPU.ActiveCfg = Debug|x86 {3C1B87F6-CDE9-49AF-81BB-F697D8BC7D0E}.Debug|x86.ActiveCfg = Debug|x86 {3C1B87F6-CDE9-49AF-81BB-F697D8BC7D0E}.Debug|x86.Build.0 = Debug|x86 {3C1B87F6-CDE9-49AF-81BB-F697D8BC7D0E}.Release|Any CPU.ActiveCfg = Release|x86 {3C1B87F6-CDE9-49AF-81BB-F697D8BC7D0E}.Release|x86.ActiveCfg = Release|x86 {3C1B87F6-CDE9-49AF-81BB-F697D8BC7D0E}.Release|x86.Build.0 = Release|x86 + {A5D032D4-ABDC-44BF-8666-5FBE42AF0AB7}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {A5D032D4-ABDC-44BF-8666-5FBE42AF0AB7}.Debug|Any CPU.Build.0 = Debug|Any CPU + {A5D032D4-ABDC-44BF-8666-5FBE42AF0AB7}.Debug|x86.ActiveCfg = Debug|Any CPU + {A5D032D4-ABDC-44BF-8666-5FBE42AF0AB7}.Debug|x86.Build.0 = Debug|Any CPU + {A5D032D4-ABDC-44BF-8666-5FBE42AF0AB7}.Release|Any CPU.ActiveCfg = Release|Any CPU + {A5D032D4-ABDC-44BF-8666-5FBE42AF0AB7}.Release|Any CPU.Build.0 = Release|Any CPU + {A5D032D4-ABDC-44BF-8666-5FBE42AF0AB7}.Release|x86.ActiveCfg = Release|Any CPU + {A5D032D4-ABDC-44BF-8666-5FBE42AF0AB7}.Release|x86.Build.0 = Release|Any CPU EndGlobalSection GlobalSection(SolutionProperties) = preSolution HideSolutionNode = FALSE diff --git a/WIDigConsoleApp/ClassEncryption.vb b/WIDigConsoleApp/ClassEncryption.vb deleted file mode 100644 index b0bfa39..0000000 --- a/WIDigConsoleApp/ClassEncryption.vb +++ /dev/null @@ -1,68 +0,0 @@ -Imports System.Security.Cryptography -Public Class ClassEncryption - Private TripleDes As New TripleDESCryptoServiceProvider - Sub New(ByVal key As String) - ' Initialize the crypto provider. - TripleDes.Key = TruncateHash(key, TripleDes.KeySize \ 8) - TripleDes.IV = TruncateHash("", TripleDes.BlockSize \ 8) - End Sub - - Private Function TruncateHash( - ByVal key As String, - ByVal length As Integer) As Byte() - - Dim sha1 As New SHA1CryptoServiceProvider - - ' Hash the key. - Dim keyBytes() As Byte = - System.Text.Encoding.Unicode.GetBytes(key) - Dim hash() As Byte = sha1.ComputeHash(keyBytes) - - ' Truncate or pad the hash. - ReDim Preserve hash(length - 1) - Return hash - End Function - Public Function EncryptData( - ByVal plaintext As String) As String - - ' Convert the plaintext string to a byte array. - Dim plaintextBytes() As Byte = - System.Text.Encoding.Unicode.GetBytes("!Didalog35452Heuchelheim=" & plaintext) - - ' Create the stream. - Dim ms As New System.IO.MemoryStream - ' Create the encoder to write to the stream. - Dim encStream As New CryptoStream(ms, - TripleDes.CreateEncryptor(), - System.Security.Cryptography.CryptoStreamMode.Write) - - ' Use the crypto stream to write the byte array to the stream. - encStream.Write(plaintextBytes, 0, plaintextBytes.Length) - encStream.FlushFinalBlock() - - ' Convert the encrypted stream to a printable string. - Return Convert.ToBase64String(ms.ToArray) - End Function - 'Entschlüsselt die Zeichenfolge - Public Function DecryptData( - ByVal encryptedtext As String) As String - - ' Convert the encrypted text string to a byte array. - Dim encryptedBytes() As Byte = Convert.FromBase64String(encryptedtext) - - ' Create the stream. - Dim ms As New System.IO.MemoryStream - ' Create the decoder to write to the stream. - Dim decStream As New CryptoStream(ms, - TripleDes.CreateDecryptor(), - System.Security.Cryptography.CryptoStreamMode.Write) - - ' Use the crypto stream to write the byte array to the stream. - decStream.Write(encryptedBytes, 0, encryptedBytes.Length) - decStream.FlushFinalBlock() - Dim result = System.Text.Encoding.Unicode.GetString(ms.ToArray) - result = result.Replace("!Didalog35452Heuchelheim=", "") - ' Convert the plaintext stream to a string. - Return result - End Function -End Class diff --git a/WIDigConsoleApp/ModuleMain.vb b/WIDigConsoleApp/ModuleMain.vb index f93447e..e2278e7 100644 --- a/WIDigConsoleApp/ModuleMain.vb +++ b/WIDigConsoleApp/ModuleMain.vb @@ -5,391 +5,88 @@ Imports DigitalData.Modules.Config Imports System.IO Imports System.Text.RegularExpressions Imports DigitalData.Modules.Database +Imports DigitalData.GUIs.WiDigShared Module ModuleMain Private _ArgumentLength As Integer Public _database As MSSQLServer Public oRegExArg As String - - Public oRegex As New Regex("([\s\S]+)\={([\s\S]+)}") - - Public Const CODE_SUCCESS = 0 - Public Const CODE_ERROR = 1 - - Public Const MODE_OVERWRITE = "IMPO" - Public Const MODE_VERSION = "IMPV" - Public Const MODE_NACHINDEXIERUNG = "NI" - - Public Const PARAM_SOURCE = "-Source@" - Public Const PARAM_MODE = "-Mode@" - Public Const PARAM_TARGET = "-Target@" - Public Const PARAM_WMTO = "-WMOT@" - Public Const PARAM_INDEX = "-index@" + Public LogConfig As LogConfig + Public Logger As Logger + Public Config As ConfigManager(Of ClassConfig) Public Function Main(CommandLineArguments As String()) As Integer - Dim oReturnResult As Integer + Dim oWiDig As ClassWIDig + Try - oReturnResult = CODE_SUCCESS - ' Console.WriteLine("Starting up WIDig...") - Dim opath = Environment.GetFolderPath(Environment.SpecialFolder.LocalApplicationData) - Dim oLogConfig As New LogConfig(LogConfig.PathType.AppData, Nothing, "Console", "Digital Data", "WIDig") + System.Console.WriteLine($"Initializing WIDig...") + System.Console.WriteLine($"Logging...") + LogConfig = New LogConfig(LogConfig.PathType.AppData, Nothing, "Console", "Digital Data", "WIDig") + Logger = LogConfig.GetLogger - LOGCONFIG = oLogConfig - LOGGER = LOGCONFIG.GetLogger - InitUserConfig() - LOGCONFIG.Debug = CONFIG.Config.LOG_DEBUG - LOGGER = LOGCONFIG.GetLogger - Dim oUserPW = GetUserPWPlain() + System.Console.WriteLine($"Config...") + Config = New ConfigManager(Of ClassConfig)(LogConfig, ClassWIDig.GetAppDataPath, ClassWIDig.GetProgramDataPath) + LogConfig.Debug = Config.Config.LOG_DEBUG + System.Console.WriteLine($"Main Class...") + oWiDig = New ClassWIDig(LogConfig, Config.Config) + + + Catch ex As Exception + Logger.Warn("Could not initialize WiDig because of an error: [{0}]", ex.Message) + Logger.Error(ex) + + Return ClassWIDig.CODE_ERROR + End Try + + Try System.Console.WriteLine($"Starting up WIDig...") - If Connect2Windream(oUserPW) = False Then + Dim oUserPW = oWiDig.GetUserPWPlain() + If oWiDig.Connect2Windream(oUserPW) = False Then Throw New ApplicationException("Could not initialize windream") End If System.Console.WriteLine($"Windream initialized!") - If InitDatabase() = False Then + If oWiDig.InitDatabase() = False Then Throw New ApplicationException("Could not initialize DB") End If System.Console.WriteLine($"Database initialized!") - If Load_DB_DAta() = False Then - Throw New ApplicationException("Could not load Regex from Database") - End If - - System.Console.WriteLine($"Regex loaded from Database!") - - If ParseArgs(CommandLineArguments) = False Then + If oWiDig.ParseArgs(CommandLineArguments) = False Then Throw New ApplicationException("Could not parse command line arguments") End If System.Console.WriteLine($"Command line arguments parsed!") - If StreamORIndexFile() = False Then + If oWiDig.StreamORIndexFile() = False Then Throw New ApplicationException("Could not stream or index file") End If System.Console.WriteLine($"File indexed or streamed!") ' Brauchen Sie das überhaupt? - If oErrorParse = True Or oErrorImport = True Then - Throw New ApplicationException(oErrorMessage) + If oWiDig.ErrorWhileParsing = True Or oWiDig.ErrorWhileImporting Then + Throw New ApplicationException(oWiDig.ErrorMessage) End If - Return CODE_SUCCESS + Return ClassWIDig.CODE_SUCCESS Catch ex As Exception - LOGGER.Warn("Could not process file because of an error: {0}", oErrorMessage) - LOGGER.Warn("Error at Parse Stage: [{0}]", oErrorParse) - LOGGER.Warn("Error at Import Stage: [{0}]", oErrorImport) - LOGGER.Error(ex) + Logger.Warn("Could not process file because of an error: [{0}]", oWiDig.ErrorMessage) + Logger.Warn("Error at Parse Stage: [{0}]", oWiDig.ErrorWhileParsing) + Logger.Warn("Error at Import Stage: [{0}]", oWiDig.ErrorWhileimporting) + Logger.Error(ex) - Return CODE_ERROR - End Try - - End Function - Public Sub InitUserConfig() - Dim oProgramDataPath = Path.Combine(Environment.GetFolderPath(Environment.SpecialFolder.CommonApplicationData), "Digital Data", "WIDig") - Dim oUserAppDataPath = Path.Combine(Environment.GetFolderPath(Environment.SpecialFolder.ApplicationData), "Digital Data", "WIDig") - CONFIG = New ConfigManager(Of ClassConfig)(LOGCONFIG, oUserAppDataPath, oProgramDataPath) - End Sub - Public Function InitDatabase() As Boolean - If CONFIG.Config.ConnectionString.Length = 0 Then - Return False - End If - - Try - _database = New MSSQLServer(LOGCONFIG, CONFIG.Config.ConnectionString) - If _database.DBInitialized = True Then - Return True - Else - Return False - End If - - Catch ex As Exception - LOGGER.Error(ex) - Return False + Return ClassWIDig.CODE_ERROR End Try End Function - Public Function Load_DB_DAta() - Try - Dim oSql = "SELECT [REGEX] FROM [TBDD_FUNCTION_REGEX] WHERE FUNCTION_NAME = 'WM-INDEXER-INDEX_GROUP'" - oRegExArg = _database.GetScalarValue(oSql, 120) - If oRegExArg.Length = 0 Then - oRegExArg = 0 - End If - Return True - Catch ex As Exception - LOGGER.Error(ex) - Return False - End Try - End Function - Private Function Connect2Windream(oPW As String) - Try - WINDREAM = New Windream(LOGCONFIG, False, CONFIG.Config.WMDrive, CONFIG.Config.WMRelPath, True, CONFIG.Config.WMServer, CONFIG.Config.WMUsername, oPW, CONFIG.Config.Domain) - If Not IsNothing(WINDREAM) Then - If WINDREAM.SessionLoggedin = True Then - LOGGER.Debug("windream initialisiert") - Return True - End If - End If - Return False - Catch ex As Exception - LOGGER.Warn("CHECKING WMConnectivity: " & ex.Message) - Return False - End Try - End Function - Private Function GetUserPWPlain() - Try - Dim oPassword As String - Dim oEncryption As New ClassEncryption("!35452didalog=") - If CONFIG.Config.WMUserPW = String.Empty Then - oPassword = "" - Else - oPassword = oEncryption.DecryptData(CONFIG.Config.WMUserPW) - End If - Return oPassword - Catch ex As Exception - LOGGER.Warn("Error in GetUserPWPlain - the password [" & CONFIG.Config.WMUserPW & "] could not be decrypted", False) - Return String.Empty - End Try - End Function - Public Function ParseArgs(pArguments As String(), Optional pTest As Boolean = False) - Dim oINDEXInfoStarted As Boolean = False - Dim oINDEXInfotemp As String = "" - Try - If pArguments.Length <= 3 Then - _ArgumentLength = pArguments.Length - LOGGER.Warn($"Insufficient number of arguments [{pArguments.Length}]!") - System.Console.WriteLine($"Insufficient number of arguments - {Now.ToString}") - oErrorParse = True - Return False - End If - Dim oCount As Integer = 0 - For Each oArg As String In pArguments - LOGGER.Debug($"[{oCount}] {oArg}") - oArg = oArg.Replace("""", "") - If oArg.StartsWith(PARAM_SOURCE) Then - oSourceFile = oArg.Replace(PARAM_SOURCE, "") - If IsNumeric(oSourceFile) Then - LOGGER.Info($"SourceFile seems to be a DocID [{oSourceFile}]") - Dim oSQL = $"SELECT [dbo].[FNDD_GET_WINDREAM_FILE_PATH] ({oSourceFile})" - oSourceFile = _database.GetScalarValue(oSQL) - End If - If System.IO.File.Exists(oSourceFile) = False Then - LOGGER.Warn($"Parser@Sourcefile - File [{oSourceFile}] is not existing!") - oErrorMessage &= vbNewLine & $"Parser@Sourcefile - File [{oSourceFile}] is not existing!" - oErrorParse = True - Return False - End If - ElseIf oArg.StartsWith(PARAM_MODE) Then - oMode = oArg.Replace(PARAM_MODE, "").ToUpper - ElseIf oArg.StartsWith(PARAM_TARGET) Then - oTargetPath = oArg.Replace(PARAM_TARGET, "") - If IsNumeric(oTargetPath) Then - LOGGER.Info($"Target seems to be a DocID [{oTargetPath}]") - Dim oSQL = $"SELECT [dbo].[FNDD_GET_WINDREAM_FILE_PATH] ({oTargetPath})" - oSourceFile = _database.GetScalarValue(oSQL) - End If - Dim oWMFolder = System.IO.Path.GetDirectoryName(oTargetPath) - Dim oWindowsPath = oTargetPath - oExtension = Path.GetExtension(oWindowsPath) - Dim oNormalizePath = WINDREAM.GetNormalizedPath(oTargetPath) - If WINDREAM.TestFileExists(oTargetPath) = False Then - LOGGER.Info($"WMFile [{oTargetPath}] not existing!") - End If - If oMode = MODE_VERSION Then - Dim oWMCheckPath = WINDREAM.VersionWMFilename(oTargetPath, System.IO.Path.GetExtension(oTargetPath)) - If oNormalizePath.ToUpper <> oWMCheckPath.ToString.ToUpper Then - LOGGER.Info($"Target [{oNormalizePath}] already existed!! - NewWMFilename [{oWMCheckPath}]") - oTargetPath = oWMCheckPath - End If - End If - 'Checks and creates the path if necessary - WINDREAM.NewFolder(oTargetPath, oExtension) - ElseIf oArg.StartsWith(PARAM_WMTO) Then - oWMObjecttype = oArg.Replace(PARAM_WMTO, "") - Dim oexists As Boolean = False - Dim myWMOTypes = WINDREAM.ObjectTypes - For Each otype As String In myWMOTypes - If oWMObjecttype = otype Then - oexists = True - Exit For - End If - Next - If oexists = False Then - LOGGER.Info($"WMObjekttype [{oWMObjecttype}] not existing!!") - oErrorMessage &= vbNewLine & $"WMObjekttype [{oWMObjecttype}] not existing!!" - Return False - oErrorParse = True - Else - WMIndices = WINDREAM.GetIndiciesByObjecttype(oWMObjecttype) - End If - ElseIf oArg.StartsWith(PARAM_INDEX) Then - oINDEXInfotemp = oArg - oINDEXInfoStarted = True - oINDEXInfotemp = oINDEXInfotemp.Replace(PARAM_INDEX, "") - Else - If oINDEXInfoStarted Then - oINDEXInfotemp &= " " & oArg - End If - End If - oCount += 1 - Next - - LOGGER.Debug("INDEXInfoTemp: [{0}]", oINDEXInfotemp) - - Dim oIndexparts As List(Of String) = oINDEXInfotemp. - Split(New String() {"#~#"}, StringSplitOptions.RemoveEmptyEntries). - ToList() - - For Each oIndexPart As String In oIndexparts - LOGGER.Debug(oIndexPart) - Next - - LOGGER.Info($" [{oIndexparts.Count}] Indices parsed") - oIndexArr = oIndexparts - Return True - Catch ex As Exception - LOGGER.Error(ex) - LOGGER.Warn("Error in ParseArgs:" & vbNewLine & ex.Message) - oErrorMessage &= vbNewLine & "Error in ParseArgs:" & vbNewLine & ex.Message - oErrorParse = True - System.Console.WriteLine($"Error in ParseArgs - {Now.ToString}") - - Return False - End Try - End Function - Public Function StreamORIndexFile() - Try - Dim oResult As Boolean = False - If oMode = MODE_VERSION Then - oResult = WINDREAM.NewFileStream(oSourceFile, oTargetPath) - ElseIf oMode = MODE_OVERWRITE Then - Dim oDeleted = WINDREAM.RemoveFile(oTargetPath) - If oDeleted = True Then - oResult = WINDREAM.NewFileStream(oSourceFile, oTargetPath) - Else - LOGGER.Warn($"Mode ImportOverwrite is active - but WMFile could not be deleted!!") - End If - ElseIf oMode = MODE_NACHINDEXIERUNG Then - oResult = True - End If - - If oResult = True Then - If oMode <> MODE_NACHINDEXIERUNG Then - LOGGER.Info($"File successfully streamed to windream [{oTargetPath}]! Now indexing...") - End If - - For Each oIndex As String In oIndexArr - Dim oMatch As Match = oRegex.Match(oIndex) - - If oMatch.Success Then - - Dim oIndexName = oMatch.Groups(1)?.Value - Dim oIndexValues = oMatch.Groups.Item(2)?.Value - Dim oSplitValue = New String() {"~#~"} - - Dim oIndexValueArray = oIndexValues.Split(oSplitValue, StringSplitOptions.RemoveEmptyEntries) - Dim oIndexResult = False - - LOGGER.Info("Setting Index [{0}] to [{1}].", oIndexName, oIndexValues) - - If WINDREAM.TestIndexNameIsVectorIndex(oIndexName) Then - Dim oCombinedIndexValues = WINDREAM.GetVectorData(oTargetPath, oIndexName, oIndexValueArray, False) - oIndexResult = WINDREAM.SetFileIndex(oTargetPath, oIndexName, oCombinedIndexValues.ToList, oWMObjecttype) - Else - oIndexResult = WINDREAM.SetFileIndex(oTargetPath, oIndexName, oIndexValueArray(0), oWMObjecttype) - End If - - oResult = oIndexResult - Else - oResult = False - End If - - If oResult = False Then - LOGGER.Warn("Indexing failed. Exiting.") - Exit For - End If - Next - End If - - If oResult = True Then - LOGGER.Info("## All Tasks finished ##") - oErrorImport = False - End If - - 'If oResult = True Then - ' If oMode <> MODE_NACHINDEXIERUNG Then - ' LOGGER.Info($"File successfully streamed to windream [{oTargetPath}]! Now indexing...") - ' End If - - ' For Each oIndex2 As String In oIndexArr - ' Dim oIndexInfo() = oIndex2.Split("={") - ' Dim oIndexName = oIndexInfo(0) - ' Dim oIndexvalue - ' Dim r As Regex = New Regex(oRegExArg, RegexOptions.IgnoreCase) - ' ' ' Match the regular expression pattern against a text string. - ' Dim m As Match = r.Match(oIndex2) - ' Do While m.Success - - ' ' oClearedBodyText = oClearedBodyText.Replace(m.Value, "") - ' 'Dim g As Group = m.Groups(1) - ' Dim g1 As Group = m.Groups(2) - ' Dim g2 As Group = m.Groups(3) - - ' If Not IsNothing(g2.Value) Then - ' oIndexvalue = g2.Value - ' Console.WriteLine($"Indexvalue: {oIndexvalue}") - ' End If - - ' If Len(oIndexvalue) > 0 Then - ' If WMIndices.Contains(oIndexName) Then - ' LOGGER.Info($"Setting Index: oIndexName [{oIndexName}] - oIndexvalue [{oIndexvalue}]") - - ' 'DEBUG - ' oIndexvalue = New List(Of String) From {"Wert 1", "Wert 2", "wert 3"} - ' 'DEBUG - - ' If WINDREAM.SetFileIndex(oTargetPath, oIndexName, oIndexvalue, oWMObjecttype) = False Then - ' LOGGER.Info($"Index could not be set...") - ' If WINDREAM.RemoveFile(oTargetPath) = True Then - ' LOGGER.Info($"File deleted after error!") - ' End If - ' oResult = False - ' Exit For - ' End If - ' Else - ' LOGGER.Warn($"Transmitted index with name [{oIndexName}] is not existing in WM Objecttype!") - ' If WINDREAM.RemoveFile(oTargetPath) = True Then - ' LOGGER.Info($"File deleted after error!") - ' End If - ' oResult = False - ' Exit For - ' End If - ' End If - ' m = m.NextMatch() - ' Loop - ' Next - ' If oResult = True Then - ' LOGGER.Info("## All Tasks finished ##") - ' oErrorImport = False - ' End If - 'End If - - Return oResult - Catch ex As Exception - LOGGER.Warn($"Unexpected Error in StreamORIndexFile: {ex.Message}") - LOGGER.Error(ex) - Return False - End Try - End Function End Module diff --git a/WIDigConsoleApp/ModuleRuntime.vb b/WIDigConsoleApp/ModuleRuntime.vb deleted file mode 100644 index f428423..0000000 --- a/WIDigConsoleApp/ModuleRuntime.vb +++ /dev/null @@ -1,19 +0,0 @@ -Imports DigitalData.Modules.Logging -Imports DigitalData.Modules.Windream -Imports DigitalData.Modules.Config -Module ModuleRuntime - Public LOGCONFIG As LogConfig - Public LOGGER As Logger - Public WINDREAM As Windream - Public CONFIG As ConfigManager(Of ClassConfig) - Public oMode As String = "IMPV" - Public oErrorParse As Boolean = False - Public oErrorMessage As String - Public oErrorImport As Boolean = True - Public oSourceFile As String - Public oTargetPath As String - Public oWMObjecttype As String - Public oIndexArr As List(Of String) - Public WMIndices As List(Of String) - Public oExtension As String -End Module \ No newline at end of file diff --git a/WIDigConsoleApp/My Project/AssemblyInfo.vb b/WIDigConsoleApp/My Project/AssemblyInfo.vb index 524ffba..c82dcda 100644 --- a/WIDigConsoleApp/My Project/AssemblyInfo.vb +++ b/WIDigConsoleApp/My Project/AssemblyInfo.vb @@ -31,5 +31,5 @@ Imports System.Runtime.InteropServices ' übernehmen, indem Sie "*" eingeben: ' - + diff --git a/WIDigConsoleApp/WIDigConsoleApp.vbproj b/WIDigConsoleApp/WIDigConsoleApp.vbproj index bc093a8..ff068c7 100644 --- a/WIDigConsoleApp/WIDigConsoleApp.vbproj +++ b/WIDigConsoleApp/WIDigConsoleApp.vbproj @@ -53,6 +53,10 @@ ..\..\DDMonorepo\Modules.Database\bin\Debug\DigitalData.Modules.Database.dll + + False + ..\..\DDMonorepo\Encryption\bin\Debug\DigitalData.Modules.Encryption.dll + False ..\..\DDMonorepo\Modules.Logging\bin\Debug\DigitalData.Modules.Logging.dll @@ -61,12 +65,18 @@ False ..\..\DDMonorepo\Modules.Windream\bin\Debug\DigitalData.Modules.Windream.dll - - ..\..\DDMonorepo\Modules.Windream\bin\Debug\NLog.dll + + + ..\packages\NLog.4.7.0\lib\net45\NLog.dll + + + + + @@ -85,8 +95,6 @@ - - @@ -103,7 +111,6 @@ Settings.settings True - @@ -124,6 +131,13 @@ Settings.Designer.vb + + + + + {a5d032d4-abdc-44bf-8666-5fbe42af0ab7} + WiDigShared + \ No newline at end of file diff --git a/WIDigConsoleApp/WIDigConsoleApp.vbproj.user b/WIDigConsoleApp/WIDigConsoleApp.vbproj.user index 76527ab..bd32508 100644 --- a/WIDigConsoleApp/WIDigConsoleApp.vbproj.user +++ b/WIDigConsoleApp/WIDigConsoleApp.vbproj.user @@ -1,6 +1,6 @@  - -Mode%40NI -Source%40"\\Windream\Objects\ImportWIDIG\Testfile2.pdf" -Target%40"W:\ImportWIDIG\Testfile2.pdf" -WMOT%40"DIGITAL DATA - Entwicklung" -index%40Integer 24={0815}#~#Vektor_Text1={"Wert 1"~#~"Wert 2"} + -Mode%40NI -Source%40"\\Windream\Objects\ImportWIDIG\Testfile2.pdf" -Target%40"W:\ImportWIDIG\Testfile2.pdf" -WMOT%40"DIGITAL DATA - Entwicklung" -index%40Boolean 04={1} \ No newline at end of file diff --git a/WIDigConsoleApp/packages.config b/WIDigConsoleApp/packages.config new file mode 100644 index 0000000..d7bc5b9 --- /dev/null +++ b/WIDigConsoleApp/packages.config @@ -0,0 +1,4 @@ + + + + \ No newline at end of file diff --git a/WIDigForm/ClassConfig.vb b/WIDigForm/ClassConfig.vb deleted file mode 100644 index f6747c3..0000000 --- a/WIDigForm/ClassConfig.vb +++ /dev/null @@ -1,16 +0,0 @@ -Imports DigitalData.Modules.Config.ConfigAttributes - -Public Class ClassConfig - ' Global Settings (from computerconfig, overridable by userconfig) - - Public Property ConnectionString As String = "" - Public Property WMUsername As String = "" - Public Property WMUserPW As String = "" - Public Property WMDrive As String = "" - Public Property WMRelPath As String = "" - Public Property WMServer As String = "" - Public Property Domain As String = "" - Public Property LOG_DEBUG As Boolean = False - - -End Class diff --git a/WIDigForm/ClassEncryption.vb b/WIDigForm/ClassEncryption.vb deleted file mode 100644 index b0bfa39..0000000 --- a/WIDigForm/ClassEncryption.vb +++ /dev/null @@ -1,68 +0,0 @@ -Imports System.Security.Cryptography -Public Class ClassEncryption - Private TripleDes As New TripleDESCryptoServiceProvider - Sub New(ByVal key As String) - ' Initialize the crypto provider. - TripleDes.Key = TruncateHash(key, TripleDes.KeySize \ 8) - TripleDes.IV = TruncateHash("", TripleDes.BlockSize \ 8) - End Sub - - Private Function TruncateHash( - ByVal key As String, - ByVal length As Integer) As Byte() - - Dim sha1 As New SHA1CryptoServiceProvider - - ' Hash the key. - Dim keyBytes() As Byte = - System.Text.Encoding.Unicode.GetBytes(key) - Dim hash() As Byte = sha1.ComputeHash(keyBytes) - - ' Truncate or pad the hash. - ReDim Preserve hash(length - 1) - Return hash - End Function - Public Function EncryptData( - ByVal plaintext As String) As String - - ' Convert the plaintext string to a byte array. - Dim plaintextBytes() As Byte = - System.Text.Encoding.Unicode.GetBytes("!Didalog35452Heuchelheim=" & plaintext) - - ' Create the stream. - Dim ms As New System.IO.MemoryStream - ' Create the encoder to write to the stream. - Dim encStream As New CryptoStream(ms, - TripleDes.CreateEncryptor(), - System.Security.Cryptography.CryptoStreamMode.Write) - - ' Use the crypto stream to write the byte array to the stream. - encStream.Write(plaintextBytes, 0, plaintextBytes.Length) - encStream.FlushFinalBlock() - - ' Convert the encrypted stream to a printable string. - Return Convert.ToBase64String(ms.ToArray) - End Function - 'Entschlüsselt die Zeichenfolge - Public Function DecryptData( - ByVal encryptedtext As String) As String - - ' Convert the encrypted text string to a byte array. - Dim encryptedBytes() As Byte = Convert.FromBase64String(encryptedtext) - - ' Create the stream. - Dim ms As New System.IO.MemoryStream - ' Create the decoder to write to the stream. - Dim decStream As New CryptoStream(ms, - TripleDes.CreateDecryptor(), - System.Security.Cryptography.CryptoStreamMode.Write) - - ' Use the crypto stream to write the byte array to the stream. - decStream.Write(encryptedBytes, 0, encryptedBytes.Length) - decStream.FlushFinalBlock() - Dim result = System.Text.Encoding.Unicode.GetString(ms.ToArray) - result = result.Replace("!Didalog35452Heuchelheim=", "") - ' Convert the plaintext stream to a string. - Return result - End Function -End Class diff --git a/WIDigForm/My Project/AssemblyInfo.vb b/WIDigForm/My Project/AssemblyInfo.vb index 50faf5f..c1deff6 100644 --- a/WIDigForm/My Project/AssemblyInfo.vb +++ b/WIDigForm/My Project/AssemblyInfo.vb @@ -12,7 +12,7 @@ Imports System.Runtime.InteropServices - + @@ -31,5 +31,5 @@ Imports System.Runtime.InteropServices ' indem Sie "*" wie unten gezeigt eingeben: ' - + diff --git a/WIDigForm/Runtime.vb b/WIDigForm/Runtime.vb deleted file mode 100644 index 3a20440..0000000 --- a/WIDigForm/Runtime.vb +++ /dev/null @@ -1,19 +0,0 @@ -Imports DigitalData.Modules.Logging -Imports DigitalData.Modules.Windream -Imports DigitalData.Modules.Config -Module Runtime - Public LOGCONFIG As LogConfig - Public LOGGER As Logger - Public WINDREAM As Windream - Public CONFIG As ConfigManager(Of ClassConfig) - Public oMode As String = "IMPV" - Public oErrorParse As Boolean = False - Public oErrorMessage As String - Public oErrorImport As Boolean = True - Public oSourceFile As String - Public oTargetPath As String - Public oWMObjecttype As String - Public oIndexArr As String() - Public WMIndices As List(Of String) - Public OExtension As String -End Module diff --git a/WIDigForm/WIDigForm.vbproj b/WIDigForm/WIDigForm.vbproj index 3502cf1..c01ce43 100644 --- a/WIDigForm/WIDigForm.vbproj +++ b/WIDigForm/WIDigForm.vbproj @@ -58,6 +58,10 @@ ..\..\DDMonorepo\Modules.Config\bin\Debug\DigitalData.Modules.Config.dll + + False + ..\..\DDMonorepo\Encryption\bin\Debug\DigitalData.Modules.Encryption.dll + ..\..\DDMonorepo\Modules.Logging\bin\Debug\DigitalData.Modules.Logging.dll @@ -68,10 +72,6 @@ ..\..\DDMonorepo\Modules.Windream\bin\Debug\Interop.WINDREAMLib.dll False - - ..\..\..\Interop.WMOBRWSLib.dll - True - ..\packages\NLog.4.7.0\lib\net45\NLog.dll @@ -106,8 +106,6 @@ - - Form @@ -130,7 +128,6 @@ Settings.settings True - @@ -160,5 +157,11 @@ + + + {a5d032d4-abdc-44bf-8666-5fbe42af0ab7} + WiDigShared + + \ No newline at end of file diff --git a/WIDigForm/frmMain.vb b/WIDigForm/frmMain.vb index 58187df..a13eb80 100644 --- a/WIDigForm/frmMain.vb +++ b/WIDigForm/frmMain.vb @@ -1,221 +1,111 @@ Imports DigitalData.Modules.Logging Imports DigitalData.Modules.Windream Imports DigitalData.Modules.Config +Imports DigitalData.GUIs.WiDigShared +Imports DigitalData.Modules.Encryption + Public Class frmMain Private _ArgumentLength As Integer + Private LogConfig As LogConfig + Private Logger As Logger + Private Config As ConfigManager(Of ClassConfig) + Private WiDig As ClassWIDig + Private Windream As Windream + Private Sub Form1_Load(sender As Object, e As EventArgs) Handles Me.Load Try Me.Hide() Me.Visible = False Dim oLogConfig As New LogConfig(LogConfig.PathType.AppData, Nothing, "Form", "Digital Data", "WIDig") - LOGCONFIG = oLogConfig - LOGGER = LOGCONFIG.GetLogger - InitUserConfig() - LOGCONFIG.Debug = CONFIG.Config.LOG_DEBUG - LOGGER = LOGCONFIG.GetLogger - Dim oUserPW = GetUserPWPlain() - LOGGER.Debug("Initializing MainForm....") - Me.txtPW.Text = oUserPW + LogConfig = oLogConfig + Logger = LogConfig.GetLogger - If Connect2Windream(oUserPW) = True Then + Config = New ConfigManager(Of ClassConfig)(LogConfig, ClassWIDig.GetAppDataPath, ClassWIDig.GetAppDataPath) + + LogConfig.Debug = Config.Config.LOG_DEBUG + Logger = LogConfig.GetLogger + + Logger.Debug("Initializing MainForm....") + WiDig = New ClassWIDig(LogConfig, Config.Config) + + Dim oUserPW = WiDig.GetUserPWPlain() + Me.txtPW.Text = oUserPW + If WiDig.Connect2Windream(oUserPW) = True Then Dim oArguments As String() = Environment.GetCommandLineArgs() - If ParseArgs(oArguments) = True Then - If StreamIndexFile() = True Then - oErrorImport = False + If WiDig.ParseArgs(oArguments) = True Then + If WiDig.StreamORIndexFile() = True Then + WiDig.ErrorWhileImporting = False Else - oErrorImport = True + WiDig.ErrorWhileImporting = True End If + Else + BarStaticinfo.Caption = $"Error in ParseArgs - {Now.ToString}" + BarStaticinfo.ItemAppearance.Normal.BackColor = Color.Red End If Else - oErrorMessage = "Could not initialize windream" + WiDig.ErrorMessage = "Could not initialize windream" End If - txtUser.Text = CONFIG.Config.WMUsername + txtUser.Text = Config.Config.WMUsername Me.txtPW.Text = oUserPW - txtWMDrive.Text = CONFIG.Config.WMDrive - txtWMRelpath.Text = CONFIG.Config.WMRelPath - txtWMServer.Text = CONFIG.Config.WMUserPW - txtDomain.Text = CONFIG.Config.Domain + txtWMDrive.Text = Config.Config.WMDrive + txtWMRelpath.Text = Config.Config.WMRelPath + txtWMServer.Text = Config.Config.WMUserPW + txtDomain.Text = Config.Config.Domain 'txtCommands.Text = CONFIG.Config.Arguments txtCommands.Text = My.Settings.TestParams - If oErrorParse = True Then - MsgBox("Error in Parsing or Indexing!", MsgBoxStyle.Critical) + If WiDig.ErrorWhileParsing = True Then + MsgBox("Error in Parsing or Indexing!", MsgBoxStyle.Critical, Text) Me.Visible = True End If Catch ex As Exception - LOGGER.Error(ex) + MsgBox("Error while initializing: " & vbNewLine & vbNewLine & ex.Message, MsgBoxStyle.Critical, Text) + Logger.Error(ex) End Try - End Sub Public Sub InitUserConfig() Dim oProgramDataPath = IO.Path.Combine(Environment.GetFolderPath(Environment.SpecialFolder.CommonApplicationData), "Digital Data", "WIDig") Dim oUserAppDataPath = IO.Path.Combine(Environment.GetFolderPath(Environment.SpecialFolder.ApplicationData), "Digital Data", "WIDig") - CONFIG = New ConfigManager(Of ClassConfig)(LOGCONFIG, oUserAppDataPath, oProgramDataPath) + End Sub - Private Function Connect2Windream(oPW As String) - Try - WINDREAM = New Windream(LOGCONFIG, False, CONFIG.Config.WMDrive, CONFIG.Config.WMRelPath, True, CONFIG.Config.WMServer, CONFIG.Config.WMUsername, oPW, CONFIG.Config.Domain) - If Not IsNothing(WINDREAM) Then - If WINDREAM.SessionLoggedin = True Then - LOGGER.Debug("windream initialisiert") - bsiWMConnect.Visibility = DevExpress.XtraBars.BarItemVisibility.Always - Return True - End If - End If - Catch ex As Exception - LOGGER.Warn("CHECKING WMConnectivity: " & ex.Message) - Return False - End Try - End Function - Private Function GetUserPWPlain() - Try - Dim PWplainText As String - Dim wrapper As New ClassEncryption("!35452didalog=") - If CONFIG.Config.WMUserPW = String.Empty Then - PWplainText = "" - Else - PWplainText = wrapper.DecryptData(CONFIG.Config.WMUserPW) - End If - - Return PWplainText - Catch ex As Exception - LOGGER.Warn("Error in GetUserPWPlain - the password [" & CONFIG.Config.WMUserPW & "] could not be decrypted", False) - Return String.Empty - End Try - End Function - Public Function ParseArgs(pArguments As String(), Optional pTest As Boolean = False) - Try - If pArguments.Length <= 3 Then - _ArgumentLength = pArguments.Length - LOGGER.Warn($"Insufficient number of arguments [{pArguments.Length}]!") - BarStaticinfo.Caption = $"Insufficient number of arguments - {Now.ToString}" - oErrorMessage = BarStaticinfo.Caption - BarStaticinfo.ItemAppearance.Normal.BackColor = Color.Red - oErrorParse = True - Return False - End If - - Dim ocount As Integer = 0 - For Each oArg As String In pArguments - LOGGER.Debug($"[{ocount}] {oArg}") - oArg = oArg.Replace("""", "") - If oArg.StartsWith("-Source@") Then - oSourceFile = oArg.Replace("-Source@", "") - If System.IO.File.Exists(oSourceFile) = False Then - LOGGER.Warn($"Parser@Sourcefile - File [{oSourceFile}] is not existing!") - oErrorMessage &= vbNewLine & $"Parser@Sourcefile - File [{oSourceFile}] is not existing!" - oErrorParse = True - Return False - End If - ElseIf oArg.StartsWith("-Mode@") Then - oMode = oArg.Replace("-Mode@", "").ToUpper - - ElseIf oArg.StartsWith("-Target@") Then - oTargetPath = oArg.Replace("-Target@", "") - Dim oWMFolder = System.IO.Path.GetDirectoryName(oTargetPath) - Dim oWindowsPath = oTargetPath - OExtension = IO.Path.GetExtension(oWindowsPath) - Dim oNormalizePath = WINDREAM.GetNormalizedPath(oTargetPath) - If WINDREAM.TestFileExists(oTargetPath) = False Then - LOGGER.Info($"WMFile [{oTargetPath}] not existing!") - End If - If oMode = "IMPV" Then - Dim oWMCheckPath = WINDREAM.VersionWMFilename(oTargetPath, System.IO.Path.GetExtension(oTargetPath)) - If oNormalizePath.ToUpper <> oWMCheckPath.ToString.ToUpper Then - LOGGER.Info($"Target [{oNormalizePath}] already existed!! - NewWMFilename [{oWMCheckPath}]") - oTargetPath = oWMCheckPath - End If - End If - - ElseIf oArg.StartsWith("-WMOT@") Then - oWMObjecttype = oArg.Replace("-WMOT@", "") - Dim oexists As Boolean = False - Dim myWMOTypes = WINDREAM.ObjectTypes - For Each otype As String In myWMOTypes - If oWMObjecttype = otype Then - oexists = True - Exit For - End If - Next - If oexists = False Then - LOGGER.Info($"WMObjekttype [{oWMObjecttype}] not existing!!") - oErrorMessage &= vbNewLine & $"WMObjekttype [{oWMObjecttype}] not existing!!" - Return False - oErrorParse = True - Else - WMIndices = WINDREAM.GetIndiciesByObjecttype(oWMObjecttype) - End If - ElseIf oArg.StartsWith("-index@") Then - Dim oINDEXInfotemp = oArg - oINDEXInfotemp = oINDEXInfotemp.Replace("-index@{", "") - oINDEXInfotemp = oINDEXInfotemp.Replace("}", "") - Dim oSplit() = oINDEXInfotemp.ToString.Split(";") - LOGGER.Debug($" [{oSplit.Length}] Indices transmitted...") - oIndexArr = oSplit - - End If - ocount += 1 - Next - Return True - Catch ex As Exception - LOGGER.Warn("Error in ParseArgs:" & vbNewLine & ex.Message) - oErrorMessage &= vbNewLine & "Error in ParseArgs:" & vbNewLine & ex.Message - oErrorParse = True - BarStaticinfo.Caption = $"Error in ParseArgs - {Now.ToString}" - BarStaticinfo.ItemAppearance.Normal.BackColor = Color.Red - Return False - End Try - End Function - Private Function WMIndex_exists(pIndex As String) - Dim oexist As Boolean = False - For Each oWMIndex As String In WMIndices - If oWMIndex = pIndex Then - Return True - End If - Next - Return oexist - End Function Private Sub Form1_Shown(sender As Object, e As EventArgs) Handles Me.Shown - If oErrorImport = False Then + If WiDig?.ErrorWhileImporting = False Then Me.Close() End If - If oErrorParse = True And _ArgumentLength <> 1 Then - MsgBox("A unexpected error occured while Parsing arguments!" & vbNewLine & oErrorMessage, MsgBoxStyle.Critical) - Process.Start(LOGCONFIG.LogDirectory) + If WiDig?.ErrorWhileParsing = True And Environment.GetCommandLineArgs().Length <> 1 Then + MsgBox("A unexpected error occured while Parsing arguments!" & vbNewLine & WiDig?.ErrorMessage, MsgBoxStyle.Critical) + Process.Start(LogConfig.LogDirectory) End If - If oErrorImport = True Then - MsgBox("A unexpected error occured while initializing!" & vbNewLine & oErrorMessage, MsgBoxStyle.Critical) + If WiDig?.ErrorWhileImporting = True Then + MsgBox("A unexpected error occured while initializing!" & vbNewLine & WiDig?.ErrorMessage, MsgBoxStyle.Critical) End If End Sub - - - Private Sub BarButtonItem1_ItemClick(sender As Object, e As DevExpress.XtraBars.ItemClickEventArgs) Handles BarButtonItem1.ItemClick - Dim wrapper As New ClassEncryption("!35452didalog=") + Dim wrapper As New EncryptionLegacy("!35452didalog=") Dim cipherText As String = wrapper.EncryptData(Me.txtPW.Text) Dim pw As String = cipherText - CONFIG.Config.WMUserPW = pw + Config.Config.WMUserPW = pw - CONFIG.Config.WMUsername = txtUser.Text - CONFIG.Config.WMDrive = txtWMDrive.Text - CONFIG.Config.WMRelPath = txtWMRelpath.Text - CONFIG.Config.WMServer = txtWMServer.Text - CONFIG.Config.Domain = txtDomain.Text - CONFIG.Save() + Config.Config.WMUsername = txtUser.Text + Config.Config.WMDrive = txtWMDrive.Text + Config.Config.WMRelPath = txtWMRelpath.Text + Config.Config.WMServer = txtWMServer.Text + Config.Config.Domain = txtDomain.Text + Config.Save() BarStaticinfo.Caption = $"WM-Settings saved - {Now.ToString}" BarStaticinfo.ItemAppearance.Normal.BackColor = Color.Lime End Sub Private Sub BarButtonItem2_ItemClick(sender As Object, e As DevExpress.XtraBars.ItemClickEventArgs) Handles BarButtonItem2.ItemClick - WINDREAM = New Windream(LOGCONFIG, False, txtWMDrive.Text, txtWMRelpath.Text, True, txtWMServer.Text, txtUser.Text, txtPW.Text, txtDomain.Text) - If Not IsNothing(WINDREAM) Then + Windream = New Windream(LogConfig, False, txtWMDrive.Text, txtWMRelpath.Text, True, txtWMServer.Text, txtUser.Text, txtPW.Text, txtDomain.Text) + If Not IsNothing(Windream) Then MsgBox("Windream-Connext successfull!", MsgBoxStyle.Information) End If End Sub @@ -228,7 +118,7 @@ Public Class frmMain RibbonPageGroup1.Enabled = False End Sub Private Sub BarButtonItem4_ItemClick(sender As Object, e As DevExpress.XtraBars.ItemClickEventArgs) Handles BarButtonItem4.ItemClick - Process.Start(LOGCONFIG.LogDirectory) + Process.Start(LogConfig.LogDirectory) End Sub Private Sub BarButtonItem5_ItemClick(sender As Object, e As DevExpress.XtraBars.ItemClickEventArgs) Handles BarButtonItem5.ItemClick @@ -237,85 +127,30 @@ Public Class frmMain 'CONFIG.Config.Arguments = txtCommands.Text 'CONFIG.Save() Dim oArgs() As String = txtCommands.Text.Split("|") - LOGGER.Debug($"[{oArgs.Length}] Arguments will be checked...") - If IsNothing(WINDREAM) Then - Dim oUserPW = GetUserPWPlain() + Logger.Debug($"[{oArgs.Length}] Arguments will be checked...") + If IsNothing(Windream) Then + Dim oUserPW = WiDig.GetUserPWPlain() - If Connect2Windream(oUserPW) = False Then + If WiDig.Connect2Windream(oUserPW) = False Then MsgBox("Windream could not be initialized!! Check Your log!", MsgBoxStyle.Critical) Exit Sub End If End If - If ParseArgs(oArgs) = False Then + If WiDig.ParseArgs(oArgs) = False Then MsgBox("An unexpected error occured while parsing arguments. Check the log!", MsgBoxStyle.Critical) - Process.Start(LOGCONFIG.LogDirectory) + Process.Start(LogConfig.LogDirectory) Else - If StreamIndexFile() = True Then + If WiDig.StreamORIndexFile() = True Then MsgBox("Import succeeded!", MsgBoxStyle.Information) Else MsgBox("Unexpected Error while streaming or indexing WMFile! Check the logfile!", MsgBoxStyle.Critical) - Process.Start(LOGCONFIG.LogDirectory) + Process.Start(LogConfig.LogDirectory) End If End If End Sub - Public Function StreamIndexFile() - Try - 'Checks and creates the path if necessary - WINDREAM.NewFolder(oTargetPath, oExtension) - Dim oResult As Boolean = False - If oMode = "IMPV" Then - oResult = WINDREAM.NewFileStream(oSourceFile, oTargetPath) - ElseIf oMode = "IMPO" Then - Dim oDeleted = WINDREAM.RemoveFile(oTargetPath) - If oDeleted = True Then - oResult = WINDREAM.NewFileStream(oSourceFile, oTargetPath) - Else - LOGGER.Warn($"Mode ImportOverwrite is active - but WMFile could not be deleted!!") - End If - ElseIf oMode = "NI" Then - oResult = True - End If - If oResult = True Then - LOGGER.Info($"File successfully streamed to windream [{oTargetPath}]! Now indexing...") - For Each oIndex2 As String In oIndexArr - Dim oIndexInfo() = oIndex2.Split("=") - Dim oIndexName = oIndexInfo(0) - Dim oIndexvalue = oIndexInfo(1) - If WMIndex_exists(oIndexName) = True Then - LOGGER.Info($"Setting Index: oIndexName [{oIndexName}] - oIndexvalue [{oIndexvalue}]") - If WINDREAM.SetFileIndex(oTargetPath, oIndexName, oIndexvalue, oWMObjecttype) = False Then - LOGGER.Info($"Index could not be set...") - If WINDREAM.RemoveFile(oTargetPath) = True Then - LOGGER.Info($"File deleted after error!") - End If - oResult = False - Exit For - End If - Else - LOGGER.Warn($"Transmitted index with name [{oIndexName}] is not existing in WM Objecttype!") - If WINDREAM.RemoveFile(oTargetPath) = True Then - LOGGER.Info($"File deleted after error!") - End If - oResult = False - Exit For - End If - - Next - If oResult = True Then - LOGGER.Info("Import finished!") - oErrorImport = False - End If - End If - Return oResult - Catch ex As Exception - LOGGER.Warn($"Error while indexing: {ex.Message}") - End Try - - End Function - Private Sub txtCommands_GotFocus(sender As Object, e As EventArgs) Handles txtCommands.GotFocus RibbonPageGroup3.Enabled = True End Sub @@ -324,10 +159,6 @@ Public Class frmMain RibbonPageGroup3.Enabled = False End Sub - Private Sub RichTextBox1_TextChanged(sender As Object, e As EventArgs) - - End Sub - Private Sub GroupBox2_Enter(sender As Object, e As EventArgs) Handles GroupBox2.Enter RibbonPageGroup3.Enabled = False End Sub diff --git a/WIDigConsoleApp/ClassConfig.vb b/WiDigShared/ClassConfig.vb similarity index 88% rename from WIDigConsoleApp/ClassConfig.vb rename to WiDigShared/ClassConfig.vb index 8da5190..80c6876 100644 --- a/WIDigConsoleApp/ClassConfig.vb +++ b/WiDigShared/ClassConfig.vb @@ -7,7 +7,7 @@ Public Class ClassConfig Public Property WMUsername As String = "" Public Property WMUserPW As String = "" Public Property WMDrive As String = "W" - Public Property WMRelPath As String = "" + Public Property WMRelPath As String = "\\windream\objects" Public Property WMServer As String = "" Public Property Domain As String = "" Public Property LOG_DEBUG As Boolean = False diff --git a/WiDigShared/ClassWIDig.vb b/WiDigShared/ClassWIDig.vb new file mode 100644 index 0000000..4fe149d --- /dev/null +++ b/WiDigShared/ClassWIDig.vb @@ -0,0 +1,351 @@ +Imports DigitalData.Modules.Logging +Imports DigitalData.Modules.Encryption +Imports DigitalData.Modules.Windream +Imports DigitalData.Modules.Database +Imports System.Text.RegularExpressions + +Public Class ClassWIDig + Private LogConfig As LogConfig + Private Config As ClassConfig + Private Windream As Windream + Private Logger As Logger + Private Database As MSSQLServer + + Public oRegex As New Regex("([\s\S]+)\={([\s\S]+)}") + Public Const CODE_SUCCESS = 0 + Public Const CODE_ERROR = 1 + + Public Const MODE_OVERWRITE = "IMPO" + Public Const MODE_VERSION = "IMPV" + Public Const MODE_NACHINDEXIERUNG = "NI" + + Public Const PARAM_SOURCE = "-Source@" + Public Const PARAM_MODE = "-Mode@" + Public Const PARAM_TARGET = "-Target@" + Public Const PARAM_WMTO = "-WMOT@" + Public Const PARAM_INDEX = "-index@" + + Public Property ErrorMessage As String + Public Property ErrorWhileParsing As Boolean + Public Property ErrorWhileImporting As Boolean + Public Property RunMode As String + Public Property SourceFile As Object + Public Property TargetPath As Object + Public Property WindreamObjectType As String + Public Property WindreamIndicies As List(Of String) + Public Property IndexArray As List(Of String) + + Public Sub New(pLogConfig As LogConfig, pConfig As ClassConfig) + LogConfig = pLogConfig + Logger = pLogConfig.GetLogger + Config = pConfig + End Sub + + Public Shared Function GetProgramDataPath() + Return IO.Path.Combine(Environment.GetFolderPath(Environment.SpecialFolder.CommonApplicationData), "Digital Data", "WIDig") + End Function + + Public Shared Function GetAppDataPath() + Return IO.Path.Combine(Environment.GetFolderPath(Environment.SpecialFolder.ApplicationData), "Digital Data", "WIDig") + End Function + + Public Function GetUserPWPlain() + Try + Dim oPassword As String + Dim oEncryption As New EncryptionLegacy("!35452didalog=") + If Config.WMUserPW = String.Empty Then + oPassword = "" + Else + oPassword = oEncryption.DecryptData(Config.WMUserPW) + End If + + Return oPassword + Catch ex As Exception + Logger.Warn("Error in GetUserPWPlain - the password [" & Config.WMUserPW & "] could not be decrypted", False) + Return String.Empty + End Try + End Function + + Public Function Connect2Windream(oPW As String) + Try + Windream = New Windream(LogConfig, False, Config.WMDrive, Config.WMRelPath, True, Config.WMServer, Config.WMUsername, oPW, Config.Domain) + If Not IsNothing(Windream) Then + If Windream.SessionLoggedin = True Then + Logger.Debug("windream initialisiert") + Return True + End If + End If + Return False + Catch ex As Exception + Logger.Warn("CHECKING WMConnectivity: " & ex.Message) + Return False + End Try + End Function + + Public Function InitDatabase() As Boolean + If Config.ConnectionString.Length = 0 Then + Return False + End If + + Try + Database = New MSSQLServer(LogConfig, Config.ConnectionString) + If Database.DBInitialized = True Then + Return True + Else + Return False + End If + + Catch ex As Exception + Logger.Error(ex) + Return False + End Try + End Function + + Public Function ParseArgs(pArguments As String(), Optional pTest As Boolean = False) + Dim oINDEXInfoStarted As Boolean = False + Dim oINDEXInfotemp As String = "" + Try + If pArguments.Length <= 3 Then + Logger.Warn($"Insufficient number of arguments [{pArguments.Length}]!") + System.Console.WriteLine($"Insufficient number of arguments - {Now.ToString}") + ErrorWhileParsing = True + Return False + End If + + Dim oCount As Integer = 0 + For Each oArg As String In pArguments + Logger.Debug($"[{oCount}] {oArg}") + oArg = oArg.Replace("""", "") + If oArg.StartsWith(PARAM_SOURCE) Then + SourceFile = oArg.Replace(PARAM_SOURCE, "") + If IsNumeric(SourceFile) Then + Logger.Info($"SourceFile seems to be a DocID [{SourceFile}]") + Dim oSQL = $"SELECT [dbo].[FNDD_GET_WINDREAM_FILE_PATH] ({SourceFile})" + SourceFile = Database.GetScalarValue(oSQL) + End If + If System.IO.File.Exists(SourceFile) = False Then + Logger.Warn($"Parser@Sourcefile - File [{SourceFile}] is not existing!") + ErrorMessage &= vbNewLine & $"Parser@Sourcefile - File [{SourceFile}] is not existing!" + ErrorWhileParsing = True + Return False + End If + + ElseIf oArg.StartsWith(PARAM_MODE) Then + RunMode = oArg.Replace(PARAM_MODE, "").ToUpper + + ElseIf oArg.StartsWith(PARAM_TARGET) Then + TargetPath = oArg.Replace(PARAM_TARGET, "") + + Dim oWMFolder = System.IO.Path.GetDirectoryName(TargetPath) + Dim oWindowsPath = TargetPath + Dim oExtension = IO.Path.GetExtension(oWindowsPath) + Dim oNormalizePath = Windream.GetNormalizedPath(TargetPath) + + If Windream.TestFileExists(TargetPath) = False Then + Logger.Info($"WMFile [{TargetPath}] not existing!") + End If + + If RunMode = MODE_VERSION Then + Dim oWMCheckPath = Windream.VersionWMFilename(TargetPath, System.IO.Path.GetExtension(TargetPath)) + If oNormalizePath.ToUpper <> oWMCheckPath.ToString.ToUpper Then + Logger.Info($"Target [{oNormalizePath}] already existed!! - NewWMFilename [{oWMCheckPath}]") + TargetPath = oWMCheckPath + End If + End If + + 'Checks and creates the path if necessary + Windream.NewFolder(TargetPath, oExtension) + + ElseIf oArg.StartsWith(PARAM_WMTO) Then + WindreamObjectType = oArg.Replace(PARAM_WMTO, "") + Dim oObjectTypExists As Boolean = False + Dim myWMOTypes = Windream.ObjectTypes + For Each otype As String In myWMOTypes + If WindreamObjectType = otype Then + oObjectTypExists = True + Exit For + End If + Next + If oObjectTypExists = False Then + Logger.Info($"WindreamObjectType [{WindreamObjectType}] not existing!!") + ErrorMessage &= vbNewLine & $"WindreamObjectType [{WindreamObjectType}] not existing!!" + Return False + ErrorWhileParsing = True + Else + WindreamIndicies = Windream.GetIndiciesByObjecttype(WindreamObjectType) + End If + + ElseIf oArg.StartsWith(PARAM_INDEX) Then + oINDEXInfotemp = oArg + oINDEXInfoStarted = True + oINDEXInfotemp = oINDEXInfotemp.Replace(PARAM_INDEX, "") + + Else + ' All args that do not start with an argument identifier (-EXAMPLE@) are just parts of other arguments + ' and are put back together just like they used to be before. + If oINDEXInfoStarted Then + oINDEXInfotemp &= " " & oArg + End If + End If + oCount += 1 + Next + + Logger.Debug("INDEXInfoTemp: [{0}]", oINDEXInfotemp) + + Dim oIndexparts As List(Of String) = oINDEXInfotemp. + Split(New String() {"#~#"}, StringSplitOptions.RemoveEmptyEntries). + ToList() + + For Each oIndexPart As String In oIndexparts + Logger.Debug(oIndexPart) + Next + + Logger.Info($" [{oIndexparts.Count}] Indices parsed") + IndexArray = oIndexparts + Return True + + Catch ex As Exception + Logger.Error(ex) + Logger.Warn("Error in ParseArgs:" & vbNewLine & ex.Message) + ErrorMessage &= vbNewLine & "Error in ParseArgs:" & vbNewLine & ex.Message + ErrorWhileParsing = True + System.Console.WriteLine($"Error in ParseArgs - {Now.ToString}") + + Return False + End Try + End Function + + Public Function StreamORIndexFile() + Try + Dim oResult As Boolean = False + If RunMode = MODE_VERSION Then + oResult = Windream.NewFileStream(SourceFile, TargetPath) + ElseIf RunMode = MODE_OVERWRITE Then + Dim oDeleted = Windream.RemoveFile(TargetPath) + If oDeleted = True Then + oResult = Windream.NewFileStream(SourceFile, TargetPath) + Else + Logger.Warn($"Mode ImportOverwrite is active - but WMFile could not be deleted!!") + End If + ElseIf RunMode = MODE_NACHINDEXIERUNG Then + oResult = True + End If + + If oResult = True Then + Dim oFilePathToIndex As String = TargetPath + + If RunMode = MODE_NACHINDEXIERUNG Then + oFilePathToIndex = SourceFile + Logger.Info($"Using Sourcefile as FileName: [{SourceFile}]") + Else + Logger.Info($"File successfully streamed to windream [{TargetPath}]!") + End If + + Logger.Info("Indexing file [{0}]", oFilePathToIndex) + + For Each oIndex As String In IndexArray + Dim oMatch As Match = oRegex.Match(oIndex) + + If oMatch.Success Then + + Dim oIndexName = oMatch.Groups(1)?.Value + Dim oIndexValues = oMatch.Groups.Item(2)?.Value + Dim oSplitValue = New String() {"~#~"} + + Dim oIndexValueArray = oIndexValues.Split(oSplitValue, StringSplitOptions.RemoveEmptyEntries) + Dim oIndexResult = False + + Logger.Info("Setting Index [{0}] to [{1}].", oIndexName, oIndexValues) + + If Windream.TestIndexNameIsVectorIndex(oIndexName) Then + Dim oCombinedIndexValues = Windream.GetVectorData(oFilePathToIndex, oIndexName, oIndexValueArray, False) + oIndexResult = Windream.SetFileIndex(oFilePathToIndex, oIndexName, oCombinedIndexValues.ToList, WindreamObjectType) + Else + oIndexResult = Windream.SetFileIndex(oFilePathToIndex, oIndexName, oIndexValueArray(0), WindreamObjectType) + End If + + oResult = oIndexResult + Else + oResult = False + End If + + If oResult = False Then + Logger.Warn("Indexing failed. Exiting.") + Exit For + End If + Next + End If + + If oResult = True Then + Logger.Info("## All Tasks finished ##") + ErrorWhileImporting = False + End If + +#Region "Old Logic" + 'If oResult = True Then + ' If oMode <> MODE_NACHINDEXIERUNG Then + ' LOGGER.Info($"File successfully streamed to windream [{oTargetPath}]! Now indexing...") + ' End If + + ' For Each oIndex2 As String In oIndexArr + ' Dim oIndexInfo() = oIndex2.Split("={") + ' Dim oIndexName = oIndexInfo(0) + ' Dim oIndexvalue + ' Dim r As Regex = New Regex(oRegExArg, RegexOptions.IgnoreCase) + ' ' ' Match the regular expression pattern against a text string. + ' Dim m As Match = r.Match(oIndex2) + ' Do While m.Success + + ' ' oClearedBodyText = oClearedBodyText.Replace(m.Value, "") + ' 'Dim g As Group = m.Groups(1) + ' Dim g1 As Group = m.Groups(2) + ' Dim g2 As Group = m.Groups(3) + + ' If Not IsNothing(g2.Value) Then + ' oIndexvalue = g2.Value + ' Console.WriteLine($"Indexvalue: {oIndexvalue}") + ' End If + + ' If Len(oIndexvalue) > 0 Then + ' If WMIndices.Contains(oIndexName) Then + ' LOGGER.Info($"Setting Index: oIndexName [{oIndexName}] - oIndexvalue [{oIndexvalue}]") + + ' 'DEBUG + ' oIndexvalue = New List(Of String) From {"Wert 1", "Wert 2", "wert 3"} + ' 'DEBUG + + ' If WINDREAM.SetFileIndex(oTargetPath, oIndexName, oIndexvalue, oWMObjecttype) = False Then + ' LOGGER.Info($"Index could not be set...") + ' If WINDREAM.RemoveFile(oTargetPath) = True Then + ' LOGGER.Info($"File deleted after error!") + ' End If + ' oResult = False + ' Exit For + ' End If + ' Else + ' LOGGER.Warn($"Transmitted index with name [{oIndexName}] is not existing in WM Objecttype!") + ' If WINDREAM.RemoveFile(oTargetPath) = True Then + ' LOGGER.Info($"File deleted after error!") + ' End If + ' oResult = False + ' Exit For + ' End If + ' End If + ' m = m.NextMatch() + ' Loop + ' Next + ' If oResult = True Then + ' LOGGER.Info("## All Tasks finished ##") + ' oErrorImport = False + ' End If + 'End If +#End Region + + Return oResult + Catch ex As Exception + Logger.Warn($"Unexpected Error in StreamORIndexFile: {ex.Message}") + Logger.Error(ex) + Return False + End Try + End Function +End Class diff --git a/WiDigShared/My Project/Application.Designer.vb b/WiDigShared/My Project/Application.Designer.vb new file mode 100644 index 0000000..8ab460b --- /dev/null +++ b/WiDigShared/My Project/Application.Designer.vb @@ -0,0 +1,13 @@ +'------------------------------------------------------------------------------ +' +' 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. +' +'------------------------------------------------------------------------------ + +Option Strict On +Option Explicit On + diff --git a/WiDigShared/My Project/Application.myapp b/WiDigShared/My Project/Application.myapp new file mode 100644 index 0000000..758895d --- /dev/null +++ b/WiDigShared/My Project/Application.myapp @@ -0,0 +1,10 @@ + + + false + false + 0 + true + 0 + 1 + true + diff --git a/WiDigShared/My Project/AssemblyInfo.vb b/WiDigShared/My Project/AssemblyInfo.vb new file mode 100644 index 0000000..c5d4a47 --- /dev/null +++ b/WiDigShared/My Project/AssemblyInfo.vb @@ -0,0 +1,35 @@ +Imports System +Imports System.Reflection +Imports System.Runtime.InteropServices + +' Allgemeine Informationen über eine Assembly werden über die folgenden +' Attribute gesteuert. Ändern Sie diese Attributwerte, um die Informationen zu ändern, +' die einer Assembly zugeordnet sind. + +' Werte der Assemblyattribute überprüfen + + + + + + + + + + +'Die folgende GUID wird für die typelib-ID verwendet, wenn dieses Projekt für COM verfügbar gemacht wird. + + +' Versionsinformationen für eine Assembly bestehen aus den folgenden vier Werten: +' +' Hauptversion +' Nebenversion +' Buildnummer +' Revision +' +' Sie können alle Werte angeben oder Standardwerte für die Build- und Revisionsnummern verwenden, +' indem Sie "*" wie unten gezeigt eingeben: +' + + + diff --git a/WiDigShared/My Project/Resources.Designer.vb b/WiDigShared/My Project/Resources.Designer.vb new file mode 100644 index 0000000..c1a1497 --- /dev/null +++ b/WiDigShared/My Project/Resources.Designer.vb @@ -0,0 +1,63 @@ +'------------------------------------------------------------------------------ +' +' 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. +' +'------------------------------------------------------------------------------ + +Option Strict On +Option Explicit On + +Imports System + +Namespace My.Resources + + 'Diese Klasse wurde von der StronglyTypedResourceBuilder automatisch generiert + '-Klasse über ein Tool wie ResGen oder Visual Studio automatisch generiert. + 'Um einen Member hinzuzufügen oder zu entfernen, bearbeiten Sie die .ResX-Datei und führen dann ResGen + 'mit der /str-Option erneut aus, oder Sie erstellen Ihr VS-Projekt neu. + ''' + ''' Eine stark typisierte Ressourcenklasse zum Suchen von lokalisierten Zeichenfolgen usw. + ''' + _ + Friend Module Resources + + Private resourceMan As Global.System.Resources.ResourceManager + + Private resourceCulture As Global.System.Globalization.CultureInfo + + ''' + ''' Gibt die zwischengespeicherte ResourceManager-Instanz zurück, die von dieser Klasse verwendet wird. + ''' + _ + Friend ReadOnly Property ResourceManager() As Global.System.Resources.ResourceManager + Get + If Object.ReferenceEquals(resourceMan, Nothing) Then + Dim temp As Global.System.Resources.ResourceManager = New Global.System.Resources.ResourceManager("DigitalData.GUIs.WiDigShared.Resources", GetType(Resources).Assembly) + resourceMan = temp + End If + Return resourceMan + End Get + End Property + + ''' + ''' Überschreibt die CurrentUICulture-Eigenschaft des aktuellen Threads für alle + ''' Ressourcenzuordnungen, die diese stark typisierte Ressourcenklasse verwenden. + ''' + _ + Friend Property Culture() As Global.System.Globalization.CultureInfo + Get + Return resourceCulture + End Get + Set + resourceCulture = value + End Set + End Property + End Module +End Namespace diff --git a/WiDigShared/My Project/Resources.resx b/WiDigShared/My Project/Resources.resx new file mode 100644 index 0000000..af7dbeb --- /dev/null +++ b/WiDigShared/My Project/Resources.resx @@ -0,0 +1,117 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + text/microsoft-resx + + + 2.0 + + + System.Resources.ResXResourceReader, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + System.Resources.ResXResourceWriter, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + \ No newline at end of file diff --git a/WiDigShared/My Project/Settings.Designer.vb b/WiDigShared/My Project/Settings.Designer.vb new file mode 100644 index 0000000..8b7239f --- /dev/null +++ b/WiDigShared/My Project/Settings.Designer.vb @@ -0,0 +1,73 @@ +'------------------------------------------------------------------------------ +' +' 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. +' +'------------------------------------------------------------------------------ + +Option Strict On +Option Explicit On + + +Namespace My + + _ + Partial Friend NotInheritable Class MySettings + Inherits Global.System.Configuration.ApplicationSettingsBase + + Private Shared defaultInstance As MySettings = CType(Global.System.Configuration.ApplicationSettingsBase.Synchronized(New MySettings()),MySettings) + +#Region "Automatische My.Settings-Speicherfunktion" +#If _MyType = "WindowsForms" Then + Private Shared addedHandler As Boolean + + Private Shared addedHandlerLockObject As New Object + + _ + Private Shared Sub AutoSaveSettings(sender As Global.System.Object, e As Global.System.EventArgs) + If My.Application.SaveMySettingsOnExit Then + My.Settings.Save() + End If + End Sub +#End If +#End Region + + Public Shared ReadOnly Property [Default]() As MySettings + Get + +#If _MyType = "WindowsForms" Then + If Not addedHandler Then + SyncLock addedHandlerLockObject + If Not addedHandler Then + AddHandler My.Application.Shutdown, AddressOf AutoSaveSettings + addedHandler = True + End If + End SyncLock + End If +#End If + Return defaultInstance + End Get + End Property + End Class +End Namespace + +Namespace My + + _ + Friend Module MySettingsProperty + + _ + Friend ReadOnly Property Settings() As Global.DigitalData.GUIs.WiDigShared.My.MySettings + Get + Return Global.DigitalData.GUIs.WiDigShared.My.MySettings.Default + End Get + End Property + End Module +End Namespace diff --git a/WiDigShared/My Project/Settings.settings b/WiDigShared/My Project/Settings.settings new file mode 100644 index 0000000..85b890b --- /dev/null +++ b/WiDigShared/My Project/Settings.settings @@ -0,0 +1,7 @@ + + + + + + + diff --git a/WiDigShared/WiDigShared.vbproj b/WiDigShared/WiDigShared.vbproj new file mode 100644 index 0000000..2a93761 --- /dev/null +++ b/WiDigShared/WiDigShared.vbproj @@ -0,0 +1,131 @@ + + + + + Debug + AnyCPU + {A5D032D4-ABDC-44BF-8666-5FBE42AF0AB7} + Library + DigitalData.GUIs.WiDigShared + DigitalData.GUIs.WiDigShared + 512 + Windows + v4.6.1 + true + + + true + full + true + true + bin\Debug\ + DigitalData.GUIs.WiDigShared.xml + 42016,41999,42017,42018,42019,42032,42036,42020,42021,42022 + + + pdbonly + false + true + true + bin\Release\ + DigitalData.GUIs.WiDigShared.xml + 42016,41999,42017,42018,42019,42032,42036,42020,42021,42022 + + + On + + + Binary + + + Off + + + On + + + + ..\..\DDMonorepo\Modules.Config\bin\Debug\DigitalData.Modules.Config.dll + + + ..\..\DDMonorepo\Modules.Database\bin\Debug\DigitalData.Modules.Database.dll + + + ..\..\DDMonorepo\Encryption\bin\Debug\DigitalData.Modules.Encryption.dll + + + ..\..\DDMonorepo\Modules.Logging\bin\Debug\DigitalData.Modules.Logging.dll + + + ..\..\DDMonorepo\Modules.Windream\bin\Debug\DigitalData.Modules.Windream.dll + + + + ..\packages\NLog.4.7.0\lib\net45\NLog.dll + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + True + Application.myapp + True + + + True + True + Resources.resx + + + True + Settings.settings + True + + + + + VbMyResourcesResXFileCodeGenerator + Resources.Designer.vb + My.Resources + Designer + + + + + MyApplicationCodeGenerator + Application.Designer.vb + + + SettingsSingleFileGenerator + My + Settings.Designer.vb + + + + + \ No newline at end of file diff --git a/WiDigShared/packages.config b/WiDigShared/packages.config new file mode 100644 index 0000000..d7bc5b9 --- /dev/null +++ b/WiDigShared/packages.config @@ -0,0 +1,4 @@ + + + + \ No newline at end of file