This commit is contained in:
Jonathan Jenne 2021-08-12 16:31:10 +02:00
parent 05d194c2a9
commit 96fe8fe492
13 changed files with 196 additions and 126 deletions

View File

@ -101,6 +101,7 @@
<File Id="DevExpress.Utils.v19.2.dll" Name="DevExpress.Utils.v19.2.dll" KeyPath="no" Checksum="yes"/>
<File Id="DevExpress.XtraBars.v19.2.dll" Name="DevExpress.XtraBars.v19.2.dll" KeyPath="no" Checksum="yes"/>
<File Id="DevExpress.XtraEditors.v19.2.dll" Name="DevExpress.XtraEditors.v19.2.dll" KeyPath="no" Checksum="yes"/>
<File Id="DevExpress.XtraLayout.v19.2.dll" Name="DevExpress.XtraLayout.v19.2.dll" KeyPath="no" Checksum="yes"/>
</Component>
<Component Id="DigitalDataLibs" Guid="940298ca-6934-4e7a-a45b-1246b23622a6">

View File

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

View File

@ -46,7 +46,7 @@
mimetype: application/x-microsoft.net.object.binary.base64
value : The object must be serialized with
: System.Serialization.Formatters.Binary.BinaryFormatter
: System.Runtime.Serialization.Formatters.Binary.BinaryFormatter
: and then encoded with base64 encoding.
mimetype: application/x-microsoft.net.object.soap.base64
@ -60,6 +60,7 @@
: and then encoded with base64 encoding.
-->
<xsd:schema id="root" xmlns="" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:msdata="urn:schemas-microsoft-com:xml-msdata">
<xsd:import namespace="http://www.w3.org/XML/1998/namespace" />
<xsd:element name="root" msdata:IsDataSet="true">
<xsd:complexType>
<xsd:choice maxOccurs="unbounded">
@ -68,9 +69,10 @@
<xsd:sequence>
<xsd:element name="value" type="xsd:string" minOccurs="0" />
</xsd:sequence>
<xsd:attribute name="name" type="xsd:string" />
<xsd:attribute name="name" use="required" type="xsd:string" />
<xsd:attribute name="type" type="xsd:string" />
<xsd:attribute name="mimetype" type="xsd:string" />
<xsd:attribute ref="xml:space" />
</xsd:complexType>
</xsd:element>
<xsd:element name="assembly">
@ -85,9 +87,10 @@
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
<xsd:element name="comment" type="xsd:string" minOccurs="0" msdata:Ordinal="2" />
</xsd:sequence>
<xsd:attribute name="name" type="xsd:string" msdata:Ordinal="1" />
<xsd:attribute name="name" type="xsd:string" use="required" msdata:Ordinal="1" />
<xsd:attribute name="type" type="xsd:string" msdata:Ordinal="3" />
<xsd:attribute name="mimetype" type="xsd:string" msdata:Ordinal="4" />
<xsd:attribute ref="xml:space" />
</xsd:complexType>
</xsd:element>
<xsd:element name="resheader">
@ -109,9 +112,13 @@
<value>2.0</value>
</resheader>
<resheader name="reader">
<value>System.Resources.ResXResourceReader, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
<value>System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</resheader>
<resheader name="writer">
<value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
<value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</resheader>
<assembly alias="System.Windows.Forms" name="System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" />
<data name="managedatasource" type="System.Resources.ResXFileRef, System.Windows.Forms">
<value>..\Resources\managedatasource.svg;DevExpress.Utils.Svg.SvgImage, DevExpress.Data.v19.2, Version=19.2.3.0, Culture=neutral, PublicKeyToken=b88d1754d700e49a</value>
</data>
</root>

View File

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

View File

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

View File

