Compare commits

...

16 Commits

Author SHA1 Message Date
Jonathan Jenne
0585db3e14 Version 1.4.1 2021-08-18 10:57:35 +02:00
Jonathan Jenne
f82f685117 Version 1.4.0 2021-08-12 16:31:18 +02:00
Jonathan Jenne
96fe8fe492 bugfixes 2021-08-12 16:31:10 +02:00
Jonathan Jenne
05d194c2a9 Include SQLConfig in installer 2021-08-12 12:15:06 +02:00
Jonathan Jenne
22d8a0fd8c Decrypt Connection String 2021-08-12 10:46:09 +02:00
Jonathan Jenne
e90d22dae2 Add missing dll WidigShared 2021-08-02 12:21:32 +02:00
Jonathan Jenne
bb0c0c2cb4 Version 1.3.9.0 2021-08-02 11:16:06 +02:00
Jonathan Jenne
279c9513c6 replace icon 2021-08-02 11:15:47 +02:00
Jonathan Jenne
b8250583e1 Add WidigShared Project, seperate all logig into this shared project 2021-08-02 10:54:43 +02:00
Jonathan Jenne
3d55af8502 update installer files 2021-08-02 10:54:01 +02:00
Jonathan Jenne
7b57bb6a72 remove old installer 2021-08-02 10:53:37 +02:00
Jonathan Jenne
5af06e302e Version 1.3.6 2021-07-29 16:40:14 +02:00
Jonathan Jenne
7aa3d2fe9f Version 1.3.5 2021-07-29 15:06:01 +02:00
Jonathan Jenne
cbe113aea4 Fix indexing for NI, dont overwrite existing vector entries 2021-07-29 15:05:41 +02:00
Jonathan Jenne
6cd68bd776 Version 1.3.4 2021-07-28 15:35:00 +02:00
Jonathan Jenne
d8081ab122 Fix typo, same config for both projects 2021-07-28 15:34:46 +02:00
39 changed files with 1176 additions and 1182 deletions

View File

@@ -1,21 +0,0 @@
<?xml version="1.0" encoding="utf-8"?>
<Include>
<!-- Der Name der Haupt-EXE -->
<?define ProgramName="WIDigConsoleApp"?>
<!-- Der Volle Name des Programms -->
<?define ProductName="Windream Indexer von Digital Data"?>
<!-- Der Hersteller des Programms -->
<?define Manufacturer="Digital Data"?>
<!-- Kurze Beschreibung des Programms (optional) -->
<?define Description="Beschreibung des Programms"?>
<!-- Kurzer Kommentar zum Programm (optional) -->
<?define Comments="Kommentar wie Copyright-Hinweis"?>
<!--
UPGRADE CODE
Sorgt dafür, dass Programm-Updates mit dem Installer
die alte Version ersetzen. Darf sich nicht mehr ändern,
wenn einmal festgelegt.
-->
<?define UpgradeCode="b5f2b6f9-c768-49f9-8440-06579af5203e"?>
</Include>

View File

@@ -1,192 +0,0 @@
<?include Config.wxi?>
<Wix xmlns="http://schemas.microsoft.com/wix/2006/wi" xmlns:util="http://schemas.microsoft.com/wix/UtilExtension">
<Product Id="*" Name="$(var.ProductName)" Language="1031" Codepage="1252" Version="$(var.ProductVersion)" Manufacturer="$(var.Manufacturer)" UpgradeCode="$(var.UpgradeCode)">
<Package
Id="*"
Keywords="Installer"
Description="$(var.Description)"
Comments="$(var.Comments)"
Manufacturer="$(var.Manufacturer)"
InstallerVersion="100"
Languages="1031"
Compressed="yes"
SummaryCodepage="1252"
InstallScope="perMachine"
/>
<Media Id='1' Cabinet='$(var.ProgramName).cab' EmbedCab='yes' DiskPrompt='$(var.ProgramName)' />
<Property Id='DiskPrompt' Value="$(var.ProgramName) Install" />
<MajorUpgrade
AllowDowngrades="no"
AllowSameVersionUpgrades="yes"
DowngradeErrorMessage="Eine neuere Version von [ProductName] ist bereits installiert. Das Setup wird beendet."
/>
<Property Id="PREVIOUSVERSIONSINSTALLED" Secure="yes" />
<Upgrade Id="$(var.UpgradeCode)">
<UpgradeVersion
Minimum="1.0.0.0" Maximum="99.0.0.0"
Property="PREVIOUSVERSIONSINSTALLED"
IncludeMinimum="yes" IncludeMaximum="no" />
</Upgrade>
<!-- Legt das Icon fest -->
<Icon Id="AppIcon.exe" SourceFile="$(var.ProgramName).exe" />
<!-- Zeige Icon in Systemsteuerung > Programme entfernen -->
<Property Id="ARPPRODUCTICON" Value="AppIcon" />
<!-- Legt die Verzeichnisstruktur fest -->
<Directory Id="TARGETDIR" Name="SourceDir">
<Directory Id="ProgramFilesFolder">
<Directory Id="DDDIR" Name="$(var.Manufacturer)">
<Directory Id="INSTALLDIR" Name="$(var.ProductName)"/>
</Directory>
</Directory>
<Directory Id="ProgramMenuFolder">
<Directory Id="ApplicationProgramsFolder" Name="$(var.ProductName)"/>
</Directory>
<Directory Id="DesktopFolder" />
</Directory>
<!-- Verknüpfung für Startmenü -->
<DirectoryRef Id="ApplicationProgramsFolder">
<Component Id="ApplicationShortcut_StartMenu" Guid="8e116ea7-41c4-4e83-af7c-997f8cb7432d">
<Shortcut Id="ApplicationStartMenuShortcut_StartMenu"
Name="$(var.ProductName)"
Target="[INSTALLDIR]WIDIG.exe"
WorkingDirectory="INSTALLDIR"/>
<RemoveFolder Id="ApplicationProgramsFolder_StartMenu" On="uninstall"/>
<RegistryValue Root="HKCU" Key="Software\[Manufacturer]\[ProductName]" Name="installed" Type="integer" Value="1" KeyPath="yes"/>
</Component>
</DirectoryRef>
<!-- Verknüpfung für Desktop -->
<DirectoryRef Id="DesktopFolder">
<Component Id="ApplicationShortcut_Desktop" Guid="9100d46d-1576-484a-b467-bc10ffdb21bb">
<Shortcut Id="ApplicationStartMenuShortcut_Desktop"
Name="$(var.ProductName)"
Target="[INSTALLDIR]WIDIG.exe"
WorkingDirectory="INSTALLDIR"/>
<RemoveFolder Id="ApplicationProgramsFolder_Desktop" On="uninstall"/>
<RegistryValue Root="HKCU" Key="Software\[Manufacturer]\[ProductName]" Name="installed" Type="integer" Value="1" KeyPath="yes"/>
</Component>
</DirectoryRef>
<DirectoryRef Id="INSTALLDIR">
<Component Id="MainApplicationExe" Guid="195612c2-f0c0-472a-a83e-935bf13ce295">
<File Id="MainApplicationExe" Name="WIDIG.exe" KeyPath="no" Checksum="yes">
<Shortcut Id="DesktopShortcut" Directory="DesktopFolder" Name="$(var.ProductName)" WorkingDirectory="INSTALLDIR" Icon="AppIcon.exe" IconIndex="0" Advertise="yes" />
<Shortcut Id="StartMenuShortcut" Directory="ProgramMenuFolder" Name="$(var.ProductName)" WorkingDirectory="INSTALLDIR" Icon="AppIcon.exe" IconIndex="0" Advertise="yes" />
</File>
<File Id="MainApplicationExeConfig" Name="WIDIG.exe.config" KeyPath="no" Checksum="yes" />
<File Id="ConsoleApplicationExe" Name="$(var.ProgramName).exe" KeyPath="yes" Checksum="yes"></File>
<File Id="ConsoleApplicationExeConfig" Name="$(var.ProgramName).exe.config" KeyPath="no" Checksum="yes"></File>
</Component>
<Component Id="DevExpressLibs" Guid="a17fa11f-d78f-464e-930e-5fad7927ce4e">
<File Id="DevExpress.Data.v19.2.dll" Name="DevExpress.Data.v19.2.dll" KeyPath="yes" Checksum="yes"/>
<File Id="DevExpress.Pdf.v19.2.Core.dll" Name="DevExpress.Pdf.v19.2.Core.dll" KeyPath="no" Checksum="yes"/>
<File Id="DevExpress.Printing.v19.2.Core.dll" Name="DevExpress.Printing.v19.2.Core.dll" KeyPath="no" Checksum="yes"/>
<File Id="DevExpress.Sparkline.v19.2.Core.dll" Name="DevExpress.Sparkline.v19.2.Core.dll" KeyPath="no" Checksum="yes"/>
<File Id="DevExpress.Utils.v19.2.dll" Name="DevExpress.Utils.v19.2.dll" KeyPath="no" Checksum="yes"/>
<File Id="DevExpress.XtraBars.v19.2.dll" Name="DevExpress.XtraBars.v19.2.dll" KeyPath="no" Checksum="yes"/>
<File Id="DevExpress.XtraEditors.v19.2.dll" Name="DevExpress.XtraEditors.v19.2.dll" KeyPath="no" Checksum="yes"/>
</Component>
<Component Id="DigitalDataLibs" Guid="940298ca-6934-4e7a-a45b-1246b23622a6">
<File Id="DigitalData.Modules.Config.dll" Name="DigitalData.Modules.Config.dll" KeyPath="yes" Checksum="yes"/>
<File Id="DigitalData.Modules.Filesystem.dll" Name="DigitalData.Modules.Filesystem.dll" KeyPath="no" Checksum="yes"/>
<File Id="DigitalData.Modules.Language.dll" Name="DigitalData.Modules.Language.dll" KeyPath="no" Checksum="yes"/>
<File Id="DigitalData.Modules.Logging.dll" Name="DigitalData.Modules.Logging.dll" KeyPath="no" Checksum="yes"/>
<File Id="DigitalData.Modules.Windream.dll" Name="DigitalData.Modules.Windream.dll" KeyPath="no" Checksum="yes"/>
</Component>
<Component Id="MiscLibs" Guid="6a621556-dac9-48e2-b50c-624191d26845">
<File Id="Interop.WINDREAMLib.dll" Name="Interop.WINDREAMLib.dll" KeyPath="yes" Checksum="yes"/>
<File Id="NLog.dll" Name="NLog.dll" KeyPath="no" Checksum="yes"/>
<File Id="protobufnet.dll" Name="protobuf-net.dll" KeyPath="no" Checksum="yes"/>
</Component>
<!-- Für weitere Dateien hier Component Elemente anlegen!! -->
<!--
<Component Id="FirmaXYLib" Guid="PUT-GUID-HERE">
<File Id="FirmaXYLib" Name="FirmaXYLib.dll" KeyPath="yes" Checksum="yes"/>
</Component>
-->
<Component Id="RegistryKeys" Guid="aeebea13-8ad6-4f3d-ac4a-ecea4151dfb0">
<RegistryKey Root="HKLM" Key="SOFTWARE">
<RegistryKey Key="[Manufacturer]">
<RegistryKey Key="[ProductName]" ForceCreateOnInstall="yes" ForceDeleteOnUninstall="yes" Id="REGKEYINSTALLDIR">
<RegistryValue Type="string" Value="[INSTALLDIR]" Name="Path" />
</RegistryKey>
</RegistryKey>
</RegistryKey>
<util:RemoveFolderEx Id="RemoveApplicationFolder" On="uninstall" Property="APPLICATIONFOLDER" />
</Component>
</DirectoryRef>
<Feature Id="MainApplication" Title="Main Application" Level="1">
<ComponentRef Id="MainApplicationExe" />
<ComponentRef Id="RegistryKeys" />
<ComponentRef Id="DevExpressLibs" />
<ComponentRef Id="DigitalDataLibs" />
<ComponentRef Id="MiscLibs" />
<!-- Weitere Komponenten hier hinzufügen! -->
</Feature>
<!--
Diese Features können mit einem Parameter beim Aufruf des Installers deaktiviert werden
-->
<Feature Id="DesktopShortcut" Title="Desktop Shortcut">
<Condition Level="0">DISABLE_DESKTOP_ICON</Condition>
<ComponentRef Id="ApplicationShortcut_Desktop"/>
</Feature>
<Feature Id="StartmenuShortcut" Title="Startmenu Shortcut">
<Condition Level="0">DISABLE_STARTMENU_ICON</Condition>
<ComponentRef Id="ApplicationShortcut_StartMenu" />
</Feature>
<!-- Legt das Standard-Installationsverzeichnis fest-->
<Property Id="WIXUI_INSTALLDIR" Value="INSTALLDIR" />
<Property Id="_BrowseProperty" Value="INSTALLDIR" />
<!-- Konfiguriert die Reihenfolge der Installer-Dialoge -->
<UI>
<UIRef Id="WixUI_FeatureTree"/>
<UIRef Id="WixUI_ErrorProgressText" />
<Publish Dialog="WelcomeDlg"
Control="Next"
Event="NewDialog"
Value="InstallDirDlg"
Order="2">1</Publish>
<Publish Dialog="InstallDirDlg"
Control="Back"
Event="NewDialog"
Value="WelcomeDlg"
Order="2">1</Publish>
<Publish Dialog="InstallDirDlg"
Control="Next"
Event="NewDialog"
Value="FeaturesDlg"
Order="2">1</Publish>
<Publish Dialog="InstallDirDlg"
Control="ChangeFolder"
Event="NewDialog"
Value="BrowseDlg"
Order="2">1</Publish>
<Publish Dialog="FeaturesDlg"
Control="Back"
Event="NewDialog"
Value="InstallDirDlg"
Order="2">1</Publish>
</UI>
</Product>
</Wix>

