Compare commits

...

2 Commits

Author SHA1 Message Date
Jonathan Jenne
c1b6e2ed4d small tweaks 2021-11-18 15:35:02 +01:00
Jonathan Jenne
0356699473 Add Template Selection, load templates from Database 2021-11-18 14:56:29 +01:00
32 changed files with 932 additions and 295 deletions

View File

@@ -188,6 +188,11 @@
<Compile Include="Reports\OrderReport.vb">
<SubType>Component</SubType>
</Compile>
<Compile Include="Strings\frmMainExtra.Designer.vb">
<AutoGen>True</AutoGen>
<DesignTime>True</DesignTime>
<DependentUpon>frmMainExtra.resx</DependentUpon>
</Compile>
<Compile Include="Strings\frmRowEditorExtra.Designer.vb">
<AutoGen>True</AutoGen>
<DesignTime>True</DesignTime>
@@ -255,6 +260,11 @@
<EmbeddedResource Include="Reports\OrderReport.resx">
<DependentUpon>OrderReport.vb</DependentUpon>
</EmbeddedResource>
<EmbeddedResource Include="Strings\frmMainExtra.resx">
<CustomToolNamespace>My.Resources</CustomToolNamespace>
<Generator>ResXFileCodeGenerator</Generator>
<LastGenOutput>frmMainExtra.Designer.vb</LastGenOutput>
</EmbeddedResource>
<EmbeddedResource Include="Strings\frmRowEditorExtra.resx">
<CustomToolNamespace>My.Resources</CustomToolNamespace>
<Generator>ResXFileCodeGenerator</Generator>
@@ -315,6 +325,13 @@
<ItemGroup>
<Content Include="CREATE_DATABASE.sql" />
<Content Include="MultiTool.ico" />
<None Include="Resources\squarified.svg" />
<None Include="Resources\logical1.svg" />
<None Include="Resources\charthorizontalaxis_logscale.svg" />
<None Include="Resources\open23.svg" />
<None Include="Resources\bo_unknown2.svg" />
<None Include="Resources\actions_reload.svg" />
<None Include="Resources\actions_checkcircled1.svg" />
<None Include="Resources\followupall.svg" />
<None Include="Resources\actions_send2.svg" />
<None Include="Resources\bo_product.svg" />

View File

@@ -32,7 +32,7 @@ Namespace My
<Global.System.Diagnostics.DebuggerStepThroughAttribute()> _
Protected Overrides Sub OnCreateMainForm()
Me.MainForm = Global.MultiTool.Form.frmImportMain
Me.MainForm = Global.MultiTool.Form.frmMain
End Sub
End Class
End Namespace

View File

@@ -1,7 +1,7 @@
<?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>true</MySubMain>
<MainForm>frmImportMain</MainForm>
<MainForm>frmMain</MainForm>
<SingleInstance>false</SingleInstance>
<ShutdownMode>0</ShutdownMode>
<EnableVisualStyles>true</EnableVisualStyles>

View File

@@ -90,6 +90,16 @@ Namespace My.Resources
End Get
End Property
'''<summary>
''' Sucht eine lokalisierte Ressource vom Typ DevExpress.Utils.Svg.SvgImage.
'''</summary>
Friend ReadOnly Property actions_checkcircled1() As DevExpress.Utils.Svg.SvgImage
Get
Dim obj As Object = ResourceManager.GetObject("actions_checkcircled1", resourceCulture)
Return CType(obj,DevExpress.Utils.Svg.SvgImage)
End Get
End Property
'''<summary>
''' Sucht eine lokalisierte Ressource vom Typ DevExpress.Utils.Svg.SvgImage.
'''</summary>
@@ -100,6 +110,16 @@ Namespace My.Resources
End Get
End Property
'''<summary>
''' Sucht eine lokalisierte Ressource vom Typ DevExpress.Utils.Svg.SvgImage.
'''</summary>
Friend ReadOnly Property actions_reload() As DevExpress.Utils.Svg.SvgImage
Get
Dim obj As Object = ResourceManager.GetObject("actions_reload", resourceCulture)
Return CType(obj,DevExpress.Utils.Svg.SvgImage)
End Get
End Property
'''<summary>
''' Sucht eine lokalisierte Ressource vom Typ DevExpress.Utils.Svg.SvgImage.
'''</summary>
@@ -170,6 +190,16 @@ Namespace My.Resources
End Get
End Property
'''<summary>
''' Sucht eine lokalisierte Ressource vom Typ DevExpress.Utils.Svg.SvgImage.
'''</summary>
Friend ReadOnly Property bo_unknown2() As DevExpress.Utils.Svg.SvgImage
Get
Dim obj As Object = ResourceManager.GetObject("bo_unknown2", resourceCulture)
Return CType(obj,DevExpress.Utils.Svg.SvgImage)
End Get
End Property
'''<summary>
''' Sucht eine lokalisierte Ressource vom Typ DevExpress.Utils.Svg.SvgImage.
'''</summary>
@@ -180,6 +210,16 @@ Namespace My.Resources
End Get
End Property
'''<summary>
''' Sucht eine lokalisierte Ressource vom Typ DevExpress.Utils.Svg.SvgImage.
'''</summary>
Friend ReadOnly Property charthorizontalaxis_logscale() As DevExpress.Utils.Svg.SvgImage
Get
Dim obj As Object = ResourceManager.GetObject("charthorizontalaxis_logscale", resourceCulture)
Return CType(obj,DevExpress.Utils.Svg.SvgImage)
End Get
End Property
'''<summary>
''' Sucht eine lokalisierte Ressource vom Typ DevExpress.Utils.Svg.SvgImage.
'''</summary>
@@ -250,6 +290,16 @@ Namespace My.Resources
End Get
End Property
'''<summary>
''' Sucht eine lokalisierte Ressource vom Typ DevExpress.Utils.Svg.SvgImage.
'''</summary>
Friend ReadOnly Property logical1() As DevExpress.Utils.Svg.SvgImage
Get
Dim obj As Object = ResourceManager.GetObject("logical1", resourceCulture)
Return CType(obj,DevExpress.Utils.Svg.SvgImage)
End Get
End Property
'''<summary>
''' Sucht eine lokalisierte Ressource vom Typ DevExpress.Utils.Svg.SvgImage.
'''</summary>
@@ -310,6 +360,16 @@ Namespace My.Resources
End Get
End Property
'''<summary>
''' Sucht eine lokalisierte Ressource vom Typ DevExpress.Utils.Svg.SvgImage.
'''</summary>
Friend ReadOnly Property open23() As DevExpress.Utils.Svg.SvgImage
Get
Dim obj As Object = ResourceManager.GetObject("open23", resourceCulture)
Return CType(obj,DevExpress.Utils.Svg.SvgImage)
End Get
End Property
'''<summary>
''' Sucht eine lokalisierte Ressource vom Typ DevExpress.Utils.Svg.SvgImage.
'''</summary>
@@ -410,6 +470,16 @@ Namespace My.Resources
End Get
End Property
'''<summary>
''' Sucht eine lokalisierte Ressource vom Typ DevExpress.Utils.Svg.SvgImage.
'''</summary>
Friend ReadOnly Property squarified() As DevExpress.Utils.Svg.SvgImage
Get
Dim obj As Object = ResourceManager.GetObject("squarified", resourceCulture)
Return CType(obj,DevExpress.Utils.Svg.SvgImage)
End Get
End Property
'''<summary>
''' Sucht eine lokalisierte Ressource vom Typ DevExpress.Utils.Svg.SvgImage.
'''</summary>

View File