@ -55,6 +55,9 @@
<Reference Include="DevExpress.Utils.v19.2, Version=19.2.3.0, Culture=neutral, PublicKeyToken=b88d1754d700e49a" />
<Reference Include="DevExpress.XtraBars.v19.2, Version=19.2.3.0, Culture=neutral, PublicKeyToken=b88d1754d700e49a, processorArchitecture=MSIL" />
<Reference Include="DevExpress.XtraEditors.v19.2, Version=19.2.3.0, Culture=neutral, PublicKeyToken=b88d1754d700e49a" />
<Reference Include="DigitalData.Controls.SQLConfig">
<HintPath>..\..\DDMonorepo\SQLConfig\bin\Debug\DigitalData.Controls.SQLConfig.dll</HintPath>
</Reference>
<Reference Include="DigitalData.Modules.Config">
<HintPath>..\..\DDMonorepo\Modules.Config\bin\Debug\DigitalData.Modules.Config.dll</HintPath>
</Reference>
@ -155,6 +158,8 @@
<None Include="packages.config" />
</ItemGroup>
<ItemGroup>
<None Include="Resources\managedatasource.svg" />
<Content Include="TestArguments.txt" />
<Content Include="widig.ico" />
</ItemGroup>
<ItemGroup>

View File

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

View File

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

View File

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

View File