View File

@@ -1,73 +0,0 @@
<Project ToolsVersion="4.0" DefaultTargets="Build" InitialTargets="EnsureWixToolsetInstalled" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<PropertyGroup>
<Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
<Platform Condition=" '$(Platform)' == '' ">x86</Platform>
<ProductVersion>3.10</ProductVersion>
<ProjectGuid>3943e21a-dd2b-4c74-b06f-9a39caa70e11</ProjectGuid>
<SchemaVersion>2.0</SchemaVersion>
<OutputName>SetupWIX</OutputName>
<OutputType>Package</OutputType>
<WixTargetsPath Condition=" '$(WixTargetsPath)' == '' AND '$(MSBuildExtensionsPath32)' != '' ">$(MSBuildExtensionsPath32)\Microsoft\WiX\v3.x\Wix.targets</WixTargetsPath>
<WixTargetsPath Condition=" '$(WixTargetsPath)' == '' ">$(MSBuildExtensionsPath)\Microsoft\WiX\v3.x\Wix.targets</WixTargetsPath>
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|x86' ">
<OutputPath>bin\$(Configuration)\</OutputPath>
<IntermediateOutputPath>obj\$(Configuration)\</IntermediateOutputPath>
<DefineConstants>Debug</DefineConstants>
<Cultures>de-DE</Cultures>
<LinkerAdditionalOptions>
-b "$(SolutionDir)WIDigConsoleApp\bin\$(Configuration)"
-b "$(SolutionDir)WIDigForm\bin\$(Configuration)"
</LinkerAdditionalOptions>
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|x86' ">
<OutputPath>bin\$(Configuration)\</OutputPath>
<IntermediateOutputPath>obj\$(Configuration)\</IntermediateOutputPath>
</PropertyGroup>
<ItemGroup>
<Compile Include="Product.wxs" />
</ItemGroup>
<ItemGroup>
<WixExtension Include="WixUtilExtension">
<HintPath>$(WixExtDir)\WixUtilExtension.dll</HintPath>
<Name>WixUtilExtension</Name>
</WixExtension>
<WixExtension Include="WixUIExtension">
<HintPath>$(WixExtDir)\WixUIExtension.dll</HintPath>
<Name>WixUIExtension</Name>
</WixExtension>
</ItemGroup>
<ItemGroup>
<Content Include="Config.wxi" />
</ItemGroup>
<Import Project="$(WixTargetsPath)" Condition=" Exists('$(WixTargetsPath)') " />
<Target Name="EnsureWixToolsetInstalled" Condition=" !Exists('$(WixTargetsPath)') ">
<Error Text="The WiX Toolset v3 build tools must be installed to build this project. To download the WiX Toolset, see http://wixtoolset.org/releases/" />
</Target>
<!--
To modify your build process, add your task inside one of the targets below and uncomment it.
Other similar extension points exist, see Wix.targets.
<Target Name="BeforeBuild">
</Target>
<Target Name="AfterBuild">
</Target>
-->
<Target Name="BeforeBuild">
<!-- Get the programs assembly version from the .exe file -->
<GetAssemblyIdentity AssemblyFiles="..\WIDigConsoleApp\bin\$(Configuration)\WIDigConsoleApp.exe">
<Output TaskParameter="Assemblies" ItemName="AsmInfo" />
</GetAssemblyIdentity>
<!-- Store the assembly version number in ProductVersion preprocessor variable -->
<CreateProperty Value="$(DefineConstants);ProductVersion=%(AsmInfo.Version)">
<Output TaskParameter="Value" PropertyName="DefineConstants" />
</CreateProperty>
<!-- Name the .msi file after the solution platform and assembly version e.g TestService-x86-1.4.0.0.msi -->
<CreateProperty Value="$(SolutionName)-$(Platform)-%(AsmInfo.Version)">
<Output TaskParameter="Value" PropertyName="TargetName" />
</CreateProperty>
<!-- Name the .wixpdb file after the solution platform and assembly version e.g TestService-x86-1.4.0.0.msi -->
<CreateProperty Value="$(TargetName)$(TargetPdbExt)">
<Output TaskParameter="Value" PropertyName="TargetPdbName" />
</CreateProperty>
</Target>
</Project>

View File

