Compare commits
4 Commits
7aa3d2fe9f
...
b8250583e1
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
b8250583e1 | ||
|
|
3d55af8502 | ||
|
|
7b57bb6a72 | ||
|
|
5af06e302e |
@ -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>
|
||||
@ -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>
|
||||
@ -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>
|
||||
@ -110,6 +110,7 @@
|
||||
<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"/>
|
||||
</Component>
|
||||
|
||||
<Component Id="MiscLibs" Guid="6a621556-dac9-48e2-b50c-624191d26845">
|
||||
|
||||
@ -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
|
||||
|
||||
@ -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
|
||||
@ -5,391 +5,88 @@ Imports DigitalData.Modules.Config
|
||||
Imports System.IO
|
||||
Imports System.Text.RegularExpressions
|
||||
Imports DigitalData.Modules.Database
|
||||
Imports DigitalData.GUIs.WiDigShared
|
||||
|
||||
Module ModuleMain
|
||||
Private _ArgumentLength As Integer
|
||||
Public _database As MSSQLServer
|
||||
Public oRegExArg As String
|
||||
|
||||
Public oRegex As New Regex("([\s\S]+)\={([\s\S]+)}")
|
||||
|
||||
Public Const CODE_SUCCESS = 0
|
||||
Public Const CODE_ERROR = 1
|
||||
|
||||
Public Const MODE_OVERWRITE = "IMPO"
|
||||
Public Const MODE_VERSION = "IMPV"
|
||||
Public Const MODE_NACHINDEXIERUNG = "NI"
|
||||
|
||||
Public Const PARAM_SOURCE = "-Source@"
|
||||
Public Const PARAM_MODE = "-Mode@"
|
||||
Public Const PARAM_TARGET = "-Target@"
|
||||
Public Const PARAM_WMTO = "-WMOT@"
|
||||
Public Const PARAM_INDEX = "-index@"
|
||||
Public LogConfig As LogConfig
|
||||
Public Logger As Logger
|
||||
Public Config As ConfigManager(Of ClassConfig)
|
||||
|
||||
Public Function Main(CommandLineArguments As String()) As Integer
|
||||
Dim oReturnResult As Integer
|
||||
Dim oWiDig As ClassWIDig
|
||||
|
||||
Try
|
||||
oReturnResult = CODE_SUCCESS
|
||||
' Console.WriteLine("Starting up WIDig...")
|
||||
Dim opath = Environment.GetFolderPath(Environment.SpecialFolder.LocalApplicationData)
|
||||
Dim oLogConfig As New LogConfig(LogConfig.PathType.AppData, Nothing, "Console", "Digital Data", "WIDig")
|
||||
System.Console.WriteLine($"Initializing WIDig...")
|
||||
System.Console.WriteLine($"Logging...")
|
||||
LogConfig = New LogConfig(LogConfig.PathType.AppData, Nothing, "Console", "Digital Data", "WIDig")
|
||||
Logger = LogConfig.GetLogger
|
||||
|
||||
LOGCONFIG = oLogConfig
|
||||
LOGGER = LOGCONFIG.GetLogger
|
||||
InitUserConfig()
|
||||
LOGCONFIG.Debug = CONFIG.Config.LOG_DEBUG
|
||||
LOGGER = LOGCONFIG.GetLogger
|
||||
Dim oUserPW = GetUserPWPlain()
|
||||
System.Console.WriteLine($"Config...")
|
||||
Config = New ConfigManager(Of ClassConfig)(LogConfig, ClassWIDig.GetAppDataPath, ClassWIDig.GetProgramDataPath)
|
||||
LogConfig.Debug = Config.Config.LOG_DEBUG
|
||||
|
||||
System.Console.WriteLine($"Main Class...")
|
||||
oWiDig = New ClassWIDig(LogConfig, Config.Config)
|
||||
|
||||
|
||||
Catch ex As Exception
|
||||
Logger.Warn("Could not initialize WiDig because of an error: [{0}]", ex.Message)
|
||||
Logger.Error(ex)
|
||||
|
||||
Return ClassWIDig.CODE_ERROR
|
||||
End Try
|
||||
|
||||
Try
|
||||
System.Console.WriteLine($"Starting up WIDig...")
|
||||
|
||||
If Connect2Windream(oUserPW) = False Then
|
||||
Dim oUserPW = oWiDig.GetUserPWPlain()
|
||||
If oWiDig.Connect2Windream(oUserPW) = False Then
|
||||
Throw New ApplicationException("Could not initialize windream")
|
||||
End If
|
||||
|
||||
System.Console.WriteLine($"Windream initialized!")
|
||||
|
||||
If InitDatabase() = False Then
|
||||
If oWiDig.InitDatabase() = False Then
|
||||
Throw New ApplicationException("Could not initialize DB")
|
||||
End If
|
||||
|
||||
System.Console.WriteLine($"Database initialized!")
|
||||
|
||||
If Load_DB_DAta() = False Then
|
||||
Throw New ApplicationException("Could not load Regex from Database")
|
||||
End If
|
||||
|
||||
System.Console.WriteLine($"Regex loaded from Database!")
|
||||
|
||||
If ParseArgs(CommandLineArguments) = False Then
|
||||
If oWiDig.ParseArgs(CommandLineArguments) = False Then
|
||||
Throw New ApplicationException("Could not parse command line arguments")
|
||||
End If
|
||||
|
||||
System.Console.WriteLine($"Command line arguments parsed!")
|
||||
|
||||
If StreamORIndexFile() = False Then
|
||||
If oWiDig.StreamORIndexFile() = False Then
|
||||
Throw New ApplicationException("Could not stream or index file")
|
||||
End If
|
||||
|
||||
System.Console.WriteLine($"File indexed or streamed!")
|
||||
|
||||
' Brauchen Sie das überhaupt?
|
||||
If oErrorParse = True Or oErrorImport = True Then
|
||||
Throw New ApplicationException(oErrorMessage)
|
||||
If oWiDig.ErrorWhileParsing = True Or oWiDig.ErrorWhileImporting Then
|
||||
Throw New ApplicationException(oWiDig.ErrorMessage)
|
||||
|
||||
End If
|
||||
|
||||
Return CODE_SUCCESS
|
||||
Return ClassWIDig.CODE_SUCCESS
|
||||
Catch ex As Exception
|
||||
LOGGER.Warn("Could not process file because of an error: {0}", oErrorMessage)
|
||||
LOGGER.Warn("Error at Parse Stage: [{0}]", oErrorParse)
|
||||
LOGGER.Warn("Error at Import Stage: [{0}]", oErrorImport)
|
||||
LOGGER.Error(ex)
|
||||
Logger.Warn("Could not process file because of an error: [{0}]", oWiDig.ErrorMessage)
|
||||
Logger.Warn("Error at Parse Stage: [{0}]", oWiDig.ErrorWhileParsing)
|
||||
Logger.Warn("Error at Import Stage: [{0}]", oWiDig.ErrorWhileimporting)
|
||||
Logger.Error(ex)
|
||||
|
||||
Return CODE_ERROR
|
||||
End Try
|
||||
|
||||
End Function
|
||||
Public Sub InitUserConfig()
|
||||
Dim oProgramDataPath = Path.Combine(Environment.GetFolderPath(Environment.SpecialFolder.CommonApplicationData), "Digital Data", "WIDig")
|
||||
Dim oUserAppDataPath = Path.Combine(Environment.GetFolderPath(Environment.SpecialFolder.ApplicationData), "Digital Data", "WIDig")
|
||||
CONFIG = New ConfigManager(Of ClassConfig)(LOGCONFIG, oUserAppDataPath, oProgramDataPath)
|
||||
End Sub
|
||||
Public Function InitDatabase() As Boolean
|
||||
If CONFIG.Config.ConnectionString.Length = 0 Then
|
||||
Return False
|
||||
End If
|
||||
|
||||
Try
|
||||
_database = New MSSQLServer(LOGCONFIG, CONFIG.Config.ConnectionString)
|
||||
If _database.DBInitialized = True Then
|
||||
Return True
|
||||
Else
|
||||
Return False
|
||||
End If
|
||||
|
||||
Catch ex As Exception
|
||||
LOGGER.Error(ex)
|
||||
Return False
|
||||
Return ClassWIDig.CODE_ERROR
|
||||
End Try
|
||||
End Function
|
||||
Public Function Load_DB_DAta()
|
||||
Try
|
||||
Dim oSql = "SELECT [REGEX] FROM [TBDD_FUNCTION_REGEX] WHERE FUNCTION_NAME = 'WM-INDEXER-INDEX_GROUP'"
|
||||
oRegExArg = _database.GetScalarValue(oSql, 120)
|
||||
If oRegExArg.Length = 0 Then
|
||||
oRegExArg = 0
|
||||
End If
|
||||
Return True
|
||||
Catch ex As Exception
|
||||
LOGGER.Error(ex)
|
||||
Return False
|
||||
End Try
|
||||
End Function
|
||||
Private Function Connect2Windream(oPW As String)
|
||||
Try
|
||||
WINDREAM = New Windream(LOGCONFIG, False, CONFIG.Config.WMDrive, CONFIG.Config.WMRelPath, True, CONFIG.Config.WMServer, CONFIG.Config.WMUsername, oPW, CONFIG.Config.Domain)
|
||||
If Not IsNothing(WINDREAM) Then
|
||||
If WINDREAM.SessionLoggedin = True Then
|
||||
LOGGER.Debug("windream initialisiert")
|
||||
Return True
|
||||
End If
|
||||
End If
|
||||
Return False
|
||||
Catch ex As Exception
|
||||
LOGGER.Warn("CHECKING WMConnectivity: " & ex.Message)
|
||||
Return False
|
||||
End Try
|
||||
End Function
|
||||
Private Function GetUserPWPlain()
|
||||
Try
|
||||
Dim oPassword As String
|
||||
Dim oEncryption As New ClassEncryption("!35452didalog=")
|
||||
If CONFIG.Config.WMUserPW = String.Empty Then
|
||||
oPassword = ""
|
||||
Else
|
||||
oPassword = oEncryption.DecryptData(CONFIG.Config.WMUserPW)
|
||||
End If
|
||||
|
||||
Return oPassword
|
||||
Catch ex As Exception
|
||||
LOGGER.Warn("Error in GetUserPWPlain - the password [" & CONFIG.Config.WMUserPW & "] could not be decrypted", False)
|
||||
Return String.Empty
|
||||
End Try
|
||||
End Function
|
||||
Public Function ParseArgs(pArguments As String(), Optional pTest As Boolean = False)
|
||||
Dim oINDEXInfoStarted As Boolean = False
|
||||
Dim oINDEXInfotemp As String = ""
|
||||
Try
|
||||
If pArguments.Length <= 3 Then
|
||||
_ArgumentLength = pArguments.Length
|
||||
LOGGER.Warn($"Insufficient number of arguments [{pArguments.Length}]!")
|
||||
System.Console.WriteLine($"Insufficient number of arguments - {Now.ToString}")
|
||||
oErrorParse = True
|
||||
Return False
|
||||
End If
|
||||
|
||||
Dim oCount As Integer = 0
|
||||
For Each oArg As String In pArguments
|
||||
LOGGER.Debug($"[{oCount}] {oArg}")
|
||||
oArg = oArg.Replace("""", "")
|
||||
If oArg.StartsWith(PARAM_SOURCE) Then
|
||||
oSourceFile = oArg.Replace(PARAM_SOURCE, "")
|
||||
If IsNumeric(oSourceFile) Then
|
||||
LOGGER.Info($"SourceFile seems to be a DocID [{oSourceFile}]")
|
||||
Dim oSQL = $"SELECT [dbo].[FNDD_GET_WINDREAM_FILE_PATH] ({oSourceFile})"
|
||||
oSourceFile = _database.GetScalarValue(oSQL)
|
||||
End If
|
||||
If System.IO.File.Exists(oSourceFile) = False Then
|
||||
LOGGER.Warn($"Parser@Sourcefile - File [{oSourceFile}] is not existing!")
|
||||
oErrorMessage &= vbNewLine & $"Parser@Sourcefile - File [{oSourceFile}] is not existing!"
|
||||
oErrorParse = True
|
||||
Return False
|
||||
End If
|
||||
|
||||
ElseIf oArg.StartsWith(PARAM_MODE) Then
|
||||
oMode = oArg.Replace(PARAM_MODE, "").ToUpper
|
||||
|
||||
ElseIf oArg.StartsWith(PARAM_TARGET) Then
|
||||
oTargetPath = oArg.Replace(PARAM_TARGET, "")
|
||||
If IsNumeric(oTargetPath) Then
|
||||
LOGGER.Info($"Target seems to be a DocID [{oTargetPath}]")
|
||||
Dim oSQL = $"SELECT [dbo].[FNDD_GET_WINDREAM_FILE_PATH] ({oTargetPath})"
|
||||
oSourceFile = _database.GetScalarValue(oSQL)
|
||||
End If
|
||||
Dim oWMFolder = System.IO.Path.GetDirectoryName(oTargetPath)
|
||||
Dim oWindowsPath = oTargetPath
|
||||
oExtension = Path.GetExtension(oWindowsPath)
|
||||
Dim oNormalizePath = WINDREAM.GetNormalizedPath(oTargetPath)
|
||||
If WINDREAM.TestFileExists(oTargetPath) = False Then
|
||||
LOGGER.Info($"WMFile [{oTargetPath}] not existing!")
|
||||
End If
|
||||
If oMode = MODE_VERSION Then
|
||||
Dim oWMCheckPath = WINDREAM.VersionWMFilename(oTargetPath, System.IO.Path.GetExtension(oTargetPath))
|
||||
If oNormalizePath.ToUpper <> oWMCheckPath.ToString.ToUpper Then
|
||||
LOGGER.Info($"Target [{oNormalizePath}] already existed!! - NewWMFilename [{oWMCheckPath}]")
|
||||
oTargetPath = oWMCheckPath
|
||||
End If
|
||||
End If
|
||||
'Checks and creates the path if necessary
|
||||
WINDREAM.NewFolder(oTargetPath, oExtension)
|
||||
|
||||
ElseIf oArg.StartsWith(PARAM_WMTO) Then
|
||||
oWMObjecttype = oArg.Replace(PARAM_WMTO, "")
|
||||
Dim oexists As Boolean = False
|
||||
Dim myWMOTypes = WINDREAM.ObjectTypes
|
||||
For Each otype As String In myWMOTypes
|
||||
If oWMObjecttype = otype Then
|
||||
oexists = True
|
||||
Exit For
|
||||
End If
|
||||
Next
|
||||
If oexists = False Then
|
||||
LOGGER.Info($"WMObjekttype [{oWMObjecttype}] not existing!!")
|
||||
oErrorMessage &= vbNewLine & $"WMObjekttype [{oWMObjecttype}] not existing!!"
|
||||
Return False
|
||||
oErrorParse = True
|
||||
Else
|
||||
WMIndices = WINDREAM.GetIndiciesByObjecttype(oWMObjecttype)
|
||||
End If
|
||||
ElseIf oArg.StartsWith(PARAM_INDEX) Then
|
||||
oINDEXInfotemp = oArg
|
||||
oINDEXInfoStarted = True
|
||||
oINDEXInfotemp = oINDEXInfotemp.Replace(PARAM_INDEX, "")
|
||||
|
||||
Else
|
||||
If oINDEXInfoStarted Then
|
||||
oINDEXInfotemp &= " " & oArg
|
||||
End If
|
||||
End If
|
||||
oCount += 1
|
||||
Next
|
||||
|
||||
LOGGER.Debug("INDEXInfoTemp: [{0}]", oINDEXInfotemp)
|
||||
|
||||
Dim oIndexparts As List(Of String) = oINDEXInfotemp.
|
||||
Split(New String() {"#~#"}, StringSplitOptions.RemoveEmptyEntries).
|
||||
ToList()
|
||||
|
||||
For Each oIndexPart As String In oIndexparts
|
||||
LOGGER.Debug(oIndexPart)
|
||||
Next
|
||||
|
||||
LOGGER.Info($" [{oIndexparts.Count}] Indices parsed")
|
||||
oIndexArr = oIndexparts
|
||||
Return True
|
||||
Catch ex As Exception
|
||||
LOGGER.Error(ex)
|
||||
LOGGER.Warn("Error in ParseArgs:" & vbNewLine & ex.Message)
|
||||
oErrorMessage &= vbNewLine & "Error in ParseArgs:" & vbNewLine & ex.Message
|
||||
oErrorParse = True
|
||||
System.Console.WriteLine($"Error in ParseArgs - {Now.ToString}")
|
||||
|
||||
Return False
|
||||
End Try
|
||||
End Function
|
||||
Public Function StreamORIndexFile()
|
||||
Try
|
||||
Dim oResult As Boolean = False
|
||||
If oMode = MODE_VERSION Then
|
||||
oResult = WINDREAM.NewFileStream(oSourceFile, oTargetPath)
|
||||
ElseIf oMode = MODE_OVERWRITE Then
|
||||
Dim oDeleted = WINDREAM.RemoveFile(oTargetPath)
|
||||
If oDeleted = True Then
|
||||
oResult = WINDREAM.NewFileStream(oSourceFile, oTargetPath)
|
||||
Else
|
||||
LOGGER.Warn($"Mode ImportOverwrite is active - but WMFile could not be deleted!!")
|
||||
End If
|
||||
ElseIf oMode = MODE_NACHINDEXIERUNG Then
|
||||
oResult = True
|
||||
End If
|
||||
|
||||
If oResult = True Then
|
||||
If oMode <> MODE_NACHINDEXIERUNG Then
|
||||
LOGGER.Info($"File successfully streamed to windream [{oTargetPath}]! Now indexing...")
|
||||
End If
|
||||
|
||||
For Each oIndex As String In oIndexArr
|
||||
Dim oMatch As Match = oRegex.Match(oIndex)
|
||||
|
||||
If oMatch.Success Then
|
||||
|
||||
Dim oIndexName = oMatch.Groups(1)?.Value
|
||||
Dim oIndexValues = oMatch.Groups.Item(2)?.Value
|
||||
Dim oSplitValue = New String() {"~#~"}
|
||||
|
||||
Dim oIndexValueArray = oIndexValues.Split(oSplitValue, StringSplitOptions.RemoveEmptyEntries)
|
||||
Dim oIndexResult = False
|
||||
|
||||
LOGGER.Info("Setting Index [{0}] to [{1}].", oIndexName, oIndexValues)
|
||||
|
||||
If WINDREAM.TestIndexNameIsVectorIndex(oIndexName) Then
|
||||
Dim oCombinedIndexValues = WINDREAM.GetVectorData(oTargetPath, oIndexName, oIndexValueArray, False)
|
||||
oIndexResult = WINDREAM.SetFileIndex(oTargetPath, oIndexName, oCombinedIndexValues.ToList, oWMObjecttype)
|
||||
Else
|
||||
oIndexResult = WINDREAM.SetFileIndex(oTargetPath, oIndexName, oIndexValueArray(0), oWMObjecttype)
|
||||
End If
|
||||
|
||||
oResult = oIndexResult
|
||||
Else
|
||||
oResult = False
|
||||
End If
|
||||
|
||||
If oResult = False Then
|
||||
LOGGER.Warn("Indexing failed. Exiting.")
|
||||
Exit For
|
||||
End If
|
||||
Next
|
||||
End If
|
||||
|
||||
If oResult = True Then
|
||||
LOGGER.Info("## All Tasks finished ##")
|
||||
oErrorImport = False
|
||||
End If
|
||||
|
||||
'If oResult = True Then
|
||||
' If oMode <> MODE_NACHINDEXIERUNG Then
|
||||
' LOGGER.Info($"File successfully streamed to windream [{oTargetPath}]! Now indexing...")
|
||||
' End If
|
||||
|
||||
' For Each oIndex2 As String In oIndexArr
|
||||
' Dim oIndexInfo() = oIndex2.Split("={")
|
||||
' Dim oIndexName = oIndexInfo(0)
|
||||
' Dim oIndexvalue
|
||||
' Dim r As Regex = New Regex(oRegExArg, RegexOptions.IgnoreCase)
|
||||
' ' ' Match the regular expression pattern against a text string.
|
||||
' Dim m As Match = r.Match(oIndex2)
|
||||
' Do While m.Success
|
||||
|
||||
' ' oClearedBodyText = oClearedBodyText.Replace(m.Value, "")
|
||||
' 'Dim g As Group = m.Groups(1)
|
||||
' Dim g1 As Group = m.Groups(2)
|
||||
' Dim g2 As Group = m.Groups(3)
|
||||
|
||||
' If Not IsNothing(g2.Value) Then
|
||||
' oIndexvalue = g2.Value
|
||||
' Console.WriteLine($"Indexvalue: {oIndexvalue}")
|
||||
' End If
|
||||
|
||||
' If Len(oIndexvalue) > 0 Then
|
||||
' If WMIndices.Contains(oIndexName) Then
|
||||
' LOGGER.Info($"Setting Index: oIndexName [{oIndexName}] - oIndexvalue [{oIndexvalue}]")
|
||||
|
||||
' 'DEBUG
|
||||
' oIndexvalue = New List(Of String) From {"Wert 1", "Wert 2", "wert 3"}
|
||||
' 'DEBUG
|
||||
|
||||
' If WINDREAM.SetFileIndex(oTargetPath, oIndexName, oIndexvalue, oWMObjecttype) = False Then
|
||||
' LOGGER.Info($"Index could not be set...")
|
||||
' If WINDREAM.RemoveFile(oTargetPath) = True Then
|
||||
' LOGGER.Info($"File deleted after error!")
|
||||
' End If
|
||||
' oResult = False
|
||||
' Exit For
|
||||
' End If
|
||||
' Else
|
||||
' LOGGER.Warn($"Transmitted index with name [{oIndexName}] is not existing in WM Objecttype!")
|
||||
' If WINDREAM.RemoveFile(oTargetPath) = True Then
|
||||
' LOGGER.Info($"File deleted after error!")
|
||||
' End If
|
||||
' oResult = False
|
||||
' Exit For
|
||||
' End If
|
||||
' End If
|
||||
' m = m.NextMatch()
|
||||
' Loop
|
||||
' Next
|
||||
' If oResult = True Then
|
||||
' LOGGER.Info("## All Tasks finished ##")
|
||||
' oErrorImport = False
|
||||
' End If
|
||||
'End If
|
||||
|
||||
Return oResult
|
||||
Catch ex As Exception
|
||||
LOGGER.Warn($"Unexpected Error in StreamORIndexFile: {ex.Message}")
|
||||
LOGGER.Error(ex)
|
||||
Return False
|
||||
End Try
|
||||
End Function
|
||||
End Module
|
||||
|
||||
@ -1,19 +0,0 @@
|
||||
Imports DigitalData.Modules.Logging
|
||||
Imports DigitalData.Modules.Windream
|
||||
Imports DigitalData.Modules.Config
|
||||
Module ModuleRuntime
|
||||
Public LOGCONFIG As LogConfig
|
||||
Public LOGGER As Logger
|
||||
Public WINDREAM As Windream
|
||||
Public CONFIG As ConfigManager(Of ClassConfig)
|
||||
Public oMode As String = "IMPV"
|
||||
Public oErrorParse As Boolean = False
|
||||
Public oErrorMessage As String
|
||||
Public oErrorImport As Boolean = True
|
||||
Public oSourceFile As String
|
||||
Public oTargetPath As String
|
||||
Public oWMObjecttype As String
|
||||
Public oIndexArr As List(Of String)
|
||||
Public WMIndices As List(Of String)
|
||||
Public oExtension As String
|
||||
End Module
|
||||
@ -31,5 +31,5 @@ Imports System.Runtime.InteropServices
|
||||
' übernehmen, indem Sie "*" eingeben:
|
||||
' <Assembly: AssemblyVersion("1.0.*")>
|
||||
|
||||
<Assembly: AssemblyVersion("1.3.5.0")>
|
||||
<Assembly: AssemblyVersion("1.3.8.0")>
|
||||
<Assembly: AssemblyFileVersion("1.0.0.0")>
|
||||
|
||||
@ -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,8 +95,6 @@
|
||||
<Import Include="System.Threading.Tasks" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<Compile Include="ClassConfig.vb" />
|
||||
<Compile Include="ClassEncryption.vb" />
|
||||
<Compile Include="ModuleMain.vb" />
|
||||
<Compile Include="My Project\AssemblyInfo.vb" />
|
||||
<Compile Include="My Project\Application.Designer.vb">
|
||||
@ -103,7 +111,6 @@
|
||||
<DependentUpon>Settings.settings</DependentUpon>
|
||||
<DesignTimeSharedInput>True</DesignTimeSharedInput>
|
||||
</Compile>
|
||||
<Compile Include="ModuleRuntime.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>
|
||||
@ -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%40NI -Source%40"\\Windream\Objects\ImportWIDIG\Testfile2.pdf" -Target%40"W:\ImportWIDIG\Testfile2.pdf" -WMOT%40"DIGITAL DATA - Entwicklung" -index%40Integer 24={0815}#~#Vektor_Text1={"Wert 1"~#~"Wert 2"}</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>
|
||||
4
WIDigConsoleApp/packages.config
Normal file
4
WIDigConsoleApp/packages.config
Normal file
@ -0,0 +1,4 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<packages>
|
||||
<package id="NLog" version="4.7.0" targetFramework="net461" />
|
||||
</packages>
|
||||
@ -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
|
||||
@ -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
|
||||
@ -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.8.0")>
|
||||
<Assembly: AssemblyFileVersion("1.0.0.0")>
|
||||
|
||||
@ -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
|
||||
@ -58,6 +58,10 @@
|
||||
<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 +72,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 +106,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 +128,6 @@
|
||||
<DependentUpon>Settings.settings</DependentUpon>
|
||||
<DesignTimeSharedInput>True</DesignTimeSharedInput>
|
||||
</Compile>
|
||||
<Compile Include="Runtime.vb" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<EmbeddedResource Include="frmMain.resx">
|
||||
@ -160,5 +157,11 @@
|
||||
<ItemGroup>
|
||||
<Content Include="filedownload.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>
|
||||
@ -1,221 +1,111 @@
|
||||
Imports DigitalData.Modules.Logging
|
||||
Imports DigitalData.Modules.Windream
|
||||
Imports DigitalData.Modules.Config
|
||||
Imports DigitalData.GUIs.WiDigShared
|
||||
Imports DigitalData.Modules.Encryption
|
||||
|
||||
Public Class frmMain
|
||||
Private _ArgumentLength As Integer
|
||||
|
||||
Private LogConfig As LogConfig
|
||||
Private Logger As Logger
|
||||
Private Config As ConfigManager(Of ClassConfig)
|
||||
Private WiDig As ClassWIDig
|
||||
Private Windream As Windream
|
||||
|
||||
Private Sub Form1_Load(sender As Object, e As EventArgs) Handles Me.Load
|
||||
Try
|
||||
Me.Hide()
|
||||
Me.Visible = False
|
||||
Dim oLogConfig As New LogConfig(LogConfig.PathType.AppData, Nothing, "Form", "Digital Data", "WIDig")
|
||||
|
||||
LOGCONFIG = oLogConfig
|
||||
LOGGER = LOGCONFIG.GetLogger
|
||||
InitUserConfig()
|
||||
LOGCONFIG.Debug = CONFIG.Config.LOG_DEBUG
|
||||
LOGGER = LOGCONFIG.GetLogger
|
||||
Dim oUserPW = GetUserPWPlain()
|
||||
LOGGER.Debug("Initializing MainForm....")
|
||||
Me.txtPW.Text = oUserPW
|
||||
LogConfig = oLogConfig
|
||||
Logger = LogConfig.GetLogger
|
||||
|
||||
If Connect2Windream(oUserPW) = True Then
|
||||
Config = New ConfigManager(Of ClassConfig)(LogConfig, ClassWIDig.GetAppDataPath, ClassWIDig.GetAppDataPath)
|
||||
|
||||
LogConfig.Debug = Config.Config.LOG_DEBUG
|
||||
Logger = LogConfig.GetLogger
|
||||
|
||||
Logger.Debug("Initializing MainForm....")
|
||||
WiDig = New ClassWIDig(LogConfig, Config.Config)
|
||||
|
||||
Dim oUserPW = WiDig.GetUserPWPlain()
|
||||
Me.txtPW.Text = oUserPW
|
||||
If WiDig.Connect2Windream(oUserPW) = True Then
|
||||
Dim oArguments As String() = Environment.GetCommandLineArgs()
|
||||
If ParseArgs(oArguments) = True Then
|
||||
If StreamIndexFile() = True Then
|
||||
oErrorImport = False
|
||||
If WiDig.ParseArgs(oArguments) = True Then
|
||||
If WiDig.StreamORIndexFile() = True Then
|
||||
WiDig.ErrorWhileImporting = False
|
||||
Else
|
||||
oErrorImport = True
|
||||
WiDig.ErrorWhileImporting = True
|
||||
End If
|
||||
Else
|
||||
BarStaticinfo.Caption = $"Error in ParseArgs - {Now.ToString}"
|
||||
BarStaticinfo.ItemAppearance.Normal.BackColor = Color.Red
|
||||
End If
|
||||
Else
|
||||
oErrorMessage = "Could not initialize windream"
|
||||
WiDig.ErrorMessage = "Could not initialize windream"
|
||||
End If
|
||||
|
||||
txtUser.Text = CONFIG.Config.WMUsername
|
||||
txtUser.Text = Config.Config.WMUsername
|
||||
Me.txtPW.Text = oUserPW
|
||||
txtWMDrive.Text = CONFIG.Config.WMDrive
|
||||
txtWMRelpath.Text = CONFIG.Config.WMRelPath
|
||||
txtWMServer.Text = CONFIG.Config.WMUserPW
|
||||
txtDomain.Text = CONFIG.Config.Domain
|
||||
txtWMDrive.Text = Config.Config.WMDrive
|
||||
txtWMRelpath.Text = Config.Config.WMRelPath
|
||||
txtWMServer.Text = Config.Config.WMUserPW
|
||||
txtDomain.Text = Config.Config.Domain
|
||||
'txtCommands.Text = CONFIG.Config.Arguments
|
||||
txtCommands.Text = My.Settings.TestParams
|
||||
If oErrorParse = True Then
|
||||
MsgBox("Error in Parsing or Indexing!", MsgBoxStyle.Critical)
|
||||
If WiDig.ErrorWhileParsing = True Then
|
||||
MsgBox("Error in Parsing or Indexing!", MsgBoxStyle.Critical, Text)
|
||||
Me.Visible = True
|
||||
End If
|
||||
Catch ex As Exception
|
||||
LOGGER.Error(ex)
|
||||
MsgBox("Error while initializing: " & vbNewLine & vbNewLine & ex.Message, MsgBoxStyle.Critical, Text)
|
||||
Logger.Error(ex)
|
||||
End Try
|
||||
|
||||
End Sub
|
||||
|
||||
Public Sub InitUserConfig()
|
||||
Dim oProgramDataPath = IO.Path.Combine(Environment.GetFolderPath(Environment.SpecialFolder.CommonApplicationData), "Digital Data", "WIDig")
|
||||
Dim oUserAppDataPath = IO.Path.Combine(Environment.GetFolderPath(Environment.SpecialFolder.ApplicationData), "Digital Data", "WIDig")
|
||||
CONFIG = New ConfigManager(Of ClassConfig)(LOGCONFIG, oUserAppDataPath, oProgramDataPath)
|
||||
|
||||
End Sub
|
||||
Private Function Connect2Windream(oPW As String)
|
||||
Try
|
||||
WINDREAM = New Windream(LOGCONFIG, False, CONFIG.Config.WMDrive, CONFIG.Config.WMRelPath, True, CONFIG.Config.WMServer, CONFIG.Config.WMUsername, oPW, CONFIG.Config.Domain)
|
||||
If Not IsNothing(WINDREAM) Then
|
||||
If WINDREAM.SessionLoggedin = True Then
|
||||
LOGGER.Debug("windream initialisiert")
|
||||
bsiWMConnect.Visibility = DevExpress.XtraBars.BarItemVisibility.Always
|
||||
Return True
|
||||
End If
|
||||
End If
|
||||
Catch ex As Exception
|
||||
LOGGER.Warn("CHECKING WMConnectivity: " & ex.Message)
|
||||
Return False
|
||||
End Try
|
||||
End Function
|
||||
Private Function GetUserPWPlain()
|
||||
Try
|
||||
Dim PWplainText As String
|
||||
Dim wrapper As New ClassEncryption("!35452didalog=")
|
||||
If CONFIG.Config.WMUserPW = String.Empty Then
|
||||
PWplainText = ""
|
||||
Else
|
||||
PWplainText = wrapper.DecryptData(CONFIG.Config.WMUserPW)
|
||||
End If
|
||||
|
||||
Return PWplainText
|
||||
Catch ex As Exception
|
||||
LOGGER.Warn("Error in GetUserPWPlain - the password [" & CONFIG.Config.WMUserPW & "] could not be decrypted", False)
|
||||
Return String.Empty
|
||||
End Try
|
||||
End Function
|
||||
Public Function ParseArgs(pArguments As String(), Optional pTest As Boolean = False)
|
||||
Try
|
||||
If pArguments.Length <= 3 Then
|
||||
_ArgumentLength = pArguments.Length
|
||||
LOGGER.Warn($"Insufficient number of arguments [{pArguments.Length}]!")
|
||||
BarStaticinfo.Caption = $"Insufficient number of arguments - {Now.ToString}"
|
||||
oErrorMessage = BarStaticinfo.Caption
|
||||
BarStaticinfo.ItemAppearance.Normal.BackColor = Color.Red
|
||||
oErrorParse = True
|
||||
Return False
|
||||
End If
|
||||
|
||||
Dim ocount As Integer = 0
|
||||
For Each oArg As String In pArguments
|
||||
LOGGER.Debug($"[{ocount}] {oArg}")
|
||||
oArg = oArg.Replace("""", "")
|
||||
If oArg.StartsWith("-Source@") Then
|
||||
oSourceFile = oArg.Replace("-Source@", "")
|
||||
If System.IO.File.Exists(oSourceFile) = False Then
|
||||
LOGGER.Warn($"Parser@Sourcefile - File [{oSourceFile}] is not existing!")
|
||||
oErrorMessage &= vbNewLine & $"Parser@Sourcefile - File [{oSourceFile}] is not existing!"
|
||||
oErrorParse = True
|
||||
Return False
|
||||
End If
|
||||
ElseIf oArg.StartsWith("-Mode@") Then
|
||||
oMode = oArg.Replace("-Mode@", "").ToUpper
|
||||
|
||||
ElseIf oArg.StartsWith("-Target@") Then
|
||||
oTargetPath = oArg.Replace("-Target@", "")
|
||||
Dim oWMFolder = System.IO.Path.GetDirectoryName(oTargetPath)
|
||||
Dim oWindowsPath = oTargetPath
|
||||
OExtension = IO.Path.GetExtension(oWindowsPath)
|
||||
Dim oNormalizePath = WINDREAM.GetNormalizedPath(oTargetPath)
|
||||
If WINDREAM.TestFileExists(oTargetPath) = False Then
|
||||
LOGGER.Info($"WMFile [{oTargetPath}] not existing!")
|
||||
End If
|
||||
If oMode = "IMPV" Then
|
||||
Dim oWMCheckPath = WINDREAM.VersionWMFilename(oTargetPath, System.IO.Path.GetExtension(oTargetPath))
|
||||
If oNormalizePath.ToUpper <> oWMCheckPath.ToString.ToUpper Then
|
||||
LOGGER.Info($"Target [{oNormalizePath}] already existed!! - NewWMFilename [{oWMCheckPath}]")
|
||||
oTargetPath = oWMCheckPath
|
||||
End If
|
||||
End If
|
||||
|
||||
ElseIf oArg.StartsWith("-WMOT@") Then
|
||||
oWMObjecttype = oArg.Replace("-WMOT@", "")
|
||||
Dim oexists As Boolean = False
|
||||
Dim myWMOTypes = WINDREAM.ObjectTypes
|
||||
For Each otype As String In myWMOTypes
|
||||
If oWMObjecttype = otype Then
|
||||
oexists = True
|
||||
Exit For
|
||||
End If
|
||||
Next
|
||||
If oexists = False Then
|
||||
LOGGER.Info($"WMObjekttype [{oWMObjecttype}] not existing!!")
|
||||
oErrorMessage &= vbNewLine & $"WMObjekttype [{oWMObjecttype}] not existing!!"
|
||||
Return False
|
||||
oErrorParse = True
|
||||
Else
|
||||
WMIndices = WINDREAM.GetIndiciesByObjecttype(oWMObjecttype)
|
||||
End If
|
||||
ElseIf oArg.StartsWith("-index@") Then
|
||||
Dim oINDEXInfotemp = oArg
|
||||
oINDEXInfotemp = oINDEXInfotemp.Replace("-index@{", "")
|
||||
oINDEXInfotemp = oINDEXInfotemp.Replace("}", "")
|
||||
Dim oSplit() = oINDEXInfotemp.ToString.Split(";")
|
||||
LOGGER.Debug($" [{oSplit.Length}] Indices transmitted...")
|
||||
oIndexArr = oSplit
|
||||
|
||||
End If
|
||||
ocount += 1
|
||||
Next
|
||||
Return True
|
||||
Catch ex As Exception
|
||||
LOGGER.Warn("Error in ParseArgs:" & vbNewLine & ex.Message)
|
||||
oErrorMessage &= vbNewLine & "Error in ParseArgs:" & vbNewLine & ex.Message
|
||||
oErrorParse = True
|
||||
BarStaticinfo.Caption = $"Error in ParseArgs - {Now.ToString}"
|
||||
BarStaticinfo.ItemAppearance.Normal.BackColor = Color.Red
|
||||
Return False
|
||||
End Try
|
||||
End Function
|
||||
Private Function WMIndex_exists(pIndex As String)
|
||||
Dim oexist As Boolean = False
|
||||
For Each oWMIndex As String In WMIndices
|
||||
If oWMIndex = pIndex Then
|
||||
Return True
|
||||
End If
|
||||
Next
|
||||
Return oexist
|
||||
End Function
|
||||
Private Sub Form1_Shown(sender As Object, e As EventArgs) Handles Me.Shown
|
||||
If oErrorImport = False Then
|
||||
If WiDig?.ErrorWhileImporting = False Then
|
||||
Me.Close()
|
||||
End If
|
||||
If oErrorParse = True And _ArgumentLength <> 1 Then
|
||||
MsgBox("A unexpected error occured while Parsing arguments!" & vbNewLine & oErrorMessage, MsgBoxStyle.Critical)
|
||||
Process.Start(LOGCONFIG.LogDirectory)
|
||||
If WiDig?.ErrorWhileParsing = True And Environment.GetCommandLineArgs().Length <> 1 Then
|
||||
MsgBox("A unexpected error occured while Parsing arguments!" & vbNewLine & WiDig?.ErrorMessage, MsgBoxStyle.Critical)
|
||||
Process.Start(LogConfig.LogDirectory)
|
||||
|
||||
End If
|
||||
If oErrorImport = True Then
|
||||
MsgBox("A unexpected error occured while initializing!" & vbNewLine & oErrorMessage, MsgBoxStyle.Critical)
|
||||
If WiDig?.ErrorWhileImporting = True Then
|
||||
MsgBox("A unexpected error occured while initializing!" & vbNewLine & WiDig?.ErrorMessage, MsgBoxStyle.Critical)
|
||||
End If
|
||||
End Sub
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
Private Sub BarButtonItem1_ItemClick(sender As Object, e As DevExpress.XtraBars.ItemClickEventArgs) Handles BarButtonItem1.ItemClick
|
||||
Dim wrapper As New ClassEncryption("!35452didalog=")
|
||||
Dim wrapper As New EncryptionLegacy("!35452didalog=")
|
||||
Dim cipherText As String = wrapper.EncryptData(Me.txtPW.Text)
|
||||
Dim pw As String = cipherText
|
||||
CONFIG.Config.WMUserPW = pw
|
||||
Config.Config.WMUserPW = pw
|
||||
|
||||
CONFIG.Config.WMUsername = txtUser.Text
|
||||
CONFIG.Config.WMDrive = txtWMDrive.Text
|
||||
CONFIG.Config.WMRelPath = txtWMRelpath.Text
|
||||
CONFIG.Config.WMServer = txtWMServer.Text
|
||||
CONFIG.Config.Domain = txtDomain.Text
|
||||
CONFIG.Save()
|
||||
Config.Config.WMUsername = txtUser.Text
|
||||
Config.Config.WMDrive = txtWMDrive.Text
|
||||
Config.Config.WMRelPath = txtWMRelpath.Text
|
||||
Config.Config.WMServer = txtWMServer.Text
|
||||
Config.Config.Domain = txtDomain.Text
|
||||
Config.Save()
|
||||
BarStaticinfo.Caption = $"WM-Settings saved - {Now.ToString}"
|
||||
BarStaticinfo.ItemAppearance.Normal.BackColor = Color.Lime
|
||||
End Sub
|
||||
|
||||
Private Sub BarButtonItem2_ItemClick(sender As Object, e As DevExpress.XtraBars.ItemClickEventArgs) Handles BarButtonItem2.ItemClick
|
||||
|
||||
WINDREAM = New Windream(LOGCONFIG, False, txtWMDrive.Text, txtWMRelpath.Text, True, txtWMServer.Text, txtUser.Text, txtPW.Text, txtDomain.Text)
|
||||
If Not IsNothing(WINDREAM) Then
|
||||
Windream = New Windream(LogConfig, False, txtWMDrive.Text, txtWMRelpath.Text, True, txtWMServer.Text, txtUser.Text, txtPW.Text, txtDomain.Text)
|
||||
If Not IsNothing(Windream) Then
|
||||
MsgBox("Windream-Connext successfull!", MsgBoxStyle.Information)
|
||||
End If
|
||||
End Sub
|
||||
@ -228,7 +118,7 @@ Public Class frmMain
|
||||
RibbonPageGroup1.Enabled = False
|
||||
End Sub
|
||||
Private Sub BarButtonItem4_ItemClick(sender As Object, e As DevExpress.XtraBars.ItemClickEventArgs) Handles BarButtonItem4.ItemClick
|
||||
Process.Start(LOGCONFIG.LogDirectory)
|
||||
Process.Start(LogConfig.LogDirectory)
|
||||
End Sub
|
||||
|
||||
Private Sub BarButtonItem5_ItemClick(sender As Object, e As DevExpress.XtraBars.ItemClickEventArgs) Handles BarButtonItem5.ItemClick
|
||||
@ -237,85 +127,30 @@ Public Class frmMain
|
||||
'CONFIG.Config.Arguments = txtCommands.Text
|
||||
'CONFIG.Save()
|
||||
Dim oArgs() As String = txtCommands.Text.Split("|")
|
||||
LOGGER.Debug($"[{oArgs.Length}] Arguments will be checked...")
|
||||
If IsNothing(WINDREAM) Then
|
||||
Dim oUserPW = GetUserPWPlain()
|
||||
Logger.Debug($"[{oArgs.Length}] Arguments will be checked...")
|
||||
If IsNothing(Windream) Then
|
||||
Dim oUserPW = WiDig.GetUserPWPlain()
|
||||
|
||||
If Connect2Windream(oUserPW) = False Then
|
||||
If WiDig.Connect2Windream(oUserPW) = False Then
|
||||
MsgBox("Windream could not be initialized!! Check Your log!", MsgBoxStyle.Critical)
|
||||
Exit Sub
|
||||
End If
|
||||
End If
|
||||
If ParseArgs(oArgs) = False Then
|
||||
If WiDig.ParseArgs(oArgs) = False Then
|
||||
MsgBox("An unexpected error occured while parsing arguments. Check the log!", MsgBoxStyle.Critical)
|
||||
Process.Start(LOGCONFIG.LogDirectory)
|
||||
Process.Start(LogConfig.LogDirectory)
|
||||
Else
|
||||
If StreamIndexFile() = True Then
|
||||
If WiDig.StreamORIndexFile() = True Then
|
||||
MsgBox("Import succeeded!", MsgBoxStyle.Information)
|
||||
Else
|
||||
MsgBox("Unexpected Error while streaming or indexing WMFile! Check the logfile!", MsgBoxStyle.Critical)
|
||||
Process.Start(LOGCONFIG.LogDirectory)
|
||||
Process.Start(LogConfig.LogDirectory)
|
||||
End If
|
||||
End If
|
||||
|
||||
End Sub
|
||||
Public Function StreamIndexFile()
|
||||
Try
|
||||
'Checks and creates the path if necessary
|
||||
WINDREAM.NewFolder(oTargetPath, oExtension)
|
||||
Dim oResult As Boolean = False
|
||||
If oMode = "IMPV" Then
|
||||
oResult = WINDREAM.NewFileStream(oSourceFile, oTargetPath)
|
||||
ElseIf oMode = "IMPO" Then
|
||||
Dim oDeleted = WINDREAM.RemoveFile(oTargetPath)
|
||||
If oDeleted = True Then
|
||||
oResult = WINDREAM.NewFileStream(oSourceFile, oTargetPath)
|
||||
Else
|
||||
LOGGER.Warn($"Mode ImportOverwrite is active - but WMFile could not be deleted!!")
|
||||
End If
|
||||
ElseIf oMode = "NI" Then
|
||||
oResult = True
|
||||
End If
|
||||
|
||||
|
||||
If oResult = True Then
|
||||
LOGGER.Info($"File successfully streamed to windream [{oTargetPath}]! Now indexing...")
|
||||
For Each oIndex2 As String In oIndexArr
|
||||
Dim oIndexInfo() = oIndex2.Split("=")
|
||||
Dim oIndexName = oIndexInfo(0)
|
||||
Dim oIndexvalue = oIndexInfo(1)
|
||||
If WMIndex_exists(oIndexName) = True Then
|
||||
LOGGER.Info($"Setting Index: oIndexName [{oIndexName}] - oIndexvalue [{oIndexvalue}]")
|
||||
If WINDREAM.SetFileIndex(oTargetPath, oIndexName, oIndexvalue, oWMObjecttype) = False Then
|
||||
LOGGER.Info($"Index could not be set...")
|
||||
If WINDREAM.RemoveFile(oTargetPath) = True Then
|
||||
LOGGER.Info($"File deleted after error!")
|
||||
End If
|
||||
oResult = False
|
||||
Exit For
|
||||
End If
|
||||
Else
|
||||
LOGGER.Warn($"Transmitted index with name [{oIndexName}] is not existing in WM Objecttype!")
|
||||
If WINDREAM.RemoveFile(oTargetPath) = True Then
|
||||
LOGGER.Info($"File deleted after error!")
|
||||
End If
|
||||
oResult = False
|
||||
Exit For
|
||||
End If
|
||||
|
||||
Next
|
||||
If oResult = True Then
|
||||
LOGGER.Info("Import finished!")
|
||||
oErrorImport = False
|
||||
End If
|
||||
End If
|
||||
Return oResult
|
||||
Catch ex As Exception
|
||||
LOGGER.Warn($"Error while indexing: {ex.Message}")
|
||||
End Try
|
||||
|
||||
End Function
|
||||
|
||||
Private Sub txtCommands_GotFocus(sender As Object, e As EventArgs) Handles txtCommands.GotFocus
|
||||
RibbonPageGroup3.Enabled = True
|
||||
End Sub
|
||||
@ -324,10 +159,6 @@ Public Class frmMain
|
||||
RibbonPageGroup3.Enabled = False
|
||||
End Sub
|
||||
|
||||
Private Sub RichTextBox1_TextChanged(sender As Object, e As EventArgs)
|
||||
|
||||
End Sub
|
||||
|
||||
Private Sub GroupBox2_Enter(sender As Object, e As EventArgs) Handles GroupBox2.Enter
|
||||
RibbonPageGroup3.Enabled = False
|
||||
End Sub
|
||||
|
||||
@ -7,7 +7,7 @@ Public Class ClassConfig
|
||||
Public Property WMUsername As String = ""
|
||||
Public Property WMUserPW As String = ""
|
||||
Public Property WMDrive As String = "W"
|
||||
Public Property WMRelPath As String = ""
|
||||
Public Property WMRelPath As String = "\\windream\objects"
|
||||
Public Property WMServer As String = ""
|
||||
Public Property Domain As String = ""
|
||||
Public Property LOG_DEBUG As Boolean = False
|
||||
351
WiDigShared/ClassWIDig.vb
Normal file
351
WiDigShared/ClassWIDig.vb
Normal file
@ -0,0 +1,351 @@
|
||||
Imports DigitalData.Modules.Logging
|
||||
Imports DigitalData.Modules.Encryption
|
||||
Imports DigitalData.Modules.Windream
|
||||
Imports DigitalData.Modules.Database
|
||||
Imports System.Text.RegularExpressions
|
||||
|
||||
Public Class ClassWIDig
|
||||
Private LogConfig As LogConfig
|
||||
Private Config As ClassConfig
|
||||
Private Windream As Windream
|
||||
Private Logger As Logger
|
||||
Private Database As MSSQLServer
|
||||
|
||||
Public oRegex As New Regex("([\s\S]+)\={([\s\S]+)}")
|
||||
Public Const CODE_SUCCESS = 0
|
||||
Public Const CODE_ERROR = 1
|
||||
|
||||
Public Const MODE_OVERWRITE = "IMPO"
|
||||
Public Const MODE_VERSION = "IMPV"
|
||||
Public Const MODE_NACHINDEXIERUNG = "NI"
|
||||
|
||||
Public Const PARAM_SOURCE = "-Source@"
|
||||
Public Const PARAM_MODE = "-Mode@"
|
||||
Public Const PARAM_TARGET = "-Target@"
|
||||
Public Const PARAM_WMTO = "-WMOT@"
|
||||
Public Const PARAM_INDEX = "-index@"
|
||||
|
||||
Public Property ErrorMessage As String
|
||||
Public Property ErrorWhileParsing As Boolean
|
||||
Public Property ErrorWhileImporting As Boolean
|
||||
Public Property RunMode As String
|
||||
Public Property SourceFile As Object
|
||||
Public Property TargetPath As Object
|
||||
Public Property WindreamObjectType As String
|
||||
Public Property WindreamIndicies As List(Of String)
|
||||
Public Property IndexArray As List(Of String)
|
||||
|
||||
Public Sub New(pLogConfig As LogConfig, pConfig As ClassConfig)
|
||||
LogConfig = pLogConfig
|
||||
Logger = pLogConfig.GetLogger
|
||||
Config = pConfig
|
||||
End Sub
|
||||
|
||||
Public Shared Function GetProgramDataPath()
|
||||
Return IO.Path.Combine(Environment.GetFolderPath(Environment.SpecialFolder.CommonApplicationData), "Digital Data", "WIDig")
|
||||
End Function
|
||||
|
||||
Public Shared Function GetAppDataPath()
|
||||
Return IO.Path.Combine(Environment.GetFolderPath(Environment.SpecialFolder.ApplicationData), "Digital Data", "WIDig")
|
||||
End Function
|
||||
|
||||
Public Function GetUserPWPlain()
|
||||
Try
|
||||
Dim oPassword As String
|
||||
Dim oEncryption As New EncryptionLegacy("!35452didalog=")
|
||||
If Config.WMUserPW = String.Empty Then
|
||||
oPassword = ""
|
||||
Else
|
||||
oPassword = oEncryption.DecryptData(Config.WMUserPW)
|
||||
End If
|
||||
|
||||
Return oPassword
|
||||
Catch ex As Exception
|
||||
Logger.Warn("Error in GetUserPWPlain - the password [" & Config.WMUserPW & "] could not be decrypted", False)
|
||||
Return String.Empty
|
||||
End Try
|
||||
End Function
|
||||
|
||||
Public Function Connect2Windream(oPW As String)
|
||||
Try
|
||||
Windream = New Windream(LogConfig, False, Config.WMDrive, Config.WMRelPath, True, Config.WMServer, Config.WMUsername, oPW, Config.Domain)
|
||||
If Not IsNothing(Windream) Then
|
||||
If Windream.SessionLoggedin = True Then
|
||||
Logger.Debug("windream initialisiert")
|
||||
Return True
|
||||
End If
|
||||
End If
|
||||
Return False
|
||||
Catch ex As Exception
|
||||
Logger.Warn("CHECKING WMConnectivity: " & ex.Message)
|
||||
Return False
|
||||
End Try
|
||||
End Function
|
||||
|
||||
Public Function InitDatabase() As Boolean
|
||||
If Config.ConnectionString.Length = 0 Then
|
||||
Return False
|
||||
End If
|
||||
|
||||
Try
|
||||
Database = New MSSQLServer(LogConfig, Config.ConnectionString)
|
||||
If Database.DBInitialized = True Then
|
||||
Return True
|
||||
Else
|
||||
Return False
|
||||
End If
|
||||
|
||||
Catch ex As Exception
|
||||
Logger.Error(ex)
|
||||
Return False
|
||||
End Try
|
||||
End Function
|
||||
|
||||
Public Function ParseArgs(pArguments As String(), Optional pTest As Boolean = False)
|
||||
Dim oINDEXInfoStarted As Boolean = False
|
||||
Dim oINDEXInfotemp As String = ""
|
||||
Try
|
||||
If pArguments.Length <= 3 Then
|
||||
Logger.Warn($"Insufficient number of arguments [{pArguments.Length}]!")
|
||||
System.Console.WriteLine($"Insufficient number of arguments - {Now.ToString}")
|
||||
ErrorWhileParsing = True
|
||||
Return False
|
||||
End If
|
||||
|
||||
Dim oCount As Integer = 0
|
||||
For Each oArg As String In pArguments
|
||||
Logger.Debug($"[{oCount}] {oArg}")
|
||||
oArg = oArg.Replace("""", "")
|
||||
If oArg.StartsWith(PARAM_SOURCE) Then
|
||||
SourceFile = oArg.Replace(PARAM_SOURCE, "")
|
||||
If IsNumeric(SourceFile) Then
|
||||
Logger.Info($"SourceFile seems to be a DocID [{SourceFile}]")
|
||||
Dim oSQL = $"SELECT [dbo].[FNDD_GET_WINDREAM_FILE_PATH] ({SourceFile})"
|
||||
SourceFile = Database.GetScalarValue(oSQL)
|
||||
End If
|
||||
If System.IO.File.Exists(SourceFile) = False Then
|
||||
Logger.Warn($"Parser@Sourcefile - File [{SourceFile}] is not existing!")
|
||||
ErrorMessage &= vbNewLine & $"Parser@Sourcefile - File [{SourceFile}] is not existing!"
|
||||
ErrorWhileParsing = True
|
||||
Return False
|
||||
End If
|
||||
|
||||
ElseIf oArg.StartsWith(PARAM_MODE) Then
|
||||
RunMode = oArg.Replace(PARAM_MODE, "").ToUpper
|
||||
|
||||
ElseIf oArg.StartsWith(PARAM_TARGET) Then
|
||||
TargetPath = oArg.Replace(PARAM_TARGET, "")
|
||||
|
||||
Dim oWMFolder = System.IO.Path.GetDirectoryName(TargetPath)
|
||||
Dim oWindowsPath = TargetPath
|
||||
Dim oExtension = IO.Path.GetExtension(oWindowsPath)
|
||||
Dim oNormalizePath = Windream.GetNormalizedPath(TargetPath)
|
||||
|
||||
If Windream.TestFileExists(TargetPath) = False Then
|
||||
Logger.Info($"WMFile [{TargetPath}] not existing!")
|
||||
End If
|
||||
|
||||
If RunMode = MODE_VERSION Then
|
||||
Dim oWMCheckPath = Windream.VersionWMFilename(TargetPath, System.IO.Path.GetExtension(TargetPath))
|
||||
If oNormalizePath.ToUpper <> oWMCheckPath.ToString.ToUpper Then
|
||||
Logger.Info($"Target [{oNormalizePath}] already existed!! - NewWMFilename [{oWMCheckPath}]")
|
||||
TargetPath = oWMCheckPath
|
||||
End If
|
||||
End If
|
||||
|
||||
'Checks and creates the path if necessary
|
||||
Windream.NewFolder(TargetPath, oExtension)
|
||||
|
||||
ElseIf oArg.StartsWith(PARAM_WMTO) Then
|
||||
WindreamObjectType = oArg.Replace(PARAM_WMTO, "")
|
||||
Dim oObjectTypExists As Boolean = False
|
||||
Dim myWMOTypes = Windream.ObjectTypes
|
||||
For Each otype As String In myWMOTypes
|
||||
If WindreamObjectType = otype Then
|
||||
oObjectTypExists = True
|
||||
Exit For
|
||||
End If
|
||||
Next
|
||||
If oObjectTypExists = False Then
|
||||
Logger.Info($"WindreamObjectType [{WindreamObjectType}] not existing!!")
|
||||
ErrorMessage &= vbNewLine & $"WindreamObjectType [{WindreamObjectType}] not existing!!"
|
||||
Return False
|
||||
ErrorWhileParsing = True
|
||||
Else
|
||||
WindreamIndicies = Windream.GetIndiciesByObjecttype(WindreamObjectType)
|
||||
End If
|
||||
|
||||
ElseIf oArg.StartsWith(PARAM_INDEX) Then
|
||||
oINDEXInfotemp = oArg
|
||||
oINDEXInfoStarted = True
|
||||
oINDEXInfotemp = oINDEXInfotemp.Replace(PARAM_INDEX, "")
|
||||
|
||||
Else
|
||||
' All args that do not start with an argument identifier (-EXAMPLE@) are just parts of other arguments
|
||||
' and are put back together just like they used to be before.
|
||||
If oINDEXInfoStarted Then
|
||||
oINDEXInfotemp &= " " & oArg
|
||||
End If
|
||||
End If
|
||||
oCount += 1
|
||||
Next
|
||||
|
||||
Logger.Debug("INDEXInfoTemp: [{0}]", oINDEXInfotemp)
|
||||
|
||||
Dim oIndexparts As List(Of String) = oINDEXInfotemp.
|
||||
Split(New String() {"#~#"}, StringSplitOptions.RemoveEmptyEntries).
|
||||
ToList()
|
||||
|
||||
For Each oIndexPart As String In oIndexparts
|
||||
Logger.Debug(oIndexPart)
|
||||
Next
|
||||
|
||||
Logger.Info($" [{oIndexparts.Count}] Indices parsed")
|
||||
IndexArray = oIndexparts
|
||||
Return True
|
||||
|
||||
Catch ex As Exception
|
||||
Logger.Error(ex)
|
||||
Logger.Warn("Error in ParseArgs:" & vbNewLine & ex.Message)
|
||||
ErrorMessage &= vbNewLine & "Error in ParseArgs:" & vbNewLine & ex.Message
|
||||
ErrorWhileParsing = True
|
||||
System.Console.WriteLine($"Error in ParseArgs - {Now.ToString}")
|
||||
|
||||
Return False
|
||||
End Try
|
||||
End Function
|
||||
|
||||
Public Function StreamORIndexFile()
|
||||
Try
|
||||
Dim oResult As Boolean = False
|
||||
If RunMode = MODE_VERSION Then
|
||||
oResult = Windream.NewFileStream(SourceFile, TargetPath)
|
||||
ElseIf RunMode = MODE_OVERWRITE Then
|
||||
Dim oDeleted = Windream.RemoveFile(TargetPath)
|
||||
If oDeleted = True Then
|
||||
oResult = Windream.NewFileStream(SourceFile, TargetPath)
|
||||
Else
|
||||
Logger.Warn($"Mode ImportOverwrite is active - but WMFile could not be deleted!!")
|
||||
End If
|
||||
ElseIf RunMode = MODE_NACHINDEXIERUNG Then
|
||||
oResult = True
|
||||
End If
|
||||
|
||||
If oResult = True Then
|
||||
Dim oFilePathToIndex As String = TargetPath
|
||||
|
||||
If RunMode = MODE_NACHINDEXIERUNG Then
|
||||
oFilePathToIndex = SourceFile
|
||||
Logger.Info($"Using Sourcefile as FileName: [{SourceFile}]")
|
||||
Else
|
||||
Logger.Info($"File successfully streamed to windream [{TargetPath}]!")
|
||||
End If
|
||||
|
||||
Logger.Info("Indexing file [{0}]", oFilePathToIndex)
|
||||
|
||||
For Each oIndex As String In IndexArray
|
||||
Dim oMatch As Match = oRegex.Match(oIndex)
|
||||
|
||||
If oMatch.Success Then
|
||||
|
||||
Dim oIndexName = oMatch.Groups(1)?.Value
|
||||
Dim oIndexValues = oMatch.Groups.Item(2)?.Value
|
||||
Dim oSplitValue = New String() {"~#~"}
|
||||
|
||||
Dim oIndexValueArray = oIndexValues.Split(oSplitValue, StringSplitOptions.RemoveEmptyEntries)
|
||||
Dim oIndexResult = False
|
||||
|
||||
Logger.Info("Setting Index [{0}] to [{1}].", oIndexName, oIndexValues)
|
||||
|
||||
If Windream.TestIndexNameIsVectorIndex(oIndexName) Then
|
||||
Dim oCombinedIndexValues = Windream.GetVectorData(oFilePathToIndex, oIndexName, oIndexValueArray, False)
|
||||
oIndexResult = Windream.SetFileIndex(oFilePathToIndex, oIndexName, oCombinedIndexValues.ToList, WindreamObjectType)
|
||||
Else
|
||||
oIndexResult = Windream.SetFileIndex(oFilePathToIndex, oIndexName, oIndexValueArray(0), WindreamObjectType)
|
||||
End If
|
||||
|
||||
oResult = oIndexResult
|
||||
Else
|
||||
oResult = False
|
||||
End If
|
||||
|
||||
If oResult = False Then
|
||||
Logger.Warn("Indexing failed. Exiting.")
|
||||
Exit For
|
||||
End If
|
||||
Next
|
||||
End If
|
||||
|
||||
If oResult = True Then
|
||||
Logger.Info("## All Tasks finished ##")
|
||||
ErrorWhileImporting = False
|
||||
End If
|
||||
|
||||
#Region "Old Logic"
|
||||
'If oResult = True Then
|
||||
' If oMode <> MODE_NACHINDEXIERUNG Then
|
||||
' LOGGER.Info($"File successfully streamed to windream [{oTargetPath}]! Now indexing...")
|
||||
' End If
|
||||
|
||||
' For Each oIndex2 As String In oIndexArr
|
||||
' Dim oIndexInfo() = oIndex2.Split("={")
|
||||
' Dim oIndexName = oIndexInfo(0)
|
||||
' Dim oIndexvalue
|
||||
' Dim r As Regex = New Regex(oRegExArg, RegexOptions.IgnoreCase)
|
||||
' ' ' Match the regular expression pattern against a text string.
|
||||
' Dim m As Match = r.Match(oIndex2)
|
||||
' Do While m.Success
|
||||
|
||||
' ' oClearedBodyText = oClearedBodyText.Replace(m.Value, "")
|
||||
' 'Dim g As Group = m.Groups(1)
|
||||
' Dim g1 As Group = m.Groups(2)
|
||||
' Dim g2 As Group = m.Groups(3)
|
||||
|
||||
' If Not IsNothing(g2.Value) Then
|
||||
' oIndexvalue = g2.Value
|
||||
' Console.WriteLine($"Indexvalue: {oIndexvalue}")
|
||||
' End If
|
||||
|
||||
' If Len(oIndexvalue) > 0 Then
|
||||
' If WMIndices.Contains(oIndexName) Then
|
||||
' LOGGER.Info($"Setting Index: oIndexName [{oIndexName}] - oIndexvalue [{oIndexvalue}]")
|
||||
|
||||
' 'DEBUG
|
||||
' oIndexvalue = New List(Of String) From {"Wert 1", "Wert 2", "wert 3"}
|
||||
' 'DEBUG
|
||||
|
||||
' If WINDREAM.SetFileIndex(oTargetPath, oIndexName, oIndexvalue, oWMObjecttype) = False Then
|
||||
' LOGGER.Info($"Index could not be set...")
|
||||
' If WINDREAM.RemoveFile(oTargetPath) = True Then
|
||||
' LOGGER.Info($"File deleted after error!")
|
||||
' End If
|
||||
' oResult = False
|
||||
' Exit For
|
||||
' End If
|
||||
' Else
|
||||
' LOGGER.Warn($"Transmitted index with name [{oIndexName}] is not existing in WM Objecttype!")
|
||||
' If WINDREAM.RemoveFile(oTargetPath) = True Then
|
||||
' LOGGER.Info($"File deleted after error!")
|
||||
' End If
|
||||
' oResult = False
|
||||
' Exit For
|
||||
' End If
|
||||
' End If
|
||||
' m = m.NextMatch()
|
||||
' Loop
|
||||
' Next
|
||||
' If oResult = True Then
|
||||
' LOGGER.Info("## All Tasks finished ##")
|
||||
' oErrorImport = False
|
||||
' End If
|
||||
'End If
|
||||
#End Region
|
||||
|
||||
Return oResult
|
||||
Catch ex As Exception
|
||||
Logger.Warn($"Unexpected Error in StreamORIndexFile: {ex.Message}")
|
||||
Logger.Error(ex)
|
||||
Return False
|
||||
End Try
|
||||
End Function
|
||||
End Class
|
||||
13
WiDigShared/My Project/Application.Designer.vb
generated
Normal file
13
WiDigShared/My Project/Application.Designer.vb
generated
Normal 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
|
||||
|
||||
10
WiDigShared/My Project/Application.myapp
Normal file
10
WiDigShared/My Project/Application.myapp
Normal 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>
|
||||
35
WiDigShared/My Project/AssemblyInfo.vb
Normal file
35
WiDigShared/My Project/AssemblyInfo.vb
Normal 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")>
|
||||
63
WiDigShared/My Project/Resources.Designer.vb
generated
Normal file
63
WiDigShared/My Project/Resources.Designer.vb
generated
Normal 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
|
||||
117
WiDigShared/My Project/Resources.resx
Normal file
117
WiDigShared/My Project/Resources.resx
Normal 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>
|
||||
73
WiDigShared/My Project/Settings.Designer.vb
generated
Normal file
73
WiDigShared/My Project/Settings.Designer.vb
generated
Normal 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
|
||||
7
WiDigShared/My Project/Settings.settings
Normal file
7
WiDigShared/My Project/Settings.settings
Normal 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>
|
||||
131
WiDigShared/WiDigShared.vbproj
Normal file
131
WiDigShared/WiDigShared.vbproj
Normal file
@ -0,0 +1,131 @@
|
||||
<?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.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>
|
||||
4
WiDigShared/packages.config
Normal file
4
WiDigShared/packages.config
Normal file
@ -0,0 +1,4 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<packages>
|
||||
<package id="NLog" version="4.7.0" targetFramework="net461" />
|
||||
</packages>
|
||||
Loading…
x
Reference in New Issue
Block a user