@ -9,56 +9,42 @@ Public Class frmMain
Private LogConfig As LogConfig
Private Logger As Logger
Private Config As ConfigManager(Of ClassConfig)
Private ConfigManager As ConfigManager(Of ClassConfig)
Private Config As ClassConfig
Private WiDig As ClassWIDig
Private Windream As Windream
Private Sub Form1_Load(sender As Object, e As EventArgs) Handles Me.Load
Try
Me.Hide()
Me.Visible = False
Dim oLogConfig As New LogConfig(LogConfig.PathType.AppData, Nothing, "Form", "Digital Data", "WIDig")
LogConfig = oLogConfig
ConfigManager = New ConfigManager(Of ClassConfig)(LogConfig, ClassWIDig.GetAppDataPath, ClassWIDig.GetProgramDataPath)
Config = ConfigManager.Config
LogConfig.Debug = Config.LOG_DEBUG
Logger = LogConfig.GetLogger
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 WiDig.ParseArgs(oArguments) = True Then
If WiDig.StreamORIndexFile() = True Then
WiDig.ErrorWhileImporting = False
Else
WiDig.ErrorWhileImporting = True
End If
Else
BarStaticinfo.Caption = $"Error in ParseArgs - {Now.ToString}"
BarStaticinfo.ItemAppearance.Normal.BackColor = Color.Red
End If
Else
WiDig.ErrorMessage = "Could not initialize windream"
If Config.ConnectionString = String.Empty Then
ShowSQLConfig()
End If
txtUser.Text = Config.Config.WMUsername
Me.txtPW.Text = oUserPW
txtWMDrive.Text = Config.Config.WMDrive
txtWMRelpath.Text = Config.Config.WMRelPath
txtWMServer.Text = Config.Config.WMUserPW
txtDomain.Text = Config.Config.Domain
'txtCommands.Text = CONFIG.Config.Arguments
txtCommands.Text = My.Settings.TestParams
If WiDig.ErrorWhileParsing = True Then
MsgBox("Error in Parsing or Indexing!", MsgBoxStyle.Critical, Text)
Me.Visible = True
Logger.Debug("Initializing MainForm....")
WiDig = New ClassWIDig(LogConfig, Config)
txtPW.Text = WiDig.GetUserPWPlain()
txtUser.Text = Config.WMUsername
txtWMDrive.Text = Config.WMDrive
txtWMRelpath.Text = Config.WMRelPath
txtWMServer.Text = Config.WMUserPW
txtDomain.Text = Config.Domain
txtCommands.Text = Config.Arguments
If Config.Arguments.Length > 0 Then
RibbonGroupTest.Enabled = True
End If
Catch ex As Exception
MsgBox("Error while initializing: " & vbNewLine & vbNewLine & ex.Message, MsgBoxStyle.Critical, Text)
@ -72,38 +58,34 @@ Public Class frmMain
End Sub
Private Sub Form1_Shown(sender As Object, e As EventArgs) Handles Me.Shown
If WiDig?.ErrorWhileImporting = False Then
Me.Close()
End If
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)
Dim oErrorMessage = WiDig?.ErrorMessage
If WiDig?.ErrorWhileParsing = True Then
MsgBox("A unexpected error occured while parsing arguments:" & vbNewLine & oErrorMessage, MsgBoxStyle.Critical)
End If
If WiDig?.ErrorWhileImporting = True Then
MsgBox("A unexpected error occured while initializing!" & vbNewLine & WiDig?.ErrorMessage, MsgBoxStyle.Critical)
MsgBox("A unexpected error occured while importing file:" & vbNewLine & oErrorMessage, MsgBoxStyle.Critical)
End If
End Sub
Private Sub BarButtonItem1_ItemClick(sender As Object, e As DevExpress.XtraBars.ItemClickEventArgs) Handles BarButtonItem1.ItemClick
Dim wrapper As New EncryptionLegacy("!35452didalog=")
Dim cipherText As String = wrapper.EncryptData(Me.txtPW.Text)
Dim pw As String = cipherText
Config.Config.WMUserPW = pw
Dim oEncryption As New EncryptionLegacy("!35452didalog=")
Dim oEncryptedPassword As String = oEncryption.EncryptData(Me.txtPW.Text)
Config.WMUserPW = oEncryptedPassword
Config.WMUsername = txtUser.Text
Config.WMDrive = txtWMDrive.Text
Config.WMRelPath = txtWMRelpath.Text
Config.WMServer = txtWMServer.Text
Config.Domain = txtDomain.Text
ConfigManager.Save()
Config.Config.WMUsername = txtUser.Text
Config.Config.WMDrive = txtWMDrive.Text
Config.Config.WMRelPath = txtWMRelpath.Text
Config.Config.WMServer = txtWMServer.Text
Config.Config.Domain = txtDomain.Text
Config.Save()
BarStaticinfo.Caption = $"WM-Settings saved - {Now.ToString}"
BarStaticinfo.ItemAppearance.Normal.BackColor = Color.Lime
End Sub
Private Sub BarButtonItem2_ItemClick(sender As Object, e As DevExpress.XtraBars.ItemClickEventArgs) Handles BarButtonItem2.ItemClick
Windream = New Windream(LogConfig, False, txtWMDrive.Text, txtWMRelpath.Text, True, txtWMServer.Text, txtUser.Text, txtPW.Text, txtDomain.Text)
If Not IsNothing(Windream) Then
MsgBox("Windream-Connext successfull!", MsgBoxStyle.Information)
@ -111,23 +93,24 @@ Public Class frmMain
End Sub
Private Sub GroupBox1_Enter(sender As Object, e As EventArgs) Handles GroupBox1.Enter
RibbonPageGroup1.Enabled = True
RibbonGroupWindream.Enabled = True
End Sub
Private Sub GroupBox1_Leave(sender As Object, e As EventArgs) Handles GroupBox1.Leave
RibbonPageGroup1.Enabled = False
RibbonGroupWindream.Enabled = False
End Sub
Private Sub BarButtonItem4_ItemClick(sender As Object, e As DevExpress.XtraBars.ItemClickEventArgs) Handles BarButtonItem4.ItemClick
Process.Start(LogConfig.LogDirectory)
End Sub
Private Sub BarButtonItem5_ItemClick(sender As Object, e As DevExpress.XtraBars.ItemClickEventArgs) Handles BarButtonItem5.ItemClick
My.Settings.TestParams = txtCommands.Text
My.Settings.Save()
'CONFIG.Config.Arguments = txtCommands.Text
'CONFIG.Save()
Private Sub BarButtonItem5_ItemClick(sender As Object, e As DevExpress.XtraBars.ItemClickEventArgs) Handles btnStartTest.ItemClick
Config.Arguments = txtCommands.Text
ConfigManager.Save()
Dim oArgs() As String = txtCommands.Text.Split("|")
Logger.Debug($"[{oArgs.Length}] Arguments will be checked...")
If IsNothing(Windream) Then
Dim oUserPW = WiDig.GetUserPWPlain()
@ -136,6 +119,7 @@ Public Class frmMain
Exit Sub
End If
End If
If WiDig.ParseArgs(oArgs) = False Then
MsgBox("An unexpected error occured while parsing arguments. Check the log!", MsgBoxStyle.Critical)
Process.Start(LogConfig.LogDirectory)
@ -150,16 +134,29 @@ Public Class frmMain
End Sub
Private Sub txtCommands_GotFocus(sender As Object, e As EventArgs) Handles txtCommands.GotFocus
RibbonPageGroup3.Enabled = True
RibbonGroupTest.Enabled = True
End Sub
Private Sub txtCommands_LostFocus(sender As Object, e As EventArgs) Handles txtCommands.LostFocus
RibbonPageGroup3.Enabled = False
RibbonGroupTest.Enabled = False
End Sub
Private Sub GroupBox2_Enter(sender As Object, e As EventArgs) Handles GroupBox2.Enter
RibbonPageGroup3.Enabled = False
RibbonGroupTest.Enabled = False
End Sub
Private Sub BarButtonItem5_ItemClick_1(sender As Object, e As DevExpress.XtraBars.ItemClickEventArgs) Handles BarButtonItem5.ItemClick
ShowSQLConfig()
End Sub
Private Sub ShowSQLConfig()
Dim oForm As New DigitalData.Controls.SQLConfig.frmSQLConfig(LogConfig) With {.FormTitle = "WiDig Test"}
Dim oResult = oForm.ShowDialog()
If oResult = DialogResult.OK Then
Config.ConnectionString = oForm.ConnectionString
ConfigManager.Save()
End If
End Sub
End Class