@@ -101,6 +101,7 @@
<File Id="DevExpress.Utils.v19.2.dll" Name="DevExpress.Utils.v19.2.dll" KeyPath="no" Checksum="yes"/>
<File Id="DevExpress.XtraBars.v19.2.dll" Name="DevExpress.XtraBars.v19.2.dll" KeyPath="no" Checksum="yes"/>
<File Id="DevExpress.XtraEditors.v19.2.dll" Name="DevExpress.XtraEditors.v19.2.dll" KeyPath="no" Checksum="yes"/>
<File Id="DevExpress.XtraLayout.v19.2.dll" Name="DevExpress.XtraLayout.v19.2.dll" KeyPath="no" Checksum="yes"/>
</Component>
<Component Id="DigitalDataLibs" Guid="940298ca-6934-4e7a-a45b-1246b23622a6">
@@ -110,6 +111,9 @@
<File Id="DigitalData.Modules.Logging.dll" Name="DigitalData.Modules.Logging.dll" KeyPath="no" Checksum="yes"/>
<File Id="DigitalData.Modules.Windream.dll" Name="DigitalData.Modules.Windream.dll" KeyPath="no" Checksum="yes"/>
<File Id="DigitalData.Modules.Database.dll" Name="DigitalData.Modules.Database.dll" KeyPath="no" Checksum="yes"/>
<File Id="DigitalData.Modules.Encryption.dll" Name="DigitalData.Modules.Encryption.dll" KeyPath="no" Checksum="yes"/>
<File Id="DigitalData.GUIs.WiDigShared.dll" Name="DigitalData.GUIs.WiDigShared.dll" KeyPath="no" Checksum="yes"/>
<File Id="DigitalData.Controls.SQLConfig.dll" Name="DigitalData.Controls.SQLConfig.dll" KeyPath="no" Checksum="yes"/>
</Component>
<Component Id="MiscLibs" Guid="6a621556-dac9-48e2-b50c-624191d26845">

View File

@@ -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

View File

@@ -1,16 +0,0 @@
Imports DigitalData.Modules.Config.ConfigAttributes
Public Class ClassConfig
' Global Settings (from computerconfig, overridable by userconfig)
<ConnectionString>
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

View File

@@ -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

View File

