diff --git a/Controls.LookupGrid/LookupControl3.vb b/Controls.LookupGrid/LookupControl3.vb index bea6278d..1bc07807 100644 --- a/Controls.LookupGrid/LookupControl3.vb +++ b/Controls.LookupGrid/LookupControl3.vb @@ -30,36 +30,8 @@ Public Class LookupControl3 RepositoryItemLookupControl3.RegisterLookupControl() End Sub - Friend WithEvents fProperties As RepositoryItemGridLookUpEdit - Friend WithEvents fPropertiesView As DevExpress.XtraGrid.Views.Grid.GridView - Public Sub New() End Sub - - Private Sub InitializeComponent() - Me.fProperties = New DevExpress.XtraEditors.Repository.RepositoryItemGridLookUpEdit() - Me.fPropertiesView = New DevExpress.XtraGrid.Views.Grid.GridView() - CType(Me.fProperties, System.ComponentModel.ISupportInitialize).BeginInit() - CType(Me.fPropertiesView, System.ComponentModel.ISupportInitialize).BeginInit() - Me.SuspendLayout() - ' - 'fProperties - ' - Me.fProperties.Buttons.AddRange(New DevExpress.XtraEditors.Controls.EditorButton() {New DevExpress.XtraEditors.Controls.EditorButton(DevExpress.XtraEditors.Controls.ButtonPredefines.Combo)}) - Me.fProperties.Name = "fProperties" - Me.fProperties.PopupView = Me.fPropertiesView - ' - 'fPropertiesView - ' - Me.fPropertiesView.FocusRectStyle = DevExpress.XtraGrid.Views.Grid.DrawFocusRectStyle.RowFocus - Me.fPropertiesView.Name = "fPropertiesView" - Me.fPropertiesView.OptionsSelection.EnableAppearanceFocusedCell = False - Me.fPropertiesView.OptionsView.ShowGroupPanel = False - CType(Me.fProperties, System.ComponentModel.ISupportInitialize).EndInit() - CType(Me.fPropertiesView, System.ComponentModel.ISupportInitialize).EndInit() - Me.ResumeLayout(False) - - End Sub End Class @@ -202,7 +174,11 @@ Public Class RepositoryItemLookupControl3 End Sub Public Overrides Sub CreateDefaultButton() - MyBase.CreateDefaultButton() + If MultiSelect Then + MyBase.CreateDefaultButton() + Buttons.Item(0).Tag = TAG_DROPDOWN + ActionButtonIndex = 0 + End If Dim oLookupFormButtonm = New EditorButton() With { .Kind = ButtonPredefines.Search, @@ -210,10 +186,7 @@ Public Class RepositoryItemLookupControl3 .Width = 20 } - Buttons.Item(0).Tag = TAG_DROPDOWN Buttons.AddRange({oLookupFormButtonm}) - - ActionButtonIndex = 0 End Sub Private Function GetLookupForm() As frmLookupGrid diff --git a/Controls.LookupGrid/My Project/AssemblyInfo.vb b/Controls.LookupGrid/My Project/AssemblyInfo.vb index cb9e1f02..00e61859 100644 --- a/Controls.LookupGrid/My Project/AssemblyInfo.vb +++ b/Controls.LookupGrid/My Project/AssemblyInfo.vb @@ -31,5 +31,5 @@ Imports System.Runtime.InteropServices ' übernehmen, indem Sie "*" eingeben: ' - - + + diff --git a/Controls.LookupGrid/Resources/Strings.Designer.vb b/Controls.LookupGrid/Resources/Strings.Designer.vb index 136f8d4b..a88c816a 100644 --- a/Controls.LookupGrid/Resources/Strings.Designer.vb +++ b/Controls.LookupGrid/Resources/Strings.Designer.vb @@ -83,7 +83,7 @@ Namespace My.Resources End Property ''' - ''' Sucht eine lokalisierte Zeichenfolge, die Ein Datensatz ausgewählt ähnelt. + ''' Sucht eine lokalisierte Zeichenfolge, die 1 Datensatz ausgewählt ähnelt. ''' Friend Shared ReadOnly Property LookupControl_OneRecord() As String Get diff --git a/Controls.LookupGrid/Resources/Strings.en.resx b/Controls.LookupGrid/Resources/Strings.en.resx index f9bd92ec..653a4c64 100644 --- a/Controls.LookupGrid/Resources/Strings.en.resx +++ b/Controls.LookupGrid/Resources/Strings.en.resx @@ -124,7 +124,7 @@ {0} records selected - One record selected + 1 record selected Please choose a value: diff --git a/Controls.LookupGrid/Resources/Strings.resx b/Controls.LookupGrid/Resources/Strings.resx index dd5e4f94..093ffed5 100644 --- a/Controls.LookupGrid/Resources/Strings.resx +++ b/Controls.LookupGrid/Resources/Strings.resx @@ -124,7 +124,7 @@ {0} Datensätze ausgewählt - Ein Datensatz ausgewählt + 1 Datensatz ausgewählt Bitte wählen Sie einen Wert aus: diff --git a/Controls.LookupGrid/frmLookupGrid.resx b/Controls.LookupGrid/frmLookupGrid.resx index 4bef9e4c..13d7fb82 100644 --- a/Controls.LookupGrid/frmLookupGrid.resx +++ b/Controls.LookupGrid/frmLookupGrid.resx @@ -117,9 +117,6 @@ System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - btnOK - OK (F2) @@ -158,6 +155,9 @@ System.Windows.Forms.Button, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + Panel1 + frmLookupGrid @@ -177,6 +177,10 @@ 1 + + + None + Center @@ -214,6 +218,9 @@ 136, 23 + + viewLookup + Tile @@ -229,9 +236,6 @@ Wählen Sie einen oder mehrere Werte: - - Panel1 - Inherit @@ -251,15 +255,11 @@ 0, 221 - - 6, 13 - - + Panel1 - - - None + + btnOK System.Windows.Forms.Panel, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 @@ -273,8 +273,8 @@ - - viewLookup + + 6, 13 12, 6 diff --git a/EDMI.File/My Project/Application.Designer.vb b/Controls.SnapPanel/My Project/Application.Designer.vb similarity index 100% rename from EDMI.File/My Project/Application.Designer.vb rename to Controls.SnapPanel/My Project/Application.Designer.vb diff --git a/EDMI.File.Test/My Project/Application.myapp b/Controls.SnapPanel/My Project/Application.myapp similarity index 100% rename from EDMI.File.Test/My Project/Application.myapp rename to Controls.SnapPanel/My Project/Application.myapp diff --git a/Controls.SnapPanel/My Project/AssemblyInfo.vb b/Controls.SnapPanel/My Project/AssemblyInfo.vb new file mode 100644 index 00000000..0b10867b --- /dev/null +++ b/Controls.SnapPanel/My Project/AssemblyInfo.vb @@ -0,0 +1,35 @@ +Imports System +Imports System.Reflection +Imports System.Runtime.InteropServices + +' Allgemeine Informationen über eine Assembly werden über die folgenden +' Attribute gesteuert. Ändern Sie diese Attributwerte, um die Informationen zu ändern, +' die einer Assembly zugeordnet sind. + +' Werte der Assemblyattribute überprüfen + + + + + + + + + + +'Die folgende GUID wird für die typelib-ID verwendet, wenn dieses Projekt für COM verfügbar gemacht wird. + + +' Versionsinformationen für eine Assembly bestehen aus den folgenden vier Werten: +' +' Hauptversion +' Nebenversion +' Buildnummer +' Revision +' +' Sie können alle Werte angeben oder Standardwerte für die Build- und Revisionsnummern verwenden, +' indem Sie "*" wie unten gezeigt eingeben: +' + + + diff --git a/Controls.SnapPanel/My Project/Resources.Designer.vb b/Controls.SnapPanel/My Project/Resources.Designer.vb new file mode 100644 index 00000000..0ed21c20 --- /dev/null +++ b/Controls.SnapPanel/My Project/Resources.Designer.vb @@ -0,0 +1,63 @@ +'------------------------------------------------------------------------------ +' +' Dieser Code wurde von einem Tool generiert. +' Laufzeitversion:4.0.30319.42000 +' +' Änderungen an dieser Datei können falsches Verhalten verursachen und gehen verloren, wenn +' der Code erneut generiert wird. +' +'------------------------------------------------------------------------------ + +Option Strict On +Option Explicit On + +Imports System + +Namespace My.Resources + + 'Diese Klasse wurde von der StronglyTypedResourceBuilder automatisch generiert + '-Klasse über ein Tool wie ResGen oder Visual Studio automatisch generiert. + 'Um einen Member hinzuzufügen oder zu entfernen, bearbeiten Sie die .ResX-Datei und führen dann ResGen + 'mit der /str-Option erneut aus, oder Sie erstellen Ihr VS-Projekt neu. + ''' + ''' Eine stark typisierte Ressourcenklasse zum Suchen von lokalisierten Zeichenfolgen usw. + ''' + _ + Friend Module Resources + + Private resourceMan As Global.System.Resources.ResourceManager + + Private resourceCulture As Global.System.Globalization.CultureInfo + + ''' + ''' Gibt die zwischengespeicherte ResourceManager-Instanz zurück, die von dieser Klasse verwendet wird. + ''' + _ + Friend ReadOnly Property ResourceManager() As Global.System.Resources.ResourceManager + Get + If Object.ReferenceEquals(resourceMan, Nothing) Then + Dim temp As Global.System.Resources.ResourceManager = New Global.System.Resources.ResourceManager("DigitalData.Controls.SnapPanel.Resources", GetType(Resources).Assembly) + resourceMan = temp + End If + Return resourceMan + End Get + End Property + + ''' + ''' Überschreibt die CurrentUICulture-Eigenschaft des aktuellen Threads für alle + ''' Ressourcenzuordnungen, die diese stark typisierte Ressourcenklasse verwenden. + ''' + _ + Friend Property Culture() As Global.System.Globalization.CultureInfo + Get + Return resourceCulture + End Get + Set + resourceCulture = value + End Set + End Property + End Module +End Namespace diff --git a/EDMI.File.Test/My Project/Resources.resx b/Controls.SnapPanel/My Project/Resources.resx similarity index 100% rename from EDMI.File.Test/My Project/Resources.resx rename to Controls.SnapPanel/My Project/Resources.resx diff --git a/Controls.SnapPanel/My Project/Settings.Designer.vb b/Controls.SnapPanel/My Project/Settings.Designer.vb new file mode 100644 index 00000000..17e322ee --- /dev/null +++ b/Controls.SnapPanel/My Project/Settings.Designer.vb @@ -0,0 +1,73 @@ +'------------------------------------------------------------------------------ +' +' Dieser Code wurde von einem Tool generiert. +' Laufzeitversion:4.0.30319.42000 +' +' Änderungen an dieser Datei können falsches Verhalten verursachen und gehen verloren, wenn +' der Code erneut generiert wird. +' +'------------------------------------------------------------------------------ + +Option Strict On +Option Explicit On + + +Namespace My + + _ + Partial Friend NotInheritable Class MySettings + Inherits Global.System.Configuration.ApplicationSettingsBase + + Private Shared defaultInstance As MySettings = CType(Global.System.Configuration.ApplicationSettingsBase.Synchronized(New MySettings()),MySettings) + +#Region "Automatische My.Settings-Speicherfunktion" +#If _MyType = "WindowsForms" Then + Private Shared addedHandler As Boolean + + Private Shared addedHandlerLockObject As New Object + + _ + Private Shared Sub AutoSaveSettings(sender As Global.System.Object, e As Global.System.EventArgs) + If My.Application.SaveMySettingsOnExit Then + My.Settings.Save() + End If + End Sub +#End If +#End Region + + Public Shared ReadOnly Property [Default]() As MySettings + Get + +#If _MyType = "WindowsForms" Then + If Not addedHandler Then + SyncLock addedHandlerLockObject + If Not addedHandler Then + AddHandler My.Application.Shutdown, AddressOf AutoSaveSettings + addedHandler = True + End If + End SyncLock + End If +#End If + Return defaultInstance + End Get + End Property + End Class +End Namespace + +Namespace My + + _ + Friend Module MySettingsProperty + + _ + Friend ReadOnly Property Settings() As Global.DigitalData.Controls.SnapPanel.My.MySettings + Get + Return Global.DigitalData.Controls.SnapPanel.My.MySettings.Default + End Get + End Property + End Module +End Namespace diff --git a/EDMI.File.Test/My Project/Settings.settings b/Controls.SnapPanel/My Project/Settings.settings similarity index 100% rename from EDMI.File.Test/My Project/Settings.settings rename to Controls.SnapPanel/My Project/Settings.settings diff --git a/Controls.SnapPanel/SnapPanel.vb b/Controls.SnapPanel/SnapPanel.vb new file mode 100644 index 00000000..4970d7bc --- /dev/null +++ b/Controls.SnapPanel/SnapPanel.vb @@ -0,0 +1,56 @@ +Imports System.Drawing +Imports System.Windows.Forms +Public Class ClassSnapPanel + Inherits Panel + + Private _ShowGrid As Boolean = True + Private _GridSize As Integer = 16 + + Public Property GridSize As Integer + Get + Return _GridSize + End Get + Set(value As Integer) + _GridSize = value + Refresh() + End Set + End Property + + Public Property ShowGrid As Boolean + Get + Return _ShowGrid + End Get + Set(value As Boolean) + _ShowGrid = value + Refresh() + End Set + End Property + + Protected Overrides Sub OnControlAdded(e As ControlEventArgs) + AddHandler e.Control.LocationChanged, AddressOf AlignToGrid + AddHandler e.Control.DragDrop, AddressOf AlignToGrid + MyBase.OnControlAdded(e) + End Sub + + Protected Overrides Sub OnControlRemoved(e As ControlEventArgs) + RemoveHandler e.Control.LocationChanged, AddressOf AlignToGrid + RemoveHandler e.Control.DragDrop, AddressOf AlignToGrid + MyBase.OnControlRemoved(e) + End Sub + + Protected Overrides Sub OnPaint(e As System.Windows.Forms.PaintEventArgs) + If _ShowGrid Then + ControlPaint.DrawGrid(e.Graphics, ClientRectangle, New Size(_GridSize, _GridSize), BackColor) + End If + MyBase.OnPaint(e) + End Sub + + Private Sub AlignToGrid(sender As Object, e As EventArgs) + If _ShowGrid Then + Dim item As Control = CType(sender, Control) + Dim x As Integer = Math.Round(item.Left / _GridSize) * _GridSize + Dim y As Integer = Math.Round(item.Top / _GridSize) * _GridSize + item.Location = New Point(x, y) + End If + End Sub +End Class diff --git a/Controls.SnapPanel/SnapPanel.vbproj b/Controls.SnapPanel/SnapPanel.vbproj index ce4dd27d..a2fbec42 100644 --- a/Controls.SnapPanel/SnapPanel.vbproj +++ b/Controls.SnapPanel/SnapPanel.vbproj @@ -1,8 +1,110 @@ - - + + + - Controls.SnapPanel - netstandard2.0 + Debug + AnyCPU + {3E19C413-3197-4635-944E-558FC04C3475} + Library + DigitalData.Controls.SnapPanel + DigitalData.Controls.SnapPanel + 512 + Windows + v4.6.1 + true + - - + + true + full + true + true + bin\Debug\ + DigitalData.Controls.SnapPanel.xml + 42016,41999,42017,42018,42019,42032,42036,42020,42021,42022 + + + pdbonly + false + true + true + bin\Release\ + DigitalData.Controls.SnapPanel.xml + 42016,41999,42017,42018,42019,42032,42036,42020,42021,42022 + + + On + + + Binary + + + Off + + + On + + + + + + + + + + + + + + + + + + + + + + + + + + + True + Application.myapp + True + + + True + True + Resources.resx + + + True + Settings.settings + True + + + Component + + + + + VbMyResourcesResXFileCodeGenerator + Resources.Designer.vb + My.Resources + Designer + + + + + MyApplicationCodeGenerator + Application.Designer.vb + + + SettingsSingleFileGenerator + My + Settings.Designer.vb + + + + \ No newline at end of file diff --git a/DDMonorepo.sln b/DDMonorepo.sln index 5953a56e..333ea478 100644 --- a/DDMonorepo.sln +++ b/DDMonorepo.sln @@ -92,12 +92,8 @@ Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "WebServices", "WebServices" EndProject Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "ZUGFeRDRESTService", "WEBSERVICES\ZUGFeRDRESTService\ZUGFeRDRESTService.csproj", "{FD50590A-59C1-4798-AD90-419A588DCE76}" EndProject -Project("{F184B08F-C81C-45F6-A57F-5ABD9991F28F}") = "EDMI.File", "EDMI.File\EDMI.File.vbproj", "{1477032D-7A02-4C5F-B026-A7117DA4BC6B}" -EndProject Project("{F184B08F-C81C-45F6-A57F-5ABD9991F28F}") = "EDMI.API", "Modules.EDMIAPI\EDMI.API.vbproj", "{25017513-0D97-49D3-98D7-BA76D9B251B0}" EndProject -Project("{F184B08F-C81C-45F6-A57F-5ABD9991F28F}") = "EDMI.File.Test", "EDMI.File.Test\EDMI.File.Test.vbproj", "{16857A4E-2609-47E6-9C35-7669D64DD040}" -EndProject Project("{F184B08F-C81C-45F6-A57F-5ABD9991F28F}") = "EDMIService", "Service.EDMIService\EDMIService.vbproj", "{A8C3F298-76AB-4359-AB3C-986E313B4336}" EndProject Project("{F184B08F-C81C-45F6-A57F-5ABD9991F28F}") = "DDEmailService", "Services.EmailService\DDEmailService.vbproj", "{83ED2617-B398-4859-8F59-B38F8807E83E}" @@ -122,6 +118,12 @@ Project("{F184B08F-C81C-45F6-A57F-5ABD9991F28F}") = "ChatAddUser", "Controls.Cha EndProject Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "VirtualDrive", "VirtualDrive\VirtualDrive.csproj", "{83795524-2512-4C04-BD57-4847230943A7}" EndProject +Project("{F184B08F-C81C-45F6-A57F-5ABD9991F28F}") = "SnapPanel", "Controls.SnapPanel\SnapPanel.vbproj", "{3E19C413-3197-4635-944E-558FC04C3475}" +EndProject +Project("{F184B08F-C81C-45F6-A57F-5ABD9991F28F}") = "EDMI.File", "Modules.EDMI.File\EDMI.File.vbproj", "{1477032D-7A02-4C5F-B026-A7117DA4BC6B}" +EndProject +Project("{F184B08F-C81C-45F6-A57F-5ABD9991F28F}") = "EDMI.File.Test", "Modules.EDMI.File.Test\EDMI.File.Test.vbproj", "{16857A4E-2609-47E6-9C35-7669D64DD040}" +EndProject Global GlobalSection(SolutionConfigurationPlatforms) = preSolution Debug|Any CPU = Debug|Any CPU @@ -260,18 +262,10 @@ Global {FD50590A-59C1-4798-AD90-419A588DCE76}.Debug|Any CPU.Build.0 = Debug|Any CPU {FD50590A-59C1-4798-AD90-419A588DCE76}.Release|Any CPU.ActiveCfg = Release|Any CPU {FD50590A-59C1-4798-AD90-419A588DCE76}.Release|Any CPU.Build.0 = Release|Any CPU - {1477032D-7A02-4C5F-B026-A7117DA4BC6B}.Debug|Any CPU.ActiveCfg = Debug|Any CPU - {1477032D-7A02-4C5F-B026-A7117DA4BC6B}.Debug|Any CPU.Build.0 = Debug|Any CPU - {1477032D-7A02-4C5F-B026-A7117DA4BC6B}.Release|Any CPU.ActiveCfg = Release|Any CPU - {1477032D-7A02-4C5F-B026-A7117DA4BC6B}.Release|Any CPU.Build.0 = Release|Any CPU {25017513-0D97-49D3-98D7-BA76D9B251B0}.Debug|Any CPU.ActiveCfg = Debug|Any CPU {25017513-0D97-49D3-98D7-BA76D9B251B0}.Debug|Any CPU.Build.0 = Debug|Any CPU {25017513-0D97-49D3-98D7-BA76D9B251B0}.Release|Any CPU.ActiveCfg = Release|Any CPU {25017513-0D97-49D3-98D7-BA76D9B251B0}.Release|Any CPU.Build.0 = Release|Any CPU - {16857A4E-2609-47E6-9C35-7669D64DD040}.Debug|Any CPU.ActiveCfg = Debug|Any CPU - {16857A4E-2609-47E6-9C35-7669D64DD040}.Debug|Any CPU.Build.0 = Debug|Any CPU - {16857A4E-2609-47E6-9C35-7669D64DD040}.Release|Any CPU.ActiveCfg = Release|Any CPU - {16857A4E-2609-47E6-9C35-7669D64DD040}.Release|Any CPU.Build.0 = Release|Any CPU {A8C3F298-76AB-4359-AB3C-986E313B4336}.Debug|Any CPU.ActiveCfg = Debug|Any CPU {A8C3F298-76AB-4359-AB3C-986E313B4336}.Debug|Any CPU.Build.0 = Debug|Any CPU {A8C3F298-76AB-4359-AB3C-986E313B4336}.Release|Any CPU.ActiveCfg = Release|Any CPU @@ -320,6 +314,18 @@ Global {83795524-2512-4C04-BD57-4847230943A7}.Debug|Any CPU.Build.0 = Debug|Any CPU {83795524-2512-4C04-BD57-4847230943A7}.Release|Any CPU.ActiveCfg = Release|Any CPU {83795524-2512-4C04-BD57-4847230943A7}.Release|Any CPU.Build.0 = Release|Any CPU + {3E19C413-3197-4635-944E-558FC04C3475}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {3E19C413-3197-4635-944E-558FC04C3475}.Debug|Any CPU.Build.0 = Debug|Any CPU + {3E19C413-3197-4635-944E-558FC04C3475}.Release|Any CPU.ActiveCfg = Release|Any CPU + {3E19C413-3197-4635-944E-558FC04C3475}.Release|Any CPU.Build.0 = Release|Any CPU + {1477032D-7A02-4C5F-B026-A7117DA4BC6B}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {1477032D-7A02-4C5F-B026-A7117DA4BC6B}.Debug|Any CPU.Build.0 = Debug|Any CPU + {1477032D-7A02-4C5F-B026-A7117DA4BC6B}.Release|Any CPU.ActiveCfg = Release|Any CPU + {1477032D-7A02-4C5F-B026-A7117DA4BC6B}.Release|Any CPU.Build.0 = Release|Any CPU + {16857A4E-2609-47E6-9C35-7669D64DD040}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {16857A4E-2609-47E6-9C35-7669D64DD040}.Debug|Any CPU.Build.0 = Debug|Any CPU + {16857A4E-2609-47E6-9C35-7669D64DD040}.Release|Any CPU.ActiveCfg = Release|Any CPU + {16857A4E-2609-47E6-9C35-7669D64DD040}.Release|Any CPU.Build.0 = Release|Any CPU EndGlobalSection GlobalSection(SolutionProperties) = preSolution HideSolutionNode = FALSE @@ -358,9 +364,7 @@ Global {609B09B4-AD1E-40F7-8899-A6685924621C} = {CC368D6A-6AC4-4EB9-A092-14700FABEF7A} {F9CCEFCD-21B3-4319-9DB1-A0756DA5BA1C} = {CC368D6A-6AC4-4EB9-A092-14700FABEF7A} {FD50590A-59C1-4798-AD90-419A588DCE76} = {D3BAE68E-406E-493D-A4E5-DB6EDDFFB371} - {1477032D-7A02-4C5F-B026-A7117DA4BC6B} = {3E2008C8-27B1-41DD-9B1A-0C4029F6AECC} {25017513-0D97-49D3-98D7-BA76D9B251B0} = {3E2008C8-27B1-41DD-9B1A-0C4029F6AECC} - {16857A4E-2609-47E6-9C35-7669D64DD040} = {3E2008C8-27B1-41DD-9B1A-0C4029F6AECC} {A8C3F298-76AB-4359-AB3C-986E313B4336} = {7AF3F9C2-C939-4A08-95C1-0453207E298A} {83ED2617-B398-4859-8F59-B38F8807E83E} = {7AF3F9C2-C939-4A08-95C1-0453207E298A} {1FB2854F-C050-427D-9FAC-1D8F232E8025} = {7AF3F9C2-C939-4A08-95C1-0453207E298A} @@ -373,6 +377,9 @@ Global {86D27FFA-480F-481D-8D23-26DEAE92FE6C} = {F98C0329-C004-417F-B2AB-7466E88D8220} {F0A807CC-BE14-4B5B-9200-27C16156BD8A} = {F98C0329-C004-417F-B2AB-7466E88D8220} {83795524-2512-4C04-BD57-4847230943A7} = {CC368D6A-6AC4-4EB9-A092-14700FABEF7A} + {3E19C413-3197-4635-944E-558FC04C3475} = {F98C0329-C004-417F-B2AB-7466E88D8220} + {1477032D-7A02-4C5F-B026-A7117DA4BC6B} = {3E2008C8-27B1-41DD-9B1A-0C4029F6AECC} + {16857A4E-2609-47E6-9C35-7669D64DD040} = {3E2008C8-27B1-41DD-9B1A-0C4029F6AECC} EndGlobalSection GlobalSection(ExtensibilityGlobals) = postSolution SolutionGuid = {C1BE4090-A0FD-48AF-86CB-39099D14B286} diff --git a/EDMI.File.Test/EDMI.File.Test.vbproj b/Modules.EDMI.File.Test/EDMI.File.Test.vbproj similarity index 98% rename from EDMI.File.Test/EDMI.File.Test.vbproj rename to Modules.EDMI.File.Test/EDMI.File.Test.vbproj index 8310ffa6..c269bd8e 100644 --- a/EDMI.File.Test/EDMI.File.Test.vbproj +++ b/Modules.EDMI.File.Test/EDMI.File.Test.vbproj @@ -116,7 +116,7 @@ - + {1477032d-7a02-4c5f-b026-a7117da4bc6b} EDMI.File diff --git a/EDMI.File.Test/My Project/Application.Designer.vb b/Modules.EDMI.File.Test/My Project/Application.Designer.vb similarity index 100% rename from EDMI.File.Test/My Project/Application.Designer.vb rename to Modules.EDMI.File.Test/My Project/Application.Designer.vb diff --git a/EDMI.File/My Project/Application.myapp b/Modules.EDMI.File.Test/My Project/Application.myapp similarity index 100% rename from EDMI.File/My Project/Application.myapp rename to Modules.EDMI.File.Test/My Project/Application.myapp diff --git a/EDMI.File.Test/My Project/AssemblyInfo.vb b/Modules.EDMI.File.Test/My Project/AssemblyInfo.vb similarity index 100% rename from EDMI.File.Test/My Project/AssemblyInfo.vb rename to Modules.EDMI.File.Test/My Project/AssemblyInfo.vb diff --git a/EDMI.File.Test/My Project/Resources.Designer.vb b/Modules.EDMI.File.Test/My Project/Resources.Designer.vb similarity index 100% rename from EDMI.File.Test/My Project/Resources.Designer.vb rename to Modules.EDMI.File.Test/My Project/Resources.Designer.vb diff --git a/EDMI.File/My Project/Resources.resx b/Modules.EDMI.File.Test/My Project/Resources.resx similarity index 100% rename from EDMI.File/My Project/Resources.resx rename to Modules.EDMI.File.Test/My Project/Resources.resx diff --git a/EDMI.File.Test/My Project/Settings.Designer.vb b/Modules.EDMI.File.Test/My Project/Settings.Designer.vb similarity index 100% rename from EDMI.File.Test/My Project/Settings.Designer.vb rename to Modules.EDMI.File.Test/My Project/Settings.Designer.vb diff --git a/EDMI.File/My Project/Settings.settings b/Modules.EDMI.File.Test/My Project/Settings.settings similarity index 100% rename from EDMI.File/My Project/Settings.settings rename to Modules.EDMI.File.Test/My Project/Settings.settings diff --git a/EDMI.File.Test/PathTest.vb b/Modules.EDMI.File.Test/PathTest.vb similarity index 100% rename from EDMI.File.Test/PathTest.vb rename to Modules.EDMI.File.Test/PathTest.vb diff --git a/EDMI.File.Test/packages.config b/Modules.EDMI.File.Test/packages.config similarity index 100% rename from EDMI.File.Test/packages.config rename to Modules.EDMI.File.Test/packages.config diff --git a/EDMI.File/Archive.vb b/Modules.EDMI.File/Archive.vb similarity index 100% rename from EDMI.File/Archive.vb rename to Modules.EDMI.File/Archive.vb diff --git a/EDMI.File/EDMI.File.vbproj b/Modules.EDMI.File/EDMI.File.vbproj similarity index 100% rename from EDMI.File/EDMI.File.vbproj rename to Modules.EDMI.File/EDMI.File.vbproj diff --git a/Modules.EDMI.File/My Project/Application.Designer.vb b/Modules.EDMI.File/My Project/Application.Designer.vb new file mode 100644 index 00000000..8ab460ba --- /dev/null +++ b/Modules.EDMI.File/My Project/Application.Designer.vb @@ -0,0 +1,13 @@ +'------------------------------------------------------------------------------ +' +' Dieser Code wurde von einem Tool generiert. +' Laufzeitversion:4.0.30319.42000 +' +' Änderungen an dieser Datei können falsches Verhalten verursachen und gehen verloren, wenn +' der Code erneut generiert wird. +' +'------------------------------------------------------------------------------ + +Option Strict On +Option Explicit On + diff --git a/Modules.EDMI.File/My Project/Application.myapp b/Modules.EDMI.File/My Project/Application.myapp new file mode 100644 index 00000000..758895de --- /dev/null +++ b/Modules.EDMI.File/My Project/Application.myapp @@ -0,0 +1,10 @@ + + + false + false + 0 + true + 0 + 1 + true + diff --git a/EDMI.File/My Project/AssemblyInfo.vb b/Modules.EDMI.File/My Project/AssemblyInfo.vb similarity index 100% rename from EDMI.File/My Project/AssemblyInfo.vb rename to Modules.EDMI.File/My Project/AssemblyInfo.vb diff --git a/EDMI.File/My Project/Resources.Designer.vb b/Modules.EDMI.File/My Project/Resources.Designer.vb similarity index 100% rename from EDMI.File/My Project/Resources.Designer.vb rename to Modules.EDMI.File/My Project/Resources.Designer.vb diff --git a/Modules.EDMI.File/My Project/Resources.resx b/Modules.EDMI.File/My Project/Resources.resx new file mode 100644 index 00000000..af7dbebb --- /dev/null +++ b/Modules.EDMI.File/My Project/Resources.resx @@ -0,0 +1,117 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + text/microsoft-resx + + + 2.0 + + + System.Resources.ResXResourceReader, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + System.Resources.ResXResourceWriter, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + \ No newline at end of file diff --git a/EDMI.File/My Project/Settings.Designer.vb b/Modules.EDMI.File/My Project/Settings.Designer.vb similarity index 100% rename from EDMI.File/My Project/Settings.Designer.vb rename to Modules.EDMI.File/My Project/Settings.Designer.vb diff --git a/Modules.EDMI.File/My Project/Settings.settings b/Modules.EDMI.File/My Project/Settings.settings new file mode 100644 index 00000000..85b890b3 --- /dev/null +++ b/Modules.EDMI.File/My Project/Settings.settings @@ -0,0 +1,7 @@ + + + + + + + diff --git a/EDMI.File/Path.vb b/Modules.EDMI.File/Path.vb similarity index 100% rename from EDMI.File/Path.vb rename to Modules.EDMI.File/Path.vb diff --git a/EDMI.File/packages.config b/Modules.EDMI.File/packages.config similarity index 100% rename from EDMI.File/packages.config rename to Modules.EDMI.File/packages.config diff --git a/Modules.Jobs/EDMI/GraphQL/GraphQLJob.vb b/Modules.Jobs/EDMI/GraphQL/GraphQLJob.vb index 741464df..01ebedde 100644 --- a/Modules.Jobs/EDMI/GraphQL/GraphQLJob.vb +++ b/Modules.Jobs/EDMI/GraphQL/GraphQLJob.vb @@ -16,6 +16,8 @@ Public Class GraphQLJob Inherits JobBase Implements IJob(Of GraphQLArgs) + Private Const PLACEHOLDER_STATIC = "STATIC:" + Public Sub New(LogConfig As LogConfig, MSSQL As MSSQLServer) MyBase.New(LogConfig, Nothing, MSSQL) End Sub @@ -64,21 +66,23 @@ Public Class GraphQLJob For Each oQuery As GraphQL.Query In oQueryList Try + _Logger.NewBlock($"Query [{oQuery.Name}]") + Dim oConnectionId As Integer = oQuery.ConnectionId Dim oConnectionString = _MSSQL.Get_ConnectionStringforID(oConnectionId) Dim oDatabase As New MSSQLServer(_LogConfig, oConnectionString) - _Logger.Info("Resetting data for query [{0}] with constraint [{1}]", oQuery.Name, oQuery.QueryConstraint) - ' Reset all records to status = 0 + _Logger.Info("Resetting data with constraint [{1}]", oQuery.Name, oQuery.QueryConstraint) + Dim oResetSQL = $"UPDATE {oQuery.DestinationTable} SET STATUS = 0" If oQuery.QueryConstraint <> String.Empty Then oResetSQL &= $" WHERE {oQuery.QueryConstraint}" End If _MSSQL.ExecuteNonQuery(oResetSQL) - _Logger.Info("Getting data for query [{0}]", oQuery.Name) + _Logger.Info("Getting data..", oQuery.Name) ' get the data from GraphQL Dim oDataResponse = oInterface.GetData(oQuery.QueryString, oQuery.OperationName) @@ -111,21 +115,21 @@ Public Class GraphQLJob Continue For End If - ' Finally delete all old records, when: - ' - ClearBeforeFill is true, which should be the last query for a given Operation - ' - QueryConstraint is not empty, which means the records produced by this query can be selected easily - If oQuery.ClearBeforeFill = True Or oQuery.QueryConstraint <> String.Empty Then - Dim oDeleteSQL = $"DELETE FROM {oQuery.DestinationTable} WHERE STATUS = 0" - If oQuery.QueryConstraint <> String.Empty Then - oDeleteSQL &= $" AND {oQuery.QueryConstraint}" - End If - _MSSQL.ExecuteNonQuery(oDeleteSQL) + ' Finally delete all old records + Dim oDeleteSQL = $"DELETE FROM {oQuery.DestinationTable} WHERE STATUS = 0" + If oQuery.QueryConstraint <> String.Empty Then + oDeleteSQL &= $" AND {oQuery.QueryConstraint}" End If + _Logger.Info("Success, deleting old records..", oQuery.Name) + _MSSQL.ExecuteNonQuery(oDeleteSQL) + Catch ex As Exception _Logger.Warn("Error while getting Data for Name/OperationName [{0}]/[{1}]", oQuery.Name, oQuery.OperationName) _Logger.Error(ex) + _Logger.Info("Failure, deleting new records..", oQuery.Name) + ' If a crash happens, delete all records which were inserted in this run, ' thus going back to the previous state Dim oDeleteSQL = $"DELETE FROM {oQuery.DestinationTable} WHERE STATUS = 1" @@ -133,6 +137,8 @@ Public Class GraphQLJob oDeleteSQL &= $" AND {oQuery.QueryConstraint}" End If _MSSQL.ExecuteNonQuery(oDeleteSQL) + Finally + _Logger.EndBlock() End Try Next @@ -172,13 +178,22 @@ Public Class GraphQLJob Dim oKeys As New List(Of String) For Each oMapping In QueryData.MappingFields - Dim oToken = oResultItem.SelectToken(oMapping.SourcePath) + Dim oValue As String = String.Empty - If oToken Is Nothing Then - _Logger.Warn("HandleResponse: Could not find value at SourcePath: {0}", oMapping.SourcePath) + If oMapping.SourcePath.StartsWith(PLACEHOLDER_STATIC) Then + oValue = oMapping.SourcePath.Replace(PLACEHOLDER_STATIC, String.Empty) + Else + Dim oToken = oResultItem.SelectToken(oMapping.SourcePath) + + If oToken Is Nothing Then + _Logger.Warn("HandleResponse: Could not find value at SourcePath: {0}", oMapping.SourcePath) + oValue = String.Empty + Else + oValue = oToken.ToString + End If End If - oValues.Add(oToken.ToString()) + oValues.Add(oValue) oKeys.Add(oMapping.DestinationColumn) Next diff --git a/Modules.Jobs/My Project/AssemblyInfo.vb b/Modules.Jobs/My Project/AssemblyInfo.vb index b162d696..cfc53364 100644 --- a/Modules.Jobs/My Project/AssemblyInfo.vb +++ b/Modules.Jobs/My Project/AssemblyInfo.vb @@ -30,5 +30,5 @@ Imports System.Runtime.InteropServices ' Sie können alle Werte angeben oder die standardmäßigen Build- und Revisionsnummern ' übernehmen, indem Sie "*" eingeben: - - + + diff --git a/Modules.Logging/LogConfig.vb b/Modules.Logging/LogConfig.vb index 3dba615d..be543648 100644 --- a/Modules.Logging/LogConfig.vb +++ b/Modules.Logging/LogConfig.vb @@ -81,18 +81,14 @@ Public Class LogConfig Private Const TARGET_DEBUG As String = "debugTarget" Private Const TARGET_MEMORY As String = "memoryTarget" - Private Const DATE_FORMAT_LONG As String = "${longdate}" - Private Const DATE_FORMAT_DEFAULT As String = "${date:format=yyyy-MM-dd HH\:mm\:ss}" - - Private Const LOG_FORMAT_BASE As String = DATE_FORMAT_DEFAULT & "|${logger:shortName=True}|${level:uppercase=true}" - Private Const LOG_FORMAT_BASE_LONG_DATE As String = DATE_FORMAT_LONG & "|${logger:shortName=True}|${level:uppercase=true}" + Private Const LOG_FORMAT_BASE As String = "${time}|${logger:shortName=True}|${level:uppercase=true}" Private Const LOG_FORMAT_CALLSITE As String = "${callsite:className=false:fileName=true:includeSourcePath=false:methodName=true}" Private Const LOG_FORMAT_EXCEPTION As String = "${exception:format=Message,StackTrace:innerFormat=Message:maxInnerExceptionLevel=3}" Private Const LOG_FORMAT_DEFAULT As String = LOG_FORMAT_BASE & " >> ${message}" Private Const LOG_FORMAT_ERROR As String = LOG_FORMAT_BASE & " >> " & LOG_FORMAT_EXCEPTION - Private Const LOG_FORMAT_DEBUG As String = LOG_FORMAT_BASE_LONG_DATE & " >> " & LOG_FORMAT_CALLSITE & " -> ${message}" - Private Const LOG_FORMAT_MEMORY As String = LOG_FORMAT_BASE_LONG_DATE & " >> " & LOG_FORMAT_EXCEPTION + Private Const LOG_FORMAT_DEBUG As String = LOG_FORMAT_BASE & " >> " & LOG_FORMAT_CALLSITE & " -> " & "${message}" + Private Const LOG_FORMAT_MEMORY As String = LOG_FORMAT_BASE & " >> " & LOG_FORMAT_EXCEPTION Private Const FILE_NAME_ACCESS_TEST = "accessTest.txt" Private Const FOLDER_NAME_LOG = "Log" @@ -384,7 +380,7 @@ Public Class LogConfig ' Add debug rule, if configured If Debug Then - config.AddRuleForOneLevel(LogLevel.Debug, TARGET_DEBUG) + config.AddRuleForAllLevels(TARGET_DEBUG) config.AddRuleForAllLevels(TARGET_MEMORY) End If diff --git a/Modules.Logging/My Project/AssemblyInfo.vb b/Modules.Logging/My Project/AssemblyInfo.vb index 53f70417..7345afea 100644 --- a/Modules.Logging/My Project/AssemblyInfo.vb +++ b/Modules.Logging/My Project/AssemblyInfo.vb @@ -12,8 +12,8 @@ Imports System.Runtime.InteropServices - - + + @@ -31,5 +31,5 @@ Imports System.Runtime.InteropServices ' übernehmen, indem Sie "*" eingeben: ' - - + + diff --git a/Service.EDMIService/EDMIService.vbproj b/Service.EDMIService/EDMIService.vbproj index 3950b04c..74fd818f 100644 --- a/Service.EDMIService/EDMIService.vbproj +++ b/Service.EDMIService/EDMIService.vbproj @@ -190,10 +190,6 @@ - - {1477032d-7a02-4c5f-b026-a7117da4bc6b} - EDMI.File - {44982F9B-6116-44E2-85D0-F39650B1EF99} Config @@ -202,6 +198,10 @@ {EAF0EA75-5FA7-485D-89C7-B2D843B03A96} Database + + {1477032d-7a02-4c5f-b026-a7117da4bc6b} + EDMI.File + {25017513-0d97-49d3-98d7-ba76d9b251b0} EDMI.API diff --git a/Service.JobRunner/App.config b/Service.JobRunner/App.config index fc4472ab..ed5b24ea 100644 --- a/Service.JobRunner/App.config +++ b/Service.JobRunner/App.config @@ -32,7 +32,7 @@ False|0 0 0/1 * * ?|RootPath::LDAP://DIGITALDATA,UserFilter::(&(samaccountname=@SAMACCOUNTNAME)),GroupFilter::(&(samaccountname=*)) - True|10/0 * * * * ?|Foo::Bar + False|10/0 * * * * ?|Foo::Bar False|0 0 0/1 * * ?|QueryConfigFolder::E:\JenneJ\GraphQL