View File

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

View File

@ -121,7 +121,7 @@ Public Class ClassWIDig
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})"
Dim oSQL = $"SELECT [dbo].[FNDD_GET_WINDREAM_FILE_PATH] ({SourceFile}, 0)"
SourceFile = Database.GetScalarValue(oSQL)
End If
If System.IO.File.Exists(SourceFile) = False Then
@ -272,6 +272,13 @@ Public Class ClassWIDig
If oResult = False Then
Logger.Warn("Indexing failed. Exiting.")
If Windream.RemoveFile(oFilePathToIndex) = True Then
Logger.Debug("File [{0}] removed after error.", oFilePathToIndex)
Else
Logger.Warn("File [{0}] could not be removed!", oFilePathToIndex)
End If
Exit For
End If
Next
@ -344,6 +351,12 @@ Public Class ClassWIDig
Return oResult
Catch ex As Exception
If Windream.RemoveFile(TargetPath) = True Then
Logger.Debug("File [{0}] removed after error.", TargetPath)
Else
Logger.Warn("File [{0}] could not be removed!", TargetPath)
End If
Logger.Warn($"Unexpected Error in StreamORIndexFile: {ex.Message}")
Logger.Error(ex)
Return False

View File

@ -53,6 +53,10 @@
<Reference Include="DigitalData.Modules.Encryption">
<HintPath>..\..\DDMonorepo\Encryption\bin\Debug\DigitalData.Modules.Encryption.dll</HintPath>
</Reference>
<Reference Include="DigitalData.Modules.Language, Version=1.3.2.0, Culture=neutral, processorArchitecture=MSIL">
<SpecificVersion>False</SpecificVersion>
<HintPath>..\..\DDMonorepo\Modules.Language\bin\Release\DigitalData.Modules.Language.dll</HintPath>
</Reference>
<Reference Include="DigitalData.Modules.Logging">
<HintPath>..\..\DDMonorepo\Modules.Logging\bin\Debug\DigitalData.Modules.Logging.dll</HintPath>
</Reference>