@@ -1,348 +0,0 @@
Imports System
Imports DigitalData.Modules.Logging
Imports DigitalData.Modules.Windream
Imports DigitalData.Modules.Config
Imports System.IO
Imports System.Text.RegularExpressions
Imports DigitalData.Modules.Database
Module Module1
Private _ArgumentLength As Integer
Public _database As MSSQLServer
Public oRegExArg As String
Public Const CODE_SUCCESS = 0
Public Const CODE_ERROR = 1
Public Function Main(CommandLineArguments As String()) As Integer
Dim oReturnResult As Integer
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, Nothing,
"Digital Data",
"WIDig")
LOGCONFIG = oLogConfig
LOGGER = LOGCONFIG.GetLogger
InitUserConfig()
LOGCONFIG.Debug = CONFIG.Config.LOG_DEBUG
LOGGER = LOGCONFIG.GetLogger
Dim oUserPW = GetUserPWPlain()
System.Console.WriteLine($"Starting up WIDig...")
If Connect2Windream(oUserPW) = True Then
Throw New ApplicationException("Could not initialize windream")
End If
System.Console.WriteLine($"Windream initialized!")
If 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
Throw New ApplicationException("Could not parse command line arguments")
End If
System.Console.WriteLine($"Command line arguments parsed!")
If 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)
End If
Return 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)
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)
'oUserAppDataPath = oUserAppDataPath & "\Digital Data\WIDigDat"
'Dim oCommonAppDataPath = Path.GetDirectoryName(System.Reflection.Assembly.GetExecutingAssembly().Location)
'CONFIG = New ConfigManager(Of ClassConfig)(LOGCONFIG, oUserAppDataPath, System.AppDomain.CurrentDomain.BaseDirectory, oCommonAppDataPath)
'System.Console.WriteLine($"Config loaded!")
'LOGGER.Info("Config loaded")
'Settings_Load()
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
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 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)
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("-Source@") Then
oSourceFile = oArg.Replace("-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("-Mode@") Then
oMode = oArg.Replace("-Mode@", "").ToUpper
ElseIf oArg.StartsWith("-Target@") Then
oTargetPath = oArg.Replace("-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 = "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
'Checks and creates the path if necessary
WINDREAM.NewFolder(oTargetPath, oExtension)
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
oINDEXInfotemp = oArg
oINDEXInfoStarted = True
oINDEXInfotemp = oINDEXInfotemp.Replace("-index@", "")
Else
If oINDEXInfoStarted Then
oINDEXInfotemp &= " " & oArg
End If
End If
ocount += 1
Next
Dim oIndexparts As String() = oINDEXInfotemp.Split(New String() {"#~#"}, StringSplitOptions.RemoveEmptyEntries)
LOGGER.Info($" [{oIndexparts.Length}] Indices transmitted...")
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 = "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
If oMode <> "NI" 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 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
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
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
End Module

View File

@@ -0,0 +1,92 @@
Imports System
Imports DigitalData.Modules.Logging
Imports DigitalData.Modules.Windream
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 LogConfig As LogConfig
Public Logger As Logger
Public Config As ConfigManager(Of ClassConfig)
Public Function Main(CommandLineArguments As String()) As Integer
Dim oWiDig As ClassWIDig
Try
System.Console.WriteLine($"Initializing WIDig...")
System.Console.WriteLine($"Logging...")
LogConfig = New LogConfig(LogConfig.PathType.AppData, Nothing, "Console", "Digital Data", "WIDig")
Logger = LogConfig.GetLogger
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...")
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 oWiDig.InitDatabase() = False Then
Throw New ApplicationException("Could not initialize DB")
End If
System.Console.WriteLine($"Database initialized!")
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 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 oWiDig.ErrorWhileParsing = True Or oWiDig.ErrorWhileImporting Then
Throw New ApplicationException(oWiDig.ErrorMessage)
End If
Return ClassWIDig.CODE_SUCCESS
Catch ex As Exception
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 ClassWIDig.CODE_ERROR
End Try
End Function
End Module

View File

@@ -31,5 +31,5 @@ Imports System.Runtime.InteropServices
' übernehmen, indem Sie "*" eingeben:
' <Assembly: AssemblyVersion("1.0.*")>
<Assembly: AssemblyVersion("1.3.3.0")>
<Assembly: AssemblyVersion("1.4.1.0")>
<Assembly: AssemblyFileVersion("1.0.0.0")>

View File

@@ -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

View File

@@ -6,7 +6,7 @@
<Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
<ProjectGuid>{B146A4E7-FD28-4F57-9BE0-C4178A258623}</ProjectGuid>
<OutputType>Exe</OutputType>
<StartupObject>WIDigConsoleApp.Module1</StartupObject>
<StartupObject>WIDigConsoleApp.ModuleMain</StartupObject>
<RootNamespace>WIDigConsoleApp</RootNamespace>
<AssemblyName>WIDigConsoleApp</AssemblyName>
<FileAlignment>512</FileAlignment>
@@ -53,6 +53,10 @@
<Reference Include="DigitalData.Modules.Database">
<HintPath>..\..\DDMonorepo\Modules.Database\bin\Debug\DigitalData.Modules.Database.dll</HintPath>
</Reference>
<Reference Include="DigitalData.Modules.Encryption, Version=1.1.0.0, Culture=neutral, processorArchitecture=MSIL">
<SpecificVersion>False</SpecificVersion>
<HintPath>..\..\DDMonorepo\Encryption\bin\Debug\DigitalData.Modules.Encryption.dll</HintPath>
</Reference>
<Reference Include="DigitalData.Modules.Logging, Version=2.1.0.0, Culture=neutral, processorArchitecture=MSIL">
<SpecificVersion>False</SpecificVersion>
<HintPath>..\..\DDMonorepo\Modules.Logging\bin\Debug\DigitalData.Modules.Logging.dll</HintPath>
@@ -61,12 +65,18 @@
<SpecificVersion>False</SpecificVersion>
<HintPath>..\..\DDMonorepo\Modules.Windream\bin\Debug\DigitalData.Modules.Windream.dll</HintPath>
</Reference>
<Reference Include="NLog">
<HintPath>..\..\DDMonorepo\Modules.Windream\bin\Debug\NLog.dll</HintPath>
<Reference Include="Microsoft.CSharp" />
<Reference Include="NLog, Version=4.0.0.0, Culture=neutral, PublicKeyToken=5120e14c03d0593c, processorArchitecture=MSIL">
<HintPath>..\packages\NLog.4.7.0\lib\net45\NLog.dll</HintPath>
</Reference>
<Reference Include="System" />
<Reference Include="System.Configuration" />
<Reference Include="System.Data" />
<Reference Include="System.Deployment" />
<Reference Include="System.IO.Compression" />
<Reference Include="System.Runtime.Serialization" />
<Reference Include="System.ServiceModel" />
<Reference Include="System.Transactions" />
<Reference Include="System.Xml" />
<Reference Include="System.Core" />
<Reference Include="System.Xml.Linq" />
@@ -85,9 +95,7 @@
<Import Include="System.Threading.Tasks" />
</ItemGroup>
<ItemGroup>
<Compile Include="ClassConfig.vb" />
<Compile Include="ClassEncryption.vb" />
<Compile Include="Module1.vb" />
<Compile Include="ModuleMain.vb" />
<Compile Include="My Project\AssemblyInfo.vb" />
<Compile Include="My Project\Application.Designer.vb">
<AutoGen>True</AutoGen>
@@ -103,7 +111,6 @@
<DependentUpon>Settings.settings</DependentUpon>
<DesignTimeSharedInput>True</DesignTimeSharedInput>
</Compile>
<Compile Include="Runtime.vb" />
</ItemGroup>
<ItemGroup>
<EmbeddedResource Include="My Project\Resources.resx">
@@ -124,6 +131,13 @@
<LastGenOutput>Settings.Designer.vb</LastGenOutput>
</None>
<None Include="App.config" />
<None Include="packages.config" />
</ItemGroup>
<ItemGroup>
<ProjectReference Include="..\WiDigShared\WiDigShared.vbproj">
<Project>{a5d032d4-abdc-44bf-8666-5fbe42af0ab7}</Project>
<Name>WiDigShared</Name>
</ProjectReference>
</ItemGroup>
<Import Project="$(MSBuildToolsPath)\Microsoft.VisualBasic.targets" />
</Project>

View File

@@ -1,6 +1,6 @@
<?xml version="1.0" encoding="utf-8"?>
<Project ToolsVersion="15.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<PropertyGroup Condition="'$(Configuration)|$(Platform)' == 'Debug|AnyCPU'">
<StartArguments>-Mode%40IMPV -Source%40E:\TEMP\TEST.pdf -Target%40"W:\ImportWIDIG\Testfile1.pdf" -WMOT%40"DIGITAL DATA - Entwicklung" -index%40Integer 24={0815}#~#Vektor_Text1={"Wert 1"~#~"Wert 2"}</StartArguments>
<StartArguments>-Mode%40NI -Source%40"\\Windream\Objects\ImportWIDIG\Testfile2.pdf" -Target%40"W:\ImportWIDIG\Testfile2.pdf" -WMOT%40"DIGITAL DATA - Entwicklung" -index%40Boolean 04={1}</StartArguments>
</PropertyGroup>
</Project>

View File

@@ -0,0 +1,4 @@
<?xml version="1.0" encoding="utf-8"?>
<packages>
<package id="NLog" version="4.7.0" targetFramework="net461" />
</packages>

View File

@@ -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

View File

@@ -12,7 +12,7 @@ Imports System.Runtime.InteropServices
<Assembly: AssemblyDescription("")>
<Assembly: AssemblyCompany("")>
<Assembly: AssemblyProduct("WIDIG")>
<Assembly: AssemblyCopyright("Copyright © 2020")>
<Assembly: AssemblyCopyright("Copyright © 2021")>
<Assembly: AssemblyTrademark("")>
<Assembly: ComVisible(False)>
@@ -31,5 +31,5 @@ Imports System.Runtime.InteropServices
' indem Sie "*" wie unten gezeigt eingeben:
' <Assembly: AssemblyVersion("1.0.*")>
<Assembly: AssemblyVersion("1.2.0.0")>
<Assembly: AssemblyVersion("1.3.9.0")>
<Assembly: AssemblyFileVersion("1.0.0.0")>

View File

@@ -1,40 +1,41 @@
'------------------------------------------------------------------------------
' <auto-generated>
' This code was generated by a tool.
' Runtime Version:4.0.30319.42000
' Dieser Code wurde von einem Tool generiert.
' Laufzeitversion:4.0.30319.42000
'
' Changes to this file may cause incorrect behavior and will be lost if
' the code is regenerated.
' Änderungen an dieser Datei können falsches Verhalten verursachen und gehen verloren, wenn
' der Code erneut generiert wird.
' </auto-generated>
'------------------------------------------------------------------------------
Option Strict On
Option Explicit On
Imports System
Namespace My.Resources
'This class was auto-generated by the StronglyTypedResourceBuilder
'class via a tool like ResGen or Visual Studio.
'To add or remove a member, edit your .ResX file then rerun ResGen
'with the /str option, or rebuild your VS project.
'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.
'''<summary>
''' A strongly-typed resource class, for looking up localized strings, etc.
''' Eine stark typisierte Ressourcenklasse zum Suchen von lokalisierten Zeichenfolgen usw.
'''</summary>
<Global.System.CodeDom.Compiler.GeneratedCodeAttribute("System.Resources.Tools.StronglyTypedResourceBuilder", "4.0.0.0"), _
Global.System.Diagnostics.DebuggerNonUserCodeAttribute(), _
Global.System.Runtime.CompilerServices.CompilerGeneratedAttribute(), _
Global.Microsoft.VisualBasic.HideModuleNameAttribute()> _
<Global.System.CodeDom.Compiler.GeneratedCodeAttribute("System.Resources.Tools.StronglyTypedResourceBuilder", "16.0.0.0"), _
Global.System.Diagnostics.DebuggerNonUserCodeAttribute(), _
Global.System.Runtime.CompilerServices.CompilerGeneratedAttribute(), _
Global.Microsoft.VisualBasic.HideModuleNameAttribute()> _
Friend Module Resources
Private resourceMan As Global.System.Resources.ResourceManager
Private resourceCulture As Global.System.Globalization.CultureInfo
'''<summary>
''' Returns the cached ResourceManager instance used by this class.
''' Gibt die zwischengespeicherte ResourceManager-Instanz zurück, die von dieser Klasse verwendet wird.
'''</summary>
<Global.System.ComponentModel.EditorBrowsableAttribute(Global.System.ComponentModel.EditorBrowsableState.Advanced)> _
<Global.System.ComponentModel.EditorBrowsableAttribute(Global.System.ComponentModel.EditorBrowsableState.Advanced)> _
Friend ReadOnly Property ResourceManager() As Global.System.Resources.ResourceManager
Get
If Object.ReferenceEquals(resourceMan, Nothing) Then
@@ -44,19 +45,29 @@ Namespace My.Resources
Return resourceMan
End Get
End Property
'''<summary>
''' Overrides the current thread's CurrentUICulture property for all
''' resource lookups using this strongly typed resource class.
''' Überschreibt die CurrentUICulture-Eigenschaft des aktuellen Threads für alle
''' Ressourcenzuordnungen, die diese stark typisierte Ressourcenklasse verwenden.
'''</summary>
<Global.System.ComponentModel.EditorBrowsableAttribute(Global.System.ComponentModel.EditorBrowsableState.Advanced)> _
<Global.System.ComponentModel.EditorBrowsableAttribute(Global.System.ComponentModel.EditorBrowsableState.Advanced)> _
Friend Property Culture() As Global.System.Globalization.CultureInfo
Get
Return resourceCulture
End Get
Set(ByVal value As Global.System.Globalization.CultureInfo)
Set
resourceCulture = value
End Set
End Property
'''<summary>
''' Sucht eine lokalisierte Ressource vom Typ DevExpress.Utils.Svg.SvgImage.
'''</summary>
Friend ReadOnly Property managedatasource() As DevExpress.Utils.Svg.SvgImage
Get
Dim obj As Object = ResourceManager.GetObject("managedatasource", resourceCulture)
Return CType(obj,DevExpress.Utils.Svg.SvgImage)
End Get
End Property
End Module
End Namespace

View File

@@ -46,7 +46,7 @@
mimetype: application/x-microsoft.net.object.binary.base64
value : The object must be serialized with
: System.Serialization.Formatters.Binary.BinaryFormatter
: System.Runtime.Serialization.Formatters.Binary.BinaryFormatter
: and then encoded with base64 encoding.
mimetype: application/x-microsoft.net.object.soap.base64
@@ -60,6 +60,7 @@
: 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">
@@ -68,9 +69,10 @@
<xsd:sequence>
<xsd:element name="value" type="xsd:string" minOccurs="0" />
</xsd:sequence>
<xsd:attribute name="name" type="xsd:string" />
<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">
@@ -85,9 +87,10 @@
<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" msdata:Ordinal="1" />
<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">
@@ -109,9 +112,13 @@
<value>2.0</value>
</resheader>
<resheader name="reader">
<value>System.Resources.ResXResourceReader, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
<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=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
<value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</resheader>
<assembly alias="System.Windows.Forms" name="System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" />
<data name="managedatasource" type="System.Resources.ResXFileRef, System.Windows.Forms">
<value>..\Resources\managedatasource.svg;DevExpress.Utils.Svg.SvgImage, DevExpress.Data.v19.2, Version=19.2.3.0, Culture=neutral, PublicKeyToken=b88d1754d700e49a</value>
</data>
</root>

View File

@@ -0,0 +1,9 @@
<?xml version='1.0' encoding='UTF-8'?>
<svg x="0px" y="0px" viewBox="0 0 32 32" version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" xml:space="preserve" id="Manage_Data_Source" style="enable-background:new 0 0 32 32">
<style type="text/css">
.Yellow{fill:#FFB115;}
.Blue{fill:#1177D7;}
</style>
<path d="M2,10V6c0-2.2,4.5-4,10-4s10,1.8,10,4v4c0,2.2-4.5,4-10,4S2,12.2,2,10z M12,20v-0.7l2.5-0.4L13,16.8l1-0.9 C13.3,16,12.7,16,12,16c-5.5,0-10-1.8-10-4v4C2,18.2,6.5,20,12,20z M14.5,25.1L12,24.7V22c-5.5,0-10-1.8-10-4v4c0,2.2,4.5,4,10,4 c0.7,0,1.3,0,1.9-0.1L14.5,25.1z" class="Yellow" />
<path d="M30,23v-2l-2.2-0.4c-0.2-0.6-0.4-1.3-0.7-1.8l1.3-1.8l-1.4-1.4l-1.8,1.3c-0.5-0.3-1.2-0.6-1.8-0.7L23,14h-2 l-0.4,2.2c-0.6,0.2-1.3,0.4-1.8,0.7l-1.8-1.3l-1.4,1.4l1.3,1.8c-0.3,0.5-0.6,1.2-0.7,1.8L14,21v2l2.2,0.4c0.2,0.6,0.4,1.3,0.7,1.8 l-1.3,1.8l1.4,1.4l1.8-1.3c0.5,0.3,1.2,0.6,1.8,0.7L21,30h2l0.4-2.2c0.6-0.2,1.3-0.4,1.8-0.7l1.8,1.3l1.4-1.4l-1.3-1.8 c0.3-0.5,0.6-1.2,0.7-1.8L30,23z M22,24c-1.1,0-2-0.9-2-2s0.9-2,2-2s2,0.9,2,2S23.1,24,22,24z" class="Blue" />
</svg>

View File

@@ -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

View File

@@ -0,0 +1 @@
-Mode@Test -Source@E:\TEMP\TEST.pdf -Target@"W:\ImportWIDIG\Testfile.pdf" -WMOT@"DIGITAL DATA - Entwicklung" -index@{"Integer 23"=4711;"String 38"=WeDigNoWIDig;"Boolean 04"=false}

View File

@@ -48,16 +48,23 @@
<OptionInfer>On</OptionInfer>
</PropertyGroup>
<PropertyGroup>
<ApplicationIcon>filedownload.ico</ApplicationIcon>
<ApplicationIcon>widig.ico</ApplicationIcon>
</PropertyGroup>
<ItemGroup>
<Reference Include="DevExpress.Data.v19.2, Version=19.2.3.0, Culture=neutral, PublicKeyToken=b88d1754d700e49a" />
<Reference Include="DevExpress.Utils.v19.2, Version=19.2.3.0, Culture=neutral, PublicKeyToken=b88d1754d700e49a" />
<Reference Include="DevExpress.XtraBars.v19.2, Version=19.2.3.0, Culture=neutral, PublicKeyToken=b88d1754d700e49a, processorArchitecture=MSIL" />
<Reference Include="DevExpress.XtraEditors.v19.2, Version=19.2.3.0, Culture=neutral, PublicKeyToken=b88d1754d700e49a" />
<Reference Include="DigitalData.Controls.SQLConfig">
<HintPath>..\..\DDMonorepo\SQLConfig\bin\Debug\DigitalData.Controls.SQLConfig.dll</HintPath>
</Reference>
<Reference Include="DigitalData.Modules.Config">
<HintPath>..\..\DDMonorepo\Modules.Config\bin\Debug\DigitalData.Modules.Config.dll</HintPath>
</Reference>
<Reference Include="DigitalData.Modules.Encryption, Version=1.1.0.0, Culture=neutral, processorArchitecture=MSIL">
<SpecificVersion>False</SpecificVersion>
<HintPath>..\..\DDMonorepo\Encryption\bin\Debug\DigitalData.Modules.Encryption.dll</HintPath>
</Reference>
<Reference Include="DigitalData.Modules.Logging">
<HintPath>..\..\DDMonorepo\Modules.Logging\bin\Debug\DigitalData.Modules.Logging.dll</HintPath>
</Reference>
@@ -68,10 +75,6 @@
<HintPath>..\..\DDMonorepo\Modules.Windream\bin\Debug\Interop.WINDREAMLib.dll</HintPath>
<EmbedInteropTypes>False</EmbedInteropTypes>
</Reference>
<Reference Include="Interop.WMOBRWSLib">
<HintPath>..\..\..\Interop.WMOBRWSLib.dll</HintPath>
<EmbedInteropTypes>True</EmbedInteropTypes>
</Reference>
<Reference Include="Microsoft.CSharp" />
<Reference Include="NLog, Version=4.0.0.0, Culture=neutral, PublicKeyToken=5120e14c03d0593c, processorArchitecture=MSIL">
<HintPath>..\packages\NLog.4.7.0\lib\net45\NLog.dll</HintPath>
@@ -106,8 +109,6 @@
<Import Include="System.Threading.Tasks" />
</ItemGroup>
<ItemGroup>
<Compile Include="ClassConfig.vb" />
<Compile Include="ClassEncryption.vb" />
<Compile Include="frmMain.vb">
<SubType>Form</SubType>
</Compile>
@@ -130,7 +131,6 @@
<DependentUpon>Settings.settings</DependentUpon>
<DesignTimeSharedInput>True</DesignTimeSharedInput>
</Compile>
<Compile Include="Runtime.vb" />
</ItemGroup>
<ItemGroup>
<EmbeddedResource Include="frmMain.resx">
@@ -158,7 +158,15 @@
<None Include="packages.config" />
</ItemGroup>
<ItemGroup>
<Content Include="filedownload.ico" />
<None Include="Resources\managedatasource.svg" />
<Content Include="TestArguments.txt" />
<Content Include="widig.ico" />
</ItemGroup>
<ItemGroup>
<ProjectReference Include="..\WiDigShared\WiDigShared.vbproj">
<Project>{a5d032d4-abdc-44bf-8666-5fbe42af0ab7}</Project>
<Name>WiDigShared</Name>
</ProjectReference>
</ItemGroup>
<Import Project="$(MSBuildToolsPath)\Microsoft.VisualBasic.targets" />
</Project>

View File

@@ -1,6 +1,7 @@
<?xml version="1.0" encoding="utf-8"?>
<Project ToolsVersion="Current" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<PropertyGroup Condition="'$(Configuration)|$(Platform)' == 'Debug|AnyCPU'">
<StartArguments>-Mode%40Test -Source%40E:\TEMP\TEST.pdf -Target%40"W:\ImportWIDIG\Testfile.pdf" -WMOT%40"DIGITAL DATA - Entwicklung" -index%40{"Integer 23"=4711%3b"String 38"=WeDigNoWIDig%3b"Boolean 04"=false}</StartArguments>
<StartArguments>
</StartArguments>
</PropertyGroup>
</Project>

Binary file not shown.

Before

Width:  |  Height:  |  Size: 2.8 KiB

View File

@@ -38,11 +38,13 @@ Partial Class frmMain
Me.bsiWMConnect = New DevExpress.XtraBars.BarStaticItem()
Me.BarButtonItem3 = New DevExpress.XtraBars.BarButtonItem()
Me.BarButtonItem4 = New DevExpress.XtraBars.BarButtonItem()
Me.btnStartTest = New DevExpress.XtraBars.BarButtonItem()
Me.BarButtonItem5 = New DevExpress.XtraBars.BarButtonItem()
Me.RibbonPage1 = New DevExpress.XtraBars.Ribbon.RibbonPage()
Me.RibbonGroupTest = New DevExpress.XtraBars.Ribbon.RibbonPageGroup()
Me.RibbonGroupWindream = New DevExpress.XtraBars.Ribbon.RibbonPageGroup()
Me.RibbonPageGroup1 = New DevExpress.XtraBars.Ribbon.RibbonPageGroup()
Me.RibbonPageGroup2 = New DevExpress.XtraBars.Ribbon.RibbonPageGroup()
Me.RibbonPageGroup3 = New DevExpress.XtraBars.Ribbon.RibbonPageGroup()
Me.RibbonGroupMisc = New DevExpress.XtraBars.Ribbon.RibbonPageGroup()
Me.RibbonStatusBar1 = New DevExpress.XtraBars.Ribbon.RibbonStatusBar()
Me.GroupBox1 = New System.Windows.Forms.GroupBox()
Me.Label6 = New System.Windows.Forms.Label()
@@ -130,9 +132,9 @@ Partial Class frmMain
'RibbonControl1
'
Me.RibbonControl1.ExpandCollapseItem.Id = 0
Me.RibbonControl1.Items.AddRange(New DevExpress.XtraBars.BarItem() {Me.RibbonControl1.ExpandCollapseItem, Me.RibbonControl1.SearchEditItem, Me.BarButtonItem1, Me.BarButtonItem2, Me.BarStaticinfo, Me.bsiWMConnect, Me.BarButtonItem3, Me.BarButtonItem4, Me.BarButtonItem5})
Me.RibbonControl1.Items.AddRange(New DevExpress.XtraBars.BarItem() {Me.RibbonControl1.ExpandCollapseItem, Me.RibbonControl1.SearchEditItem, Me.BarButtonItem1, Me.BarButtonItem2, Me.BarStaticinfo, Me.bsiWMConnect, Me.BarButtonItem3, Me.BarButtonItem4, Me.btnStartTest, Me.BarButtonItem5})
Me.RibbonControl1.Location = New System.Drawing.Point(0, 0)
Me.RibbonControl1.MaxItemId = 8
Me.RibbonControl1.MaxItemId = 9
Me.RibbonControl1.Name = "RibbonControl1"
Me.RibbonControl1.Pages.AddRange(New DevExpress.XtraBars.Ribbon.RibbonPage() {Me.RibbonPage1})
Me.RibbonControl1.ShowApplicationButton = DevExpress.Utils.DefaultBoolean.[False]
@@ -181,39 +183,55 @@ Partial Class frmMain
Me.BarButtonItem4.ImageOptions.SvgImage = CType(resources.GetObject("BarButtonItem4.ImageOptions.SvgImage"), DevExpress.Utils.Svg.SvgImage)
Me.BarButtonItem4.Name = "BarButtonItem4"
'
'btnStartTest
'
Me.btnStartTest.Caption = "Starte Test"
Me.btnStartTest.Id = 7
Me.btnStartTest.ImageOptions.SvgImage = CType(resources.GetObject("btnStartTest.ImageOptions.SvgImage"), DevExpress.Utils.Svg.SvgImage)
Me.btnStartTest.Name = "btnStartTest"
'
'BarButtonItem5
'
Me.BarButtonItem5.Caption = "Starte Test"
Me.BarButtonItem5.Id = 7
Me.BarButtonItem5.ImageOptions.SvgImage = CType(resources.GetObject("BarButtonItem5.ImageOptions.SvgImage"), DevExpress.Utils.Svg.SvgImage)
Me.BarButtonItem5.Caption = "Datenbankverbindung konfigurieren"
Me.BarButtonItem5.Id = 8
Me.BarButtonItem5.ImageOptions.SvgImage = Global.WIDIG.My.Resources.Resources.managedatasource
Me.BarButtonItem5.Name = "BarButtonItem5"
'
'RibbonPage1
'
Me.RibbonPage1.Groups.AddRange(New DevExpress.XtraBars.Ribbon.RibbonPageGroup() {Me.RibbonPageGroup1, Me.RibbonPageGroup2, Me.RibbonPageGroup3})
Me.RibbonPage1.Groups.AddRange(New DevExpress.XtraBars.Ribbon.RibbonPageGroup() {Me.RibbonGroupTest, Me.RibbonGroupWindream, Me.RibbonPageGroup1, Me.RibbonGroupMisc})
Me.RibbonPage1.Name = "RibbonPage1"
Me.RibbonPage1.Text = "Einstellungen"
'
'RibbonGroupTest
'
Me.RibbonGroupTest.Enabled = False
Me.RibbonGroupTest.ItemLinks.Add(Me.btnStartTest)
Me.RibbonGroupTest.Name = "RibbonGroupTest"
Me.RibbonGroupTest.Text = "Test"
'
'RibbonGroupWindream
'
Me.RibbonGroupWindream.Alignment = DevExpress.XtraBars.Ribbon.RibbonPageGroupAlignment.Far
Me.RibbonGroupWindream.Enabled = False
Me.RibbonGroupWindream.ItemLinks.Add(Me.BarButtonItem1)
Me.RibbonGroupWindream.ItemLinks.Add(Me.BarButtonItem2)
Me.RibbonGroupWindream.Name = "RibbonGroupWindream"
Me.RibbonGroupWindream.Text = "Windream Connection"
'
'RibbonPageGroup1
'
Me.RibbonPageGroup1.Enabled = False
Me.RibbonPageGroup1.ItemLinks.Add(Me.BarButtonItem1)
Me.RibbonPageGroup1.ItemLinks.Add(Me.BarButtonItem2)
Me.RibbonPageGroup1.Alignment = DevExpress.XtraBars.Ribbon.RibbonPageGroupAlignment.Far
Me.RibbonPageGroup1.ItemLinks.Add(Me.BarButtonItem5)
Me.RibbonPageGroup1.Name = "RibbonPageGroup1"
Me.RibbonPageGroup1.Text = "Windream Connection"
Me.RibbonPageGroup1.Text = "Datenbank Verbindung"
'
'RibbonPageGroup2
'RibbonGroupMisc
'
Me.RibbonPageGroup2.ItemLinks.Add(Me.BarButtonItem4)
Me.RibbonPageGroup2.Name = "RibbonPageGroup2"
Me.RibbonPageGroup2.Text = "Weiteres"
'
'RibbonPageGroup3
'
Me.RibbonPageGroup3.Enabled = False
Me.RibbonPageGroup3.ItemLinks.Add(Me.BarButtonItem5)
Me.RibbonPageGroup3.Name = "RibbonPageGroup3"
Me.RibbonPageGroup3.Text = "App Arguments"
Me.RibbonGroupMisc.Alignment = DevExpress.XtraBars.Ribbon.RibbonPageGroupAlignment.Far
Me.RibbonGroupMisc.ItemLinks.Add(Me.BarButtonItem4)
Me.RibbonGroupMisc.Name = "RibbonGroupMisc"
Me.RibbonGroupMisc.Text = "Weiteres"
'
'RibbonStatusBar1
'
@@ -398,7 +416,7 @@ Partial Class frmMain
Friend WithEvents Label4 As Label
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 RibbonGroupWindream As DevExpress.XtraBars.Ribbon.RibbonPageGroup
Friend WithEvents BarButtonItem1 As DevExpress.XtraBars.BarButtonItem
Friend WithEvents BarButtonItem2 As DevExpress.XtraBars.BarButtonItem
Friend WithEvents GroupBox1 As GroupBox
@@ -410,15 +428,17 @@ Partial Class frmMain
Friend WithEvents RibbonStatusBar1 As DevExpress.XtraBars.Ribbon.RibbonStatusBar
Friend WithEvents bsiWMConnect As DevExpress.XtraBars.BarStaticItem
Friend WithEvents BarButtonItem3 As DevExpress.XtraBars.BarButtonItem
Friend WithEvents RibbonPageGroup2 As DevExpress.XtraBars.Ribbon.RibbonPageGroup
Friend WithEvents RibbonGroupMisc As DevExpress.XtraBars.Ribbon.RibbonPageGroup
Friend WithEvents BarButtonItem4 As DevExpress.XtraBars.BarButtonItem
Friend WithEvents GroupBox3 As GroupBox
Friend WithEvents txtCommands As TextBox
Friend WithEvents BarButtonItem5 As DevExpress.XtraBars.BarButtonItem
Friend WithEvents RibbonPageGroup3 As DevExpress.XtraBars.Ribbon.RibbonPageGroup
Friend WithEvents btnStartTest As DevExpress.XtraBars.BarButtonItem
Friend WithEvents RibbonGroupTest As DevExpress.XtraBars.Ribbon.RibbonPageGroup
Friend WithEvents Label7 As Label
Friend WithEvents GroupBox2 As GroupBox
Friend WithEvents TextBox2 As TextBox
Friend WithEvents Label8 As Label
Friend WithEvents TextBox1 As TextBox
Friend WithEvents BarButtonItem5 As DevExpress.XtraBars.BarButtonItem
Friend WithEvents RibbonPageGroup1 As DevExpress.XtraBars.Ribbon.RibbonPageGroup
End Class

View File

@@ -224,7 +224,7 @@
MS44LDQsNGgtNGw2LDZsNi02SDI4eiIgY2xhc3M9IkdyZWVuIiAvPg0KPC9zdmc+Cw==
</value>
</data>
<data name="BarButtonItem5.ImageOptions.SvgImage" type="DevExpress.Utils.Svg.SvgImage, DevExpress.Data.v19.2" mimetype="application/x-microsoft.net.object.bytearray.base64">
<data name="btnStartTest.ImageOptions.SvgImage" type="DevExpress.Utils.Svg.SvgImage, DevExpress.Data.v19.2" mimetype="application/x-microsoft.net.object.bytearray.base64">
<value>
AAEAAAD/////AQAAAAAAAAAMAgAAAFlEZXZFeHByZXNzLkRhdGEudjE5LjIsIFZlcnNpb249MTkuMi4z
LjAsIEN1bHR1cmU9bmV1dHJhbCwgUHVibGljS2V5VG9rZW49Yjg4ZDE3NTRkNzAwZTQ5YQUBAAAAHURl

View File

@@ -1,340 +1,162 @@
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 ConfigManager As ConfigManager(Of ClassConfig)
Private Config As 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.CustomPath,
Application.LocalUserAppDataPath & "\Log",
Nothing,
My.Application.Info.CompanyName,
My.Application.Info.ProductName)
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
If Connect2Windream(oUserPW) = True Then
Dim oArguments As String() = Environment.GetCommandLineArgs()
If ParseArgs(oArguments) = True Then
If StreamIndexFile() = True Then
oErrorImport = False
Else
oErrorImport = True
End If
End If
Else
oErrorMessage = "Could not initialize windream"
ConfigManager = New ConfigManager(Of ClassConfig)(LogConfig, ClassWIDig.GetAppDataPath, ClassWIDig.GetProgramDataPath)
Config = ConfigManager.Config
LogConfig.Debug = Config.LOG_DEBUG
Logger = LogConfig.GetLogger
If Config.ConnectionString = String.Empty Then
ShowSQLConfig()
End If
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
'txtCommands.Text = CONFIG.Config.Arguments
txtCommands.Text = My.Settings.TestParams
If oErrorParse = True Then
MsgBox("Error in Parsing or Indexing!", MsgBoxStyle.Critical)
Me.Visible = True
Logger.Debug("Initializing MainForm....")
WiDig = New ClassWIDig(LogConfig, Config)
txtPW.Text = WiDig.GetUserPWPlain()
txtUser.Text = Config.WMUsername
txtWMDrive.Text = Config.WMDrive
txtWMRelpath.Text = Config.WMRelPath
txtWMServer.Text = Config.WMUserPW
txtDomain.Text = Config.Domain
txtCommands.Text = Config.Arguments
If Config.Arguments.Length > 0 Then
RibbonGroupTest.Enabled = 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()
CONFIG = New ConfigManager(Of ClassConfig)(LOGCONFIG, Application.UserAppDataPath, Application.CommonAppDataPath, Application.StartupPath)
LOGGER.Info("Config loaded")
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")
'Settings_Load()
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
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)
Dim oErrorMessage = WiDig?.ErrorMessage
If WiDig?.ErrorWhileParsing = True Then
MsgBox("A unexpected error occured while parsing arguments:" & vbNewLine & oErrorMessage, MsgBoxStyle.Critical)
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 importing file:" & vbNewLine & oErrorMessage, 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 cipherText As String = wrapper.EncryptData(Me.txtPW.Text)
Dim pw As String = cipherText
CONFIG.Config.WMUserPW = pw
Dim oEncryption As New EncryptionLegacy("!35452didalog=")
Dim oEncryptedPassword As String = oEncryption.EncryptData(Me.txtPW.Text)
Config.WMUserPW = oEncryptedPassword
Config.WMUsername = txtUser.Text
Config.WMDrive = txtWMDrive.Text
Config.WMRelPath = txtWMRelpath.Text
Config.WMServer = txtWMServer.Text
Config.Domain = txtDomain.Text
ConfigManager.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
Private Sub GroupBox1_Enter(sender As Object, e As EventArgs) Handles GroupBox1.Enter
RibbonPageGroup1.Enabled = True
RibbonGroupWindream.Enabled = True
End Sub
Private Sub GroupBox1_Leave(sender As Object, e As EventArgs) Handles GroupBox1.Leave
RibbonPageGroup1.Enabled = False
RibbonGroupWindream.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
My.Settings.TestParams = txtCommands.Text
My.Settings.Save()
'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()
Private Sub BarButtonItem5_ItemClick(sender As Object, e As DevExpress.XtraBars.ItemClickEventArgs) Handles btnStartTest.ItemClick
Config.Arguments = txtCommands.Text
ConfigManager.Save()
If Connect2Windream(oUserPW) = False Then
Dim oArgs() As String = txtCommands.Text.Split("|")
Logger.Debug($"[{oArgs.Length}] Arguments will be checked...")
If IsNothing(Windream) Then
Dim oUserPW = WiDig.GetUserPWPlain()
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
RibbonGroupTest.Enabled = True
End Sub
Private Sub txtCommands_LostFocus(sender As Object, e As EventArgs) Handles txtCommands.LostFocus
RibbonPageGroup3.Enabled = False
End Sub
Private Sub RichTextBox1_TextChanged(sender As Object, e As EventArgs)
RibbonGroupTest.Enabled = False
End Sub
Private Sub GroupBox2_Enter(sender As Object, e As EventArgs) Handles GroupBox2.Enter
RibbonPageGroup3.Enabled = False
RibbonGroupTest.Enabled = False
End Sub
Private Sub BarButtonItem5_ItemClick_1(sender As Object, e As DevExpress.XtraBars.ItemClickEventArgs) Handles BarButtonItem5.ItemClick
ShowSQLConfig()
End Sub
Private Sub ShowSQLConfig()
Dim oForm As New DigitalData.Controls.SQLConfig.frmSQLConfig(LogConfig) With {.FormTitle = "WiDig Test"}
Dim oResult = oForm.ShowDialog()
If oResult = DialogResult.OK Then
Config.ConnectionString = oForm.ConnectionString
ConfigManager.Save()
End If
End Sub
End Class

BIN
WIDigForm/widig.ico Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 41 KiB

View File

@@ -6,11 +6,12 @@ Public Class ClassConfig
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 WMDrive As String = "W"
Public Property WMRelPath As String = "\\windream\objects"
Public Property WMServer As String = ""
Public Property Domain As String = ""
Public Property LOG_DEBUG As Boolean = False
Public Property Arguments As String = "-Mode@IMPV|-Source@E:\TEMP\TEST.pdf|-Target@W:\ImportWIDIG\Testfile.pdf|-WMOT@DIGITAL DATA - Entwicklung|-index@{Integer 23=4711;String 38=WeDigNoWIDig;Boolean 04=0}"
End Class

365
WiDigShared/ClassWIDig.vb Normal file
View File

@@ -0,0 +1,365 @@
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
Dim oDecryptedConnectionString = MSSQLServer.DecryptConnectionString(Config.ConnectionString)
Database = New MSSQLServer(LogConfig, oDecryptedConnectionString)
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}, 0)"
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.")
If Windream.RemoveFile(oFilePathToIndex) = True Then
Logger.Debug("File [{0}] removed after error.", oFilePathToIndex)
Else
Logger.Warn("File [{0}] could not be removed!", oFilePathToIndex)
End If
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
If Windream.RemoveFile(TargetPath) = True Then
Logger.Debug("File [{0}] removed after error.", TargetPath)
Else
Logger.Warn("File [{0}] could not be removed!", TargetPath)
End If
Logger.Warn($"Unexpected Error in StreamORIndexFile: {ex.Message}")
Logger.Error(ex)
Return False
End Try
End Function
End Class

View File

@@ -0,0 +1,13 @@
'------------------------------------------------------------------------------
' <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 On
Option Explicit On

View File

@@ -0,0 +1,10 @@
<?xml version="1.0" encoding="utf-8"?>
<MyApplicationData xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema">
<MySubMain>false</MySubMain>
<SingleInstance>false</SingleInstance>
<ShutdownMode>0</ShutdownMode>
<EnableVisualStyles>true</EnableVisualStyles>
<AuthenticationMode>0</AuthenticationMode>
<ApplicationType>1</ApplicationType>
<SaveMySettingsOnExit>true</SaveMySettingsOnExit>
</MyApplicationData>

View File

@@ -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
<Assembly: AssemblyTitle("WiDigShared")>
<Assembly: AssemblyDescription("")>
<Assembly: AssemblyCompany("")>
<Assembly: AssemblyProduct("WiDigShared")>
<Assembly: AssemblyCopyright("Copyright © 2021")>
<Assembly: AssemblyTrademark("")>
<Assembly: ComVisible(False)>
'Die folgende GUID wird für die typelib-ID verwendet, wenn dieses Projekt für COM verfügbar gemacht wird.
<Assembly: Guid("0ebd0a01-c0bd-4db0-9174-976458068937")>
' 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:
' <Assembly: AssemblyVersion("1.0.*")>
<Assembly: AssemblyVersion("1.0.0.0")>
<Assembly: AssemblyFileVersion("1.0.0.0")>

View File

@@ -0,0 +1,63 @@
'------------------------------------------------------------------------------
' <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 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.
'''<summary>
''' Eine stark typisierte Ressourcenklasse zum Suchen von lokalisierten Zeichenfolgen usw.
'''</summary>
<Global.System.CodeDom.Compiler.GeneratedCodeAttribute("System.Resources.Tools.StronglyTypedResourceBuilder", "16.0.0.0"), _
Global.System.Diagnostics.DebuggerNonUserCodeAttribute(), _
Global.System.Runtime.CompilerServices.CompilerGeneratedAttribute(), _
Global.Microsoft.VisualBasic.HideModuleNameAttribute()> _
Friend Module Resources
Private resourceMan As Global.System.Resources.ResourceManager
Private resourceCulture As Global.System.Globalization.CultureInfo
'''<summary>
''' Gibt die zwischengespeicherte ResourceManager-Instanz zurück, die von dieser Klasse verwendet wird.
'''</summary>
<Global.System.ComponentModel.EditorBrowsableAttribute(Global.System.ComponentModel.EditorBrowsableState.Advanced)> _
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
'''<summary>
''' Überschreibt die CurrentUICulture-Eigenschaft des aktuellen Threads für alle
''' Ressourcenzuordnungen, die diese stark typisierte Ressourcenklasse verwenden.
'''</summary>
<Global.System.ComponentModel.EditorBrowsableAttribute(Global.System.ComponentModel.EditorBrowsableState.Advanced)> _
Friend Property Culture() As Global.System.Globalization.CultureInfo
Get
Return resourceCulture
End Get
Set
resourceCulture = value
End Set
End Property
End Module
End Namespace

View File

@@ -0,0 +1,117 @@
<?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.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: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" type="xsd:string" />
<xsd:attribute name="type" type="xsd:string" />
<xsd:attribute name="mimetype" type="xsd:string" />
</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" msdata:Ordinal="1" />
<xsd:attribute name="type" type="xsd:string" msdata:Ordinal="3" />
<xsd:attribute name="mimetype" type="xsd:string" msdata:Ordinal="4" />
</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=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</resheader>
<resheader name="writer">
<value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</resheader>
</root>

View File

@@ -0,0 +1,73 @@
'------------------------------------------------------------------------------
' <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 On
Option Explicit On
Namespace My
<Global.System.Runtime.CompilerServices.CompilerGeneratedAttribute(), _
Global.System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.VisualStudio.Editors.SettingsDesigner.SettingsSingleFileGenerator", "16.8.1.0"), _
Global.System.ComponentModel.EditorBrowsableAttribute(Global.System.ComponentModel.EditorBrowsableState.Advanced)> _
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
<Global.System.Diagnostics.DebuggerNonUserCodeAttribute(), Global.System.ComponentModel.EditorBrowsableAttribute(Global.System.ComponentModel.EditorBrowsableState.Advanced)> _
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
<Global.Microsoft.VisualBasic.HideModuleNameAttribute(), _
Global.System.Diagnostics.DebuggerNonUserCodeAttribute(), _
Global.System.Runtime.CompilerServices.CompilerGeneratedAttribute()> _
Friend Module MySettingsProperty
<Global.System.ComponentModel.Design.HelpKeywordAttribute("My.Settings")> _
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

View File

@@ -0,0 +1,7 @@
<?xml version='1.0' encoding='utf-8'?>
<SettingsFile xmlns="http://schemas.microsoft.com/VisualStudio/2004/01/settings" CurrentProfile="(Default)" UseMySettingsClassName="true">
<Profiles>
<Profile Name="(Default)" />
</Profiles>
<Settings />
</SettingsFile>

View File

@@ -0,0 +1,135 @@
<?xml version="1.0" encoding="utf-8"?>
<Project ToolsVersion="15.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<Import Project="$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props" Condition="Exists('$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props')" />
<PropertyGroup>
<Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
<Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
<ProjectGuid>{A5D032D4-ABDC-44BF-8666-5FBE42AF0AB7}</ProjectGuid>
<OutputType>Library</OutputType>
<RootNamespace>DigitalData.GUIs.WiDigShared</RootNamespace>
<AssemblyName>DigitalData.GUIs.WiDigShared</AssemblyName>
<FileAlignment>512</FileAlignment>
<MyType>Windows</MyType>
<TargetFrameworkVersion>v4.6.1</TargetFrameworkVersion>
<Deterministic>true</Deterministic>
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
<DebugSymbols>true</DebugSymbols>
<DebugType>full</DebugType>
<DefineDebug>true</DefineDebug>
<DefineTrace>true</DefineTrace>
<OutputPath>bin\Debug\</OutputPath>
<DocumentationFile>DigitalData.GUIs.WiDigShared.xml</DocumentationFile>
<NoWarn>42016,41999,42017,42018,42019,42032,42036,42020,42021,42022</NoWarn>
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
<DebugType>pdbonly</DebugType>
<DefineDebug>false</DefineDebug>
<DefineTrace>true</DefineTrace>
<Optimize>true</Optimize>
<OutputPath>bin\Release\</OutputPath>
<DocumentationFile>DigitalData.GUIs.WiDigShared.xml</DocumentationFile>
<NoWarn>42016,41999,42017,42018,42019,42032,42036,42020,42021,42022</NoWarn>
</PropertyGroup>
<PropertyGroup>
<OptionExplicit>On</OptionExplicit>
</PropertyGroup>
<PropertyGroup>
<OptionCompare>Binary</OptionCompare>
</PropertyGroup>
<PropertyGroup>
<OptionStrict>Off</OptionStrict>
</PropertyGroup>
<PropertyGroup>
<OptionInfer>On</OptionInfer>
</PropertyGroup>
<ItemGroup>
<Reference Include="DigitalData.Modules.Config">
<HintPath>..\..\DDMonorepo\Modules.Config\bin\Debug\DigitalData.Modules.Config.dll</HintPath>
</Reference>
<Reference Include="DigitalData.Modules.Database">
<HintPath>..\..\DDMonorepo\Modules.Database\bin\Debug\DigitalData.Modules.Database.dll</HintPath>
</Reference>
<Reference Include="DigitalData.Modules.Encryption">
<HintPath>..\..\DDMonorepo\Encryption\bin\Debug\DigitalData.Modules.Encryption.dll</HintPath>
</Reference>
<Reference Include="DigitalData.Modules.Language, Version=1.3.2.0, Culture=neutral, processorArchitecture=MSIL">
<SpecificVersion>False</SpecificVersion>
<HintPath>..\..\DDMonorepo\Modules.Language\bin\Release\DigitalData.Modules.Language.dll</HintPath>
</Reference>
<Reference Include="DigitalData.Modules.Logging">
<HintPath>..\..\DDMonorepo\Modules.Logging\bin\Debug\DigitalData.Modules.Logging.dll</HintPath>
</Reference>
<Reference Include="DigitalData.Modules.Windream">
<HintPath>..\..\DDMonorepo\Modules.Windream\bin\Debug\DigitalData.Modules.Windream.dll</HintPath>
</Reference>
<Reference Include="Microsoft.CSharp" />
<Reference Include="NLog, Version=4.0.0.0, Culture=neutral, PublicKeyToken=5120e14c03d0593c, processorArchitecture=MSIL">
<HintPath>..\packages\NLog.4.7.0\lib\net45\NLog.dll</HintPath>
</Reference>
<Reference Include="System" />
<Reference Include="System.Configuration" />
<Reference Include="System.Data" />
<Reference Include="System.IO.Compression" />
<Reference Include="System.Runtime.Serialization" />
<Reference Include="System.ServiceModel" />
<Reference Include="System.Transactions" />
<Reference Include="System.Xml" />
<Reference Include="System.Core" />
<Reference Include="System.Xml.Linq" />
<Reference Include="System.Data.DataSetExtensions" />
<Reference Include="System.Net.Http" />
</ItemGroup>
<ItemGroup>
<Import Include="Microsoft.VisualBasic" />
<Import Include="System" />
<Import Include="System.Collections" />
<Import Include="System.Collections.Generic" />
<Import Include="System.Data" />
<Import Include="System.Diagnostics" />
<Import Include="System.Linq" />
<Import Include="System.Xml.Linq" />
<Import Include="System.Threading.Tasks" />
</ItemGroup>
<ItemGroup>
<Compile Include="ClassConfig.vb" />
<Compile Include="ClassWIDig.vb" />
<Compile Include="My Project\AssemblyInfo.vb" />
<Compile Include="My Project\Application.Designer.vb">
<AutoGen>True</AutoGen>
<DependentUpon>Application.myapp</DependentUpon>
<DesignTime>True</DesignTime>
</Compile>
<Compile Include="My Project\Resources.Designer.vb">
<AutoGen>True</AutoGen>
<DesignTime>True</DesignTime>
<DependentUpon>Resources.resx</DependentUpon>
</Compile>
<Compile Include="My Project\Settings.Designer.vb">
<AutoGen>True</AutoGen>
<DependentUpon>Settings.settings</DependentUpon>
<DesignTimeSharedInput>True</DesignTimeSharedInput>
</Compile>
</ItemGroup>
<ItemGroup>
<EmbeddedResource Include="My Project\Resources.resx">
<Generator>VbMyResourcesResXFileCodeGenerator</Generator>
<LastGenOutput>Resources.Designer.vb</LastGenOutput>
<CustomToolNamespace>My.Resources</CustomToolNamespace>
<SubType>Designer</SubType>
</EmbeddedResource>
</ItemGroup>
<ItemGroup>
<None Include="My Project\Application.myapp">
<Generator>MyApplicationCodeGenerator</Generator>
<LastGenOutput>Application.Designer.vb</LastGenOutput>
</None>
<None Include="My Project\Settings.settings">
<Generator>SettingsSingleFileGenerator</Generator>
<CustomToolNamespace>My</CustomToolNamespace>
<LastGenOutput>Settings.Designer.vb</LastGenOutput>
</None>
<None Include="packages.config" />
</ItemGroup>
<Import Project="$(MSBuildToolsPath)\Microsoft.VisualBasic.targets" />
</Project>

View File

@@ -0,0 +1,4 @@
<?xml version="1.0" encoding="utf-8"?>
<packages>
<package id="NLog" version="4.7.0" targetFramework="net461" />
</packages>