@@ -121,6 +121,12 @@
<data name="logical" type="System.Resources.ResXFileRef, System.Windows.Forms">
<value>..\Resources\logical.svg;DevExpress.Utils.Svg.SvgImage, DevExpress.Data.v19.2, Version=19.2.3.0, Culture=neutral, PublicKeyToken=b88d1754d700e49a</value>
</data>
<data name="bo_country" type="System.Resources.ResXFileRef, System.Windows.Forms">
<value>..\Resources\bo_country.svg;DevExpress.Utils.Svg.SvgImage, DevExpress.Data.v19.2, Version=19.2.3.0, Culture=neutral, PublicKeyToken=b88d1754d700e49a</value>
</data>
<data name="logical1" type="System.Resources.ResXFileRef, System.Windows.Forms">
<value>..\Resources\logical1.svg;DevExpress.Utils.Svg.SvgImage, DevExpress.Data.v19.2, Version=19.2.3.0, Culture=neutral, PublicKeyToken=b88d1754d700e49a</value>
</data>
<data name="redo" type="System.Resources.ResXFileRef, System.Windows.Forms">
<value>..\Resources\redo.svg;DevExpress.Utils.Svg.SvgImage, DevExpress.Data.v19.2, Version=19.2.3.0, Culture=neutral, PublicKeyToken=b88d1754d700e49a</value>
</data>
@@ -154,6 +160,9 @@
<data name="togglefieldcodes" type="System.Resources.ResXFileRef, System.Windows.Forms">
<value>..\Resources\togglefieldcodes.svg;DevExpress.Utils.Svg.SvgImage, DevExpress.Data.v19.2, Version=19.2.3.0, Culture=neutral, PublicKeyToken=b88d1754d700e49a</value>
</data>
<data name="actions_reload" type="System.Resources.ResXFileRef, System.Windows.Forms">
<value>..\Resources\actions_reload.svg;DevExpress.Utils.Svg.SvgImage, DevExpress.Data.v19.2, Version=19.2.3.0, Culture=neutral, PublicKeyToken=b88d1754d700e49a</value>
</data>
<data name="open21" type="System.Resources.ResXFileRef, System.Windows.Forms">
<value>..\Resources\open21.svg;DevExpress.Utils.Svg.SvgImage, DevExpress.Data.v19.2, Version=19.2.3.0, Culture=neutral, PublicKeyToken=b88d1754d700e49a</value>
</data>
@@ -163,15 +172,18 @@
<data name="paymentrefund" type="System.Resources.ResXFileRef, System.Windows.Forms">
<value>..\Resources\paymentrefund.svg;DevExpress.Utils.Svg.SvgImage, DevExpress.Data.v19.2, Version=19.2.3.0, Culture=neutral, PublicKeyToken=b88d1754d700e49a</value>
</data>
<data name="actions_deletecircled" type="System.Resources.ResXFileRef, System.Windows.Forms">
<value>..\Resources\actions_deletecircled.svg;DevExpress.Utils.Svg.SvgImage, DevExpress.Data.v19.2, Version=19.2.3.0, Culture=neutral, PublicKeyToken=b88d1754d700e49a</value>
</data>
<data name="open1" type="System.Resources.ResXFileRef, System.Windows.Forms">
<value>..\Resources\open1.svg;DevExpress.Utils.Svg.SvgImage, DevExpress.Data.v19.2, Version=19.2.3.0, Culture=neutral, PublicKeyToken=b88d1754d700e49a</value>
</data>
<data name="bo_unknown" type="System.Resources.ResXFileRef, System.Windows.Forms">
<value>..\Resources\bo_unknown.svg;DevExpress.Utils.Svg.SvgImage, DevExpress.Data.v19.2, Version=19.2.3.0, Culture=neutral, PublicKeyToken=b88d1754d700e49a</value>
</data>
<data name="charthorizontalaxis_logscale" type="System.Resources.ResXFileRef, System.Windows.Forms">
<value>..\Resources\charthorizontalaxis_logscale.svg;DevExpress.Utils.Svg.SvgImage, DevExpress.Data.v19.2, Version=19.2.3.0, Culture=neutral, PublicKeyToken=b88d1754d700e49a</value>
</data>
<data name="actions_arrow4down" type="System.Resources.ResXFileRef, System.Windows.Forms">
<value>..\Resources\actions_arrow4down.svg;DevExpress.Utils.Svg.SvgImage, DevExpress.Data.v19.2, Version=19.2.3.0, Culture=neutral, PublicKeyToken=b88d1754d700e49a</value>
</data>
<data name="deletetablerows" type="System.Resources.ResXFileRef, System.Windows.Forms">
<value>..\Resources\deletetablerows.svg;DevExpress.Utils.Svg.SvgImage, DevExpress.Data.v19.2, Version=19.2.3.0, Culture=neutral, PublicKeyToken=b88d1754d700e49a</value>
</data>
@@ -199,11 +211,11 @@
<data name="rotatecounterclockwise" type="System.Resources.ResXFileRef, System.Windows.Forms">
<value>..\Resources\rotatecounterclockwise.svg;DevExpress.Utils.Svg.SvgImage, DevExpress.Data.v19.2, Version=19.2.3.0, Culture=neutral, PublicKeyToken=b88d1754d700e49a</value>
</data>
<data name="bo_country" type="System.Resources.ResXFileRef, System.Windows.Forms">
<value>..\Resources\bo_country.svg;DevExpress.Utils.Svg.SvgImage, DevExpress.Data.v19.2, Version=19.2.3.0, Culture=neutral, PublicKeyToken=b88d1754d700e49a</value>
<data name="actions_deletecircled" type="System.Resources.ResXFileRef, System.Windows.Forms">
<value>..\Resources\actions_deletecircled.svg;DevExpress.Utils.Svg.SvgImage, DevExpress.Data.v19.2, Version=19.2.3.0, Culture=neutral, PublicKeyToken=b88d1754d700e49a</value>
</data>
<data name="actions_arrow4down" type="System.Resources.ResXFileRef, System.Windows.Forms">
<value>..\Resources\actions_arrow4down.svg;DevExpress.Utils.Svg.SvgImage, DevExpress.Data.v19.2, Version=19.2.3.0, Culture=neutral, PublicKeyToken=b88d1754d700e49a</value>
<data name="actions_checkcircled1" type="System.Resources.ResXFileRef, System.Windows.Forms">
<value>..\Resources\actions_checkcircled1.svg;DevExpress.Utils.Svg.SvgImage, DevExpress.Data.v19.2, Version=19.2.3.0, Culture=neutral, PublicKeyToken=b88d1754d700e49a</value>
</data>
<data name="open2" type="System.Resources.ResXFileRef, System.Windows.Forms">
<value>..\Resources\open2.svg;DevExpress.Utils.Svg.SvgImage, DevExpress.Data.v19.2, Version=19.2.3.0, Culture=neutral, PublicKeyToken=b88d1754d700e49a</value>
@@ -211,6 +223,12 @@
<data name="actions_send1" type="System.Resources.ResXFileRef, System.Windows.Forms">
<value>..\Resources\actions_send1.svg;DevExpress.Utils.Svg.SvgImage, DevExpress.Data.v19.2, Version=19.2.3.0, Culture=neutral, PublicKeyToken=b88d1754d700e49a</value>
</data>
<data name="followupall" type="System.Resources.ResXFileRef, System.Windows.Forms">
<value>..\Resources\followupall.svg;DevExpress.Utils.Svg.SvgImage, DevExpress.Data.v19.2, Version=19.2.3.0, Culture=neutral, PublicKeyToken=b88d1754d700e49a</value>
</data>
<data name="bo_unknown2" type="System.Resources.ResXFileRef, System.Windows.Forms">
<value>..\Resources\bo_unknown2.svg;DevExpress.Utils.Svg.SvgImage, DevExpress.Data.v19.2, Version=19.2.3.0, Culture=neutral, PublicKeyToken=b88d1754d700e49a</value>
</data>
<data name="actions_send" type="System.Resources.ResXFileRef, System.Windows.Forms">
<value>..\Resources\actions_send.svg;DevExpress.Utils.Svg.SvgImage, DevExpress.Data.v19.2, Version=19.2.3.0, Culture=neutral, PublicKeyToken=b88d1754d700e49a</value>
</data>
@@ -223,6 +241,9 @@
<data name="import" type="System.Resources.ResXFileRef, System.Windows.Forms">
<value>..\Resources\import.svg;DevExpress.Utils.Svg.SvgImage, DevExpress.Data.v19.2, Version=19.2.3.0, Culture=neutral, PublicKeyToken=b88d1754d700e49a</value>
</data>
<data name="open23" type="System.Resources.ResXFileRef, System.Windows.Forms">
<value>..\Resources\open23.svg;DevExpress.Utils.Svg.SvgImage, DevExpress.Data.v19.2, Version=19.2.3.0, Culture=neutral, PublicKeyToken=b88d1754d700e49a</value>
</data>
<data name="pagesetup" type="System.Resources.ResXFileRef, System.Windows.Forms">
<value>..\Resources\pagesetup.svg;DevExpress.Utils.Svg.SvgImage, DevExpress.Data.v19.2, Version=19.2.3.0, Culture=neutral, PublicKeyToken=b88d1754d700e49a</value>
</data>
@@ -235,7 +256,7 @@
<data name="itemtypechecked" type="System.Resources.ResXFileRef, System.Windows.Forms">
<value>..\Resources\itemtypechecked.svg;DevExpress.Utils.Svg.SvgImage, DevExpress.Data.v19.2, Version=19.2.3.0, Culture=neutral, PublicKeyToken=b88d1754d700e49a</value>
</data>
<data name="followupall" type="System.Resources.ResXFileRef, System.Windows.Forms">
<value>..\Resources\followupall.svg;DevExpress.Utils.Svg.SvgImage, DevExpress.Data.v19.2, Version=19.2.3.0, Culture=neutral, PublicKeyToken=b88d1754d700e49a</value>
<data name="squarified" type="System.Resources.ResXFileRef, System.Windows.Forms">
<value>..\Resources\squarified.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,15 @@
<?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="Layer_1" style="enable-background:new 0 0 32 32">
<style type="text/css">
.Blue{fill:#1177D7;}
.Yellow{fill:#FFB115;}
.Black{fill:#727272;}
.Green{fill:#039C23;}
.Red{fill:#D11C1C;}
.st0{opacity:0.75;}
.st1{opacity:0.5;}
</style>
<g id="CheckCircled">
<path d="M16,4C9.4,4,4,9.4,4,16c0,6.6,5.4,12,12,12s12-5.4,12-12C28,9.4,22.6,4,16,4z M14,22l-6-6l2-2l4,4l8-8l2,2 L14,22z" class="Green" />
</g>
</svg>

View File

@@ -0,0 +1,15 @@
<?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="Layer_1" style="enable-background:new 0 0 32 32">
<style type="text/css">
.Blue{fill:#1177D7;}
.Yellow{fill:#FFB115;}
.Black{fill:#727272;}
.Green{fill:#039C23;}
.Red{fill:#D11C1C;}
.st0{opacity:0.75;}
.st1{opacity:0.5;}
</style>
<g id="Reload_1_">
<path d="M16,4c3.3,0,6.3,1.3,8.5,3.5L28,4v10h-0.2h-4.1H18l3.6-3.6C20.2,8.9,18.2,8,16,8c-4.4,0-8,3.6-8,8s3.6,8,8,8 c3.7,0,6.8-2.6,7.7-6h4.1c-1,5.7-5.9,10-11.8,10C9.4,28,4,22.6,4,16C4,9.4,9.4,4,16,4z" class="Green" />
</g>
</svg>

View File

@@ -0,0 +1,12 @@
<?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="Layer_1" style="enable-background:new 0 0 32 32">
<style type="text/css">
.Black{fill:#3D3D3D;}
.st0{opacity:0.5;}
</style>
<g class="st0">
<g>
<path d="M27.8,15.3l4.2-1.7l-1.3-4.3l-4.4,0.8c-0.7-1.2-1.5-2.2-2.5-3.1l1.7-4.2l-3.6-2l-2.6,3.7 c-1.3-0.4-2.6-0.5-4-0.5L13.6,0L9.3,1.3l0.8,4.4C9,6.4,7.9,7.2,7.1,8.2L2.9,6.5l-2,3.6l3.7,2.6c-0.4,1.3-0.5,2.6-0.5,4L0,18.4 l1.3,4.3l4.4-0.8c0.7,1.2,1.5,2.2,2.5,3.1l-1.7,4.2l3.6,2l2.6-3.7c1.3,0.4,2.6,0.5,4,0.5l1.7,4.2l4.3-1.3l-0.8-4.4 c1.2-0.7,2.2-1.5,3.1-2.5l4.2,1.7l2-3.6l-3.7-2.6C27.7,18,27.9,16.7,27.8,15.3z M24.4,16c0,4.7-3.8,8.4-8.4,8.4S7.6,20.7,7.6,16 s3.8-8.4,8.4-8.4S24.4,11.3,24.4,16z" class="Black" />
</g>
</g>
</svg>

View File

@@ -0,0 +1,13 @@
<?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="Horizontal_Axis_Log_Scale" style="enable-background:new 0 0 32 32">
<style type="text/css">
.Black{fill:#727272;}
.Blue{fill:#1177D7;}
.st0{opacity:0.5;}
</style>
<g class="st0">
<rect x="4" y="2" width="2" height="26" rx="0" ry="0" class="Black" />
</g>
<path d="M14.6,10H10V2h1.7v6.5h2.9V10z M18.6,10c-1.1,0-2-0.4-2.7-1.1c-0.7-0.7-1-1.7-1-2.8c0-1.2,0.4-2.2,1.1-3 C16.6,2.4,17.6,2,18.7,2c1.1,0,2,0.4,2.7,1.1s1,1.7,1,2.9c0,1.2-0.4,2.2-1.1,2.9S19.7,10,18.6,10z M18.7,3.5c-0.6,0-1.1,0.2-1.4,0.7 c-0.4,0.5-0.5,1.1-0.5,1.8c0,0.8,0.2,1.4,0.5,1.8c0.4,0.4,0.8,0.7,1.4,0.7c0.6,0,1.1-0.2,1.4-0.7s0.5-1,0.5-1.8 c0-0.8-0.2-1.4-0.5-1.9C19.7,3.7,19.3,3.5,18.7,3.5z M30,9.3c-0.8,0.4-1.7,0.7-2.8,0.7C26,10,25,9.7,24.3,9s-1.1-1.6-1.1-2.8 c0-1.2,0.4-2.2,1.2-3S26.2,2,27.5,2c0.8,0,1.5,0.1,2.2,0.3V4c-0.6-0.3-1.3-0.5-2.2-0.5c-0.7,0-1.3,0.2-1.8,0.7C25.3,4.6,25,5.3,25,6 c0,0.8,0.2,1.4,0.6,1.8s1,0.7,1.6,0.7c0.4,0,0.7-0.1,1-0.2V6.8h-1.5V5.5H30V9.3z" class="Blue" />
<polygon points="4,26 4,28 6,28 6,30 8,30 8,28 10,28 10,30 12,30 12,28 14,28 14,30 16,30 16,28 18,28 18,30 20,30 20,28 22,28 22,30 24,30 24,28 26,28 26,30 28,30 28,28 30,28 30,26 " class="Black" />
</svg>

View File

@@ -0,0 +1,7 @@
<?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="Logical" style="enable-background:new 0 0 32 32">
<style type="text/css">
.Blue{fill:#1177D7;}
</style>
<path d="M5,4h23V3c0-0.6-0.4-1-1-1H5C3.3,2,2,3.3,2,5v22c0,1.7,1.3,3,3,3h22c0.6,0,1-0.4,1-1V6H5C4.4,6,4,5.6,4,5 C4,4.4,4.4,4,5,4z M16,24h-2v-2h2V24z M11.6,14.4c0.2-0.5,0.4-0.9,0.7-1.3c0.3-0.4,0.7-0.6,1.1-0.8c0.4-0.2,0.9-0.3,1.5-0.3 c0.7,0,1.3,0.1,1.8,0.3c0.5,0.2,0.9,0.5,1.2,0.8c0.3,0.3,0.5,0.7,0.6,1c0.1,0.4,0.2,0.7,0.2,1c0,0.4,0,0.7-0.1,1 c-0.1,0.3-0.2,0.5-0.3,0.8c-0.1,0.2-0.3,0.4-0.4,0.6c-0.2,0.2-0.3,0.3-0.5,0.4c-0.2,0.1-0.3,0.3-0.5,0.4c-0.2,0.1-0.3,0.3-0.4,0.4 c-0.1,0.1-0.3,0.3-0.4,0.5c-0.1,0.2-0.2,0.4-0.2,0.6v0.6h-2v-0.7c0-0.4,0.1-0.7,0.1-0.9c0.1-0.3,0.2-0.5,0.3-0.7 c0.1-0.2,0.3-0.4,0.4-0.5c0.1-0.1,0.3-0.3,0.4-0.4s0.3-0.3,0.4-0.4c0.1-0.1,0.2-0.2,0.3-0.4c0.1-0.1,0.2-0.3,0.2-0.5 c0.1-0.2,0.1-0.4,0.1-0.6c0-0.5-0.1-0.9-0.3-1.1c-0.2-0.2-0.5-0.4-0.9-0.4c-0.3,0-0.5,0.1-0.7,0.2c-0.2,0.1-0.4,0.3-0.5,0.5 c-0.1,0.2-0.2,0.4-0.3,0.7c-0.1,0.2-0.1,0.5-0.1,0.8h-2.2C11.4,15.4,11.4,14.9,11.6,14.4z" class="Blue" />
</svg>

View File

@@ -0,0 +1,13 @@
<?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="Open2" style="enable-background:new 0 0 32 32">
<style type="text/css">
.Green{fill:#039C23;}
.Yellow{fill:#FFB115;}
.st0{opacity:0.75;}
</style>
<g class="st0">
<path d="M19.2,10H12V7c0-0.6-0.4-1-1-1H3C2.4,6,2,6.5,2,7v18c0,0.2,0,0.3,0.1,0.4c0,0,0.1-0.1,0.1-0.2l5.5-10 C8,14.5,8.7,14,9.5,14h13.7L19.2,10z" class="Yellow" />
</g>
<path d="M29.3,16H9.6L4,26h19.8c0.5,0,1.1-0.2,1.3-0.6l4.9-8.9C30.1,16.2,29.8,16,29.3,16z" class="Yellow" />
<path d="M28,8c0-3.3-2.7-6-6-6s-6,2.7-6,6c0-2.2,1.8-4,4-4s4,1.8,4,4h-4l6,6l6-6H28z" class="Green" />
</svg>

View File

@@ -0,0 +1,19 @@
<?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="Layer_1" style="enable-background:new 0 0 32 32">
<style type="text/css">
.Green{fill:#039C23;}
.Black{fill:#727272;}
.Red{fill:#D11C1C;}
.Yellow{fill:#FFB115;}
.Blue{fill:#1177D7;}
.White{fill:#FFFFFF;}
.st0{opacity:0.5;}
.st1{opacity:0.75;}
</style>
<g id="Squarified">
<rect x="2" y="2" width="18" height="18" rx="0" ry="0" class="Blue" />
<rect x="22" y="2" width="8" height="18" rx="0" ry="0" class="Green" />
<rect x="2" y="22" width="18" height="8" rx="0" ry="0" class="Red" />
<rect x="22" y="22" width="8" height="8" rx="0" ry="0" class="Yellow" />
</g>
</svg>

View File

@@ -0,0 +1,76 @@
'------------------------------------------------------------------------------
' <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()> _
Friend Class frmMainExtra
Private Shared resourceMan As Global.System.Resources.ResourceManager
Private Shared resourceCulture As Global.System.Globalization.CultureInfo
<Global.System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Performance", "CA1811:AvoidUncalledPrivateCode")> _
Friend Sub New()
MyBase.New
End Sub
'''<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 Shared 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("MultiTool.Form.frmMainExtra", GetType(frmMainExtra).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 Shared Property Culture() As Global.System.Globalization.CultureInfo
Get
Return resourceCulture
End Get
Set
resourceCulture = value
End Set
End Property
'''<summary>
''' Sucht eine lokalisierte Zeichenfolge, die Laden der Vorlage ähnelt.
'''</summary>
Friend Shared ReadOnly Property Laden_der_Vorlage() As String
Get
Return ResourceManager.GetString("Laden der Vorlage", resourceCulture)
End Get
End Property
End Class
End Namespace

View File

@@ -0,0 +1,123 @@
<?xml version="1.0" encoding="utf-8"?>
<root>
<!--
Microsoft ResX Schema
Version 2.0
The primary goals of this format is to allow a simple XML format
that is mostly human readable. The generation and parsing of the
various data types are done through the TypeConverter classes
associated with the data types.
Example:
... ado.net/XML headers & schema ...
<resheader name="resmimetype">text/microsoft-resx</resheader>
<resheader name="version">2.0</resheader>
<resheader name="reader">System.Resources.ResXResourceReader, System.Windows.Forms, ...</resheader>
<resheader name="writer">System.Resources.ResXResourceWriter, System.Windows.Forms, ...</resheader>
<data name="Name1"><value>this is my long string</value><comment>this is a comment</comment></data>
<data name="Color1" type="System.Drawing.Color, System.Drawing">Blue</data>
<data name="Bitmap1" mimetype="application/x-microsoft.net.object.binary.base64">
<value>[base64 mime encoded serialized .NET Framework object]</value>
</data>
<data name="Icon1" type="System.Drawing.Icon, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
<value>[base64 mime encoded string representing a byte array form of the .NET Framework object]</value>
<comment>This is a comment</comment>
</data>
There are any number of "resheader" rows that contain simple
name/value pairs.
Each data row contains a name, and value. The row also contains a
type or mimetype. Type corresponds to a .NET class that support
text/value conversion through the TypeConverter architecture.
Classes that don't support this are serialized and stored with the
mimetype set.
The mimetype is used for serialized objects, and tells the
ResXResourceReader how to depersist the object. This is currently not
extensible. For a given mimetype the value must be set accordingly:
Note - application/x-microsoft.net.object.binary.base64 is the format
that the ResXResourceWriter will generate, however the reader can
read any of the formats listed below.
mimetype: application/x-microsoft.net.object.binary.base64
value : The object must be serialized with
: System.Runtime.Serialization.Formatters.Binary.BinaryFormatter
: and then encoded with base64 encoding.
mimetype: application/x-microsoft.net.object.soap.base64
value : The object must be serialized with
: System.Runtime.Serialization.Formatters.Soap.SoapFormatter
: and then encoded with base64 encoding.
mimetype: application/x-microsoft.net.object.bytearray.base64
value : The object must be serialized into a byte array
: using a System.ComponentModel.TypeConverter
: and then encoded with base64 encoding.
-->
<xsd:schema id="root" xmlns="" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:msdata="urn:schemas-microsoft-com:xml-msdata">
<xsd:import namespace="http://www.w3.org/XML/1998/namespace" />
<xsd:element name="root" msdata:IsDataSet="true">
<xsd:complexType>
<xsd:choice maxOccurs="unbounded">
<xsd:element name="metadata">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="value" type="xsd:string" minOccurs="0" />
</xsd:sequence>
<xsd:attribute name="name" use="required" type="xsd:string" />
<xsd:attribute name="type" type="xsd:string" />
<xsd:attribute name="mimetype" type="xsd:string" />
<xsd:attribute ref="xml:space" />
</xsd:complexType>
</xsd:element>
<xsd:element name="assembly">
<xsd:complexType>
<xsd:attribute name="alias" type="xsd:string" />
<xsd:attribute name="name" type="xsd:string" />
</xsd:complexType>
</xsd:element>
<xsd:element name="data">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
<xsd:element name="comment" type="xsd:string" minOccurs="0" msdata:Ordinal="2" />
</xsd:sequence>
<xsd:attribute name="name" type="xsd:string" use="required" msdata:Ordinal="1" />
<xsd:attribute name="type" type="xsd:string" msdata:Ordinal="3" />
<xsd:attribute name="mimetype" type="xsd:string" msdata:Ordinal="4" />
<xsd:attribute ref="xml:space" />
</xsd:complexType>
</xsd:element>
<xsd:element name="resheader">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
</xsd:sequence>
<xsd:attribute name="name" type="xsd:string" use="required" />
</xsd:complexType>
</xsd:element>
</xsd:choice>
</xsd:complexType>
</xsd:element>
</xsd:schema>
<resheader name="resmimetype">
<value>text/microsoft-resx</value>
</resheader>
<resheader name="version">
<value>2.0</value>
</resheader>
<resheader name="reader">
<value>System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</resheader>
<resheader name="writer">
<value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</resheader>
<data name="Laden der Vorlage" xml:space="preserve">
<value>Laden der Vorlage</value>
</data>
</root>

View File

@@ -64,6 +64,24 @@ Namespace My.Resources
End Set
End Property
'''<summary>
''' Sucht eine lokalisierte Zeichenfolge, die {0} - WebService Multitool für WinLine ähnelt.
'''</summary>
Friend Shared ReadOnly Property _0____WebService_Multitool_für_WinLine() As String
Get
Return ResourceManager.GetString("{0} - WebService Multitool für WinLine", resourceCulture)
End Get
End Property
'''<summary>
''' Sucht eine lokalisierte Zeichenfolge, die Auswahl der Vorlage ähnelt.
'''</summary>
Friend Shared ReadOnly Property Auswahl_der_Vorlage() As String
Get
Return ResourceManager.GetString("Auswahl der Vorlage", resourceCulture)
End Get
End Property
'''<summary>
''' Sucht eine lokalisierte Zeichenfolge, die In der Funktion &apos;{0}&apos; ist folgender Fehler aufgetreten: {1} ähnelt.
'''</summary>
@@ -72,5 +90,14 @@ Namespace My.Resources
Return ResourceManager.GetString("In der Funktion '{0}' ist folgender Fehler aufgetreten: {1}", resourceCulture)
End Get
End Property
'''<summary>
''' Sucht eine lokalisierte Zeichenfolge, die Laden des Formulars ähnelt.
'''</summary>
Friend Shared ReadOnly Property Laden_des_Formulars() As String
Get
Return ResourceManager.GetString("Laden des Formulars", resourceCulture)
End Get
End Property
End Class
End Namespace

View File

@@ -117,7 +117,16 @@
<resheader name="writer">
<value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</resheader>
<data name="Auswahl der Vorlage" xml:space="preserve">
<value>Auswahl der Vorlage</value>
</data>
<data name="In der Funktion '{0}' ist folgender Fehler aufgetreten: {1}" xml:space="preserve">
<value>In der Funktion '{0}' ist folgender Fehler aufgetreten: {1}</value>
</data>
<data name="Laden des Formulars" xml:space="preserve">
<value>Laden des Formulars</value>
</data>
<data name="{0} - WebService Multitool für WinLine" xml:space="preserve">
<value>{0} - WebService Multitool für WinLine</value>
</data>
</root>

View File

@@ -63,8 +63,6 @@ Partial Class frmImportMain
Me.RibbonPageGroup7 = New DevExpress.XtraBars.Ribbon.RibbonPageGroup()
Me.RibbonPage2 = New DevExpress.XtraBars.Ribbon.RibbonPage()
Me.RibbonPageGroup5 = New DevExpress.XtraBars.Ribbon.RibbonPageGroup()
Me.RibbonPageGroup2 = New DevExpress.XtraBars.Ribbon.RibbonPageGroup()
Me.RibbonPageGroup6 = New DevExpress.XtraBars.Ribbon.RibbonPageGroup()
Me.RepositoryItemComboBox1 = New DevExpress.XtraEditors.Repository.RepositoryItemComboBox()
Me.RepositoryItemProgressBar1 = New DevExpress.XtraEditors.Repository.RepositoryItemProgressBar()
Me.RibbonStatusBar = New DevExpress.XtraBars.Ribbon.RibbonStatusBar()
@@ -343,6 +341,7 @@ Partial Class frmImportMain
Me.txtCulture.Id = 26
Me.txtCulture.ImageOptions.SvgImage = Global.MultiTool.Form.My.Resources.Resources.followupall
Me.txtCulture.Name = "txtCulture"
Me.txtCulture.PaintStyle = DevExpress.XtraBars.BarItemPaintStyle.CaptionGlyph
Me.txtCulture.Tag = "Culture: {0}"
'
'btnRemoveRow
@@ -401,7 +400,7 @@ Partial Class frmImportMain
'
'RibbonPage2
'
Me.RibbonPage2.Groups.AddRange(New DevExpress.XtraBars.Ribbon.RibbonPageGroup() {Me.RibbonPageGroup5, Me.RibbonPageGroup2, Me.RibbonPageGroup6})
Me.RibbonPage2.Groups.AddRange(New DevExpress.XtraBars.Ribbon.RibbonPageGroup() {Me.RibbonPageGroup5})
Me.RibbonPage2.Name = "RibbonPage2"
resources.ApplyResources(Me.RibbonPage2, "RibbonPage2")
'
@@ -413,20 +412,6 @@ Partial Class frmImportMain
Me.RibbonPageGroup5.Name = "RibbonPageGroup5"
resources.ApplyResources(Me.RibbonPageGroup5, "RibbonPageGroup5")
'
'RibbonPageGroup2
'
Me.RibbonPageGroup2.Alignment = DevExpress.XtraBars.Ribbon.RibbonPageGroupAlignment.Far
Me.RibbonPageGroup2.ItemLinks.Add(Me.btnOpenLogDirectory)
Me.RibbonPageGroup2.ItemLinks.Add(Me.btnOpenConfigDirectory)
Me.RibbonPageGroup2.Name = "RibbonPageGroup2"
resources.ApplyResources(Me.RibbonPageGroup2, "RibbonPageGroup2")
'
'RibbonPageGroup6
'
Me.RibbonPageGroup6.ItemLinks.Add(Me.btnConfig)
Me.RibbonPageGroup6.Name = "RibbonPageGroup6"
resources.ApplyResources(Me.RibbonPageGroup6, "RibbonPageGroup6")
'
'RepositoryItemComboBox1
'
resources.ApplyResources(Me.RepositoryItemComboBox1, "RepositoryItemComboBox1")
@@ -635,7 +620,6 @@ Partial Class frmImportMain
Friend WithEvents btnTransferFile As DevExpress.XtraBars.BarButtonItem
Friend WithEvents btnOpenInputDirectory As DevExpress.XtraBars.BarButtonItem
Friend WithEvents btnOpenOutputDirectory As DevExpress.XtraBars.BarButtonItem
Friend WithEvents RibbonPageGroup2 As DevExpress.XtraBars.Ribbon.RibbonPageGroup
Friend WithEvents btnOpenSchemaDirectory As DevExpress.XtraBars.BarButtonItem
Friend WithEvents SplitContainerMain As DevExpress.XtraEditors.SplitContainerControl
Friend WithEvents btnReloadFile As DevExpress.XtraBars.BarButtonItem
@@ -664,7 +648,6 @@ Partial Class frmImportMain
Friend WithEvents BehaviorManager As DevExpress.Utils.Behaviors.BehaviorManager
Friend WithEvents txtCurrentFile As DevExpress.XtraBars.BarStaticItem
Friend WithEvents btnConfig As DevExpress.XtraBars.BarButtonItem
Friend WithEvents RibbonPageGroup6 As DevExpress.XtraBars.Ribbon.RibbonPageGroup
Friend WithEvents RepositoryItemProgressBar1 As Repository.RepositoryItemProgressBar
Friend WithEvents SplashScreenManager As DevExpress.XtraSplashScreen.SplashScreenManager
Friend WithEvents txtCulture As DevExpress.XtraBars.BarStaticItem

View File

@@ -303,7 +303,7 @@
</value>
</data>
<data name="$this.Text" xml:space="preserve">
<value>WebService Multitool für WinLine</value>
<value>{0} - WebService Multitool für WinLine</value>
</data>
<data name="&gt;&gt;GridViewFiles.Name" xml:space="preserve">
<value>GridViewFiles</value>
@@ -509,18 +509,6 @@
<data name="&gt;&gt;RibbonPageGroup5.Type" xml:space="preserve">
<value>DevExpress.XtraBars.Ribbon.RibbonPageGroup, DevExpress.XtraBars.v19.2, Version=19.2.3.0, Culture=neutral, PublicKeyToken=b88d1754d700e49a</value>
</data>
<data name="&gt;&gt;RibbonPageGroup2.Name" xml:space="preserve">
<value>RibbonPageGroup2</value>
</data>
<data name="&gt;&gt;RibbonPageGroup2.Type" xml:space="preserve">
<value>DevExpress.XtraBars.Ribbon.RibbonPageGroup, DevExpress.XtraBars.v19.2, Version=19.2.3.0, Culture=neutral, PublicKeyToken=b88d1754d700e49a</value>
</data>
<data name="&gt;&gt;RibbonPageGroup6.Name" xml:space="preserve">
<value>RibbonPageGroup6</value>
</data>
<data name="&gt;&gt;RibbonPageGroup6.Type" xml:space="preserve">
<value>DevExpress.XtraBars.Ribbon.RibbonPageGroup, DevExpress.XtraBars.v19.2, Version=19.2.3.0, Culture=neutral, PublicKeyToken=b88d1754d700e49a</value>
</data>
<data name="&gt;&gt;RepositoryItemComboBox1.Name" xml:space="preserve">
<value>RepositoryItemComboBox1</value>
</data>
@@ -614,12 +602,6 @@
<data name="RibbonPageGroup5.Text" xml:space="preserve">
<value>Verzeichnisse</value>
</data>
<data name="RibbonPageGroup2.Text" xml:space="preserve">
<value>Debugging</value>
</data>
<data name="RibbonPageGroup6.Text" xml:space="preserve">
<value>Konfiguration</value>
</data>
<data name="RibbonPage2.Text" xml:space="preserve">
<value>Erweitert</value>
</data>

View File

@@ -1,11 +1,9 @@
Imports System.ComponentModel
Imports System.IO
Imports System.IO
Imports System.Net.Http
Imports System.Xml
Imports DevExpress.Utils.Behaviors.Common
Imports DevExpress.XtraGrid
Imports DevExpress.XtraGrid.Views.Grid
Imports DigitalData.Controls.SQLConfig
Imports DigitalData.GUIs.Common
Imports DigitalData.Modules.Config
Imports DigitalData.Modules.Database
@@ -18,31 +16,36 @@ Imports MultiTool.Shared.Constants
Imports MultiTool.Shared.Exceptions
Imports DevExpress.XtraReports.UI
Imports MultiTool.Shared.Documents.DocumentRow
Imports DevExpress.XtraGrid.Columns
Public Class frmImportMain
Private LogConfig As LogConfig
Public LogConfig As LogConfig
Public ConfigManager As ConfigManager(Of Config)
Private Logger As Logger
Private ConfigManager As ConfigManager(Of Config)
Private Database As MSSQLServer
Private Winline As WinlineData
Private FileEx As DigitalData.Modules.Filesystem.File
Private WebService As WebService
Private DocumentLoader As DocumentLoader
Private SchemaLoader As SchemaLoader
Private FormHelper As FormHelper
Private Grids As List(Of GridControl)
Private GridLoader As GridLoader
Private GridBuilder As GridBuilder
Private CurrentSchemaName As String = Nothing
Private CurrentSchema As Schema = Nothing
Private ReadOnly CurrentSchema As Schema = Nothing
' Runtime variables
Private CurrentGrid As GridControl = Nothing
Private CurrentDocument As Document = Nothing
Public Sub New()
Public Sub New(pLogConfig As LogConfig, pConfigManager As ConfigManager(Of Config), pSchema As Schema)
InitializeComponent()
LogConfig = pLogConfig
ConfigManager = pConfigManager
CurrentSchema = pSchema
BehaviorManager.Attach(Of PersistenceBehavior)(Me, AddressOf LoadPersistenceSettings)
End Sub
@@ -59,42 +62,18 @@ Public Class frmImportMain
Private Sub frmImportMain_Load(sender As Object, e As EventArgs) Handles MyBase.Load
Try
txtVersion.Caption = String.Format(txtVersion.Caption, Application.ProductVersion)
LogConfig = New LogConfig(LogConfig.PathType.AppData, Nothing, Nothing, Application.CompanyName, Application.ProductName)
Logger = LogConfig.GetLogger()
Logger.Info("Starting {0}, Version [{1}]", Application.ProductName, Application.ProductVersion)
ConfigManager = New ConfigManager(Of Config)(LogConfig,
Application.UserAppDataPath,
Application.CommonAppDataPath,
Application.StartupPath
)
FormHelper = New FormHelper(LogConfig)
GridBuilder = New GridBuilder(GridViewFiles)
GridBuilder.WithDefaults.WithClipboardHandler()
GridViewFiles.OptionsView.ShowAutoFilterRow = False
FileEx = New DigitalData.Modules.Filesystem.File(LogConfig)
' If ConnectionString does not exist, show SQL Config Form
If ConfigManager.Config.ConnectionString = String.Empty Then
Dim oForm As New frmSQLConfig(LogConfig) With {
.FormTitle = Application.ProductName
}
Dim oResult = oForm.ShowDialog()
If oResult = DialogResult.OK Then
ConfigManager.Config.ConnectionString = oForm.ConnectionString
ConfigManager.Save()
End If
End If
' Initialize Database
Dim oConnectionString = MSSQLServer.DecryptConnectionString(ConfigManager.Config.ConnectionString)
Database = New MSSQLServer(LogConfig, oConnectionString)
GridBuilder = New GridBuilder(GridViewFiles)
GridBuilder.WithDefaults.WithReadOnlyOptions.WithClipboardHandler()
GridViewFiles.OptionsView.ShowAutoFilterRow = False
FileEx = New DigitalData.Modules.Filesystem.File(LogConfig)
Winline = New WinlineData(LogConfig, Database, ConfigManager.Config)
WebService = New WebService(LogConfig, ConfigManager.Config, Application.UserAppDataPath)
AddHandler WebService.WebServiceProgress, AddressOf WebService_Progress
@@ -106,6 +85,7 @@ Public Class frmImportMain
txtVersion.Caption = String.Format(My.Resources.frmImportMainExtra.Version__0_, My.Application.Info.Version.ToString)
txtCulture.Caption = String.Format(My.Resources.frmImportMainExtra.Culture___0_, My.Application.UICulture.ToString)
Text = String.Format(My.Resources.frmShared._0____WebService_Multitool_für_WinLine, CurrentSchema.Name)
End Sub
Private Async Sub frmImportMain_Shown(sender As Object, e As EventArgs) Handles MyBase.Shown
@@ -119,13 +99,6 @@ Public Class frmImportMain
Winline.LoadEconomicYears()
Await Winline.LoadMandators()
' TODO: Comment in when we finally use the database for additional configuration
SplashScreenManager.SetWaitFormDescription("Lade Schema Informationen")
If Await Winline.LoadTemplateConfiguration() = False Then
Logger.Warn("Template Configuration was not loaded!")
Winline.TemplateConfiguration = Nothing
End If
For Each oMandator As Mandator In Winline.Mandators
SplashScreenManager.SetWaitFormDescription(String.Format(My.Resources.frmImportMainExtra.Lade__0__Konten, oMandator.Id))
Await Winline.LoadAccounts(oMandator)
@@ -142,18 +115,14 @@ Public Class frmImportMain
lookupMandator.Properties.View.BestFitColumns()
DocumentLoader = New DocumentLoader(LogConfig, Winline)
SchemaLoader = New SchemaLoader(LogConfig)
GridLoader = New GridLoader(LogConfig)
SplashScreenManager.SetWaitFormDescription(My.Resources.frmImportMainExtra.Lade_Vorlagen)
SchemaLoader.LoadFiles(ConfigManager.Config.SchemaDirectory)
CurrentSchemaName = SchemaLoader.SchemaList.First().FullName
CurrentSchema = SchemaLoader.GetSchemaFromFile(CurrentSchemaName)
CurrentSchema = SchemaLoader.UpdateSchemaWithDatabaseConfiguration(CurrentSchema, Winline.TemplateConfiguration)
'SchemaLoader.LoadFiles(ConfigManager.Config.SchemaDirectory)
'CurrentSchemaName = SchemaLoader.SchemaList.First().FullName
'CurrentSchema = SchemaLoader.GetSchemaFromFile(CurrentSchemaName)
'CurrentSchema = SchemaLoader.UpdateSchemaWithDatabaseConfiguration(CurrentSchema, SchemaLoader.TemplateConfiguration)
Grids = CreateGridsAndColumns(CurrentSchema)
@@ -479,15 +448,6 @@ Public Class frmImportMain
End If
End Sub
Private Sub btnOpenLogDirectory_ItemClick(sender As Object, e As DevExpress.XtraBars.ItemClickEventArgs) Handles btnOpenLogDirectory.ItemClick
TryOpenDirectory(LogConfig.LogDirectory, My.Resources.frmImportMainExtra.Logverzeichnis)
End Sub
Private Sub btnOpenConfigDirectory_ItemClick(sender As Object, e As DevExpress.XtraBars.ItemClickEventArgs) Handles btnOpenConfigDirectory.ItemClick
Dim oUserConfigDirectory = New FileInfo(ConfigManager.UserConfigPath).Directory
TryOpenDirectory(oUserConfigDirectory.FullName, My.Resources.frmImportMainExtra.Konfigurationsverzeichnis)
End Sub
Private Sub btnShowXml_ItemClick(sender As Object, e As DevExpress.XtraBars.ItemClickEventArgs) Handles btnShowXml.ItemClick
Dim oForm As New frmXmlEditor With {.FileName = CurrentDocument.FullName}
oForm.Show()
@@ -499,14 +459,6 @@ Public Class frmImportMain
End If
End Sub
Private Sub btnConfig_ItemClick(sender As Object, e As DevExpress.XtraBars.ItemClickEventArgs) Handles btnConfig.ItemClick
Dim oForm As New frmConfig(LogConfig) With {
.ConfigManager = ConfigManager
}
oForm.ShowDialog()
End Sub
Private Sub btnRemoveRow_ItemClick(sender As Object, e As DevExpress.XtraBars.ItemClickEventArgs) Handles btnRemoveRow.ItemClick
If CurrentGrid Is Nothing Then
Exit Sub

View File

@@ -1,6 +1,6 @@
<Global.Microsoft.VisualBasic.CompilerServices.DesignerGenerated()> _
Partial Class frmMain
Inherits DevExpress.XtraEditors.XtraForm
Inherits DevExpress.XtraBars.Ribbon.RibbonForm
'Form overrides dispose to clean up the component list.
<System.Diagnostics.DebuggerNonUserCode()> _
@@ -19,75 +19,211 @@ Partial Class frmMain
'Do not modify it using the code editor.
<System.Diagnostics.DebuggerStepThrough()> _
Private Sub InitializeComponent()
Me.LabelControl1 = New DevExpress.XtraEditors.LabelControl()
Me.LabelControl2 = New DevExpress.XtraEditors.LabelControl()
Me.ListBoxControl1 = New DevExpress.XtraEditors.ListBoxControl()
Me.ListBoxControl2 = New DevExpress.XtraEditors.ListBoxControl()
Me.SimpleButton1 = New DevExpress.XtraEditors.SimpleButton()
CType(Me.ListBoxControl1, System.ComponentModel.ISupportInitialize).BeginInit()
CType(Me.ListBoxControl2, System.ComponentModel.ISupportInitialize).BeginInit()
Me.components = New System.ComponentModel.Container()
Me.RibbonControl1 = New DevExpress.XtraBars.Ribbon.RibbonControl()
Me.btnOpenImportExportForm = New DevExpress.XtraBars.BarButtonItem()
Me.BarButtonItem1 = New DevExpress.XtraBars.BarButtonItem()
Me.BarButtonItem4 = New DevExpress.XtraBars.BarButtonItem()
Me.BarButtonItem2 = New DevExpress.XtraBars.BarButtonItem()
Me.BarButtonItem3 = New DevExpress.XtraBars.BarButtonItem()
Me.RibbonPage1 = New DevExpress.XtraBars.Ribbon.RibbonPage()
Me.RibbonPageGroup1 = New DevExpress.XtraBars.Ribbon.RibbonPageGroup()
Me.RibbonPageGroup3 = New DevExpress.XtraBars.Ribbon.RibbonPageGroup()
Me.RibbonPage3 = New DevExpress.XtraBars.Ribbon.RibbonPage()
Me.RibbonPageGroup2 = New DevExpress.XtraBars.Ribbon.RibbonPageGroup()
Me.RibbonStatusBar1 = New DevExpress.XtraBars.Ribbon.RibbonStatusBar()
Me.RibbonPage2 = New DevExpress.XtraBars.Ribbon.RibbonPage()
Me.SvgImageCollection1 = New DevExpress.Utils.SvgImageCollection(Me.components)
Me.GridControl1 = New DevExpress.XtraGrid.GridControl()
Me.GridViewTemplates = New DevExpress.XtraGrid.Views.Grid.GridView()
Me.colName = New DevExpress.XtraGrid.Columns.GridColumn()
Me.colDescription = New DevExpress.XtraGrid.Columns.GridColumn()
Me.colFileName = New DevExpress.XtraGrid.Columns.GridColumn()
CType(Me.RibbonControl1, System.ComponentModel.ISupportInitialize).BeginInit()
CType(Me.SvgImageCollection1, System.ComponentModel.ISupportInitialize).BeginInit()
CType(Me.GridControl1, System.ComponentModel.ISupportInitialize).BeginInit()
CType(Me.GridViewTemplates, System.ComponentModel.ISupportInitialize).BeginInit()
Me.SuspendLayout()
'
'LabelControl1
'RibbonControl1
'
Me.LabelControl1.Location = New System.Drawing.Point(41, 43)
Me.LabelControl1.Name = "LabelControl1"
Me.LabelControl1.Size = New System.Drawing.Size(32, 13)
Me.LabelControl1.TabIndex = 0
Me.LabelControl1.Text = "Import"
Me.RibbonControl1.CommandLayout = DevExpress.XtraBars.Ribbon.CommandLayout.Simplified
Me.RibbonControl1.ExpandCollapseItem.Id = 0
Me.RibbonControl1.Items.AddRange(New DevExpress.XtraBars.BarItem() {Me.RibbonControl1.ExpandCollapseItem, Me.RibbonControl1.SearchEditItem, Me.btnOpenImportExportForm, Me.BarButtonItem1, Me.BarButtonItem4, Me.BarButtonItem2, Me.BarButtonItem3})
Me.RibbonControl1.Location = New System.Drawing.Point(0, 0)
Me.RibbonControl1.MaxItemId = 8
Me.RibbonControl1.Name = "RibbonControl1"
Me.RibbonControl1.Pages.AddRange(New DevExpress.XtraBars.Ribbon.RibbonPage() {Me.RibbonPage1, Me.RibbonPage3})
Me.RibbonControl1.ShowApplicationButton = DevExpress.Utils.DefaultBoolean.[False]
Me.RibbonControl1.ShowToolbarCustomizeItem = False
Me.RibbonControl1.Size = New System.Drawing.Size(757, 89)
Me.RibbonControl1.StatusBar = Me.RibbonStatusBar1
Me.RibbonControl1.Toolbar.ShowCustomizeItem = False
'
'LabelControl2
'btnOpenImportExportForm
'
Me.LabelControl2.Location = New System.Drawing.Point(41, 239)
Me.LabelControl2.Name = "LabelControl2"
Me.LabelControl2.Size = New System.Drawing.Size(32, 13)
Me.LabelControl2.TabIndex = 1
Me.LabelControl2.Text = "Export"
Me.btnOpenImportExportForm.Caption = "Vorlage öffnen"
Me.btnOpenImportExportForm.Id = 1
Me.btnOpenImportExportForm.ImageOptions.SvgImage = Global.MultiTool.Form.My.Resources.Resources.actions_checkcircled1
Me.btnOpenImportExportForm.Name = "btnOpenImportExportForm"
'
'ListBoxControl1
'BarButtonItem1
'
Me.ListBoxControl1.Location = New System.Drawing.Point(41, 62)
Me.ListBoxControl1.Name = "ListBoxControl1"
Me.ListBoxControl1.Size = New System.Drawing.Size(600, 126)
Me.ListBoxControl1.TabIndex = 2
Me.BarButtonItem1.Caption = "Vorlagen laden"
Me.BarButtonItem1.Id = 2
Me.BarButtonItem1.ImageOptions.SvgImage = Global.MultiTool.Form.My.Resources.Resources.actions_reload
Me.BarButtonItem1.Name = "BarButtonItem1"
'
'ListBoxControl2
'BarButtonItem4
'
Me.ListBoxControl2.Location = New System.Drawing.Point(41, 258)
Me.ListBoxControl2.Name = "ListBoxControl2"
Me.ListBoxControl2.Size = New System.Drawing.Size(600, 126)
Me.ListBoxControl2.TabIndex = 2
Me.BarButtonItem4.Caption = "Konfiguration öffnen"
Me.BarButtonItem4.Id = 5
Me.BarButtonItem4.ImageOptions.SvgImage = Global.MultiTool.Form.My.Resources.Resources.bo_unknown2
Me.BarButtonItem4.Name = "BarButtonItem4"
'
'SimpleButton1
'BarButtonItem2
'
Me.SimpleButton1.Location = New System.Drawing.Point(608, 481)
Me.SimpleButton1.Name = "SimpleButton1"
Me.SimpleButton1.Size = New System.Drawing.Size(137, 44)
Me.SimpleButton1.TabIndex = 3
Me.SimpleButton1.Text = "SimpleButton1"
Me.BarButtonItem2.Caption = "Konfigurationsverzeichnis öffnen"
Me.BarButtonItem2.Id = 6
Me.BarButtonItem2.ImageOptions.SvgImage = Global.MultiTool.Form.My.Resources.Resources.open23
Me.BarButtonItem2.Name = "BarButtonItem2"
'
'BarButtonItem3
'
Me.BarButtonItem3.Caption = "Logverzeichnis öffnen"
Me.BarButtonItem3.Id = 7
Me.BarButtonItem3.ImageOptions.SvgImage = Global.MultiTool.Form.My.Resources.Resources.logical1
Me.BarButtonItem3.Name = "BarButtonItem3"
'
'RibbonPage1
'
Me.RibbonPage1.Groups.AddRange(New DevExpress.XtraBars.Ribbon.RibbonPageGroup() {Me.RibbonPageGroup1, Me.RibbonPageGroup3})
Me.RibbonPage1.Name = "RibbonPage1"
Me.RibbonPage1.Text = "Start"
'
'RibbonPageGroup1
'
Me.RibbonPageGroup1.ItemLinks.Add(Me.BarButtonItem1)
Me.RibbonPageGroup1.Name = "RibbonPageGroup1"
Me.RibbonPageGroup1.Text = "Start"
'
'RibbonPageGroup3
'
Me.RibbonPageGroup3.Alignment = DevExpress.XtraBars.Ribbon.RibbonPageGroupAlignment.Far
Me.RibbonPageGroup3.ItemLinks.Add(Me.btnOpenImportExportForm)
Me.RibbonPageGroup3.Name = "RibbonPageGroup3"
Me.RibbonPageGroup3.Text = "RibbonPageGroup3"
'
'RibbonPage3
'
Me.RibbonPage3.Groups.AddRange(New DevExpress.XtraBars.Ribbon.RibbonPageGroup() {Me.RibbonPageGroup2})
Me.RibbonPage3.Name = "RibbonPage3"
Me.RibbonPage3.Text = "Erweitert"
'
'RibbonPageGroup2
'
Me.RibbonPageGroup2.ItemLinks.Add(Me.BarButtonItem4)
Me.RibbonPageGroup2.ItemLinks.Add(Me.BarButtonItem2)
Me.RibbonPageGroup2.ItemLinks.Add(Me.BarButtonItem3)
Me.RibbonPageGroup2.Name = "RibbonPageGroup2"
Me.RibbonPageGroup2.Text = "RibbonPageGroup2"
'
'RibbonStatusBar1
'
Me.RibbonStatusBar1.Location = New System.Drawing.Point(0, 513)
Me.RibbonStatusBar1.Name = "RibbonStatusBar1"
Me.RibbonStatusBar1.Ribbon = Me.RibbonControl1
Me.RibbonStatusBar1.Size = New System.Drawing.Size(757, 24)
'
'RibbonPage2
'
Me.RibbonPage2.Name = "RibbonPage2"
Me.RibbonPage2.Text = "RibbonPage2"
'
'SvgImageCollection1
'
Me.SvgImageCollection1.Add("import", "image://svgimages/scheduling/import.svg")
Me.SvgImageCollection1.Add("export", "image://svgimages/export/export.svg")
'
'GridControl1
'
Me.GridControl1.Dock = System.Windows.Forms.DockStyle.Fill
Me.GridControl1.Location = New System.Drawing.Point(0, 89)
Me.GridControl1.MainView = Me.GridViewTemplates
Me.GridControl1.MenuManager = Me.RibbonControl1
Me.GridControl1.Name = "GridControl1"
Me.GridControl1.Size = New System.Drawing.Size(757, 424)
Me.GridControl1.TabIndex = 9
Me.GridControl1.ViewCollection.AddRange(New DevExpress.XtraGrid.Views.Base.BaseView() {Me.GridViewTemplates})
'
'GridViewTemplates
'
Me.GridViewTemplates.Columns.AddRange(New DevExpress.XtraGrid.Columns.GridColumn() {Me.colName, Me.colDescription, Me.colFileName})
Me.GridViewTemplates.GridControl = Me.GridControl1
Me.GridViewTemplates.Name = "GridViewTemplates"
'
'colName
'
Me.colName.Caption = "Name"
Me.colName.FieldName = "Name"
Me.colName.Name = "colName"
Me.colName.Visible = True
Me.colName.VisibleIndex = 0
'
'colDescription
'
Me.colDescription.Caption = "Beschreibung"
Me.colDescription.FieldName = "Description"
Me.colDescription.Name = "colDescription"
Me.colDescription.Visible = True
Me.colDescription.VisibleIndex = 1
'
'colFileName
'
Me.colFileName.Caption = "Dateiname"
Me.colFileName.FieldName = "FileName"
Me.colFileName.Name = "colFileName"
Me.colFileName.Visible = True
Me.colFileName.VisibleIndex = 2
'
'frmMain
'
Me.AutoScaleDimensions = New System.Drawing.SizeF(6.0!, 13.0!)
Me.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font
Me.ClientSize = New System.Drawing.Size(757, 537)
Me.Controls.Add(Me.SimpleButton1)
Me.Controls.Add(Me.ListBoxControl2)
Me.Controls.Add(Me.ListBoxControl1)
Me.Controls.Add(Me.LabelControl2)
Me.Controls.Add(Me.LabelControl1)
Me.Controls.Add(Me.GridControl1)
Me.Controls.Add(Me.RibbonStatusBar1)
Me.Controls.Add(Me.RibbonControl1)
Me.IconOptions.SvgImage = Global.MultiTool.Form.My.Resources.Resources.squarified
Me.Name = "frmMain"
Me.Ribbon = Me.RibbonControl1
Me.StatusBar = Me.RibbonStatusBar1
Me.Text = "frmMain"
CType(Me.ListBoxControl1, System.ComponentModel.ISupportInitialize).EndInit()
CType(Me.ListBoxControl2, System.ComponentModel.ISupportInitialize).EndInit()
CType(Me.RibbonControl1, System.ComponentModel.ISupportInitialize).EndInit()
CType(Me.SvgImageCollection1, System.ComponentModel.ISupportInitialize).EndInit()
CType(Me.GridControl1, System.ComponentModel.ISupportInitialize).EndInit()
CType(Me.GridViewTemplates, System.ComponentModel.ISupportInitialize).EndInit()
Me.ResumeLayout(False)
Me.PerformLayout()
End Sub
Friend WithEvents LabelControl1 As DevExpress.XtraEditors.LabelControl
Friend WithEvents LabelControl2 As DevExpress.XtraEditors.LabelControl
Friend WithEvents ListBoxControl1 As DevExpress.XtraEditors.ListBoxControl
Friend WithEvents ListBoxControl2 As DevExpress.XtraEditors.ListBoxControl
Friend WithEvents SimpleButton1 As DevExpress.XtraEditors.SimpleButton
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 RibbonStatusBar1 As DevExpress.XtraBars.Ribbon.RibbonStatusBar
Friend WithEvents RibbonPage2 As DevExpress.XtraBars.Ribbon.RibbonPage
Friend WithEvents btnOpenImportExportForm As DevExpress.XtraBars.BarButtonItem
Friend WithEvents SvgImageCollection1 As DevExpress.Utils.SvgImageCollection
Friend WithEvents GridControl1 As DevExpress.XtraGrid.GridControl
Friend WithEvents GridViewTemplates As DevExpress.XtraGrid.Views.Grid.GridView
Friend WithEvents colName As DevExpress.XtraGrid.Columns.GridColumn
Friend WithEvents colDescription As DevExpress.XtraGrid.Columns.GridColumn
Friend WithEvents colFileName As DevExpress.XtraGrid.Columns.GridColumn
Friend WithEvents RibbonPage3 As DevExpress.XtraBars.Ribbon.RibbonPage
Friend WithEvents RibbonPageGroup2 As DevExpress.XtraBars.Ribbon.RibbonPageGroup
Friend WithEvents BarButtonItem1 As DevExpress.XtraBars.BarButtonItem
Friend WithEvents BarButtonItem4 As DevExpress.XtraBars.BarButtonItem
Friend WithEvents BarButtonItem2 As DevExpress.XtraBars.BarButtonItem
Friend WithEvents BarButtonItem3 As DevExpress.XtraBars.BarButtonItem
Friend WithEvents RibbonPageGroup3 As DevExpress.XtraBars.Ribbon.RibbonPageGroup
End Class

View File

@@ -117,4 +117,7 @@
<resheader name="writer">
<value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</resheader>
<metadata name="SvgImageCollection1.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
<value>17, 17</value>
</metadata>
</root>

View File

@@ -1,3 +1,126 @@
Public Class frmMain
Imports System.ComponentModel
Imports System.IO
Imports DigitalData.Controls.SQLConfig
Imports DigitalData.GUIs.Common
Imports DigitalData.Modules.Config
Imports DigitalData.Modules.Database
Imports DigitalData.Modules.Logging
Imports MultiTool.Shared.Schemas
Public Class frmMain
Private LogConfig As LogConfig
Private Logger As Logger
Private ConfigManager As ConfigManager(Of [Shared].Config)
Private Database As MSSQLServer
Private SchemaLoader As SchemaLoader
Private GridBuilder As GridBuilder
Private FormHelper As FormHelper
Private Async Sub frmMain_Load(sender As Object, e As EventArgs) Handles MyBase.Load
Try
Text = String.Format(My.Resources.frmShared._0____WebService_Multitool_für_WinLine, My.Resources.frmShared.Auswahl_der_Vorlage)
LogConfig = New LogConfig(LogConfig.PathType.AppData, Nothing, Nothing, Application.CompanyName, Application.ProductName)
Logger = LogConfig.GetLogger()
Logger.Info("Starting {0}, Version [{1}]", Application.ProductName, Application.ProductVersion)
FormHelper = New FormHelper(LogConfig)
ConfigManager = New ConfigManager(Of [Shared].Config)(LogConfig,
Application.UserAppDataPath,
Application.CommonAppDataPath,
Application.StartupPath
)
GridBuilder = New GridBuilder(GridViewTemplates)
GridBuilder.WithDefaults.WithReadOnlyOptions.WithClipboardHandler()
GridViewTemplates.OptionsView.ShowAutoFilterRow = False
' If ConnectionString does not exist, show SQL Config Form
If ConfigManager.Config.ConnectionString = String.Empty Then
Dim oForm As New frmSQLConfig(LogConfig) With {
.FormTitle = Application.ProductName
}
Dim oResult = oForm.ShowDialog()
If oResult = DialogResult.OK Then
ConfigManager.Config.ConnectionString = oForm.ConnectionString
ConfigManager.Save()
End If
End If
' Initialize Database
Dim oConnectionString = MSSQLServer.DecryptConnectionString(ConfigManager.Config.ConnectionString)
Database = New MSSQLServer(LogConfig, oConnectionString)
' Initialize Schemas
SchemaLoader = New SchemaLoader(LogConfig, Database)
Await SchemaLoader.LoadTemplates()
Await SchemaLoader.LoadTemplateConfiguration()
Dim oBindingSource = New BindingList(Of Schema)
For Each oSchema As Schema In SchemaLoader.SchemaList
oBindingSource.Add(oSchema)
Next
GridControl1.DataSource = oBindingSource
Catch ex As Exception
FormHelper.ShowError(ex, My.Resources.frmShared.Laden_des_Formulars)
End Try
End Sub
Private Sub btnOpenImportExportForm_ItemClick(sender As Object, e As DevExpress.XtraBars.ItemClickEventArgs) Handles btnOpenImportExportForm.ItemClick
Try
Dim oSchema = GridViewTemplates.GetRow(GridViewTemplates.FocusedRowHandle)
If oSchema Is Nothing Then
MsgBox("Keine Vorlage ausgewählt! Bitte wählen Sie eine Vorlage aus!", MsgBoxStyle.Exclamation, Text)
Exit Sub
End If
oSchema = SchemaLoader.UpdateSchemaFromFile(oSchema, ConfigManager.Config.SchemaDirectory)
oSchema = SchemaLoader.UpdateSchemaFromDatabase(oSchema, SchemaLoader.TemplateConfiguration)
Dim oForm As New frmImportMain(LogConfig, ConfigManager, oSchema)
oForm.ShowDialog()
Catch ex As Exception
FormHelper.ShowError(ex, My.Resources.frmMainExtra.Laden_der_Vorlage)
End Try
End Sub
Private Sub TryOpenDirectory(pPath As String, pDisplayName As String)
If Directory.Exists(pPath) Then
Process.Start(pPath)
Else
Dim oMessage = String.Format(My.Resources.frmImportMainExtra._0__nicht_konfiguriert_oder_nicht_gefunden, pDisplayName)
MsgBox(oMessage, MsgBoxStyle.Exclamation, Text)
End If
End Sub
Private Sub TryOpenFile(pPath As String, pDisplayName As String)
If File.Exists(pPath) Then
Process.Start(pPath)
Else
Dim oMessage = String.Format(My.Resources.frmImportMainExtra._0__nicht_konfiguriert_oder_nicht_gefunden, pDisplayName)
MsgBox(oMessage, MsgBoxStyle.Exclamation, Text)
End If
End Sub
Private Sub BarButtonItem4_ItemClick(sender As Object, e As DevExpress.XtraBars.ItemClickEventArgs) Handles BarButtonItem4.ItemClick
Dim oForm As New frmConfig(LogConfig) With {
.ConfigManager = ConfigManager
}
oForm.ShowDialog()
End Sub
Private Sub BarButtonItem2_ItemClick(sender As Object, e As DevExpress.XtraBars.ItemClickEventArgs) Handles BarButtonItem2.ItemClick
Dim oUserConfigDirectory = New FileInfo(ConfigManager.UserConfigPath).Directory
TryOpenDirectory(oUserConfigDirectory.FullName, My.Resources.frmImportMainExtra.Konfigurationsverzeichnis)
End Sub
Private Sub BarButtonItem3_ItemClick(sender As Object, e As DevExpress.XtraBars.ItemClickEventArgs) Handles BarButtonItem3.ItemClick
TryOpenDirectory(LogConfig.LogDirectory, My.Resources.frmImportMainExtra.Logverzeichnis)
End Sub
End Class

View File

@@ -12,7 +12,6 @@ Imports DevExpress.XtraEditors.Controls
Imports DevExpress.XtraGrid.Views.Grid
Public Class frmRowEditor
Private ReadOnly LogConfig As LogConfig
Private ReadOnly Logger As Logger
Private ReadOnly FormHelper As FormHelper
@@ -44,7 +43,6 @@ Public Class frmRowEditor
Public Sub New(pLogConfig As LogConfig, pColumns As List(Of String), pDocumentRow As DocumentRow, pMandator As Mandator, pWinline As WinlineData, pTable As Schema.Table)
InitializeComponent()
LogConfig = pLogConfig
Logger = pLogConfig.GetLogger()
FormHelper = New FormHelper(pLogConfig)
@@ -95,41 +93,46 @@ Public Class frmRowEditor
End Sub
Private Sub frmRowEditor_Load(sender As Object, e As EventArgs) Handles Me.Load
Dim oDict = New Dictionary(Of String, FieldValue)
Try
Dim oDict = New Dictionary(Of String, FieldValue)
For Each oColumnName As String In _Columns
Dim oField = _DocumentRow.Fields.
Where(Function(f) f.Key = oColumnName).
SingleOrDefault()
For Each oColumnName As String In _Columns
Dim oField = _DocumentRow.Fields.
Where(Function(f) f.Key = oColumnName).
SingleOrDefault()
Dim oColumn = _Table.Columns.
Where(Function(c) c.Name = oColumnName).
SingleOrDefault()
Dim oColumn = _Table.Columns.
Where(Function(c) c.Name = oColumnName).
SingleOrDefault()
' Only Show Columns that are set to visible
If oColumn?.Config?.IsVisible = False Then
Continue For
End If
' Only Show Columns that are set to visible
If oColumn?.Config?.IsVisible = False Then
Continue For
End If
If oField.Value Is Nothing Then
oDict.Add(oColumnName, New FieldValue())
Else
oDict.Add(oColumnName, oField.Value)
End If
If oField.Value Is Nothing Then
oDict.Add(oColumnName, New FieldValue())
Else
oDict.Add(oColumnName, oField.Value)
End If
Next
Next
_DataTable.Columns.Clear()
_DataTable.Columns.Add(COL_KEY)
_DataTable.Columns.Add(COL_VALUE_ORIGINAL)
_DataTable.Columns.Add(COL_VALUE_EXTERNAL)
_DataTable.Columns.Add(COL_VALUE_FINAL)
_DataTable.Columns.Clear()
_DataTable.Columns.Add(COL_KEY)
_DataTable.Columns.Add(COL_VALUE_ORIGINAL)
_DataTable.Columns.Add(COL_VALUE_EXTERNAL)
_DataTable.Columns.Add(COL_VALUE_FINAL)
For Each oKV In oDict
_DataTable.Rows.Add(oKV.Key, oKV.Value.Original, oKV.Value.External, oKV.Value.Final)
Next
For Each oKV In oDict
_DataTable.Rows.Add(oKV.Key, oKV.Value.Original, oKV.Value.External, oKV.Value.Final)
Next
GridControl1.DataSource = _DataTable
GridControl1.DataSource = _DataTable
Catch ex As Exception
FormHelper.ShowError(ex, My.Resources.frmShared.Laden_des_Formulars)
End Try
End Sub
Private Sub btnSave_ItemClick(sender As Object, e As DevExpress.XtraBars.ItemClickEventArgs) Handles btnSave.ItemClick

View File

@@ -375,15 +375,6 @@ Namespace Documents
End If
End Sub
Private Function TryGetDictionaryItem(Of T)(pDictionary As IDictionary(Of String, T), pKey As String) As T
If pDictionary.ContainsKey(pKey) Then
Return pDictionary.Item(pKey)
Else
Return Nothing
End If
End Function
Private Function WrapFileInfo(pFileInfo As FileInfo) As Document
Return New Document With {.File = pFileInfo}
End Function

View File

@@ -0,0 +1,19 @@
Imports DigitalData.Modules.Language
Public Class Helpers
Public Shared Function GetRowItem(Of T)(pRow As DataRow, pFieldName As String, Optional pDefaultValue As T = Nothing) As T
Try
Return Utils.NotNull(pRow.Item(pFieldName), pDefaultValue)
Catch ex As Exception
Return Nothing
End Try
End Function
Private Function TryGetDictionaryItem(Of T)(pDictionary As IDictionary(Of String, T), pKey As String) As T
If pDictionary.ContainsKey(pKey) Then
Return pDictionary.Item(pKey)
Else
Return Nothing
End If
End Function
End Class

View File

@@ -104,6 +104,7 @@
<Compile Include="Documents\DocumentType.vb" />
<Compile Include="Documents\DocumentLoader.vb" />
<Compile Include="Exceptions.vb" />
<Compile Include="Helpers.vb" />
<Compile Include="IDictionaryEx.vb" />
<Compile Include="IEnumerableEx.vb" />
<Compile Include="Mapper.vb" />
@@ -134,14 +135,14 @@
<Compile Include="Schemas\Schema.vb" />
<Compile Include="Schemas\SchemaLoader.vb" />
<Compile Include="Serializer.vb" />
<Compile Include="Winline\Configuration.vb" />
<Compile Include="Schemas\Configuration.vb" />
<Compile Include="Winline\Entities\Account.vb" />
<Compile Include="Winline\WinlineData.vb" />
<Compile Include="Winline\Entities\Article.vb" />
<Compile Include="Winline\Entities\Contact.vb" />
<Compile Include="Winline\Entities\DocumentKind.vb" />
<Compile Include="Winline\Entities\Mandator.vb" />
<Compile Include="Winline\Entities\ColumnConfig.vb" />
<Compile Include="Schemas\ColumnConfig.vb" />
<Compile Include="Winline\WebService.vb" />
<Compile Include="XmlData.vb" />
</ItemGroup>

View File

@@ -1,6 +1,6 @@
Imports MultiTool.Shared.Constants
Namespace Winline
Namespace Schemas
Public Class ColumnConfig
Public Property Name As String
Public Property Table As String

View File

@@ -1,10 +1,12 @@

Namespace Winline
Imports MultiTool.Shared.Winline
Namespace Schemas
''' <summary>
''' Class for loading column/field config from database
''' </summary>
Public Class Configuration
Public Columns As List(Of Winline.ColumnConfig)
Public Columns As List(Of ColumnConfig)
Public Function GetColumn(pName As String) As ColumnConfig
Return Columns.

View File

@@ -1,9 +1,14 @@
Imports MultiTool.Shared.Winline
Imports System.IO
Imports MultiTool.Shared.Winline
Namespace Schemas
Public Class Schema
Public Property Tables As New List(Of Table)
Public Property Name As String
Public Property FileName As String
Public Property Description As String
Public Property IsImport As Boolean
Public Property Tables As New List(Of Table)
Class Table
Public Property Name As String

View File

@@ -1,7 +1,8 @@
Imports System.IO
Imports System.Xml
Imports System.Xml.XPath
Imports DigitalData.Modules.Database
Imports DigitalData.Modules.Logging
Imports MultiTool.Shared.Winline
Imports MultiTool.Shared.Helpers
Namespace Schemas
Public Class SchemaLoader
@@ -9,42 +10,93 @@ Namespace Schemas
Private ReadOnly ns As XNamespace = "http://www.w3.org/2001/XMLSchema"
Public SchemaList As List(Of FileInfo)
Public SchemaList As List(Of Schema)
Public TemplateConfiguration As New Configuration
Public Sub New(pLogConfig As LogConfig)
Private ReadOnly Database As MSSQLServer
Private Const VWEDI_XML_ITEMS = "VWEDI_XML_ITEMS"
Public Sub New(pLogConfig As LogConfig, pMSSQL As MSSQLServer)
MyBase.New(pLogConfig, pLogConfig.GetLogger)
Database = pMSSQL
End Sub
Public Function LoadFiles(pSchemaDirectory) As Boolean
If pSchemaDirectory = String.Empty Then
Throw New ArgumentNullException("SchemaDirectory")
End If
Logger.Info("Loading files from directory [{0}]", pSchemaDirectory)
Public Async Function LoadTemplates() As Task(Of Boolean)
Try
Dim oDirectory As New DirectoryInfo(pSchemaDirectory)
Dim oFiles = oDirectory.GetFiles()
Dim oSql = $"SELECT * FROM [DD_ECM].[dbo].[TBEDI_XML_TEMPLATES]"
Dim oTable As DataTable = Await Database.GetDatatableAsync(oSql)
Dim oTemplates As New List(Of Schema)
Logger.Debug("Found [{0}] files in directory [{1}]", oFiles.Count, oDirectory)
For Each oRow As DataRow In oTable.Rows
Dim oTemplate As New Schema With {
.Name = GetRowItem(oRow, "NAME", String.Empty),
.Description = GetRowItem(oRow, "DESCRIPTION", String.Empty),
.FileName = GetRowItem(oRow, "FILE_NAME", String.Empty),
.IsImport = GetRowItem(oRow, "IS_IMPORT", True)
}
SchemaList = oFiles.ToList()
oTemplates.Add(oTemplate)
Next
SchemaList = oTemplates
Return True
Catch ex As Exception
Logger.Error(ex)
Return False
End Try
End Function
Public Async Function LoadTemplateConfiguration() As Task(Of Boolean)
Try
Dim oSql = $"SELECT * FROM [DD_ECM].[dbo].[{VWEDI_XML_ITEMS}]"
Dim oTable As DataTable = Await Database.GetDatatableAsync(oSql)
Dim oItems As New List(Of ColumnConfig)
For Each oRow As DataRow In oTable.Rows
Dim oColumn As New ColumnConfig() With {
.Template = GetRowItem(oRow, "TEMPLATE_NAME", String.Empty),
.Table = GetRowItem(oRow, "XML_TABLE", String.Empty),
.Name = GetRowItem(oRow, "XML_ITEM", String.Empty),
.Type = ColumnConfig.ConvertType(GetRowItem(oRow, "DATA_TYPE", String.Empty)),
.OrderKey = GetRowItem(oRow, "ORDER_KEY", 0),
.IsReadOnly = GetRowItem(oRow, "IS_READ_ONLY", False),
.IsVisible = GetRowItem(oRow, "IS_VISIBLE", True),
.IsRequired = GetRowItem(oRow, "IS_REQUIRED", False),
.IsHead = GetRowItem(oRow, "IS_HEAD", True),
.[Function] = New ColumnConfig.ColumnFunction With {
.Id = GetRowItem(oRow, "FUNCTION_ID", 0),
.Name = GetRowItem(oRow, "FUNCTION_NAME", String.Empty),
.Params = GetRowItem(oRow, "FUNCTION_PARAMETERS", String.Empty)
}
}
oItems.Add(oColumn)
Next
TemplateConfiguration = New Configuration With {
.Columns = oItems
}
Return True
Catch ex As Exception
Logger.Error(ex)
Throw New IO.IOException($"Could not load files from directory {pSchemaDirectory}", ex)
Return False
End Try
End Function
Public Function GetSchemaFromFile(pSchemaFilePath As String) As Schema
Dim oSchema As New Schema
Dim oFileInfo As New FileInfo(pSchemaFilePath)
Dim oElements = GetSchemaElements(pSchemaFilePath)
Public Function UpdateSchemaFromFile(pSchema As Schema, pInputDirectory As String) As Schema
Dim oFullPath = Path.Combine(pInputDirectory, pSchema.FileName)
oSchema.Name = oFileInfo.Name
If Not IO.File.Exists(oFullPath) Then
Throw New FileNotFoundException(oFullPath)
End If
Dim oElements = GetSchemaElements(oFullPath)
For Each oElement In oElements
Dim oColumns = GetElementColumns(oElement)
@@ -69,17 +121,17 @@ Namespace Schemas
oSchemaColumns.Add(oSchemaColumn)
Next
oSchema.Tables.Add(New Schema.Table With {
pSchema.Tables.Add(New Schema.Table With {
.Name = XmlData.GetElementAttribute(oElement, "name"),
.Columns = oSchemaColumns
})
Next
Return oSchema
Return pSchema
End Function
Public Function UpdateSchemaWithDatabaseConfiguration(pSchema As Schema, pTemplateConfig As Winline.Configuration) As Schema
Public Function UpdateSchemaFromDatabase(pSchema As Schema, pTemplateConfig As Configuration) As Schema
If pTemplateConfig Is Nothing Then
Return pSchema
End If
@@ -89,7 +141,7 @@ Namespace Schemas
Dim oConfig = pTemplateConfig.GetColumn(oColumn.Name)
If oConfig Is Nothing Then
oConfig = New Winline.ColumnConfig With {
oConfig = New ColumnConfig With {
.IsRequired = oColumn.IsRequired,
.Name = oColumn.Name
}

View File

@@ -77,7 +77,7 @@ Namespace Winline
' 1 = As File (relative to Winline Server directory)
Dim oByref = 1
Dim oURL As String = $"{oWS.BaseUrl}/ewlservice/import?User={oWS.Username}&Password={oWS.Password}&Company={pDocument.Mandator.Id}&Type={oTemplateType}&Vorlage={oTemplateName}&ActionCode={oActionCode}&Byref={oByref}&Data={oImportRelativeFilePath}"
Dim oURL As String = $"{oWS.BaseUrl}/ewlservice/import?User={oWS.Username}&Password={oWS.Password}&Company={pMandator.Id}&Type={oTemplateType}&Vorlage={oTemplateName}&ActionCode={oActionCode}&Byref={oByref}&Data={oImportRelativeFilePath}"
Dim oClient As New HttpClient()
Logger.Info("Creating HTTP Request to [{0}]", oWS.BaseUrl)

View File

@@ -1,6 +1,7 @@
Imports DigitalData.Modules.Logging
Imports DigitalData.Modules.Language
Imports DigitalData.Modules.Database
Imports MultiTool.Shared.Helpers
Imports System.Text.RegularExpressions
Namespace Winline
@@ -16,12 +17,9 @@ Namespace Winline
Public DocumentKinds As New List(Of DocumentKind)
Public Years As List(Of Integer)
Public TemplateConfiguration As New Configuration
Public Const ALL_MESOCOMP = "mesocomp"
Public Const VWEDI_XML_ITEMS = "VWEDI_XML_ITEMS"
Public Const V21_ARTICLENUMBER = "c002"
Public Const V21_ARTICLEDESCRIPTION = "c003"
Public Const V21_MAINARTICLENUMBER = "c011"
@@ -487,47 +485,6 @@ Namespace Winline
End If
End Function
Public Async Function LoadTemplateConfiguration() As Task(Of Boolean)
Try
Dim oSql = $"SELECT * FROM [DD_ECM].[dbo].[{VWEDI_XML_ITEMS}]"
Dim oTable As DataTable = Await Database.GetDatatableAsync(oSql)
Dim oItems As New List(Of ColumnConfig)
For Each oRow As DataRow In oTable.Rows
Dim oColumn As New ColumnConfig() With {
.Template = GetRowItem(oRow, "TEMPLATE_NAME", String.Empty),
.Table = GetRowItem(oRow, "XML_TABLE", String.Empty),
.Name = GetRowItem(oRow, "XML_ITEM", String.Empty),
.Type = ColumnConfig.ConvertType(GetRowItem(oRow, "DATA_TYPE", String.Empty)),
.OrderKey = GetRowItem(oRow, "ORDER_KEY", 0),
.IsReadOnly = GetRowItem(oRow, "IS_READ_ONLY", False),
.IsVisible = GetRowItem(oRow, "IS_VISIBLE", True),
.IsRequired = GetRowItem(oRow, "IS_REQUIRED", False),
.IsHead = GetRowItem(oRow, "IS_HEAD", True),
.[Function] = New ColumnConfig.ColumnFunction With {
.Id = GetRowItem(oRow, "FUNCTION_ID", 0),
.Name = GetRowItem(oRow, "FUNCTION_NAME", String.Empty),
.Params = GetRowItem(oRow, "FUNCTION_PARAMETERS", String.Empty)
}
}
oItems.Add(oColumn)
Next
Dim oColumns = oItems
TemplateConfiguration = New Configuration With {
.Columns = oColumns
}
Return True
Catch ex As Exception
Logger.Error(ex)
Return False
End Try
End Function
''' <summary>
''' Turns a database info like "SQLCWLDATEN on SERVER\INSTANCE" into a Tuple of two strings
''' </summary>
@@ -552,14 +509,5 @@ Namespace Winline
Split(oDelimiter, StringSplitOptions.None).
ToList()
End Function
Private Function GetRowItem(Of T)(pRow As DataRow, pFieldName As String, Optional pDefaultValue As T = Nothing) As T
Try
Return Utils.NotNull(pRow.Item(pFieldName), pDefaultValue)
Catch ex As Exception
Return Nothing
End Try
End Function
End Class
End Namespace