From e90af16932a40e21fb90dc4b00e424431213653b Mon Sep 17 00:00:00 2001 From: Jonathan Jenne Date: Thu, 21 Mar 2019 16:13:19 +0100 Subject: [PATCH 01/25] Save Layout Config in RoamingAppData, LogFiles in LocalAppData --- EDMI_ClientSuite/ApplicationEvents.vb | 12 ++++++++---- EDMI_ClientSuite/ClassConstants.vb | 2 -- EDMI_ClientSuite/ClassLayout.vb | 9 +-------- 3 files changed, 9 insertions(+), 14 deletions(-) diff --git a/EDMI_ClientSuite/ApplicationEvents.vb b/EDMI_ClientSuite/ApplicationEvents.vb index fec512bb..a41151c6 100644 --- a/EDMI_ClientSuite/ApplicationEvents.vb +++ b/EDMI_ClientSuite/ApplicationEvents.vb @@ -12,14 +12,18 @@ Namespace My Partial Friend Class MyApplication Private _Logger As Logger + Private _BaseUserConfigPath As String = Windows.Forms.Application.UserAppDataPath + Private _BaseMachineConfigPath As String = Windows.Forms.Application.CommonAppDataPath + Public Sub App_Startup() Handles Me.Startup Dim oLogConfig As New LogConfig(PathType.AppData) - ' TODO: WHERE SHOULD CONFIG BE SAVED? LOCAL/ROAMING - Dim oUIConfigPAth = IO.Path.Combine(Windows.Forms.Application.UserAppDataPath, ClassConstants.FOLDER_NAME_LAYOUT) + ' Layout files will be saved in %Appdata% (Roaming) so they will be syncronized with the user profile + Dim oUIConfigPath = IO.Path.Combine(_BaseUserConfigPath, ClassConstants.FOLDER_NAME_LAYOUT) - Dim oSystemConfigManager As New ConfigManager(Of ClassConfig)(oLogConfig, Windows.Forms.Application.UserAppDataPath, Windows.Forms.Application.CommonAppDataPath) - Dim oUIConfigManager As New ConfigManager(Of ClassUIConfig)(oLogConfig, oUIConfigPAth, oUIConfigPAth) + ' Set up config Managers for Layout and System Configs + Dim oSystemConfigManager As New ConfigManager(Of ClassConfig)(oLogConfig, _BaseUserConfigPath, _BaseMachineConfigPath) + Dim oUIConfigManager As New ConfigManager(Of ClassUIConfig)(oLogConfig, oUIConfigPath, oUIConfigPath) LogConfig = oLogConfig SystemConfigManager = oSystemConfigManager diff --git a/EDMI_ClientSuite/ClassConstants.vb b/EDMI_ClientSuite/ClassConstants.vb index 2a49aa78..032bb7df 100644 --- a/EDMI_ClientSuite/ClassConstants.vb +++ b/EDMI_ClientSuite/ClassConstants.vb @@ -10,8 +10,6 @@ Public Const ATTRIBUTE_ID_COLUMN = "RECORD_ID" - - Public Const DB_USER_ATTRIBUTE_ID = 1 Public Const DB_USER_ATTRIBUTE_SYSKEY = "001" diff --git a/EDMI_ClientSuite/ClassLayout.vb b/EDMI_ClientSuite/ClassLayout.vb index ada8f44d..3b6fa8d2 100644 --- a/EDMI_ClientSuite/ClassLayout.vb +++ b/EDMI_ClientSuite/ClassLayout.vb @@ -61,13 +61,6 @@ Public Class ClassLayout End Function Public Shared Function GetLayoutDirectory() As String - Return Path.Combine(GetAppDataFolder(), ClassConstants.FOLDER_NAME_LAYOUT) - End Function - - Private Shared Function GetAppDataFolder() As String - Dim oLocalAppData = Environment.GetFolderPath(Environment.SpecialFolder.LocalApplicationData) - Dim oProduct = My.Application.Info.ProductName - Dim oCompany = My.Application.Info.CompanyName - Return Path.Combine(oLocalAppData, oCompany, oProduct) + Return Path.Combine(Application.UserAppDataPath, ClassConstants.FOLDER_NAME_LAYOUT) End Function End Class From 07c44d69c4ebd46f749d25fffe37459f24c8f1e6 Mon Sep 17 00:00:00 2001 From: Jonathan Jenne Date: Thu, 21 Mar 2019 16:19:37 +0100 Subject: [PATCH 02/25] ZUGFeRDTest: Add direct validation --- ZUGFeRDTest/App.config | 74 +++++++++++++++++++++++++++++++++-- ZUGFeRDTest/Form1.Designer.vb | 16 +++++++- ZUGFeRDTest/Form1.vb | 11 ++++++ 3 files changed, 96 insertions(+), 5 deletions(-) diff --git a/ZUGFeRDTest/App.config b/ZUGFeRDTest/App.config index 203b80fb..700c492e 100644 --- a/ZUGFeRDTest/App.config +++ b/ZUGFeRDTest/App.config @@ -1,10 +1,10 @@ - + - +
- +
@@ -31,4 +31,72 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/ZUGFeRDTest/Form1.Designer.vb b/ZUGFeRDTest/Form1.Designer.vb index 2fa7fdf1..83a12ffd 100644 --- a/ZUGFeRDTest/Form1.Designer.vb +++ b/ZUGFeRDTest/Form1.Designer.vb @@ -25,6 +25,7 @@ Partial Class Form1 Me.OpenFileDialog1 = New System.Windows.Forms.OpenFileDialog() Me.Button1 = New System.Windows.Forms.Button() Me.ListBox1 = New System.Windows.Forms.ListBox() + Me.Button2 = New System.Windows.Forms.Button() Me.SuspendLayout() ' 'OpenFileDialog1 @@ -35,9 +36,9 @@ Partial Class Form1 ' Me.Button1.Location = New System.Drawing.Point(12, 12) Me.Button1.Name = "Button1" - Me.Button1.Size = New System.Drawing.Size(75, 23) + Me.Button1.Size = New System.Drawing.Size(221, 23) Me.Button1.TabIndex = 0 - Me.Button1.Text = "Button1" + Me.Button1.Text = "Run Job" Me.Button1.UseVisualStyleBackColor = True ' 'ListBox1 @@ -48,11 +49,21 @@ Partial Class Form1 Me.ListBox1.Size = New System.Drawing.Size(526, 407) Me.ListBox1.TabIndex = 1 ' + 'Button2 + ' + Me.Button2.Location = New System.Drawing.Point(12, 41) + Me.Button2.Name = "Button2" + Me.Button2.Size = New System.Drawing.Size(221, 23) + Me.Button2.TabIndex = 2 + Me.Button2.Text = "Validate Single File" + Me.Button2.UseVisualStyleBackColor = True + ' 'Form1 ' Me.AutoScaleDimensions = New System.Drawing.SizeF(6.0!, 13.0!) Me.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font Me.ClientSize = New System.Drawing.Size(916, 435) + Me.Controls.Add(Me.Button2) Me.Controls.Add(Me.ListBox1) Me.Controls.Add(Me.Button1) Me.Name = "Form1" @@ -64,4 +75,5 @@ Partial Class Form1 Friend WithEvents OpenFileDialog1 As OpenFileDialog Friend WithEvents Button1 As Button Friend WithEvents ListBox1 As ListBox + Friend WithEvents Button2 As Button End Class diff --git a/ZUGFeRDTest/Form1.vb b/ZUGFeRDTest/Form1.vb index 99bd4c75..982ac191 100644 --- a/ZUGFeRDTest/Form1.vb +++ b/ZUGFeRDTest/Form1.vb @@ -11,6 +11,7 @@ Imports DigitalData.Modules.Logging Public Class Form1 Private _logConfig As LogConfig Private _firebird As Firebird + Private _zugferd As ZUGFeRDInterface Private PropertyMap As New Dictionary(Of String, XmlItemProperty) @@ -19,6 +20,8 @@ Public Class Form1 _logConfig = New LogConfig(LogConfig.PathType.CurrentDirectory) _logConfig.Debug = True _firebird = New Firebird(_logConfig, My.Settings.FB_DATASOURCE, My.Settings.FB_DATABASE, My.Settings.FB_USER, My.Settings.FB_PASS) + + _zugferd = New ZUGFeRDInterface(_logConfig) End Sub Private Function LoadFolderConfig(args As WorkerArgs) @@ -78,4 +81,12 @@ Public Class Form1 job.Start(args) End Sub + + Private Sub Button2_Click(sender As Object, e As EventArgs) Handles Button2.Click + Dim oResult = OpenFileDialog1.ShowDialog() + + If oResult = DialogResult.OK Then + _zugferd.ValidateZUGFeRDFile(OpenFileDialog1.FileName) + End If + End Sub End Class From 21ee4416efffdc67907b5805db3e5f4c38b26d5b Mon Sep 17 00:00:00 2001 From: Jonathan Jenne Date: Fri, 22 Mar 2019 13:44:20 +0100 Subject: [PATCH 03/25] First Pass of new LookupControl --- LookupGrid/GridLookupEditExOLD.resx | 123 -------------------------- LookupGrid/GridLookupEditExOLD.vb | 131 ---------------------------- LookupGrid/LookupControl.vbproj | 7 -- LookupGrid/LookupControl2.vb | 65 ++++++++++++++ LookupGrid/LookupCreator.vb | 3 - 5 files changed, 65 insertions(+), 264 deletions(-) delete mode 100644 LookupGrid/GridLookupEditExOLD.resx delete mode 100644 LookupGrid/GridLookupEditExOLD.vb delete mode 100644 LookupGrid/LookupCreator.vb diff --git a/LookupGrid/GridLookupEditExOLD.resx b/LookupGrid/GridLookupEditExOLD.resx deleted file mode 100644 index e5858cc2..00000000 --- a/LookupGrid/GridLookupEditExOLD.resx +++ /dev/null @@ -1,123 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - text/microsoft-resx - - - 2.0 - - - System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - - System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - - False - - \ No newline at end of file diff --git a/LookupGrid/GridLookupEditExOLD.vb b/LookupGrid/GridLookupEditExOLD.vb deleted file mode 100644 index c5274973..00000000 --- a/LookupGrid/GridLookupEditExOLD.vb +++ /dev/null @@ -1,131 +0,0 @@ -Imports System.ComponentModel -Imports DevExpress.XtraEditors -Imports DevExpress.XtraEditors.Controls -Imports DevExpress.XtraEditors.Repository - -Public Class GridLookupEditExOLD - Inherits GridLookUpEdit - - - Public Property MultiSelect As Boolean - - Public Property AllowAddNewValues As Boolean - - Public Property PreventDuplicates As Boolean - - Public Property DataSource As DataTable - - Public Property SelectedValues As List(Of String) - Get - If _selectedValues Is Nothing Then - Return New List(Of String) - End If - - Return _selectedValues - End Get - Set(value As List(Of String)) - _selectedValues = value - - UpdateSelectedValues(value) - End Set - End Property - - Private _selectedValues As List(Of String) - - Private Const TAG_BUTTON_LOOKUP_FORM = "openLookupForm" - Private Const TEXT_NO_RECORDS = "Keine Datensätze ausgewählt" - Friend WithEvents fProperties As RepositoryItemGridLookUpEdit - Friend WithEvents fPropertiesView As DevExpress.XtraGrid.Views.Grid.GridView - Private Const TEXT_N_RECORDS = "{0} Datensätze ausgewählt" - - Public Sub New() - Properties.View.OptionsBehavior.ReadOnly = True - Properties.View.OptionsBehavior.Editable = False - Properties.View.OptionsView.ShowColumnHeaders = False - Properties.PopupFormSize = New System.Drawing.Size(Properties.PopupFormSize.Width, 100) - - ' If single select, remove dropdown button - If MultiSelect = False Then - Properties.Buttons.Clear() - End If - - Properties.Buttons.Add(New EditorButton() With { - .Kind = ButtonPredefines.Ellipsis, - .Tag = TAG_BUTTON_LOOKUP_FORM - }) - - End Sub - - Private Function GetLookupForm() As frmLookupGrid - Dim oForm As New frmLookupGrid() With { - .MultiSelect = MultiSelect, - .AddNewValues = AllowAddNewValues, - .PreventDuplicates = PreventDuplicates, - .DataSource = DataSource, - .SelectedValues = SelectedValues, - .StartPosition = Windows.Forms.FormStartPosition.Manual, - .Location = PointToScreen(New System.Drawing.Point(Width, 0)) - } - - Return oForm - End Function - - Private Sub UpdateSelectedValues(Values As List(Of String)) - If MultiSelect = True Then - Properties.DataSource = Values - Properties.NullText = IIf(Values.Count = 0, TEXT_NO_RECORDS, String.Format(TEXT_N_RECORDS, Values.Count)) - Else - Text = Values.FirstOrDefault() - End If - End Sub - - Private Sub GridLookupEditEx_EditValueChanging(sender As Object, e As ChangingEventArgs) Handles Me.EditValueChanging - If MultiSelect Then - e.Cancel = True - End If - End Sub - - Private Sub lookupControlMulti_ButtonClick(sender As Object, e As ButtonPressedEventArgs) - If e.Button.Tag <> TAG_BUTTON_LOOKUP_FORM Then - Exit Sub - End If - - Dim oForm As frmLookupGrid = GetLookupForm() - Dim oResult = oForm.ShowDialog() - - If oResult = Windows.Forms.DialogResult.OK Then - Dim oValues = oForm.SelectedValues - - UpdateSelectedValues(oValues) - - SelectedValues = oValues - End If - - oForm.Dispose() - 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 diff --git a/LookupGrid/LookupControl.vbproj b/LookupGrid/LookupControl.vbproj index a5a03a59..9ebcc41b 100644 --- a/LookupGrid/LookupControl.vbproj +++ b/LookupGrid/LookupControl.vbproj @@ -105,9 +105,6 @@ Form - - Component - LookupControl.vb @@ -117,7 +114,6 @@ Component - @@ -152,9 +148,6 @@ frmLookupGrid.vb - - GridLookupEditExOLD.vb - LookupControl.vb diff --git a/LookupGrid/LookupControl2.vb b/LookupGrid/LookupControl2.vb index 7908bc17..ea3f8de0 100644 --- a/LookupGrid/LookupControl2.vb +++ b/LookupGrid/LookupControl2.vb @@ -7,6 +7,9 @@ Imports DevExpress.XtraEditors.Repository Imports DevExpress.XtraEditors.ViewInfo Imports DevExpress.XtraEditors.Popup Imports DevExpress.Accessibility +Imports DevExpress.XtraEditors.Controls + + Public Class RepositoryItemLookupControl2 @@ -51,14 +54,76 @@ End Class Public Class LookupControl2 Inherits GridLookUpEdit + Public Property MultiSelect As Boolean + Public Property AllowAddNewValues As Boolean + Public Property PreventDuplicates As Boolean + Public Property DataSource As DataTable + Public Property SelectedValues As List(Of String) + + Private Const TAG_BUTTON_LOOKUP_FORM = "openLookupForm" + Private Const TEXT_NO_RECORDS = "Keine Datensätze ausgewählt" + Private Const TEXT_N_RECORDS = "{0} Datensätze ausgewählt" + Shared Sub New() RepositoryItemLookupControl2.RegisterLookupControl2() End Sub Public Sub New() + Properties.Buttons.Add(New EditorButton() With { + .Kind = ButtonPredefines.Ellipsis, + .Tag = TAG_BUTTON_LOOKUP_FORM + }) + AddHandler ButtonClick, AddressOf HandleButtonClick + AddHandler EditValueChanging, AddressOf HandleEditValueChanging End Sub + Private Sub HandleEditValueChanging(sender As Object, e As ChangingEventArgs) + e.Cancel = True + End Sub + + Private Sub HandleButtonClick(sender As Object, e As ButtonPressedEventArgs) + If e.Button.Tag <> TAG_BUTTON_LOOKUP_FORM Then + Exit Sub + End If + + Dim oForm As frmLookupGrid = GetLookupForm() + Dim oResult = oForm.ShowDialog() + + If oResult = Windows.Forms.DialogResult.OK Then + Dim oValues = oForm.SelectedValues + + UpdateSelectedValues(oValues) + + SelectedValues = oValues + End If + + oForm.Dispose() + End Sub + + Private Sub UpdateSelectedValues(Values As List(Of String)) + If MultiSelect = True Then + Properties.DataSource = Values + Properties.NullText = IIf(Values.Count = 0, TEXT_NO_RECORDS, String.Format(TEXT_N_RECORDS, Values.Count)) + Else + Text = Values.FirstOrDefault() + End If + End Sub + + Private Function GetLookupForm() As frmLookupGrid + Dim oForm As New frmLookupGrid() With { + .MultiSelect = MultiSelect, + .AddNewValues = AllowAddNewValues, + .PreventDuplicates = PreventDuplicates, + .DataSource = DataSource, + .SelectedValues = SelectedValues, + .StartPosition = Windows.Forms.FormStartPosition.Manual, + .Location = PointToScreen(New Point(Width, 0)) + } + + Return oForm + End Function + Public Shadows ReadOnly Property Properties As RepositoryItemLookupControl2 Get diff --git a/LookupGrid/LookupCreator.vb b/LookupGrid/LookupCreator.vb deleted file mode 100644 index 6f9a206e..00000000 --- a/LookupGrid/LookupCreator.vb +++ /dev/null @@ -1,3 +0,0 @@ -Public Class LookupCreator - -End Class From 743b936cdd722758f3df03a0122737c0042b109b Mon Sep 17 00:00:00 2001 From: Jonathan Jenne Date: Fri, 22 Mar 2019 13:45:46 +0100 Subject: [PATCH 04/25] New Form Designer \o/ --- EDMI_ClientSuite/ClassConstants.vb | 7 + EDMI_ClientSuite/ClientSuite.vbproj | 10 +- .../frmFormDesigner.Designer.vb | 187 +++++++++++++----- .../FormEntityDesigner/frmFormDesigner.vb | 163 ++++++++++++--- .../My Project/Resources.Designer.vb | 30 +++ EDMI_ClientSuite/My Project/Resources.resx | 9 + EDMI_ClientSuite/Resources/ComboBox.png | Bin 0 -> 220 bytes EDMI_ClientSuite/Resources/DatePicker.png | Bin 0 -> 229 bytes EDMI_ClientSuite/Resources/TextBox.png | Bin 0 -> 207 bytes 9 files changed, 328 insertions(+), 78 deletions(-) create mode 100644 EDMI_ClientSuite/Resources/ComboBox.png create mode 100644 EDMI_ClientSuite/Resources/DatePicker.png create mode 100644 EDMI_ClientSuite/Resources/TextBox.png diff --git a/EDMI_ClientSuite/ClassConstants.vb b/EDMI_ClientSuite/ClassConstants.vb index 032bb7df..da07d4d5 100644 --- a/EDMI_ClientSuite/ClassConstants.vb +++ b/EDMI_ClientSuite/ClassConstants.vb @@ -6,6 +6,13 @@ Public Const SERVICE_MAX_CONNECTIONS = 10000 Public Const SERVICE_OPEN_TIMEOUT = 3 + Public Const CONTROL_TEXTEDIT = "TextBox" + Public Const CONTROL_MEMOEDIT = "Memoedit" + Public Const CONTROL_COMBOEDIT = "Combobox" + Public Const CONTROL_CHECKEDIT = "Checkbox" + Public Const CONTROL_RADIOEDIT = "Radiobutton" + Public Const CONTROL_DATEEDIT = "Datepicker" + Public Const FOLDER_NAME_LAYOUT = "Layout" Public Const ATTRIBUTE_ID_COLUMN = "RECORD_ID" diff --git a/EDMI_ClientSuite/ClientSuite.vbproj b/EDMI_ClientSuite/ClientSuite.vbproj index 336d8e53..73b9b4f0 100644 --- a/EDMI_ClientSuite/ClientSuite.vbproj +++ b/EDMI_ClientSuite/ClientSuite.vbproj @@ -458,6 +458,14 @@ DDEDMService - + + + + + + + + + \ No newline at end of file diff --git a/EDMI_ClientSuite/FormEntityDesigner/frmFormDesigner.Designer.vb b/EDMI_ClientSuite/FormEntityDesigner/frmFormDesigner.Designer.vb index 7ab76bce..03f929b7 100644 --- a/EDMI_ClientSuite/FormEntityDesigner/frmFormDesigner.Designer.vb +++ b/EDMI_ClientSuite/FormEntityDesigner/frmFormDesigner.Designer.vb @@ -25,15 +25,28 @@ Partial Class frmFormDesigner Me.RibbonStatusBar = New DevExpress.XtraBars.Ribbon.RibbonStatusBar() Me.LayoutControlMain = New DevExpress.XtraLayout.LayoutControl() Me.LayoutControlGroupMain = New DevExpress.XtraLayout.LayoutControlGroup() - Me.ToolboxControl1 = New DevExpress.XtraToolbox.ToolboxControl() - Me.ToolboxGroup1 = New DevExpress.XtraToolbox.ToolboxGroup() + Me.ToolboxControlMain = New DevExpress.XtraToolbox.ToolboxControl() + Me.ToolboxGroupMain = New DevExpress.XtraToolbox.ToolboxGroup() Me.ToolboxItemTextbox = New DevExpress.XtraToolbox.ToolboxItem() - Me.ToolboxItemMemo = New DevExpress.XtraToolbox.ToolboxItem() + Me.ToolboxItemMemoedit = New DevExpress.XtraToolbox.ToolboxItem() + Me.ToolboxItemDatepicker = New DevExpress.XtraToolbox.ToolboxItem() + Me.ToolboxItemCombobox = New DevExpress.XtraToolbox.ToolboxItem() Me.RibbonPageGroup1 = New DevExpress.XtraBars.Ribbon.RibbonPageGroup() - Me.ToolboxItem1 = New DevExpress.XtraToolbox.ToolboxItem() + Me.XtraTabControl1 = New DevExpress.XtraTab.XtraTabControl() + Me.XtraTabPageControls = New DevExpress.XtraTab.XtraTabPage() + Me.XtraTabPageProperties = New DevExpress.XtraTab.XtraTabPage() + Me.PropertyGridControl1 = New DevExpress.XtraVerticalGrid.PropertyGridControl() + Me.SplitContainerMain = New DevExpress.XtraEditors.SplitContainerControl() CType(Me.RibbonControl, System.ComponentModel.ISupportInitialize).BeginInit() CType(Me.LayoutControlMain, System.ComponentModel.ISupportInitialize).BeginInit() CType(Me.LayoutControlGroupMain, System.ComponentModel.ISupportInitialize).BeginInit() + CType(Me.XtraTabControl1, System.ComponentModel.ISupportInitialize).BeginInit() + Me.XtraTabControl1.SuspendLayout() + Me.XtraTabPageControls.SuspendLayout() + Me.XtraTabPageProperties.SuspendLayout() + CType(Me.PropertyGridControl1, System.ComponentModel.ISupportInitialize).BeginInit() + CType(Me.SplitContainerMain, System.ComponentModel.ISupportInitialize).BeginInit() + Me.SplitContainerMain.SuspendLayout() Me.SuspendLayout() ' 'RibbonControl @@ -61,12 +74,17 @@ Partial Class frmFormDesigner ' 'LayoutControlMain ' - Me.LayoutControlMain.BackColor = System.Drawing.Color.FromArgb(CType(CType(224, Byte), Integer), CType(CType(224, Byte), Integer), CType(CType(224, Byte), Integer)) + Me.LayoutControlMain.AllowDrop = True + Me.LayoutControlMain.BackColor = System.Drawing.Color.Transparent Me.LayoutControlMain.Dock = System.Windows.Forms.DockStyle.Fill - Me.LayoutControlMain.Location = New System.Drawing.Point(0, 146) + Me.LayoutControlMain.Location = New System.Drawing.Point(0, 0) Me.LayoutControlMain.Name = "LayoutControlMain" + Me.LayoutControlMain.OptionsCustomizationForm.DesignTimeCustomizationFormPositionAndSize = New System.Drawing.Rectangle(706, 255, 650, 400) + Me.LayoutControlMain.OptionsCustomizationForm.ShowLayoutTreeView = False + Me.LayoutControlMain.OptionsCustomizationForm.ShowLoadButton = False + Me.LayoutControlMain.OptionsCustomizationForm.ShowSaveButton = False Me.LayoutControlMain.Root = Me.LayoutControlGroupMain - Me.LayoutControlMain.Size = New System.Drawing.Size(658, 362) + Me.LayoutControlMain.Size = New System.Drawing.Size(624, 362) Me.LayoutControlMain.TabIndex = 2 Me.LayoutControlMain.Text = "LayoutControl1" ' @@ -74,71 +92,142 @@ Partial Class frmFormDesigner ' Me.LayoutControlGroupMain.EnableIndentsWithoutBorders = DevExpress.Utils.DefaultBoolean.[True] Me.LayoutControlGroupMain.GroupBordersVisible = False - Me.LayoutControlGroupMain.Name = "LayoutControlGroupMain" - Me.LayoutControlGroupMain.Size = New System.Drawing.Size(658, 362) + Me.LayoutControlGroupMain.Name = "Root" + Me.LayoutControlGroupMain.Size = New System.Drawing.Size(624, 362) Me.LayoutControlGroupMain.TextVisible = False ' - 'ToolboxControl1 - ' - Me.ToolboxControl1.Caption = "Form Controls" - Me.ToolboxControl1.Dock = System.Windows.Forms.DockStyle.Right - Me.ToolboxControl1.Groups.Add(Me.ToolboxGroup1) - Me.ToolboxControl1.Location = New System.Drawing.Point(658, 146) - Me.ToolboxControl1.Name = "ToolboxControl1" - Me.ToolboxControl1.OptionsView.ShowMenuButton = False - Me.ToolboxControl1.OptionsView.ShowToolboxCaption = True - Me.ToolboxControl1.Size = New System.Drawing.Size(212, 362) - Me.ToolboxControl1.TabIndex = 4 - Me.ToolboxControl1.Text = "Form Controls" - ' - 'ToolboxGroup1 - ' - Me.ToolboxGroup1.BeginGroupCaption = "" - Me.ToolboxGroup1.Caption = "ToolboxGroup1" - Me.ToolboxGroup1.Items.Add(Me.ToolboxItemTextbox) - Me.ToolboxGroup1.Items.Add(Me.ToolboxItemMemo) - Me.ToolboxGroup1.Items.Add(Me.ToolboxItem1) - Me.ToolboxGroup1.Name = "ToolboxGroup1" + 'ToolboxControlMain + ' + Me.ToolboxControlMain.Caption = "Form Controls" + Me.ToolboxControlMain.Dock = System.Windows.Forms.DockStyle.Fill + Me.ToolboxControlMain.Groups.Add(Me.ToolboxGroupMain) + Me.ToolboxControlMain.Location = New System.Drawing.Point(0, 0) + Me.ToolboxControlMain.Name = "ToolboxControlMain" + Me.ToolboxControlMain.OptionsMinimizing.AllowMinimizing = False + Me.ToolboxControlMain.OptionsView.ShowMenuButton = False + Me.ToolboxControlMain.OptionsView.ShowToolboxCaption = True + Me.ToolboxControlMain.SelectedGroup = Me.ToolboxGroupMain + Me.ToolboxControlMain.SelectedGroupIndex = 0 + Me.ToolboxControlMain.Size = New System.Drawing.Size(232, 337) + Me.ToolboxControlMain.TabIndex = 4 + Me.ToolboxControlMain.Text = "Form Controls" + ' + 'ToolboxGroupMain + ' + Me.ToolboxGroupMain.BeginGroupCaption = "" + Me.ToolboxGroupMain.Caption = "Basis Controls" + Me.ToolboxGroupMain.Items.Add(Me.ToolboxItemTextbox) + Me.ToolboxGroupMain.Items.Add(Me.ToolboxItemMemoedit) + Me.ToolboxGroupMain.Items.Add(Me.ToolboxItemDatepicker) + Me.ToolboxGroupMain.Items.Add(Me.ToolboxItemCombobox) + Me.ToolboxGroupMain.Name = "ToolboxGroupMain" ' 'ToolboxItemTextbox ' Me.ToolboxItemTextbox.BeginGroupCaption = Nothing Me.ToolboxItemTextbox.Caption = "Textbox" + Me.ToolboxItemTextbox.ImageOptions.Image = Global.DigitalData.GUIs.ClientSuite.My.Resources.Resources.TextBox Me.ToolboxItemTextbox.Name = "ToolboxItemTextbox" + Me.ToolboxItemTextbox.Tag = "Textbox" + ' + 'ToolboxItemMemoedit ' - 'ToolboxItemMemo + Me.ToolboxItemMemoedit.BeginGroupCaption = Nothing + Me.ToolboxItemMemoedit.Caption = "Multiline Textbox" + Me.ToolboxItemMemoedit.ImageOptions.Image = Global.DigitalData.GUIs.ClientSuite.My.Resources.Resources.TextBox + Me.ToolboxItemMemoedit.Name = "ToolboxItemMemoedit" + Me.ToolboxItemMemoedit.Tag = "Memoedit" ' - Me.ToolboxItemMemo.BeginGroupCaption = Nothing - Me.ToolboxItemMemo.Caption = "Multiline Textbox" - Me.ToolboxItemMemo.Name = "ToolboxItemMemo" + 'ToolboxItemDatepicker + ' + Me.ToolboxItemDatepicker.BeginGroupCaption = Nothing + Me.ToolboxItemDatepicker.Caption = "Datepicker" + Me.ToolboxItemDatepicker.ImageOptions.Image = Global.DigitalData.GUIs.ClientSuite.My.Resources.Resources.DatePicker + Me.ToolboxItemDatepicker.Name = "ToolboxItemDatepicker" + Me.ToolboxItemDatepicker.Tag = "Datepicker" + ' + 'ToolboxItemCombobox + ' + Me.ToolboxItemCombobox.BeginGroupCaption = Nothing + Me.ToolboxItemCombobox.Caption = "Combobox" + Me.ToolboxItemCombobox.ImageOptions.Image = Global.DigitalData.GUIs.ClientSuite.My.Resources.Resources.ComboBox + Me.ToolboxItemCombobox.Name = "ToolboxItemCombobox" + Me.ToolboxItemCombobox.Tag = "Combobox" ' 'RibbonPageGroup1 ' Me.RibbonPageGroup1.Name = "RibbonPageGroup1" Me.RibbonPageGroup1.Text = "RibbonPageGroup1" ' - 'ToolboxItem1 - ' - Me.ToolboxItem1.BeginGroupCaption = Nothing - Me.ToolboxItem1.Caption = "ToolboxItem1" - Me.ToolboxItem1.Name = "ToolboxItem1" + 'XtraTabControl1 + ' + Me.XtraTabControl1.Dock = System.Windows.Forms.DockStyle.Fill + Me.XtraTabControl1.Location = New System.Drawing.Point(0, 0) + Me.XtraTabControl1.Name = "XtraTabControl1" + Me.XtraTabControl1.SelectedTabPage = Me.XtraTabPageControls + Me.XtraTabControl1.Size = New System.Drawing.Size(234, 362) + Me.XtraTabControl1.TabIndex = 7 + Me.XtraTabControl1.TabPages.AddRange(New DevExpress.XtraTab.XtraTabPage() {Me.XtraTabPageControls, Me.XtraTabPageProperties}) + ' + 'XtraTabPageControls + ' + Me.XtraTabPageControls.Controls.Add(Me.ToolboxControlMain) + Me.XtraTabPageControls.Name = "XtraTabPageControls" + Me.XtraTabPageControls.Size = New System.Drawing.Size(232, 337) + Me.XtraTabPageControls.Text = "Controls" + ' + 'XtraTabPageProperties + ' + Me.XtraTabPageProperties.Controls.Add(Me.PropertyGridControl1) + Me.XtraTabPageProperties.Name = "XtraTabPageProperties" + Me.XtraTabPageProperties.Size = New System.Drawing.Size(232, 337) + Me.XtraTabPageProperties.Text = "Eigenschaften" + ' + 'PropertyGridControl1 + ' + Me.PropertyGridControl1.Dock = System.Windows.Forms.DockStyle.Fill + Me.PropertyGridControl1.Location = New System.Drawing.Point(0, 0) + Me.PropertyGridControl1.Name = "PropertyGridControl1" + Me.PropertyGridControl1.Size = New System.Drawing.Size(232, 337) + Me.PropertyGridControl1.TabIndex = 0 + ' + 'SplitContainerMain + ' + Me.SplitContainerMain.CollapsePanel = DevExpress.XtraEditors.SplitCollapsePanel.Panel2 + Me.SplitContainerMain.Dock = System.Windows.Forms.DockStyle.Fill + Me.SplitContainerMain.Location = New System.Drawing.Point(0, 146) + Me.SplitContainerMain.Name = "SplitContainerMain" + Me.SplitContainerMain.Panel1.Controls.Add(Me.LayoutControlMain) + Me.SplitContainerMain.Panel1.Text = "Panel1" + Me.SplitContainerMain.Panel2.Controls.Add(Me.XtraTabControl1) + Me.SplitContainerMain.Panel2.Text = "Panel2" + Me.SplitContainerMain.Size = New System.Drawing.Size(870, 362) + Me.SplitContainerMain.SplitterPosition = 624 + Me.SplitContainerMain.TabIndex = 3 + Me.SplitContainerMain.Text = "SplitContainerControl1" ' 'frmFormDesigner ' Me.AutoScaleDimensions = New System.Drawing.SizeF(6.0!, 13.0!) Me.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font Me.ClientSize = New System.Drawing.Size(870, 529) - Me.Controls.Add(Me.LayoutControlMain) - Me.Controls.Add(Me.ToolboxControl1) + Me.Controls.Add(Me.SplitContainerMain) Me.Controls.Add(Me.RibbonStatusBar) Me.Controls.Add(Me.RibbonControl) Me.Name = "frmFormDesigner" Me.Ribbon = Me.RibbonControl Me.StatusBar = Me.RibbonStatusBar - Me.Text = "frmFormDesigner" + Me.Text = "Form Designer" CType(Me.RibbonControl, System.ComponentModel.ISupportInitialize).EndInit() CType(Me.LayoutControlMain, System.ComponentModel.ISupportInitialize).EndInit() CType(Me.LayoutControlGroupMain, System.ComponentModel.ISupportInitialize).EndInit() + CType(Me.XtraTabControl1, System.ComponentModel.ISupportInitialize).EndInit() + Me.XtraTabControl1.ResumeLayout(False) + Me.XtraTabPageControls.ResumeLayout(False) + Me.XtraTabPageProperties.ResumeLayout(False) + CType(Me.PropertyGridControl1, System.ComponentModel.ISupportInitialize).EndInit() + CType(Me.SplitContainerMain, System.ComponentModel.ISupportInitialize).EndInit() + Me.SplitContainerMain.ResumeLayout(False) Me.ResumeLayout(False) Me.PerformLayout() @@ -149,10 +238,16 @@ Partial Class frmFormDesigner Friend WithEvents RibbonStatusBar As DevExpress.XtraBars.Ribbon.RibbonStatusBar Friend WithEvents LayoutControlMain As DevExpress.XtraLayout.LayoutControl Friend WithEvents LayoutControlGroupMain As DevExpress.XtraLayout.LayoutControlGroup - Friend WithEvents ToolboxControl1 As DevExpress.XtraToolbox.ToolboxControl + Friend WithEvents ToolboxControlMain As DevExpress.XtraToolbox.ToolboxControl Friend WithEvents RibbonPageGroup1 As DevExpress.XtraBars.Ribbon.RibbonPageGroup - Friend WithEvents ToolboxGroup1 As DevExpress.XtraToolbox.ToolboxGroup + Friend WithEvents ToolboxGroupMain As DevExpress.XtraToolbox.ToolboxGroup Friend WithEvents ToolboxItemTextbox As DevExpress.XtraToolbox.ToolboxItem - Friend WithEvents ToolboxItemMemo As DevExpress.XtraToolbox.ToolboxItem - Friend WithEvents ToolboxItem1 As DevExpress.XtraToolbox.ToolboxItem + Friend WithEvents ToolboxItemMemoedit As DevExpress.XtraToolbox.ToolboxItem + Friend WithEvents ToolboxItemDatepicker As DevExpress.XtraToolbox.ToolboxItem + Friend WithEvents XtraTabControl1 As DevExpress.XtraTab.XtraTabControl + Friend WithEvents XtraTabPageControls As DevExpress.XtraTab.XtraTabPage + Friend WithEvents XtraTabPageProperties As DevExpress.XtraTab.XtraTabPage + Friend WithEvents PropertyGridControl1 As DevExpress.XtraVerticalGrid.PropertyGridControl + Friend WithEvents SplitContainerMain As DevExpress.XtraEditors.SplitContainerControl + Friend WithEvents ToolboxItemCombobox As DevExpress.XtraToolbox.ToolboxItem End Class diff --git a/EDMI_ClientSuite/FormEntityDesigner/frmFormDesigner.vb b/EDMI_ClientSuite/FormEntityDesigner/frmFormDesigner.vb index 4b287a52..d0428835 100644 --- a/EDMI_ClientSuite/FormEntityDesigner/frmFormDesigner.vb +++ b/EDMI_ClientSuite/FormEntityDesigner/frmFormDesigner.vb @@ -1,21 +1,109 @@ Imports DevExpress.XtraEditors +Imports DevExpress.XtraToolbox Imports DevExpress.XtraLayout +Imports DevExpress.XtraLayout.Customization +Imports DevExpress.XtraLayout.Dragging +Imports DevExpress.XtraLayout.HitInfo +Imports DigitalData.Controls.LookupGrid Public Class frmFormDesigner - Private Const CONTROL_TEXTEDIT = "TextBox" - Private Const CONTROL_MEMOEDIT = "Memoedit" - Private Const CONTROL_COMBOEDIT = "Combobox" - Private Const CONTROL_CHECKEDIT = "Checkbox" - Private Const CONTROL_RADIOEDIT = "Radiobutton" - Private Const CONTROL_DATEEDIT = "Datepicker" +#Region "Drag Helper" + Private _DragItem As BaseLayoutItem + Private _Window As DragFrameWindow + Private _DragController As LayoutItemDragController = Nothing - Private Sub frmFormDesigner_Load(sender As Object, e As EventArgs) Handles MyBase.Load + Protected ReadOnly Property DragFrameWindow As DragFrameWindow + Get + If _Window Is Nothing Then + _Window = New DragFrameWindow(LayoutControlMain) + End If + Return _Window + End Get + End Property + + Private Sub ShowDragHelper() + DragFrameWindow.Visible = True + End Sub + + Private Sub HideDragHelper() + DragFrameWindow.Reset() + DragFrameWindow.Visible = False + End Sub + + Private Sub UpdateDragHelper(p As Point) + p = LayoutControlMain.PointToClient(p) + _DragController = New LayoutItemDragController(_DragItem, LayoutControlMain.Root, New Point(p.X, p.Y)) + DragFrameWindow.DragController = _DragController + End Sub +#End Region +#Region "Drag Drop Actions" + Private Sub ToolboxControlMain_DragItemDrop(sender As Object, e As ToolboxDragItemDropEventArgs) Handles ToolboxControlMain.DragItemDrop + Dim oPosition As Point = LayoutControlMain.PointToClient(MousePosition) + Dim oHitInfo As BaseLayoutItemHitInfo = LayoutControlMain.CalcHitInfo(oPosition) + Dim oLayoutControl As LayoutControlItem = DirectCast(_DragItem, LayoutControlItem) + Dim oControlName As String = oLayoutControl.Tag & ClassUtils.ShortGUID() + Dim oControl As Control = GetControl(oLayoutControl.Tag, oControlName) + + If oLayoutControl IsNot Nothing Then + HideDragHelper() + oLayoutControl.Control = oControl - Dim oFormId As Int64 = 104 + If (_DragController IsNot Nothing AndAlso _DragItem IsNot Nothing) Then + If (_DragItem.Owner Is Nothing OrElse _DragItem.Parent Is Nothing) Then + _DragController.DragWildItem() + Else + _DragController.Drag() + End If + Focus() + End If + HideDragHelper() + _DragItem = Nothing + End If + End Sub + + Private Sub ToolboxControlMain_DragItemStart(sender As Object, e As ToolboxDragItemStartEventArgs) Handles ToolboxControlMain.DragItemStart + _DragItem = CreateLayoutControlItem(e.Item.Tag) + End Sub + + Private Sub ToolboxControlMain_DragItemMove(sender As Object, e As DevExpress.XtraToolbox.ToolboxDragItemMoveEventArgs) Handles ToolboxControlMain.DragItemMove + If (CType(LayoutControlMain, ILayoutControl)).EnableCustomizationMode OrElse Me.DesignMode Then Return + Dim oFormPosition As Point = PointToClient(e.Location) + Dim oLayoutPosition As Point = LayoutControlMain.PointToClient(e.Location) + + If LayoutControlMain.Bounds.Contains(oFormPosition) Then + + If Not DragFrameWindow.Visible Then + DragFrameWindow.Visible = True + Return + End If + UpdateDragHelper(e.Location) + Else + DragFrameWindow.Visible = False + End If + End Sub +#End Region + + Private _FormId As Int64 + + Public Sub New() + ' Dieser Aufruf ist für den Designer erforderlich. + InitializeComponent() + ' Fügen Sie Initialisierungen nach dem InitializeComponent()-Aufruf hinzu. + _FormId = 104 + End Sub + + Public Sub New(FormId As Int64) + ' Dieser Aufruf ist für den Designer erforderlich. + InitializeComponent() + ' Fügen Sie Initialisierungen nach dem InitializeComponent()-Aufruf hinzu. + _FormId = FormId + End Sub + + Private Sub frmFormDesigner_Load(sender As Object, e As EventArgs) Handles MyBase.Load My.Channel.CreateDatabaseRequest("Load Controls", True) - Dim oSQL As String = $"SELECT * FROM VWICM_FORMCONTROL WHERE FORMID = {oFormId}" + Dim oSQL As String = $"SELECT * FROM VWICM_FORMCONTROL WHERE FORMID = {_FormId}" Dim oResult = My.Channel.ReturnDatatable(oSQL) Dim oTable = oResult.Table @@ -28,33 +116,42 @@ Public Class frmFormDesigner LoadControls(oTable) End Sub + Private Function GetControl(Type As String, Name As String) + Dim oEditor As BaseEdit = Nothing + + Select Case Type + Case ClassConstants.CONTROL_TEXTEDIT + Dim oTextEdit As New TextEdit() With {.Name = Name} + oEditor = oTextEdit + Case ClassConstants.CONTROL_MEMOEDIT + Dim oMemoEdit As New MemoEdit() With {.Name = Name} + oEditor = oMemoEdit + Case ClassConstants.CONTROL_DATEEDIT + Dim oDateEdit As New DateEdit() With {.Name = Name} + oEditor = oDateEdit + Case ClassConstants.CONTROL_CHECKEDIT + Dim oCheckEdit As New CheckEdit() With {.Name = Name} + oEditor = oCheckEdit + Case ClassConstants.CONTROL_COMBOEDIT + Dim oComboEdit As New LookupControl2() With {.Name = Name} + oEditor = oComboEdit + Case Else + oEditor = Nothing + End Select + + Return oEditor + End Function + + Private Function CreateLayoutControlItem(Id As String) As LayoutControlItem + Return New LayoutControlItem() With {.Tag = Id} + End Function + Private Sub LoadControls(Datatable As DataTable) For Each oRow As DataRow In Datatable.Rows - - Dim oEditor As BaseEdit = Nothing Dim oCaption As String = oRow.Item("COLNAME") Dim oControlType As String = oRow.Item("CTRLTYPE") Dim oControlId As String = oRow.Item("RECORD_ID").ToString - - Select Case oControlType - Case CONTROL_TEXTEDIT - Dim oTextEdit As New TextEdit() With {.Name = oControlId} - oEditor = oTextEdit - Case CONTROL_MEMOEDIT - Dim oMemoEdit As New MemoEdit() With {.Name = oControlId} - oEditor = oMemoEdit - Case CONTROL_DATEEDIT - Dim oDateEdit As New DateEdit() With {.Name = oControlId} - oEditor = oDateEdit - Case CONTROL_CHECKEDIT - Dim oCheckEdit As New CheckEdit() With {.Name = oControlId} - oEditor = oCheckEdit - Case CONTROL_COMBOEDIT - Dim oComboEdit As New ComboBoxEdit() With {.Name = oControlId} - oEditor = oComboEdit - Case Else - - End Select + Dim oEditor As BaseEdit = GetControl(oControlType, oControlId) If oEditor Is Nothing Then Continue For @@ -65,4 +162,8 @@ Public Class frmFormDesigner LayoutControlGroupMain.AddItem(New EmptySpaceItem()) End Sub + + Private Sub LayoutControlMain_ItemSelectionChanged(sender As Object, e As EventArgs) Handles LayoutControlMain.ItemSelectionChanged + ' TODO: Load Property Grid for selected item + End Sub End Class \ No newline at end of file diff --git a/EDMI_ClientSuite/My Project/Resources.Designer.vb b/EDMI_ClientSuite/My Project/Resources.Designer.vb index 12f93519..6b5f1bee 100644 --- a/EDMI_ClientSuite/My Project/Resources.Designer.vb +++ b/EDMI_ClientSuite/My Project/Resources.Designer.vb @@ -60,6 +60,26 @@ Namespace My.Resources End Set End Property + ''' + ''' Sucht eine lokalisierte Ressource vom Typ System.Drawing.Bitmap. + ''' + Friend ReadOnly Property ComboBox() As System.Drawing.Bitmap + Get + Dim obj As Object = ResourceManager.GetObject("ComboBox", resourceCulture) + Return CType(obj,System.Drawing.Bitmap) + End Get + End Property + + ''' + ''' Sucht eine lokalisierte Ressource vom Typ System.Drawing.Bitmap. + ''' + Friend ReadOnly Property DatePicker() As System.Drawing.Bitmap + Get + Dim obj As Object = ResourceManager.GetObject("DatePicker", resourceCulture) + Return CType(obj,System.Drawing.Bitmap) + End Get + End Property + ''' ''' Sucht eine lokalisierte Ressource vom Typ System.Drawing.Bitmap. ''' @@ -70,6 +90,16 @@ Namespace My.Resources End Get End Property + ''' + ''' Sucht eine lokalisierte Ressource vom Typ System.Drawing.Bitmap. + ''' + Friend ReadOnly Property TextBox() As System.Drawing.Bitmap + Get + Dim obj As Object = ResourceManager.GetObject("TextBox", resourceCulture) + Return CType(obj,System.Drawing.Bitmap) + End Get + End Property + ''' ''' Sucht eine lokalisierte Ressource vom Typ System.Drawing.Bitmap. ''' diff --git a/EDMI_ClientSuite/My Project/Resources.resx b/EDMI_ClientSuite/My Project/Resources.resx index f9ad61a5..b7e38bfa 100644 --- a/EDMI_ClientSuite/My Project/Resources.resx +++ b/EDMI_ClientSuite/My Project/Resources.resx @@ -118,10 +118,19 @@ System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + ..\Resources\TextBox.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a + ..\Resources\iconfinder_Gowalla_324477.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a + + ..\Resources\DatePicker.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a + ..\Resources\user_16xLG.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a + + ..\Resources\ComboBox.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a + \ No newline at end of file diff --git a/EDMI_ClientSuite/Resources/ComboBox.png b/EDMI_ClientSuite/Resources/ComboBox.png new file mode 100644 index 0000000000000000000000000000000000000000..91985513891e7fde29213c5e880184769dc6f0cf GIT binary patch literal 220 zcmeAS@N?(olHy`uVBq!ia0vp^0wB!61|;P_|4#%`jKx9jP7LeL$-D$|SkfJR9T^xl z_H+M9WCij$3p^r=85sBugD~Uq{1quc!9q_L#}Etum7e8YG!6`%Ghek?6YDputu71Y68K2l4jmMn#F>~x}Q4vol=5=IV@rvnJ8>6Nqx3buYlh+tJ%uYA&J;J6Bw4A}y L)z4*}Q$iB}e5Xe` literal 0 HcmV?d00001 diff --git a/EDMI_ClientSuite/Resources/DatePicker.png b/EDMI_ClientSuite/Resources/DatePicker.png new file mode 100644 index 0000000000000000000000000000000000000000..273433cc8e817595ae920dd55e54e56b3a6945a8 GIT binary patch literal 229 zcmeAS@N?(olHy`uVBq!ia0vp^0wB!61|;P_|4#%`jKx9jP7LeL$-D$|SkfJR9T^xl z_H+M9WCij$3p^r=85sBugD~Uq{1quc!75J|#}EtuwUZtB4k&Q2)JpTO^Utn+n6=sW zdh;U96`U6r^ysuKS(SQJsL53&rQ)CRY z>m*KQ{0(*bC3d^Bou#*IU!`h9gMH)<;{-;|`Aj-{^%|DmWsO+Xn7(0`p3AXcj8P{J V2KHp0_653v!PC{xWt~$(699kiPiO!D literal 0 HcmV?d00001 diff --git a/EDMI_ClientSuite/Resources/TextBox.png b/EDMI_ClientSuite/Resources/TextBox.png new file mode 100644 index 0000000000000000000000000000000000000000..e38d5a05bba87c835cc62257e21b314e4e08d383 GIT binary patch literal 207 zcmeAS@N?(olHy`uVBq!ia0vp^0wB!61|;P_|4#%`jKx9jP7LeL$-D$|SkfJR9T^xl z_H+M9WCij$3p^r=85sBugD~Uq{1quc!4yvy#}Etu4z6ih7_w=lZS?3^US%aFKo!ppsdYd}tC@O1TaS?83{1OQ0&L3aQE literal 0 HcmV?d00001 From 0f4c04dde71a02b57a46fc6b5507c82977cc99b6 Mon Sep 17 00:00:00 2001 From: Jonathan Jenne Date: Fri, 22 Mar 2019 16:24:20 +0100 Subject: [PATCH 05/25] Add My.Common Namespace for DB Commands and Views --- EDMI_ClientSuite/Common/ClassCommon.vb | 17 ++++ .../{ => Common}/ClassCommonCommands.vb | 0 EDMI_ClientSuite/Common/ClassCommonViews.vb | 33 ++++++++ EDMI_ClientSuite/MyApplication.vb | 1 + EDMI_ClientSuite/frmMain.Designer.vb | 35 +++++--- EDMI_ClientSuite/frmMain.resx | 81 +++++++++++++++---- EDMI_ClientSuite/frmMain.vb | 15 +++- 7 files changed, 150 insertions(+), 32 deletions(-) create mode 100644 EDMI_ClientSuite/Common/ClassCommon.vb rename EDMI_ClientSuite/{ => Common}/ClassCommonCommands.vb (100%) create mode 100644 EDMI_ClientSuite/Common/ClassCommonViews.vb diff --git a/EDMI_ClientSuite/Common/ClassCommon.vb b/EDMI_ClientSuite/Common/ClassCommon.vb new file mode 100644 index 00000000..c725ef89 --- /dev/null +++ b/EDMI_ClientSuite/Common/ClassCommon.vb @@ -0,0 +1,17 @@ +Imports DigitalData.Modules.Logging + +Public Class ClassCommon + Private _LogConfig As LogConfig + Private _Logger As Logger + + Public Commands As ClassCommonCommands + Public Views As ClassCommonViews + + Public Sub New(LogConfig As LogConfig) + _LogConfig = LogConfig + _Logger = LogConfig.GetLogger() + + Commands = New ClassCommonCommands(LogConfig) + Views = New ClassCommonViews(LogConfig) + End Sub +End Class diff --git a/EDMI_ClientSuite/ClassCommonCommands.vb b/EDMI_ClientSuite/Common/ClassCommonCommands.vb similarity index 100% rename from EDMI_ClientSuite/ClassCommonCommands.vb rename to EDMI_ClientSuite/Common/ClassCommonCommands.vb diff --git a/EDMI_ClientSuite/Common/ClassCommonViews.vb b/EDMI_ClientSuite/Common/ClassCommonViews.vb new file mode 100644 index 00000000..41353080 --- /dev/null +++ b/EDMI_ClientSuite/Common/ClassCommonViews.vb @@ -0,0 +1,33 @@ +Imports DigitalData.Modules.Logging + +Public Class ClassCommonViews + Private _LogConfig As LogConfig + Private _Logger As Logger + + Public Sub New(LogConfig As LogConfig) + _LogConfig = LogConfig + _Logger = LogConfig.GetLogger() + End Sub + + Public Async Function VWICM_FORM_CONTROL(FormId As Int64) As Task(Of DataTable) + Try + My.Channel.CreateDatabaseRequest("Load Controls", True) + + Dim oSQL As String = $"SELECT * FROM VWICM_FORMCONTROL WHERE FORMID = {FormId}" + Dim oResult = Await My.Channel.ReturnDatatableAsync(oSQL) + Dim oTable = oResult.Table + + If Not oResult.OK Then + _Logger.Error(New ApplicationException(oResult.ErrorMessage)) + Return Nothing + End If + + My.Channel.CloseDatabaseRequest() + + Return oResult.Table + Catch ex As Exception + _Logger.Error(ex) + Throw ex + End Try + End Function +End Class diff --git a/EDMI_ClientSuite/MyApplication.vb b/EDMI_ClientSuite/MyApplication.vb index d8f84a02..15d6aa57 100644 --- a/EDMI_ClientSuite/MyApplication.vb +++ b/EDMI_ClientSuite/MyApplication.vb @@ -29,6 +29,7 @@ Namespace My Property ChannelFactory As ChannelFactory(Of IEDMServiceChannel) Property Channel As IEDMServiceChannel Property MainForm As frmMain + Property Common As ClassCommon End Module ''' diff --git a/EDMI_ClientSuite/frmMain.Designer.vb b/EDMI_ClientSuite/frmMain.Designer.vb index 7bcddbf8..087703f7 100644 --- a/EDMI_ClientSuite/frmMain.Designer.vb +++ b/EDMI_ClientSuite/frmMain.Designer.vb @@ -42,6 +42,8 @@ Partial Class frmMain Me.BarButtonUserManager = New DevExpress.XtraBars.BarButtonItem() Me.LabelServiceOffline = New DevExpress.XtraBars.BarStaticItem() Me.BarButtonItem3 = New DevExpress.XtraBars.BarButtonItem() + Me.BarButtonFormDesigner = New DevExpress.XtraBars.BarButtonItem() + Me.BarButtonItem4 = New DevExpress.XtraBars.BarButtonItem() Me.RibbonPageStart = New DevExpress.XtraBars.Ribbon.RibbonPage() Me.RibbonPageGroup3 = New DevExpress.XtraBars.Ribbon.RibbonPageGroup() Me.RibbonPageAdmin = New DevExpress.XtraBars.Ribbon.RibbonPage() @@ -55,7 +57,6 @@ Partial Class frmMain Me.NavbarItemHome = New DevExpress.XtraBars.Navigation.NavigationBarItem() Me.NavbarItemSearch = New DevExpress.XtraBars.Navigation.NavigationBarItem() Me.NavbarItemWorkflow = New DevExpress.XtraBars.Navigation.NavigationBarItem() - Me.BarButtonFormDesigner = New DevExpress.XtraBars.BarButtonItem() CType(Me.RibbonControl, System.ComponentModel.ISupportInitialize).BeginInit() CType(Me.MainMenu, System.ComponentModel.ISupportInitialize).BeginInit() CType(Me.DocumentManager, System.ComponentModel.ISupportInitialize).BeginInit() @@ -68,9 +69,9 @@ Partial Class frmMain ' Me.RibbonControl.ApplicationButtonDropDownControl = Me.MainMenu Me.RibbonControl.ExpandCollapseItem.Id = 0 - Me.RibbonControl.Items.AddRange(New DevExpress.XtraBars.BarItem() {Me.RibbonControl.ExpandCollapseItem, Me.BarButtonExit, Me.BarButtonUserSettings, Me.LabelCurrentUser, Me.LabelCurrentMachine, Me.LabelCurrentVersion, Me.BarButtonItem1, Me.SkinDropDownButtonItem1, Me.BarButtonEntityDesigner, Me.BarButtonDeleteControl, Me.BarButtonConnectionSettings, Me.LabelCurrentLanguage, Me.BarButtonItem2, Me.BarWorkspaceMenuItem1, Me.LabelServiceOnline, Me.BarButtonUserManager, Me.LabelServiceOffline, Me.BarButtonItem3, Me.BarButtonFormDesigner}) + Me.RibbonControl.Items.AddRange(New DevExpress.XtraBars.BarItem() {Me.RibbonControl.ExpandCollapseItem, Me.BarButtonExit, Me.BarButtonUserSettings, Me.LabelCurrentUser, Me.LabelCurrentMachine, Me.LabelCurrentVersion, Me.BarButtonItem1, Me.SkinDropDownButtonItem1, Me.BarButtonEntityDesigner, Me.BarButtonDeleteControl, Me.BarButtonConnectionSettings, Me.LabelCurrentLanguage, Me.BarButtonItem2, Me.BarWorkspaceMenuItem1, Me.LabelServiceOnline, Me.BarButtonUserManager, Me.LabelServiceOffline, Me.BarButtonItem3, Me.BarButtonFormDesigner, Me.BarButtonItem4}) Me.RibbonControl.Location = New System.Drawing.Point(0, 0) - Me.RibbonControl.MaxItemId = 24 + Me.RibbonControl.MaxItemId = 25 Me.RibbonControl.MdiMergeStyle = DevExpress.XtraBars.Ribbon.RibbonMdiMergeStyle.Always Me.RibbonControl.Name = "RibbonControl" Me.RibbonControl.PageHeaderItemLinks.Add(Me.SkinDropDownButtonItem1) @@ -173,6 +174,8 @@ Partial Class frmMain ' Me.BarButtonItem2.Caption = "License Test" Me.BarButtonItem2.Id = 16 + Me.BarButtonItem2.ImageOptions.Image = CType(resources.GetObject("BarButtonItem2.ImageOptions.Image"), System.Drawing.Image) + Me.BarButtonItem2.ImageOptions.LargeImage = CType(resources.GetObject("BarButtonItem2.ImageOptions.LargeImage"), System.Drawing.Image) Me.BarButtonItem2.Name = "BarButtonItem2" ' 'BarWorkspaceMenuItem1 @@ -217,6 +220,22 @@ Partial Class frmMain Me.BarButtonItem3.ImageOptions.LargeImage = CType(resources.GetObject("BarButtonItem3.ImageOptions.LargeImage"), System.Drawing.Image) Me.BarButtonItem3.Name = "BarButtonItem3" ' + 'BarButtonFormDesigner + ' + Me.BarButtonFormDesigner.Caption = "Form Designer" + Me.BarButtonFormDesigner.Id = 23 + Me.BarButtonFormDesigner.ImageOptions.Image = CType(resources.GetObject("BarButtonFormDesigner.ImageOptions.Image"), System.Drawing.Image) + Me.BarButtonFormDesigner.ImageOptions.LargeImage = CType(resources.GetObject("BarButtonFormDesigner.ImageOptions.LargeImage"), System.Drawing.Image) + Me.BarButtonFormDesigner.Name = "BarButtonFormDesigner" + ' + 'BarButtonItem4 + ' + Me.BarButtonItem4.Caption = "Workflow Test" + Me.BarButtonItem4.Id = 24 + Me.BarButtonItem4.ImageOptions.Image = CType(resources.GetObject("BarButtonItem4.ImageOptions.Image"), System.Drawing.Image) + Me.BarButtonItem4.ImageOptions.LargeImage = CType(resources.GetObject("BarButtonItem4.ImageOptions.LargeImage"), System.Drawing.Image) + Me.BarButtonItem4.Name = "BarButtonItem4" + ' 'RibbonPageStart ' Me.RibbonPageStart.Groups.AddRange(New DevExpress.XtraBars.Ribbon.RibbonPageGroup() {Me.RibbonPageGroup3}) @@ -228,6 +247,7 @@ Partial Class frmMain Me.RibbonPageGroup3.ItemLinks.Add(Me.BarButtonItem1) Me.RibbonPageGroup3.ItemLinks.Add(Me.BarButtonItem3) Me.RibbonPageGroup3.ItemLinks.Add(Me.BarButtonItem2) + Me.RibbonPageGroup3.ItemLinks.Add(Me.BarButtonItem4) Me.RibbonPageGroup3.Name = "RibbonPageGroup3" Me.RibbonPageGroup3.Text = "DEBUG" ' @@ -306,14 +326,6 @@ Partial Class frmMain Me.NavbarItemWorkflow.Name = "NavbarItemWorkflow" Me.NavbarItemWorkflow.Text = "Workflow" ' - 'BarButtonFormDesigner - ' - Me.BarButtonFormDesigner.Caption = "Form Designer" - Me.BarButtonFormDesigner.Id = 23 - Me.BarButtonFormDesigner.ImageOptions.Image = CType(resources.GetObject("BarButtonItem4.ImageOptions.Image"), System.Drawing.Image) - Me.BarButtonFormDesigner.ImageOptions.LargeImage = CType(resources.GetObject("BarButtonItem4.ImageOptions.LargeImage"), System.Drawing.Image) - Me.BarButtonFormDesigner.Name = "BarButtonFormDesigner" - ' 'frmMain ' Me.AutoScaleDimensions = New System.Drawing.SizeF(6.0!, 13.0!) @@ -373,4 +385,5 @@ Partial Class frmMain Friend WithEvents NavbarItemWorkflow As DevExpress.XtraBars.Navigation.NavigationBarItem Friend WithEvents RibbonPageGroup1 As DevExpress.XtraBars.Ribbon.RibbonPageGroup Friend WithEvents BarButtonFormDesigner As DevExpress.XtraBars.BarButtonItem + Friend WithEvents BarButtonItem4 As DevExpress.XtraBars.BarButtonItem End Class diff --git a/EDMI_ClientSuite/frmMain.resx b/EDMI_ClientSuite/frmMain.resx index 28415e46..3ac9cdd8 100644 --- a/EDMI_ClientSuite/frmMain.resx +++ b/EDMI_ClientSuite/frmMain.resx @@ -327,6 +327,35 @@ Q0eB76GXlBmcwUboHljEX/VYrs+ZDZd64hAeIV8x0X1zDDpN+l3QE7VvnQ136oWVadThQS8ueo+wj2kb 5rjFxS4oxIUHPaJ3orXehjluMXRj/i1c46fg1v/zBvQ01CWNEH3D8BW6GV9A74v5xaXFho1Od+wP/kd2 dhb/KMUAAAAASUVORK5CYII= + + + + + iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8 + YQUAAAAZdEVYdFNvZnR3YXJlAEFkb2JlIEltYWdlUmVhZHlxyWU8AAAAEHRFWHRUaXRsZQBNYXNrO1Jv + bGU7urHsswAAAN5JREFUOE+dkr0NgmAURYmtE7gAhdHKMWyxdQILwwCULuAEhugAroCNO1CZWCr2FHqP + eR/5QEiE4kTuz7vBhOB5iUvxHkjJQNEw+1AwkDfMPuQMZCZOYinG9ot2xa4sYyA1MRNoB9oNdGUpIjEx + 5A0SBiITQ4gYCMXLM/+Fm9D9p7OZfeAmcANbM/vATTUwFe57WJjXBhkdutxUA7AThHsxMs8Hj4wO3a/v + F+biKigcxUpMDJ7xyOjQ/RmAtXgIim2Q0alu/GPHRtxF8xiPrNavCQ++toO4GTzjNXpx8AFGzsQFb2mX + gAAAAABJRU5ErkJggg== + + + + + iVBORw0KGgoAAAANSUhEUgAAACAAAAAgCAYAAABzenr0AAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8 + YQUAAAAZdEVYdFNvZnR3YXJlAEFkb2JlIEltYWdlUmVhZHlxyWU8AAAAEHRFWHRUaXRsZQBNYXNrO1Jv + bGU7urHsswAAAplJREFUWEfF1r9vTnEUx/GWpEIZRIpIRYhEGcTP0ERjaESaCpsitor4kabBJhEWg8Fg + sZkNYmnsFuYuDIh/wWS/Pu9vvufm3G/P87h9nhuG183j3nM+51TvvX1Gqqr6r8KT5tenh/NyWvbIqHBu + GGSQReY8M8LBRkVL8iy7J1dlVk7IQdkl22RMNmR85hzXqKGWHnrJsLwlZoSDjYoWXUPXFpkRDjYqWiia + urTAjHCwUdFc0dSlOWaEg42KpoumLk0zIxxsVDRVNLXxVG6LPUGmrJtihg16Ldyhp8Q/blvkstyUu/JI + Hmd85hzXqJmRI7JTyCCLTLJ3SLnAhF/gm1TZF3knz+WWXJSjwvO7VTZmfOYc16ihlh56ybA8sssF7kia + bQt8FmvoGtnlAlekscB7iZq7QPZe8Qvw62ks8Eqi5i6QfVhsOPfPbmks8EB800fhTt6X8ZlzvqZtHdln + xBa4LsxsLMDvxIeelFTkcM6Ht60jm5vUFmCZVOsX4L/IGvgpfKDHtfXWkX1NGM4ft+2S6vwCWBVr6gqZ + ZN8XFriQ/x0u8EaikGGQyQ3H8GWZkJ4L8HKIQoZB5nFhgfNSD0e5wDH5LVHQIMgi85LckM3SdwGsSBQ2 + CLL4dsR3Cr4d+TlJtAB3aRQ2CLL2y6T4GbVogQPyXaLA9SCDrHHx+Q3RAnghPqzf8278cw8y/votutcC + /E3/KRbW641nyjcfvWTUNczoJR18cfZELNCW4Ke0d36/dz+9jbxyqJcOZYPwuvwgPrgNeupXrSmHeulQ + NmR80/kq0aAItfSsySqHeukQNWVnpc1TQQ21UcaaoV46RE3OIXkr0WBwjZqoNymHeukQNRU2yTl5KT8y + PnOOa1FPrRzqhSf/nWrkD0Il4XZB5Rq7AAAAAElFTkSuQmCC @@ -403,31 +432,49 @@ ldBSCS1BCKHsZDJGA3s3sDsALYFtssfnwfcxxmdKabRle9ZqvYSWoEcg50wlZAIIk5AKIK2EXACZJR6Q OEUAqRL2bvNjVmgJegTecLdP6D20BNh4VOaz6D20BD8ncLnedrGMT8An4BPwCfzHBL6JC3QLHEl7foWW SmiphJZKaKmjDC/fWMVvGNRzeQAAAABJRU5ErkJggg== + + + + + iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAAABGdBTUEAALGPC/xhBQAAABl0RVh0U29m + dHdhcmUAQWRvYmUgSW1hZ2VSZWFkeXHJZTwAAAARdEVYdFRpdGxlAFdpbmRvd3M7RXll7xo9bwAAANxJ + REFUOE/dkT0KwkAQhQNaiaCn8RaewgOI4gkkF7CyttDebsNCIJV6AsHKAySVgiYbGN9bXLFYsqBWLnzM + ZGbey/5EIvIV0XCu5Bv+wSCOYybeC2qCGmo/NiAvA+AdCPELAxM0QK8NpuAEbs84A6wPGg1Q74FdkiRS + FIUYY2zkN+oH0A8ZrNM0RSqy3Z9ltMhszsU6+puQwaUsS6RixXx3Z1JVFXVXZ+CjC5ZaaytwO2DkYh39 + lffPDgx0gOaZ8zyXuq5tVEpRnLHvFb6DId72BBzBHfAVxqAlItED1Ra9ByAahOsAAAAASUVORK5CYII= + + + + + iVBORw0KGgoAAAANSUhEUgAAACAAAAAgCAYAAABzenr0AAAABGdBTUEAALGPC/xhBQAAABl0RVh0U29m + dHdhcmUAQWRvYmUgSW1hZ2VSZWFkeXHJZTwAAAARdEVYdFRpdGxlAFdpbmRvd3M7RXll7xo9bwAAAY1J + REFUWEftl7FKw1AUhvMIro66+QBCcfEJ9Cl8BH0BCQQcMgZEMB27OAgOxcUhQyRDUoUMOri5iEEHoWAa + jv9/0ys3aQW1SemQAx85597zn/unTVtqicg3e8dDWSY8szPQGagYWBY43LJtGykM1F21zUoYIJ2B1THA + BKgHo230oXMN6I026Qx0BjoDq2DgwMhxacEAZu2AM8/zxHEcBepHrnHP6HvitTEDmLEBrvv9viRJIlmW + yWQyUTDnGvfYM+1do64RA9DvgrcwDFGKfIxzubl/lqPzW1WbwR72UoNycQPQboH3NE1RloefXNyZPz4z + wV5qqG3CwDCKIqRl8M714T8ZYFBDbRMGxnmeIy2DL/tvDFBDbesGTMxnokkDl/rhY9TfAhPu6YDukFpt + 4L/sg03wOhqN1OD6Q6jhGvcY7KWG2rl39VcwaNt1XQmCAGX1Y0iY68PZg/4XalA298cEA9cHg4H4vi9x + HKsvn6IoFMy5hp4QXLFX62YGLQqG98ApeACfU5hzrVftF+sLoRMhmJtEnpwAAAAASUVORK5CYII= - iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8 - YQUAAAAZdEVYdFNvZnR3YXJlAEFkb2JlIEltYWdlUmVhZHlxyWU8AAAAEXRFWHRUaXRsZQBXaW5kb3dz - O0V5Ze8aPW8AAADcSURBVDhP3ZE9CsJAEIUDWomgp/EWnsIDiOIJJBewsrbQ3m7DQiCVegLBygMklYIm - GxjfW1yxWLKgVi58zGRm3sv+RCLyFdFwruQb/sEgjmMm3gtqghpqPzYgLwPgHQjxCwMTNECvDabgBG7P - OAOsDxoNUO+BXZIkUhSFGGNs5DfqB9APGazTNEUqst2fZbTIbM7FOvqbkMGlLEukYsV8d2dSVRV1V2fg - owuWWmsrcDtg5GId/ZX3zw4MdIDmmfM8l7qubVRKUZyx7xW+gyHe9gQcwR3wFcagJSLRA9UWvQcgGoTr - AAAAAElFTkSuQmCC + iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAAABGdBTUEAALGPC/xhBQAAABl0RVh0U29m + dHdhcmUAQWRvYmUgSW1hZ2VSZWFkeXHJZTwAAAAsdEVYdFRpdGxlAERvY3VtZW50O01hcDtTY2hlbWU7 + RGlhZ3JhbTtIaWVyYXI7TmV0Tg8qRAAAAHVJREFUOE/NzMENgDAMQ9EuyDoMwBKMwLXHbhf0JUBtYqCo + Fw5PCNdOMrMhMpyWYorvIQRQY/geQgA1hu8hBFBj+B5CADWG7yEEUGP4HkJQyznbQb6j+akGbx4P8D1d + A5e1B+ZttRqFnuz2wJfsJwdGyLCfpR37LNV02NfAHQAAAABJRU5ErkJggg== - iVBORw0KGgoAAAANSUhEUgAAACAAAAAgCAYAAABzenr0AAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8 - YQUAAAAZdEVYdFNvZnR3YXJlAEFkb2JlIEltYWdlUmVhZHlxyWU8AAAAEXRFWHRUaXRsZQBXaW5kb3dz - O0V5Ze8aPW8AAAGNSURBVFhH7ZexSsNQFIbzCK6OuvkAQnHxCfQpfAR9AQkEHDIGRDAduzgIDsXFIUMk - Q1KFDDq4uYhBB6FgGo7/f9MrN2kFtUnpkAMfOefe85/7p01baonIN3vHQ1kmPLMz0BmoGFgWONyybRsp - DNRdtc1KGCCdgdUxwASoB6Nt9KFzDeiNNukMdAY6A6tg4MDIcWnBAGbtgDPP88RxHAXqR65xz+h74rUx - A5ixAa77/b4kSSJZlslkMlEw5xr32DPtXaOuEQPQ74K3MAxRinyMc7m5f5aj81tVm8Ee9lKDcnED0G6B - 9zRNUZaHn1zcmT8+M8FeaqhtwsAwiiKkZfDO9eE/GWBQQ20TBsZ5niMtgy/7bwxQQ23rBkzMZ6JJA5f6 - 4WPU3wIT7umA7pBabeC/7INN8DoajdTg+kOo4Rr3GOylhtq5d/VXMGjbdV0JggBl9WNImOvD2YP+F2pQ - NvfHBAPXB4OB+L4vcRyrL5+iKBTMuYaeEFyxV+tmBi0KhvfAKXgAn1OYc61X7RfrC6ETIZibRJ6cAAAA - AElFTkSuQmCC + iVBORw0KGgoAAAANSUhEUgAAACAAAAAgCAYAAABzenr0AAAABGdBTUEAALGPC/xhBQAAABl0RVh0U29m + dHdhcmUAQWRvYmUgSW1hZ2VSZWFkeXHJZTwAAAAsdEVYdFRpdGxlAERvY3VtZW50O01hcDtTY2hlbWU7 + RGlhZ3JhbTtIaWVyYXI7TmV0Tg8qRAAAAMNJREFUWEft0rENwjAQBdAsyDoMwBKMQOuS7Q4cYQlFT4cj + Badx8VL8hP+vYImIUzEciaFcbs/YgR3CUDCSYYcwFIxk2CEMBSMZdghDwUiGHcJQMJJhhzAUjGTYIQwF + Ixl2CEPBSIYdwlAwkmGHMBSMZNghDKWWbpVS4o3v1CEMRSNDD5B2gN71YvgpPhq3GLYfdNj1nbYYth90 + +O8BevftiO/Wx/Vxj1/qP1v5Vm9f/a6aB8wD5gHzgPVxJoYjMRwnlhd3GhRitUujhAAAAABJRU5ErkJg + gg== diff --git a/EDMI_ClientSuite/frmMain.vb b/EDMI_ClientSuite/frmMain.vb index f614096c..289d236e 100644 --- a/EDMI_ClientSuite/frmMain.vb +++ b/EDMI_ClientSuite/frmMain.vb @@ -24,10 +24,13 @@ Public Class frmMain ' Initialize Form Related Variables My.MainForm = Me + + ' Initialize Common Functions + My.Common = New ClassCommon(My.LogConfig) End Sub - Private Sub SetOnlineLabel() - If My.Application.Service.Online Then + Private Sub SetOnlineLabel(Online As Boolean) + If Online Then LabelServiceOnline.Visibility = DevExpress.XtraBars.BarItemVisibility.Always LabelServiceOffline.Visibility = DevExpress.XtraBars.BarItemVisibility.Never Else @@ -37,7 +40,7 @@ Public Class frmMain End Sub Private Sub HandleOnlineChanged(sender As Object, Online As Boolean) - SetOnlineLabel() + SetOnlineLabel(Online) End Sub Private Sub FrmMain_Load(sender As Object, e As EventArgs) Handles Me.Load @@ -50,7 +53,7 @@ Public Class frmMain _PanelManager = New ClassPanelManager(My.LogConfig, DocumentManager, DockManager) ' Show Service Status Label - SetOnlineLabel() + SetOnlineLabel(True) ' Apply Selected Skin Style UserLookAndFeel.Default.SetSkinStyle(My.UIConfig.SkinName) @@ -216,4 +219,8 @@ Public Class frmMain e.Cancel = True End Sub + + Private Sub BarButtonItem4_ItemClick(sender As Object, e As DevExpress.XtraBars.ItemClickEventArgs) Handles BarButtonItem4.ItemClick + + End Sub End Class \ No newline at end of file From 968435c3f7612041b2c21e4840d844542c78ec96 Mon Sep 17 00:00:00 2001 From: Jonathan Jenne Date: Fri, 22 Mar 2019 16:26:15 +0100 Subject: [PATCH 06/25] First Pass of new control loader add BaseClass that provides Logger --- EDMI_ClientSuite/Base/BaseClass.vb | 13 ++ .../{FormDefaults => Base}/BaseForm.vb | 0 .../{FormDefaults => Base}/BaseRibbonForm.vb | 0 EDMI_ClientSuite/ClassControlLoader.vb | 57 +++++++++ EDMI_ClientSuite/ClassService.vb | 16 +-- EDMI_ClientSuite/ClassTimer.vb | 16 +-- EDMI_ClientSuite/ClientSuite.vbproj | 23 +++- .../frmFormDesigner.Designer.vb | 13 +- .../FormEntityDesigner/frmFormDesigner.vb | 66 ++-------- .../FormUserManager/frmUserManager.vb | 10 +- .../FormWorkflow/frmWorkflowStep.Designer.vb | 108 ++++++++++++++++ .../FormWorkflow/frmWorkflowStep.resx | 120 ++++++++++++++++++ .../FormWorkflow/frmWorkflowStep.vb | 3 + EDMI_ClientSuite/My Project/AssemblyInfo.vb | 2 +- .../My Project/Resources.Designer.vb | 10 ++ EDMI_ClientSuite/My Project/Resources.resx | 7 +- EDMI_ClientSuite/Resources/CheckBox.png | Bin 0 -> 229 bytes EDMI_ClientSuite/_TEST/frmDocTest.vb | 7 +- 18 files changed, 378 insertions(+), 93 deletions(-) create mode 100644 EDMI_ClientSuite/Base/BaseClass.vb rename EDMI_ClientSuite/{FormDefaults => Base}/BaseForm.vb (100%) rename EDMI_ClientSuite/{FormDefaults => Base}/BaseRibbonForm.vb (100%) create mode 100644 EDMI_ClientSuite/ClassControlLoader.vb create mode 100644 EDMI_ClientSuite/FormWorkflow/frmWorkflowStep.Designer.vb create mode 100644 EDMI_ClientSuite/FormWorkflow/frmWorkflowStep.resx create mode 100644 EDMI_ClientSuite/FormWorkflow/frmWorkflowStep.vb create mode 100644 EDMI_ClientSuite/Resources/CheckBox.png diff --git a/EDMI_ClientSuite/Base/BaseClass.vb b/EDMI_ClientSuite/Base/BaseClass.vb new file mode 100644 index 00000000..c26058a1 --- /dev/null +++ b/EDMI_ClientSuite/Base/BaseClass.vb @@ -0,0 +1,13 @@ +Imports DigitalData.Modules.Logging + +Public Class BaseClass + Protected LogConfig As LogConfig + Protected Logger As Logger + + Public Sub New(LogConfig As LogConfig) + Dim oClassName = Me.GetType().Name + + Me.LogConfig = LogConfig + Me.Logger = LogConfig.GetLogger(oClassName) + End Sub +End Class diff --git a/EDMI_ClientSuite/FormDefaults/BaseForm.vb b/EDMI_ClientSuite/Base/BaseForm.vb similarity index 100% rename from EDMI_ClientSuite/FormDefaults/BaseForm.vb rename to EDMI_ClientSuite/Base/BaseForm.vb diff --git a/EDMI_ClientSuite/FormDefaults/BaseRibbonForm.vb b/EDMI_ClientSuite/Base/BaseRibbonForm.vb similarity index 100% rename from EDMI_ClientSuite/FormDefaults/BaseRibbonForm.vb rename to EDMI_ClientSuite/Base/BaseRibbonForm.vb diff --git a/EDMI_ClientSuite/ClassControlLoader.vb b/EDMI_ClientSuite/ClassControlLoader.vb new file mode 100644 index 00000000..bbb02219 --- /dev/null +++ b/EDMI_ClientSuite/ClassControlLoader.vb @@ -0,0 +1,57 @@ +Imports DevExpress.XtraEditors +Imports DevExpress.XtraLayout +Imports DigitalData.Controls.LookupGrid +Imports DigitalData.Modules.Logging + +Public Class ClassControlLoader + Inherits BaseClass + + Public Sub New(LogConfig As LogConfig) + MyBase.New(LogConfig) + End Sub + + Public Sub LoadControls(Datatable As DataTable, LayoutControlGroup As LayoutControlGroup) + For Each oRow As DataRow In Datatable.Rows + Dim oCaption As String = oRow.Item("COLNAME") + Dim oControlType As String = oRow.Item("CTRLTYPE") + Dim oControlId As String = oRow.Item("RECORD_ID").ToString + Dim oEditor As BaseEdit = CreateLayoutControl(oControlType, oControlId) + + If oEditor Is Nothing Then + Continue For + End If + + LayoutControlGroup.AddItem(oCaption, oEditor) + Next + + LayoutControlGroup.AddItem(New EmptySpaceItem()) + End Sub + + Public Function CreateLayoutControl(Type As String, Name As String) + Dim oEditor As BaseEdit = Nothing + + Logger.Debug("Create new Control of type {0} with name {1}", Type, Name) + + Select Case Type + Case ClassConstants.CONTROL_TEXTEDIT + Dim oTextEdit As New TextEdit() With {.Name = Name} + oEditor = oTextEdit + Case ClassConstants.CONTROL_MEMOEDIT + Dim oMemoEdit As New MemoEdit() With {.Name = Name} + oEditor = oMemoEdit + Case ClassConstants.CONTROL_DATEEDIT + Dim oDateEdit As New DateEdit() With {.Name = Name} + oEditor = oDateEdit + Case ClassConstants.CONTROL_CHECKEDIT + Dim oCheckEdit As New CheckEdit() With {.Name = Name} + oEditor = oCheckEdit + Case ClassConstants.CONTROL_COMBOEDIT + Dim oComboEdit As New LookupControl2() With {.Name = Name} + oEditor = oComboEdit + Case Else + oEditor = Nothing + End Select + + Return oEditor + End Function +End Class diff --git a/EDMI_ClientSuite/ClassService.vb b/EDMI_ClientSuite/ClassService.vb index b6214241..68764999 100644 --- a/EDMI_ClientSuite/ClassService.vb +++ b/EDMI_ClientSuite/ClassService.vb @@ -4,8 +4,7 @@ Imports DigitalData.Modules.Logging Imports DigitalData.Modules.EDMIFileOps.EDMIServiceReference Public Class ClassService - Private ReadOnly _LogConfig As LogConfig - Private ReadOnly _Logger As Logger + Inherits BaseClass Public Enum ConnectionTestResult Successful @@ -15,8 +14,7 @@ Public Class ClassService End Enum Public Sub New(LogConfig As LogConfig) - _LogConfig = LogConfig - _Logger = _LogConfig.GetLogger() + MyBase.New(LogConfig) End Sub Public Function TestConnection() As ConnectionTestResult @@ -33,10 +31,10 @@ Public Class ClassService Return ConnectionTestResult.Successful Catch ex As EndpointNotFoundException - _Logger.Error(ex) + Logger.Error(ex) Return ConnectionTestResult.NotFound Catch ex As Exception - _Logger.Error(ex) + Logger.Error(ex) Return ConnectionTestResult.Unknown End Try End Function @@ -56,13 +54,13 @@ Public Class ClassService Return ConnectionTestResult.Successful Catch ex As EndpointNotFoundException - _Logger.Error(ex) + Logger.Error(ex) Return ConnectionTestResult.NotFound Catch ex As UriFormatException - _Logger.Error(ex) + Logger.Error(ex) Return ConnectionTestResult.EmptyURI Catch ex As Exception - _Logger.Error(ex) + Logger.Error(ex) Return ConnectionTestResult.Unknown End Try End Function) diff --git a/EDMI_ClientSuite/ClassTimer.vb b/EDMI_ClientSuite/ClassTimer.vb index 7862b158..7a02f880 100644 --- a/EDMI_ClientSuite/ClassTimer.vb +++ b/EDMI_ClientSuite/ClassTimer.vb @@ -5,6 +5,8 @@ Imports DigitalData.Modules.EDMIFileOps.EDMIServiceReference Imports DigitalData.Modules.Logging Public Class ClassTimer + Inherits BaseClass + Private _Callback As TimerCallback Private _LogConfig As LogConfig Private _Logger As Logger @@ -15,10 +17,9 @@ Public Class ClassTimer Public Delegate Sub OnlineChangedEventHandler(sender As Object, Online As Boolean) Public Sub New(LogConfig As LogConfig, SynchronizingObject As frmMain, HeartbeatInterval As Integer) - Try - _LogConfig = LogConfig - _Logger = LogConfig.GetLogger() + MyBase.New(LogConfig) + Try _Channel = My.ChannelFactory.CreateChannel() _Channel.Open() @@ -29,13 +30,13 @@ Public Class ClassTimer AddHandler _Timer.Elapsed, AddressOf Callback Catch ex As Exception - _Logger.Error(ex) + Logger.Error(ex) End Try End Sub Public Async Sub Callback(sender As Object, e As ElapsedEventArgs) Try - _Logger.Debug("Checking if Service is up...") + Logger.Debug("Checking if Service is up...") If _Channel.State = ServiceModel.CommunicationState.Faulted Then _Channel = My.ChannelFactory.CreateChannel() @@ -44,12 +45,11 @@ Public Class ClassTimer ' Connect to service and send hearbeat request Dim oResult = Await _Channel.HeartbeatAsync() - - _Logger.Debug("Service is online") + Logger.Debug("Service is online") SetOnlineState(True) Catch ex As Exception - _Logger.Debug("Service is offline!") + Logger.Debug("Service is offline!") SetOnlineState(False) Finally diff --git a/EDMI_ClientSuite/ClientSuite.vbproj b/EDMI_ClientSuite/ClientSuite.vbproj index 73b9b4f0..6c6e2082 100644 --- a/EDMI_ClientSuite/ClientSuite.vbproj +++ b/EDMI_ClientSuite/ClientSuite.vbproj @@ -127,9 +127,12 @@ - + + + + @@ -139,6 +142,7 @@ + @@ -147,6 +151,12 @@ Form + + frmWorkflowStep.vb + + + Form + frmSearch.vb @@ -206,10 +216,10 @@ Form - + Form - + Form @@ -311,6 +321,9 @@ frmFormDesigner.vb + + frmWorkflowStep.vb + frmSearch.vb @@ -467,5 +480,9 @@ + + + + \ No newline at end of file diff --git a/EDMI_ClientSuite/FormEntityDesigner/frmFormDesigner.Designer.vb b/EDMI_ClientSuite/FormEntityDesigner/frmFormDesigner.Designer.vb index 03f929b7..759e552e 100644 --- a/EDMI_ClientSuite/FormEntityDesigner/frmFormDesigner.Designer.vb +++ b/EDMI_ClientSuite/FormEntityDesigner/frmFormDesigner.Designer.vb @@ -31,6 +31,7 @@ Partial Class frmFormDesigner Me.ToolboxItemMemoedit = New DevExpress.XtraToolbox.ToolboxItem() Me.ToolboxItemDatepicker = New DevExpress.XtraToolbox.ToolboxItem() Me.ToolboxItemCombobox = New DevExpress.XtraToolbox.ToolboxItem() + Me.ToolboxItemCheckbox = New DevExpress.XtraToolbox.ToolboxItem() Me.RibbonPageGroup1 = New DevExpress.XtraBars.Ribbon.RibbonPageGroup() Me.XtraTabControl1 = New DevExpress.XtraTab.XtraTabControl() Me.XtraTabPageControls = New DevExpress.XtraTab.XtraTabPage() @@ -105,7 +106,6 @@ Partial Class frmFormDesigner Me.ToolboxControlMain.Name = "ToolboxControlMain" Me.ToolboxControlMain.OptionsMinimizing.AllowMinimizing = False Me.ToolboxControlMain.OptionsView.ShowMenuButton = False - Me.ToolboxControlMain.OptionsView.ShowToolboxCaption = True Me.ToolboxControlMain.SelectedGroup = Me.ToolboxGroupMain Me.ToolboxControlMain.SelectedGroupIndex = 0 Me.ToolboxControlMain.Size = New System.Drawing.Size(232, 337) @@ -120,6 +120,7 @@ Partial Class frmFormDesigner Me.ToolboxGroupMain.Items.Add(Me.ToolboxItemMemoedit) Me.ToolboxGroupMain.Items.Add(Me.ToolboxItemDatepicker) Me.ToolboxGroupMain.Items.Add(Me.ToolboxItemCombobox) + Me.ToolboxGroupMain.Items.Add(Me.ToolboxItemCheckbox) Me.ToolboxGroupMain.Name = "ToolboxGroupMain" ' 'ToolboxItemTextbox @@ -154,6 +155,14 @@ Partial Class frmFormDesigner Me.ToolboxItemCombobox.Name = "ToolboxItemCombobox" Me.ToolboxItemCombobox.Tag = "Combobox" ' + 'ToolboxItemCheckbox + ' + Me.ToolboxItemCheckbox.BeginGroupCaption = Nothing + Me.ToolboxItemCheckbox.Caption = "Checkbox" + Me.ToolboxItemCheckbox.ImageOptions.Image = Global.DigitalData.GUIs.ClientSuite.My.Resources.Resources.CheckBox + Me.ToolboxItemCheckbox.Name = "ToolboxItemCheckbox" + Me.ToolboxItemCheckbox.Tag = "Checkbox" + ' 'RibbonPageGroup1 ' Me.RibbonPageGroup1.Name = "RibbonPageGroup1" @@ -162,6 +171,7 @@ Partial Class frmFormDesigner 'XtraTabControl1 ' Me.XtraTabControl1.Dock = System.Windows.Forms.DockStyle.Fill + Me.XtraTabControl1.HeaderLocation = DevExpress.XtraTab.TabHeaderLocation.Bottom Me.XtraTabControl1.Location = New System.Drawing.Point(0, 0) Me.XtraTabControl1.Name = "XtraTabControl1" Me.XtraTabControl1.SelectedTabPage = Me.XtraTabPageControls @@ -250,4 +260,5 @@ Partial Class frmFormDesigner Friend WithEvents PropertyGridControl1 As DevExpress.XtraVerticalGrid.PropertyGridControl Friend WithEvents SplitContainerMain As DevExpress.XtraEditors.SplitContainerControl Friend WithEvents ToolboxItemCombobox As DevExpress.XtraToolbox.ToolboxItem + Friend WithEvents ToolboxItemCheckbox As DevExpress.XtraToolbox.ToolboxItem End Class diff --git a/EDMI_ClientSuite/FormEntityDesigner/frmFormDesigner.vb b/EDMI_ClientSuite/FormEntityDesigner/frmFormDesigner.vb index d0428835..833a63ac 100644 --- a/EDMI_ClientSuite/FormEntityDesigner/frmFormDesigner.vb +++ b/EDMI_ClientSuite/FormEntityDesigner/frmFormDesigner.vb @@ -7,6 +7,9 @@ Imports DevExpress.XtraLayout.HitInfo Imports DigitalData.Controls.LookupGrid Public Class frmFormDesigner + Private _FormId As Int64 + Private _ControlLoader As ClassControlLoader + #Region "Drag Helper" Private _DragItem As BaseLayoutItem Private _Window As DragFrameWindow @@ -42,7 +45,7 @@ Public Class frmFormDesigner Dim oHitInfo As BaseLayoutItemHitInfo = LayoutControlMain.CalcHitInfo(oPosition) Dim oLayoutControl As LayoutControlItem = DirectCast(_DragItem, LayoutControlItem) Dim oControlName As String = oLayoutControl.Tag & ClassUtils.ShortGUID() - Dim oControl As Control = GetControl(oLayoutControl.Tag, oControlName) + Dim oControl As Control = _ControlLoader.CreateLayoutControl(oLayoutControl.Tag, oControlName) If oLayoutControl IsNot Nothing Then HideDragHelper() @@ -84,7 +87,7 @@ Public Class frmFormDesigner End Sub #End Region - Private _FormId As Int64 + Public Sub New() ' Dieser Aufruf ist für den Designer erforderlich. @@ -100,69 +103,18 @@ Public Class frmFormDesigner _FormId = FormId End Sub - Private Sub frmFormDesigner_Load(sender As Object, e As EventArgs) Handles MyBase.Load - My.Channel.CreateDatabaseRequest("Load Controls", True) + Private Async Sub frmFormDesigner_Load(sender As Object, e As EventArgs) Handles MyBase.Load + _ControlLoader = New ClassControlLoader(My.LogConfig) - Dim oSQL As String = $"SELECT * FROM VWICM_FORMCONTROL WHERE FORMID = {_FormId}" - Dim oResult = My.Channel.ReturnDatatable(oSQL) - Dim oTable = oResult.Table + Dim oTable = Await My.Common.Views.VWICM_FORM_CONTROL(_FormId) - If Not oResult.OK Then - ShowErrorMessage(New ApplicationException(oResult.ErrorMessage)) - End If - - My.Channel.CloseDatabaseRequest() - - LoadControls(oTable) + _ControlLoader.LoadControls(oTable, LayoutControlGroupMain) End Sub - Private Function GetControl(Type As String, Name As String) - Dim oEditor As BaseEdit = Nothing - - Select Case Type - Case ClassConstants.CONTROL_TEXTEDIT - Dim oTextEdit As New TextEdit() With {.Name = Name} - oEditor = oTextEdit - Case ClassConstants.CONTROL_MEMOEDIT - Dim oMemoEdit As New MemoEdit() With {.Name = Name} - oEditor = oMemoEdit - Case ClassConstants.CONTROL_DATEEDIT - Dim oDateEdit As New DateEdit() With {.Name = Name} - oEditor = oDateEdit - Case ClassConstants.CONTROL_CHECKEDIT - Dim oCheckEdit As New CheckEdit() With {.Name = Name} - oEditor = oCheckEdit - Case ClassConstants.CONTROL_COMBOEDIT - Dim oComboEdit As New LookupControl2() With {.Name = Name} - oEditor = oComboEdit - Case Else - oEditor = Nothing - End Select - - Return oEditor - End Function - Private Function CreateLayoutControlItem(Id As String) As LayoutControlItem Return New LayoutControlItem() With {.Tag = Id} End Function - Private Sub LoadControls(Datatable As DataTable) - For Each oRow As DataRow In Datatable.Rows - Dim oCaption As String = oRow.Item("COLNAME") - Dim oControlType As String = oRow.Item("CTRLTYPE") - Dim oControlId As String = oRow.Item("RECORD_ID").ToString - Dim oEditor As BaseEdit = GetControl(oControlType, oControlId) - - If oEditor Is Nothing Then - Continue For - End If - - LayoutControlGroupMain.AddItem(oCaption, oEditor) - Next - - LayoutControlGroupMain.AddItem(New EmptySpaceItem()) - End Sub - Private Sub LayoutControlMain_ItemSelectionChanged(sender As Object, e As EventArgs) Handles LayoutControlMain.ItemSelectionChanged ' TODO: Load Property Grid for selected item End Sub diff --git a/EDMI_ClientSuite/FormUserManager/frmUserManager.vb b/EDMI_ClientSuite/FormUserManager/frmUserManager.vb index 6c5d732d..325823d1 100644 --- a/EDMI_ClientSuite/FormUserManager/frmUserManager.vb +++ b/EDMI_ClientSuite/FormUserManager/frmUserManager.vb @@ -2,7 +2,6 @@ Public Class frmUserManager Private _Logger As Logger - Private _CommonCommands As ClassCommonCommands Private _UserTable As DataTable Private _GroupTable As DataTable @@ -18,7 +17,6 @@ Public Class frmUserManager ' Fügen Sie Initialisierungen nach dem InitializeComponent()-Aufruf hinzu. _Logger = My.LogConfig.GetLogger() - _CommonCommands = New ClassCommonCommands(My.LogConfig) End Sub Private Async Sub frmUserManager_Load(sender As Object, e As EventArgs) Handles MyBase.Load @@ -98,25 +96,25 @@ Public Class frmUserManager End Function Private Async Sub HandleUserAddedToGroup(GroupId As Integer, UserId As Integer, RelationRecordId As Integer) - Dim oRecordId = Await _CommonCommands.FNICM_RADM_NEW_USER2GROUP(UserId, GroupId) + Dim oRecordId = Await My.Common.Commands.FNICM_RADM_NEW_USER2GROUP(UserId, GroupId) Await UpdateDataAsync() End Sub Private Async Sub HandleUserRemovedFromGroup(GroupId As Integer, UserId As Integer, RelationRecordId As Integer) - Dim oResult = Await _CommonCommands.FNICM_DELETE_RECORD_FINALLY(RelationRecordId) + Dim oResult = Await My.Common.Commands.FNICM_DELETE_RECORD_FINALLY(RelationRecordId) Await UpdateDataAsync() End Sub Private Async Sub HandleGroupAddedToGroup(ParentGroupId As Integer, GroupId As Integer, RelationRecordId As Integer) - Dim oRecordId = Await _CommonCommands.FNICM_RADM_NEW_GROUP2GROUP(GroupId, ParentGroupId) + Dim oRecordId = Await My.Common.Commands.FNICM_RADM_NEW_GROUP2GROUP(GroupId, ParentGroupId) Await UpdateDataAsync() End Sub Private Async Sub HandleGroupRemovedFromGroup(ParentGroupId As Integer, GroupId As Integer, RelationRecordId As Integer) - Dim oResult = Await _CommonCommands.FNICM_DELETE_RECORD_FINALLY(RelationRecordId) + Dim oResult = Await My.Common.Commands.FNICM_DELETE_RECORD_FINALLY(RelationRecordId) Await UpdateDataAsync() End Sub diff --git a/EDMI_ClientSuite/FormWorkflow/frmWorkflowStep.Designer.vb b/EDMI_ClientSuite/FormWorkflow/frmWorkflowStep.Designer.vb new file mode 100644 index 00000000..a81230a0 --- /dev/null +++ b/EDMI_ClientSuite/FormWorkflow/frmWorkflowStep.Designer.vb @@ -0,0 +1,108 @@ + _ +Partial Class frmWorkflowStep + Inherits DevExpress.XtraBars.Ribbon.RibbonForm + + 'Form overrides dispose to clean up the component list. + _ + Protected Overrides Sub Dispose(ByVal disposing As Boolean) + If disposing AndAlso components IsNot Nothing Then + components.Dispose() + End If + MyBase.Dispose(disposing) + End Sub + + 'Required by the Windows Form Designer + Private components As System.ComponentModel.IContainer + + 'NOTE: The following procedure is required by the Windows Form Designer + 'It can be modified using the Windows Form Designer. + 'Do not modify it using the code editor. + _ + Private Sub InitializeComponent() + Me.components = New System.ComponentModel.Container() + Me.RibbonControl = New DevExpress.XtraBars.Ribbon.RibbonControl() + Me.RibbonPage1 = New DevExpress.XtraBars.Ribbon.RibbonPage() + Me.RibbonPageGroup1 = New DevExpress.XtraBars.Ribbon.RibbonPageGroup() + Me.RibbonStatusBar = New DevExpress.XtraBars.Ribbon.RibbonStatusBar() + Me.LayoutControl1 = New DevExpress.XtraLayout.LayoutControl() + Me.LayoutControlGroup1 = New DevExpress.XtraLayout.LayoutControlGroup() + CType(Me.RibbonControl, System.ComponentModel.ISupportInitialize).BeginInit() + CType(Me.LayoutControl1, System.ComponentModel.ISupportInitialize).BeginInit() + CType(Me.LayoutControlGroup1, System.ComponentModel.ISupportInitialize).BeginInit() + Me.SuspendLayout() + ' + 'RibbonControl + ' + Me.RibbonControl.ExpandCollapseItem.Id = 0 + Me.RibbonControl.Items.AddRange(New DevExpress.XtraBars.BarItem() {Me.RibbonControl.ExpandCollapseItem}) + Me.RibbonControl.Location = New System.Drawing.Point(0, 0) + Me.RibbonControl.MaxItemId = 1 + Me.RibbonControl.Name = "RibbonControl" + Me.RibbonControl.Pages.AddRange(New DevExpress.XtraBars.Ribbon.RibbonPage() {Me.RibbonPage1}) + Me.RibbonControl.Size = New System.Drawing.Size(991, 146) + Me.RibbonControl.StatusBar = Me.RibbonStatusBar + ' + 'RibbonPage1 + ' + Me.RibbonPage1.Groups.AddRange(New DevExpress.XtraBars.Ribbon.RibbonPageGroup() {Me.RibbonPageGroup1}) + Me.RibbonPage1.Name = "RibbonPage1" + Me.RibbonPage1.Text = "RibbonPage1" + ' + 'RibbonPageGroup1 + ' + Me.RibbonPageGroup1.Name = "RibbonPageGroup1" + Me.RibbonPageGroup1.Text = "RibbonPageGroup1" + ' + 'RibbonStatusBar + ' + Me.RibbonStatusBar.Location = New System.Drawing.Point(0, 494) + Me.RibbonStatusBar.Name = "RibbonStatusBar" + Me.RibbonStatusBar.Ribbon = Me.RibbonControl + Me.RibbonStatusBar.Size = New System.Drawing.Size(991, 21) + ' + 'LayoutControl1 + ' + Me.LayoutControl1.Dock = System.Windows.Forms.DockStyle.Fill + Me.LayoutControl1.Location = New System.Drawing.Point(0, 146) + Me.LayoutControl1.Name = "LayoutControl1" + Me.LayoutControl1.Root = Me.LayoutControlGroup1 + Me.LayoutControl1.Size = New System.Drawing.Size(991, 348) + Me.LayoutControl1.TabIndex = 2 + Me.LayoutControl1.Text = "LayoutControl1" + ' + 'LayoutControlGroup1 + ' + Me.LayoutControlGroup1.EnableIndentsWithoutBorders = DevExpress.Utils.DefaultBoolean.[True] + Me.LayoutControlGroup1.GroupBordersVisible = False + Me.LayoutControlGroup1.Name = "LayoutControlGroup1" + Me.LayoutControlGroup1.Size = New System.Drawing.Size(991, 348) + Me.LayoutControlGroup1.TextVisible = False + ' + 'frmWorkflowStep + ' + Me.AutoScaleDimensions = New System.Drawing.SizeF(6.0!, 13.0!) + Me.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font + Me.ClientSize = New System.Drawing.Size(991, 515) + Me.Controls.Add(Me.LayoutControl1) + Me.Controls.Add(Me.RibbonStatusBar) + Me.Controls.Add(Me.RibbonControl) + Me.Name = "frmWorkflowStep" + Me.Ribbon = Me.RibbonControl + Me.StatusBar = Me.RibbonStatusBar + Me.Text = "frmWorkflowStep" + CType(Me.RibbonControl, System.ComponentModel.ISupportInitialize).EndInit() + CType(Me.LayoutControl1, System.ComponentModel.ISupportInitialize).EndInit() + CType(Me.LayoutControlGroup1, System.ComponentModel.ISupportInitialize).EndInit() + Me.ResumeLayout(False) + Me.PerformLayout() + + End Sub + + Friend WithEvents RibbonControl As DevExpress.XtraBars.Ribbon.RibbonControl + Friend WithEvents RibbonPage1 As DevExpress.XtraBars.Ribbon.RibbonPage + Friend WithEvents RibbonPageGroup1 As DevExpress.XtraBars.Ribbon.RibbonPageGroup + Friend WithEvents RibbonStatusBar As DevExpress.XtraBars.Ribbon.RibbonStatusBar + Friend WithEvents LayoutControl1 As DevExpress.XtraLayout.LayoutControl + Friend WithEvents LayoutControlGroup1 As DevExpress.XtraLayout.LayoutControlGroup + +End Class diff --git a/EDMI_ClientSuite/FormWorkflow/frmWorkflowStep.resx b/EDMI_ClientSuite/FormWorkflow/frmWorkflowStep.resx new file mode 100644 index 00000000..1af7de15 --- /dev/null +++ b/EDMI_ClientSuite/FormWorkflow/frmWorkflowStep.resx @@ -0,0 +1,120 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + text/microsoft-resx + + + 2.0 + + + System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + \ No newline at end of file diff --git a/EDMI_ClientSuite/FormWorkflow/frmWorkflowStep.vb b/EDMI_ClientSuite/FormWorkflow/frmWorkflowStep.vb new file mode 100644 index 00000000..16ec780b --- /dev/null +++ b/EDMI_ClientSuite/FormWorkflow/frmWorkflowStep.vb @@ -0,0 +1,3 @@ +Public Class frmWorkflowStep + +End Class \ No newline at end of file diff --git a/EDMI_ClientSuite/My Project/AssemblyInfo.vb b/EDMI_ClientSuite/My Project/AssemblyInfo.vb index 62b1fa6b..92efcbed 100644 --- a/EDMI_ClientSuite/My Project/AssemblyInfo.vb +++ b/EDMI_ClientSuite/My Project/AssemblyInfo.vb @@ -12,7 +12,7 @@ Imports System.Runtime.InteropServices - + diff --git a/EDMI_ClientSuite/My Project/Resources.Designer.vb b/EDMI_ClientSuite/My Project/Resources.Designer.vb index 6b5f1bee..ae8e333e 100644 --- a/EDMI_ClientSuite/My Project/Resources.Designer.vb +++ b/EDMI_ClientSuite/My Project/Resources.Designer.vb @@ -60,6 +60,16 @@ Namespace My.Resources End Set End Property + ''' + ''' Sucht eine lokalisierte Ressource vom Typ System.Drawing.Bitmap. + ''' + Friend ReadOnly Property CheckBox() As System.Drawing.Bitmap + Get + Dim obj As Object = ResourceManager.GetObject("CheckBox", resourceCulture) + Return CType(obj,System.Drawing.Bitmap) + End Get + End Property + ''' ''' Sucht eine lokalisierte Ressource vom Typ System.Drawing.Bitmap. ''' diff --git a/EDMI_ClientSuite/My Project/Resources.resx b/EDMI_ClientSuite/My Project/Resources.resx index b7e38bfa..c89d87db 100644 --- a/EDMI_ClientSuite/My Project/Resources.resx +++ b/EDMI_ClientSuite/My Project/Resources.resx @@ -127,10 +127,13 @@ ..\Resources\DatePicker.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a + + ..\Resources\ComboBox.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a + ..\Resources\user_16xLG.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a - - ..\Resources\ComboBox.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a + + ..\Resources\CheckBox.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a \ No newline at end of file diff --git a/EDMI_ClientSuite/Resources/CheckBox.png b/EDMI_ClientSuite/Resources/CheckBox.png new file mode 100644 index 0000000000000000000000000000000000000000..d7cb93f410080b2cabd65a8484f8229f78e1a244 GIT binary patch literal 229 zcmeAS@N?(olHy`uVBq!ia0vp^0wB!61|;P_|4#%`jKx9jP7LeL$-D$|SkfJR9T^xl z_H+M9WCij$3p^r=85sBugD~Uq{1quc!75J|#}Etuu0$e#AnZrJ|H$BhrvVHL->TkBwmN@b5ocv;lxVoy| z*?A*JJ%eGBTFy3M6NV)W%LFZ-Oib=b&^Zv(DDz20(m})UVF}~P%BHHy#z}8@7@n+o UzRoW-736LPPgg&ebxsLQ0IeBLApigX literal 0 HcmV?d00001 diff --git a/EDMI_ClientSuite/_TEST/frmDocTest.vb b/EDMI_ClientSuite/_TEST/frmDocTest.vb index cd000db4..e2fb3014 100644 --- a/EDMI_ClientSuite/_TEST/frmDocTest.vb +++ b/EDMI_ClientSuite/_TEST/frmDocTest.vb @@ -1,8 +1,6 @@ Imports DevExpress.XtraGrid Public Class frmDocTest - Private _CommonCommands As ClassCommonCommands - Private Sub DocTest_Load(sender As Object, e As EventArgs) Handles MyBase.Load Try Dim oControlPatcher = New ClassControlPatcher(Of GridControl)(Me) @@ -10,8 +8,6 @@ Public Class frmDocTest ProcessContainer(AddressOf GridControlDefaults.DefaultGridSettings). ProcessContainer(AddressOf GridControlDefaults.ReadOnlyGridSettings) - _CommonCommands = New ClassCommonCommands(My.LogConfig) - Dim oSQL = "SELECT * FROM VWICM_DOC_METADATA_DE" My.Channel.CreateDatabaseRequest("Load Doc Values", True) @@ -26,7 +22,6 @@ Public Class frmDocTest Dim oDatatable As DataTable = oResult.Table - txtDoctype.DataBindings.Add(New Binding("Text", oDatatable, "DOCTYPE")) txtDocId.DataBindings.Add(New Binding("Text", oDatatable, "DOC_ID")) @@ -40,7 +35,7 @@ Public Class frmDocTest Dim oDocId As Int64 = Int64.Parse(txtDocId.Text) Dim oValue As String = txtDoctype.Text Dim oSyskey As String = "001-DOCTYPE" - Dim oResult = Await _CommonCommands.FNICM_NEW_DOC_VALUE(oDocId, oSyskey, My.Application.User.Language, oValue) + Dim oResult = Await My.Common.Commands.FNICM_NEW_DOC_VALUE(oDocId, oSyskey, My.Application.User.Language, oValue) If Not oResult.OK Then MsgBox(oResult.ErrorMessage) From c1dc7fcc229f4f792cb8b87076c5768c1a8bb970 Mon Sep 17 00:00:00 2001 From: Jonathan Jenne Date: Tue, 26 Mar 2019 16:17:40 +0100 Subject: [PATCH 07/25] Prepare Loading Control Properties in Property Grid, Preload Controls with Data in Workflow Form --- EDMI_ClientSuite/Base/BaseClass.vb | 3 + EDMI_ClientSuite/Base/BaseRibbonForm.vb | 4 + EDMI_ClientSuite/ClassControlData.vb | 35 +++ EDMI_ClientSuite/ClassControlLoader.vb | 51 +++- EDMI_ClientSuite/ClientSuite.vbproj | 23 +- EDMI_ClientSuite/Common/ClassCommonViews.vb | 22 ++ .../FormEntityDesigner/ClassControlBuilder.vb | 70 ----- .../ClassControlMetadata.vb | 4 + .../FormEntityDesigner/ClassControlUtils.vb | 14 - .../BaseClasses/ClassBaseProperties.vb | 23 -- .../BaseClasses/ClassInputProperties.vb | 27 -- .../BaseClasses/ClassMultiInputProperties.vb | 20 -- .../Controls/ClassComboboxProperties.vb | 12 +- .../Controls/ClassLabelProperties.vb | 14 - .../Controls/ClassTextboxProperties.vb | 13 - .../ControlSnapPanel.Designer.vb | 47 ---- .../FormEntityDesigner/ControlSnapPanel.vb | 56 ---- .../frmEntityDesigner.Designer.vb | 242 ---------------- .../FormEntityDesigner/frmEntityDesigner.resx | 144 ---------- .../FormEntityDesigner/frmEntityDesigner.vb | 258 ------------------ .../frmFormDesigner.Designer.vb | 20 +- .../FormEntityDesigner/frmFormDesigner.vb | 24 +- .../FormWorkflow/frmWorkflowStep.Designer.vb | 32 +-- .../FormWorkflow/frmWorkflowStep.vb | 65 ++++- EDMI_ClientSuite/frmMain.Designer.vb | 13 +- EDMI_ClientSuite/frmMain.resx | 69 ++--- EDMI_ClientSuite/frmMain.vb | 11 +- 27 files changed, 263 insertions(+), 1053 deletions(-) create mode 100644 EDMI_ClientSuite/ClassControlData.vb delete mode 100644 EDMI_ClientSuite/FormEntityDesigner/ClassControlBuilder.vb create mode 100644 EDMI_ClientSuite/FormEntityDesigner/ClassControlMetadata.vb delete mode 100644 EDMI_ClientSuite/FormEntityDesigner/ClassControlUtils.vb delete mode 100644 EDMI_ClientSuite/FormEntityDesigner/ControlProperties/BaseClasses/ClassInputProperties.vb delete mode 100644 EDMI_ClientSuite/FormEntityDesigner/ControlProperties/BaseClasses/ClassMultiInputProperties.vb delete mode 100644 EDMI_ClientSuite/FormEntityDesigner/ControlProperties/Controls/ClassLabelProperties.vb delete mode 100644 EDMI_ClientSuite/FormEntityDesigner/ControlProperties/Controls/ClassTextboxProperties.vb delete mode 100644 EDMI_ClientSuite/FormEntityDesigner/ControlSnapPanel.Designer.vb delete mode 100644 EDMI_ClientSuite/FormEntityDesigner/ControlSnapPanel.vb delete mode 100644 EDMI_ClientSuite/FormEntityDesigner/frmEntityDesigner.Designer.vb delete mode 100644 EDMI_ClientSuite/FormEntityDesigner/frmEntityDesigner.resx delete mode 100644 EDMI_ClientSuite/FormEntityDesigner/frmEntityDesigner.vb diff --git a/EDMI_ClientSuite/Base/BaseClass.vb b/EDMI_ClientSuite/Base/BaseClass.vb index c26058a1..d8c0376a 100644 --- a/EDMI_ClientSuite/Base/BaseClass.vb +++ b/EDMI_ClientSuite/Base/BaseClass.vb @@ -1,5 +1,8 @@ Imports DigitalData.Modules.Logging +''' +''' Base Class which supplies a Logger/LogConfig +''' Public Class BaseClass Protected LogConfig As LogConfig Protected Logger As Logger diff --git a/EDMI_ClientSuite/Base/BaseRibbonForm.vb b/EDMI_ClientSuite/Base/BaseRibbonForm.vb index b130bb3f..8190b869 100644 --- a/EDMI_ClientSuite/Base/BaseRibbonForm.vb +++ b/EDMI_ClientSuite/Base/BaseRibbonForm.vb @@ -44,6 +44,10 @@ Public Class BaseRibbonForm _ErrorHandler.ShowErrorMessage(Exception) End Sub + Public Sub ShowErrorMessage(ErrorMessage As String) + _ErrorHandler.ShowErrorMessage(New Exception(ErrorMessage)) + End Sub + ''' ''' Returns a list of panels that will be show when the form is opened. ''' This can be overridden by all inheriting forms to extend the list of panels diff --git a/EDMI_ClientSuite/ClassControlData.vb b/EDMI_ClientSuite/ClassControlData.vb new file mode 100644 index 00000000..3c410de8 --- /dev/null +++ b/EDMI_ClientSuite/ClassControlData.vb @@ -0,0 +1,35 @@ +Imports DevExpress.XtraEditors +Imports DigitalData.Controls.LookupGrid +Imports DigitalData.Modules.Logging + +Public Class ClassControlData + Inherits BaseClass + + Public Sub New(LogConfig As LogConfig) + MyBase.New(LogConfig) + End Sub + + Public Sub LoadControlData(ByRef Controls As List(Of BaseEdit), Data As DataTable) + Dim oCounter = 0 + + For Each oControl As BaseEdit In Controls + Dim oBindingSource As New BindingSource(Data, Nothing) + + Select Case oControl.GetType + Case GetType(TextEdit) + oControl.DataBindings.Add("Text", oBindingSource, "CTRLVALUE", True, DataSourceUpdateMode.OnPropertyChanged) + Case GetType(MemoEdit) + oControl.DataBindings.Add("Text", oBindingSource, "CTRLVALUE", True, DataSourceUpdateMode.OnPropertyChanged) + Case GetType(DateEdit) + oControl.DataBindings.Add("Text", oBindingSource, "CTRLVALUE", True, DataSourceUpdateMode.OnPropertyChanged) + Case GetType(LookupControl2) + oControl.DataBindings.Add("Text", oBindingSource, "CTRLVALUE", True, DataSourceUpdateMode.OnPropertyChanged) + Case Else + + End Select + + oBindingSource.Position = oCounter + oCounter += 1 + Next + End Sub +End Class diff --git a/EDMI_ClientSuite/ClassControlLoader.vb b/EDMI_ClientSuite/ClassControlLoader.vb index bbb02219..b901ccb8 100644 --- a/EDMI_ClientSuite/ClassControlLoader.vb +++ b/EDMI_ClientSuite/ClassControlLoader.vb @@ -6,28 +6,71 @@ Imports DigitalData.Modules.Logging Public Class ClassControlLoader Inherits BaseClass - Public Sub New(LogConfig As LogConfig) + Private _LayoutControlGroup As LayoutControlGroup + Private _LayoutControls As List(Of BaseEdit) + + Public ReadOnly Property LayoutControls As List(Of BaseEdit) + Get + If _LayoutControls Is Nothing Then + _LayoutControls = New List(Of BaseEdit) + End If + Return _LayoutControls + End Get + End Property + + Public Sub New(LogConfig As LogConfig, LayoutControlGroup As LayoutControlGroup) MyBase.New(LogConfig) + _LayoutControlGroup = LayoutControlGroup + End Sub + + Public Sub AddControl(Name As String, Value As String, LayoutControlGroup As LayoutControlGroup) + Dim oTextEdit As New SimpleLabelItem() With { + .Name = Name, + .Text = Name & " - " & Value + } + + LayoutControlGroup.AddItem(oTextEdit) + End Sub + Public Sub AddControl(Name As String, Value As String) + AddControl(Name, Value, _LayoutControlGroup) + End Sub + + Public Sub AddSeparator(LayoutControlGroup As LayoutControlGroup) + Dim oSeparator = New SimpleSeparator() + + LayoutControlGroup.AddItem(oSeparator) + End Sub + Public Sub AddSeparator() + AddSeparator(_LayoutControlGroup) End Sub Public Sub LoadControls(Datatable As DataTable, LayoutControlGroup As LayoutControlGroup) For Each oRow As DataRow In Datatable.Rows Dim oCaption As String = oRow.Item("COLNAME") Dim oControlType As String = oRow.Item("CTRLTYPE") - Dim oControlId As String = oRow.Item("RECORD_ID").ToString - Dim oEditor As BaseEdit = CreateLayoutControl(oControlType, oControlId) + Dim oControlId As Int64 = oRow.Item("RECORD_ID") + Dim oEditor As BaseEdit = CreateLayoutControl(oControlType, oControlId, oControlId) If oEditor Is Nothing Then Continue For End If + oEditor.Tag = New ClassControlMetadata() With { + .Id = oControlId, + .Type = oControlType + } + + LayoutControls.Add(oEditor) LayoutControlGroup.AddItem(oCaption, oEditor) Next LayoutControlGroup.AddItem(New EmptySpaceItem()) End Sub + Public Sub LoadControls(Datatable As DataTable) + LoadControls(Datatable, _LayoutControlGroup) + End Sub - Public Function CreateLayoutControl(Type As String, Name As String) + Public Function CreateLayoutControl(Type As String, Name As String, Id As Int64) Dim oEditor As BaseEdit = Nothing Logger.Debug("Create new Control of type {0} with name {1}", Type, Name) diff --git a/EDMI_ClientSuite/ClientSuite.vbproj b/EDMI_ClientSuite/ClientSuite.vbproj index 6c6e2082..22654805 100644 --- a/EDMI_ClientSuite/ClientSuite.vbproj +++ b/EDMI_ClientSuite/ClientSuite.vbproj @@ -128,6 +128,7 @@ + @@ -145,6 +146,7 @@ + frmFormDesigner.vb @@ -188,15 +190,9 @@ Form - - - - - - frmStaticListEditor.vb @@ -204,18 +200,6 @@ Form - - ControlSnapPanel.vb - - - Component - - - frmEntityDesigner.vb - - - Form - Form @@ -342,9 +326,6 @@ frmStaticListEditor.vb - - frmEntityDesigner.vb - frmFileTest.vb diff --git a/EDMI_ClientSuite/Common/ClassCommonViews.vb b/EDMI_ClientSuite/Common/ClassCommonViews.vb index 41353080..6e09d655 100644 --- a/EDMI_ClientSuite/Common/ClassCommonViews.vb +++ b/EDMI_ClientSuite/Common/ClassCommonViews.vb @@ -30,4 +30,26 @@ Public Class ClassCommonViews Throw ex End Try End Function + + Public Async Function VWICM_WF_REQUESTCONTROLDATA(FormId As Int64, RequestId As Int64) As Task(Of DataTable) + Try + My.Channel.CreateDatabaseRequest("Load Control Data", True) + + Dim oSQL As String = $"SELECT * FROM VWICM_WF_REQUESTCONTROLDATA WHERE FORMID = {FormId} AND REQUESTID = {RequestId}" + Dim oResult = Await My.Channel.ReturnDatatableAsync(oSQL) + Dim oTable = oResult.Table + + If Not oResult.OK Then + _Logger.Error(New ApplicationException(oResult.ErrorMessage)) + Return Nothing + End If + + My.Channel.CloseDatabaseRequest() + + Return oResult.Table + Catch ex As Exception + _Logger.Error(ex) + Throw ex + End Try + End Function End Class diff --git a/EDMI_ClientSuite/FormEntityDesigner/ClassControlBuilder.vb b/EDMI_ClientSuite/FormEntityDesigner/ClassControlBuilder.vb deleted file mode 100644 index 1998a7d6..00000000 --- a/EDMI_ClientSuite/FormEntityDesigner/ClassControlBuilder.vb +++ /dev/null @@ -1,70 +0,0 @@ -Imports DigitalData.Controls.LookupGrid -Imports DigitalData.GUIs.ClientSuite.ClassControlUtils - -Public Class ClassControlBuilder -#Region "State" - Private _DesignMode As Boolean -#End Region - -#Region "Constants" - Private DEFAULT_SIZE As Size = New Size(200, 27) - - Private DEFAULT_TEXT As String = "Unnamed Control" -#End Region - - Public Sub New(DesignMode As Boolean) - _DesignMode = DesignMode - End Sub - - Private Function GetRandomControlName(Name As String) - Return $"{Name}-{ClassUtils.ShortGUID()}" - End Function - - Public Function CreateLabel() As Label - Dim Metadata As New ControlMetadata() With { - .Id = 4711, - .Type = ControlType.Label - } - - Dim oLabel As New Label() With { - .Name = GetRandomControlName("Label"), - .Text = DEFAULT_TEXT, - .AutoSize = False, - .Size = DEFAULT_SIZE, - .Tag = Metadata - } - - Return oLabel - End Function - - Public Function CreateTextbox() As TextBox - Dim Metadata As New ControlMetadata() With { - .Id = 4711, - .Type = ControlType.TextBox - } - - Dim oTextbox As New TextBox() With { - .Name = GetRandomControlName("Textbox"), - .Size = DEFAULT_SIZE, - .Tag = Metadata - } - - Return oTextbox - End Function - - Public Function CreateCombobox() As LookupControl - Dim Metadata As New ControlMetadata() With { - .Id = 4711, - .Type = ControlType.Combobox - } - - Dim oCombobox As New LookupControl() With { - .Name = GetRandomControlName("Combobox"), - .Size = DEFAULT_SIZE, - .Tag = Metadata - } - - Return oCombobox - End Function - -End Class diff --git a/EDMI_ClientSuite/FormEntityDesigner/ClassControlMetadata.vb b/EDMI_ClientSuite/FormEntityDesigner/ClassControlMetadata.vb new file mode 100644 index 00000000..cc1c259d --- /dev/null +++ b/EDMI_ClientSuite/FormEntityDesigner/ClassControlMetadata.vb @@ -0,0 +1,4 @@ +Public Class ClassControlMetadata + Public Id As Int64 + Public Type As String +End Class diff --git a/EDMI_ClientSuite/FormEntityDesigner/ClassControlUtils.vb b/EDMI_ClientSuite/FormEntityDesigner/ClassControlUtils.vb deleted file mode 100644 index 2fd6517f..00000000 --- a/EDMI_ClientSuite/FormEntityDesigner/ClassControlUtils.vb +++ /dev/null @@ -1,14 +0,0 @@ -Public Class ClassControlUtils - Public Enum ControlType - Label = 0 - TextBox = 1 - Combobox = 2 - End Enum - - Public Class ControlMetadata - Public Id As Integer - Public Type As ControlType - End Class - - -End Class diff --git a/EDMI_ClientSuite/FormEntityDesigner/ControlProperties/BaseClasses/ClassBaseProperties.vb b/EDMI_ClientSuite/FormEntityDesigner/ControlProperties/BaseClasses/ClassBaseProperties.vb index ba7e6905..67a05f68 100644 --- a/EDMI_ClientSuite/FormEntityDesigner/ControlProperties/BaseClasses/ClassBaseProperties.vb +++ b/EDMI_ClientSuite/FormEntityDesigner/ControlProperties/BaseClasses/ClassBaseProperties.vb @@ -1,6 +1,5 @@ Imports System.ComponentModel Imports DigitalData.GUIs.ClientSuite.ClassControlLocalization -Imports DigitalData.GUIs.ClientSuite.ClassControlUtils Namespace ControlProperties Public MustInherit Class ClassBaseProperties @@ -10,31 +9,9 @@ Namespace ControlProperties <[ReadOnly](True)> Public Property Id As Integer - - - <[ReadOnly](True)> - Public Property Type As ControlType - Public Property Name As String - - - - Public Property Location As Point - - - - Public Property Size As Size - - - - Public Property Font() As Font - - - - Public Property Color() As Color - End Class End Namespace diff --git a/EDMI_ClientSuite/FormEntityDesigner/ControlProperties/BaseClasses/ClassInputProperties.vb b/EDMI_ClientSuite/FormEntityDesigner/ControlProperties/BaseClasses/ClassInputProperties.vb deleted file mode 100644 index 8e9f2623..00000000 --- a/EDMI_ClientSuite/FormEntityDesigner/ControlProperties/BaseClasses/ClassInputProperties.vb +++ /dev/null @@ -1,27 +0,0 @@ -Imports DigitalData.GUIs.ClientSuite.ClassControlLocalization - -Namespace ControlProperties - Public MustInherit Class ClassInputProperties - Inherits ClassBaseProperties - - - - Public Property IsRequired() As Boolean - - - - Public Property IsReadOnly() As Boolean - - - - Public Property DefaultValue() As String - - - - Public Property TabIndex() As Integer - - - - Public Property TabStop() As Boolean - End Class -End Namespace diff --git a/EDMI_ClientSuite/FormEntityDesigner/ControlProperties/BaseClasses/ClassMultiInputProperties.vb b/EDMI_ClientSuite/FormEntityDesigner/ControlProperties/BaseClasses/ClassMultiInputProperties.vb deleted file mode 100644 index 93dafd11..00000000 --- a/EDMI_ClientSuite/FormEntityDesigner/ControlProperties/BaseClasses/ClassMultiInputProperties.vb +++ /dev/null @@ -1,20 +0,0 @@ -Imports DigitalData.GUIs.ClientSuite.ClassControlLocalization - -Namespace ControlProperties - Public Class ClassMultiInputProperties - Inherits ClassInputProperties - - Private _static_list As String - - - - Public Property StaticList As StaticList - Get - Return New StaticList(_static_list) - End Get - Set(value As StaticList) - _static_list = value?.Value - End Set - End Property - End Class -End Namespace diff --git a/EDMI_ClientSuite/FormEntityDesigner/ControlProperties/Controls/ClassComboboxProperties.vb b/EDMI_ClientSuite/FormEntityDesigner/ControlProperties/Controls/ClassComboboxProperties.vb index 996c49cb..b37560c5 100644 --- a/EDMI_ClientSuite/FormEntityDesigner/ControlProperties/Controls/ClassComboboxProperties.vb +++ b/EDMI_ClientSuite/FormEntityDesigner/ControlProperties/Controls/ClassComboboxProperties.vb @@ -1,6 +1,14 @@ -Namespace ControlProperties +Imports System.ComponentModel +Imports DigitalData.GUIs.ClientSuite.ClassControlLocalization + +Namespace ControlProperties Public Class ClassComboboxProperties - Inherits ClassMultiInputProperties + Inherits ClassBaseProperties + + + + + Public Property Datasource As String End Class End Namespace diff --git a/EDMI_ClientSuite/FormEntityDesigner/ControlProperties/Controls/ClassLabelProperties.vb b/EDMI_ClientSuite/FormEntityDesigner/ControlProperties/Controls/ClassLabelProperties.vb deleted file mode 100644 index ffff5f5f..00000000 --- a/EDMI_ClientSuite/FormEntityDesigner/ControlProperties/Controls/ClassLabelProperties.vb +++ /dev/null @@ -1,14 +0,0 @@ -Imports System.ComponentModel -Imports DigitalData.GUIs.ClientSuite.ClassControlLocalization - -Namespace ControlProperties - Public Class ClassLabelProperties - Inherits ClassBaseProperties - - - - Public Property Caption As String - End Class - -End Namespace - diff --git a/EDMI_ClientSuite/FormEntityDesigner/ControlProperties/Controls/ClassTextboxProperties.vb b/EDMI_ClientSuite/FormEntityDesigner/ControlProperties/Controls/ClassTextboxProperties.vb deleted file mode 100644 index 6a126901..00000000 --- a/EDMI_ClientSuite/FormEntityDesigner/ControlProperties/Controls/ClassTextboxProperties.vb +++ /dev/null @@ -1,13 +0,0 @@ -Imports System.ComponentModel -Imports DigitalData.GUIs.ClientSuite.ClassControlLocalization - -Namespace ControlProperties - Public Class ClassTextboxProperties - Inherits ClassInputProperties - - - - - Public Property Multiline() As Boolean - End Class -End Namespace diff --git a/EDMI_ClientSuite/FormEntityDesigner/ControlSnapPanel.Designer.vb b/EDMI_ClientSuite/FormEntityDesigner/ControlSnapPanel.Designer.vb deleted file mode 100644 index 36e9204e..00000000 --- a/EDMI_ClientSuite/FormEntityDesigner/ControlSnapPanel.Designer.vb +++ /dev/null @@ -1,47 +0,0 @@ -Partial Class ControlSnapPanel - Inherits Panel - - _ - Public Sub New(ByVal container As System.ComponentModel.IContainer) - MyClass.New() - - 'Erforderlich für die Unterstützung des Windows.Forms-Klassenkompositions-Designers - If (container IsNot Nothing) Then - container.Add(Me) - End If - - End Sub - - _ - Public Sub New() - MyBase.New() - - 'Dieser Aufruf ist für den Komponenten-Designer erforderlich. - InitializeComponent() - - End Sub - - 'Die Komponente überschreibt den Löschvorgang zum Bereinigen der Komponentenliste. - _ - Protected Overrides Sub Dispose(ByVal disposing As Boolean) - Try - If disposing AndAlso components IsNot Nothing Then - components.Dispose() - End If - Finally - MyBase.Dispose(disposing) - End Try - End Sub - - 'Wird vom Komponenten-Designer benötigt. - Private components As System.ComponentModel.IContainer - - 'Hinweis: Die folgende Prozedur ist für den Komponenten-Designer erforderlich. - 'Das Bearbeiten ist mit dem Komponenten-Designer möglich. - 'Das Bearbeiten mit dem Code-Editor ist nicht möglich. - _ - Private Sub InitializeComponent() - components = New System.ComponentModel.Container() - End Sub - -End Class diff --git a/EDMI_ClientSuite/FormEntityDesigner/ControlSnapPanel.vb b/EDMI_ClientSuite/FormEntityDesigner/ControlSnapPanel.vb deleted file mode 100644 index 28807130..00000000 --- a/EDMI_ClientSuite/FormEntityDesigner/ControlSnapPanel.vb +++ /dev/null @@ -1,56 +0,0 @@ -Public Class ControlSnapPanel - Inherits Panel - - Private _ShowGrid As Boolean = True - Private _GridSize As Integer = 16 - - Private Property AutoScaleMode As AutoScaleMode - - 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 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/EDMI_ClientSuite/FormEntityDesigner/frmEntityDesigner.Designer.vb b/EDMI_ClientSuite/FormEntityDesigner/frmEntityDesigner.Designer.vb deleted file mode 100644 index fd61135c..00000000 --- a/EDMI_ClientSuite/FormEntityDesigner/frmEntityDesigner.Designer.vb +++ /dev/null @@ -1,242 +0,0 @@ - -Partial Class frmEntityDesigner - Inherits BaseRibbonForm - - 'Das Formular überschreibt den Löschvorgang, um die Komponentenliste zu bereinigen. - - Protected Overrides Sub Dispose(ByVal disposing As Boolean) - Try - If disposing AndAlso components IsNot Nothing Then - components.Dispose() - End If - Finally - MyBase.Dispose(disposing) - End Try - End Sub - - 'Wird vom Windows Form-Designer benötigt. - Private components As System.ComponentModel.IContainer - - 'Hinweis: Die folgende Prozedur ist für den Windows Form-Designer erforderlich. - 'Das Bearbeiten ist mit dem Windows Form-Designer möglich. - 'Das Bearbeiten mit dem Code-Editor ist nicht möglich. - - Private Sub InitializeComponent() - Me.components = New System.ComponentModel.Container() - Dim resources As System.ComponentModel.ComponentResourceManager = New System.ComponentModel.ComponentResourceManager(GetType(frmEntityDesigner)) - Me.PanelMain = New DigitalData.GUIs.ClientSuite.ControlSnapPanel(Me.components) - Me.TabControlMain = New DevExpress.XtraTab.XtraTabControl() - Me.TabPageControls = New DevExpress.XtraTab.XtraTabPage() - Me.Label1 = New System.Windows.Forms.Label() - Me.btnCombobox = New System.Windows.Forms.Button() - Me.btnTextbox = New System.Windows.Forms.Button() - Me.btnLabel = New System.Windows.Forms.Button() - Me.TabPageProperties = New DevExpress.XtraTab.XtraTabPage() - Me.PropertyGridMain = New DevExpress.XtraVerticalGrid.PropertyGridControl() - Me.SplitContainerControlMain = New DevExpress.XtraEditors.SplitContainerControl() - Me.RibbonControl1 = New DevExpress.XtraBars.Ribbon.RibbonControl() - Me.BarButtonItem1 = New DevExpress.XtraBars.BarButtonItem() - Me.RibbonPageCategory1 = New DevExpress.XtraBars.Ribbon.RibbonPageCategory() - Me.RibbonPage3 = New DevExpress.XtraBars.Ribbon.RibbonPage() - Me.RibbonPageGroup3 = New DevExpress.XtraBars.Ribbon.RibbonPageGroup() - Me.RibbonStatusBar1 = New DevExpress.XtraBars.Ribbon.RibbonStatusBar() - Me.RibbonPage2 = New DevExpress.XtraBars.Ribbon.RibbonPage() - CType(Me.TabControlMain, System.ComponentModel.ISupportInitialize).BeginInit() - Me.TabControlMain.SuspendLayout() - Me.TabPageControls.SuspendLayout() - Me.TabPageProperties.SuspendLayout() - CType(Me.PropertyGridMain, System.ComponentModel.ISupportInitialize).BeginInit() - CType(Me.SplitContainerControlMain, System.ComponentModel.ISupportInitialize).BeginInit() - Me.SplitContainerControlMain.SuspendLayout() - CType(Me.RibbonControl1, System.ComponentModel.ISupportInitialize).BeginInit() - Me.SuspendLayout() - ' - 'PanelMain - ' - Me.PanelMain.AllowDrop = True - Me.PanelMain.Dock = System.Windows.Forms.DockStyle.Fill - Me.PanelMain.GridSize = 8 - Me.PanelMain.Location = New System.Drawing.Point(0, 0) - Me.PanelMain.Name = "PanelMain" - Me.PanelMain.ShowGrid = True - Me.PanelMain.Size = New System.Drawing.Size(808, 458) - Me.PanelMain.TabIndex = 0 - ' - 'TabControlMain - ' - Me.TabControlMain.Dock = System.Windows.Forms.DockStyle.Fill - Me.TabControlMain.Location = New System.Drawing.Point(0, 0) - Me.TabControlMain.Name = "TabControlMain" - Me.TabControlMain.SelectedTabPage = Me.TabPageControls - Me.TabControlMain.Size = New System.Drawing.Size(224, 458) - Me.TabControlMain.TabIndex = 0 - Me.TabControlMain.TabPages.AddRange(New DevExpress.XtraTab.XtraTabPage() {Me.TabPageControls, Me.TabPageProperties}) - ' - 'TabPageControls - ' - Me.TabPageControls.Controls.Add(Me.Label1) - Me.TabPageControls.Controls.Add(Me.btnCombobox) - Me.TabPageControls.Controls.Add(Me.btnTextbox) - Me.TabPageControls.Controls.Add(Me.btnLabel) - Me.TabPageControls.Name = "TabPageControls" - Me.TabPageControls.Size = New System.Drawing.Size(222, 433) - Me.TabPageControls.Text = "Controls" - ' - 'Label1 - ' - Me.Label1.Dock = System.Windows.Forms.DockStyle.Top - Me.Label1.Location = New System.Drawing.Point(0, 0) - Me.Label1.Name = "Label1" - Me.Label1.Size = New System.Drawing.Size(222, 31) - Me.Label1.TabIndex = 2 - Me.Label1.Text = "Ziehen Sie zum Erstellen einen Controll-Button auf das Panel" - ' - 'btnCombobox - ' - Me.btnCombobox.Location = New System.Drawing.Point(3, 92) - Me.btnCombobox.Name = "btnCombobox" - Me.btnCombobox.Size = New System.Drawing.Size(216, 23) - Me.btnCombobox.TabIndex = 1 - Me.btnCombobox.Text = "Combobox" - Me.btnCombobox.UseVisualStyleBackColor = True - ' - 'btnTextbox - ' - Me.btnTextbox.Location = New System.Drawing.Point(3, 63) - Me.btnTextbox.Name = "btnTextbox" - Me.btnTextbox.Size = New System.Drawing.Size(216, 23) - Me.btnTextbox.TabIndex = 1 - Me.btnTextbox.Text = "Textbox" - Me.btnTextbox.UseVisualStyleBackColor = True - ' - 'btnLabel - ' - Me.btnLabel.Location = New System.Drawing.Point(3, 34) - Me.btnLabel.Name = "btnLabel" - Me.btnLabel.Size = New System.Drawing.Size(216, 23) - Me.btnLabel.TabIndex = 0 - Me.btnLabel.Text = "Label" - Me.btnLabel.UseVisualStyleBackColor = True - ' - 'TabPageProperties - ' - Me.TabPageProperties.Controls.Add(Me.PropertyGridMain) - Me.TabPageProperties.Name = "TabPageProperties" - Me.TabPageProperties.Size = New System.Drawing.Size(222, 258) - Me.TabPageProperties.Text = "Properties" - ' - 'PropertyGridMain - ' - Me.PropertyGridMain.Dock = System.Windows.Forms.DockStyle.Fill - Me.PropertyGridMain.Location = New System.Drawing.Point(0, 0) - Me.PropertyGridMain.Name = "PropertyGridMain" - Me.PropertyGridMain.Size = New System.Drawing.Size(222, 258) - Me.PropertyGridMain.TabIndex = 0 - ' - 'SplitContainerControlMain - ' - Me.SplitContainerControlMain.Dock = System.Windows.Forms.DockStyle.Fill - Me.SplitContainerControlMain.FixedPanel = DevExpress.XtraEditors.SplitFixedPanel.Panel2 - Me.SplitContainerControlMain.Location = New System.Drawing.Point(0, 146) - Me.SplitContainerControlMain.Name = "SplitContainerControlMain" - Me.SplitContainerControlMain.Panel1.Controls.Add(Me.PanelMain) - Me.SplitContainerControlMain.Panel1.Text = "Panel1" - Me.SplitContainerControlMain.Panel2.Controls.Add(Me.TabControlMain) - Me.SplitContainerControlMain.Panel2.Text = "Panel2" - Me.SplitContainerControlMain.Size = New System.Drawing.Size(1044, 458) - Me.SplitContainerControlMain.SplitterPosition = 224 - Me.SplitContainerControlMain.TabIndex = 1 - Me.SplitContainerControlMain.Text = "SplitContainerControl1" - ' - 'RibbonControl1 - ' - Me.RibbonControl1.ExpandCollapseItem.Id = 0 - Me.RibbonControl1.Items.AddRange(New DevExpress.XtraBars.BarItem() {Me.RibbonControl1.ExpandCollapseItem, Me.BarButtonItem1}) - Me.RibbonControl1.Location = New System.Drawing.Point(0, 0) - Me.RibbonControl1.MaxItemId = 2 - Me.RibbonControl1.Name = "RibbonControl1" - Me.RibbonControl1.PageCategories.AddRange(New DevExpress.XtraBars.Ribbon.RibbonPageCategory() {Me.RibbonPageCategory1}) - Me.RibbonControl1.ShowApplicationButton = DevExpress.Utils.DefaultBoolean.[False] - Me.RibbonControl1.Size = New System.Drawing.Size(1044, 146) - Me.RibbonControl1.StatusBar = Me.RibbonStatusBar1 - ' - 'BarButtonItem1 - ' - Me.BarButtonItem1.Caption = "Control Löschen" - Me.BarButtonItem1.Id = 1 - Me.BarButtonItem1.ImageOptions.Image = CType(resources.GetObject("BarButtonItem1.ImageOptions.Image"), System.Drawing.Image) - Me.BarButtonItem1.ImageOptions.LargeImage = CType(resources.GetObject("BarButtonItem1.ImageOptions.LargeImage"), System.Drawing.Image) - Me.BarButtonItem1.Name = "BarButtonItem1" - ' - 'RibbonPageCategory1 - ' - Me.RibbonPageCategory1.Name = "RibbonPageCategory1" - Me.RibbonPageCategory1.Pages.AddRange(New DevExpress.XtraBars.Ribbon.RibbonPage() {Me.RibbonPage3}) - Me.RibbonPageCategory1.Text = "Entitäten Designer" - ' - 'RibbonPage3 - ' - Me.RibbonPage3.Groups.AddRange(New DevExpress.XtraBars.Ribbon.RibbonPageGroup() {Me.RibbonPageGroup3}) - Me.RibbonPage3.Name = "RibbonPage3" - Me.RibbonPage3.Text = "Aktionen" - ' - 'RibbonPageGroup3 - ' - Me.RibbonPageGroup3.ItemLinks.Add(Me.BarButtonItem1) - Me.RibbonPageGroup3.Name = "RibbonPageGroup3" - Me.RibbonPageGroup3.Text = "Aktionen" - ' - 'RibbonStatusBar1 - ' - Me.RibbonStatusBar1.Location = New System.Drawing.Point(0, 604) - Me.RibbonStatusBar1.Name = "RibbonStatusBar1" - Me.RibbonStatusBar1.Ribbon = Me.RibbonControl1 - Me.RibbonStatusBar1.Size = New System.Drawing.Size(1044, 21) - ' - 'RibbonPage2 - ' - Me.RibbonPage2.Name = "RibbonPage2" - Me.RibbonPage2.Text = "RibbonPage2" - ' - 'frmEntityDesigner - ' - Me.AutoScaleDimensions = New System.Drawing.SizeF(6.0!, 13.0!) - Me.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font - Me.ClientSize = New System.Drawing.Size(1044, 625) - Me.Controls.Add(Me.SplitContainerControlMain) - Me.Controls.Add(Me.RibbonStatusBar1) - Me.Controls.Add(Me.RibbonControl1) - Me.Name = "frmEntityDesigner" - Me.Ribbon = Me.RibbonControl1 - Me.StatusBar = Me.RibbonStatusBar1 - Me.Text = "Entitäten Designer" - CType(Me.TabControlMain, System.ComponentModel.ISupportInitialize).EndInit() - Me.TabControlMain.ResumeLayout(False) - Me.TabPageControls.ResumeLayout(False) - Me.TabPageProperties.ResumeLayout(False) - CType(Me.PropertyGridMain, System.ComponentModel.ISupportInitialize).EndInit() - CType(Me.SplitContainerControlMain, System.ComponentModel.ISupportInitialize).EndInit() - Me.SplitContainerControlMain.ResumeLayout(False) - CType(Me.RibbonControl1, System.ComponentModel.ISupportInitialize).EndInit() - Me.ResumeLayout(False) - Me.PerformLayout() - - End Sub - Friend WithEvents TabControlMain As DevExpress.XtraTab.XtraTabControl - Friend WithEvents TabPageProperties As DevExpress.XtraTab.XtraTabPage - Friend WithEvents PropertyGridMain As DevExpress.XtraVerticalGrid.PropertyGridControl - Friend WithEvents TabPageControls As DevExpress.XtraTab.XtraTabPage - Friend WithEvents PanelMain As ControlSnapPanel - Friend WithEvents btnTextbox As Button - Friend WithEvents btnLabel As Button - Friend WithEvents SplitContainerControlMain As DevExpress.XtraEditors.SplitContainerControl - Friend WithEvents btnCombobox As Button - Friend WithEvents Label1 As Label - Friend WithEvents RibbonControl1 As DevExpress.XtraBars.Ribbon.RibbonControl - Friend WithEvents RibbonStatusBar1 As DevExpress.XtraBars.Ribbon.RibbonStatusBar - Friend WithEvents RibbonPage2 As DevExpress.XtraBars.Ribbon.RibbonPage - Friend WithEvents RibbonPageCategory1 As DevExpress.XtraBars.Ribbon.RibbonPageCategory - Friend WithEvents RibbonPage3 As DevExpress.XtraBars.Ribbon.RibbonPage - Friend WithEvents RibbonPageGroup3 As DevExpress.XtraBars.Ribbon.RibbonPageGroup - Friend WithEvents BarButtonItem1 As DevExpress.XtraBars.BarButtonItem -End Class diff --git a/EDMI_ClientSuite/FormEntityDesigner/frmEntityDesigner.resx b/EDMI_ClientSuite/FormEntityDesigner/frmEntityDesigner.resx deleted file mode 100644 index 89f848de..00000000 --- a/EDMI_ClientSuite/FormEntityDesigner/frmEntityDesigner.resx +++ /dev/null @@ -1,144 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - text/microsoft-resx - - - 2.0 - - - System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - - System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - - - - iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAAABGdBTUEAALGPC/xhBQAAABl0RVh0U29m - dHdhcmUAQWRvYmUgSW1hZ2VSZWFkeXHJZTwAAAAjdEVYdFRpdGxlAENhbmNlbDtTdG9wO0V4aXQ7QmFy - cztSaWJib247TJaWsgAAAMJJREFUOE+Nk0sKAjEQRHM4YVZ6CS8gfhBGHK/pSRRXbRWkJOlOq4sHSf0Y - BlLMrNy3qzWYef4HZC/s8KzyCxi4+rAHmVvNsrOhcKqCSEfgqSz2Ms7OCCPQfPlIvQ2kIzgPy+QzUIN+ - ZAFpmXQDBAE/0tKVSXcRCI5GQpkEgSDsP5sso2wQEByVRRjpLgj48gGEH9t2vpYbLx35WRbQhiM0+DBa - I5QFPD8yU5zAowppWSCjkSeYJHJk58MZyPIBTmZW3tJAnMwmSptiAAAAAElFTkSuQmCC - - - - - iVBORw0KGgoAAAANSUhEUgAAACAAAAAgCAYAAABzenr0AAAABGdBTUEAALGPC/xhBQAAABl0RVh0U29m - dHdhcmUAQWRvYmUgSW1hZ2VSZWFkeXHJZTwAAAAjdEVYdFRpdGxlAENhbmNlbDtTdG9wO0V4aXQ7QmFy - cztSaWJib247TJaWsgAAAW5JREFUWEfFlk1KBDEUhGfmAg56JTcuHEGP4FFFFMVZz1VcxaomD57pek1e - hLj4FilSP9Dd0LtSyr8ixZlIcSZSnIkUL8+3f6LJOvhzixRr0BV4AXf13I3LuQev4OjzPVKEgeUfoIBv - kBpRM1hOLzM+gRyxEnDxALiaRiM7wpcbzNy3fb8OBi4+gTagd4Qq5/lBda0EgsvksRrboK0RqXIiRRiM - zIh0OZEiTJ6eEUPlRIowtmyNGC4nUoRZEY0YLidSRECEGuFJlRMpImSLaMRSDmRmhBQZsoF65jZgeTFV - ZoQUGRIQlRvLCJUZIUWEKKK3XWndI6SIgN5yPvPwE1XZLVKEubfc7gyPkCKMmXJjaIQUYSJR+Qn4Yk96 - hBRhGCk3UiNWAi7uwVs1+oCeckONeAfdPyTX4Ksas+WW4UecwU3bQ1YCwWXCEVydKicuhyOYIcuJFC0I - 8P/Qn7tosvK/5TOR4kykOBMpzqPsfgBphQ1j4i+mWAAAAABJRU5ErkJggg== - - - \ No newline at end of file diff --git a/EDMI_ClientSuite/FormEntityDesigner/frmEntityDesigner.vb b/EDMI_ClientSuite/FormEntityDesigner/frmEntityDesigner.vb deleted file mode 100644 index 01632f45..00000000 --- a/EDMI_ClientSuite/FormEntityDesigner/frmEntityDesigner.vb +++ /dev/null @@ -1,258 +0,0 @@ -Imports System.ComponentModel -Imports DevExpress.XtraEditors.Repository -Imports DevExpress.XtraVerticalGrid -Imports DigitalData.GUIs.ClientSuite.ClassControlUtils -Imports DigitalData.GUIs.ClientSuite.ControlProperties - -Public Class frmEntityDesigner - Private _IsMouseDown As Boolean = False - Private _IsMouseMoving As Boolean = False - - Private _BeginPosition As Point = Nothing - Private _EndPosition As Point = Nothing - Private _LastCursorPosition As Point = Nothing - - Private _CurrentControl As Control = Nothing - Private _ControlBuilder As ClassControlBuilder = Nothing - - Private _DragDropButtonList As New List(Of Button) - - Private Sub frmEntityDesigner_Load(sender As Object, e As EventArgs) Handles Me.Load - ' Assign Control Types to DragDrop Buttons - btnLabel.Tag = ControlType.Label - btnTextbox.Tag = ControlType.TextBox - btnCombobox.Tag = ControlType.Combobox - - ' Add Default Editors for certain datatypes in the PropertyGrid - Dim oColorEditor = New RepositoryItemColorEdit() - Dim oBooleanEditor = New RepositoryItemCheckEdit() - - PropertyGridMain.DefaultEditors.Add(GetType(Color), oColorEditor) - PropertyGridMain.DefaultEditors.Add(GetType(Boolean), oBooleanEditor) - - ' Create the control builder - _ControlBuilder = New ClassControlBuilder(DesignMode:=True) - - ' Create a list of all DragDrop buttons - _DragDropButtonList.Add(btnLabel) - _DragDropButtonList.Add(btnTextbox) - _DragDropButtonList.Add(btnCombobox) - - ' Add EventHandlers for each button - For Each oButton As Button In _DragDropButtonList - AddHandler oButton.MouseDown, AddressOf DragDropButton_MouseDown - AddHandler oButton.MouseMove, AddressOf DragDropButton_MouseMove - Next - End Sub - -#Region "Control Buttons Events" - Private Sub DragDropButton_MouseDown(sender As Object, e As MouseEventArgs) - _IsMouseDown = True - End Sub - - Private Sub DragDropButton_MouseMove(sender As Button, e As MouseEventArgs) - If _IsMouseDown Then - Dim oButton = sender - Dim oType As ControlType = oButton.Tag - - oButton.DoDragDrop(oType.ToString, DragDropEffects.Copy) - End If - End Sub - - Private Sub SnapPanelMain_DragEnter(sender As Object, e As DragEventArgs) Handles PanelMain.DragEnter - If (e.Data.GetDataPresent(DataFormats.Text)) Then - e.Effect = DragDropEffects.Copy - Else - e.Effect = DragDropEffects.None - End If - End Sub - - Private Sub SnapPanelMain_DragDrop(sender As Object, e As DragEventArgs) Handles PanelMain.DragDrop - Dim data As String = e.Data.GetData(DataFormats.Text) - Dim type = ClassUtils.ToEnum(Of ClassControlUtils.ControlType)(data) - - HandleDragDrop(type) - End Sub -#End Region - -#Region "Control Events" - Private Sub Control_MouseDown(sender As Control, e As MouseEventArgs) - If e.Button = MouseButtons.Left Then - _CurrentControl = sender - _BeginPosition = e.Location - - ' Set the mode flag to signal the MouseMove event handler that it - ' needs to now calculate new positions for our control - _IsMouseMoving = True - End If - End Sub - - Private Sub Control_MouseMove(sender As Object, e As MouseEventArgs) - If _CurrentControl Is Nothing Or Not _IsMouseMoving Then - Exit Sub - End If - - Cursor = Cursors.Hand - - Dim oCursorPosition As Point = PanelMain.PointToClient(Cursor.Position) - Dim oNewPosition As New Point(oCursorPosition.X - _BeginPosition.X, oCursorPosition.Y - _BeginPosition.Y) - - ' If control will be moved out the of bounds of the panel at TOP/LEFT side, exit. - If oNewPosition.X < 0 Or oNewPosition.Y < 0 Then - Exit Sub - End If - - _CurrentControl.Location = oNewPosition - End Sub - - Private Sub Control_MouseUp(sender As Object, e As MouseEventArgs) - If Not _IsMouseMoving Then - Exit Sub - End If - - _IsMouseMoving = False - _EndPosition = e.Location - - Cursor = Cursors.Default - End Sub - - Private Sub Control_MouseClick(sender As Control, e As MouseEventArgs) - TabControlMain.SelectedTabPage = TabPageProperties - HandleLoadProperties(sender) - End Sub - - Private Sub Control_MouseEnter(sender As Control, e As EventArgs) - Cursor = Cursors.Hand - End Sub - - Private Sub Control_MouseLeave(sender As Control, e As EventArgs) - Cursor = Cursors.Default - End Sub - - Private Sub SetEventHandlers(Control As Control) - AddHandler Control.MouseDown, AddressOf Control_MouseDown - AddHandler Control.MouseMove, AddressOf Control_MouseMove - AddHandler Control.MouseUp, AddressOf Control_MouseUp - AddHandler Control.MouseClick, AddressOf Control_MouseClick - AddHandler Control.MouseEnter, AddressOf Control_MouseEnter - AddHandler Control.MouseLeave, AddressOf Control_MouseLeave - End Sub -#End Region - - Private Sub HandleLoadProperties(Control As Control) - Dim oMetadata As ControlMetadata = Control.Tag - Dim oType = oMetadata.Type - Dim oProps As ClassBaseProperties = Nothing - - Select Case oType - Case ControlType.Label - oProps = New ClassLabelProperties With { - .Id = oMetadata.Id, - .Name = Control.Name, - .Type = oType, - .Location = Control.Location, - .Size = Control.Size, - .Font = Control.Font, - .Color = Control.ForeColor, - .Caption = Control.Text - } - Case ControlType.TextBox - oProps = New ClassTextboxProperties With { - .Id = oMetadata.Id, - .Name = Control.Name, - .Type = oType, - .Location = Control.Location, - .Size = Control.Size, - .Font = Control.Font, - .Color = ForeColor, - .IsReadOnly = False, - .IsRequired = False, - .Multiline = False, - .TabIndex = 0, - .TabStop = 1, - .DefaultValue = "" - } - Case ControlType.Combobox - oProps = New ClassComboboxProperties() With { - .Id = oMetadata.Id, - .Name = Control.Name, - .Type = oType, - .Location = Control.Location, - .Size = Control.Size, - .Font = Control.Font, - .Color = ForeColor, - .IsReadOnly = False, - .IsRequired = False, - .TabIndex = 0, - .TabStop = 1, - .DefaultValue = "", - .StaticList = New StaticList() - } - Case Else - Exit Sub - End Select - - PropertyGridMain.SelectedObject = oProps - End Sub - - Private Sub HandleDragDrop(type As ControlType) - Dim oCursorPosition As Point = PanelMain.PointToClient(Cursor.Position) - Dim oControl As Control = Nothing - - Select Case type - Case ControlType.Label - oControl = _ControlBuilder.CreateLabel() - Case ControlType.TextBox - oControl = _ControlBuilder.CreateTextbox() - Case ControlType.Combobox - oControl = _ControlBuilder.CreateCombobox() - Case Else - MsgBox($"Unknown Control Type {type.ToString}") - Exit Sub - End Select - - ' Set Location to current cursor position - oControl.Location = oCursorPosition - - ' Attach Eventhandlers - SetEventHandlers(oControl) - - ' Add the control to the panel - PanelMain.Controls.Add(oControl) - End Sub - - Private Sub PropertyGridMain_RowChanged(sender As Object, e As DevExpress.XtraVerticalGrid.Events.RowChangedEventArgs) Handles PropertyGridMain.RowChanged - If e.ChangeType <> RowChangeTypeEnum.Value Then - Exit Sub - End If - - Dim oPropertyName As String = e.Properties.FieldName - Dim oPropertyValue = e.Properties.Value - - - Select Case oPropertyName - Case "Name" - _CurrentControl.Name = oPropertyValue - Case "Location" - _CurrentControl.Location = oPropertyValue - Case "X" - _CurrentControl.Location = New Point(oPropertyValue, _CurrentControl.Location.Y) - Case "Y" - _CurrentControl.Location = New Point(_CurrentControl.Location.X, oPropertyValue) - Case "Size" - _CurrentControl.Size = oPropertyValue - Case "Width" - _CurrentControl.Size = New Size(oPropertyValue, _CurrentControl.Height) - Case "Height" - _CurrentControl.Size = New Size(_CurrentControl.Width, oPropertyValue) - Case "Font" - _CurrentControl.Font = oPropertyValue - Case "Color" - _CurrentControl.ForeColor = oPropertyValue - Case "Caption" - If TypeOf _CurrentControl Is Label Then - _CurrentControl.Text = oPropertyValue - End If - End Select - End Sub -End Class \ No newline at end of file diff --git a/EDMI_ClientSuite/FormEntityDesigner/frmFormDesigner.Designer.vb b/EDMI_ClientSuite/FormEntityDesigner/frmFormDesigner.Designer.vb index 759e552e..c12e93f3 100644 --- a/EDMI_ClientSuite/FormEntityDesigner/frmFormDesigner.Designer.vb +++ b/EDMI_ClientSuite/FormEntityDesigner/frmFormDesigner.Designer.vb @@ -36,7 +36,7 @@ Partial Class frmFormDesigner Me.XtraTabControl1 = New DevExpress.XtraTab.XtraTabControl() Me.XtraTabPageControls = New DevExpress.XtraTab.XtraTabPage() Me.XtraTabPageProperties = New DevExpress.XtraTab.XtraTabPage() - Me.PropertyGridControl1 = New DevExpress.XtraVerticalGrid.PropertyGridControl() + Me.PropertyGridControlMain = New DevExpress.XtraVerticalGrid.PropertyGridControl() Me.SplitContainerMain = New DevExpress.XtraEditors.SplitContainerControl() CType(Me.RibbonControl, System.ComponentModel.ISupportInitialize).BeginInit() CType(Me.LayoutControlMain, System.ComponentModel.ISupportInitialize).BeginInit() @@ -45,7 +45,7 @@ Partial Class frmFormDesigner Me.XtraTabControl1.SuspendLayout() Me.XtraTabPageControls.SuspendLayout() Me.XtraTabPageProperties.SuspendLayout() - CType(Me.PropertyGridControl1, System.ComponentModel.ISupportInitialize).BeginInit() + CType(Me.PropertyGridControlMain, System.ComponentModel.ISupportInitialize).BeginInit() CType(Me.SplitContainerMain, System.ComponentModel.ISupportInitialize).BeginInit() Me.SplitContainerMain.SuspendLayout() Me.SuspendLayout() @@ -188,18 +188,18 @@ Partial Class frmFormDesigner ' 'XtraTabPageProperties ' - Me.XtraTabPageProperties.Controls.Add(Me.PropertyGridControl1) + Me.XtraTabPageProperties.Controls.Add(Me.PropertyGridControlMain) Me.XtraTabPageProperties.Name = "XtraTabPageProperties" Me.XtraTabPageProperties.Size = New System.Drawing.Size(232, 337) Me.XtraTabPageProperties.Text = "Eigenschaften" ' 'PropertyGridControl1 ' - Me.PropertyGridControl1.Dock = System.Windows.Forms.DockStyle.Fill - Me.PropertyGridControl1.Location = New System.Drawing.Point(0, 0) - Me.PropertyGridControl1.Name = "PropertyGridControl1" - Me.PropertyGridControl1.Size = New System.Drawing.Size(232, 337) - Me.PropertyGridControl1.TabIndex = 0 + Me.PropertyGridControlMain.Dock = System.Windows.Forms.DockStyle.Fill + Me.PropertyGridControlMain.Location = New System.Drawing.Point(0, 0) + Me.PropertyGridControlMain.Name = "PropertyGridControl1" + Me.PropertyGridControlMain.Size = New System.Drawing.Size(232, 337) + Me.PropertyGridControlMain.TabIndex = 0 ' 'SplitContainerMain ' @@ -235,7 +235,7 @@ Partial Class frmFormDesigner Me.XtraTabControl1.ResumeLayout(False) Me.XtraTabPageControls.ResumeLayout(False) Me.XtraTabPageProperties.ResumeLayout(False) - CType(Me.PropertyGridControl1, System.ComponentModel.ISupportInitialize).EndInit() + CType(Me.PropertyGridControlMain, System.ComponentModel.ISupportInitialize).EndInit() CType(Me.SplitContainerMain, System.ComponentModel.ISupportInitialize).EndInit() Me.SplitContainerMain.ResumeLayout(False) Me.ResumeLayout(False) @@ -257,7 +257,7 @@ Partial Class frmFormDesigner Friend WithEvents XtraTabControl1 As DevExpress.XtraTab.XtraTabControl Friend WithEvents XtraTabPageControls As DevExpress.XtraTab.XtraTabPage Friend WithEvents XtraTabPageProperties As DevExpress.XtraTab.XtraTabPage - Friend WithEvents PropertyGridControl1 As DevExpress.XtraVerticalGrid.PropertyGridControl + Friend WithEvents PropertyGridControlMain As DevExpress.XtraVerticalGrid.PropertyGridControl Friend WithEvents SplitContainerMain As DevExpress.XtraEditors.SplitContainerControl Friend WithEvents ToolboxItemCombobox As DevExpress.XtraToolbox.ToolboxItem Friend WithEvents ToolboxItemCheckbox As DevExpress.XtraToolbox.ToolboxItem diff --git a/EDMI_ClientSuite/FormEntityDesigner/frmFormDesigner.vb b/EDMI_ClientSuite/FormEntityDesigner/frmFormDesigner.vb index 833a63ac..90a0e7ed 100644 --- a/EDMI_ClientSuite/FormEntityDesigner/frmFormDesigner.vb +++ b/EDMI_ClientSuite/FormEntityDesigner/frmFormDesigner.vb @@ -5,6 +5,7 @@ Imports DevExpress.XtraLayout.Customization Imports DevExpress.XtraLayout.Dragging Imports DevExpress.XtraLayout.HitInfo Imports DigitalData.Controls.LookupGrid +Imports DigitalData.GUIs.ClientSuite.ControlProperties Public Class frmFormDesigner Private _FormId As Int64 @@ -45,7 +46,7 @@ Public Class frmFormDesigner Dim oHitInfo As BaseLayoutItemHitInfo = LayoutControlMain.CalcHitInfo(oPosition) Dim oLayoutControl As LayoutControlItem = DirectCast(_DragItem, LayoutControlItem) Dim oControlName As String = oLayoutControl.Tag & ClassUtils.ShortGUID() - Dim oControl As Control = _ControlLoader.CreateLayoutControl(oLayoutControl.Tag, oControlName) + Dim oControl As Control = _ControlLoader.CreateLayoutControl(oLayoutControl.Tag, oControlName, 0) If oLayoutControl IsNot Nothing Then HideDragHelper() @@ -104,11 +105,11 @@ Public Class frmFormDesigner End Sub Private Async Sub frmFormDesigner_Load(sender As Object, e As EventArgs) Handles MyBase.Load - _ControlLoader = New ClassControlLoader(My.LogConfig) + _ControlLoader = New ClassControlLoader(My.LogConfig, LayoutControlGroupMain) Dim oTable = Await My.Common.Views.VWICM_FORM_CONTROL(_FormId) - _ControlLoader.LoadControls(oTable, LayoutControlGroupMain) + _ControlLoader.LoadControls(oTable) End Sub Private Function CreateLayoutControlItem(Id As String) As LayoutControlItem @@ -117,5 +118,22 @@ Public Class frmFormDesigner Private Sub LayoutControlMain_ItemSelectionChanged(sender As Object, e As EventArgs) Handles LayoutControlMain.ItemSelectionChanged ' TODO: Load Property Grid for selected item + Dim oLayoutItem As LayoutControlItem = DirectCast(sender, LayoutControlItem) + Dim oSelectedControl As BaseEdit = oLayoutItem.Control + Dim oMetadata As ClassControlMetadata = oSelectedControl.Tag + + Select Case oSelectedControl.GetType + Case GetType(MemoEdit) + + Case GetType(TextEdit) + + Case GetType(LookupControl2) + PropertyGridControlMain.SelectedObject = New ClassComboboxProperties() With { + .Datasource = "TEST", + .Id = oMetadata.Id + } + End Select + + End Sub End Class \ No newline at end of file diff --git a/EDMI_ClientSuite/FormWorkflow/frmWorkflowStep.Designer.vb b/EDMI_ClientSuite/FormWorkflow/frmWorkflowStep.Designer.vb index a81230a0..63af073b 100644 --- a/EDMI_ClientSuite/FormWorkflow/frmWorkflowStep.Designer.vb +++ b/EDMI_ClientSuite/FormWorkflow/frmWorkflowStep.Designer.vb @@ -1,9 +1,9 @@ - _ + Partial Class frmWorkflowStep - Inherits DevExpress.XtraBars.Ribbon.RibbonForm + Inherits BaseRibbonForm 'Form overrides dispose to clean up the component list. - _ + Protected Overrides Sub Dispose(ByVal disposing As Boolean) If disposing AndAlso components IsNot Nothing Then components.Dispose() @@ -17,7 +17,7 @@ Partial Class frmWorkflowStep 'NOTE: The following procedure is required by the Windows Form Designer 'It can be modified using the Windows Form Designer. 'Do not modify it using the code editor. - _ + Private Sub InitializeComponent() Me.components = New System.ComponentModel.Container() Me.RibbonControl = New DevExpress.XtraBars.Ribbon.RibbonControl() @@ -25,10 +25,10 @@ Partial Class frmWorkflowStep Me.RibbonPageGroup1 = New DevExpress.XtraBars.Ribbon.RibbonPageGroup() Me.RibbonStatusBar = New DevExpress.XtraBars.Ribbon.RibbonStatusBar() Me.LayoutControl1 = New DevExpress.XtraLayout.LayoutControl() - Me.LayoutControlGroup1 = New DevExpress.XtraLayout.LayoutControlGroup() + Me.LayoutControlGroupMain = New DevExpress.XtraLayout.LayoutControlGroup() CType(Me.RibbonControl, System.ComponentModel.ISupportInitialize).BeginInit() CType(Me.LayoutControl1, System.ComponentModel.ISupportInitialize).BeginInit() - CType(Me.LayoutControlGroup1, System.ComponentModel.ISupportInitialize).BeginInit() + CType(Me.LayoutControlGroupMain, System.ComponentModel.ISupportInitialize).BeginInit() Me.SuspendLayout() ' 'RibbonControl @@ -65,18 +65,19 @@ Partial Class frmWorkflowStep Me.LayoutControl1.Dock = System.Windows.Forms.DockStyle.Fill Me.LayoutControl1.Location = New System.Drawing.Point(0, 146) Me.LayoutControl1.Name = "LayoutControl1" - Me.LayoutControl1.Root = Me.LayoutControlGroup1 + Me.LayoutControl1.OptionsCustomizationForm.DesignTimeCustomizationFormPositionAndSize = New System.Drawing.Rectangle(1039, 241, 650, 400) + Me.LayoutControl1.Root = Me.LayoutControlGroupMain Me.LayoutControl1.Size = New System.Drawing.Size(991, 348) Me.LayoutControl1.TabIndex = 2 Me.LayoutControl1.Text = "LayoutControl1" ' - 'LayoutControlGroup1 + 'LayoutControlGroupMain ' - Me.LayoutControlGroup1.EnableIndentsWithoutBorders = DevExpress.Utils.DefaultBoolean.[True] - Me.LayoutControlGroup1.GroupBordersVisible = False - Me.LayoutControlGroup1.Name = "LayoutControlGroup1" - Me.LayoutControlGroup1.Size = New System.Drawing.Size(991, 348) - Me.LayoutControlGroup1.TextVisible = False + Me.LayoutControlGroupMain.EnableIndentsWithoutBorders = DevExpress.Utils.DefaultBoolean.[True] + Me.LayoutControlGroupMain.GroupBordersVisible = False + Me.LayoutControlGroupMain.Name = "Root" + Me.LayoutControlGroupMain.Size = New System.Drawing.Size(991, 348) + Me.LayoutControlGroupMain.TextVisible = False ' 'frmWorkflowStep ' @@ -92,7 +93,7 @@ Partial Class frmWorkflowStep Me.Text = "frmWorkflowStep" CType(Me.RibbonControl, System.ComponentModel.ISupportInitialize).EndInit() CType(Me.LayoutControl1, System.ComponentModel.ISupportInitialize).EndInit() - CType(Me.LayoutControlGroup1, System.ComponentModel.ISupportInitialize).EndInit() + CType(Me.LayoutControlGroupMain, System.ComponentModel.ISupportInitialize).EndInit() Me.ResumeLayout(False) Me.PerformLayout() @@ -103,6 +104,5 @@ Partial Class frmWorkflowStep Friend WithEvents RibbonPageGroup1 As DevExpress.XtraBars.Ribbon.RibbonPageGroup Friend WithEvents RibbonStatusBar As DevExpress.XtraBars.Ribbon.RibbonStatusBar Friend WithEvents LayoutControl1 As DevExpress.XtraLayout.LayoutControl - Friend WithEvents LayoutControlGroup1 As DevExpress.XtraLayout.LayoutControlGroup - + Friend WithEvents LayoutControlGroupMain As DevExpress.XtraLayout.LayoutControlGroup End Class diff --git a/EDMI_ClientSuite/FormWorkflow/frmWorkflowStep.vb b/EDMI_ClientSuite/FormWorkflow/frmWorkflowStep.vb index 16ec780b..cc153587 100644 --- a/EDMI_ClientSuite/FormWorkflow/frmWorkflowStep.vb +++ b/EDMI_ClientSuite/FormWorkflow/frmWorkflowStep.vb @@ -1,3 +1,66 @@ -Public Class frmWorkflowStep +Imports DevExpress.XtraLayout +Imports DigitalData.GUIs.ClientSuite +Public Class frmWorkflowStep + Private _ControlLoader As ClassControlLoader + Private _ControlData As ClassControlData + + Private _FormId As Int64 + Private _RequestId As Int64 + Private _ProcessName As String + Private _RequestName As String + + Private _HeaderGroup As LayoutControlGroup + Private _BodyGroup As LayoutControlGroup + + Public Sub New(RequestId As Int64) + ' Dieser Aufruf ist für den Designer erforderlich. + InitializeComponent() + + ' Fügen Sie Initialisierungen nach dem InitializeComponent()-Aufruf hinzu. + _RequestId = RequestId + End Sub + + Private Async Function GetRequestData(RequestId) As Task + Await My.Channel.CreateDatabaseRequestAsync("Get Request Data", True) + + Dim oResult = Await My.Channel.ReturnDatatableAsync($"SELECT PROCESS_NAME, TITLE, FORM_ID FROM VWICM_WF_REQUEST WHERE RECORD_ID = {RequestId}") + + If Not oResult.OK Then + Throw New ApplicationException("Request data could not be fetched!") + ShowErrorMessage(oResult.ErrorMessage) + End If + + My.Channel.CloseDatabaseRequest() + + Dim oRows = oResult.Table.Rows + + If oRows.Count = 1 Then + _FormId = oRows.Item(0).Item("FORM_ID") + _ProcessName = oRows.Item(0).Item("PROCESS_NAME") + _RequestName = oRows.Item(0).Item("TITLE") + Else + Throw New ApplicationException("Request data could not be fetched!") + End If + End Function + + + Private Async Sub frmWorkflowStep_Load(sender As Object, e As EventArgs) Handles MyBase.Load + Await GetRequestData(_RequestId) + + Dim oControlTable = Await My.Common.Views.VWICM_FORM_CONTROL(_FormId) + Dim oControlData = Await My.Common.Views.VWICM_WF_REQUESTCONTROLDATA(_FormId, _RequestId) + + _HeaderGroup = LayoutControlGroupMain.AddGroup("Request Header") + _BodyGroup = LayoutControlGroupMain.AddGroup("Control Body") + + _ControlLoader = New ClassControlLoader(My.LogConfig, _BodyGroup) + _ControlData = New ClassControlData(My.LogConfig) + + _ControlLoader.LoadControls(oControlTable) + _ControlData.LoadControlData(_ControlLoader.LayoutControls, oControlData) + + _ControlLoader.AddControl("Process Name", _ProcessName, _HeaderGroup) + _ControlLoader.AddControl("Request Name", _RequestName, _HeaderGroup) + End Sub End Class \ No newline at end of file diff --git a/EDMI_ClientSuite/frmMain.Designer.vb b/EDMI_ClientSuite/frmMain.Designer.vb index 087703f7..2136923e 100644 --- a/EDMI_ClientSuite/frmMain.Designer.vb +++ b/EDMI_ClientSuite/frmMain.Designer.vb @@ -32,7 +32,6 @@ Partial Class frmMain Me.LabelCurrentVersion = New DevExpress.XtraBars.BarStaticItem() Me.BarButtonItem1 = New DevExpress.XtraBars.BarButtonItem() Me.SkinDropDownButtonItem1 = New DevExpress.XtraBars.SkinDropDownButtonItem() - Me.BarButtonEntityDesigner = New DevExpress.XtraBars.BarButtonItem() Me.BarButtonDeleteControl = New DevExpress.XtraBars.BarButtonItem() Me.LabelCurrentLanguage = New DevExpress.XtraBars.BarStaticItem() Me.BarButtonItem2 = New DevExpress.XtraBars.BarButtonItem() @@ -69,7 +68,7 @@ Partial Class frmMain ' Me.RibbonControl.ApplicationButtonDropDownControl = Me.MainMenu Me.RibbonControl.ExpandCollapseItem.Id = 0 - Me.RibbonControl.Items.AddRange(New DevExpress.XtraBars.BarItem() {Me.RibbonControl.ExpandCollapseItem, Me.BarButtonExit, Me.BarButtonUserSettings, Me.LabelCurrentUser, Me.LabelCurrentMachine, Me.LabelCurrentVersion, Me.BarButtonItem1, Me.SkinDropDownButtonItem1, Me.BarButtonEntityDesigner, Me.BarButtonDeleteControl, Me.BarButtonConnectionSettings, Me.LabelCurrentLanguage, Me.BarButtonItem2, Me.BarWorkspaceMenuItem1, Me.LabelServiceOnline, Me.BarButtonUserManager, Me.LabelServiceOffline, Me.BarButtonItem3, Me.BarButtonFormDesigner, Me.BarButtonItem4}) + Me.RibbonControl.Items.AddRange(New DevExpress.XtraBars.BarItem() {Me.RibbonControl.ExpandCollapseItem, Me.BarButtonExit, Me.BarButtonUserSettings, Me.LabelCurrentUser, Me.LabelCurrentMachine, Me.LabelCurrentVersion, Me.BarButtonItem1, Me.SkinDropDownButtonItem1, Me.BarButtonDeleteControl, Me.BarButtonConnectionSettings, Me.LabelCurrentLanguage, Me.BarButtonItem2, Me.BarWorkspaceMenuItem1, Me.LabelServiceOnline, Me.BarButtonUserManager, Me.LabelServiceOffline, Me.BarButtonItem3, Me.BarButtonFormDesigner, Me.BarButtonItem4}) Me.RibbonControl.Location = New System.Drawing.Point(0, 0) Me.RibbonControl.MaxItemId = 25 Me.RibbonControl.MdiMergeStyle = DevExpress.XtraBars.Ribbon.RibbonMdiMergeStyle.Always @@ -147,14 +146,6 @@ Partial Class frmMain Me.SkinDropDownButtonItem1.Id = 10 Me.SkinDropDownButtonItem1.Name = "SkinDropDownButtonItem1" ' - 'BarButtonEntityDesigner - ' - Me.BarButtonEntityDesigner.Caption = "Entitäten Designer" - Me.BarButtonEntityDesigner.Id = 12 - Me.BarButtonEntityDesigner.ImageOptions.Image = CType(resources.GetObject("BarButtonEntityDesigner.ImageOptions.Image"), System.Drawing.Image) - Me.BarButtonEntityDesigner.ImageOptions.LargeImage = CType(resources.GetObject("BarButtonEntityDesigner.ImageOptions.LargeImage"), System.Drawing.Image) - Me.BarButtonEntityDesigner.Name = "BarButtonEntityDesigner" - ' 'BarButtonDeleteControl ' Me.BarButtonDeleteControl.Caption = "Delete Control" @@ -265,7 +256,6 @@ Partial Class frmMain ' 'RibbonPageGroup1 ' - Me.RibbonPageGroup1.ItemLinks.Add(Me.BarButtonEntityDesigner) Me.RibbonPageGroup1.ItemLinks.Add(Me.BarButtonFormDesigner) Me.RibbonPageGroup1.Name = "RibbonPageGroup1" Me.RibbonPageGroup1.Text = "Inhalte" @@ -366,7 +356,6 @@ Partial Class frmMain Friend WithEvents DockManager As DevExpress.XtraBars.Docking.DockManager Friend WithEvents SkinDropDownButtonItem1 As DevExpress.XtraBars.SkinDropDownButtonItem Friend WithEvents RibbonPageGroup3 As DevExpress.XtraBars.Ribbon.RibbonPageGroup - Friend WithEvents BarButtonEntityDesigner As DevExpress.XtraBars.BarButtonItem Friend WithEvents BarButtonDeleteControl As DevExpress.XtraBars.BarButtonItem Friend WithEvents BarButtonConnectionSettings As DevExpress.XtraBars.BarButtonItem Friend WithEvents LabelCurrentLanguage As DevExpress.XtraBars.BarStaticItem diff --git a/EDMI_ClientSuite/frmMain.resx b/EDMI_ClientSuite/frmMain.resx index 3ac9cdd8..ed5110e8 100644 --- a/EDMI_ClientSuite/frmMain.resx +++ b/EDMI_ClientSuite/frmMain.resx @@ -258,34 +258,6 @@ 6rZH6NG6Ev4hdBEzYOFbB1GRcZPAQzo2yVt0MLNPoaESGiqhoRIaKqEhSCnZTSZndNB7gO0ANATe5J/r hfs556WUMvqxn7U7/0ND8ESg1kolZAIoJiEVQPUScgHUJjFD4hMBVJPwf4eH2aAheCJwws+v0D00BGh8 q7ZZdA8NQQiEQAiEQAiEQAig6U36+Q0aKqGhEhrqsGEFMnodJsvjoggAAAAASUVORK5CYII= - - - - - iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAAABGdBTUEAALGPC/xhBQAAABl0RVh0U29m - dHdhcmUAQWRvYmUgSW1hZ2VSZWFkeXHJZTwAAAANdEVYdFRpdGxlAFdpemFyZDvJJTcGAAABNUlEQVQ4 - T6WTzUrDQBRGg6/UF3DlzocoKIg/CH0AFxLEhQTUpSt3KuJKy4CCYhQEEdy4Enc12DRU24WITebz3ukk - ziTTIHjgSybJvWdmQuIB+FeKge/7qInU54bZzLEEBVLqwS/8PAiCl7LE6xw0pygzMku5DqNBhPhiQ41N - 9ATfZYk6kOAxOllGEu7i9WgedM3FFiwwQ1iCnVgsoXe+gn7YQuewCZmNuMiJSxDEYhH9m5bK2+mC2kb2 - NeTCCpaAmqcpaXK5Wgh4NdHxHJLrbVrJ+N2YlAWblHZXrKmZu21ayd0eRPiA52jAhRUqWxhHone1pV7i - 2e0TF2B2XTglTgHfTD8/8H6/r5q4mXFJJgoU+iOqk9QLDHJJnlzyZwEzSUJUBa4wZYnGFpihIlcaFBYY - PxO8H2xiJi+n2GplAAAAAElFTkSuQmCC - - - - - iVBORw0KGgoAAAANSUhEUgAAACAAAAAgCAYAAABzenr0AAAABGdBTUEAALGPC/xhBQAAABl0RVh0U29m - dHdhcmUAQWRvYmUgSW1hZ2VSZWFkeXHJZTwAAAANdEVYdFRpdGxlAFdpemFyZDvJJTcGAAACOklEQVRY - R8WUTUtbQRSG3ZTiL+hfcNeFq/4Fof/ATQWrobWimyrdSTYiwU23oeCqhVJbNX5gq6JuWoTabSUWqU2u - JiYIJpKY5PieJCP343jvzDXevvAwd05m5jxcJreLiP4rYjFKxGKUiMUoEYuKeDxOhvwFfYD3epB6iEUF - NmHQD69PJBJXyWSyD1P3WY65Qiwqwgik02lRIjIBjiRxZ4FK7nf76fbY17sltASO3z/rB49sNWpUy1Tc - m6PjDwM89Y1dgNOWqLKErsAKqIENECsffafsl3E6ScUIcyzxj1uAoyTwm+diMo4Jmkxws9y3V2QtDVN2 - YYjyeC7sjmsL+JDBEkc/xjFBkyeZT4PNhm50BPzCEoijH+OYoMkDcFnYGfMI8Bsp/nhHjXoNS82jKzBo - LQ57mitYIrcxTfXKBZabJVAAzXtAKb85KjZn8lujdLIcIys1QbWLPLbpx1cAjR+C/dPVF5RbH7m5eIrT - tZfEd8NKTdL5r49ULfzBNrMECTwGMyAJ5sE2aCgB/gZUzg6xlOjp1GpzNI3WHbADgbcW/yW/4o1sz6LU - ykHmvCnBo0nCCHRby28o+/k5Xf776WgaRsJYgKkWj3DzX+N7XMe09frDSoQSAFQrnfHQjLupiUQogfYm - R8JKdEyAY2/Ko8JPoqMCHHfzIImOC3BMJO5FgKMrEVogCE6QhG2tp4encBs4MIheIIn0SucpxKIEDtJB - lHCfZUcsSuAgXdwSkb4BhZLgUTyvBXVdA6q9hTy63+d5AAAAAElFTkSuQmCC @@ -331,31 +303,30 @@ - iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8 - YQUAAAAZdEVYdFNvZnR3YXJlAEFkb2JlIEltYWdlUmVhZHlxyWU8AAAAEHRFWHRUaXRsZQBNYXNrO1Jv - bGU7urHsswAAAN5JREFUOE+dkr0NgmAURYmtE7gAhdHKMWyxdQILwwCULuAEhugAroCNO1CZWCr2FHqP - eR/5QEiE4kTuz7vBhOB5iUvxHkjJQNEw+1AwkDfMPuQMZCZOYinG9ot2xa4sYyA1MRNoB9oNdGUpIjEx - 5A0SBiITQ4gYCMXLM/+Fm9D9p7OZfeAmcANbM/vATTUwFe57WJjXBhkdutxUA7AThHsxMs8Hj4wO3a/v - F+biKigcxUpMDJ7xyOjQ/RmAtXgIim2Q0alu/GPHRtxF8xiPrNavCQ++toO4GTzjNXpx8AFGzsQFb2mX - gAAAAABJRU5ErkJggg== + iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAAABGdBTUEAALGPC/xhBQAAABl0RVh0U29m + dHdhcmUAQWRvYmUgSW1hZ2VSZWFkeXHJZTwAAAAQdEVYdFRpdGxlAE1hc2s7Um9sZTu6seyzAAAA3klE + QVQ4T52SvQ2CYBRFia0TuACF0coxbLF1AgvDAJQu4ASG6ACugI07UJlYKvYUeo95H/lASITiRO7Pu8GE + 4HmJS/EeSMlA0TD7UDCQN8w+5AxkJk5iKcb2i3bFrixjIDUxE2gH2g10ZSkiMTHkDRIGIhNDiBgIxcsz + /4Wb0P2ns5l94CZwA1sz+8BNNTAV7ntYmNcGGR263FQDsBOEezEyzwePjA7dr+8X5uIqKBzFSkwMnvHI + 6ND9GYC1eAiKbZDRqW78Y8dG3EXzGI+s1q8JD762g7gZPOM1enHwAUbOxAVvaZeAAAAAAElFTkSuQmCC - iVBORw0KGgoAAAANSUhEUgAAACAAAAAgCAYAAABzenr0AAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8 - YQUAAAAZdEVYdFNvZnR3YXJlAEFkb2JlIEltYWdlUmVhZHlxyWU8AAAAEHRFWHRUaXRsZQBNYXNrO1Jv - bGU7urHsswAAAplJREFUWEfF1r9vTnEUx/GWpEIZRIpIRYhEGcTP0ERjaESaCpsitor4kabBJhEWg8Fg - sZkNYmnsFuYuDIh/wWS/Pu9vvufm3G/P87h9nhuG183j3nM+51TvvX1Gqqr6r8KT5tenh/NyWvbIqHBu - GGSQReY8M8LBRkVL8iy7J1dlVk7IQdkl22RMNmR85hzXqKGWHnrJsLwlZoSDjYoWXUPXFpkRDjYqWiia - urTAjHCwUdFc0dSlOWaEg42KpoumLk0zIxxsVDRVNLXxVG6LPUGmrJtihg16Ldyhp8Q/blvkstyUu/JI - Hmd85hzXqJmRI7JTyCCLTLJ3SLnAhF/gm1TZF3knz+WWXJSjwvO7VTZmfOYc16ihlh56ybA8sssF7kia - bQt8FmvoGtnlAlekscB7iZq7QPZe8Qvw62ks8Eqi5i6QfVhsOPfPbmks8EB800fhTt6X8ZlzvqZtHdln - xBa4LsxsLMDvxIeelFTkcM6Ht60jm5vUFmCZVOsX4L/IGvgpfKDHtfXWkX1NGM4ft+2S6vwCWBVr6gqZ - ZN8XFriQ/x0u8EaikGGQyQ3H8GWZkJ4L8HKIQoZB5nFhgfNSD0e5wDH5LVHQIMgi85LckM3SdwGsSBQ2 - CLL4dsR3Cr4d+TlJtAB3aRQ2CLL2y6T4GbVogQPyXaLA9SCDrHHx+Q3RAnghPqzf8278cw8y/votutcC - /E3/KRbW641nyjcfvWTUNczoJR18cfZELNCW4Ke0d36/dz+9jbxyqJcOZYPwuvwgPrgNeupXrSmHeulQ - NmR80/kq0aAItfSsySqHeukQNWVnpc1TQQ21UcaaoV46RE3OIXkr0WBwjZqoNymHeukQNRU2yTl5KT8y - PnOOa1FPrRzqhSf/nWrkD0Il4XZB5Rq7AAAAAElFTkSuQmCC + iVBORw0KGgoAAAANSUhEUgAAACAAAAAgCAYAAABzenr0AAAABGdBTUEAALGPC/xhBQAAABl0RVh0U29m + dHdhcmUAQWRvYmUgSW1hZ2VSZWFkeXHJZTwAAAAQdEVYdFRpdGxlAE1hc2s7Um9sZTu6seyzAAACmUlE + QVRYR8XWv29OcRTH8ZakQhlEikhFiEQZxM/QRGNoRJoKmyK2iviRpsEmERaDwWCxmQ1iaewW5i4MiH/B + ZL8+72++5+bcb8/zuH2eG4bXzePecz7nVO+9fUaqqvqvwpPm16eH83Ja9siocG4YZJBF5jwzwsFGRUvy + LLsnV2VWTshB2SXbZEw2ZHzmHNeooZYeesmwvCVmhIONihZdQ9cWmREONipaKJq6tMCMcLBR0VzR1KU5 + ZoSDjYqmi6YuTTMjHGxUNFU0tfFUbos9Qaasm2KGDXot3KGnxD9uW+Sy3JS78kgeZ3zmHNeomZEjslPI + IItMsndIucCEX+CbVNkXeSfP5ZZclKPC87tVNmZ85hzXqKGWHnrJsDyyywXuSJptC3wWa+ga2eUCV6Sx + wHuJmrtA9l7xC/DraSzwSqLmLpB9WGw4989uaSzwQHzTR+FO3pfxmXO+pm0d2WfEFrguzGwswO/Eh56U + VORwzoe3rSObm9QWYJlU6xfgv8ga+Cl8oMe19daRfU0Yzh+37ZLq/AJYFWvqCplk3xcWuJD/HS7wRqKQ + YZDJDcfwZZmQngvwcohChkHmcWGB81IPR7nAMfktUdAgyCLzktyQzdJ3AaxIFDYIsvh2xHcKvh35OUm0 + AHdpFDYIsvbLpPgZtWiBA/JdosD1IIOscfH5DdECeCE+rN/zbvxzDzL++i261wL8Tf8pFtbrjWfKNx+9 + ZNQ1zOglHXxx9kQs0Jbgp7R3fr93P72NvHKolw5lg/C6/CA+uA166letKYd66VA2ZHzT+SrRoAi19KzJ + Kod66RA1ZWelzVNBDbVRxpqhXjpETc4heSvRYHCNmqg3KYd66RA1FTbJOXkpPzI+c45rUU+tHOqFJ/+d + auQPQiXhdkHlGrsAAAAASUVORK5CYII= diff --git a/EDMI_ClientSuite/frmMain.vb b/EDMI_ClientSuite/frmMain.vb index 289d236e..1c7662a9 100644 --- a/EDMI_ClientSuite/frmMain.vb +++ b/EDMI_ClientSuite/frmMain.vb @@ -132,12 +132,6 @@ Public Class frmMain frm.Show() End Sub - Private Sub BarButtonEntityDesigner_ItemClick(sender As Object, e As DevExpress.XtraBars.ItemClickEventArgs) Handles BarButtonEntityDesigner.ItemClick - Dim frm As New frmEntityDesigner() - frm.MdiParent = DocumentManager.MdiParent - frm.Show() - End Sub - Private Sub BarButtonFormDesigner_ItemClick(sender As Object, e As DevExpress.XtraBars.ItemClickEventArgs) Handles BarButtonFormDesigner.ItemClick Dim oForm As New frmFormDesigner() oForm.MdiParent = DocumentManager.MdiParent @@ -221,6 +215,9 @@ Public Class frmMain End Sub Private Sub BarButtonItem4_ItemClick(sender As Object, e As DevExpress.XtraBars.ItemClickEventArgs) Handles BarButtonItem4.ItemClick - + Dim oForm As New frmWorkflowStep(142) With { + .MdiParent = DocumentManager.MdiParent + } + oForm.Show() End Sub End Class \ No newline at end of file From d7a4a4441d723e0736eb8984421c1de92f1d3b36 Mon Sep 17 00:00:00 2001 From: Jonathan Jenne Date: Tue, 26 Mar 2019 16:17:56 +0100 Subject: [PATCH 08/25] Add My ExportFile function --- Modules.Windream/Windream2.vb | 63 +++++++++++++++++++++++++++++++++++ 1 file changed, 63 insertions(+) diff --git a/Modules.Windream/Windream2.vb b/Modules.Windream/Windream2.vb index 46506857..27028518 100644 --- a/Modules.Windream/Windream2.vb +++ b/Modules.Windream/Windream2.vb @@ -1101,6 +1101,69 @@ Public Class Windream2 Return False End Try End Function + + Public Function ExportFile(WMObject As WMObject, ExportPath As String) As Boolean + Try + Dim oWMObject As IWMObject6 = DirectCast(WMObject, IWMObject6) + + Dim oFilenameFull As String = oWMObject.aName + Dim oFilenameExport As String + Dim oSplitIndex = oFilenameFull.LastIndexOf(".") + Dim oVersion = 1 + + Dim oFilename = oFilenameFull.Substring(0, oSplitIndex) + Dim oExtension = oFilenameFull.Substring(oSplitIndex) + + _logger.Debug("Preparing export of file {0}..", oFilenameFull) + _logger.Debug("Filename: {0}", oFilename) + _logger.Debug("Extension: {0}", oExtension) + + ' build the file path in case the exported file doesn't already exist + oFilenameExport = BuildExportPath(ExportPath, oFilename, oExtension) + + ' Add version until we find the version that does NOT exist + Do While File.Exists(oFilenameExport) + oVersion += 1 + oFilenameExport = BuildExportPath(ExportPath, oFilename, oExtension, oVersion) + Loop + + _logger.Debug("File will be exported to {0}", oFilenameExport) + + _logger.Debug("Opening file stream..") + Dim oStream As WMStream = oWMObject.OpenStream("BinaryObject", WMObjectStreamOpenMode.WMObjectStreamOpenModeRead) + Dim oWMFileIO As New WMFileIO() With { + .aWMStreamEx = oStream, + .aWMStream = oStream, + .bstrOriginalFileName = oFilenameExport + } + + _logger.Debug("Exporting file..") + oWMFileIO.ExportOriginal(True) + + _logger.Debug("Cleaning up..") + oStream.Flush() + oStream.Close() + + _logger.Debug("File exported to {0}", oFilenameExport) + Return True + Catch ex As Exception + _logger.Error(ex) + Return False + End Try + End Function + + Private Function BuildExportPath(BasePath As String, FilenameWithoutExtension As String, Extension As String, Optional Version As Integer = 1) + Dim oFilename + + If Version = 1 Then + oFilename = FilenameWithoutExtension & Extension + Else + oFilename = FilenameWithoutExtension & "_" & Version & Extension + End If + + Return Path.Combine(BasePath, oFilename) + End Function + Public Function Export_WMFile(WMPath As String, Exportpath As String) Try If Not Exportpath.EndsWith("\") Then From 0eb1eeb287928c820b7def5008dc28dc95204d0a Mon Sep 17 00:00:00 2001 From: Jonathan Jenne Date: Wed, 27 Mar 2019 15:59:16 +0100 Subject: [PATCH 09/25] Organize Control Classes in Namespaces --- EDMI_ClientSuite/Base/BaseClass.vb | 30 ++-- EDMI_ClientSuite/ClassControlData.vb | 35 ----- EDMI_ClientSuite/ClassControlLoader.vb | 100 ------------ EDMI_ClientSuite/ClassControlManager.vb | 12 ++ EDMI_ClientSuite/ClassService.vb | 1 + EDMI_ClientSuite/ClassTimer.vb | 1 + EDMI_ClientSuite/ClientSuite.vbproj | 43 ++++-- .../FormDesigner/Controls/Data.vb | 41 +++++ .../Controls/Editors/DatasourceEditor.vb | 48 ++++++ .../Controls/Editors/DatasourceType.vb | 23 +++ .../Controls/Editors/StaticListEditor.vb} | 4 +- .../Editors/frmDatasourceEditor.Designer.vb | 63 ++++++++ .../Editors/frmDatasourceEditor.resx} | 0 .../Controls/Editors/frmDatasourceEditor.vb | 50 ++++++ .../Editors/frmStaticListEditor.Designer.vb | 0 .../Editors/frmStaticListEditor.en-US.resx | 0 .../Editors/frmStaticListEditor.resx | 0 .../Controls}/Editors/frmStaticListEditor.vb | 0 .../FormDesigner/Controls/Loader.vb | 105 +++++++++++++ .../FormDesigner/Controls/Localization.vb | 30 ++++ .../FormDesigner/Controls/Metadata.vb | 8 + .../Controls/Properties/BaseProperties.vb} | 6 +- .../Controls/Properties/ComboboxProperties.vb | 14 ++ .../frmFormDesigner.Designer.vb | 49 ++++-- .../FormDesigner/frmFormDesigner.resx | 142 ++++++++++++++++++ .../frmFormDesigner.vb | 24 ++- .../ClassControlLocalization.vb | 27 ---- .../ClassControlMetadata.vb | 4 - .../Controls/ClassComboboxProperties.vb | 15 -- .../FormWorkflow/frmWorkflowStep.vb | 13 +- .../Strings/ControlProperties.Designer.vb | 9 ++ .../Strings/ControlProperties.en.resx | 3 + .../Strings/ControlProperties.resx | 3 + EDMI_ClientSuite/packages.config | 1 + 34 files changed, 670 insertions(+), 234 deletions(-) delete mode 100644 EDMI_ClientSuite/ClassControlData.vb delete mode 100644 EDMI_ClientSuite/ClassControlLoader.vb create mode 100644 EDMI_ClientSuite/ClassControlManager.vb create mode 100644 EDMI_ClientSuite/FormDesigner/Controls/Data.vb create mode 100644 EDMI_ClientSuite/FormDesigner/Controls/Editors/DatasourceEditor.vb create mode 100644 EDMI_ClientSuite/FormDesigner/Controls/Editors/DatasourceType.vb rename EDMI_ClientSuite/{FormEntityDesigner/ControlProperties/Editors/ClassStaticListEditor.vb => FormDesigner/Controls/Editors/StaticListEditor.vb} (96%) create mode 100644 EDMI_ClientSuite/FormDesigner/Controls/Editors/frmDatasourceEditor.Designer.vb rename EDMI_ClientSuite/{FormEntityDesigner/frmFormDesigner.resx => FormDesigner/Controls/Editors/frmDatasourceEditor.resx} (100%) create mode 100644 EDMI_ClientSuite/FormDesigner/Controls/Editors/frmDatasourceEditor.vb rename EDMI_ClientSuite/{FormEntityDesigner/ControlProperties => FormDesigner/Controls}/Editors/frmStaticListEditor.Designer.vb (100%) rename EDMI_ClientSuite/{FormEntityDesigner/ControlProperties => FormDesigner/Controls}/Editors/frmStaticListEditor.en-US.resx (100%) rename EDMI_ClientSuite/{FormEntityDesigner/ControlProperties => FormDesigner/Controls}/Editors/frmStaticListEditor.resx (100%) rename EDMI_ClientSuite/{FormEntityDesigner/ControlProperties => FormDesigner/Controls}/Editors/frmStaticListEditor.vb (100%) create mode 100644 EDMI_ClientSuite/FormDesigner/Controls/Loader.vb create mode 100644 EDMI_ClientSuite/FormDesigner/Controls/Localization.vb create mode 100644 EDMI_ClientSuite/FormDesigner/Controls/Metadata.vb rename EDMI_ClientSuite/{FormEntityDesigner/ControlProperties/BaseClasses/ClassBaseProperties.vb => FormDesigner/Controls/Properties/BaseProperties.vb} (71%) create mode 100644 EDMI_ClientSuite/FormDesigner/Controls/Properties/ComboboxProperties.vb rename EDMI_ClientSuite/{FormEntityDesigner => FormDesigner}/frmFormDesigner.Designer.vb (85%) create mode 100644 EDMI_ClientSuite/FormDesigner/frmFormDesigner.resx rename EDMI_ClientSuite/{FormEntityDesigner => FormDesigner}/frmFormDesigner.vb (85%) delete mode 100644 EDMI_ClientSuite/FormEntityDesigner/ClassControlLocalization.vb delete mode 100644 EDMI_ClientSuite/FormEntityDesigner/ClassControlMetadata.vb delete mode 100644 EDMI_ClientSuite/FormEntityDesigner/ControlProperties/Controls/ClassComboboxProperties.vb diff --git a/EDMI_ClientSuite/Base/BaseClass.vb b/EDMI_ClientSuite/Base/BaseClass.vb index d8c0376a..73c5d141 100644 --- a/EDMI_ClientSuite/Base/BaseClass.vb +++ b/EDMI_ClientSuite/Base/BaseClass.vb @@ -1,16 +1,22 @@ Imports DigitalData.Modules.Logging -''' -''' Base Class which supplies a Logger/LogConfig -''' -Public Class BaseClass - Protected LogConfig As LogConfig - Protected Logger As Logger - Public Sub New(LogConfig As LogConfig) - Dim oClassName = Me.GetType().Name +Namespace Base + ''' + ''' Base Class which supplies a Logger/LogConfig + ''' + Public Class BaseClass + Protected LogConfig As LogConfig + Protected Logger As Logger + + Public Sub New(LogConfig As LogConfig) + Dim oClassName = Me.GetType().Name + + Me.LogConfig = LogConfig + Me.Logger = LogConfig.GetLogger(oClassName) + End Sub + End Class +End Namespace + + - Me.LogConfig = LogConfig - Me.Logger = LogConfig.GetLogger(oClassName) - End Sub -End Class diff --git a/EDMI_ClientSuite/ClassControlData.vb b/EDMI_ClientSuite/ClassControlData.vb deleted file mode 100644 index 3c410de8..00000000 --- a/EDMI_ClientSuite/ClassControlData.vb +++ /dev/null @@ -1,35 +0,0 @@ -Imports DevExpress.XtraEditors -Imports DigitalData.Controls.LookupGrid -Imports DigitalData.Modules.Logging - -Public Class ClassControlData - Inherits BaseClass - - Public Sub New(LogConfig As LogConfig) - MyBase.New(LogConfig) - End Sub - - Public Sub LoadControlData(ByRef Controls As List(Of BaseEdit), Data As DataTable) - Dim oCounter = 0 - - For Each oControl As BaseEdit In Controls - Dim oBindingSource As New BindingSource(Data, Nothing) - - Select Case oControl.GetType - Case GetType(TextEdit) - oControl.DataBindings.Add("Text", oBindingSource, "CTRLVALUE", True, DataSourceUpdateMode.OnPropertyChanged) - Case GetType(MemoEdit) - oControl.DataBindings.Add("Text", oBindingSource, "CTRLVALUE", True, DataSourceUpdateMode.OnPropertyChanged) - Case GetType(DateEdit) - oControl.DataBindings.Add("Text", oBindingSource, "CTRLVALUE", True, DataSourceUpdateMode.OnPropertyChanged) - Case GetType(LookupControl2) - oControl.DataBindings.Add("Text", oBindingSource, "CTRLVALUE", True, DataSourceUpdateMode.OnPropertyChanged) - Case Else - - End Select - - oBindingSource.Position = oCounter - oCounter += 1 - Next - End Sub -End Class diff --git a/EDMI_ClientSuite/ClassControlLoader.vb b/EDMI_ClientSuite/ClassControlLoader.vb deleted file mode 100644 index b901ccb8..00000000 --- a/EDMI_ClientSuite/ClassControlLoader.vb +++ /dev/null @@ -1,100 +0,0 @@ -Imports DevExpress.XtraEditors -Imports DevExpress.XtraLayout -Imports DigitalData.Controls.LookupGrid -Imports DigitalData.Modules.Logging - -Public Class ClassControlLoader - Inherits BaseClass - - Private _LayoutControlGroup As LayoutControlGroup - Private _LayoutControls As List(Of BaseEdit) - - Public ReadOnly Property LayoutControls As List(Of BaseEdit) - Get - If _LayoutControls Is Nothing Then - _LayoutControls = New List(Of BaseEdit) - End If - Return _LayoutControls - End Get - End Property - - Public Sub New(LogConfig As LogConfig, LayoutControlGroup As LayoutControlGroup) - MyBase.New(LogConfig) - _LayoutControlGroup = LayoutControlGroup - End Sub - - Public Sub AddControl(Name As String, Value As String, LayoutControlGroup As LayoutControlGroup) - Dim oTextEdit As New SimpleLabelItem() With { - .Name = Name, - .Text = Name & " - " & Value - } - - LayoutControlGroup.AddItem(oTextEdit) - End Sub - Public Sub AddControl(Name As String, Value As String) - AddControl(Name, Value, _LayoutControlGroup) - End Sub - - Public Sub AddSeparator(LayoutControlGroup As LayoutControlGroup) - Dim oSeparator = New SimpleSeparator() - - LayoutControlGroup.AddItem(oSeparator) - End Sub - Public Sub AddSeparator() - AddSeparator(_LayoutControlGroup) - End Sub - - Public Sub LoadControls(Datatable As DataTable, LayoutControlGroup As LayoutControlGroup) - For Each oRow As DataRow In Datatable.Rows - Dim oCaption As String = oRow.Item("COLNAME") - Dim oControlType As String = oRow.Item("CTRLTYPE") - Dim oControlId As Int64 = oRow.Item("RECORD_ID") - Dim oEditor As BaseEdit = CreateLayoutControl(oControlType, oControlId, oControlId) - - If oEditor Is Nothing Then - Continue For - End If - - oEditor.Tag = New ClassControlMetadata() With { - .Id = oControlId, - .Type = oControlType - } - - LayoutControls.Add(oEditor) - LayoutControlGroup.AddItem(oCaption, oEditor) - Next - - LayoutControlGroup.AddItem(New EmptySpaceItem()) - End Sub - Public Sub LoadControls(Datatable As DataTable) - LoadControls(Datatable, _LayoutControlGroup) - End Sub - - Public Function CreateLayoutControl(Type As String, Name As String, Id As Int64) - Dim oEditor As BaseEdit = Nothing - - Logger.Debug("Create new Control of type {0} with name {1}", Type, Name) - - Select Case Type - Case ClassConstants.CONTROL_TEXTEDIT - Dim oTextEdit As New TextEdit() With {.Name = Name} - oEditor = oTextEdit - Case ClassConstants.CONTROL_MEMOEDIT - Dim oMemoEdit As New MemoEdit() With {.Name = Name} - oEditor = oMemoEdit - Case ClassConstants.CONTROL_DATEEDIT - Dim oDateEdit As New DateEdit() With {.Name = Name} - oEditor = oDateEdit - Case ClassConstants.CONTROL_CHECKEDIT - Dim oCheckEdit As New CheckEdit() With {.Name = Name} - oEditor = oCheckEdit - Case ClassConstants.CONTROL_COMBOEDIT - Dim oComboEdit As New LookupControl2() With {.Name = Name} - oEditor = oComboEdit - Case Else - oEditor = Nothing - End Select - - Return oEditor - End Function -End Class diff --git a/EDMI_ClientSuite/ClassControlManager.vb b/EDMI_ClientSuite/ClassControlManager.vb new file mode 100644 index 00000000..6defb2f9 --- /dev/null +++ b/EDMI_ClientSuite/ClassControlManager.vb @@ -0,0 +1,12 @@ +Imports DigitalData.GUIs.ClientSuite.Base +Imports DigitalData.Modules.Logging + +Public Class ClassControlManager + Inherits BaseClass + + Public Sub New(LogConfig As LogConfig) + MyBase.New(LogConfig) + End Sub + + +End Class diff --git a/EDMI_ClientSuite/ClassService.vb b/EDMI_ClientSuite/ClassService.vb index 68764999..97432ea7 100644 --- a/EDMI_ClientSuite/ClassService.vb +++ b/EDMI_ClientSuite/ClassService.vb @@ -2,6 +2,7 @@ Imports System.ServiceModel.Channels Imports DigitalData.Modules.Logging Imports DigitalData.Modules.EDMIFileOps.EDMIServiceReference +Imports DigitalData.GUIs.ClientSuite.Base Public Class ClassService Inherits BaseClass diff --git a/EDMI_ClientSuite/ClassTimer.vb b/EDMI_ClientSuite/ClassTimer.vb index 7a02f880..c415b64e 100644 --- a/EDMI_ClientSuite/ClassTimer.vb +++ b/EDMI_ClientSuite/ClassTimer.vb @@ -1,6 +1,7 @@ Imports System.ServiceModel Imports System.Threading Imports System.Timers +Imports DigitalData.GUIs.ClientSuite.Base Imports DigitalData.Modules.EDMIFileOps.EDMIServiceReference Imports DigitalData.Modules.Logging diff --git a/EDMI_ClientSuite/ClientSuite.vbproj b/EDMI_ClientSuite/ClientSuite.vbproj index 22654805..07362b61 100644 --- a/EDMI_ClientSuite/ClientSuite.vbproj +++ b/EDMI_ClientSuite/ClientSuite.vbproj @@ -90,6 +90,9 @@ False ..\Modules.Logging\bin\Debug\NLog.dll + + ..\packages\jacobslusser.ScintillaNET.3.6.3\lib\net40\ScintillaNET.dll + @@ -128,12 +131,13 @@ - + + - + @@ -146,11 +150,19 @@ - - + + + + + frmDatasourceEditor.vb + + + Form + + frmFormDesigner.vb - + Form @@ -190,14 +202,14 @@ Form - - - - - + + + + + frmStaticListEditor.vb - + Form @@ -302,7 +314,10 @@ - + + frmDatasourceEditor.vb + + frmFormDesigner.vb @@ -320,10 +335,10 @@ frmDocTest.vb - + frmStaticListEditor.vb - + frmStaticListEditor.vb diff --git a/EDMI_ClientSuite/FormDesigner/Controls/Data.vb b/EDMI_ClientSuite/FormDesigner/Controls/Data.vb new file mode 100644 index 00000000..249723a1 --- /dev/null +++ b/EDMI_ClientSuite/FormDesigner/Controls/Data.vb @@ -0,0 +1,41 @@ +Imports DevExpress.XtraEditors +Imports DigitalData.Controls.LookupGrid +Imports DigitalData.GUIs.ClientSuite.Base +Imports DigitalData.Modules.Logging + +Namespace Controls + Public Class ControlData + Inherits BaseClass + + Public Sub New(LogConfig As LogConfig) + MyBase.New(LogConfig) + End Sub + + Public Sub LoadControlData(ByRef Controls As List(Of BaseEdit), Data As DataTable) + Dim oCounter = 0 + + ' TODO: Do we need databinding and does it work with lookup control + For Each oControl As BaseEdit In Controls + Dim oBindingSource As New BindingSource(Data, Nothing) + + Select Case oControl.GetType + Case GetType(TextEdit) + oControl.DataBindings.Add("Text", oBindingSource, "CTRLVALUE", True, DataSourceUpdateMode.OnPropertyChanged) + Case GetType(MemoEdit) + oControl.DataBindings.Add("Text", oBindingSource, "CTRLVALUE", True, DataSourceUpdateMode.OnPropertyChanged) + Case GetType(DateEdit) + oControl.DataBindings.Add("Text", oBindingSource, "CTRLVALUE", True, DataSourceUpdateMode.OnPropertyChanged) + Case GetType(LookupControl2) + oControl.DataBindings.Add("Text", oBindingSource, "CTRLVALUE", True, DataSourceUpdateMode.OnPropertyChanged) + Case Else + + End Select + + oBindingSource.Position = oCounter + oCounter += 1 + Next + End Sub + End Class + +End Namespace + diff --git a/EDMI_ClientSuite/FormDesigner/Controls/Editors/DatasourceEditor.vb b/EDMI_ClientSuite/FormDesigner/Controls/Editors/DatasourceEditor.vb new file mode 100644 index 00000000..9d41137f --- /dev/null +++ b/EDMI_ClientSuite/FormDesigner/Controls/Editors/DatasourceEditor.vb @@ -0,0 +1,48 @@ +Imports System.ComponentModel +'Imports System.ComponentModel.Design +Imports System.Drawing.Design +'Imports System.Windows.Forms +Imports System.Windows.Forms.Design + +Namespace Controls.Editors + Public Class DatasourceEditor + Inherits UITypeEditor + + Public Overrides Function GetEditStyle(context As ITypeDescriptorContext) As UITypeEditorEditStyle + Return UITypeEditorEditStyle.Modal + End Function + + Public Overrides Function EditValue(context As ITypeDescriptorContext, provider As IServiceProvider, value As Object) As Object + Dim oService As IWindowsFormsEditorService = TryCast(provider.GetService(GetType(IWindowsFormsEditorService)), IWindowsFormsEditorService) + Dim oDatasource As DatasourceType = DirectCast(value, DatasourceType) + + If oService IsNot Nothing AndAlso oDatasource IsNot Nothing Then + Using oForm As New frmDatasourceEditor() + oForm.Value = oDatasource + If oService.ShowDialog(oForm) = DialogResult.OK Then + + value = oForm.Value + End If + End Using + End If + + Return value + End Function + End Class + + Public Class DatasourceTypeConverter + Inherits TypeConverter + + Public Overrides Function ToString() As String + Return MyBase.ToString() + End Function + + ' Diese Funktion gibt den String zurück, der im PropertyGrid für den Benutzer sichtbar ist, kann ruhig etwas hübscher sein als foo;bar;baz + Public Overrides Function ConvertTo(context As ITypeDescriptorContext, culture As Globalization.CultureInfo, value As Object, destinationType As Type) As Object + Return "Datasource" + End Function + End Class + +End Namespace + + diff --git a/EDMI_ClientSuite/FormDesigner/Controls/Editors/DatasourceType.vb b/EDMI_ClientSuite/FormDesigner/Controls/Editors/DatasourceType.vb new file mode 100644 index 00000000..90849a36 --- /dev/null +++ b/EDMI_ClientSuite/FormDesigner/Controls/Editors/DatasourceType.vb @@ -0,0 +1,23 @@ +Imports System.ComponentModel +Imports System.Drawing.Design +Imports DigitalData.GUIs.ClientSuite.Controls.Editors + +Namespace Controls.Editors + + + Public Class DatasourceType + Public Property StaticList As New List(Of String) + Public Property SQLCommand As String = String.Empty + + Public Sub New() + End Sub + + Public Sub New(Values As List(Of String)) + _StaticList = Values + End Sub + + Public Sub New(SQLCommand As String) + _SQLCommand = SQLCommand + End Sub + End Class +End Namespace diff --git a/EDMI_ClientSuite/FormEntityDesigner/ControlProperties/Editors/ClassStaticListEditor.vb b/EDMI_ClientSuite/FormDesigner/Controls/Editors/StaticListEditor.vb similarity index 96% rename from EDMI_ClientSuite/FormEntityDesigner/ControlProperties/Editors/ClassStaticListEditor.vb rename to EDMI_ClientSuite/FormDesigner/Controls/Editors/StaticListEditor.vb index 9baaca18..bf53f438 100644 --- a/EDMI_ClientSuite/FormEntityDesigner/ControlProperties/Editors/ClassStaticListEditor.vb +++ b/EDMI_ClientSuite/FormDesigner/Controls/Editors/StaticListEditor.vb @@ -4,7 +4,7 @@ Imports System.Drawing.Design 'Imports System.Windows.Forms Imports System.Windows.Forms.Design -Public Class ClassStaticListEditor +Public Class StaticListEditor Inherits UITypeEditor Public Overrides Function GetEditStyle(context As ITypeDescriptorContext) As UITypeEditorEditStyle @@ -31,7 +31,7 @@ Public Class ClassStaticListEditor End Function End Class - + Public Class StaticList diff --git a/EDMI_ClientSuite/FormDesigner/Controls/Editors/frmDatasourceEditor.Designer.vb b/EDMI_ClientSuite/FormDesigner/Controls/Editors/frmDatasourceEditor.Designer.vb new file mode 100644 index 00000000..bdc56032 --- /dev/null +++ b/EDMI_ClientSuite/FormDesigner/Controls/Editors/frmDatasourceEditor.Designer.vb @@ -0,0 +1,63 @@ + _ +Partial Class frmDatasourceEditor + Inherits DevExpress.XtraEditors.XtraForm + + 'Das Formular überschreibt den Löschvorgang, um die Komponentenliste zu bereinigen. + _ + Protected Overrides Sub Dispose(ByVal disposing As Boolean) + Try + If disposing AndAlso components IsNot Nothing Then + components.Dispose() + End If + Finally + MyBase.Dispose(disposing) + End Try + End Sub + + 'Wird vom Windows Form-Designer benötigt. + Private components As System.ComponentModel.IContainer + + 'Hinweis: Die folgende Prozedur ist für den Windows Form-Designer erforderlich. + 'Das Bearbeiten ist mit dem Windows Form-Designer möglich. + 'Das Bearbeiten mit dem Code-Editor ist nicht möglich. + _ + Private Sub InitializeComponent() + Me.PanelEditor = New DevExpress.XtraEditors.PanelControl() + Me.btnSave = New System.Windows.Forms.Button() + CType(Me.PanelEditor, System.ComponentModel.ISupportInitialize).BeginInit() + Me.SuspendLayout() + ' + 'PanelEditor + ' + Me.PanelEditor.Dock = System.Windows.Forms.DockStyle.Top + Me.PanelEditor.Location = New System.Drawing.Point(0, 0) + Me.PanelEditor.Name = "PanelEditor" + Me.PanelEditor.Size = New System.Drawing.Size(800, 394) + Me.PanelEditor.TabIndex = 0 + ' + 'btnSave + ' + Me.btnSave.Location = New System.Drawing.Point(713, 415) + Me.btnSave.Name = "btnSave" + Me.btnSave.Size = New System.Drawing.Size(75, 23) + Me.btnSave.TabIndex = 1 + Me.btnSave.Text = "Speichern" + Me.btnSave.UseVisualStyleBackColor = True + ' + 'frmDatasourceEditor + ' + Me.AutoScaleDimensions = New System.Drawing.SizeF(6.0!, 13.0!) + Me.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font + Me.ClientSize = New System.Drawing.Size(800, 450) + Me.Controls.Add(Me.btnSave) + Me.Controls.Add(Me.PanelEditor) + Me.Name = "frmDatasourceEditor" + Me.Text = "frmDatasourceEditor" + CType(Me.PanelEditor, System.ComponentModel.ISupportInitialize).EndInit() + Me.ResumeLayout(False) + + End Sub + + Friend WithEvents PanelEditor As DevExpress.XtraEditors.PanelControl + Friend WithEvents btnSave As Button +End Class diff --git a/EDMI_ClientSuite/FormEntityDesigner/frmFormDesigner.resx b/EDMI_ClientSuite/FormDesigner/Controls/Editors/frmDatasourceEditor.resx similarity index 100% rename from EDMI_ClientSuite/FormEntityDesigner/frmFormDesigner.resx rename to EDMI_ClientSuite/FormDesigner/Controls/Editors/frmDatasourceEditor.resx diff --git a/EDMI_ClientSuite/FormDesigner/Controls/Editors/frmDatasourceEditor.vb b/EDMI_ClientSuite/FormDesigner/Controls/Editors/frmDatasourceEditor.vb new file mode 100644 index 00000000..2fac159a --- /dev/null +++ b/EDMI_ClientSuite/FormDesigner/Controls/Editors/frmDatasourceEditor.vb @@ -0,0 +1,50 @@ +Imports DigitalData.GUIs.ClientSuite.Controls.Editors +Imports ScintillaNET + +Public Class frmDatasourceEditor + Public Value As DatasourceType + + Private _Editor As Scintilla + + Private Sub frmDatasourceEditor_Load(sender As Object, e As EventArgs) Handles MyBase.Load + + + _Editor = New Scintilla() With { + .Dock = DockStyle.Fill, + .BorderStyle = BorderStyle.None, + .Text = Value.SQLCommand + } + + _Editor.StyleResetDefault() + With _Editor.Styles(Style.Default) + .Font = "Consolas" + .Size = 10 + End With + _Editor.StyleClearAll() + _Editor.Lexer = Lexer.Sql + + _Editor.Styles(Style.LineNumber).ForeColor = Color.FromArgb(255, 128, 128, 128) + _Editor.Styles(Style.LineNumber).BackColor = Color.FromArgb(255, 228, 228, 228) + _Editor.Styles(Style.Sql.Comment).ForeColor = Color.Green + _Editor.Styles(Style.Sql.CommentLine).ForeColor = Color.Green + _Editor.Styles(Style.Sql.CommentLineDoc).ForeColor = Color.Green + _Editor.Styles(Style.Sql.Number).ForeColor = Color.Maroon + _Editor.Styles(Style.Sql.Word).ForeColor = Color.Blue + _Editor.Styles(Style.Sql.Word2).ForeColor = Color.Fuchsia + _Editor.Styles(Style.Sql.User1).ForeColor = Color.Gray + _Editor.Styles(Style.Sql.User2).ForeColor = Color.FromArgb(255, 0, 128, 192) + _Editor.Styles(Style.Sql.String).ForeColor = Color.Red + _Editor.Styles(Style.Sql.Character).ForeColor = Color.Red + _Editor.Styles(Style.Sql.[Operator]).ForeColor = Color.Black + _Editor.SetKeywords(0, "add alter as authorization backup begin bigint binary bit break browse bulk by cascade case catch check checkpoint close clustered column commit compute constraint containstable continue create current cursor cursor database date datetime datetime2 datetimeoffset dbcc deallocate decimal declare default delete deny desc disk distinct distributed double drop dump else end errlvl escape except exec execute exit external fetch file fillfactor float for foreign freetext freetexttable from full function goto grant group having hierarchyid holdlock identity identity_insert identitycol if image index insert int intersect into key kill lineno load merge money national nchar nocheck nocount nolock nonclustered ntext numeric nvarchar of off offsets on open opendatasource openquery openrowset openxml option order over percent plan precision primary print proc procedure public raiserror read readtext real reconfigure references replication restore restrict return revert revoke rollback rowcount rowguidcol rule save schema securityaudit select set setuser shutdown smalldatetime smallint smallmoney sql_variant statistics table table tablesample text textsize then time timestamp tinyint to top tran transaction trigger truncate try union unique uniqueidentifier update updatetext use user values varbinary varchar varying view waitfor when where while with writetext xml go ") + _Editor.SetKeywords(1, "ascii cast char charindex ceiling coalesce collate contains convert current_date current_time current_timestamp current_user floor isnull max min nullif object_id session_user substring system_user tsequal ") + _Editor.SetKeywords(4, "all and any between cross exists in inner is join left like not null or outer pivot right some unpivot ( ) * ") + _Editor.SetKeywords(5, "sys objects sysobjects ") + + PanelEditor.Controls.Add(_Editor) + End Sub + + Private Sub btnSave_Click(sender As Object, e As EventArgs) Handles btnSave.Click + Value.SQLCommand = _Editor.Text + End Sub +End Class \ No newline at end of file diff --git a/EDMI_ClientSuite/FormEntityDesigner/ControlProperties/Editors/frmStaticListEditor.Designer.vb b/EDMI_ClientSuite/FormDesigner/Controls/Editors/frmStaticListEditor.Designer.vb similarity index 100% rename from EDMI_ClientSuite/FormEntityDesigner/ControlProperties/Editors/frmStaticListEditor.Designer.vb rename to EDMI_ClientSuite/FormDesigner/Controls/Editors/frmStaticListEditor.Designer.vb diff --git a/EDMI_ClientSuite/FormEntityDesigner/ControlProperties/Editors/frmStaticListEditor.en-US.resx b/EDMI_ClientSuite/FormDesigner/Controls/Editors/frmStaticListEditor.en-US.resx similarity index 100% rename from EDMI_ClientSuite/FormEntityDesigner/ControlProperties/Editors/frmStaticListEditor.en-US.resx rename to EDMI_ClientSuite/FormDesigner/Controls/Editors/frmStaticListEditor.en-US.resx diff --git a/EDMI_ClientSuite/FormEntityDesigner/ControlProperties/Editors/frmStaticListEditor.resx b/EDMI_ClientSuite/FormDesigner/Controls/Editors/frmStaticListEditor.resx similarity index 100% rename from EDMI_ClientSuite/FormEntityDesigner/ControlProperties/Editors/frmStaticListEditor.resx rename to EDMI_ClientSuite/FormDesigner/Controls/Editors/frmStaticListEditor.resx diff --git a/EDMI_ClientSuite/FormEntityDesigner/ControlProperties/Editors/frmStaticListEditor.vb b/EDMI_ClientSuite/FormDesigner/Controls/Editors/frmStaticListEditor.vb similarity index 100% rename from EDMI_ClientSuite/FormEntityDesigner/ControlProperties/Editors/frmStaticListEditor.vb rename to EDMI_ClientSuite/FormDesigner/Controls/Editors/frmStaticListEditor.vb diff --git a/EDMI_ClientSuite/FormDesigner/Controls/Loader.vb b/EDMI_ClientSuite/FormDesigner/Controls/Loader.vb new file mode 100644 index 00000000..6c0e7fed --- /dev/null +++ b/EDMI_ClientSuite/FormDesigner/Controls/Loader.vb @@ -0,0 +1,105 @@ +Imports DevExpress.XtraEditors +Imports DevExpress.XtraLayout +Imports DigitalData.Controls.LookupGrid +Imports DigitalData.GUIs.ClientSuite.Base +Imports DigitalData.Modules.Logging + +Namespace Controls + Public Class ControlLoader + Inherits BaseClass + + Private _LayoutControlGroup As LayoutControlGroup + Private _LayoutControls As List(Of BaseEdit) + + Public ReadOnly Property LayoutControls As List(Of BaseEdit) + Get + If _LayoutControls Is Nothing Then + _LayoutControls = New List(Of BaseEdit) + End If + Return _LayoutControls + End Get + End Property + + Public Sub New(LogConfig As LogConfig, LayoutControlGroup As LayoutControlGroup) + MyBase.New(LogConfig) + _LayoutControlGroup = LayoutControlGroup + End Sub + + Public Sub AddControl(Name As String, Value As String, LayoutControlGroup As LayoutControlGroup) + Dim oTextEdit As New SimpleLabelItem() With { + .Name = Name, + .Text = Name & " - " & Value + } + + LayoutControlGroup.AddItem(oTextEdit) + End Sub + Public Sub AddControl(Name As String, Value As String) + AddControl(Name, Value, _LayoutControlGroup) + End Sub + + Public Sub AddSeparator(LayoutControlGroup As LayoutControlGroup) + Dim oSeparator = New SimpleSeparator() + + LayoutControlGroup.AddItem(oSeparator) + End Sub + Public Sub AddSeparator() + AddSeparator(_LayoutControlGroup) + End Sub + + Public Sub LoadControls(Datatable As DataTable, LayoutControlGroup As LayoutControlGroup) + For Each oRow As DataRow In Datatable.Rows + Dim oCaption As String = oRow.Item("COLNAME") + Dim oControlType As String = oRow.Item("CTRLTYPE") + Dim oControlId As Int64 = oRow.Item("RECORD_ID") + Dim oEditor As BaseEdit = CreateLayoutControl(oControlType, oControlId, oControlId) + + If oEditor Is Nothing Then + Continue For + End If + + oEditor.Tag = New Metadata() With { + .Id = oControlId, + .Type = oControlType + } + + LayoutControls.Add(oEditor) + LayoutControlGroup.AddItem(oCaption, oEditor) + Next + + LayoutControlGroup.AddItem(New EmptySpaceItem()) + End Sub + Public Sub LoadControls(Datatable As DataTable) + LoadControls(Datatable, _LayoutControlGroup) + End Sub + + Public Function CreateLayoutControl(Type As String, Name As String, Id As Int64) + Dim oEditor As BaseEdit = Nothing + + Logger.Debug("Create new Control of type {0} with name {1}", Type, Name) + + Select Case Type + Case ClassConstants.CONTROL_TEXTEDIT + Dim oTextEdit As New TextEdit() With {.Name = Name} + oEditor = oTextEdit + Case ClassConstants.CONTROL_MEMOEDIT + Dim oMemoEdit As New MemoEdit() With {.Name = Name} + oEditor = oMemoEdit + Case ClassConstants.CONTROL_DATEEDIT + Dim oDateEdit As New DateEdit() With {.Name = Name} + oEditor = oDateEdit + Case ClassConstants.CONTROL_CHECKEDIT + Dim oCheckEdit As New CheckEdit() With {.Name = Name} + oEditor = oCheckEdit + Case ClassConstants.CONTROL_COMBOEDIT + Dim oComboEdit As New LookupControl2() With {.Name = Name} + oEditor = oComboEdit + Case Else + oEditor = Nothing + End Select + + Return oEditor + End Function + End Class + +End Namespace + diff --git a/EDMI_ClientSuite/FormDesigner/Controls/Localization.vb b/EDMI_ClientSuite/FormDesigner/Controls/Localization.vb new file mode 100644 index 00000000..8f3b697c --- /dev/null +++ b/EDMI_ClientSuite/FormDesigner/Controls/Localization.vb @@ -0,0 +1,30 @@ +Imports System.ComponentModel + +Namespace Controls + Public Class Localization + Private Shared Function Lookup(key As String) + Try + Return My.Resources.ControlProperties.ResourceManager.GetString(key) + Catch ex As Exception + Return key + End Try + End Function + + Public Class LocalizedDescriptionAttribute + Inherits DescriptionAttribute + + Public Sub New(key As String) + MyBase.New(Lookup(key)) + End Sub + End Class + + Public Class LocalizedCategoryAttribute + Inherits CategoryAttribute + + Public Sub New(key As String) + MyBase.New(Lookup(key)) + End Sub + End Class + End Class +End Namespace + diff --git a/EDMI_ClientSuite/FormDesigner/Controls/Metadata.vb b/EDMI_ClientSuite/FormDesigner/Controls/Metadata.vb new file mode 100644 index 00000000..bf6c5901 --- /dev/null +++ b/EDMI_ClientSuite/FormDesigner/Controls/Metadata.vb @@ -0,0 +1,8 @@ +Namespace Controls + Public Class Metadata + Public Id As Int64 + Public Type As String + End Class +End Namespace + + diff --git a/EDMI_ClientSuite/FormEntityDesigner/ControlProperties/BaseClasses/ClassBaseProperties.vb b/EDMI_ClientSuite/FormDesigner/Controls/Properties/BaseProperties.vb similarity index 71% rename from EDMI_ClientSuite/FormEntityDesigner/ControlProperties/BaseClasses/ClassBaseProperties.vb rename to EDMI_ClientSuite/FormDesigner/Controls/Properties/BaseProperties.vb index 67a05f68..71d730a4 100644 --- a/EDMI_ClientSuite/FormEntityDesigner/ControlProperties/BaseClasses/ClassBaseProperties.vb +++ b/EDMI_ClientSuite/FormDesigner/Controls/Properties/BaseProperties.vb @@ -1,8 +1,8 @@ Imports System.ComponentModel -Imports DigitalData.GUIs.ClientSuite.ClassControlLocalization +Imports DigitalData.GUIs.ClientSuite.Controls.Localization -Namespace ControlProperties - Public MustInherit Class ClassBaseProperties +Namespace Controls.Properties + Public MustInherit Class BaseProperties diff --git a/EDMI_ClientSuite/FormDesigner/Controls/Properties/ComboboxProperties.vb b/EDMI_ClientSuite/FormDesigner/Controls/Properties/ComboboxProperties.vb new file mode 100644 index 00000000..0b9a6e18 --- /dev/null +++ b/EDMI_ClientSuite/FormDesigner/Controls/Properties/ComboboxProperties.vb @@ -0,0 +1,14 @@ +Imports System.ComponentModel +Imports DigitalData.GUIs.ClientSuite.Controls.Editors +Imports DigitalData.GUIs.ClientSuite.Controls.Localization + +Namespace Controls.Properties + Public Class ComboboxProperties + Inherits BaseProperties + + + + Public Property Datasource As DatasourceType + End Class +End Namespace + diff --git a/EDMI_ClientSuite/FormEntityDesigner/frmFormDesigner.Designer.vb b/EDMI_ClientSuite/FormDesigner/frmFormDesigner.Designer.vb similarity index 85% rename from EDMI_ClientSuite/FormEntityDesigner/frmFormDesigner.Designer.vb rename to EDMI_ClientSuite/FormDesigner/frmFormDesigner.Designer.vb index c12e93f3..5112d926 100644 --- a/EDMI_ClientSuite/FormEntityDesigner/frmFormDesigner.Designer.vb +++ b/EDMI_ClientSuite/FormDesigner/frmFormDesigner.Designer.vb @@ -20,8 +20,12 @@ Partial Class frmFormDesigner _ Private Sub InitializeComponent() Me.components = New System.ComponentModel.Container() + Dim resources As System.ComponentModel.ComponentResourceManager = New System.ComponentModel.ComponentResourceManager(GetType(frmFormDesigner)) Me.RibbonControl = New DevExpress.XtraBars.Ribbon.RibbonControl() - Me.RibbonPage1 = New DevExpress.XtraBars.Ribbon.RibbonPage() + Me.BarCheckEditLayout = New DevExpress.XtraBars.BarCheckItem() + Me.RibbonPageCategory1 = New DevExpress.XtraBars.Ribbon.RibbonPageCategory() + Me.RibbonPage2 = New DevExpress.XtraBars.Ribbon.RibbonPage() + Me.RibbonPageGroup2 = New DevExpress.XtraBars.Ribbon.RibbonPageGroup() Me.RibbonStatusBar = New DevExpress.XtraBars.Ribbon.RibbonStatusBar() Me.LayoutControlMain = New DevExpress.XtraLayout.LayoutControl() Me.LayoutControlGroupMain = New DevExpress.XtraLayout.LayoutControlGroup() @@ -53,18 +57,39 @@ Partial Class frmFormDesigner 'RibbonControl ' Me.RibbonControl.ExpandCollapseItem.Id = 0 - Me.RibbonControl.Items.AddRange(New DevExpress.XtraBars.BarItem() {Me.RibbonControl.ExpandCollapseItem}) + Me.RibbonControl.Items.AddRange(New DevExpress.XtraBars.BarItem() {Me.RibbonControl.ExpandCollapseItem, Me.BarCheckEditLayout}) Me.RibbonControl.Location = New System.Drawing.Point(0, 0) - Me.RibbonControl.MaxItemId = 1 + Me.RibbonControl.MaxItemId = 4 Me.RibbonControl.Name = "RibbonControl" - Me.RibbonControl.Pages.AddRange(New DevExpress.XtraBars.Ribbon.RibbonPage() {Me.RibbonPage1}) + Me.RibbonControl.PageCategories.AddRange(New DevExpress.XtraBars.Ribbon.RibbonPageCategory() {Me.RibbonPageCategory1}) Me.RibbonControl.Size = New System.Drawing.Size(870, 146) Me.RibbonControl.StatusBar = Me.RibbonStatusBar ' - 'RibbonPage1 + 'BarCheckEditLayout ' - Me.RibbonPage1.Name = "RibbonPage1" - Me.RibbonPage1.Text = "RibbonPage1" + Me.BarCheckEditLayout.Caption = "Layout bearbeiten" + Me.BarCheckEditLayout.Id = 3 + Me.BarCheckEditLayout.ImageOptions.Image = CType(resources.GetObject("BarCheckEditLayout.ImageOptions.Image"), System.Drawing.Image) + Me.BarCheckEditLayout.ImageOptions.LargeImage = CType(resources.GetObject("BarCheckEditLayout.ImageOptions.LargeImage"), System.Drawing.Image) + Me.BarCheckEditLayout.Name = "BarCheckEditLayout" + ' + 'RibbonPageCategory1 + ' + Me.RibbonPageCategory1.Name = "RibbonPageCategory1" + Me.RibbonPageCategory1.Pages.AddRange(New DevExpress.XtraBars.Ribbon.RibbonPage() {Me.RibbonPage2}) + Me.RibbonPageCategory1.Text = "Form Designer" + ' + 'RibbonPage2 + ' + Me.RibbonPage2.Groups.AddRange(New DevExpress.XtraBars.Ribbon.RibbonPageGroup() {Me.RibbonPageGroup2}) + Me.RibbonPage2.Name = "RibbonPage2" + Me.RibbonPage2.Text = "Allgemein" + ' + 'RibbonPageGroup2 + ' + Me.RibbonPageGroup2.ItemLinks.Add(Me.BarCheckEditLayout) + Me.RibbonPageGroup2.Name = "RibbonPageGroup2" + Me.RibbonPageGroup2.Text = "RibbonPageGroup2" ' 'RibbonStatusBar ' @@ -106,6 +131,7 @@ Partial Class frmFormDesigner Me.ToolboxControlMain.Name = "ToolboxControlMain" Me.ToolboxControlMain.OptionsMinimizing.AllowMinimizing = False Me.ToolboxControlMain.OptionsView.ShowMenuButton = False + Me.ToolboxControlMain.OptionsView.ShowToolboxCaption = True Me.ToolboxControlMain.SelectedGroup = Me.ToolboxGroupMain Me.ToolboxControlMain.SelectedGroupIndex = 0 Me.ToolboxControlMain.Size = New System.Drawing.Size(232, 337) @@ -193,11 +219,11 @@ Partial Class frmFormDesigner Me.XtraTabPageProperties.Size = New System.Drawing.Size(232, 337) Me.XtraTabPageProperties.Text = "Eigenschaften" ' - 'PropertyGridControl1 + 'PropertyGridControlMain ' Me.PropertyGridControlMain.Dock = System.Windows.Forms.DockStyle.Fill Me.PropertyGridControlMain.Location = New System.Drawing.Point(0, 0) - Me.PropertyGridControlMain.Name = "PropertyGridControl1" + Me.PropertyGridControlMain.Name = "PropertyGridControlMain" Me.PropertyGridControlMain.Size = New System.Drawing.Size(232, 337) Me.PropertyGridControlMain.TabIndex = 0 ' @@ -244,7 +270,6 @@ Partial Class frmFormDesigner End Sub Friend WithEvents RibbonControl As DevExpress.XtraBars.Ribbon.RibbonControl - Friend WithEvents RibbonPage1 As DevExpress.XtraBars.Ribbon.RibbonPage Friend WithEvents RibbonStatusBar As DevExpress.XtraBars.Ribbon.RibbonStatusBar Friend WithEvents LayoutControlMain As DevExpress.XtraLayout.LayoutControl Friend WithEvents LayoutControlGroupMain As DevExpress.XtraLayout.LayoutControlGroup @@ -261,4 +286,8 @@ Partial Class frmFormDesigner Friend WithEvents SplitContainerMain As DevExpress.XtraEditors.SplitContainerControl Friend WithEvents ToolboxItemCombobox As DevExpress.XtraToolbox.ToolboxItem Friend WithEvents ToolboxItemCheckbox As DevExpress.XtraToolbox.ToolboxItem + Friend WithEvents BarCheckEditLayout As DevExpress.XtraBars.BarCheckItem + Friend WithEvents RibbonPageCategory1 As DevExpress.XtraBars.Ribbon.RibbonPageCategory + Friend WithEvents RibbonPage2 As DevExpress.XtraBars.Ribbon.RibbonPage + Friend WithEvents RibbonPageGroup2 As DevExpress.XtraBars.Ribbon.RibbonPageGroup End Class diff --git a/EDMI_ClientSuite/FormDesigner/frmFormDesigner.resx b/EDMI_ClientSuite/FormDesigner/frmFormDesigner.resx new file mode 100644 index 00000000..3357c924 --- /dev/null +++ b/EDMI_ClientSuite/FormDesigner/frmFormDesigner.resx @@ -0,0 +1,142 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + text/microsoft-resx + + + 2.0 + + + System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + + + iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8 + YQUAAAAZdEVYdFNvZnR3YXJlAEFkb2JlIEltYWdlUmVhZHlxyWU8AAAAG3RFWHRUaXRsZQBPdXRsaW5l + O0JvcmRlcjtDb2xvcjtFPhLAAAAAiklEQVQ4T5WSyw2AIBBE6Yk6bMpQlL14924BsjrIEkJm+WzyQjLZ + NxjViQhl2w8L/yE4sedCCDJC57xuiDU+FcxMJesTJKYK2M16DguIrKDkfwfWjGRgFuSlVtS8fBVakJda + UfMiA6tAl7sy6BWoZMogFdQ8MdYFXRnQ33gFGq5AwxVouAIN5xH3Aj5Jzm636GRiAAAAAElFTkSuQmCC + + + + + iVBORw0KGgoAAAANSUhEUgAAACAAAAAgCAYAAABzenr0AAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8 + YQUAAAAZdEVYdFNvZnR3YXJlAEFkb2JlIEltYWdlUmVhZHlxyWU8AAAAG3RFWHRUaXRsZQBPdXRsaW5l + O0JvcmRlcjtDb2xvcjtFPhLAAAABDUlEQVRYR72S0Q2DMAxE2Yk5ulTFUB2iG/S//50gvYswSuEIaWI5 + 0hNg4XtH1Sml5M7t/lDMIK3wPr97WPaA4TtK+VaC78qAURB+JTdmGeAFBQWqgF70AOGl9LTEtCxL8sLO + 6/05iIAqMecCnudEbpQleJ1cC1zIDSuR/6RuBRrlZJMTlwK9cjJcoFeO1cxQgZEvx/pYgRE5QUR/gVE5 + QUxfAQ85QVS1wHO9/hwvOUHcf7+Ap5wgsr2At5wgtr0AFiy8lO1plhPE/l3AJOVzOZeiMxDbVcBk+2cp + qYHY7gImtasUEKxekgvU4EGY4vLLTVJDDiORw0jkMBI5jEQOI5HDSOQwEjmMRA7jSNMXcaR3S692HfcA + AAAASUVORK5CYII= + + + \ No newline at end of file diff --git a/EDMI_ClientSuite/FormEntityDesigner/frmFormDesigner.vb b/EDMI_ClientSuite/FormDesigner/frmFormDesigner.vb similarity index 85% rename from EDMI_ClientSuite/FormEntityDesigner/frmFormDesigner.vb rename to EDMI_ClientSuite/FormDesigner/frmFormDesigner.vb index 90a0e7ed..919716a3 100644 --- a/EDMI_ClientSuite/FormEntityDesigner/frmFormDesigner.vb +++ b/EDMI_ClientSuite/FormDesigner/frmFormDesigner.vb @@ -5,11 +5,13 @@ Imports DevExpress.XtraLayout.Customization Imports DevExpress.XtraLayout.Dragging Imports DevExpress.XtraLayout.HitInfo Imports DigitalData.Controls.LookupGrid -Imports DigitalData.GUIs.ClientSuite.ControlProperties +Imports DigitalData.GUIs.ClientSuite.Controls +Imports DigitalData.GUIs.ClientSuite.Controls.Properties +Imports DigitalData.GUIs.ClientSuite.Controls.Editors Public Class frmFormDesigner Private _FormId As Int64 - Private _ControlLoader As ClassControlLoader + Private _ControlLoader As ControlLoader #Region "Drag Helper" Private _DragItem As BaseLayoutItem @@ -88,8 +90,6 @@ Public Class frmFormDesigner End Sub #End Region - - Public Sub New() ' Dieser Aufruf ist für den Designer erforderlich. InitializeComponent() @@ -105,7 +105,7 @@ Public Class frmFormDesigner End Sub Private Async Sub frmFormDesigner_Load(sender As Object, e As EventArgs) Handles MyBase.Load - _ControlLoader = New ClassControlLoader(My.LogConfig, LayoutControlGroupMain) + _ControlLoader = New ControlLoader(My.LogConfig, LayoutControlGroupMain) Dim oTable = Await My.Common.Views.VWICM_FORM_CONTROL(_FormId) @@ -120,7 +120,7 @@ Public Class frmFormDesigner ' TODO: Load Property Grid for selected item Dim oLayoutItem As LayoutControlItem = DirectCast(sender, LayoutControlItem) Dim oSelectedControl As BaseEdit = oLayoutItem.Control - Dim oMetadata As ClassControlMetadata = oSelectedControl.Tag + Dim oMetadata As Metadata = oSelectedControl.Tag Select Case oSelectedControl.GetType Case GetType(MemoEdit) @@ -128,12 +128,20 @@ Public Class frmFormDesigner Case GetType(TextEdit) Case GetType(LookupControl2) - PropertyGridControlMain.SelectedObject = New ClassComboboxProperties() With { - .Datasource = "TEST", + PropertyGridControlMain.SelectedObject = New ComboboxProperties() With { + .Datasource = New DatasourceType, .Id = oMetadata.Id } End Select End Sub + + Private Sub BarCheckEditLayout_CheckedChanged(sender As Object, e As DevExpress.XtraBars.ItemClickEventArgs) Handles BarCheckEditLayout.CheckedChanged + If BarCheckEditLayout.Checked Then + LayoutControlMain.ShowCustomizationForm() + Else + LayoutControlMain.HideCustomizationForm() + End If + End Sub End Class \ No newline at end of file diff --git a/EDMI_ClientSuite/FormEntityDesigner/ClassControlLocalization.vb b/EDMI_ClientSuite/FormEntityDesigner/ClassControlLocalization.vb deleted file mode 100644 index 95ab1efc..00000000 --- a/EDMI_ClientSuite/FormEntityDesigner/ClassControlLocalization.vb +++ /dev/null @@ -1,27 +0,0 @@ -Imports System.ComponentModel - -Public Class ClassControlLocalization - Private Shared Function Lookup(key As String) - Try - Return My.Resources.ControlProperties.ResourceManager.GetString(key) - Catch ex As Exception - Return key - End Try - End Function - - Public Class LocalizedDescriptionAttribute - Inherits DescriptionAttribute - - Public Sub New(key As String) - MyBase.New(Lookup(key)) - End Sub - End Class - - Public Class LocalizedCategoryAttribute - Inherits CategoryAttribute - - Public Sub New(key As String) - MyBase.New(Lookup(key)) - End Sub - End Class -End Class diff --git a/EDMI_ClientSuite/FormEntityDesigner/ClassControlMetadata.vb b/EDMI_ClientSuite/FormEntityDesigner/ClassControlMetadata.vb deleted file mode 100644 index cc1c259d..00000000 --- a/EDMI_ClientSuite/FormEntityDesigner/ClassControlMetadata.vb +++ /dev/null @@ -1,4 +0,0 @@ -Public Class ClassControlMetadata - Public Id As Int64 - Public Type As String -End Class diff --git a/EDMI_ClientSuite/FormEntityDesigner/ControlProperties/Controls/ClassComboboxProperties.vb b/EDMI_ClientSuite/FormEntityDesigner/ControlProperties/Controls/ClassComboboxProperties.vb deleted file mode 100644 index b37560c5..00000000 --- a/EDMI_ClientSuite/FormEntityDesigner/ControlProperties/Controls/ClassComboboxProperties.vb +++ /dev/null @@ -1,15 +0,0 @@ -Imports System.ComponentModel -Imports DigitalData.GUIs.ClientSuite.ClassControlLocalization - -Namespace ControlProperties - Public Class ClassComboboxProperties - Inherits ClassBaseProperties - - - - - Public Property Datasource As String - End Class - -End Namespace - diff --git a/EDMI_ClientSuite/FormWorkflow/frmWorkflowStep.vb b/EDMI_ClientSuite/FormWorkflow/frmWorkflowStep.vb index cc153587..6cdf14f1 100644 --- a/EDMI_ClientSuite/FormWorkflow/frmWorkflowStep.vb +++ b/EDMI_ClientSuite/FormWorkflow/frmWorkflowStep.vb @@ -1,9 +1,10 @@ Imports DevExpress.XtraLayout Imports DigitalData.GUIs.ClientSuite +Imports DigitalData.GUIs.ClientSuite.Controls Public Class frmWorkflowStep - Private _ControlLoader As ClassControlLoader - Private _ControlData As ClassControlData + Private _ControlLoader As ControlLoader + Private _ControlData As ControlData Private _FormId As Int64 Private _RequestId As Int64 @@ -54,12 +55,16 @@ Public Class frmWorkflowStep _HeaderGroup = LayoutControlGroupMain.AddGroup("Request Header") _BodyGroup = LayoutControlGroupMain.AddGroup("Control Body") - _ControlLoader = New ClassControlLoader(My.LogConfig, _BodyGroup) - _ControlData = New ClassControlData(My.LogConfig) + _ControlLoader = New ControlLoader(My.LogConfig, _BodyGroup) + _ControlData = New ControlData(My.LogConfig) + + LayoutControl1.BeginUpdate() _ControlLoader.LoadControls(oControlTable) _ControlData.LoadControlData(_ControlLoader.LayoutControls, oControlData) + LayoutControl1.EndUpdate() + _ControlLoader.AddControl("Process Name", _ProcessName, _HeaderGroup) _ControlLoader.AddControl("Request Name", _RequestName, _HeaderGroup) End Sub diff --git a/EDMI_ClientSuite/Strings/ControlProperties.Designer.vb b/EDMI_ClientSuite/Strings/ControlProperties.Designer.vb index 61587f26..941129d9 100644 --- a/EDMI_ClientSuite/Strings/ControlProperties.Designer.vb +++ b/EDMI_ClientSuite/Strings/ControlProperties.Designer.vb @@ -199,6 +199,15 @@ Namespace My.Resources End Get End Property + ''' + ''' Sucht eine lokalisierte Zeichenfolge, die Legt die Datenquelle des Elements fest. ähnelt. + ''' + Public Shared ReadOnly Property desc_datasource() As String + Get + Return ResourceManager.GetString("desc_datasource", resourceCulture) + End Get + End Property + ''' ''' Sucht eine lokalisierte Zeichenfolge, die Gibt den Standardwert dieses Elements an. ähnelt. ''' diff --git a/EDMI_ClientSuite/Strings/ControlProperties.en.resx b/EDMI_ClientSuite/Strings/ControlProperties.en.resx index e526f696..9425bb30 100644 --- a/EDMI_ClientSuite/Strings/ControlProperties.en.resx +++ b/EDMI_ClientSuite/Strings/ControlProperties.en.resx @@ -249,4 +249,7 @@ Input Configuration + + Sets the element's datasource + \ No newline at end of file diff --git a/EDMI_ClientSuite/Strings/ControlProperties.resx b/EDMI_ClientSuite/Strings/ControlProperties.resx index af8c8fbb..fd7976f0 100644 --- a/EDMI_ClientSuite/Strings/ControlProperties.resx +++ b/EDMI_ClientSuite/Strings/ControlProperties.resx @@ -249,4 +249,7 @@ Eingabe Eigenschaften + + Legt die Datenquelle des Elements fest. + \ No newline at end of file diff --git a/EDMI_ClientSuite/packages.config b/EDMI_ClientSuite/packages.config index 9ba88bff..cd1527a3 100644 --- a/EDMI_ClientSuite/packages.config +++ b/EDMI_ClientSuite/packages.config @@ -2,5 +2,6 @@ + \ No newline at end of file From 05f5e730e1826460f2d3393da46d1040f7020757 Mon Sep 17 00:00:00 2001 From: Jonathan Jenne Date: Thu, 28 Mar 2019 16:24:17 +0100 Subject: [PATCH 10/25] Work on Editor --- EDMI_ClientSuite/Base/BaseForm.resx | 120 +++++++++++++++ EDMI_ClientSuite/Base/BaseForm.vb | 97 +++++++----- EDMI_ClientSuite/Base/BaseRibbonForm.vb | 140 +++++++++++------- EDMI_ClientSuite/ClassPanelManager.vb | 1 + EDMI_ClientSuite/ClientSuite.vbproj | 7 + .../FormDesigner/Controls/Loader.vb | 7 +- .../FormDesigner/Controls/Metadata.vb | 1 + .../Controls/Properties/BaseProperties.vb | 2 +- .../Controls/Properties/CheckboxProperties.vb | 7 + .../Properties/DatepickerProperties.vb | 6 + .../Controls/Properties/MemoeditProperties.vb | 7 + .../Controls/Properties/TextboxProperties.vb | 7 + .../FormDesigner/frmFormDesigner.Designer.vb | 125 ++++++++++------ .../FormDesigner/frmFormDesigner.resx | 46 ++++-- .../FormDesigner/frmFormDesigner.vb | 65 +++++++- .../frmUserManager.Designer.vb | 7 +- .../FormUserManager/frmUserManager.vb | 13 -- .../FormWorkflow/frmWorkflowStep.Designer.vb | 4 +- EDMI_ClientSuite/My Project/licenses.licx | 19 +-- EDMI_ClientSuite/_TEST/frmDocTest.Designer.vb | 4 +- .../_TEST/frmFileTest.Designer.vb | 4 +- EDMI_ClientSuite/frmHome.Designer.vb | 4 +- EDMI_ClientSuite/frmMain.Designer.vb | 4 +- EDMI_ClientSuite/frmObjectEditor.Designer.vb | 4 +- EDMI_ClientSuite/frmSearch.Designer.vb | 4 +- 25 files changed, 505 insertions(+), 200 deletions(-) create mode 100644 EDMI_ClientSuite/Base/BaseForm.resx create mode 100644 EDMI_ClientSuite/FormDesigner/Controls/Properties/CheckboxProperties.vb create mode 100644 EDMI_ClientSuite/FormDesigner/Controls/Properties/DatepickerProperties.vb create mode 100644 EDMI_ClientSuite/FormDesigner/Controls/Properties/MemoeditProperties.vb create mode 100644 EDMI_ClientSuite/FormDesigner/Controls/Properties/TextboxProperties.vb diff --git a/EDMI_ClientSuite/Base/BaseForm.resx b/EDMI_ClientSuite/Base/BaseForm.resx new file mode 100644 index 00000000..1af7de15 --- /dev/null +++ b/EDMI_ClientSuite/Base/BaseForm.resx @@ -0,0 +1,120 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + text/microsoft-resx + + + 2.0 + + + System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + \ No newline at end of file diff --git a/EDMI_ClientSuite/Base/BaseForm.vb b/EDMI_ClientSuite/Base/BaseForm.vb index d647492e..8bde5fd9 100644 --- a/EDMI_ClientSuite/Base/BaseForm.vb +++ b/EDMI_ClientSuite/Base/BaseForm.vb @@ -1,43 +1,60 @@ Imports DevExpress.XtraBars.Ribbon Imports DigitalData.Modules.Logging -''' -''' This BaseClass is used to provide common functionality like the Logger or ErrorHandler to all Forms -''' To use it, create a form and change the `Inherits` statement in FormName.Designer.vb to this form, eg.: -''' -''' Partial Class frmExample -''' Inherits BaseForm -''' -''' ... -''' End Class -''' -Public Class BaseForm - Inherits Form - - Private ReadOnly _Logger As Logger - Private ReadOnly _ErrorHandler As ClassErrorHandler - - Protected ReadOnly Property Logger As Logger - Get - Return _Logger - End Get - End Property - - Public Sub New() - ' Get the full name of the inheriting form - ' so the log messages have the right classname - Dim oClassName = [GetType]().FullName - - ' My.LogConfig is undefined in the designer - _Logger = My.LogConfig?.GetLogger(oClassName) - _ErrorHandler = New ClassErrorHandler(_Logger) - - ' When you add something, be careful if it - ' depends on a global var like My.LogConfig - ' you might need to check for its existence with ? - End Sub - - Public Sub ShowErrorMessage(Exception As Exception) - _ErrorHandler.ShowErrorMessage(Exception) - End Sub -End Class \ No newline at end of file +Namespace Base + ''' + ''' This BaseClass is used to provide common functionality like the Logger or ErrorHandler to all Forms + ''' To use it, create a form and change the `Inherits` statement in FormName.Designer.vb to this form, eg.: + ''' + ''' Partial Class frmExample + ''' Inherits BaseForm + ''' + ''' ... + ''' End Class + ''' + Public Class BaseForm + Inherits Form + + Private ReadOnly _Logger As Logger + Private ReadOnly _ErrorHandler As ClassErrorHandler + + Protected ReadOnly Property Logger As Logger + Get + Return _Logger + End Get + End Property + + Public Sub New() + ' Get the full name of the inheriting form + ' so the log messages have the right classname + Dim oClassName = [GetType]().FullName + + ' My.LogConfig is undefined in the designer + _Logger = My.LogConfig?.GetLogger(oClassName) + _ErrorHandler = New ClassErrorHandler(_Logger) + + ' When you add something, be careful if it + ' depends on a global var like My.LogConfig + ' you might need to check for its existence with ? + End Sub + + Public Sub ShowErrorMessage(Exception As Exception) + _ErrorHandler.ShowErrorMessage(Exception) + End Sub + + Private Sub InitializeComponent() + Me.SuspendLayout() + ' + 'BaseForm + ' + Me.ClientSize = New System.Drawing.Size(284, 261) + Me.Name = "BaseForm" + Me.ResumeLayout(False) + + End Sub + + Private Sub BaseForm_Load(sender As Object, e As EventArgs) Handles MyBase.Load + + End Sub + End Class +End Namespace diff --git a/EDMI_ClientSuite/Base/BaseRibbonForm.vb b/EDMI_ClientSuite/Base/BaseRibbonForm.vb index 8190b869..20a32fa4 100644 --- a/EDMI_ClientSuite/Base/BaseRibbonForm.vb +++ b/EDMI_ClientSuite/Base/BaseRibbonForm.vb @@ -2,63 +2,93 @@ Imports DevExpress.XtraBars.Ribbon Imports DigitalData.Modules.Logging -''' -''' This BaseClass is used to provide common functionality like the Logger or ErrorHandler to all Forms -''' To use it, create a form and change the `Inherits` statement in FormName.Designer.vb to this form, eg.: -''' -''' Partial Class frmExample -''' Inherits BaseRibbonForm -''' -''' ... -''' End Class -''' -''' Only BaseRibbonForms can have panels attached to it! -''' -Public Class BaseRibbonForm - Inherits RibbonForm - - Private ReadOnly _Logger As Logger - Private ReadOnly _ErrorHandler As ClassErrorHandler - - Protected ReadOnly Property Logger As Logger - Get - Return _Logger - End Get - End Property - - Public Sub New() - ' Get the full name of the inheriting form - ' so the log messages have the right classname - Dim oClassName = [GetType]().FullName - - ' My.LogConfig is undefined in the designer - _Logger = My.LogConfig?.GetLogger(oClassName) - _ErrorHandler = New ClassErrorHandler(_Logger) - - ' When you add something, be careful if it - ' depends on a global var like My.LogConfig - ' you might need to check for its existence with ? - End Sub - - Public Sub ShowErrorMessage(Exception As Exception) - _ErrorHandler.ShowErrorMessage(Exception) - End Sub - - Public Sub ShowErrorMessage(ErrorMessage As String) - _ErrorHandler.ShowErrorMessage(New Exception(ErrorMessage)) - End Sub - +Namespace Base ''' - ''' Returns a list of panels that will be show when the form is opened. - ''' This can be overridden by all inheriting forms to extend the list of panels - ''' Panels will be created by PanelManager. + ''' This BaseClass is used to provide common functionality like the Logger or ErrorHandler to all Forms + ''' To use it, create a form and change the `Inherits` statement in FormName.Designer.vb to this form, eg.: + ''' + ''' Partial Class frmExample + ''' Inherits BaseRibbonForm + ''' + ''' ... + ''' End Class + ''' + ''' Only BaseRibbonForms can have panels attached to it! ''' - ''' - ''' A list of PanelInformation - Public Overridable Function GetInitialPanels() As List(Of PanelInfo) - Return New List(Of PanelInfo) - End Function -End Class + Public Class BaseRibbonForm + Inherits RibbonForm + + Private ReadOnly _Logger As Logger + Private ReadOnly _ErrorHandler As ClassErrorHandler + + Protected ReadOnly Property Logger As Logger + Get + Return _Logger + End Get + End Property + + ''' + ''' Sets or gets the ribbon Page that will be shown when the window is visible + ''' + ''' + Public Property DefaultRibbonPage As RibbonPage + + Protected Overrides Sub OnLoad(e As EventArgs) + MyBase.OnLoad(e) + + If DefaultRibbonPage IsNot Nothing Then + Ribbon.SelectPage(DefaultRibbonPage) + End If + End Sub + + Protected Overrides Sub OnVisibleChanged(e As EventArgs) + MyBase.OnVisibleChanged(e) + + If Visible And DefaultRibbonPage IsNot Nothing Then + Ribbon.SelectPage(DefaultRibbonPage) + End If + End Sub + + Protected Overrides Sub OnActivated(e As EventArgs) + MyBase.OnVisibleChanged(e) + + If Visible And DefaultRibbonPage IsNot Nothing Then + Ribbon.SelectPage(DefaultRibbonPage) + End If + End Sub + + + Public Sub New() + ' Get the full name of the inheriting form + ' so the log messages have the right classname + Dim oClassName = [GetType]().FullName + + ' My.LogConfig is undefined in the designer + _Logger = My.LogConfig?.GetLogger(oClassName) + _ErrorHandler = New ClassErrorHandler(_Logger) + + ' When you add something, be careful if it + ' depends on a global var like My.LogConfig + ' you might need to check for its existence with ? + End Sub + Public Sub ShowErrorMessage(Exception As Exception) + _ErrorHandler.ShowErrorMessage(Exception) + End Sub + Public Sub ShowErrorMessage(ErrorMessage As String) + _ErrorHandler.ShowErrorMessage(New Exception(ErrorMessage)) + End Sub + ''' + ''' Returns a list of panels that will be show when the form is opened. + ''' This can be overridden by all inheriting forms to extend the list of panels + ''' Panels will be created by PanelManager. + ''' + ''' + ''' A list of PanelInformation + Public Overridable Function GetInitialPanels() As List(Of PanelInfo) + Return New List(Of PanelInfo) + End Function + End Class +End Namespace diff --git a/EDMI_ClientSuite/ClassPanelManager.vb b/EDMI_ClientSuite/ClassPanelManager.vb index 5f5f45fa..30a753a8 100644 --- a/EDMI_ClientSuite/ClassPanelManager.vb +++ b/EDMI_ClientSuite/ClassPanelManager.vb @@ -3,6 +3,7 @@ Imports DevExpress.XtraBars.Docking2010 Imports DevExpress.XtraBars.Docking2010.Views Imports DevExpress.XtraBars.Docking2010.Views.Tabbed Imports DevExpress.XtraGrid +Imports DigitalData.GUIs.ClientSuite.Base Imports DigitalData.Modules.Logging Public Class ClassPanelManager diff --git a/EDMI_ClientSuite/ClientSuite.vbproj b/EDMI_ClientSuite/ClientSuite.vbproj index 07362b61..0009c873 100644 --- a/EDMI_ClientSuite/ClientSuite.vbproj +++ b/EDMI_ClientSuite/ClientSuite.vbproj @@ -159,6 +159,10 @@ Form + + + + frmFormDesigner.vb @@ -314,6 +318,9 @@ + + BaseForm.vb + frmDatasourceEditor.vb diff --git a/EDMI_ClientSuite/FormDesigner/Controls/Loader.vb b/EDMI_ClientSuite/FormDesigner/Controls/Loader.vb index 6c0e7fed..85e2309b 100644 --- a/EDMI_ClientSuite/FormDesigner/Controls/Loader.vb +++ b/EDMI_ClientSuite/FormDesigner/Controls/Loader.vb @@ -58,9 +58,10 @@ Namespace Controls End If oEditor.Tag = New Metadata() With { - .Id = oControlId, - .Type = oControlType - } + .Id = oControlId, + .Type = oControlType, + .Caption = oCaption + } LayoutControls.Add(oEditor) LayoutControlGroup.AddItem(oCaption, oEditor) diff --git a/EDMI_ClientSuite/FormDesigner/Controls/Metadata.vb b/EDMI_ClientSuite/FormDesigner/Controls/Metadata.vb index bf6c5901..ee1ced53 100644 --- a/EDMI_ClientSuite/FormDesigner/Controls/Metadata.vb +++ b/EDMI_ClientSuite/FormDesigner/Controls/Metadata.vb @@ -2,6 +2,7 @@ Public Class Metadata Public Id As Int64 Public Type As String + Public Caption As String End Class End Namespace diff --git a/EDMI_ClientSuite/FormDesigner/Controls/Properties/BaseProperties.vb b/EDMI_ClientSuite/FormDesigner/Controls/Properties/BaseProperties.vb index 71d730a4..d8086c57 100644 --- a/EDMI_ClientSuite/FormDesigner/Controls/Properties/BaseProperties.vb +++ b/EDMI_ClientSuite/FormDesigner/Controls/Properties/BaseProperties.vb @@ -9,7 +9,7 @@ Namespace Controls.Properties <[ReadOnly](True)> Public Property Id As Integer - + Public Property Name As String End Class diff --git a/EDMI_ClientSuite/FormDesigner/Controls/Properties/CheckboxProperties.vb b/EDMI_ClientSuite/FormDesigner/Controls/Properties/CheckboxProperties.vb new file mode 100644 index 00000000..c2512d04 --- /dev/null +++ b/EDMI_ClientSuite/FormDesigner/Controls/Properties/CheckboxProperties.vb @@ -0,0 +1,7 @@ +Namespace Controls.Properties + Public Class CheckboxProperties + Inherits BaseProperties + End Class +End Namespace + + diff --git a/EDMI_ClientSuite/FormDesigner/Controls/Properties/DatepickerProperties.vb b/EDMI_ClientSuite/FormDesigner/Controls/Properties/DatepickerProperties.vb new file mode 100644 index 00000000..4b3213ad --- /dev/null +++ b/EDMI_ClientSuite/FormDesigner/Controls/Properties/DatepickerProperties.vb @@ -0,0 +1,6 @@ +Namespace Controls.Properties + Public Class DatepickerProperties + Inherits BaseProperties + End Class + +End Namespace \ No newline at end of file diff --git a/EDMI_ClientSuite/FormDesigner/Controls/Properties/MemoeditProperties.vb b/EDMI_ClientSuite/FormDesigner/Controls/Properties/MemoeditProperties.vb new file mode 100644 index 00000000..14c155d6 --- /dev/null +++ b/EDMI_ClientSuite/FormDesigner/Controls/Properties/MemoeditProperties.vb @@ -0,0 +1,7 @@ +Namespace Controls.Properties + Public Class MemoeditProperties + Inherits BaseProperties + End Class +End Namespace + + diff --git a/EDMI_ClientSuite/FormDesigner/Controls/Properties/TextboxProperties.vb b/EDMI_ClientSuite/FormDesigner/Controls/Properties/TextboxProperties.vb new file mode 100644 index 00000000..0dd09224 --- /dev/null +++ b/EDMI_ClientSuite/FormDesigner/Controls/Properties/TextboxProperties.vb @@ -0,0 +1,7 @@ +Namespace Controls.Properties + Public Class TextboxProperties + Inherits BaseProperties + End Class +End Namespace + + diff --git a/EDMI_ClientSuite/FormDesigner/frmFormDesigner.Designer.vb b/EDMI_ClientSuite/FormDesigner/frmFormDesigner.Designer.vb index 5112d926..7eb54990 100644 --- a/EDMI_ClientSuite/FormDesigner/frmFormDesigner.Designer.vb +++ b/EDMI_ClientSuite/FormDesigner/frmFormDesigner.Designer.vb @@ -1,4 +1,6 @@ - _ +Imports DigitalData.GUIs.ClientSuite.Base + + Partial Class frmFormDesigner Inherits BaseRibbonForm @@ -21,10 +23,11 @@ Partial Class frmFormDesigner Private Sub InitializeComponent() Me.components = New System.ComponentModel.Container() Dim resources As System.ComponentModel.ComponentResourceManager = New System.ComponentModel.ComponentResourceManager(GetType(frmFormDesigner)) - Me.RibbonControl = New DevExpress.XtraBars.Ribbon.RibbonControl() + Me.FormDesignerRibbon = New DevExpress.XtraBars.Ribbon.RibbonControl() Me.BarCheckEditLayout = New DevExpress.XtraBars.BarCheckItem() + Me.BarCheckEditControls = New DevExpress.XtraBars.BarCheckItem() Me.RibbonPageCategory1 = New DevExpress.XtraBars.Ribbon.RibbonPageCategory() - Me.RibbonPage2 = New DevExpress.XtraBars.Ribbon.RibbonPage() + Me.RibbonPageFormDesigner = New DevExpress.XtraBars.Ribbon.RibbonPage() Me.RibbonPageGroup2 = New DevExpress.XtraBars.Ribbon.RibbonPageGroup() Me.RibbonStatusBar = New DevExpress.XtraBars.Ribbon.RibbonStatusBar() Me.LayoutControlMain = New DevExpress.XtraLayout.LayoutControl() @@ -37,16 +40,16 @@ Partial Class frmFormDesigner Me.ToolboxItemCombobox = New DevExpress.XtraToolbox.ToolboxItem() Me.ToolboxItemCheckbox = New DevExpress.XtraToolbox.ToolboxItem() Me.RibbonPageGroup1 = New DevExpress.XtraBars.Ribbon.RibbonPageGroup() - Me.XtraTabControl1 = New DevExpress.XtraTab.XtraTabControl() + Me.XtraTabControlMain = New DevExpress.XtraTab.XtraTabControl() Me.XtraTabPageControls = New DevExpress.XtraTab.XtraTabPage() Me.XtraTabPageProperties = New DevExpress.XtraTab.XtraTabPage() Me.PropertyGridControlMain = New DevExpress.XtraVerticalGrid.PropertyGridControl() Me.SplitContainerMain = New DevExpress.XtraEditors.SplitContainerControl() - CType(Me.RibbonControl, System.ComponentModel.ISupportInitialize).BeginInit() + CType(Me.FormDesignerRibbon, System.ComponentModel.ISupportInitialize).BeginInit() CType(Me.LayoutControlMain, System.ComponentModel.ISupportInitialize).BeginInit() CType(Me.LayoutControlGroupMain, System.ComponentModel.ISupportInitialize).BeginInit() - CType(Me.XtraTabControl1, System.ComponentModel.ISupportInitialize).BeginInit() - Me.XtraTabControl1.SuspendLayout() + CType(Me.XtraTabControlMain, System.ComponentModel.ISupportInitialize).BeginInit() + Me.XtraTabControlMain.SuspendLayout() Me.XtraTabPageControls.SuspendLayout() Me.XtraTabPageProperties.SuspendLayout() CType(Me.PropertyGridControlMain, System.ComponentModel.ISupportInitialize).BeginInit() @@ -54,39 +57,56 @@ Partial Class frmFormDesigner Me.SplitContainerMain.SuspendLayout() Me.SuspendLayout() ' - 'RibbonControl + 'FormDesignerRibbon ' - Me.RibbonControl.ExpandCollapseItem.Id = 0 - Me.RibbonControl.Items.AddRange(New DevExpress.XtraBars.BarItem() {Me.RibbonControl.ExpandCollapseItem, Me.BarCheckEditLayout}) - Me.RibbonControl.Location = New System.Drawing.Point(0, 0) - Me.RibbonControl.MaxItemId = 4 - Me.RibbonControl.Name = "RibbonControl" - Me.RibbonControl.PageCategories.AddRange(New DevExpress.XtraBars.Ribbon.RibbonPageCategory() {Me.RibbonPageCategory1}) - Me.RibbonControl.Size = New System.Drawing.Size(870, 146) - Me.RibbonControl.StatusBar = Me.RibbonStatusBar + Me.FormDesignerRibbon.ExpandCollapseItem.Id = 0 + Me.FormDesignerRibbon.Items.AddRange(New DevExpress.XtraBars.BarItem() {Me.FormDesignerRibbon.ExpandCollapseItem, Me.BarCheckEditLayout, Me.BarCheckEditControls}) + Me.FormDesignerRibbon.Location = New System.Drawing.Point(0, 0) + Me.FormDesignerRibbon.MaxItemId = 6 + Me.FormDesignerRibbon.MdiMergeStyle = DevExpress.XtraBars.Ribbon.RibbonMdiMergeStyle.Always + Me.FormDesignerRibbon.Name = "FormDesignerRibbon" + Me.FormDesignerRibbon.PageCategories.AddRange(New DevExpress.XtraBars.Ribbon.RibbonPageCategory() {Me.RibbonPageCategory1}) + Me.FormDesignerRibbon.ShowApplicationButton = DevExpress.Utils.DefaultBoolean.[False] + Me.FormDesignerRibbon.Size = New System.Drawing.Size(870, 146) + Me.FormDesignerRibbon.StatusBar = Me.RibbonStatusBar ' 'BarCheckEditLayout ' Me.BarCheckEditLayout.Caption = "Layout bearbeiten" + Me.BarCheckEditLayout.CheckStyle = DevExpress.XtraBars.BarCheckStyles.Radio + Me.BarCheckEditLayout.GroupIndex = 1 Me.BarCheckEditLayout.Id = 3 Me.BarCheckEditLayout.ImageOptions.Image = CType(resources.GetObject("BarCheckEditLayout.ImageOptions.Image"), System.Drawing.Image) Me.BarCheckEditLayout.ImageOptions.LargeImage = CType(resources.GetObject("BarCheckEditLayout.ImageOptions.LargeImage"), System.Drawing.Image) Me.BarCheckEditLayout.Name = "BarCheckEditLayout" ' + 'BarCheckEditControls + ' + Me.BarCheckEditControls.BindableChecked = True + Me.BarCheckEditControls.Caption = "Elemente bearbeiten" + Me.BarCheckEditControls.Checked = True + Me.BarCheckEditControls.CheckStyle = DevExpress.XtraBars.BarCheckStyles.Radio + Me.BarCheckEditControls.GroupIndex = 1 + Me.BarCheckEditControls.Id = 5 + Me.BarCheckEditControls.ImageOptions.Image = CType(resources.GetObject("BarCheckEditControls.ImageOptions.Image"), System.Drawing.Image) + Me.BarCheckEditControls.ImageOptions.LargeImage = CType(resources.GetObject("BarCheckEditControls.ImageOptions.LargeImage"), System.Drawing.Image) + Me.BarCheckEditControls.Name = "BarCheckEditControls" + ' 'RibbonPageCategory1 ' Me.RibbonPageCategory1.Name = "RibbonPageCategory1" - Me.RibbonPageCategory1.Pages.AddRange(New DevExpress.XtraBars.Ribbon.RibbonPage() {Me.RibbonPage2}) + Me.RibbonPageCategory1.Pages.AddRange(New DevExpress.XtraBars.Ribbon.RibbonPage() {Me.RibbonPageFormDesigner}) Me.RibbonPageCategory1.Text = "Form Designer" ' - 'RibbonPage2 + 'RibbonPageFormDesigner ' - Me.RibbonPage2.Groups.AddRange(New DevExpress.XtraBars.Ribbon.RibbonPageGroup() {Me.RibbonPageGroup2}) - Me.RibbonPage2.Name = "RibbonPage2" - Me.RibbonPage2.Text = "Allgemein" + Me.RibbonPageFormDesigner.Groups.AddRange(New DevExpress.XtraBars.Ribbon.RibbonPageGroup() {Me.RibbonPageGroup2}) + Me.RibbonPageFormDesigner.Name = "RibbonPageFormDesigner" + Me.RibbonPageFormDesigner.Text = "Allgemein" ' 'RibbonPageGroup2 ' + Me.RibbonPageGroup2.ItemLinks.Add(Me.BarCheckEditControls) Me.RibbonPageGroup2.ItemLinks.Add(Me.BarCheckEditLayout) Me.RibbonPageGroup2.Name = "RibbonPageGroup2" Me.RibbonPageGroup2.Text = "RibbonPageGroup2" @@ -95,11 +115,12 @@ Partial Class frmFormDesigner ' Me.RibbonStatusBar.Location = New System.Drawing.Point(0, 508) Me.RibbonStatusBar.Name = "RibbonStatusBar" - Me.RibbonStatusBar.Ribbon = Me.RibbonControl + Me.RibbonStatusBar.Ribbon = Me.FormDesignerRibbon Me.RibbonStatusBar.Size = New System.Drawing.Size(870, 21) ' 'LayoutControlMain ' + Me.LayoutControlMain.AllowCustomization = False Me.LayoutControlMain.AllowDrop = True Me.LayoutControlMain.BackColor = System.Drawing.Color.Transparent Me.LayoutControlMain.Dock = System.Windows.Forms.DockStyle.Fill @@ -110,7 +131,7 @@ Partial Class frmFormDesigner Me.LayoutControlMain.OptionsCustomizationForm.ShowLoadButton = False Me.LayoutControlMain.OptionsCustomizationForm.ShowSaveButton = False Me.LayoutControlMain.Root = Me.LayoutControlGroupMain - Me.LayoutControlMain.Size = New System.Drawing.Size(624, 362) + Me.LayoutControlMain.Size = New System.Drawing.Size(655, 362) Me.LayoutControlMain.TabIndex = 2 Me.LayoutControlMain.Text = "LayoutControl1" ' @@ -119,7 +140,7 @@ Partial Class frmFormDesigner Me.LayoutControlGroupMain.EnableIndentsWithoutBorders = DevExpress.Utils.DefaultBoolean.[True] Me.LayoutControlGroupMain.GroupBordersVisible = False Me.LayoutControlGroupMain.Name = "Root" - Me.LayoutControlGroupMain.Size = New System.Drawing.Size(624, 362) + Me.LayoutControlGroupMain.Size = New System.Drawing.Size(655, 362) Me.LayoutControlGroupMain.TextVisible = False ' 'ToolboxControlMain @@ -134,7 +155,7 @@ Partial Class frmFormDesigner Me.ToolboxControlMain.OptionsView.ShowToolboxCaption = True Me.ToolboxControlMain.SelectedGroup = Me.ToolboxGroupMain Me.ToolboxControlMain.SelectedGroupIndex = 0 - Me.ToolboxControlMain.Size = New System.Drawing.Size(232, 337) + Me.ToolboxControlMain.Size = New System.Drawing.Size(201, 337) Me.ToolboxControlMain.TabIndex = 4 Me.ToolboxControlMain.Text = "Form Controls" ' @@ -194,37 +215,39 @@ Partial Class frmFormDesigner Me.RibbonPageGroup1.Name = "RibbonPageGroup1" Me.RibbonPageGroup1.Text = "RibbonPageGroup1" ' - 'XtraTabControl1 + 'XtraTabControlMain ' - Me.XtraTabControl1.Dock = System.Windows.Forms.DockStyle.Fill - Me.XtraTabControl1.HeaderLocation = DevExpress.XtraTab.TabHeaderLocation.Bottom - Me.XtraTabControl1.Location = New System.Drawing.Point(0, 0) - Me.XtraTabControl1.Name = "XtraTabControl1" - Me.XtraTabControl1.SelectedTabPage = Me.XtraTabPageControls - Me.XtraTabControl1.Size = New System.Drawing.Size(234, 362) - Me.XtraTabControl1.TabIndex = 7 - Me.XtraTabControl1.TabPages.AddRange(New DevExpress.XtraTab.XtraTabPage() {Me.XtraTabPageControls, Me.XtraTabPageProperties}) + Me.XtraTabControlMain.Dock = System.Windows.Forms.DockStyle.Fill + Me.XtraTabControlMain.HeaderLocation = DevExpress.XtraTab.TabHeaderLocation.Bottom + Me.XtraTabControlMain.Location = New System.Drawing.Point(0, 0) + Me.XtraTabControlMain.Name = "XtraTabControlMain" + Me.XtraTabControlMain.SelectedTabPage = Me.XtraTabPageControls + Me.XtraTabControlMain.Size = New System.Drawing.Size(203, 362) + Me.XtraTabControlMain.TabIndex = 7 + Me.XtraTabControlMain.TabPages.AddRange(New DevExpress.XtraTab.XtraTabPage() {Me.XtraTabPageControls, Me.XtraTabPageProperties}) ' 'XtraTabPageControls ' Me.XtraTabPageControls.Controls.Add(Me.ToolboxControlMain) Me.XtraTabPageControls.Name = "XtraTabPageControls" - Me.XtraTabPageControls.Size = New System.Drawing.Size(232, 337) + Me.XtraTabPageControls.Size = New System.Drawing.Size(201, 337) Me.XtraTabPageControls.Text = "Controls" ' 'XtraTabPageProperties ' Me.XtraTabPageProperties.Controls.Add(Me.PropertyGridControlMain) Me.XtraTabPageProperties.Name = "XtraTabPageProperties" - Me.XtraTabPageProperties.Size = New System.Drawing.Size(232, 337) + Me.XtraTabPageProperties.PageEnabled = False + Me.XtraTabPageProperties.Size = New System.Drawing.Size(201, 337) Me.XtraTabPageProperties.Text = "Eigenschaften" ' 'PropertyGridControlMain ' + Me.PropertyGridControlMain.Cursor = System.Windows.Forms.Cursors.Hand Me.PropertyGridControlMain.Dock = System.Windows.Forms.DockStyle.Fill Me.PropertyGridControlMain.Location = New System.Drawing.Point(0, 0) Me.PropertyGridControlMain.Name = "PropertyGridControlMain" - Me.PropertyGridControlMain.Size = New System.Drawing.Size(232, 337) + Me.PropertyGridControlMain.Size = New System.Drawing.Size(201, 337) Me.PropertyGridControlMain.TabIndex = 0 ' 'SplitContainerMain @@ -234,11 +257,12 @@ Partial Class frmFormDesigner Me.SplitContainerMain.Location = New System.Drawing.Point(0, 146) Me.SplitContainerMain.Name = "SplitContainerMain" Me.SplitContainerMain.Panel1.Controls.Add(Me.LayoutControlMain) - Me.SplitContainerMain.Panel1.Text = "Panel1" - Me.SplitContainerMain.Panel2.Controls.Add(Me.XtraTabControl1) - Me.SplitContainerMain.Panel2.Text = "Panel2" + Me.SplitContainerMain.Panel1.Text = "PanelMain" + Me.SplitContainerMain.Panel2.Controls.Add(Me.XtraTabControlMain) + Me.SplitContainerMain.Panel2.MinSize = 200 + Me.SplitContainerMain.Panel2.Text = "PanelSidebar" Me.SplitContainerMain.Size = New System.Drawing.Size(870, 362) - Me.SplitContainerMain.SplitterPosition = 624 + Me.SplitContainerMain.SplitterPosition = 655 Me.SplitContainerMain.TabIndex = 3 Me.SplitContainerMain.Text = "SplitContainerControl1" ' @@ -249,16 +273,18 @@ Partial Class frmFormDesigner Me.ClientSize = New System.Drawing.Size(870, 529) Me.Controls.Add(Me.SplitContainerMain) Me.Controls.Add(Me.RibbonStatusBar) - Me.Controls.Add(Me.RibbonControl) + Me.Controls.Add(Me.FormDesignerRibbon) + Me.DefaultRibbonPage = Me.RibbonPageFormDesigner Me.Name = "frmFormDesigner" - Me.Ribbon = Me.RibbonControl + Me.Ribbon = Me.FormDesignerRibbon + Me.ShowIcon = False Me.StatusBar = Me.RibbonStatusBar Me.Text = "Form Designer" - CType(Me.RibbonControl, System.ComponentModel.ISupportInitialize).EndInit() + CType(Me.FormDesignerRibbon, System.ComponentModel.ISupportInitialize).EndInit() CType(Me.LayoutControlMain, System.ComponentModel.ISupportInitialize).EndInit() CType(Me.LayoutControlGroupMain, System.ComponentModel.ISupportInitialize).EndInit() - CType(Me.XtraTabControl1, System.ComponentModel.ISupportInitialize).EndInit() - Me.XtraTabControl1.ResumeLayout(False) + CType(Me.XtraTabControlMain, System.ComponentModel.ISupportInitialize).EndInit() + Me.XtraTabControlMain.ResumeLayout(False) Me.XtraTabPageControls.ResumeLayout(False) Me.XtraTabPageProperties.ResumeLayout(False) CType(Me.PropertyGridControlMain, System.ComponentModel.ISupportInitialize).EndInit() @@ -269,7 +295,7 @@ Partial Class frmFormDesigner End Sub - Friend WithEvents RibbonControl As DevExpress.XtraBars.Ribbon.RibbonControl + Friend WithEvents FormDesignerRibbon As DevExpress.XtraBars.Ribbon.RibbonControl Friend WithEvents RibbonStatusBar As DevExpress.XtraBars.Ribbon.RibbonStatusBar Friend WithEvents LayoutControlMain As DevExpress.XtraLayout.LayoutControl Friend WithEvents LayoutControlGroupMain As DevExpress.XtraLayout.LayoutControlGroup @@ -279,7 +305,7 @@ Partial Class frmFormDesigner Friend WithEvents ToolboxItemTextbox As DevExpress.XtraToolbox.ToolboxItem Friend WithEvents ToolboxItemMemoedit As DevExpress.XtraToolbox.ToolboxItem Friend WithEvents ToolboxItemDatepicker As DevExpress.XtraToolbox.ToolboxItem - Friend WithEvents XtraTabControl1 As DevExpress.XtraTab.XtraTabControl + Friend WithEvents XtraTabControlMain As DevExpress.XtraTab.XtraTabControl Friend WithEvents XtraTabPageControls As DevExpress.XtraTab.XtraTabPage Friend WithEvents XtraTabPageProperties As DevExpress.XtraTab.XtraTabPage Friend WithEvents PropertyGridControlMain As DevExpress.XtraVerticalGrid.PropertyGridControl @@ -288,6 +314,7 @@ Partial Class frmFormDesigner Friend WithEvents ToolboxItemCheckbox As DevExpress.XtraToolbox.ToolboxItem Friend WithEvents BarCheckEditLayout As DevExpress.XtraBars.BarCheckItem Friend WithEvents RibbonPageCategory1 As DevExpress.XtraBars.Ribbon.RibbonPageCategory - Friend WithEvents RibbonPage2 As DevExpress.XtraBars.Ribbon.RibbonPage + Friend WithEvents RibbonPageFormDesigner As DevExpress.XtraBars.Ribbon.RibbonPage Friend WithEvents RibbonPageGroup2 As DevExpress.XtraBars.Ribbon.RibbonPageGroup + Friend WithEvents BarCheckEditControls As DevExpress.XtraBars.BarCheckItem End Class diff --git a/EDMI_ClientSuite/FormDesigner/frmFormDesigner.resx b/EDMI_ClientSuite/FormDesigner/frmFormDesigner.resx index 3357c924..13eb9095 100644 --- a/EDMI_ClientSuite/FormDesigner/frmFormDesigner.resx +++ b/EDMI_ClientSuite/FormDesigner/frmFormDesigner.resx @@ -120,23 +120,43 @@ - iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8 - YQUAAAAZdEVYdFNvZnR3YXJlAEFkb2JlIEltYWdlUmVhZHlxyWU8AAAAG3RFWHRUaXRsZQBPdXRsaW5l - O0JvcmRlcjtDb2xvcjtFPhLAAAAAiklEQVQ4T5WSyw2AIBBE6Yk6bMpQlL14924BsjrIEkJm+WzyQjLZ - NxjViQhl2w8L/yE4sedCCDJC57xuiDU+FcxMJesTJKYK2M16DguIrKDkfwfWjGRgFuSlVtS8fBVakJda - UfMiA6tAl7sy6BWoZMogFdQ8MdYFXRnQ33gFGq5AwxVouAIN5xH3Aj5Jzm636GRiAAAAAElFTkSuQmCC + iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAAABGdBTUEAALGPC/xhBQAAABl0RVh0U29m + dHdhcmUAQWRvYmUgSW1hZ2VSZWFkeXHJZTwAAAAbdEVYdFRpdGxlAE91dGxpbmU7Qm9yZGVyO0NvbG9y + O0U+EsAAAACKSURBVDhPlZLLDYAgEETpiTpsylCUvXj3bgGyOsgSQmb5bPJCMtk3GNWJCGXbDwv/ITix + 50IIMkLnvG6INT4VzEwl6xMkpgrYzXoOC4isoOR/B9aMZGAW5KVW1Lx8FVqQl1pR8yIDq0CXuzLoFahk + yiAV1Dwx1gVdGdDfeAUarkDDFWi4Ag3nEfcCPknObrfoZGIAAAAASUVORK5CYII= - iVBORw0KGgoAAAANSUhEUgAAACAAAAAgCAYAAABzenr0AAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8 - YQUAAAAZdEVYdFNvZnR3YXJlAEFkb2JlIEltYWdlUmVhZHlxyWU8AAAAG3RFWHRUaXRsZQBPdXRsaW5l - O0JvcmRlcjtDb2xvcjtFPhLAAAABDUlEQVRYR72S0Q2DMAxE2Yk5ulTFUB2iG/S//50gvYswSuEIaWI5 - 0hNg4XtH1Sml5M7t/lDMIK3wPr97WPaA4TtK+VaC78qAURB+JTdmGeAFBQWqgF70AOGl9LTEtCxL8sLO - 6/05iIAqMecCnudEbpQleJ1cC1zIDSuR/6RuBRrlZJMTlwK9cjJcoFeO1cxQgZEvx/pYgRE5QUR/gVE5 - QUxfAQ85QVS1wHO9/hwvOUHcf7+Ap5wgsr2At5wgtr0AFiy8lO1plhPE/l3AJOVzOZeiMxDbVcBk+2cp - qYHY7gImtasUEKxekgvU4EGY4vLLTVJDDiORw0jkMBI5jEQOI5HDSOQwEjmMRA7jSNMXcaR3S692HfcA - AAAASUVORK5CYII= + iVBORw0KGgoAAAANSUhEUgAAACAAAAAgCAYAAABzenr0AAAABGdBTUEAALGPC/xhBQAAABl0RVh0U29m + dHdhcmUAQWRvYmUgSW1hZ2VSZWFkeXHJZTwAAAAbdEVYdFRpdGxlAE91dGxpbmU7Qm9yZGVyO0NvbG9y + O0U+EsAAAAENSURBVFhHvZLRDYMwDETZiTm6VMVQHaIb9L//nSC9izBK4QhpYjnSE2Dhe0fVKaXkzu3+ + UMwgrfA+v3tY9oDhO0r5VoLvyoBREH4lN2YZ4AUFBaqAXvQA4aX0tMS0LEvyws7r/TmIgCox5wKe50Ru + lCV4nVwLXMgNK5H/pG4FGuVkkxOXAr1yMlygV47VzFCBkS/H+liBETlBRH+BUTlBTF8BDzlBVLXAc73+ + HC85Qdx/v4CnnCCyvYC3nCC2vQAWLLyU7WmWE8T+XcAk5XM5l6IzENtVwGT7ZympgdjuAia1qxQQrF6S + C9TgQZji8stNUkMOI5HDSOQwEjmMRA4jkcNI5DASOYxEDuNI0xdxpHdLr3Yd9wAAAABJRU5ErkJggg== + + + + + iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAAABGdBTUEAALGPC/xhBQAAABl0RVh0U29m + dHdhcmUAQWRvYmUgSW1hZ2VSZWFkeXHJZTwAAAAgdEVYdFRpdGxlAEVkaXQ7QmFycztSaWJib247U3Rh + bmRhcmQ7MBPD2wAAAIxJREFUOE+tkksOgCAMBbkT5/BShjXn4S7GrXu3LqytsVgawk9fMsGkvEENBgA+ + ER+cc1DgfFYry0QiKIXm3vtVS7oEmENLugQSTJ9A5hcBMi6gDAuWbYdpDoztEnBZSpoF6mTCNgsyZab+ + CaUyUv+JtDn3+jgyuKYCDYVLQhKvcSLQoOCGBVym0kswFwCbJlIIfiUIAAAAAElFTkSuQmCC + + + + + iVBORw0KGgoAAAANSUhEUgAAACAAAAAgCAYAAABzenr0AAAABGdBTUEAALGPC/xhBQAAABl0RVh0U29m + dHdhcmUAQWRvYmUgSW1hZ2VSZWFkeXHJZTwAAAAgdEVYdFRpdGxlAEVkaXQ7QmFycztSaWJib247U3Rh + bmRhcmQ7MBPD2wAAASZJREFUWEftkkEOgjAQRbkTtzDxUoYtR+Ae3sWwMmHvVhf1f2SStozQNm3ZMMkL + MDDzn0hjjDkUtVkTtVkTtVkTtUm6rjORPMEFcHaFlkHUJsEQDuHF5/u+/wzDcMGlv8u5tlGbJEVgHEdV + opoAS5OoKsDyJaoLsBaJNyUOEWCJBO6tPkxBbZIUgQ0mPKLmqE3CwVy17FJz1CY5BU6BnAKs6+3eAh7l + fM5ZBQs5BR7TS4JtWtwqL2CF229gBlVWQPnljgSqnMCf105EotxfsBEulPsIQ8MJHs8rEBNOMJJPICWc + OKE2MQKx4QRjM06oDQX2YKWEE8lxQlPAMgnxg6W/Cicy7yxLAcvssKBwIvPOshSwzA/dDScy7yxLActs + gaBw8ps3zRc04YO9+3Zd0gAAAABJRU5ErkJggg== \ No newline at end of file diff --git a/EDMI_ClientSuite/FormDesigner/frmFormDesigner.vb b/EDMI_ClientSuite/FormDesigner/frmFormDesigner.vb index 919716a3..41522de0 100644 --- a/EDMI_ClientSuite/FormDesigner/frmFormDesigner.vb +++ b/EDMI_ClientSuite/FormDesigner/frmFormDesigner.vb @@ -105,6 +105,8 @@ Public Class frmFormDesigner End Sub Private Async Sub frmFormDesigner_Load(sender As Object, e As EventArgs) Handles MyBase.Load + FormDesignerRibbon.SelectPage(RibbonPageFormDesigner) + _ControlLoader = New ControlLoader(My.LogConfig, LayoutControlGroupMain) Dim oTable = Await My.Common.Views.VWICM_FORM_CONTROL(_FormId) @@ -117,31 +119,78 @@ Public Class frmFormDesigner End Function Private Sub LayoutControlMain_ItemSelectionChanged(sender As Object, e As EventArgs) Handles LayoutControlMain.ItemSelectionChanged - ' TODO: Load Property Grid for selected item + ' only layout control items have properties + If TypeOf sender IsNot LayoutControlItem Then + Exit Sub + End If + Dim oLayoutItem As LayoutControlItem = DirectCast(sender, LayoutControlItem) Dim oSelectedControl As BaseEdit = oLayoutItem.Control - Dim oMetadata As Metadata = oSelectedControl.Tag + Dim oMetadata As Metadata + + ' Don't load properties for layout items like splitters, separators, etc. + If oLayoutItem.Control Is Nothing Then + Exit Sub + End If + + + oMetadata = oSelectedControl.Tag Select Case oSelectedControl.GetType Case GetType(MemoEdit) - + PropertyGridControlMain.SelectedObject = New MemoeditProperties() With { + .Id = oMetadata.Id, + .Name = oMetadata.Caption + } Case GetType(TextEdit) - + PropertyGridControlMain.SelectedObject = New TextboxProperties() With { + .Id = oMetadata.Id, + .Name = oMetadata.Caption + } Case GetType(LookupControl2) PropertyGridControlMain.SelectedObject = New ComboboxProperties() With { .Datasource = New DatasourceType, - .Id = oMetadata.Id + .Id = oMetadata.Id, + .Name = oMetadata.Caption + } + Case GetType(DateEdit) + PropertyGridControlMain.SelectedObject = New DatepickerProperties() With { + .Id = oMetadata.Id, + .Name = oMetadata.Caption + } + Case GetType(CheckEdit) + PropertyGridControlMain.SelectedObject = New CheckboxProperties() With { + .Id = oMetadata.Id, + .Name = oMetadata.Caption } End Select - - End Sub Private Sub BarCheckEditLayout_CheckedChanged(sender As Object, e As DevExpress.XtraBars.ItemClickEventArgs) Handles BarCheckEditLayout.CheckedChanged If BarCheckEditLayout.Checked Then LayoutControlMain.ShowCustomizationForm() - Else + XtraTabPageProperties.PageEnabled = True + XtraTabPageControls.PageEnabled = False + XtraTabControlMain.SelectedTabPage = XtraTabPageProperties + End If + End Sub + + Private Sub BarCheckEditControls_CheckedChanged(sender As Object, e As DevExpress.XtraBars.ItemClickEventArgs) Handles BarCheckEditControls.CheckedChanged + If BarCheckEditControls.Checked Then LayoutControlMain.HideCustomizationForm() + XtraTabPageProperties.PageEnabled = False + XtraTabPageControls.PageEnabled = True + XtraTabControlMain.SelectedTabPage = XtraTabPageControls End If End Sub + + Private Sub LayoutControlMain_HideCustomization(sender As Object, e As EventArgs) Handles LayoutControlMain.HideCustomization + BarCheckEditControls.Checked = True + End Sub + + Private Sub LayoutControlMain_ShowCustomization(sender As Object, e As EventArgs) Handles LayoutControlMain.ShowCustomization + BarCheckEditLayout.Checked = True + End Sub + + End Class \ No newline at end of file diff --git a/EDMI_ClientSuite/FormUserManager/frmUserManager.Designer.vb b/EDMI_ClientSuite/FormUserManager/frmUserManager.Designer.vb index 5c6b89a1..cf5e819f 100644 --- a/EDMI_ClientSuite/FormUserManager/frmUserManager.Designer.vb +++ b/EDMI_ClientSuite/FormUserManager/frmUserManager.Designer.vb @@ -1,6 +1,8 @@ - +Imports DigitalData.GUIs.ClientSuite.Base + + Partial Class frmUserManager - Inherits DevExpress.XtraBars.Ribbon.RibbonForm + Inherits BaseRibbonForm 'Form overrides dispose to clean up the component list. @@ -172,6 +174,7 @@ Partial Class frmUserManager Me.Controls.Add(Me.UserNavbar) Me.Controls.Add(Me.RibbonStatusBar) Me.Controls.Add(Me.UserRibbon) + Me.DefaultRibbonPage = Me.RibbonPageUserManager Me.Name = "frmUserManager" Me.Ribbon = Me.UserRibbon Me.ShowIcon = False diff --git a/EDMI_ClientSuite/FormUserManager/frmUserManager.vb b/EDMI_ClientSuite/FormUserManager/frmUserManager.vb index 325823d1..38ee7d01 100644 --- a/EDMI_ClientSuite/FormUserManager/frmUserManager.vb +++ b/EDMI_ClientSuite/FormUserManager/frmUserManager.vb @@ -22,22 +22,9 @@ Public Class frmUserManager Private Async Sub frmUserManager_Load(sender As Object, e As EventArgs) Handles MyBase.Load Await InitDataAsync() - UserRibbon.SelectPage(RibbonPageUserManager) UserNavbar.SelectedItem = NavbarUser2Group End Sub - Private Sub frmUserManager_VisibleChanged(sender As Object, e As EventArgs) Handles Me.VisibleChanged - If Visible Then - UserRibbon.SelectPage(RibbonPageUserManager) - End If - End Sub - - Private Sub frmUserManager_Activated(sender As Object, e As EventArgs) Handles Me.Activated - If Visible Then - UserRibbon.SelectPage(RibbonPageUserManager) - End If - End Sub - Private Sub ShowUserToGroupControl() If _UserToGroupControl Is Nothing Then _UserToGroupControl = New UserControlAssignment() With { diff --git a/EDMI_ClientSuite/FormWorkflow/frmWorkflowStep.Designer.vb b/EDMI_ClientSuite/FormWorkflow/frmWorkflowStep.Designer.vb index 63af073b..79873166 100644 --- a/EDMI_ClientSuite/FormWorkflow/frmWorkflowStep.Designer.vb +++ b/EDMI_ClientSuite/FormWorkflow/frmWorkflowStep.Designer.vb @@ -1,4 +1,6 @@ - +Imports DigitalData.GUIs.ClientSuite.Base + + Partial Class frmWorkflowStep Inherits BaseRibbonForm diff --git a/EDMI_ClientSuite/My Project/licenses.licx b/EDMI_ClientSuite/My Project/licenses.licx index 511dc5c8..8d76c874 100644 --- a/EDMI_ClientSuite/My Project/licenses.licx +++ b/EDMI_ClientSuite/My Project/licenses.licx @@ -1,14 +1,15 @@ -DevExpress.XtraVerticalGrid.PropertyGridControl, DevExpress.XtraVerticalGrid.v18.1, Version=18.1.5.0, Culture=neutral, PublicKeyToken=b88d1754d700e49a -DevExpress.XtraDataLayout.DataLayoutControl, DevExpress.XtraLayout.v18.1, Version=18.1.5.0, Culture=neutral, PublicKeyToken=b88d1754d700e49a -DevExpress.XtraBars.Ribbon.RibbonControl, DevExpress.XtraBars.v18.1, Version=18.1.5.0, Culture=neutral, PublicKeyToken=b88d1754d700e49a -DevExpress.XtraBars.Docking.DockManager, DevExpress.XtraBars.v18.1, Version=18.1.5.0, Culture=neutral, PublicKeyToken=b88d1754d700e49a -DevExpress.XtraEditors.TextEdit, DevExpress.XtraEditors.v18.1, Version=18.1.5.0, Culture=neutral, PublicKeyToken=b88d1754d700e49a +DevExpress.XtraBars.BarManager, DevExpress.XtraBars.v18.1, Version=18.1.5.0, Culture=neutral, PublicKeyToken=b88d1754d700e49a DevExpress.XtraEditors.CheckEdit, DevExpress.XtraEditors.v18.1, Version=18.1.5.0, Culture=neutral, PublicKeyToken=b88d1754d700e49a +DevExpress.XtraBars.Docking.DockManager, DevExpress.XtraBars.v18.1, Version=18.1.5.0, Culture=neutral, PublicKeyToken=b88d1754d700e49a +DevExpress.XtraBars.Navigation.OfficeNavigationBar, DevExpress.XtraBars.v18.1, Version=18.1.5.0, Culture=neutral, PublicKeyToken=b88d1754d700e49a DevExpress.XtraTabbedMdi.XtraTabbedMdiManager, DevExpress.XtraBars.v18.1, Version=18.1.5.0, Culture=neutral, PublicKeyToken=b88d1754d700e49a +DevExpress.XtraBars.Ribbon.RibbonControl, DevExpress.XtraBars.v18.1, Version=18.1.5.0, Culture=neutral, PublicKeyToken=b88d1754d700e49a +DevExpress.XtraVerticalGrid.PropertyGridControl, DevExpress.XtraVerticalGrid.v18.1, Version=18.1.5.0, Culture=neutral, PublicKeyToken=b88d1754d700e49a +DevExpress.XtraEditors.ButtonEdit, DevExpress.XtraEditors.v18.1, Version=18.1.5.0, Culture=neutral, PublicKeyToken=b88d1754d700e49a +DevExpress.XtraNavBar.NavBarControl, DevExpress.XtraNavBar.v18.1, Version=18.1.5.0, Culture=neutral, PublicKeyToken=b88d1754d700e49a DevExpress.XtraBars.Docking2010.DocumentManager, DevExpress.XtraBars.v18.1, Version=18.1.5.0, Culture=neutral, PublicKeyToken=b88d1754d700e49a -DevExpress.XtraTreeList.TreeList, DevExpress.XtraTreeList.v18.1, Version=18.1.5.0, Culture=neutral, PublicKeyToken=b88d1754d700e49a DevExpress.XtraLayout.LayoutControl, DevExpress.XtraLayout.v18.1, Version=18.1.5.0, Culture=neutral, PublicKeyToken=b88d1754d700e49a +DevExpress.XtraTreeList.TreeList, DevExpress.XtraTreeList.v18.1, Version=18.1.5.0, Culture=neutral, PublicKeyToken=b88d1754d700e49a DevExpress.XtraGrid.GridControl, DevExpress.XtraGrid.v18.1, Version=18.1.5.0, Culture=neutral, PublicKeyToken=b88d1754d700e49a -DevExpress.XtraNavBar.NavBarControl, DevExpress.XtraNavBar.v18.1, Version=18.1.5.0, Culture=neutral, PublicKeyToken=b88d1754d700e49a -DevExpress.XtraEditors.ButtonEdit, DevExpress.XtraEditors.v18.1, Version=18.1.5.0, Culture=neutral, PublicKeyToken=b88d1754d700e49a -DevExpress.XtraBars.Navigation.OfficeNavigationBar, DevExpress.XtraBars.v18.1, Version=18.1.5.0, Culture=neutral, PublicKeyToken=b88d1754d700e49a +DevExpress.XtraDataLayout.DataLayoutControl, DevExpress.XtraLayout.v18.1, Version=18.1.5.0, Culture=neutral, PublicKeyToken=b88d1754d700e49a +DevExpress.XtraEditors.TextEdit, DevExpress.XtraEditors.v18.1, Version=18.1.5.0, Culture=neutral, PublicKeyToken=b88d1754d700e49a diff --git a/EDMI_ClientSuite/_TEST/frmDocTest.Designer.vb b/EDMI_ClientSuite/_TEST/frmDocTest.Designer.vb index 444f4575..3c41f2b8 100644 --- a/EDMI_ClientSuite/_TEST/frmDocTest.Designer.vb +++ b/EDMI_ClientSuite/_TEST/frmDocTest.Designer.vb @@ -1,4 +1,6 @@ - _ +Imports DigitalData.GUIs.ClientSuite.Base + + Partial Class frmDocTest Inherits BaseForm diff --git a/EDMI_ClientSuite/_TEST/frmFileTest.Designer.vb b/EDMI_ClientSuite/_TEST/frmFileTest.Designer.vb index c7eafa56..3ac42dc9 100644 --- a/EDMI_ClientSuite/_TEST/frmFileTest.Designer.vb +++ b/EDMI_ClientSuite/_TEST/frmFileTest.Designer.vb @@ -1,4 +1,6 @@ - +Imports DigitalData.GUIs.ClientSuite.Base + + Partial Class frmFileTest Inherits BaseForm diff --git a/EDMI_ClientSuite/frmHome.Designer.vb b/EDMI_ClientSuite/frmHome.Designer.vb index ccc3d183..6967bbf2 100644 --- a/EDMI_ClientSuite/frmHome.Designer.vb +++ b/EDMI_ClientSuite/frmHome.Designer.vb @@ -1,4 +1,6 @@ - _ +Imports DigitalData.GUIs.ClientSuite.Base + + Partial Class frmHome Inherits BaseRibbonForm diff --git a/EDMI_ClientSuite/frmMain.Designer.vb b/EDMI_ClientSuite/frmMain.Designer.vb index 2136923e..05fcebf0 100644 --- a/EDMI_ClientSuite/frmMain.Designer.vb +++ b/EDMI_ClientSuite/frmMain.Designer.vb @@ -1,4 +1,6 @@ - +Imports DigitalData.GUIs.ClientSuite.Base + + Partial Class frmMain Inherits BaseRibbonForm diff --git a/EDMI_ClientSuite/frmObjectEditor.Designer.vb b/EDMI_ClientSuite/frmObjectEditor.Designer.vb index 599aff3f..3a4b80c4 100644 --- a/EDMI_ClientSuite/frmObjectEditor.Designer.vb +++ b/EDMI_ClientSuite/frmObjectEditor.Designer.vb @@ -1,4 +1,6 @@ - +Imports DigitalData.GUIs.ClientSuite.Base + + Partial Class frmObjectEditor Inherits BaseRibbonForm diff --git a/EDMI_ClientSuite/frmSearch.Designer.vb b/EDMI_ClientSuite/frmSearch.Designer.vb index c3f5e582..cb8a4a76 100644 --- a/EDMI_ClientSuite/frmSearch.Designer.vb +++ b/EDMI_ClientSuite/frmSearch.Designer.vb @@ -1,4 +1,6 @@ - _ +Imports DigitalData.GUIs.ClientSuite.Base + + Partial Class frmSearch Inherits BaseRibbonForm From 7ebd07cf143fab8b65d0b8d6d5017315ff427830 Mon Sep 17 00:00:00 2001 From: Jonathan Jenne Date: Mon, 1 Apr 2019 16:49:24 +0200 Subject: [PATCH 11/25] Add ADSync Test Project, ActiveDirectoryInterface --- ADSyncTest/ADSyncTest.vbproj | 142 ++++++++++++++++++ ADSyncTest/App.config | 6 + ADSyncTest/Form1.Designer.vb | 61 ++++++++ ADSyncTest/Form1.resx | 120 +++++++++++++++ ADSyncTest/Form1.vb | 21 +++ ADSyncTest/My Project/Application.Designer.vb | 38 +++++ ADSyncTest/My Project/Application.myapp | 11 ++ ADSyncTest/My Project/AssemblyInfo.vb | 35 +++++ ADSyncTest/My Project/Resources.Designer.vb | 62 ++++++++ ADSyncTest/My Project/Resources.resx | 117 +++++++++++++++ ADSyncTest/My Project/Settings.Designer.vb | 73 +++++++++ ADSyncTest/My Project/Settings.settings | 7 + ADSyncTest/packages.config | 4 + DDMonorepo.sln | 7 + .../ActiveDirectoryInterface.vb | 124 +++++++++++++++ .../ActiveDirectoryGroup.vb | 13 ++ Modules.Interfaces/Interfaces.vbproj | 13 +- Modules.Interfaces/ZUGFeRDInterface.vb | 2 +- .../CrossIndustryDocumentType.vb | 0 .../{ => ZUGFeRDInterface}/Exceptions.vb | 0 .../pdf_zugferd_lib.dll | Bin .../pdf_zugferd_lib.lib | Bin .../pdf_zugferd_test.exe | Bin Modules.Interfaces/packages.config | 1 - 24 files changed, 850 insertions(+), 7 deletions(-) create mode 100644 ADSyncTest/ADSyncTest.vbproj create mode 100644 ADSyncTest/App.config create mode 100644 ADSyncTest/Form1.Designer.vb create mode 100644 ADSyncTest/Form1.resx create mode 100644 ADSyncTest/Form1.vb create mode 100644 ADSyncTest/My Project/Application.Designer.vb create mode 100644 ADSyncTest/My Project/Application.myapp create mode 100644 ADSyncTest/My Project/AssemblyInfo.vb create mode 100644 ADSyncTest/My Project/Resources.Designer.vb create mode 100644 ADSyncTest/My Project/Resources.resx create mode 100644 ADSyncTest/My Project/Settings.Designer.vb create mode 100644 ADSyncTest/My Project/Settings.settings create mode 100644 ADSyncTest/packages.config create mode 100644 Modules.Interfaces/ActiveDirectoryInterface.vb create mode 100644 Modules.Interfaces/ActiveDirectoryInterface/ActiveDirectoryGroup.vb rename Modules.Interfaces/{ => ZUGFeRDInterface}/CrossIndustryDocumentType.vb (100%) rename Modules.Interfaces/{ => ZUGFeRDInterface}/Exceptions.vb (100%) rename Modules.Interfaces/{ => ZUGFeRDInterface}/pdf_zugferd_lib.dll (100%) rename Modules.Interfaces/{ => ZUGFeRDInterface}/pdf_zugferd_lib.lib (100%) rename Modules.Interfaces/{ => ZUGFeRDInterface}/pdf_zugferd_test.exe (100%) diff --git a/ADSyncTest/ADSyncTest.vbproj b/ADSyncTest/ADSyncTest.vbproj new file mode 100644 index 00000000..9698bbf5 --- /dev/null +++ b/ADSyncTest/ADSyncTest.vbproj @@ -0,0 +1,142 @@ + + + + + Debug + AnyCPU + {7386AB04-DF8D-4DFB-809D-1FAC8212CB7E} + WinExe + ADSyncTest.My.MyApplication + ADSyncTest + ADSyncTest + 512 + WindowsForms + v4.6.1 + true + + + AnyCPU + true + full + true + true + bin\Debug\ + ADSyncTest.xml + 42016,41999,42017,42018,42019,42032,42036,42020,42021,42022 + + + AnyCPU + pdbonly + false + true + true + bin\Release\ + ADSyncTest.xml + 42016,41999,42017,42018,42019,42032,42036,42020,42021,42022 + + + On + + + Binary + + + Off + + + On + + + + + ..\packages\NLog.4.5.11\lib\net45\NLog.dll + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + Form + + + Form1.vb + Form + + + + True + Application.myapp + + + True + True + Resources.resx + + + True + Settings.settings + True + + + + + Form1.vb + + + VbMyResourcesResXFileCodeGenerator + Resources.Designer.vb + My.Resources + Designer + + + + + MyApplicationCodeGenerator + Application.Designer.vb + + + SettingsSingleFileGenerator + My + Settings.Designer.vb + + + + + + + {AB6F09BF-E794-4F6A-94BB-C97C0BA84D64} + Interfaces + + + {903B2D7D-3B80-4BE9-8713-7447B704E1B0} + Logging + + + + \ No newline at end of file diff --git a/ADSyncTest/App.config b/ADSyncTest/App.config new file mode 100644 index 00000000..5534e287 --- /dev/null +++ b/ADSyncTest/App.config @@ -0,0 +1,6 @@ + + + + + + \ No newline at end of file diff --git a/ADSyncTest/Form1.Designer.vb b/ADSyncTest/Form1.Designer.vb new file mode 100644 index 00000000..25f72448 --- /dev/null +++ b/ADSyncTest/Form1.Designer.vb @@ -0,0 +1,61 @@ + _ +Partial Class Form1 + Inherits System.Windows.Forms.Form + + 'Das Formular überschreibt den Löschvorgang, um die Komponentenliste zu bereinigen. + _ + Protected Overrides Sub Dispose(ByVal disposing As Boolean) + Try + If disposing AndAlso components IsNot Nothing Then + components.Dispose() + End If + Finally + MyBase.Dispose(disposing) + End Try + End Sub + + 'Wird vom Windows Form-Designer benötigt. + Private components As System.ComponentModel.IContainer + + 'Hinweis: Die folgende Prozedur ist für den Windows Form-Designer erforderlich. + 'Das Bearbeiten ist mit dem Windows Form-Designer möglich. + 'Das Bearbeiten mit dem Code-Editor ist nicht möglich. + _ + Private Sub InitializeComponent() + Me.Button1 = New System.Windows.Forms.Button() + Me.ListBox1 = New System.Windows.Forms.ListBox() + Me.SuspendLayout() + ' + 'Button1 + ' + Me.Button1.Location = New System.Drawing.Point(12, 12) + Me.Button1.Name = "Button1" + Me.Button1.Size = New System.Drawing.Size(227, 52) + Me.Button1.TabIndex = 0 + Me.Button1.Text = "Sync" + Me.Button1.UseVisualStyleBackColor = True + ' + 'ListBox1 + ' + Me.ListBox1.FormattingEnabled = True + Me.ListBox1.Location = New System.Drawing.Point(245, 12) + Me.ListBox1.Name = "ListBox1" + Me.ListBox1.Size = New System.Drawing.Size(543, 420) + Me.ListBox1.TabIndex = 1 + ' + 'Form1 + ' + Me.AutoScaleDimensions = New System.Drawing.SizeF(6.0!, 13.0!) + Me.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font + Me.ClientSize = New System.Drawing.Size(800, 450) + Me.Controls.Add(Me.ListBox1) + Me.Controls.Add(Me.Button1) + Me.Name = "Form1" + Me.Text = "Form1" + Me.ResumeLayout(False) + + End Sub + + Friend WithEvents Button1 As Button + Friend WithEvents ListBox1 As ListBox +End Class diff --git a/ADSyncTest/Form1.resx b/ADSyncTest/Form1.resx new file mode 100644 index 00000000..1af7de15 --- /dev/null +++ b/ADSyncTest/Form1.resx @@ -0,0 +1,120 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + text/microsoft-resx + + + 2.0 + + + System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + \ No newline at end of file diff --git a/ADSyncTest/Form1.vb b/ADSyncTest/Form1.vb new file mode 100644 index 00000000..2514f9b0 --- /dev/null +++ b/ADSyncTest/Form1.vb @@ -0,0 +1,21 @@ +Imports DigitalData.Modules.Interfaces +Imports DigitalData.Modules.Logging + +Public Class Form1 + Private _sync As ActiveDirectoryInterface + Private _logConfig As LogConfig + Private _logger As Logger + + Private Sub Button1_Click(sender As Object, e As EventArgs) Handles Button1.Click + _logConfig = New LogConfig(LogConfig.PathType.CurrentDirectory) + _logger = _logConfig.GetLogger() + _sync = New ActiveDirectoryInterface(_logConfig) + _sync.Authenticate() + + Dim oGroups = _sync.ListGroups() + + For Each oGroup In oGroups + ListBox1.Items.Add(oGroup.SAMAccountName) + Next + End Sub +End Class diff --git a/ADSyncTest/My Project/Application.Designer.vb b/ADSyncTest/My Project/Application.Designer.vb new file mode 100644 index 00000000..2d8e77ac --- /dev/null +++ b/ADSyncTest/My Project/Application.Designer.vb @@ -0,0 +1,38 @@ +'------------------------------------------------------------------------------ +' +' This code was generated by a tool. +' Runtime Version:4.0.30319.42000 +' +' Changes to this file may cause incorrect behavior and will be lost if +' the code is regenerated. +' +'------------------------------------------------------------------------------ + +Option Strict On +Option Explicit On + + +Namespace My + + 'NOTE: This file is auto-generated; do not modify it directly. To make changes, + ' or if you encounter build errors in this file, go to the Project Designer + ' (go to Project Properties or double-click the My Project node in + ' Solution Explorer), and make changes on the Application tab. + ' + Partial Friend Class MyApplication + + _ + Public Sub New() + MyBase.New(Global.Microsoft.VisualBasic.ApplicationServices.AuthenticationMode.Windows) + Me.IsSingleInstance = false + Me.EnableVisualStyles = true + Me.SaveMySettingsOnExit = true + Me.ShutDownStyle = Global.Microsoft.VisualBasic.ApplicationServices.ShutdownMode.AfterMainFormCloses + End Sub + + _ + Protected Overrides Sub OnCreateMainForm() + Me.MainForm = Global.ADSyncTest.Form1 + End Sub + End Class +End Namespace diff --git a/ADSyncTest/My Project/Application.myapp b/ADSyncTest/My Project/Application.myapp new file mode 100644 index 00000000..1243847f --- /dev/null +++ b/ADSyncTest/My Project/Application.myapp @@ -0,0 +1,11 @@ + + + true + Form1 + false + 0 + true + 0 + 0 + true + diff --git a/ADSyncTest/My Project/AssemblyInfo.vb b/ADSyncTest/My Project/AssemblyInfo.vb new file mode 100644 index 00000000..3184d7f5 --- /dev/null +++ b/ADSyncTest/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 bestimmt die ID der Typbibliothek, 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, +' übernehmen, indem Sie "*" eingeben: +' + + + diff --git a/ADSyncTest/My Project/Resources.Designer.vb b/ADSyncTest/My Project/Resources.Designer.vb new file mode 100644 index 00000000..7dc5da1d --- /dev/null +++ b/ADSyncTest/My Project/Resources.Designer.vb @@ -0,0 +1,62 @@ +'------------------------------------------------------------------------------ +' +' This code was generated by a tool. +' Runtime Version:4.0.30319.42000 +' +' Changes to this file may cause incorrect behavior and will be lost if +' the code is regenerated. +' +'------------------------------------------------------------------------------ + +Option Strict On +Option Explicit On + + +Namespace My.Resources + + 'This class was auto-generated by the StronglyTypedResourceBuilder + 'class via a tool like ResGen or Visual Studio. + 'To add or remove a member, edit your .ResX file then rerun ResGen + 'with the /str option, or rebuild your VS project. + ''' + ''' A strongly-typed resource class, for looking up localized strings, etc. + ''' + _ + Friend Module Resources + + Private resourceMan As Global.System.Resources.ResourceManager + + Private resourceCulture As Global.System.Globalization.CultureInfo + + ''' + ''' Returns the cached ResourceManager instance used by this class. + ''' + _ + 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("ADSyncTest.Resources", GetType(Resources).Assembly) + resourceMan = temp + End If + Return resourceMan + End Get + End Property + + ''' + ''' Overrides the current thread's CurrentUICulture property for all + ''' resource lookups using this strongly typed resource class. + ''' + _ + Friend Property Culture() As Global.System.Globalization.CultureInfo + Get + Return resourceCulture + End Get + Set(ByVal value As Global.System.Globalization.CultureInfo) + resourceCulture = value + End Set + End Property + End Module +End Namespace diff --git a/ADSyncTest/My Project/Resources.resx b/ADSyncTest/My Project/Resources.resx new file mode 100644 index 00000000..af7dbebb --- /dev/null +++ b/ADSyncTest/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/ADSyncTest/My Project/Settings.Designer.vb b/ADSyncTest/My Project/Settings.Designer.vb new file mode 100644 index 00000000..54718620 --- /dev/null +++ b/ADSyncTest/My Project/Settings.Designer.vb @@ -0,0 +1,73 @@ +'------------------------------------------------------------------------------ +' +' This code was generated by a tool. +' Runtime Version:4.0.30319.42000 +' +' Changes to this file may cause incorrect behavior and will be lost if +' the code is regenerated. +' +'------------------------------------------------------------------------------ + +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 "My.Settings Auto-Save Functionality" +#If _MyType = "WindowsForms" Then + Private Shared addedHandler As Boolean + + Private Shared addedHandlerLockObject As New Object + + _ + Private Shared Sub AutoSaveSettings(ByVal sender As Global.System.Object, ByVal 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.ADSyncTest.My.MySettings + Get + Return Global.ADSyncTest.My.MySettings.Default + End Get + End Property + End Module +End Namespace diff --git a/ADSyncTest/My Project/Settings.settings b/ADSyncTest/My Project/Settings.settings new file mode 100644 index 00000000..85b890b3 --- /dev/null +++ b/ADSyncTest/My Project/Settings.settings @@ -0,0 +1,7 @@ + + + + + + + diff --git a/ADSyncTest/packages.config b/ADSyncTest/packages.config new file mode 100644 index 00000000..f89fa324 --- /dev/null +++ b/ADSyncTest/packages.config @@ -0,0 +1,4 @@ + + + + \ No newline at end of file diff --git a/DDMonorepo.sln b/DDMonorepo.sln index dd0beef4..f75b5acb 100644 --- a/DDMonorepo.sln +++ b/DDMonorepo.sln @@ -67,6 +67,8 @@ Project("{F184B08F-C81C-45F6-A57F-5ABD9991F28F}") = "DDEDMLicenseService", "DDLi EndProject Project("{F184B08F-C81C-45F6-A57F-5ABD9991F28F}") = "License", "Modules.License\License.vbproj", "{5EBACBFA-F11A-4BBF-8D02-91461F2293ED}" EndProject +Project("{F184B08F-C81C-45F6-A57F-5ABD9991F28F}") = "ADSyncTest", "ADSyncTest\ADSyncTest.vbproj", "{7386AB04-DF8D-4DFB-809D-1FAC8212CB7E}" +EndProject Global GlobalSection(SolutionConfigurationPlatforms) = preSolution Debug|Any CPU = Debug|Any CPU @@ -165,6 +167,10 @@ Global {5EBACBFA-F11A-4BBF-8D02-91461F2293ED}.Debug|Any CPU.Build.0 = Debug|Any CPU {5EBACBFA-F11A-4BBF-8D02-91461F2293ED}.Release|Any CPU.ActiveCfg = Release|Any CPU {5EBACBFA-F11A-4BBF-8D02-91461F2293ED}.Release|Any CPU.Build.0 = Release|Any CPU + {7386AB04-DF8D-4DFB-809D-1FAC8212CB7E}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {7386AB04-DF8D-4DFB-809D-1FAC8212CB7E}.Debug|Any CPU.Build.0 = Debug|Any CPU + {7386AB04-DF8D-4DFB-809D-1FAC8212CB7E}.Release|Any CPU.ActiveCfg = Release|Any CPU + {7386AB04-DF8D-4DFB-809D-1FAC8212CB7E}.Release|Any CPU.Build.0 = Release|Any CPU EndGlobalSection GlobalSection(SolutionProperties) = preSolution HideSolutionNode = FALSE @@ -193,6 +199,7 @@ Global {5B1171DC-FFFE-4813-A20D-786AAE47B320} = {3E2008C8-27B1-41DD-9B1A-0C4029F6AECC} {CBE9322E-67A1-4CC5-B25F-4A1B4C9FC55C} = {7AF3F9C2-C939-4A08-95C1-0453207E298A} {5EBACBFA-F11A-4BBF-8D02-91461F2293ED} = {3E2008C8-27B1-41DD-9B1A-0C4029F6AECC} + {7386AB04-DF8D-4DFB-809D-1FAC8212CB7E} = {8FFE925E-8B84-45F1-93CB-32B1C96F41EB} EndGlobalSection GlobalSection(ExtensibilityGlobals) = postSolution SolutionGuid = {C1BE4090-A0FD-48AF-86CB-39099D14B286} diff --git a/Modules.Interfaces/ActiveDirectoryInterface.vb b/Modules.Interfaces/ActiveDirectoryInterface.vb new file mode 100644 index 00000000..75a724bf --- /dev/null +++ b/Modules.Interfaces/ActiveDirectoryInterface.vb @@ -0,0 +1,124 @@ +Imports System.DirectoryServices +Imports DigitalData.Modules.Logging + +Public Class ActiveDirectoryInterface + Private _logConfig As LogConfig + Private _logger As Logger + + Private _rootPath As String + Private _rootNode As DirectoryEntry + + Private Const SEARCH_LIMIT = 50000 + + Private Const SAMACCOUNTNAME = "samaccountname" + Private Const OBJECTCLASS = "objectClass" + Private Const CN = "cn" + Private Const DESCRIPTION = "description" + Private Const DISINGUISHEDNAME = "distinguishedName" + Private Const NAME = "name" + Private Const OBJECTCATEGORY = "objectCategory" + + Public Sub New(LogConfig As LogConfig, Optional RootPath As String = Nothing) + _logConfig = LogConfig + _logger = _logConfig.GetLogger() + If RootPath Is Nothing Then + _rootPath = $"LDAP://{Environment.UserDomainName}" + Else + _rootPath = RootPath + End If + End Sub + + Private Function GetRootNode() As DirectoryEntry + Dim oEntry As New DirectoryEntry(_rootPath) With { + .AuthenticationType = AuthenticationTypes.Secure, + .Password = Nothing, + .Username = Nothing + } + + Return oEntry + End Function + Private Function GetRootNode(Username As String, Password As String) As DirectoryEntry + Dim oEntry As New DirectoryEntry(_rootPath) With { + .AuthenticationType = AuthenticationTypes.Secure, + .Password = Username, + .Username = Password + } + + Return oEntry + End Function + + Public Sub Authenticate() + Try + Dim oEntry = GetRootNode() + oEntry.RefreshCache() + + _rootNode = oEntry + Catch ex As Exception + _logger.Error(ex) + _logger.Warn("Could not authenticate with Active Directory.") + End Try + End Sub + Public Sub Authenticate(Username As String, Password As String) + Try + Dim oEntry = GetRootNode(Username, Password) + oEntry.RefreshCache() + + _rootNode = oEntry + Catch ex As Exception + _logger.Error(ex) + _logger.Warn("Could not authenticate with Active Directory.") + End Try + End Sub + + Public Function ListGroups() As List(Of ADGroup) + Return ListGroups(_rootNode) + End Function + + Public Function ListGroups(RootNode As DirectoryEntry) As List(Of ADGroup) + Dim oGroups As New List(Of ADGroup) + + Try + Dim oFilterQuery As String = "(&(objectClass=group) (samAccountName=*))" + Dim oDirectorySearcher As New DirectorySearcher(RootNode) With { + .SearchScope = SearchScope.Subtree, + .SizeLimit = SEARCH_LIMIT, + .Filter = oFilterQuery + } + Dim oResults As SearchResultCollection = oDirectorySearcher.FindAll() + + _logger.Info("Found {0} Groups.", oResults.Count) + + Return GroupResultsToList(oResults) + Catch ex As Exception + _logger.Error(ex) + Return oGroups + End Try + End Function + + Private Function GroupResultsToList(Results As SearchResultCollection) As List(Of ADGroup) + Dim oGroups As New List(Of ADGroup) + + For Each oResult As SearchResult In Results + oGroups.Add(New ADGroup() With { + .Name = TryGetProperty(oResult, NAME), + .SAMAccountName = TryGetProperty(oResult, SAMACCOUNTNAME), + .CN = TryGetProperty(oResult, CN), + .Description = TryGetProperty(oResult, DESCRIPTION), + .DistinguishedName = TryGetProperty(oResult, DISINGUISHEDNAME), + .ObjectCategory = TryGetProperty(oResult, OBJECTCATEGORY), + .ObjectClass = TryGetProperty(oResult, OBJECTCLASS) + }) + Next + + Return oGroups + End Function + + Private Function TryGetProperty(Result As SearchResult, PropertyName As String) As String + Try + Return Result.Properties.Item(PropertyName).Item(0) + Catch ex As Exception + _logger.Warn("Property {0} not found") + Return String.Empty + End Try + End Function +End Class diff --git a/Modules.Interfaces/ActiveDirectoryInterface/ActiveDirectoryGroup.vb b/Modules.Interfaces/ActiveDirectoryInterface/ActiveDirectoryGroup.vb new file mode 100644 index 00000000..8535f34b --- /dev/null +++ b/Modules.Interfaces/ActiveDirectoryInterface/ActiveDirectoryGroup.vb @@ -0,0 +1,13 @@ +Public Class ADGroup + Public SAMAccountName As String + Public ObjectClass As String + Public CN As String + Public Description As String + Public DistinguishedName As String + Public Name As String + Public ObjectCategory As String + + Public Overrides Function ToString() As String + Return $"SAMAccountName={SAMAccountName}, ObjectClass={ObjectClass}, CN={CN}, Description={Description}, DistinguishedName={DistinguishedName}, Name={Name}, ObjectCategory={ObjectCategory}" + End Function +End Class diff --git a/Modules.Interfaces/Interfaces.vbproj b/Modules.Interfaces/Interfaces.vbproj index e3996de3..5da6ef29 100644 --- a/Modules.Interfaces/Interfaces.vbproj +++ b/Modules.Interfaces/Interfaces.vbproj @@ -50,6 +50,7 @@ + @@ -72,7 +73,9 @@ - + + + True @@ -88,7 +91,7 @@ Settings.settings True - + @@ -110,7 +113,7 @@ Settings.Designer.vb - + PreserveNewest @@ -121,10 +124,10 @@ - + PreserveNewest - + PreserveNewest diff --git a/Modules.Interfaces/ZUGFeRDInterface.vb b/Modules.Interfaces/ZUGFeRDInterface.vb index 67531f29..39a91fe1 100644 --- a/Modules.Interfaces/ZUGFeRDInterface.vb +++ b/Modules.Interfaces/ZUGFeRDInterface.vb @@ -9,7 +9,7 @@ Public Class ZUGFeRDInterface Private _logConfig As LogConfig Private _logger As Logger - Private Const ZUGFERD_CONVERTER_EXE = "pdf_zugferd_test.exe" + Private Const ZUGFERD_CONVERTER_EXE = "ZUGFeRDInterface\pdf_zugferd_test.exe" Private Const ZUGFERD_CONVERTER_SUCCESS_MESSAGE = "Document contains ZUGFeRD data." Public Enum ErrorType diff --git a/Modules.Interfaces/CrossIndustryDocumentType.vb b/Modules.Interfaces/ZUGFeRDInterface/CrossIndustryDocumentType.vb similarity index 100% rename from Modules.Interfaces/CrossIndustryDocumentType.vb rename to Modules.Interfaces/ZUGFeRDInterface/CrossIndustryDocumentType.vb diff --git a/Modules.Interfaces/Exceptions.vb b/Modules.Interfaces/ZUGFeRDInterface/Exceptions.vb similarity index 100% rename from Modules.Interfaces/Exceptions.vb rename to Modules.Interfaces/ZUGFeRDInterface/Exceptions.vb diff --git a/Modules.Interfaces/pdf_zugferd_lib.dll b/Modules.Interfaces/ZUGFeRDInterface/pdf_zugferd_lib.dll similarity index 100% rename from Modules.Interfaces/pdf_zugferd_lib.dll rename to Modules.Interfaces/ZUGFeRDInterface/pdf_zugferd_lib.dll diff --git a/Modules.Interfaces/pdf_zugferd_lib.lib b/Modules.Interfaces/ZUGFeRDInterface/pdf_zugferd_lib.lib similarity index 100% rename from Modules.Interfaces/pdf_zugferd_lib.lib rename to Modules.Interfaces/ZUGFeRDInterface/pdf_zugferd_lib.lib diff --git a/Modules.Interfaces/pdf_zugferd_test.exe b/Modules.Interfaces/ZUGFeRDInterface/pdf_zugferd_test.exe similarity index 100% rename from Modules.Interfaces/pdf_zugferd_test.exe rename to Modules.Interfaces/ZUGFeRDInterface/pdf_zugferd_test.exe diff --git a/Modules.Interfaces/packages.config b/Modules.Interfaces/packages.config index dba90a58..f89fa324 100644 --- a/Modules.Interfaces/packages.config +++ b/Modules.Interfaces/packages.config @@ -1,5 +1,4 @@  - \ No newline at end of file From 9010ad413964f46aa94dfd0cf7e59f454ef9bc95 Mon Sep 17 00:00:00 2001 From: Jonathan Jenne Date: Thu, 4 Apr 2019 16:29:18 +0200 Subject: [PATCH 12/25] Much stuff --- ADSyncTest/ADSyncTest.vbproj | 8 + ADSyncTest/Form1.Designer.vb | 37 ++- ADSyncTest/Form1.vb | 70 ++++- DDMonorepo.sln | 7 + DDZUGFeRDService/ZUGFeRDService.vb | 3 +- EDMI_ClientSuite/ClassService.vb | 2 +- EDMI_ClientSuite/ClassTimer.vb | 2 +- .../Common/ClassCommonCommands.vb | 2 +- .../FormDesigner/frmFormDesigner.vb | 2 +- EDMI_ClientSuite/MyApplication.vb | 2 +- EDMI_ClientSuite/_TEST/frmFileTest.vb | 2 +- EDMI_ClientSuite/frmSplash.vb | 2 +- ...erviceReference.DocumentResult.datasource} | 2 +- ...MIServiceReference.IndexResult.datasource} | 2 +- ...erviceReference.NonQueryResult.datasource} | 2 +- ...IServiceReference.ScalarResult.datasource} | 2 +- ...MIServiceReference.TableResult.datasource} | 2 +- EDMI_FILE_OPs/Document.vb | 2 +- EDMI_FILE_OPs/EDMIAPI.vbproj | 18 +- .../My Project/Resources.Designer.vb | 2 +- EDMI_FILE_OPs/My Project/Settings.Designer.vb | 4 +- JobRunner/App.config | 42 +++ JobRunner/JobRunner.vb | 74 ++++++ JobRunner/JobRunner.vbproj | 156 +++++++++++ JobRunner/My Project/Application.Designer.vb | 13 + JobRunner/My Project/Application.myapp | 10 + JobRunner/My Project/AssemblyInfo.vb | 35 +++ JobRunner/My Project/Resources.Designer.vb | 63 +++++ JobRunner/My Project/Resources.resx | 117 +++++++++ JobRunner/My Project/Settings.Designer.vb | 154 +++++++++++ JobRunner/My Project/Settings.settings | 33 +++ JobRunner/ProjectInstaller.vb | 24 ++ JobRunner/WindowsService.Designer.vb | 50 ++++ JobRunner/WindowsService.resx | 123 +++++++++ JobRunner/WindowsService.vb | 38 +++ JobRunner/packages.config | 4 + Jobs/EDMI/ADSync/ADSyncArgs.vb | 3 + Jobs/EDMI/ADSync/ADSyncJob.vb | 9 + Jobs/EDMI/ZUGFeRD/EmailData.vb | 5 + Jobs/EDMI/ZUGFeRD/ImportZUGFeRDFiles.vb | 31 +-- Jobs/EDMI/ZUGFeRD/WorkerArgs.vb | 19 ++ Jobs/EDMI/ZUGFeRD/XmlItemProperty.vb | 5 + Jobs/IJob.vb | 4 + Jobs/Jobs.vbproj | 14 + Jobs/My Project/Settings.Designer.vb | 71 +++++ Jobs/My Project/Settings.settings | 0 .../ActiveDirectoryInterface.vb | 246 ++++++++++++++++-- .../ActiveDirectoryUser.vb | 18 ++ .../UserEqualityComparer.vb | 19 ++ Modules.Interfaces/Interfaces.vbproj | 7 + SERVICES/DDEDM_NetworkService/EDMService.vb | 2 +- ZUGFeRDTest/Form1.vb | 1 + 52 files changed, 1482 insertions(+), 83 deletions(-) rename EDMI_FILE_OPs/Connected Services/EDMIServiceReference/{DigitalData.Modules.EDMIFileOps.EDMIServiceReference.DocumentResult.datasource => DigitalData.Modules.EDMIAPI.EDMIServiceReference.DocumentResult.datasource} (65%) rename EDMI_FILE_OPs/Connected Services/EDMIServiceReference/{DigitalData.Modules.EDMIFileOps.EDMIServiceReference.IndexResult.datasource => DigitalData.Modules.EDMIAPI.EDMIServiceReference.IndexResult.datasource} (66%) rename EDMI_FILE_OPs/Connected Services/EDMIServiceReference/{DigitalData.Modules.EDMIFileOps.EDMIServiceReference.NonQueryResult.datasource => DigitalData.Modules.EDMIAPI.EDMIServiceReference.NonQueryResult.datasource} (65%) rename EDMI_FILE_OPs/Connected Services/EDMIServiceReference/{DigitalData.Modules.EDMIFileOps.EDMIServiceReference.ScalarResult.datasource => DigitalData.Modules.EDMIAPI.EDMIServiceReference.ScalarResult.datasource} (66%) rename EDMI_FILE_OPs/Connected Services/EDMIServiceReference/{DigitalData.Modules.EDMIFileOps.EDMIServiceReference.TableResult.datasource => DigitalData.Modules.EDMIAPI.EDMIServiceReference.TableResult.datasource} (66%) create mode 100644 JobRunner/App.config create mode 100644 JobRunner/JobRunner.vb create mode 100644 JobRunner/JobRunner.vbproj create mode 100644 JobRunner/My Project/Application.Designer.vb create mode 100644 JobRunner/My Project/Application.myapp create mode 100644 JobRunner/My Project/AssemblyInfo.vb create mode 100644 JobRunner/My Project/Resources.Designer.vb create mode 100644 JobRunner/My Project/Resources.resx create mode 100644 JobRunner/My Project/Settings.Designer.vb create mode 100644 JobRunner/My Project/Settings.settings create mode 100644 JobRunner/ProjectInstaller.vb create mode 100644 JobRunner/WindowsService.Designer.vb create mode 100644 JobRunner/WindowsService.resx create mode 100644 JobRunner/WindowsService.vb create mode 100644 JobRunner/packages.config create mode 100644 Jobs/EDMI/ADSync/ADSyncArgs.vb create mode 100644 Jobs/EDMI/ADSync/ADSyncJob.vb create mode 100644 Jobs/EDMI/ZUGFeRD/EmailData.vb create mode 100644 Jobs/EDMI/ZUGFeRD/WorkerArgs.vb create mode 100644 Jobs/EDMI/ZUGFeRD/XmlItemProperty.vb create mode 100644 Jobs/My Project/Settings.Designer.vb create mode 100644 Jobs/My Project/Settings.settings create mode 100644 Modules.Interfaces/ActiveDirectoryInterface/ActiveDirectoryUser.vb create mode 100644 Modules.Interfaces/ActiveDirectoryInterface/UserEqualityComparer.vb diff --git a/ADSyncTest/ADSyncTest.vbproj b/ADSyncTest/ADSyncTest.vbproj index 9698bbf5..8d9c8289 100644 --- a/ADSyncTest/ADSyncTest.vbproj +++ b/ADSyncTest/ADSyncTest.vbproj @@ -129,6 +129,14 @@ + + {39ec839a-3c30-4922-a41e-6b09d1dde5c3} + Jobs + + + {EAF0EA75-5FA7-485D-89C7-B2D843B03A96} + Database + {AB6F09BF-E794-4F6A-94BB-C97C0BA84D64} Interfaces diff --git a/ADSyncTest/Form1.Designer.vb b/ADSyncTest/Form1.Designer.vb index 25f72448..309bfed9 100644 --- a/ADSyncTest/Form1.Designer.vb +++ b/ADSyncTest/Form1.Designer.vb @@ -24,6 +24,9 @@ Partial Class Form1 Private Sub InitializeComponent() Me.Button1 = New System.Windows.Forms.Button() Me.ListBox1 = New System.Windows.Forms.ListBox() + Me.ListBox2 = New System.Windows.Forms.ListBox() + Me.Button2 = New System.Windows.Forms.Button() + Me.Button3 = New System.Windows.Forms.Button() Me.SuspendLayout() ' 'Button1 @@ -40,14 +43,43 @@ Partial Class Form1 Me.ListBox1.FormattingEnabled = True Me.ListBox1.Location = New System.Drawing.Point(245, 12) Me.ListBox1.Name = "ListBox1" - Me.ListBox1.Size = New System.Drawing.Size(543, 420) + Me.ListBox1.Size = New System.Drawing.Size(244, 420) Me.ListBox1.TabIndex = 1 ' + 'ListBox2 + ' + Me.ListBox2.FormattingEnabled = True + Me.ListBox2.Location = New System.Drawing.Point(495, 12) + Me.ListBox2.Name = "ListBox2" + Me.ListBox2.Size = New System.Drawing.Size(266, 420) + Me.ListBox2.TabIndex = 2 + ' + 'Button2 + ' + Me.Button2.Location = New System.Drawing.Point(12, 70) + Me.Button2.Name = "Button2" + Me.Button2.Size = New System.Drawing.Size(227, 38) + Me.Button2.TabIndex = 3 + Me.Button2.Text = "List Groups" + Me.Button2.UseVisualStyleBackColor = True + ' + 'Button3 + ' + Me.Button3.Location = New System.Drawing.Point(12, 114) + Me.Button3.Name = "Button3" + Me.Button3.Size = New System.Drawing.Size(227, 35) + Me.Button3.TabIndex = 4 + Me.Button3.Text = "List Users for selected Group" + Me.Button3.UseVisualStyleBackColor = True + ' 'Form1 ' Me.AutoScaleDimensions = New System.Drawing.SizeF(6.0!, 13.0!) Me.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font Me.ClientSize = New System.Drawing.Size(800, 450) + Me.Controls.Add(Me.Button3) + Me.Controls.Add(Me.Button2) + Me.Controls.Add(Me.ListBox2) Me.Controls.Add(Me.ListBox1) Me.Controls.Add(Me.Button1) Me.Name = "Form1" @@ -58,4 +90,7 @@ Partial Class Form1 Friend WithEvents Button1 As Button Friend WithEvents ListBox1 As ListBox + Friend WithEvents ListBox2 As ListBox + Friend WithEvents Button2 As Button + Friend WithEvents Button3 As Button End Class diff --git a/ADSyncTest/Form1.vb b/ADSyncTest/Form1.vb index 2514f9b0..b3dc7359 100644 --- a/ADSyncTest/Form1.vb +++ b/ADSyncTest/Form1.vb @@ -1,21 +1,85 @@ Imports DigitalData.Modules.Interfaces Imports DigitalData.Modules.Logging +Imports DigitalData.Modules.Interfaces.ActiveDirectoryInterface +Imports DigitalData.Modules.Database Public Class Form1 Private _sync As ActiveDirectoryInterface Private _logConfig As LogConfig Private _logger As Logger + Private _firebird As Firebird - Private Sub Button1_Click(sender As Object, e As EventArgs) Handles Button1.Click + Private Sub Form1_Load(sender As Object, e As EventArgs) Handles MyBase.Load _logConfig = New LogConfig(LogConfig.PathType.CurrentDirectory) + _logConfig.Debug = True _logger = _logConfig.GetLogger() - _sync = New ActiveDirectoryInterface(_logConfig) + _firebird = New Firebird(_logConfig, "172.24.12.41", "172.24.12.41:E:\DB\Firebird\Databases\DD_ICM.fdb", "sysdba", "dd") + + _sync = New ActiveDirectoryInterface(_logConfig, _firebird) _sync.Authenticate() + Dim oType As Type = Type.GetType("DigitalData.Modules.Jobs.ADSyncJob") + Activator.CreateInstance(oType) + End Sub + + Private Sub Button1_Click(sender As Object, e As EventArgs) Handles Button1.Click + Dim oGroup As String = ListBox1.SelectedItem + _sync.SyncUsersForGroup(oGroup) + + '' STEP 1: Get all Groups that have AD_SYNC enabled + 'Dim oSQL As String = $"SELECT RECORD_ID, GROUP_NAME FROM VWICM_GROUP WHERE AD_SYNC = 1" + 'Dim oResult As DataTable = _firebird.GetDatatable(oSQL) + + + 'For Each oRow As DataRow In oResult.Rows + ' Dim oGroupName As String = oRow.Item("GROUP_NAME") + ' Dim oGroupId As Int64 = oRow.Item("RECORD_ID") + + ' ' STEP 2: List all Users for that Group + ' Dim oUsers As List(Of ADUser) = _sync.ListUsers(oGroupName) + + ' For Each oUser In oUsers + ' ' STEP 3: Check if user exists in DB + ' oSQL = $"SELECT FNICM_GET_RECORD4SYSKEY('{oUser.samAccountName}','001-USRNAME') from RDB$DATABASE" + ' Dim oResult2 = _firebird.GetScalarValue(oSQL) + ' Dim oUserId + + ' ' STEP 3.A: If user does not exists, create and add to group + ' If IsDBNull(oResult2) Then + ' 'Create user + ' oSQL = $"SELECT FNICM_RADM_NEW_USER('{oUser.GivenName}', '{oUser.Surname}', '{oUser.samAccountName}', 'AD-Sync') from RDB$DATABASE" + ' Dim oResult3 = _firebird.GetScalarValue(oSQL) + ' oUserId = oResult3 + ' Else + ' oUserId = oResult2 + ' End If + + ' ' STEP 4: Add user to group + ' oSQL = $"SELECT FNICM_RADM_NEW_USER2GROUP({oUserId}, {oGroupId}, 'AD-Sync') from RDB$DATABASE" + ' Dim oResult4 = _firebird.GetScalarValue(oSQL) + ' Next + 'Next + End Sub + + Private Sub Button2_Click(sender As Object, e As EventArgs) Handles Button2.Click Dim oGroups = _sync.ListGroups() For Each oGroup In oGroups - ListBox1.Items.Add(oGroup.SAMAccountName) + ListBox1.Items.Add(oGroup.Name) Next End Sub + + Private Sub Button3_Click(sender As Object, e As EventArgs) Handles Button3.Click + Dim oGroup As String = ListBox1.SelectedItem + Dim oUsers = _sync.ListUsers(oGroup) + + ListBox2.Items.Clear() + For Each oUser In oUsers + ListBox2.Items.Add(oUser.samAccountName) + Next + + If oUsers.Count = 0 Then + ListBox2.Items.Add("No users found ¯\_(ツ)_/¯") + End If + End Sub End Class diff --git a/DDMonorepo.sln b/DDMonorepo.sln index f75b5acb..6c269470 100644 --- a/DDMonorepo.sln +++ b/DDMonorepo.sln @@ -69,6 +69,8 @@ Project("{F184B08F-C81C-45F6-A57F-5ABD9991F28F}") = "License", "Modules.License\ EndProject Project("{F184B08F-C81C-45F6-A57F-5ABD9991F28F}") = "ADSyncTest", "ADSyncTest\ADSyncTest.vbproj", "{7386AB04-DF8D-4DFB-809D-1FAC8212CB7E}" EndProject +Project("{F184B08F-C81C-45F6-A57F-5ABD9991F28F}") = "JobRunner", "JobRunner\JobRunner.vbproj", "{59461E98-A5AF-438C-A651-5021ACAE82AD}" +EndProject Global GlobalSection(SolutionConfigurationPlatforms) = preSolution Debug|Any CPU = Debug|Any CPU @@ -171,6 +173,10 @@ Global {7386AB04-DF8D-4DFB-809D-1FAC8212CB7E}.Debug|Any CPU.Build.0 = Debug|Any CPU {7386AB04-DF8D-4DFB-809D-1FAC8212CB7E}.Release|Any CPU.ActiveCfg = Release|Any CPU {7386AB04-DF8D-4DFB-809D-1FAC8212CB7E}.Release|Any CPU.Build.0 = Release|Any CPU + {59461E98-A5AF-438C-A651-5021ACAE82AD}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {59461E98-A5AF-438C-A651-5021ACAE82AD}.Debug|Any CPU.Build.0 = Debug|Any CPU + {59461E98-A5AF-438C-A651-5021ACAE82AD}.Release|Any CPU.ActiveCfg = Release|Any CPU + {59461E98-A5AF-438C-A651-5021ACAE82AD}.Release|Any CPU.Build.0 = Release|Any CPU EndGlobalSection GlobalSection(SolutionProperties) = preSolution HideSolutionNode = FALSE @@ -200,6 +206,7 @@ Global {CBE9322E-67A1-4CC5-B25F-4A1B4C9FC55C} = {7AF3F9C2-C939-4A08-95C1-0453207E298A} {5EBACBFA-F11A-4BBF-8D02-91461F2293ED} = {3E2008C8-27B1-41DD-9B1A-0C4029F6AECC} {7386AB04-DF8D-4DFB-809D-1FAC8212CB7E} = {8FFE925E-8B84-45F1-93CB-32B1C96F41EB} + {59461E98-A5AF-438C-A651-5021ACAE82AD} = {7AF3F9C2-C939-4A08-95C1-0453207E298A} EndGlobalSection GlobalSection(ExtensibilityGlobals) = postSolution SolutionGuid = {C1BE4090-A0FD-48AF-86CB-39099D14B286} diff --git a/DDZUGFeRDService/ZUGFeRDService.vb b/DDZUGFeRDService/ZUGFeRDService.vb index c93dc77f..ab68a822 100644 --- a/DDZUGFeRDService/ZUGFeRDService.vb +++ b/DDZUGFeRDService/ZUGFeRDService.vb @@ -1,6 +1,7 @@ Imports System.IO Imports DigitalData.Modules.Database Imports DigitalData.Modules.Logging +Imports DigitalData.Modules.Logging.LogConfig Public Class ZUGFeRDService Private _logConfig As LogConfig @@ -10,7 +11,7 @@ Public Class ZUGFeRDService Private _threadRunner As ThreadRunner Protected Overrides Sub OnStart(ByVal args() As String) - _logConfig = New LogConfig(LogConfig.PathType.CustomPath, Path.Combine(My.Application.Info.DirectoryPath, "Log")) + _logConfig = New LogConfig(PathType.CustomPath, Path.Combine(My.Application.Info.DirectoryPath, "Log")) _logConfig.Debug = True _logger = _logConfig.GetLogger() _logger.Info($"{My.Settings.SERVICE_NAME} is starting.") diff --git a/EDMI_ClientSuite/ClassService.vb b/EDMI_ClientSuite/ClassService.vb index 97432ea7..2d353f5d 100644 --- a/EDMI_ClientSuite/ClassService.vb +++ b/EDMI_ClientSuite/ClassService.vb @@ -1,7 +1,7 @@ Imports System.ServiceModel Imports System.ServiceModel.Channels Imports DigitalData.Modules.Logging -Imports DigitalData.Modules.EDMIFileOps.EDMIServiceReference +Imports DigitalData.Modules.EDMIAPI.EDMIServiceReference Imports DigitalData.GUIs.ClientSuite.Base Public Class ClassService diff --git a/EDMI_ClientSuite/ClassTimer.vb b/EDMI_ClientSuite/ClassTimer.vb index c415b64e..18da52d0 100644 --- a/EDMI_ClientSuite/ClassTimer.vb +++ b/EDMI_ClientSuite/ClassTimer.vb @@ -2,7 +2,7 @@ Imports System.Threading Imports System.Timers Imports DigitalData.GUIs.ClientSuite.Base -Imports DigitalData.Modules.EDMIFileOps.EDMIServiceReference +Imports DigitalData.Modules.EDMIAPI.EDMIServiceReference Imports DigitalData.Modules.Logging Public Class ClassTimer diff --git a/EDMI_ClientSuite/Common/ClassCommonCommands.vb b/EDMI_ClientSuite/Common/ClassCommonCommands.vb index 8c95268d..cfdc100f 100644 --- a/EDMI_ClientSuite/Common/ClassCommonCommands.vb +++ b/EDMI_ClientSuite/Common/ClassCommonCommands.vb @@ -1,5 +1,5 @@ Imports DigitalData.Modules.Logging -Imports DigitalData.Modules.EDMIFileOps.EDMIServiceReference +Imports DigitalData.Modules.EDMIAPI.EDMIServiceReference Public Class ClassCommonCommands Private _LogConfig As LogConfig diff --git a/EDMI_ClientSuite/FormDesigner/frmFormDesigner.vb b/EDMI_ClientSuite/FormDesigner/frmFormDesigner.vb index 41522de0..26b70dad 100644 --- a/EDMI_ClientSuite/FormDesigner/frmFormDesigner.vb +++ b/EDMI_ClientSuite/FormDesigner/frmFormDesigner.vb @@ -126,7 +126,7 @@ Public Class frmFormDesigner Dim oLayoutItem As LayoutControlItem = DirectCast(sender, LayoutControlItem) Dim oSelectedControl As BaseEdit = oLayoutItem.Control - Dim oMetadata As Metadata + Dim oMetadata As New Metadata ' Don't load properties for layout items like splitters, separators, etc. If oLayoutItem.Control Is Nothing Then diff --git a/EDMI_ClientSuite/MyApplication.vb b/EDMI_ClientSuite/MyApplication.vb index 15d6aa57..bb071cae 100644 --- a/EDMI_ClientSuite/MyApplication.vb +++ b/EDMI_ClientSuite/MyApplication.vb @@ -2,7 +2,7 @@ Imports System.Threading Imports DigitalData.Modules.Config Imports DigitalData.Modules.Logging -Imports DigitalData.Modules.EDMIFileOps.EDMIServiceReference +Imports DigitalData.Modules.EDMIAPI.EDMIServiceReference Namespace My ''' diff --git a/EDMI_ClientSuite/_TEST/frmFileTest.vb b/EDMI_ClientSuite/_TEST/frmFileTest.vb index ed8ab66b..13aaf27c 100644 --- a/EDMI_ClientSuite/_TEST/frmFileTest.vb +++ b/EDMI_ClientSuite/_TEST/frmFileTest.vb @@ -1,5 +1,5 @@ Imports System.IO -Imports DigitalData.Modules.EDMIFileOps +Imports DigitalData.Modules.EDMIAPI Imports DigitalData.Modules.Filesystem Imports DigitalData.Modules.Logging diff --git a/EDMI_ClientSuite/frmSplash.vb b/EDMI_ClientSuite/frmSplash.vb index ffe23b80..4b59fbcd 100644 --- a/EDMI_ClientSuite/frmSplash.vb +++ b/EDMI_ClientSuite/frmSplash.vb @@ -2,7 +2,7 @@ Imports System.ServiceModel Imports System.Threading Imports DigitalData.Modules.Logging -Imports DigitalData.Modules.EDMIFileOps.EDMIServiceReference +Imports DigitalData.Modules.EDMIAPI.EDMIServiceReference Public NotInheritable Class frmSplash Private _Worker As New BackgroundWorker() diff --git a/EDMI_FILE_OPs/Connected Services/EDMIServiceReference/DigitalData.Modules.EDMIFileOps.EDMIServiceReference.DocumentResult.datasource b/EDMI_FILE_OPs/Connected Services/EDMIServiceReference/DigitalData.Modules.EDMIAPI.EDMIServiceReference.DocumentResult.datasource similarity index 65% rename from EDMI_FILE_OPs/Connected Services/EDMIServiceReference/DigitalData.Modules.EDMIFileOps.EDMIServiceReference.DocumentResult.datasource rename to EDMI_FILE_OPs/Connected Services/EDMIServiceReference/DigitalData.Modules.EDMIAPI.EDMIServiceReference.DocumentResult.datasource index f6bab7be..7c84b32e 100644 --- a/EDMI_FILE_OPs/Connected Services/EDMIServiceReference/DigitalData.Modules.EDMIFileOps.EDMIServiceReference.DocumentResult.datasource +++ b/EDMI_FILE_OPs/Connected Services/EDMIServiceReference/DigitalData.Modules.EDMIAPI.EDMIServiceReference.DocumentResult.datasource @@ -6,5 +6,5 @@ cause the file to be unrecognizable by the program. --> - DigitalData.Modules.EDMIFileOps.EDMIServiceReference.DocumentResult, Connected Services.EDMIServiceReference.Reference.vb.dll, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null + DigitalData.Modules.EDMIAPI.EDMIServiceReference.DocumentResult \ No newline at end of file diff --git a/EDMI_FILE_OPs/Connected Services/EDMIServiceReference/DigitalData.Modules.EDMIFileOps.EDMIServiceReference.IndexResult.datasource b/EDMI_FILE_OPs/Connected Services/EDMIServiceReference/DigitalData.Modules.EDMIAPI.EDMIServiceReference.IndexResult.datasource similarity index 66% rename from EDMI_FILE_OPs/Connected Services/EDMIServiceReference/DigitalData.Modules.EDMIFileOps.EDMIServiceReference.IndexResult.datasource rename to EDMI_FILE_OPs/Connected Services/EDMIServiceReference/DigitalData.Modules.EDMIAPI.EDMIServiceReference.IndexResult.datasource index 2a2da06e..00a7860a 100644 --- a/EDMI_FILE_OPs/Connected Services/EDMIServiceReference/DigitalData.Modules.EDMIFileOps.EDMIServiceReference.IndexResult.datasource +++ b/EDMI_FILE_OPs/Connected Services/EDMIServiceReference/DigitalData.Modules.EDMIAPI.EDMIServiceReference.IndexResult.datasource @@ -6,5 +6,5 @@ cause the file to be unrecognizable by the program. --> - DigitalData.Modules.EDMIFileOps.EDMIServiceReference.IndexResult, Connected Services.EDMIServiceReference.Reference.vb.dll, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null + DigitalData.Modules.EDMIAPI.EDMIServiceReference.IndexResult \ No newline at end of file diff --git a/EDMI_FILE_OPs/Connected Services/EDMIServiceReference/DigitalData.Modules.EDMIFileOps.EDMIServiceReference.NonQueryResult.datasource b/EDMI_FILE_OPs/Connected Services/EDMIServiceReference/DigitalData.Modules.EDMIAPI.EDMIServiceReference.NonQueryResult.datasource similarity index 65% rename from EDMI_FILE_OPs/Connected Services/EDMIServiceReference/DigitalData.Modules.EDMIFileOps.EDMIServiceReference.NonQueryResult.datasource rename to EDMI_FILE_OPs/Connected Services/EDMIServiceReference/DigitalData.Modules.EDMIAPI.EDMIServiceReference.NonQueryResult.datasource index f729e1d8..6380297c 100644 --- a/EDMI_FILE_OPs/Connected Services/EDMIServiceReference/DigitalData.Modules.EDMIFileOps.EDMIServiceReference.NonQueryResult.datasource +++ b/EDMI_FILE_OPs/Connected Services/EDMIServiceReference/DigitalData.Modules.EDMIAPI.EDMIServiceReference.NonQueryResult.datasource @@ -6,5 +6,5 @@ cause the file to be unrecognizable by the program. --> - DigitalData.Modules.EDMIFileOps.EDMIServiceReference.NonQueryResult, Connected Services.EDMIServiceReference.Reference.vb.dll, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null + DigitalData.Modules.EDMIAPI.EDMIServiceReference.NonQueryResult \ No newline at end of file diff --git a/EDMI_FILE_OPs/Connected Services/EDMIServiceReference/DigitalData.Modules.EDMIFileOps.EDMIServiceReference.ScalarResult.datasource b/EDMI_FILE_OPs/Connected Services/EDMIServiceReference/DigitalData.Modules.EDMIAPI.EDMIServiceReference.ScalarResult.datasource similarity index 66% rename from EDMI_FILE_OPs/Connected Services/EDMIServiceReference/DigitalData.Modules.EDMIFileOps.EDMIServiceReference.ScalarResult.datasource rename to EDMI_FILE_OPs/Connected Services/EDMIServiceReference/DigitalData.Modules.EDMIAPI.EDMIServiceReference.ScalarResult.datasource index 7a412454..d2434d7c 100644 --- a/EDMI_FILE_OPs/Connected Services/EDMIServiceReference/DigitalData.Modules.EDMIFileOps.EDMIServiceReference.ScalarResult.datasource +++ b/EDMI_FILE_OPs/Connected Services/EDMIServiceReference/DigitalData.Modules.EDMIAPI.EDMIServiceReference.ScalarResult.datasource @@ -6,5 +6,5 @@ cause the file to be unrecognizable by the program. --> - DigitalData.Modules.EDMIFileOps.EDMIServiceReference.ScalarResult, Connected Services.EDMIServiceReference.Reference.vb.dll, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null + DigitalData.Modules.EDMIAPI.EDMIServiceReference.ScalarResult \ No newline at end of file diff --git a/EDMI_FILE_OPs/Connected Services/EDMIServiceReference/DigitalData.Modules.EDMIFileOps.EDMIServiceReference.TableResult.datasource b/EDMI_FILE_OPs/Connected Services/EDMIServiceReference/DigitalData.Modules.EDMIAPI.EDMIServiceReference.TableResult.datasource similarity index 66% rename from EDMI_FILE_OPs/Connected Services/EDMIServiceReference/DigitalData.Modules.EDMIFileOps.EDMIServiceReference.TableResult.datasource rename to EDMI_FILE_OPs/Connected Services/EDMIServiceReference/DigitalData.Modules.EDMIAPI.EDMIServiceReference.TableResult.datasource index afc8fe42..54940eb0 100644 --- a/EDMI_FILE_OPs/Connected Services/EDMIServiceReference/DigitalData.Modules.EDMIFileOps.EDMIServiceReference.TableResult.datasource +++ b/EDMI_FILE_OPs/Connected Services/EDMIServiceReference/DigitalData.Modules.EDMIAPI.EDMIServiceReference.TableResult.datasource @@ -6,5 +6,5 @@ cause the file to be unrecognizable by the program. --> - DigitalData.Modules.EDMIFileOps.EDMIServiceReference.TableResult, Connected Services.EDMIServiceReference.Reference.vb.dll, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null + DigitalData.Modules.EDMIAPI.EDMIServiceReference.TableResult \ No newline at end of file diff --git a/EDMI_FILE_OPs/Document.vb b/EDMI_FILE_OPs/Document.vb index 6224a3c5..bcb4fcab 100644 --- a/EDMI_FILE_OPs/Document.vb +++ b/EDMI_FILE_OPs/Document.vb @@ -1,5 +1,5 @@ Imports DigitalData.Modules.Logging -Imports DigitalData.Modules.EDMIFileOps.EDMIServiceReference +Imports DigitalData.Modules.EDMIAPI.EDMIServiceReference Imports System.ServiceModel Imports System.IO diff --git a/EDMI_FILE_OPs/EDMIAPI.vbproj b/EDMI_FILE_OPs/EDMIAPI.vbproj index 5cbfc34f..262e4784 100644 --- a/EDMI_FILE_OPs/EDMIAPI.vbproj +++ b/EDMI_FILE_OPs/EDMIAPI.vbproj @@ -6,8 +6,8 @@ AnyCPU {5B1171DC-FFFE-4813-A20D-786AAE47B320} Library - DigitalData.Modules.EDMIFileOps - DigitalData.Modules.EDMIFileOps + DigitalData.Modules.EDMIAPI + DigitalData.Modules.EDMIAPI 512 Windows v4.6.1 @@ -18,7 +18,7 @@ true true bin\Debug\ - DigitalData.Modules.EDMIFileOps.xml + DigitalData.Modules.EDMIAPI.xml 42016,41999,42017,42018,42019,42032,42036,42020,42021,42022 @@ -27,7 +27,7 @@ true true bin\Release\ - DigitalData.Modules.EDMIFileOps.xml + DigitalData.Modules.EDMIAPI.xml 42016,41999,42017,42018,42019,42032,42036,42020,42021,42022 @@ -106,19 +106,19 @@ - + Reference.svcmap - + Reference.svcmap - + Reference.svcmap - + Reference.svcmap - + Reference.svcmap diff --git a/EDMI_FILE_OPs/My Project/Resources.Designer.vb b/EDMI_FILE_OPs/My Project/Resources.Designer.vb index 89eb3db3..d44fe572 100644 --- a/EDMI_FILE_OPs/My Project/Resources.Designer.vb +++ b/EDMI_FILE_OPs/My Project/Resources.Designer.vb @@ -39,7 +39,7 @@ Namespace My.Resources 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.Modules.EDMIFileOps.Resources", GetType(Resources).Assembly) + Dim temp As Global.System.Resources.ResourceManager = New Global.System.Resources.ResourceManager("DigitalData.Modules.EDMIAPI.Resources", GetType(Resources).Assembly) resourceMan = temp End If Return resourceMan diff --git a/EDMI_FILE_OPs/My Project/Settings.Designer.vb b/EDMI_FILE_OPs/My Project/Settings.Designer.vb index b45a0ad8..9950efab 100644 --- a/EDMI_FILE_OPs/My Project/Settings.Designer.vb +++ b/EDMI_FILE_OPs/My Project/Settings.Designer.vb @@ -64,9 +64,9 @@ Namespace My Friend Module MySettingsProperty _ - Friend ReadOnly Property Settings() As Global.DigitalData.Modules.EDMIFileOps.My.MySettings + Friend ReadOnly Property Settings() As Global.DigitalData.Modules.EDMIAPI.My.MySettings Get - Return Global.DigitalData.Modules.EDMIFileOps.My.MySettings.Default + Return Global.DigitalData.Modules.EDMIAPI.My.MySettings.Default End Get End Property End Module diff --git a/JobRunner/App.config b/JobRunner/App.config new file mode 100644 index 00000000..f6c972d9 --- /dev/null +++ b/JobRunner/App.config @@ -0,0 +1,42 @@ + + + + +
+ + + + + + + + + DDJobRunner + + + Digital Data Job Runner + + + False + + + 1,2,3,4,5,6,7,8,9,10 + + + + + + + + + + + + + + + 120 + + + + \ No newline at end of file diff --git a/JobRunner/JobRunner.vb b/JobRunner/JobRunner.vb new file mode 100644 index 00000000..e6c7a376 --- /dev/null +++ b/JobRunner/JobRunner.vb @@ -0,0 +1,74 @@ +Imports System.ComponentModel +Imports System.Timers +Imports DigitalData.Modules.Database +Imports DigitalData.Modules.Jobs +Imports DigitalData.Modules.Logging + +Public Class JobRunner + Private WithEvents _workerThread As BackgroundWorker + Private WithEvents _workerTimer As Timer + + Private _interval As Long + Private _logConfig As LogConfig + Private _logger As Logger + Private _firebird As Firebird + + Public Sub New(LogConfig As LogConfig, Firebird As Firebird, Interval As Long) + _logConfig = LogConfig + _logger = _logConfig.GetLogger() + _firebird = Firebird + _interval = Interval + + _workerTimer = New Timer() + _workerThread = New BackgroundWorker() With { + .WorkerReportsProgress = False, + .WorkerSupportsCancellation = True + } + End Sub + + Public Sub Start() + _workerTimer.Interval = _interval * 1000 + _workerTimer.Start() + _logger.Debug("JobRunner started with {0}s Interval.", _interval) + End Sub + + Public Sub [Stop]() + Try + If _workerThread.IsBusy Then + _workerThread.CancelAsync() + _logger.Debug("Background Worker cancelled.") + End If + _workerTimer.Stop() + _logger.Debug("Background Worker stopped.") + Catch ex As Exception + _logger.Error(ex) + End Try + End Sub + + Private Sub TimerElapsed(sender As Object, e As ElapsedEventArgs) Handles _workerTimer.Elapsed + If Not _workerThread.IsBusy Then + _workerThread.RunWorkerAsync() + Else + _logger.Warn("Background Worker is busy") + End If + End Sub + + Private Sub DoWork(sender As Object, e As DoWorkEventArgs) Handles _workerThread.DoWork + Try + Dim args As WorkerArgs = e.Argument + + _logger.Debug("Background worker running..") + + ' TODO: WORK + 'Dim job As New ImportZUGFeRDFiles(_logConfig, _firebird) + 'job.Start(args) + Catch ex As Exception + _logger.Warn("Background worker failed!") + _logger.Error(ex) + End Try + End Sub + + Private Sub WorkCompleted(sender As Object, e As RunWorkerCompletedEventArgs) Handles _workerThread.RunWorkerCompleted + _logger.Debug("Background worker completed!") + End Sub +End Class diff --git a/JobRunner/JobRunner.vbproj b/JobRunner/JobRunner.vbproj new file mode 100644 index 00000000..6a0e0ea7 --- /dev/null +++ b/JobRunner/JobRunner.vbproj @@ -0,0 +1,156 @@ + + + + + Debug + AnyCPU + {59461E98-A5AF-438C-A651-5021ACAE82AD} + WinExe + DigitalData.Services.JobRunner.WindowsService + DigitalData.Services.JobRunner + DigitalData.Services.JobRunner + 512 + Console + v4.6.1 + true + + + AnyCPU + true + full + true + true + bin\Debug\ + DigitalData.Services.JobRunner.xml + 42016,41999,42017,42018,42019,42032,42036,42020,42021,42022 + + + AnyCPU + pdbonly + false + true + true + bin\Release\ + DigitalData.Services.JobRunner.xml + 42016,41999,42017,42018,42019,42032,42036,42020,42021,42022 + + + On + + + Binary + + + Off + + + On + + + + + + + + ..\LookupGrid\obj\Debug\DigitalData.Controls.LookupGrid.dll + + + + ..\packages\NLog.4.5.11\lib\net45\NLog.dll + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + True + Application.myapp + + + Component + + + Component + + + WindowsService.vb + + + + True + True + Resources.resx + + + True + Settings.settings + True + + + + + VbMyResourcesResXFileCodeGenerator + Resources.Designer.vb + My.Resources + Designer + + + WindowsService.vb + + + + + MyApplicationCodeGenerator + Application.Designer.vb + + + SettingsSingleFileGenerator + My + Settings.Designer.vb + + + + + + + {39ec839a-3c30-4922-a41e-6b09d1dde5c3} + Jobs + + + {EAF0EA75-5FA7-485D-89C7-B2D843B03A96} + Database + + + {903B2D7D-3B80-4BE9-8713-7447B704E1B0} + Logging + + + + \ No newline at end of file diff --git a/JobRunner/My Project/Application.Designer.vb b/JobRunner/My Project/Application.Designer.vb new file mode 100644 index 00000000..8ab460ba --- /dev/null +++ b/JobRunner/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/JobRunner/My Project/Application.myapp b/JobRunner/My Project/Application.myapp new file mode 100644 index 00000000..602de37e --- /dev/null +++ b/JobRunner/My Project/Application.myapp @@ -0,0 +1,10 @@ + + + false + false + 0 + true + 0 + 3 + true + diff --git a/JobRunner/My Project/AssemblyInfo.vb b/JobRunner/My Project/AssemblyInfo.vb new file mode 100644 index 00000000..df2bc85e --- /dev/null +++ b/JobRunner/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 bestimmt die ID der Typbibliothek, 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, +' übernehmen, indem Sie "*" eingeben: +' + + + diff --git a/JobRunner/My Project/Resources.Designer.vb b/JobRunner/My Project/Resources.Designer.vb new file mode 100644 index 00000000..7fb8b450 --- /dev/null +++ b/JobRunner/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.Services.JobRunner.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/JobRunner/My Project/Resources.resx b/JobRunner/My Project/Resources.resx new file mode 100644 index 00000000..af7dbebb --- /dev/null +++ b/JobRunner/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/JobRunner/My Project/Settings.Designer.vb b/JobRunner/My Project/Settings.Designer.vb new file mode 100644 index 00000000..501da1af --- /dev/null +++ b/JobRunner/My Project/Settings.Designer.vb @@ -0,0 +1,154 @@ +'------------------------------------------------------------------------------ +' +' 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 + + _ + Public ReadOnly Property SERVICE_NAME() As String + Get + Return CType(Me("SERVICE_NAME"),String) + End Get + End Property + + _ + Public ReadOnly Property SERVICE_DISPLAY_NAME() As String + Get + Return CType(Me("SERVICE_DISPLAY_NAME"),String) + End Get + End Property + + _ + Public ReadOnly Property JOB_ADSYNC_ENABLED() As Boolean + Get + Return CType(Me("JOB_ADSYNC_ENABLED"),Boolean) + End Get + End Property + + _ + Public ReadOnly Property JOB_ADSYNC_INTERVAL() As String + Get + Return CType(Me("JOB_ADSYNC_INTERVAL"),String) + End Get + End Property + + _ + Public ReadOnly Property DB_DATASOURCE() As String + Get + Return CType(Me("DB_DATASOURCE"),String) + End Get + End Property + + _ + Public ReadOnly Property DB_DATABASE() As String + Get + Return CType(Me("DB_DATABASE"),String) + End Get + End Property + + _ + Public ReadOnly Property DB_USER() As String + Get + Return CType(Me("DB_USER"),String) + End Get + End Property + + _ + Public ReadOnly Property DB_PASSWORD() As String + Get + Return CType(Me("DB_PASSWORD"),String) + End Get + End Property + + _ + Public ReadOnly Property JOB_INTERVAL() As Long + Get + Return CType(Me("JOB_INTERVAL"),Long) + End Get + End Property + End Class +End Namespace + +Namespace My + + _ + Friend Module MySettingsProperty + + _ + Friend ReadOnly Property Settings() As Global.DigitalData.Services.JobRunner.My.MySettings + Get + Return Global.DigitalData.Services.JobRunner.My.MySettings.Default + End Get + End Property + End Module +End Namespace diff --git a/JobRunner/My Project/Settings.settings b/JobRunner/My Project/Settings.settings new file mode 100644 index 00000000..ccd102fc --- /dev/null +++ b/JobRunner/My Project/Settings.settings @@ -0,0 +1,33 @@ + + + + + + DDJobRunner + + + Digital Data Job Runner + + + False + + + 1,2,3,4,5,6,7,8,9,10 + + + + + + + + + + + + + + + 120 + + + \ No newline at end of file diff --git a/JobRunner/ProjectInstaller.vb b/JobRunner/ProjectInstaller.vb new file mode 100644 index 00000000..e066985c --- /dev/null +++ b/JobRunner/ProjectInstaller.vb @@ -0,0 +1,24 @@ +Imports System.ComponentModel +Imports System.Configuration.Install +Imports System.ServiceProcess + + +Public Class ProjectInstaller + Inherits Installer + + Private ReadOnly process As ServiceProcessInstaller + Private ReadOnly components As IContainer + Private ReadOnly service As ServiceInstaller + + Public Sub New() + process = New ServiceProcessInstaller With { + .Account = ServiceAccount.LocalSystem + } + service = New ServiceInstaller With { + .ServiceName = My.Settings.SERVICE_NAME, + .DisplayName = My.Settings.SERVICE_DISPLAY_NAME + } + Installers.Add(process) + Installers.Add(service) + End Sub +End Class diff --git a/JobRunner/WindowsService.Designer.vb b/JobRunner/WindowsService.Designer.vb new file mode 100644 index 00000000..fb0f2814 --- /dev/null +++ b/JobRunner/WindowsService.Designer.vb @@ -0,0 +1,50 @@ +Imports System.ServiceProcess + + +Partial Class WindowsService + Inherits System.ServiceProcess.ServiceBase + + 'UserService überschreibt den Löschvorgang, um die Komponentenliste zu bereinigen. + + Protected Overrides Sub Dispose(ByVal disposing As Boolean) + Try + If disposing AndAlso components IsNot Nothing Then + components.Dispose() + End If + Finally + MyBase.Dispose(disposing) + End Try + End Sub + + ' Der Haupteinstiegspunkt für den Prozess + + + Shared Sub Main() + Dim ServicesToRun() As System.ServiceProcess.ServiceBase + + ' Innerhalb eines Prozesses können mehrere NT-Dienste ausgeführt werden. Um einen + ' weiteren Dienst zu diesem Prozess hinzuzufügen, ändern Sie die folgende Zeile, + ' um ein zweites Dienstobjekt zu erstellen. Zum Beispiel + ' + ' ServicesToRun = New System.ServiceProcess.ServiceBase () {New Service1, New MySecondUserService} + ' + ServicesToRun = New System.ServiceProcess.ServiceBase() {New WindowsService} + + System.ServiceProcess.ServiceBase.Run(ServicesToRun) + End Sub + + 'Wird vom Komponenten-Designer benötigt. + Private components As System.ComponentModel.IContainer + + ' Hinweis: Die folgende Prozedur ist für den Komponenten-Designer erforderlich. + ' Das Bearbeiten ist mit dem Komponenten-Designer möglich. + ' Das Bearbeiten mit dem Code-Editor ist nicht möglich. + + Private Sub InitializeComponent() + ' + 'Service1 + ' + Me.ServiceName = "Service1" + + End Sub +End Class diff --git a/JobRunner/WindowsService.resx b/JobRunner/WindowsService.resx new file mode 100644 index 00000000..e5858cc2 --- /dev/null +++ b/JobRunner/WindowsService.resx @@ -0,0 +1,123 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + text/microsoft-resx + + + 2.0 + + + System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + False + + \ No newline at end of file diff --git a/JobRunner/WindowsService.vb b/JobRunner/WindowsService.vb new file mode 100644 index 00000000..166892c5 --- /dev/null +++ b/JobRunner/WindowsService.vb @@ -0,0 +1,38 @@ +Imports System.IO +Imports DigitalData.Modules.Database +Imports DigitalData.Modules.Logging +Imports DigitalData.Modules.Logging.LogConfig + +Public Class WindowsService + Private _logConfig As LogConfig + Private _logger As Logger + Private _firebird As Firebird + + Private _jobRunner As JobRunner + + Protected Overrides Sub OnStart(ByVal args() As String) + _logConfig = New LogConfig(PathType.CustomPath, Path.Combine(My.Application.Info.DirectoryPath, "Log")) + _logConfig.Debug = True + _logger = _logConfig.GetLogger() + _logger.Info($"{My.Settings.SERVICE_NAME} is starting.") + + Dim oDataSource As String = My.Settings.DB_DATASOURCE + Dim oDatabase As String = My.Settings.DB_DATABASE + Dim oUser As String = My.Settings.DB_USER + Dim oPassword As String = My.Settings.DB_PASSWORD + Dim oInterval As Long = My.Settings.JOB_INTERVAL + + _firebird = New Firebird(_logConfig, oDataSource, oDatabase, oUser, oPassword) + + Try + _jobRunner = New JobRunner(_logConfig, _firebird, oInterval) + _jobRunner.Start() + Catch ex As Exception + _logger.Error(ex) + End Try + End Sub + + Protected Overrides Sub OnStop() + _logger.Info($"{My.Settings.SERVICE_NAME} is stopping.") + End Sub +End Class diff --git a/JobRunner/packages.config b/JobRunner/packages.config new file mode 100644 index 00000000..f89fa324 --- /dev/null +++ b/JobRunner/packages.config @@ -0,0 +1,4 @@ + + + + \ No newline at end of file diff --git a/Jobs/EDMI/ADSync/ADSyncArgs.vb b/Jobs/EDMI/ADSync/ADSyncArgs.vb new file mode 100644 index 00000000..27845e36 --- /dev/null +++ b/Jobs/EDMI/ADSync/ADSyncArgs.vb @@ -0,0 +1,3 @@ +Public Class ADSyncArgs + +End Class diff --git a/Jobs/EDMI/ADSync/ADSyncJob.vb b/Jobs/EDMI/ADSync/ADSyncJob.vb new file mode 100644 index 00000000..fba9ad50 --- /dev/null +++ b/Jobs/EDMI/ADSync/ADSyncJob.vb @@ -0,0 +1,9 @@ +Imports DigitalData.Modules.Jobs + +Public Class ADSyncJob + Implements IJob(Of ADSyncArgs) + + Public Sub Start(Arguments As ADSyncArgs) Implements IJob(Of ADSyncArgs).Start + + End Sub +End Class diff --git a/Jobs/EDMI/ZUGFeRD/EmailData.vb b/Jobs/EDMI/ZUGFeRD/EmailData.vb new file mode 100644 index 00000000..ed37e543 --- /dev/null +++ b/Jobs/EDMI/ZUGFeRD/EmailData.vb @@ -0,0 +1,5 @@ +Public Class EmailData + Public Attachment As String + Public Subject As String + Public From As String +End Class \ No newline at end of file diff --git a/Jobs/EDMI/ZUGFeRD/ImportZUGFeRDFiles.vb b/Jobs/EDMI/ZUGFeRD/ImportZUGFeRDFiles.vb index 0edef0a6..a4e36fbe 100644 --- a/Jobs/EDMI/ZUGFeRD/ImportZUGFeRDFiles.vb +++ b/Jobs/EDMI/ZUGFeRD/ImportZUGFeRDFiles.vb @@ -5,6 +5,7 @@ Imports System.Linq Imports System.Text.RegularExpressions Imports DigitalData.Modules.Database Imports DigitalData.Modules.Interfaces +Imports DigitalData.Modules.Jobs Imports DigitalData.Modules.Jobs.Exceptions Imports DigitalData.Modules.Logging Imports FirebirdSql.Data.FirebirdClient @@ -24,36 +25,6 @@ Public Class ImportZUGFeRDFiles Private _firebird As Firebird Private _filesystem As Filesystem.File - Public Class WorkerArgs - Public WatchDirectories As List(Of String) - Public SuccessDirectory As String - Public ErrorDirectory As String - Public OriginalEmailDirectory As String - Public RejectedEmailDirectory As String - Public PropertyMap As Dictionary(Of String, XmlItemProperty) - - Public Sub New() - WatchDirectories = New List(Of String) - SuccessDirectory = Nothing - ErrorDirectory = Nothing - OriginalEmailDirectory = Nothing - RejectedEmailDirectory = Nothing - PropertyMap = New Dictionary(Of String, XmlItemProperty) - End Sub - End Class - - Public Class EmailData - Public Attachment As String - Public Subject As String - Public From As String - End Class - - Public Class XmlItemProperty - Public TableName As String - Public Description As String - Public IsRequired As Boolean - End Class - Public Sub New(LogConfig As LogConfig, Firebird As Firebird) _logConfig = LogConfig _logger = LogConfig.GetLogger() diff --git a/Jobs/EDMI/ZUGFeRD/WorkerArgs.vb b/Jobs/EDMI/ZUGFeRD/WorkerArgs.vb new file mode 100644 index 00000000..5b9d4393 --- /dev/null +++ b/Jobs/EDMI/ZUGFeRD/WorkerArgs.vb @@ -0,0 +1,19 @@ +Imports System.Collections.Generic + +Public Class WorkerArgs + Public WatchDirectories As List(Of String) + Public SuccessDirectory As String + Public ErrorDirectory As String + Public OriginalEmailDirectory As String + Public RejectedEmailDirectory As String + Public PropertyMap As Dictionary(Of String, XmlItemProperty) + + Public Sub New() + WatchDirectories = New List(Of String) + SuccessDirectory = Nothing + ErrorDirectory = Nothing + OriginalEmailDirectory = Nothing + RejectedEmailDirectory = Nothing + PropertyMap = New Dictionary(Of String, XmlItemProperty) + End Sub +End Class \ No newline at end of file diff --git a/Jobs/EDMI/ZUGFeRD/XmlItemProperty.vb b/Jobs/EDMI/ZUGFeRD/XmlItemProperty.vb new file mode 100644 index 00000000..57e98415 --- /dev/null +++ b/Jobs/EDMI/ZUGFeRD/XmlItemProperty.vb @@ -0,0 +1,5 @@ +Public Class XmlItemProperty + Public TableName As String + Public Description As String + Public IsRequired As Boolean +End Class \ No newline at end of file diff --git a/Jobs/IJob.vb b/Jobs/IJob.vb index cb1aab71..6cd3f6dc 100644 --- a/Jobs/IJob.vb +++ b/Jobs/IJob.vb @@ -1,3 +1,7 @@ Public Interface IJob Sub Start(Arguments As Object) End Interface + +Public Interface IJob(Of T) + Sub Start(Arguments As T) +End Interface diff --git a/Jobs/Jobs.vbproj b/Jobs/Jobs.vbproj index 52d3116f..fc678fc3 100644 --- a/Jobs/Jobs.vbproj +++ b/Jobs/Jobs.vbproj @@ -57,6 +57,10 @@ + + SettingsSingleFileGenerator + Settings.Designer.vb + @@ -78,11 +82,21 @@ + + + + + + + True + True + Settings.settings + diff --git a/Jobs/My Project/Settings.Designer.vb b/Jobs/My Project/Settings.Designer.vb new file mode 100644 index 00000000..b89e781b --- /dev/null +++ b/Jobs/My Project/Settings.Designer.vb @@ -0,0 +1,71 @@ +'------------------------------------------------------------------------------ +' +' 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 + + + + _ +Partial Friend NotInheritable Class Settings + Inherits Global.System.Configuration.ApplicationSettingsBase + + Private Shared defaultInstance As Settings = CType(Global.System.Configuration.ApplicationSettingsBase.Synchronized(New Settings()),Settings) + +#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 Settings + 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 + +Namespace My + + _ + Friend Module MySettingsProperty + + _ + Friend ReadOnly Property Settings() As Global.DigitalData.Modules.Jobs.Settings + Get + Return Global.DigitalData.Modules.Jobs.Settings.Default + End Get + End Property + End Module +End Namespace diff --git a/Jobs/My Project/Settings.settings b/Jobs/My Project/Settings.settings new file mode 100644 index 00000000..e69de29b diff --git a/Modules.Interfaces/ActiveDirectoryInterface.vb b/Modules.Interfaces/ActiveDirectoryInterface.vb index 75a724bf..b9549f4a 100644 --- a/Modules.Interfaces/ActiveDirectoryInterface.vb +++ b/Modules.Interfaces/ActiveDirectoryInterface.vb @@ -1,9 +1,12 @@ Imports System.DirectoryServices +Imports System.DirectoryServices.AccountManagement +Imports DigitalData.Modules.Database Imports DigitalData.Modules.Logging Public Class ActiveDirectoryInterface Private _logConfig As LogConfig Private _logger As Logger + Private _firebird As Firebird Private _rootPath As String Private _rootNode As DirectoryEntry @@ -18,9 +21,11 @@ Public Class ActiveDirectoryInterface Private Const NAME = "name" Private Const OBJECTCATEGORY = "objectCategory" - Public Sub New(LogConfig As LogConfig, Optional RootPath As String = Nothing) + Public Sub New(LogConfig As LogConfig, Firebird As Firebird, Optional RootPath As String = Nothing) _logConfig = LogConfig _logger = _logConfig.GetLogger() + _firebird = Firebird + If RootPath Is Nothing Then _rootPath = $"LDAP://{Environment.UserDomainName}" Else @@ -28,25 +33,86 @@ Public Class ActiveDirectoryInterface End If End Sub - Private Function GetRootNode() As DirectoryEntry - Dim oEntry As New DirectoryEntry(_rootPath) With { - .AuthenticationType = AuthenticationTypes.Secure, - .Password = Nothing, - .Username = Nothing - } + Public Function SyncUsersForGroup(GroupName As String) As List(Of ADUser) + Dim oUsers As New List(Of ADUser) + Dim oSyncedUsers As New List(Of ADUser) + Dim oGroupId As Int64 = Nothing - Return oEntry - End Function - Private Function GetRootNode(Username As String, Password As String) As DirectoryEntry - Dim oEntry As New DirectoryEntry(_rootPath) With { - .AuthenticationType = AuthenticationTypes.Secure, - .Password = Username, - .Username = Password - } + Try + _logger.Debug("Fetching users from ActiveDirectory") + oUsers = ListUsers(GroupName) + _logger.Debug("Found {0} users", oUsers.Count) + Catch ex As Exception + _logger.Error(ex) + Return Nothing + End Try - Return oEntry + If oUsers.Count = 0 Then + _logger.Debug("Group {0} does not contain any users.", GroupName) + Return oSyncedUsers + End If + + Try + _logger.Debug("Getting group Id for group {0}", GroupName) + oGroupId = GetGroupId(GroupName) + + + If oGroupId = 0 Then + _logger.Warn("Group {0} does not exist in database. Exiting", GroupName) + Return Nothing + End If + + _logger.Debug("Using group Id {0}", oGroupId) + Catch ex As Exception + _logger.Error(ex) + Return Nothing + End Try + + For Each oUser In oUsers + Dim oUserId As Int64 + Dim oUserExists As Boolean = False + + ' Check if user already exists + Try + _logger.Debug("Checking if user {0} exists", oUser) + oUserId = GetUserId(oUser.samAccountName) + oUserExists = Not IsNothing(oUserId) + _logger.Debug("User {0} exists in database: ", oUser, oUserExists) + Catch ex As Exception + _logger.Error(ex) + _logger.Warn("Could not get UserId for user. Skipping") + Continue For + End Try + + ' I user does not exist, create a new user + Try + If Not oUserExists Then + _logger.Debug("Creating new user for {0}", oUser) + oUserId = CreateUser(oUser) + _logger.Debug("User created with Id {0}", oUserId) + End If + Catch ex As Exception + _logger.Error(ex) + _logger.Warn("Could not create user. Skipping") + Continue For + End Try + + ' Add the user to group + Try + AddUserToGroup(oUserId, oGroupId) + Catch ex As Exception + _logger.Error(ex) + _logger.Warn("Could not add user to group. Skipping") + Continue For + End Try + + oSyncedUsers.Add(oUser) + Next + + Return oSyncedUsers End Function + Public Sub Authenticate() Try Dim oEntry = GetRootNode() @@ -70,19 +136,17 @@ Public Class ActiveDirectoryInterface End Try End Sub - Public Function ListGroups() As List(Of ADGroup) - Return ListGroups(_rootNode) + Public Function ListGroups(Optional Query As String = "(&(objectClass=group) (samAccountName=*))") As List(Of ADGroup) + Return ListGroups(_rootNode, Query) End Function - - Public Function ListGroups(RootNode As DirectoryEntry) As List(Of ADGroup) + Public Function ListGroups(RootNode As DirectoryEntry, Optional Query As String = "(&(objectClass=group) (samAccountName=*))") As List(Of ADGroup) Dim oGroups As New List(Of ADGroup) Try - Dim oFilterQuery As String = "(&(objectClass=group) (samAccountName=*))" Dim oDirectorySearcher As New DirectorySearcher(RootNode) With { .SearchScope = SearchScope.Subtree, .SizeLimit = SEARCH_LIMIT, - .Filter = oFilterQuery + .Filter = Query } Dim oResults As SearchResultCollection = oDirectorySearcher.FindAll() @@ -95,6 +159,144 @@ Public Class ActiveDirectoryInterface End Try End Function + Public Function ListUsers(GroupName As String) As List(Of ADUser) + Dim oUsers As New List(Of ADUser) + + Try + Using oContext As New PrincipalContext(ContextType.Domain) + Using oGroupPrincipal As GroupPrincipal = GroupPrincipal.FindByIdentity(oContext, IdentityType.Name, GroupName) + If oGroupPrincipal Is Nothing Then + _logger.Warn("Group {0} does not exist.", GroupName) + Return oUsers + End If + + Using oMembers = oGroupPrincipal.GetMembers(True) + For Each oMember As Principal In oMembers + If TypeOf oMember Is UserPrincipal Then + Dim oUser As UserPrincipal = DirectCast(oMember, UserPrincipal) + + oUsers.Add(New ADUser() With { + .GUID = oUser.Guid, + .SId = oUser.Sid, + .samAccountName = oUser.SamAccountName, + .Surname = oUser.Surname, + .Middlename = oUser.MiddleName, + .GivenName = oUser.GivenName, + .Email = oUser.EmailAddress + }) + End If + Next + End Using + End Using + End Using + + Return oUsers + Catch ex As Exception + _logger.Error(ex) + Throw ex + End Try + End Function + Public Function ListUsers(GroupNames As List(Of String)) As List(Of ADUser) + Try + Dim oUsers As New List(Of ADUser) + Dim oComparer As New UserEqualityComparer() + + For Each oGroup In GroupNames + Dim oGroupUsers = ListUsers(oGroup) + Dim oNewUsers = oGroupUsers. + Except(oUsers, oComparer). + ToList() + oUsers.AddRange(oNewUsers) + Next + + Return oUsers + Catch ex As Exception + _logger.Error(ex) + Throw ex + End Try + End Function + + Public Function GetGroupId(GroupName As String) As Integer + Try + Dim oSQL As String = $"SELECT FNICM_GET_RECORD4SYSKEY('{GroupName}','002-NAME') from RDB$DATABASE" + Dim oGroupId = _firebird.GetScalarValue(oSQL) + + If IsDBNull(oGroupId) OrElse oGroupId = 0 Then + _logger.Debug("Group {0} not found in database", GroupName) + Return Nothing + End If + + Return oGroupId + Catch ex As Exception + _logger.Error(ex) + Throw ex + End Try + End Function + + Private Function GetUserId(UserName As String) As Integer + Try + Dim oSQL As String = $"SELECT FNICM_GET_RECORD4SYSKEY('{UserName}','001-USRNAME') from RDB$DATABASE" + Dim oResult = _firebird.GetScalarValue(oSQL) + + If IsDBNull(oResult) Then + Return Nothing + End If + + Return oResult + Catch ex As Exception + _logger.Error(ex) + Throw ex + End Try + End Function + + Private Function CreateUser(User As ADUser) As Int64 + Try + Dim oSQL = $"SELECT FNICM_RADM_NEW_USER('{User.GivenName}', '{User.Surname}', '{User.samAccountName}', 'AD-Sync') from RDB$DATABASE" + Dim oUserId As Integer = _firebird.GetScalarValue(oSQL) + + Return oUserId + Catch ex As Exception + _logger.Error(ex) + Throw ex + End Try + End Function + + Private Function AddUserToGroup(UserId As Integer, GroupId As Integer) As Int64 + Try + Dim oSQL = $"SELECT FNICM_RADM_NEW_USER2GROUP({UserId}, {GroupId}, 'AD-Sync') from RDB$DATABASE" + Dim oRecordId = _firebird.GetScalarValue(oSQL) + + If IsDBNull(oRecordId) Then + _logger.Warn("UserId {0} - GroupId {1} relation already exists.", UserId, GroupId) + Return Nothing + End If + + Return oRecordId + Catch ex As Exception + _logger.Error(ex) + Throw ex + End Try + End Function + + Private Function GetRootNode() As DirectoryEntry + Dim oEntry As New DirectoryEntry(_rootPath) With { + .AuthenticationType = AuthenticationTypes.Secure, + .Password = Nothing, + .Username = Nothing + } + + Return oEntry + End Function + Private Function GetRootNode(Username As String, Password As String) As DirectoryEntry + Dim oEntry As New DirectoryEntry(_rootPath) With { + .AuthenticationType = AuthenticationTypes.Secure, + .Password = Username, + .Username = Password + } + + Return oEntry + End Function + Private Function GroupResultsToList(Results As SearchResultCollection) As List(Of ADGroup) Dim oGroups As New List(Of ADGroup) diff --git a/Modules.Interfaces/ActiveDirectoryInterface/ActiveDirectoryUser.vb b/Modules.Interfaces/ActiveDirectoryInterface/ActiveDirectoryUser.vb new file mode 100644 index 00000000..4c4840a7 --- /dev/null +++ b/Modules.Interfaces/ActiveDirectoryInterface/ActiveDirectoryUser.vb @@ -0,0 +1,18 @@ +Imports System.Security.Principal + +Public Class ADUser + Public GUID As Guid + Public SId As SecurityIdentifier + Public samAccountName As String + Public Surname As String + Public GivenName As String + Public Middlename As String + Public Email As String + + Public Overrides Function Equals(obj As Object) As Boolean + Return DirectCast(obj, ADUser).samAccountName + End Function + Public Overrides Function ToString() As String + Return samAccountName + End Function +End Class diff --git a/Modules.Interfaces/ActiveDirectoryInterface/UserEqualityComparer.vb b/Modules.Interfaces/ActiveDirectoryInterface/UserEqualityComparer.vb new file mode 100644 index 00000000..873e05cc --- /dev/null +++ b/Modules.Interfaces/ActiveDirectoryInterface/UserEqualityComparer.vb @@ -0,0 +1,19 @@ +Imports DigitalData.Modules.Interfaces + +Public Class UserEqualityComparer + Implements IEqualityComparer(Of ADUser) + + Public Overloads Function Equals(x As ADUser, y As ADUser) As Boolean Implements IEqualityComparer(Of ADUser).Equals + If ReferenceEquals(x, y) Then Return True + If x Is Nothing Or y Is Nothing Then Return False + + Return x.SId = y.SId + End Function + + Public Overloads Function GetHashCode(obj As ADUser) As Integer Implements IEqualityComparer(Of ADUser).GetHashCode + If obj Is Nothing Then Return 0 + + Dim oHashCode = obj.SId.GetHashCode() + Return oHashCode + End Function +End Class diff --git a/Modules.Interfaces/Interfaces.vbproj b/Modules.Interfaces/Interfaces.vbproj index 5da6ef29..153c34b7 100644 --- a/Modules.Interfaces/Interfaces.vbproj +++ b/Modules.Interfaces/Interfaces.vbproj @@ -51,6 +51,7 @@ + @@ -75,6 +76,8 @@ + + @@ -118,6 +121,10 @@ + + {EAF0EA75-5FA7-485D-89C7-B2D843B03A96} + Database + {903B2D7D-3B80-4BE9-8713-7447B704E1B0} Logging diff --git a/SERVICES/DDEDM_NetworkService/EDMService.vb b/SERVICES/DDEDM_NetworkService/EDMService.vb index 5e5f7157..24350966 100644 --- a/SERVICES/DDEDM_NetworkService/EDMService.vb +++ b/SERVICES/DDEDM_NetworkService/EDMService.vb @@ -146,7 +146,7 @@ Public Class EDMService Dim oExtension As String = Path.GetExtension(FileName).Substring(1) _logger.Debug("File extension of file {0} is {1}", FileName, oExtension) - Dim oSQL = $"SELECT FNICM_NEW_DOC('{FileName}','{oExtension}','{oContainerId}','{GetContainerName(oContainerId)}','{_username}') FROM RDB$DATABASE;" + Dim oSQL = $"SELECT FNICM_NEW_DOC('010', '{oContainerId}', '{GetContainerName(oContainerId)}', '{FileName}', '{oExtension}', '{_username}') FROM RDB$DATABASE;" Dim oDocId As Int64 = Database.GetScalarValue(oSQL) If oDocId = -1 Then diff --git a/ZUGFeRDTest/Form1.vb b/ZUGFeRDTest/Form1.vb index 982ac191..d1135a30 100644 --- a/ZUGFeRDTest/Form1.vb +++ b/ZUGFeRDTest/Form1.vb @@ -5,6 +5,7 @@ Imports System.Xml Imports DigitalData.Modules Imports DigitalData.Modules.Database Imports DigitalData.Modules.Interfaces +Imports DigitalData.Modules.Jobs Imports DigitalData.Modules.Jobs.ImportZUGFeRDFiles Imports DigitalData.Modules.Logging From a382b37d59b76788e3cd53f977e77ba58f61922f Mon Sep 17 00:00:00 2001 From: Jonathan Jenne Date: Fri, 5 Apr 2019 15:48:52 +0200 Subject: [PATCH 13/25] Add constructor to Config Manager which accepts only a userpath for ui settings which will be saved in Roaming --- Config/ConfigManager.vb | 22 ++++++++++++++++++++-- Config/My Project/AssemblyInfo.vb | 4 ++-- 2 files changed, 22 insertions(+), 4 deletions(-) diff --git a/Config/ConfigManager.vb b/Config/ConfigManager.vb index 0d97ca03..7faa0a6c 100644 --- a/Config/ConfigManager.vb +++ b/Config/ConfigManager.vb @@ -71,6 +71,24 @@ Public Class ConfigManager(Of T) _Config = LoadConfig() End Sub + ''' + ''' Creates a new instance of the ConfigManager. + ''' + ''' + ''' Public Class Config + ''' Public Property StringEntry As String = "TEST" + ''' Public Property BoolEntry As Boolean = True + ''' Public Property IntEntry As Integer = 123 + ''' End Class + ''' + ''' Dim oConfigManager = New ConfigManager(Of Config)(_LogConfig, Application.UserAppDataPath) + ''' + ''' LogConfig instance + ''' The path to check for a config file, eg. AppData + Public Sub New(LogConfig As LogConfig, ConfigPath As String) + MyClass.New(LogConfig, ConfigPath, ConfigPath) + End Sub + ''' ''' Save the current config object to `UserConfigPath` ''' @@ -87,11 +105,11 @@ Public Class ConfigManager(Of T) Private Function LoadConfig() As T Dim oConfig As T - If IO.File.Exists(_UserPath) Then + If File.Exists(_UserPath) Then _Logger.Debug("Loading config from UserPath: {0}", _UserPath) _CurrentDataPath = _UserPath oConfig = ReadFromFile(_UserPath) - ElseIf IO.File.Exists(_ComputerPath) Then + ElseIf File.Exists(_ComputerPath) Then _Logger.Debug("Loading config from ComputerPath: {0}", _ComputerPath) _CurrentDataPath = _ComputerPath oConfig = ReadFromFile(_ComputerPath) diff --git a/Config/My Project/AssemblyInfo.vb b/Config/My Project/AssemblyInfo.vb index e6f4faa3..e988c66c 100644 --- a/Config/My Project/AssemblyInfo.vb +++ b/Config/My Project/AssemblyInfo.vb @@ -12,7 +12,7 @@ Imports System.Runtime.InteropServices - + @@ -31,5 +31,5 @@ Imports System.Runtime.InteropServices ' übernehmen, indem Sie "*" eingeben: ' - + From caad7eda42272e8788b9e31b6ceaf79db0f3be17 Mon Sep 17 00:00:00 2001 From: Jonathan Jenne Date: Fri, 5 Apr 2019 15:50:20 +0200 Subject: [PATCH 14/25] use new configmanager in EDMI --- EDMI_ClientSuite/ApplicationEvents.vb | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) diff --git a/EDMI_ClientSuite/ApplicationEvents.vb b/EDMI_ClientSuite/ApplicationEvents.vb index a41151c6..4bd9c660 100644 --- a/EDMI_ClientSuite/ApplicationEvents.vb +++ b/EDMI_ClientSuite/ApplicationEvents.vb @@ -18,12 +18,14 @@ Namespace My Public Sub App_Startup() Handles Me.Startup Dim oLogConfig As New LogConfig(PathType.AppData) - ' Layout files will be saved in %Appdata% (Roaming) so they will be syncronized with the user profile - Dim oUIConfigPath = IO.Path.Combine(_BaseUserConfigPath, ClassConstants.FOLDER_NAME_LAYOUT) + ' System Config files like Service Url will be saved in %LocalAppdata% so they will remain on the machine + Dim oSystemConfigManager As New ConfigManager(Of ClassConfig)(oLogConfig, + Windows.Forms.Application.UserAppDataPath, + Windows.Forms.Application.CommonAppDataPath) - ' Set up config Managers for Layout and System Configs - Dim oSystemConfigManager As New ConfigManager(Of ClassConfig)(oLogConfig, _BaseUserConfigPath, _BaseMachineConfigPath) - Dim oUIConfigManager As New ConfigManager(Of ClassUIConfig)(oLogConfig, oUIConfigPath, oUIConfigPath) + ' Layout files will be saved in %Appdata% (Roaming) so they will be syncronized with the user profile + Dim oUIConfigPath = IO.Path.Combine(Windows.Forms.Application.UserAppDataPath, ClassConstants.FOLDER_NAME_LAYOUT) + Dim oUIConfigManager As New ConfigManager(Of ClassUIConfig)(oLogConfig, oUIConfigPath) LogConfig = oLogConfig SystemConfigManager = oSystemConfigManager From 720618f29b015ac3bcc14367dd1693c8a508bee1 Mon Sep 17 00:00:00 2001 From: Jonathan Jenne Date: Fri, 5 Apr 2019 15:51:42 +0200 Subject: [PATCH 15/25] Add MSSQL Functions to ZUGFeRD Service --- DDZUGFeRDService/App.config | 6 ++ .../My Project/Settings.Designer.vb | 18 +++++ DDZUGFeRDService/My Project/Settings.settings | 6 ++ DDZUGFeRDService/ThreadRunner.vb | 13 +++- DDZUGFeRDService/ZUGFeRDService.vb | 17 +++-- Jobs/EDMI/ZUGFeRD/ImportZUGFeRDFiles.vb | 16 ++++- Jobs/EDMI/ZUGFeRD/WorkerArgs.vb | 2 + Modules.Database/MSSQLServer.vb | 65 +++++++++---------- ZUGFeRDTest/Form1.Designer.vb | 12 ++++ ZUGFeRDTest/Form1.vb | 10 +++ 10 files changed, 122 insertions(+), 43 deletions(-) diff --git a/DDZUGFeRDService/App.config b/DDZUGFeRDService/App.config index 44d74781..c60c3482 100644 --- a/DDZUGFeRDService/App.config +++ b/DDZUGFeRDService/App.config @@ -31,6 +31,12 @@ 10 + + + + + False + \ No newline at end of file diff --git a/DDZUGFeRDService/My Project/Settings.Designer.vb b/DDZUGFeRDService/My Project/Settings.Designer.vb index 37e6b49b..66da4ee7 100644 --- a/DDZUGFeRDService/My Project/Settings.Designer.vb +++ b/DDZUGFeRDService/My Project/Settings.Designer.vb @@ -116,6 +116,24 @@ Namespace My Return CType(Me("JOB_INTERVAL"),Integer) End Get End Property + + _ + Public ReadOnly Property MSSQL_CONNECTIONSTRING() As String + Get + Return CType(Me("MSSQL_CONNECTIONSTRING"),String) + End Get + End Property + + _ + Public ReadOnly Property MSSQL_ENABLED() As Boolean + Get + Return CType(Me("MSSQL_ENABLED"),Boolean) + End Get + End Property End Class End Namespace diff --git a/DDZUGFeRDService/My Project/Settings.settings b/DDZUGFeRDService/My Project/Settings.settings index f340b8c1..05b0c648 100644 --- a/DDZUGFeRDService/My Project/Settings.settings +++ b/DDZUGFeRDService/My Project/Settings.settings @@ -23,5 +23,11 @@ 10 + + + + + False + \ No newline at end of file diff --git a/DDZUGFeRDService/ThreadRunner.vb b/DDZUGFeRDService/ThreadRunner.vb index 4e8db193..3d2601b4 100644 --- a/DDZUGFeRDService/ThreadRunner.vb +++ b/DDZUGFeRDService/ThreadRunner.vb @@ -22,18 +22,27 @@ Public Class ThreadRunner Private _originalEmailDirectory As String Private _zugferd As ZUGFeRDInterface Private _jobArguments As WorkerArgs + Private _mssql As MSSQLServer Private Const TIMER_INTERVAL_MS = 10_000 - Public Sub New(LogConfig As LogConfig, Firebird As Firebird) + Public Sub New(LogConfig As LogConfig, Firebird As Firebird, Optional MSSQL As MSSQLServer = Nothing) _logConfig = LogConfig _logger = _logConfig.GetLogger() _firebird = Firebird _zugferd = New ZUGFeRDInterface(_logConfig) + _mssql = MSSQL Dim args As New WorkerArgs() args = LoadFolderConfig(args) args = LoadPropertyMapFor(args, "DEFAULT") + + ' Use MSSQL Server if available + If _mssql IsNot Nothing Then + _logger.Debug("Data will be inserted into MSSQL Server.") + args.InsertIntoSQLServer = True + End If + _jobArguments = args _logger.Debug("Checking SuccessDirectory {0}", args.SuccessDirectory) @@ -104,7 +113,7 @@ Public Class ThreadRunner _logger.Debug("Background worker running..") - Dim job As New ImportZUGFeRDFiles(_logConfig, _firebird) + Dim job As New ImportZUGFeRDFiles(_logConfig, _firebird, _mssql) job.Start(args) Catch ex As Exception _logger.Warn("Background worker failed!") diff --git a/DDZUGFeRDService/ZUGFeRDService.vb b/DDZUGFeRDService/ZUGFeRDService.vb index ab68a822..eb7070ca 100644 --- a/DDZUGFeRDService/ZUGFeRDService.vb +++ b/DDZUGFeRDService/ZUGFeRDService.vb @@ -7,6 +7,7 @@ Public Class ZUGFeRDService Private _logConfig As LogConfig Private _logger As Logger Private _firebird As Firebird + Private _mssql As MSSQLServer = Nothing Private _threadRunner As ThreadRunner @@ -21,14 +22,22 @@ Public Class ZUGFeRDService Dim oUser As String = My.Settings.DB_USER Dim oPassword As String = My.Settings.DB_PASSWORD Dim oJobInterval As Integer = My.Settings.JOB_INTERVAL - - _logger.Debug("Datasource: {0}", oDataSource) - _logger.Debug("Database: {0}", oDatabase) + Dim oMSSQLConnectionString As String = My.Settings.MSSQL_CONNECTIONSTRING + Dim oMSSQLEnabled As Boolean = My.Settings.MSSQL_ENABLED _firebird = New Firebird(_logConfig, oDataSource, oDatabase, oUser, oPassword) + If oMSSQLEnabled = True Then + _mssql = New MSSQLServer(_logConfig, oMSSQLConnectionString) + + If _mssql.DBInitialized = False Then + _logger.Warn("MSSQL Connection could not be initialized. Disabling MSSQL.") + _mssql = Nothing + End If + End If + Try - _threadRunner = New ThreadRunner(_logConfig, _firebird) + _threadRunner = New ThreadRunner(_logConfig, _firebird, _mssql) _threadRunner.Start(oJobInterval) Catch ex As Exception _logger.Error(ex) diff --git a/Jobs/EDMI/ZUGFeRD/ImportZUGFeRDFiles.vb b/Jobs/EDMI/ZUGFeRD/ImportZUGFeRDFiles.vb index a4e36fbe..554a9523 100644 --- a/Jobs/EDMI/ZUGFeRD/ImportZUGFeRDFiles.vb +++ b/Jobs/EDMI/ZUGFeRD/ImportZUGFeRDFiles.vb @@ -24,13 +24,15 @@ Public Class ImportZUGFeRDFiles Private _zugferd As ZUGFeRDInterface Private _firebird As Firebird Private _filesystem As Filesystem.File + Private _mssql As MSSQLServer - Public Sub New(LogConfig As LogConfig, Firebird As Firebird) + Public Sub New(LogConfig As LogConfig, Firebird As Firebird, Optional MSSQL As MSSQLServer = Nothing) _logConfig = LogConfig _logger = LogConfig.GetLogger() _firebird = Firebird _filesystem = New Filesystem.File(_logConfig) _zugferd = New ZUGFeRDInterface(_logConfig) + _mssql = MSSQL End Sub Private Function RandomValue(lowerBound As Integer, upperBound As Integer) As Integer @@ -182,7 +184,7 @@ Public Class ImportZUGFeRDFiles Public Sub Start(Arguments As Object) Implements IJob.Start Dim args As WorkerArgs = Arguments - _logger.Info("Starting Job {0}", Me.GetType.Name) + _logger.Info("Starting Job {0}", [GetType].Name) Try For Each oPath As String In args.WatchDirectories @@ -276,9 +278,17 @@ Public Class ImportZUGFeRDFiles Dim oTableName = Item.Value.TableName Dim oCommand = $"INSERT INTO {oTableName} (REFERENCE_GUID, ITEM_DESCRIPTION, ITEM_VALUE) VALUES ('{oFileGroupId}', '{propertyDescripton}', '{propertyValue}')" - _logger.Debug("Mapping Property {0} to value {1}. Will be inserted into table {2}", propertyDescripton, propertyValue, oTableName) + ' Insert into SQL Server + If args.InsertIntoSQLServer = True Then + Dim oResult = _mssql.NewExecutenonQuery(oCommand) + If oResult = False Then + _logger.Warn("SQL Command was not successful. Check the log.") + End If + End If + + ' Insert into Firebird _firebird.ExecuteNonQueryWithConnection(oCommand, oConnection, Firebird.TransactionMode.ExternalTransaction, oTransaction) Next diff --git a/Jobs/EDMI/ZUGFeRD/WorkerArgs.vb b/Jobs/EDMI/ZUGFeRD/WorkerArgs.vb index 5b9d4393..68c39324 100644 --- a/Jobs/EDMI/ZUGFeRD/WorkerArgs.vb +++ b/Jobs/EDMI/ZUGFeRD/WorkerArgs.vb @@ -7,6 +7,7 @@ Public Class WorkerArgs Public OriginalEmailDirectory As String Public RejectedEmailDirectory As String Public PropertyMap As Dictionary(Of String, XmlItemProperty) + Public InsertIntoSQLServer As Boolean Public Sub New() WatchDirectories = New List(Of String) @@ -15,5 +16,6 @@ Public Class WorkerArgs OriginalEmailDirectory = Nothing RejectedEmailDirectory = Nothing PropertyMap = New Dictionary(Of String, XmlItemProperty) + InsertIntoSQLServer = False End Sub End Class \ No newline at end of file diff --git a/Modules.Database/MSSQLServer.vb b/Modules.Database/MSSQLServer.vb index 45437826..cf1b1fbc 100644 --- a/Modules.Database/MSSQLServer.vb +++ b/Modules.Database/MSSQLServer.vb @@ -1,29 +1,27 @@ Imports System.Data.SqlClient +Imports DigitalData.Modules.Logging Public Class MSSQLServer - Private Shared Logger As NLog.Logger = NLog.LogManager.GetCurrentClassLogger Public DBInitialized As Boolean = False Public CurrentSQLConnectionString As String = "" - Private CurrentSQLConnection As SqlClient.SqlConnection - Public Sub New(CONSTRING As String) - Init(CONSTRING) - End Sub - Public Function Init(CONSTRING As String) + Private CurrentSQLConnection As SqlConnection + Private _Logger As Logger + + Public Sub New(LogConfig As LogConfig, ConnectionString As String) + _Logger = LogConfig.GetLogger() + Try - Dim oSQLconnect As New SqlClient.SqlConnection - oSQLconnect.ConnectionString = CONSTRING + Dim oSQLconnect As New SqlConnection + oSQLconnect.ConnectionString = ConnectionString oSQLconnect.Open() oSQLconnect.Close() - CurrentSQLConnectionString = CONSTRING + CurrentSQLConnectionString = ConnectionString DBInitialized = True - Return True Catch ex As Exception DBInitialized = False - Logger.Error(ex) - 'clsLogger.Add("Error in DatabaseInit: " & ex.Message, True) - Return False + _Logger.Error(ex) End Try - End Function + End Sub Private Function GetSQLConnection() Try @@ -32,22 +30,21 @@ Public Class MSSQLServer oSQLconnect.ConnectionString = CurrentSQLConnectionString CurrentSQLConnection = oSQLconnect CurrentSQLConnection.Open() - Else If CurrentSQLConnection.State <> ConnectionState.Open Then - Logger.Warn($"Actual ConnectionState is: '{CurrentSQLConnection.State.ToString}'") + _Logger.Warn($"Actual ConnectionState is: '{CurrentSQLConnection.State.ToString}'") Try CurrentSQLConnection.Open() Return True Catch ex As Exception - Logger.Warn("Could not reconnect to database!") + _Logger.Warn("Could not reconnect to database!") Return False End Try End If End If Return True Catch ex As Exception - Logger.Error(ex) + _Logger.Error(ex) Return False End Try End Function @@ -65,18 +62,18 @@ Public Class MSSQLServer Return Nothing End If - Dim oSQLCOmmand As SqlClient.SqlCommand + Dim oSQLCOmmand As SqlCommand oSQLCOmmand = CurrentSQLConnection.CreateCommand() oSQLCOmmand.CommandText = sqlcommand oSQLCOmmand.CommandTimeout = commandtimeout - Dim adapter1 As SqlClient.SqlDataAdapter = New SqlClient.SqlDataAdapter(oSQLCOmmand) + Dim adapter1 As SqlDataAdapter = New SqlDataAdapter(oSQLCOmmand) adapter1.Fill(dt) Return dt Catch ex As Exception - Logger.Error(ex) - Logger.Debug("sqlcommand: " & sqlcommand) + _Logger.Error(ex) + _Logger.Debug("sqlcommand: " & sqlcommand) Return Nothing End Try End Function @@ -93,7 +90,7 @@ Public Class MSSQLServer Return Nothing End If 'Dim oSQLconnect As New SqlClient.SqlConnection - Dim oSQLCOmmand As SqlClient.SqlCommand + Dim oSQLCOmmand As SqlCommand oSQLCOmmand = CurrentSQLConnection.CreateCommand() oSQLCOmmand.CommandText = executeStatement @@ -102,8 +99,8 @@ Public Class MSSQLServer oSQLCOmmand.Dispose() Return True Catch ex As Exception - Logger.Error(ex) - Logger.Debug("executeStatement: " & executeStatement) + _Logger.Error(ex) + _Logger.Debug("executeStatement: " & executeStatement) Return False End Try End Function @@ -118,8 +115,8 @@ Public Class MSSQLServer Exit Sub End If - Dim oSQLCOmmand As SqlClient.SqlCommand - Dim callback As New AsyncCallback(AddressOf Execute_non_Query_Async_Callback) + Dim oSQLCOmmand As SqlCommand + Dim callback As New AsyncCallback(AddressOf NewExecuteNonQueryAsync_Callback) Try oSQLCOmmand = CurrentSQLConnection.CreateCommand() oSQLCOmmand.CommandText = executeStatement @@ -127,15 +124,15 @@ Public Class MSSQLServer oSQLCOmmand.BeginExecuteNonQuery(callback, oSQLCOmmand) oSQLCOmmand.Dispose() Catch ex As Exception - Logger.Error(ex) - Logger.Debug("executeStatement: " & executeStatement) + _Logger.Error(ex) + _Logger.Debug("executeStatement: " & executeStatement) End Try End Sub - Private Sub Execute_non_Query_Async_Callback(ByVal result As IAsyncResult) - Dim command As SqlClient.SqlCommand = CType(result.AsyncState, SqlClient.SqlCommand) + Private Sub NewExecuteNonQueryAsync_Callback(ByVal result As IAsyncResult) + Dim command As SqlCommand = CType(result.AsyncState, SqlCommand) Dim res = command.EndExecuteNonQuery(result) - Logger.Info(String.Format("Finished executing Async database operation: {0}", command.CommandText)) + _Logger.Info(String.Format("Finished executing Async database operation: {0}", command.CommandText)) End Sub ''' ''' Executes the passed sql-statement as Scalar @@ -159,8 +156,8 @@ Public Class MSSQLServer oSQLCOmmand.Dispose() Return result Catch ex As Exception - Logger.Error(ex) - Logger.Debug("executeStatement: " & executeStatement) + _Logger.Error(ex) + _Logger.Debug("executeStatement: " & executeStatement) Return Nothing End Try End Function diff --git a/ZUGFeRDTest/Form1.Designer.vb b/ZUGFeRDTest/Form1.Designer.vb index 83a12ffd..cdfa5cd6 100644 --- a/ZUGFeRDTest/Form1.Designer.vb +++ b/ZUGFeRDTest/Form1.Designer.vb @@ -26,6 +26,7 @@ Partial Class Form1 Me.Button1 = New System.Windows.Forms.Button() Me.ListBox1 = New System.Windows.Forms.ListBox() Me.Button2 = New System.Windows.Forms.Button() + Me.Button3 = New System.Windows.Forms.Button() Me.SuspendLayout() ' 'OpenFileDialog1 @@ -58,11 +59,21 @@ Partial Class Form1 Me.Button2.Text = "Validate Single File" Me.Button2.UseVisualStyleBackColor = True ' + 'Button3 + ' + Me.Button3.Location = New System.Drawing.Point(12, 70) + Me.Button3.Name = "Button3" + Me.Button3.Size = New System.Drawing.Size(221, 23) + Me.Button3.TabIndex = 3 + Me.Button3.Text = "Load Single File" + Me.Button3.UseVisualStyleBackColor = True + ' 'Form1 ' Me.AutoScaleDimensions = New System.Drawing.SizeF(6.0!, 13.0!) Me.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font Me.ClientSize = New System.Drawing.Size(916, 435) + Me.Controls.Add(Me.Button3) Me.Controls.Add(Me.Button2) Me.Controls.Add(Me.ListBox1) Me.Controls.Add(Me.Button1) @@ -76,4 +87,5 @@ Partial Class Form1 Friend WithEvents Button1 As Button Friend WithEvents ListBox1 As ListBox Friend WithEvents Button2 As Button + Friend WithEvents Button3 As Button End Class diff --git a/ZUGFeRDTest/Form1.vb b/ZUGFeRDTest/Form1.vb index d1135a30..14df4684 100644 --- a/ZUGFeRDTest/Form1.vb +++ b/ZUGFeRDTest/Form1.vb @@ -90,4 +90,14 @@ Public Class Form1 _zugferd.ValidateZUGFeRDFile(OpenFileDialog1.FileName) End If End Sub + + Private Sub Button3_Click(sender As Object, e As EventArgs) Handles Button3.Click + Dim oResult = OpenFileDialog1.ShowDialog() + + If oResult = DialogResult.OK Then + Dim oDoc = _zugferd.ValidateZUGFeRDFile(OpenFileDialog1.FileName) + Dim oZUGFERD = _zugferd.SerializeZUGFeRDDocument(oDoc) + Console.WriteLine() + End If + End Sub End Class From 2855cc6208ddf87f49e6f726e7cb7f3d0d8f04c1 Mon Sep 17 00:00:00 2001 From: Jonathan Jenne Date: Wed, 10 Apr 2019 11:43:15 +0200 Subject: [PATCH 16/25] work on jobrunner --- JobRunner/App.config | 9 +++-- JobRunner/JobRunner.vb | 13 +++++-- JobRunner/JobRunner.vbproj | 7 ---- JobRunner/My Project/Settings.Designer.vb | 27 ++++++++++----- JobRunner/My Project/Settings.settings | 9 +++-- JobRunner/WindowsService.vb | 1 + Jobs/EDMI/ADSync/ADSyncArgs.vb | 2 ++ Jobs/EDMI/ADSync/ADSyncJob.vb | 25 +++++++++++++- Jobs/JobArgs.vb | 4 +++ Jobs/JobBase.vb | 14 ++++++++ Jobs/{IJob.vb => JobInterface.vb} | 2 ++ Jobs/Jobs.vbproj | 4 ++- Modules.Database/Firebird.vb | 6 ++-- .../ActiveDirectoryInterface.vb | 34 +++++-------------- 14 files changed, 103 insertions(+), 54 deletions(-) create mode 100644 Jobs/JobArgs.vb create mode 100644 Jobs/JobBase.vb rename Jobs/{IJob.vb => JobInterface.vb} (73%) diff --git a/JobRunner/App.config b/JobRunner/App.config index f6c972d9..584c1495 100644 --- a/JobRunner/App.config +++ b/JobRunner/App.config @@ -19,9 +19,6 @@ False - - 1,2,3,4,5,6,7,8,9,10 - @@ -37,6 +34,12 @@ 120 + + 120 + + + + \ No newline at end of file diff --git a/JobRunner/JobRunner.vb b/JobRunner/JobRunner.vb index e6c7a376..0b079680 100644 --- a/JobRunner/JobRunner.vb +++ b/JobRunner/JobRunner.vb @@ -60,8 +60,17 @@ Public Class JobRunner _logger.Debug("Background worker running..") ' TODO: WORK - 'Dim job As New ImportZUGFeRDFiles(_logConfig, _firebird) - 'job.Start(args) + + Dim oJob As New ADSyncJob(_logConfig, _firebird) + Dim oArgs As New ADSyncArgs() With { + .Enabled = My.Settings.JOB_ADSYNC_ENABLED, + .Interval = My.Settings.JOB_ADSYNC_INTERVAL, + .RootPath = My.Settings.JOB_ADSYNC_ROOT_PATH + } + If oJob.ShouldStart(oArgs) Then + oJob.Start(oArgs) + End If + Catch ex As Exception _logger.Warn("Background worker failed!") _logger.Error(ex) diff --git a/JobRunner/JobRunner.vbproj b/JobRunner/JobRunner.vbproj index 6a0e0ea7..37a3ec1f 100644 --- a/JobRunner/JobRunner.vbproj +++ b/JobRunner/JobRunner.vbproj @@ -47,13 +47,6 @@ On - - - - - - ..\LookupGrid\obj\Debug\DigitalData.Controls.LookupGrid.dll - ..\packages\NLog.4.5.11\lib\net45\NLog.dll diff --git a/JobRunner/My Project/Settings.Designer.vb b/JobRunner/My Project/Settings.Designer.vb index 501da1af..a28f946b 100644 --- a/JobRunner/My Project/Settings.Designer.vb +++ b/JobRunner/My Project/Settings.Designer.vb @@ -81,15 +81,6 @@ Namespace My End Get End Property - _ - Public ReadOnly Property JOB_ADSYNC_INTERVAL() As String - Get - Return CType(Me("JOB_ADSYNC_INTERVAL"),String) - End Get - End Property - _ @@ -134,6 +125,24 @@ Namespace My Return CType(Me("JOB_INTERVAL"),Long) End Get End Property + + _ + Public ReadOnly Property JOB_ADSYNC_INTERVAL() As Long + Get + Return CType(Me("JOB_ADSYNC_INTERVAL"),Long) + End Get + End Property + + _ + Public ReadOnly Property JOB_ADSYNC_ROOT_PATH() As String + Get + Return CType(Me("JOB_ADSYNC_ROOT_PATH"),String) + End Get + End Property End Class End Namespace diff --git a/JobRunner/My Project/Settings.settings b/JobRunner/My Project/Settings.settings index ccd102fc..3281b731 100644 --- a/JobRunner/My Project/Settings.settings +++ b/JobRunner/My Project/Settings.settings @@ -11,9 +11,6 @@ False - - 1,2,3,4,5,6,7,8,9,10 - @@ -29,5 +26,11 @@ 120 + + 120 + + + + \ No newline at end of file diff --git a/JobRunner/WindowsService.vb b/JobRunner/WindowsService.vb index 166892c5..cfca9dfa 100644 --- a/JobRunner/WindowsService.vb +++ b/JobRunner/WindowsService.vb @@ -33,6 +33,7 @@ Public Class WindowsService End Sub Protected Overrides Sub OnStop() + _jobRunner.Stop() _logger.Info($"{My.Settings.SERVICE_NAME} is stopping.") End Sub End Class diff --git a/Jobs/EDMI/ADSync/ADSyncArgs.vb b/Jobs/EDMI/ADSync/ADSyncArgs.vb index 27845e36..1e64916b 100644 --- a/Jobs/EDMI/ADSync/ADSyncArgs.vb +++ b/Jobs/EDMI/ADSync/ADSyncArgs.vb @@ -1,3 +1,5 @@ Public Class ADSyncArgs + Inherits JobArgs + Public RootPath As String End Class diff --git a/Jobs/EDMI/ADSync/ADSyncJob.vb b/Jobs/EDMI/ADSync/ADSyncJob.vb index fba9ad50..b0fc49a3 100644 --- a/Jobs/EDMI/ADSync/ADSyncJob.vb +++ b/Jobs/EDMI/ADSync/ADSyncJob.vb @@ -1,9 +1,32 @@ -Imports DigitalData.Modules.Jobs +Imports DigitalData.Modules.Database +Imports DigitalData.Modules.Interfaces +Imports DigitalData.Modules.Jobs +Imports DigitalData.Modules.Logging Public Class ADSyncJob + Inherits JobBase Implements IJob(Of ADSyncArgs) + Private _ADSync As ActiveDirectoryInterface + + Public Sub New(LogConfig As LogConfig, Firebird As Firebird) + MyBase.New(LogConfig, Firebird) + End Sub + Public Sub Start(Arguments As ADSyncArgs) Implements IJob(Of ADSyncArgs).Start + _ADSync = New ActiveDirectoryInterface(_LogConfig, _Firebird, Arguments.RootPath) + + 'TODO: Do AD Sync! + + If _ADSync.Authenticate() = False Then + _Logger.Warn("Job could not be completed! Authentication failed!") + Exit Sub + End If + End Sub + + Public Function ShouldStart(Arguments As ADSyncArgs) As Boolean Implements IJob(Of ADSyncArgs).ShouldStart + Return Arguments.Enabled + End Function End Class diff --git a/Jobs/JobArgs.vb b/Jobs/JobArgs.vb new file mode 100644 index 00000000..43156ec6 --- /dev/null +++ b/Jobs/JobArgs.vb @@ -0,0 +1,4 @@ +Public Class JobArgs + Public Enabled As Boolean + Public Interval As Long +End Class diff --git a/Jobs/JobBase.vb b/Jobs/JobBase.vb new file mode 100644 index 00000000..03a77ca6 --- /dev/null +++ b/Jobs/JobBase.vb @@ -0,0 +1,14 @@ +Imports DigitalData.Modules.Database +Imports DigitalData.Modules.Logging + +Public Class JobBase + Protected _LogConfig As LogConfig + Protected _Logger As Logger + Protected _Firebird As Firebird + + Public Sub New(LogConfig As LogConfig, Firebird As Firebird) + _LogConfig = LogConfig + _Logger = LogConfig.GetLogger() + _Firebird = Firebird + End Sub +End Class diff --git a/Jobs/IJob.vb b/Jobs/JobInterface.vb similarity index 73% rename from Jobs/IJob.vb rename to Jobs/JobInterface.vb index 6cd3f6dc..edd8a83a 100644 --- a/Jobs/IJob.vb +++ b/Jobs/JobInterface.vb @@ -4,4 +4,6 @@ End Interface Public Interface IJob(Of T) Sub Start(Arguments As T) + + Function ShouldStart(Arguments As T) As Boolean End Interface diff --git a/Jobs/Jobs.vbproj b/Jobs/Jobs.vbproj index fc678fc3..2ac0fe84 100644 --- a/Jobs/Jobs.vbproj +++ b/Jobs/Jobs.vbproj @@ -90,7 +90,9 @@ - + + + True diff --git a/Modules.Database/Firebird.vb b/Modules.Database/Firebird.vb index 0d9ffffe..75ddb44d 100644 --- a/Modules.Database/Firebird.vb +++ b/Modules.Database/Firebird.vb @@ -147,7 +147,7 @@ Public Class Firebird }.ToString() End Function - Private Function MaybeGetTransaction(Connection As FbConnection, Mode As TransactionMode, Transaction As FbTransaction) + Private Function MaybeGetTransaction(Connection As FbConnection, Mode As TransactionMode, Transaction As FbTransaction) As FbTransaction If Mode = TransactionMode.NoTransaction Then Return Nothing ElseIf Mode = TransactionMode.ExternalTransaction Then @@ -157,7 +157,7 @@ Public Class Firebird End If End Function - Private Function MaybeCommitTransaction(Transaction As FbTransaction, TransactionMode As TransactionMode) + Private Function MaybeCommitTransaction(Transaction As FbTransaction, TransactionMode As TransactionMode) As Boolean Select Case TransactionMode Case TransactionMode.NoTransaction Return True @@ -168,7 +168,7 @@ Public Class Firebird Transaction.Commit() Return True Catch ex As Exception - _logger.Error(ex) + _Logger.Error(ex) Return False End Try Case Else diff --git a/Modules.Interfaces/ActiveDirectoryInterface.vb b/Modules.Interfaces/ActiveDirectoryInterface.vb index b9549f4a..a9c40555 100644 --- a/Modules.Interfaces/ActiveDirectoryInterface.vb +++ b/Modules.Interfaces/ActiveDirectoryInterface.vb @@ -112,29 +112,32 @@ Public Class ActiveDirectoryInterface Return oSyncedUsers End Function - - Public Sub Authenticate() + Public Function Authenticate() As Boolean Try Dim oEntry = GetRootNode() oEntry.RefreshCache() _rootNode = oEntry + Return True Catch ex As Exception _logger.Error(ex) _logger.Warn("Could not authenticate with Active Directory.") + Return False End Try - End Sub - Public Sub Authenticate(Username As String, Password As String) + End Function + Public Function Authenticate(Username As String, Password As String) As Boolean Try Dim oEntry = GetRootNode(Username, Password) oEntry.RefreshCache() _rootNode = oEntry + Return True Catch ex As Exception _logger.Error(ex) _logger.Warn("Could not authenticate with Active Directory.") + Return False End Try - End Sub + End Function Public Function ListGroups(Optional Query As String = "(&(objectClass=group) (samAccountName=*))") As List(Of ADGroup) Return ListGroups(_rootNode, Query) @@ -196,27 +199,8 @@ Public Class ActiveDirectoryInterface Throw ex End Try End Function - Public Function ListUsers(GroupNames As List(Of String)) As List(Of ADUser) - Try - Dim oUsers As New List(Of ADUser) - Dim oComparer As New UserEqualityComparer() - - For Each oGroup In GroupNames - Dim oGroupUsers = ListUsers(oGroup) - Dim oNewUsers = oGroupUsers. - Except(oUsers, oComparer). - ToList() - oUsers.AddRange(oNewUsers) - Next - - Return oUsers - Catch ex As Exception - _logger.Error(ex) - Throw ex - End Try - End Function - Public Function GetGroupId(GroupName As String) As Integer + Private Function GetGroupId(GroupName As String) As Integer Try Dim oSQL As String = $"SELECT FNICM_GET_RECORD4SYSKEY('{GroupName}','002-NAME') from RDB$DATABASE" Dim oGroupId = _firebird.GetScalarValue(oSQL) From dee5d33bb974cbd92d62503d0b2776bb1a184a44 Mon Sep 17 00:00:00 2001 From: Jonathan Jenne Date: Wed, 10 Apr 2019 11:58:17 +0200 Subject: [PATCH 17/25] first pass of jobrunner with adsync --- Jobs/EDMI/ADSync/ADSyncJob.vb | 30 ++++++++++++++----- .../ActiveDirectoryInterface.vb | 1 - 2 files changed, 23 insertions(+), 8 deletions(-) diff --git a/Jobs/EDMI/ADSync/ADSyncJob.vb b/Jobs/EDMI/ADSync/ADSyncJob.vb index b0fc49a3..7dc9857a 100644 --- a/Jobs/EDMI/ADSync/ADSyncJob.vb +++ b/Jobs/EDMI/ADSync/ADSyncJob.vb @@ -1,4 +1,5 @@ -Imports DigitalData.Modules.Database +Imports System.Collections.Generic +Imports DigitalData.Modules.Database Imports DigitalData.Modules.Interfaces Imports DigitalData.Modules.Jobs Imports DigitalData.Modules.Logging @@ -7,23 +8,38 @@ Public Class ADSyncJob Inherits JobBase Implements IJob(Of ADSyncArgs) - Private _ADSync As ActiveDirectoryInterface - Public Sub New(LogConfig As LogConfig, Firebird As Firebird) MyBase.New(LogConfig, Firebird) End Sub Public Sub Start(Arguments As ADSyncArgs) Implements IJob(Of ADSyncArgs).Start - _ADSync = New ActiveDirectoryInterface(_LogConfig, _Firebird, Arguments.RootPath) + Dim oSync = New ActiveDirectoryInterface(_LogConfig, _Firebird, Arguments.RootPath) + Dim oJobName As String = [GetType]().Name - 'TODO: Do AD Sync! + _Logger.Info("Running job {0}", oJobName) - If _ADSync.Authenticate() = False Then - _Logger.Warn("Job could not be completed! Authentication failed!") + If oSync.Authenticate() = False Then + _Logger.Warn("Job {0} could not be completed! Authentication failed!", oJobName) Exit Sub End If + Dim oGroups As List(Of ADGroup) = oSync.ListGroups() + + _Logger.Debug("Found {0} Groups", oGroups.Count) + + For Each oGroup In oGroups + _Logger.Debug("Syncing Group {0}", oGroup.Name) + Dim oSyncedUsers = oSync.SyncUsersForGroup(oGroup.Name) + + If oSyncedUsers Is Nothing Then + _Logger.Warn("Group {0} could not be synced!", oGroup) + Else + _Logger.Debug("Group {0} synced", oGroup) + _Logger.Debug("Synced {0} users", oSyncedUsers.Count) + End If + Next + _Logger.Info("Job {0} completed!", oJobName) End Sub Public Function ShouldStart(Arguments As ADSyncArgs) As Boolean Implements IJob(Of ADSyncArgs).ShouldStart diff --git a/Modules.Interfaces/ActiveDirectoryInterface.vb b/Modules.Interfaces/ActiveDirectoryInterface.vb index a9c40555..09ceae2b 100644 --- a/Modules.Interfaces/ActiveDirectoryInterface.vb +++ b/Modules.Interfaces/ActiveDirectoryInterface.vb @@ -56,7 +56,6 @@ Public Class ActiveDirectoryInterface _logger.Debug("Getting group Id for group {0}", GroupName) oGroupId = GetGroupId(GroupName) - If oGroupId = 0 Then _logger.Warn("Group {0} does not exist in database. Exiting", GroupName) Return Nothing From 696a8ddbf64f92b6f3606bf637fd8387f5f25512 Mon Sep 17 00:00:00 2001 From: Jonathan Jenne Date: Wed, 10 Apr 2019 16:15:00 +0200 Subject: [PATCH 18/25] general clean up, add file contents to getdocumentbyx methods --- JobRunner/JobRunner.vb | 50 ++++--- Jobs/App.config | 9 +- Jobs/EDMI/ZUGFeRD/ImportZUGFeRDFiles.vb | 1 - Jobs/Jobs.vbproj | 4 +- Jobs/packages.config | 1 + Message/Email.vb | 136 +++++++++++++++++- Message/Messaging.vbproj | 3 + Message/packages.config | 1 + Modules.Database/Firebird.vb | 15 +- SERVICES/DDEDM_NetworkService/EDMService.vb | 16 ++- SERVICES/DDEDM_NetworkService/IEDMService.vb | 2 + .../Results/BaseResult.vb | 2 +- 12 files changed, 196 insertions(+), 44 deletions(-) diff --git a/JobRunner/JobRunner.vb b/JobRunner/JobRunner.vb index 0b079680..0d94aefb 100644 --- a/JobRunner/JobRunner.vb +++ b/JobRunner/JobRunner.vb @@ -8,10 +8,10 @@ Public Class JobRunner Private WithEvents _workerThread As BackgroundWorker Private WithEvents _workerTimer As Timer - Private _interval As Long - Private _logConfig As LogConfig - Private _logger As Logger - Private _firebird As Firebird + Private ReadOnly _interval As Long + Private ReadOnly _logConfig As LogConfig + Private ReadOnly _logger As Logger + Private ReadOnly _firebird As Firebird Public Sub New(LogConfig As LogConfig, Firebird As Firebird, Interval As Long) _logConfig = LogConfig @@ -21,7 +21,7 @@ Public Class JobRunner _workerTimer = New Timer() _workerThread = New BackgroundWorker() With { - .WorkerReportsProgress = False, + .WorkerReportsProgress = True, .WorkerSupportsCancellation = True } End Sub @@ -34,6 +34,7 @@ Public Class JobRunner Public Sub [Stop]() Try + _logger.Debug("Stopping Background worker...") If _workerThread.IsBusy Then _workerThread.CancelAsync() _logger.Debug("Background Worker cancelled.") @@ -49,35 +50,32 @@ Public Class JobRunner If Not _workerThread.IsBusy Then _workerThread.RunWorkerAsync() Else - _logger.Warn("Background Worker is busy") + _logger.Warn("Background Worker is busy. Waiting for next interval.") End If End Sub Private Sub DoWork(sender As Object, e As DoWorkEventArgs) Handles _workerThread.DoWork - Try - Dim args As WorkerArgs = e.Argument - - _logger.Debug("Background worker running..") + _logger.Debug("Background worker running..") - ' TODO: WORK - - Dim oJob As New ADSyncJob(_logConfig, _firebird) - Dim oArgs As New ADSyncArgs() With { - .Enabled = My.Settings.JOB_ADSYNC_ENABLED, - .Interval = My.Settings.JOB_ADSYNC_INTERVAL, - .RootPath = My.Settings.JOB_ADSYNC_ROOT_PATH - } - If oJob.ShouldStart(oArgs) Then - oJob.Start(oArgs) - End If + Dim args As WorkerArgs = e.Argument + Dim oJob As New ADSyncJob(_logConfig, _firebird) + Dim oArgs As New ADSyncArgs() With { + .Enabled = My.Settings.JOB_ADSYNC_ENABLED, + .Interval = My.Settings.JOB_ADSYNC_INTERVAL, + .RootPath = My.Settings.JOB_ADSYNC_ROOT_PATH + } - Catch ex As Exception - _logger.Warn("Background worker failed!") - _logger.Error(ex) - End Try + If oJob.ShouldStart(oArgs) Then + oJob.Start(oArgs) + End If End Sub Private Sub WorkCompleted(sender As Object, e As RunWorkerCompletedEventArgs) Handles _workerThread.RunWorkerCompleted - _logger.Debug("Background worker completed!") + If e.Error Is Nothing Then + _logger.Debug("Background worker completed!") + Else + _logger.Warn("Background worker failed!") + _logger.Error(e.Error) + End If End Sub End Class diff --git a/Jobs/App.config b/Jobs/App.config index 731f6de6..e2bb1a7e 100644 --- a/Jobs/App.config +++ b/Jobs/App.config @@ -1,6 +1,11 @@ - + - \ No newline at end of file + + + + + + \ No newline at end of file diff --git a/Jobs/EDMI/ZUGFeRD/ImportZUGFeRDFiles.vb b/Jobs/EDMI/ZUGFeRD/ImportZUGFeRDFiles.vb index 554a9523..8f8110e8 100644 --- a/Jobs/EDMI/ZUGFeRD/ImportZUGFeRDFiles.vb +++ b/Jobs/EDMI/ZUGFeRD/ImportZUGFeRDFiles.vb @@ -5,7 +5,6 @@ Imports System.Linq Imports System.Text.RegularExpressions Imports DigitalData.Modules.Database Imports DigitalData.Modules.Interfaces -Imports DigitalData.Modules.Jobs Imports DigitalData.Modules.Jobs.Exceptions Imports DigitalData.Modules.Logging Imports FirebirdSql.Data.FirebirdClient diff --git a/Jobs/Jobs.vbproj b/Jobs/Jobs.vbproj index 2ac0fe84..59acde28 100644 --- a/Jobs/Jobs.vbproj +++ b/Jobs/Jobs.vbproj @@ -101,7 +101,9 @@ - + + ..\packages\FirebirdSql.Data.FirebirdClient.6.4.0\lib\net452\FirebirdSql.Data.FirebirdClient.dll + ..\packages\NLog.4.5.11\lib\net45\NLog.dll diff --git a/Jobs/packages.config b/Jobs/packages.config index f89fa324..9204b8da 100644 --- a/Jobs/packages.config +++ b/Jobs/packages.config @@ -1,4 +1,5 @@  + \ No newline at end of file diff --git a/Message/Email.vb b/Message/Email.vb index 767a1d6a..e6135f3f 100644 --- a/Message/Email.vb +++ b/Message/Email.vb @@ -1,20 +1,148 @@ Imports Independentsoft.Email Imports Independentsoft.Email.Pop3 -Imports Independentsoft.Email.Smtp Imports Independentsoft.Email.Mime Imports Independentsoft.Email.Imap Imports DigitalData.Modules.Logging Imports System.Net.Mail Imports System.Net +Imports System.Reflection +Imports System.IO Public Class Email - Private _logger As Logging.Logger - Private _logConfig As LogConfig + Private ReadOnly _logger As Logging.Logger + Private ReadOnly _logConfig As LogConfig + Public Sub New(LogConfig As LogConfig) _logger = LogConfig.GetLogger() _logConfig = LogConfig - End Sub + + ''' + ''' Tests connection to a given IMAP Server by connecting and doing a simple message query. + ''' + ''' IP-Address or Domainname of Server + ''' IMAP-Port + ''' IMAP-Username + ''' IMAP-Password + ''' The folder to fetch messages from. Defaults to `Inbox` + ''' True if connection and query were successful. False otherwise. + Public Function TestIMAPLogin(Server As String, Port As Integer, Username As String, Password As String, Optional Folder As String = "Inbox") As Boolean + _logger.Debug("Testing Login to Server {0}:{1} with user {2}", Server, Port, Username) + + Try + _logger.Debug("Connecting...") + Using oClient As New S22.Imap.ImapClient(Server, Port, Username, Password, S22.Imap.AuthMethod.Login, True) + If Not oClient.Authed Then + _logger.Warn("Connected to server but authentication failed.") + Return False + End If + _logger.Debug("Connection successful") + + _logger.Debug("Fetching MessageIds..") + Dim oMessageIds As IEnumerable(Of UInteger) = oClient.Search(S22.Imap.SearchCondition.Unseen, Folder) + + _logger.Debug("Found {0} messages", oMessageIds.Count) + _logger.Debug("Fetching messages...") + + Dim oMessages As IEnumerable(Of MailMessage) = oClient.GetMessages(oMessageIds, False, Folder) + _logger.Debug("Messages fetched") + + oClient.Dispose() + + Return True + End Using + Catch ex As Exception + _logger.Error(ex) + Return False + End Try + End Function + + ''' + ''' Connects to an IMAP Server with the given credentials and + ''' fetches emails from the given folder. + ''' Results can be filtered with `SearchCondition` + ''' + ''' IP-Address or Domainname of Server + ''' IMAP-Port + ''' IMAP-Username + ''' IMAP-Password + ''' The folder to fetch messages from + ''' Filter the search command. Defaults to `All` + ''' A list of Independentsoft.Email.Mime.Message objects + Public Function FetchIMAPMessages(Server As String, Port As Integer, Username As String, Password As String, Folder As String, Optional SearchCondition As S22.Imap.SearchCondition = S22.Imap.SearchCondition.All) As List(Of Message) + Dim oMessages As New List(Of Message) + + _logger.Debug("Connecting to Server {0}:{1} with user {2}", Server, Port, Username) + + Try + _logger.Debug("Connecting...") + Using oClient As New S22.Imap.ImapClient(Server, Port, Username, Password, S22.Imap.AuthMethod.Login, True) + If Not oClient.Authed Then + _logger.Warn("Connected to server but authentication failed.") + Return Nothing + End If + _logger.Debug("Connection successful") + + _logger.Debug("Fetching MessageIds..") + Dim oMessageIds As IEnumerable(Of UInteger) = oClient.Search(S22.Imap.SearchCondition.Unseen, Folder) + + _logger.Debug("Found {0} messages", oMessageIds.Count) + _logger.Debug("Fetching messages...") + + ' Since this needs to return a list of IndependentSoft Message objects, + ' we 'convert' the .NET MailMessage objects that are fetched from the server + ' by writing them temporarily to disk as an eml file and then reading them back into a Message object. + ' This approach uses an unintended use of internal .NET APIs and may break in the future. + For Each oMessageId As UInteger In oMessageIds + Dim oMessage = oClient.GetMessage(oMessageId, False, Folder) + Dim oTempPath = Path.GetTempFileName() + Dim oResult = WriteMessageToFile(oMessage, oTempPath) + + Dim oMsg As New Message(oTempPath) + oMessages.Add(oMsg) + + Try + File.Delete(oTempPath) + Catch ex As Exception + _logger.Error(ex) + _logger.Warn("Temp file could not be deleted") + End Try + Next + + _logger.Debug("{0} Messages fetched", oMessages.Count) + End Using + + Return oMessages + Catch ex As Exception + _logger.Error(ex) + Return Nothing + End Try + End Function + + ''' + ''' Uses a private API from MailWriter to write a MailMessage to disk. + ''' May break in future versions of .NET + ''' + Public Function WriteMessageToFile(Message As MailMessage, Filename As String) As Boolean + Dim oAssembly As Assembly = GetType(Mail.SmtpClient).Assembly + Dim oMailWriterType As Type = oAssembly.[GetType]("System.Net.Mail.MailWriter") + + Try + Using oStream As New FileStream(Filename, FileMode.Create) + Dim oMailWriterConstructor As ConstructorInfo = oMailWriterType.GetConstructor( + BindingFlags.Instance Or BindingFlags.NonPublic, Nothing, New Type() {GetType(Stream)}, Nothing + ) + Dim oMailWriter As Object = oMailWriterConstructor.Invoke(New Object() {oStream}) + Dim sendMethod As MethodInfo = GetType(MailMessage).GetMethod("Send", BindingFlags.Instance Or BindingFlags.NonPublic) + sendMethod.Invoke(Message, BindingFlags.Instance Or BindingFlags.NonPublic, Nothing, {oMailWriter, True, True}, Nothing) + End Using + + Return True + Catch ex As Exception + Return Nothing + End Try + End Function + Public Function IMAP_COLLECT(INBOXNAME As String, MYMAIL_SERVER As String, MYMAIL_PORT As Integer, MYMAIL_USER As String, MYMAIL_USER_PW As String) Try Dim oMAIL_LIST As New ArrayList() diff --git a/Message/Messaging.vbproj b/Message/Messaging.vbproj index 8c9bb92e..a396cfbb 100644 --- a/Message/Messaging.vbproj +++ b/Message/Messaging.vbproj @@ -53,6 +53,9 @@ ..\packages\NLog.4.5.11\lib\net45\NLog.dll + + ..\packages\S22.Imap.3.6.0.0\lib\net40\S22.Imap.dll + diff --git a/Message/packages.config b/Message/packages.config index f89fa324..61e0c253 100644 --- a/Message/packages.config +++ b/Message/packages.config @@ -1,4 +1,5 @@  + \ No newline at end of file diff --git a/Modules.Database/Firebird.vb b/Modules.Database/Firebird.vb index 75ddb44d..1bc2b3b2 100644 --- a/Modules.Database/Firebird.vb +++ b/Modules.Database/Firebird.vb @@ -47,7 +47,7 @@ Imports DigitalData.Modules.Logging ''' Public Class Firebird Private _Logger As Logger - Private _MyLogger As LogConfig + Private _LogConfig As LogConfig Private _connectionServer As String Private _connectionDatabase As String Private _connectionUsername As String @@ -79,15 +79,16 @@ Public Class Firebird ''' ''' ''' - ''' - ''' - ''' - ''' + ''' The LogFactory containing the current log config. Used to instanciate the class logger for this and any dependent class + ''' The server where the database lives, for example 127.0.0.1 or dd-vmx09-vm03 + ''' The location of the Database in the format `127.0.0.1:E:\Path\To\Database.FDB` + ''' The user name to connect as + ''' The user's password ''' Public Sub New(LogConfig As LogConfig, Datasource As String, Database As String, User As String, Password As String) Try - _MyLogger = LogConfig - _Logger = _MyLogger.GetLogger() + _LogConfig = LogConfig + _Logger = _LogConfig.GetLogger() Dim oConnectionString = GetConnectionString(Datasource, Database, User, Password) _connectionServer = Datasource diff --git a/SERVICES/DDEDM_NetworkService/EDMService.vb b/SERVICES/DDEDM_NetworkService/EDMService.vb index 24350966..7863b874 100644 --- a/SERVICES/DDEDM_NetworkService/EDMService.vb +++ b/SERVICES/DDEDM_NetworkService/EDMService.vb @@ -254,7 +254,13 @@ Public Class EDMService oRow.Item("ORIGINAL_FILENAME") ) - Return New DocumentResult(oDocument) + TestFileExists(oDocument.ContainerId) + + Dim oContainerPath = GetContainerPath(oDocument.ContainerId) + Dim oContainer As FileContainer = FileContainer.Load(LogConfig, AppConfig.ContainerPassword, oContainerPath) + Dim oContents As Byte() = oContainer.GetFile().Contents + + Return New DocumentResult(oDocument, oContents) Catch ex As Exception Return New DocumentResult(ex.Message) End Try @@ -276,7 +282,13 @@ Public Class EDMService oRow.Item("ORIGINAL_FILENAME") ) - Return New DocumentResult(oDocument) + TestFileExists(oDocument.ContainerId) + + Dim oContainerPath = GetContainerPath(oDocument.ContainerId) + Dim oContainer As FileContainer = FileContainer.Load(LogConfig, AppConfig.ContainerPassword, oContainerPath) + Dim oContents As Byte() = oContainer.GetFile().Contents + + Return New DocumentResult(oDocument, oContents) Catch ex As Exception Return New DocumentResult(ex.Message) End Try diff --git a/SERVICES/DDEDM_NetworkService/IEDMService.vb b/SERVICES/DDEDM_NetworkService/IEDMService.vb index ac6bf76c..be7882e6 100644 --- a/SERVICES/DDEDM_NetworkService/IEDMService.vb +++ b/SERVICES/DDEDM_NetworkService/IEDMService.vb @@ -38,6 +38,8 @@ Interface IEDMService Function DeleteFile(DocObject As DocumentObject) As Boolean + + #End Region #Region "Utils" diff --git a/SERVICES/DDEDM_NetworkService/Results/BaseResult.vb b/SERVICES/DDEDM_NetworkService/Results/BaseResult.vb index 67ba3f4a..c2bff9b2 100644 --- a/SERVICES/DDEDM_NetworkService/Results/BaseResult.vb +++ b/SERVICES/DDEDM_NetworkService/Results/BaseResult.vb @@ -3,7 +3,7 @@ -Public Class BaseResult +Public MustInherit Class BaseResult Public Property OK As Boolean From 9e33f51d3a3dac81440265394dd85eac7c2b1e53 Mon Sep 17 00:00:00 2001 From: Jonathan Jenne Date: Mon, 15 Apr 2019 14:01:09 +0200 Subject: [PATCH 19/25] Config - version 0.3.0 --- Config/Config.vbproj | 3 +- Config/ConfigAttributes.vb | 5 + Config/ConfigManager.vb | 164 +++++++++++++++++++++--------- Config/ConfigSample.vb | 7 ++ Config/My Project/AssemblyInfo.vb | 2 +- Config/SinceVersionAttribute.vb | 9 -- 6 files changed, 131 insertions(+), 59 deletions(-) create mode 100644 Config/ConfigAttributes.vb create mode 100644 Config/ConfigSample.vb delete mode 100644 Config/SinceVersionAttribute.vb diff --git a/Config/Config.vbproj b/Config/Config.vbproj index 4e569b1a..7d7203f6 100644 --- a/Config/Config.vbproj +++ b/Config/Config.vbproj @@ -73,7 +73,9 @@ + + True @@ -89,7 +91,6 @@ Settings.settings True - diff --git a/Config/ConfigAttributes.vb b/Config/ConfigAttributes.vb new file mode 100644 index 00000000..d5b64582 --- /dev/null +++ b/Config/ConfigAttributes.vb @@ -0,0 +1,5 @@ +Public Class ConfigAttributes + Public Class ConnectionStringAttribute + Inherits Attribute + End Class +End Class diff --git a/Config/ConfigManager.vb b/Config/ConfigManager.vb index 7faa0a6c..c1e9a300 100644 --- a/Config/ConfigManager.vb +++ b/Config/ConfigManager.vb @@ -1,6 +1,8 @@ Imports System.IO +Imports System.Reflection Imports System.Xml.Serialization Imports DigitalData.Modules.Logging +Imports DigitalData.Modules.Config.ConfigAttributes Public Class ConfigManager(Of T) Private Const USER_CONFIG_NAME As String = "UserConfig.xml" @@ -11,7 +13,8 @@ Public Class ConfigManager(Of T) Private ReadOnly _File As Filesystem.File Private ReadOnly _UserPath As String Private ReadOnly _ComputerPath As String - Private _CurrentDataPath As String + + Private _ForceUserConfig As Boolean ''' ''' The blueprint class from which the default config is created @@ -21,29 +24,22 @@ Public Class ConfigManager(Of T) Public ReadOnly Property Config As T - ''' ''' Creates a new instance of the ConfigManager ''' - ''' - ''' Public Class Config - ''' Public Property StringEntry As String = "TEST" - ''' Public Property BoolEntry As Boolean = True - ''' Public Property IntEntry As Integer = 123 - ''' End Class - ''' - ''' Dim oConfigManager = New ConfigManager(Of Config)(_LogConfig, Application.UserAppDataPath, Application.CommonAppDataPath) - ''' + ''' ''' LogConfig instance - ''' The first path to check for a config file, eg. AppData - ''' The second path to check for a config file, eg. ProgramData - Public Sub New(LogConfig As LogConfig, UserConfigPath As String, ComputerConfigPath As String) + ''' The path to check for a user config file, eg. AppData + ''' The path to check for a computer config file, eg. ProgramData + ''' Override values from ComputerConfig with UserConfig + Public Sub New(LogConfig As LogConfig, UserConfigPath As String, ComputerConfigPath As String, Optional ForceUserConfig As Boolean = False) _LogConfig = LogConfig _Logger = LogConfig.GetLogger() _File = New Filesystem.File(_LogConfig) _UserPath = Path.Combine(UserConfigPath, USER_CONFIG_NAME) _ComputerPath = Path.Combine(ComputerConfigPath, COMPUTER_CONFIG_NAME) + _ForceUserConfig = ForceUserConfig _Blueprint = Activator.CreateInstance(Of T) _Serializer = New XmlSerializer(_Blueprint.GetType) @@ -72,58 +68,130 @@ Public Class ConfigManager(Of T) End Sub ''' - ''' Creates a new instance of the ConfigManager. + ''' Creates a new ConfigManager with a single (user)config path ''' - ''' - ''' Public Class Config - ''' Public Property StringEntry As String = "TEST" - ''' Public Property BoolEntry As Boolean = True - ''' Public Property IntEntry As Integer = 123 - ''' End Class - ''' - ''' Dim oConfigManager = New ConfigManager(Of Config)(_LogConfig, Application.UserAppDataPath) - ''' - ''' LogConfig instance - ''' The path to check for a config file, eg. AppData + ''' + ''' Public Sub New(LogConfig As LogConfig, ConfigPath As String) - MyClass.New(LogConfig, ConfigPath, ConfigPath) + MyClass.New(LogConfig, ConfigPath, ConfigPath, ForceUserConfig:=True) End Sub ''' ''' Save the current config object to `UserConfigPath` ''' - Public Sub Save() - WriteToFile(_Config, _UserPath) + ''' True if save was successful, False otherwise + Public Function Save() As Boolean + Try + WriteToFile(_Config, _UserPath) + Return True + Catch ex As Exception + _Logger.Error(ex) + Return False + End Try + End Function + + Private Sub CopyValues(Of T)(Source As T, Target As T, Optional ExcludedAttributeTypes As List(Of Type) = Nothing) + Dim oType As Type = GetType(T) + Dim oExcludedAttributeTypes = IIf(IsNothing(ExcludedAttributeTypes), New List(Of Type), ExcludedAttributeTypes) + Dim oProperties = oType.GetProperties(). + Where(Function(p) p.CanRead And p.CanWrite). + Where(Function(p) + For Each oAttributeType As Type In oExcludedAttributeTypes + If Attribute.IsDefined(p, oAttributeType) Then + Return False + End If + Next + Return True + End Function) + + For Each oProperty As PropertyInfo In oProperties + Dim oValue = oProperty.GetValue(Source, Nothing) + If Not IsNothing(oValue) Then + oProperty.SetValue(Target, oValue, Nothing) + End If + Next End Sub - ''' - ''' First check if a user config exists and if it does, load it. - ''' If not, check if a systemwide config exists and and if it does, load it. - ''' Otherwise, create a user config using the default values from the supplied config class `T` - ''' - ''' Private Function LoadConfig() As T - Dim oConfig As T + ' first create an empty/default config object + Dim oConfig = Activator.CreateInstance(_Blueprint.GetType) + ' then Try to load computer config + oConfig = LoadComputerConfig(oConfig) + ' now try to load userconfig + oConfig = LoadUserConfig(oConfig) + Return oConfig + End Function - If File.Exists(_UserPath) Then - _Logger.Debug("Loading config from UserPath: {0}", _UserPath) - _CurrentDataPath = _UserPath - oConfig = ReadFromFile(_UserPath) - ElseIf File.Exists(_ComputerPath) Then - _Logger.Debug("Loading config from ComputerPath: {0}", _ComputerPath) - _CurrentDataPath = _ComputerPath - oConfig = ReadFromFile(_ComputerPath) + Private Function LoadComputerConfig(ByVal Config As T) As T + If File.Exists(_ComputerPath) Then + Try + Dim oComputerConfig = ReadFromFile(_ComputerPath) + + ' if a computer config exists, copy values + ' from computer config to final config + If Not IsNothing(oComputerConfig) Then + CopyValues(oComputerConfig, Config) + End If + Catch ex As Exception + _Logger.Error(ex) + _Logger.Warn("Computer config could not be loaded!") + End Try Else - _Logger.Debug("Creating default config in UserPath: {0}", _UserPath) - _CurrentDataPath = _UserPath - oConfig = Activator.CreateInstance(_Blueprint.GetType) + _ForceUserConfig = True + End If - WriteToFile(_Config, _UserPath) + Return Config + End Function + + Private Function LoadUserConfig(ByVal Config As T) As T + If File.Exists(_UserPath) Then + Try + Dim oUserConfig = ReadFromFile(_UserPath) + + ' if user config exists + If Not IsNothing(oUserConfig) Then + Dim oExcludedAttributes As New List(Of Type) + If Not _ForceUserConfig Then + oExcludedAttributes.Add(GetType(ConnectionStringAttribute)) + End If + + ' Copy values from user config to final config + CopyValues(oUserConfig, Config, oExcludedAttributes) + End If + + 'Dim oConnectionProperty = TestHasAttribute(oConfig, GetType(ConnectionStringAttribute)) + Catch ex As Exception + _Logger.Error(ex) + _Logger.Warn("User config could not be loaded!") + End Try End If + Return Config + End Function + + Private Function LoadDefaultConfig() As T + _Logger.Debug("Creating default config in UserPath: {0}", _UserPath) + Dim oConfig = Activator.CreateInstance(_Blueprint.GetType) + + Try + WriteToFile(oConfig, _UserPath) + Catch ex As Exception + _Logger.Warn("Could not create default config in UserPath: {0}", _UserPath) + End Try + Return oConfig End Function + Private Function TestHasAttribute(Config As T, AttributeType As Type) As String + For Each oProperty As PropertyInfo In Config.GetType.GetProperties() + If Attribute.IsDefined(oProperty, GetType(ConnectionStringAttribute)) Then + Return oProperty.Name + End If + Next + + Return Nothing + End Function + ''' ''' Serialize a config object to byte array ''' diff --git a/Config/ConfigSample.vb b/Config/ConfigSample.vb new file mode 100644 index 00000000..f6ded688 --- /dev/null +++ b/Config/ConfigSample.vb @@ -0,0 +1,7 @@ +Imports DigitalData.Modules.Config.ConfigAttributes + +Public Class ConfigSample + + + Public Property ConnectionString As String +End Class diff --git a/Config/My Project/AssemblyInfo.vb b/Config/My Project/AssemblyInfo.vb index e988c66c..7a591066 100644 --- a/Config/My Project/AssemblyInfo.vb +++ b/Config/My Project/AssemblyInfo.vb @@ -31,5 +31,5 @@ Imports System.Runtime.InteropServices ' übernehmen, indem Sie "*" eingeben: ' - + diff --git a/Config/SinceVersionAttribute.vb b/Config/SinceVersionAttribute.vb deleted file mode 100644 index f3b94c7e..00000000 --- a/Config/SinceVersionAttribute.vb +++ /dev/null @@ -1,9 +0,0 @@ -Public Class SinceVersionAttribute - Inherits Attribute - - Public Version As Version - - Public Sub New(Version As String) - Me.Version = New Version(Version) - End Sub -End Class \ No newline at end of file From ea9c2092044119cb9fcf18f7c47f64d6d9d0d274 Mon Sep 17 00:00:00 2001 From: Jonathan Jenne Date: Mon, 15 Apr 2019 14:02:16 +0200 Subject: [PATCH 20/25] update clientsuite for new config manager --- EDMI_ClientSuite/ApplicationEvents.vb | 2 +- EDMI_ClientSuite/ClassConfig.vb | 7 ++++--- EDMI_ClientSuite/ClientSuite.vbproj | 2 +- 3 files changed, 6 insertions(+), 5 deletions(-) diff --git a/EDMI_ClientSuite/ApplicationEvents.vb b/EDMI_ClientSuite/ApplicationEvents.vb index 4bd9c660..c581efb4 100644 --- a/EDMI_ClientSuite/ApplicationEvents.vb +++ b/EDMI_ClientSuite/ApplicationEvents.vb @@ -25,7 +25,7 @@ Namespace My ' Layout files will be saved in %Appdata% (Roaming) so they will be syncronized with the user profile Dim oUIConfigPath = IO.Path.Combine(Windows.Forms.Application.UserAppDataPath, ClassConstants.FOLDER_NAME_LAYOUT) - Dim oUIConfigManager As New ConfigManager(Of ClassUIConfig)(oLogConfig, oUIConfigPath) + Dim oUIConfigManager As New ConfigManager(Of ClassUIConfig)(oLogConfig, oUIConfigPath, oUIConfigPath) LogConfig = oLogConfig SystemConfigManager = oSystemConfigManager diff --git a/EDMI_ClientSuite/ClassConfig.vb b/EDMI_ClientSuite/ClassConfig.vb index bbf69a37..1c6f2137 100644 --- a/EDMI_ClientSuite/ClassConfig.vb +++ b/EDMI_ClientSuite/ClassConfig.vb @@ -1,6 +1,5 @@ -Imports System.ComponentModel -Imports System.Runtime.CompilerServices -Imports System.Xml.Serialization +Imports System.Xml.Serialization +Imports DigitalData.Modules.Config.ConfigAttributes ''' ''' --- User Config for EDMI --- @@ -37,7 +36,9 @@ Public Class ClassConfig ' === Simple/Actual Config Properties === ' === Service Configuration === + Public Property ServiceIP As String = String.Empty + Public Property ServicePort As Integer = -1 Public Property HeartbeatInterval As Integer = 5000 diff --git a/EDMI_ClientSuite/ClientSuite.vbproj b/EDMI_ClientSuite/ClientSuite.vbproj index 0009c873..44f11aec 100644 --- a/EDMI_ClientSuite/ClientSuite.vbproj +++ b/EDMI_ClientSuite/ClientSuite.vbproj @@ -446,7 +446,7 @@ - {44982F9B-6116-44E2-85D0-F39650B1EF99} + {44982f9b-6116-44e2-85d0-f39650b1ef99} Config From b4151e8b81f99f95f8a506e88acc471ea1036afa Mon Sep 17 00:00:00 2001 From: Jonathan Jenne Date: Mon, 15 Apr 2019 14:25:30 +0200 Subject: [PATCH 21/25] move config project to Modules.Config folder --- DDMonorepo.sln | 2 +- EDMI_ClientSuite/ClientSuite.vbproj | 8 ++++---- {Config => Modules.Config}/Config.vbproj | 0 {Config => Modules.Config}/ConfigAttributes.vb | 0 {Config => Modules.Config}/ConfigManager.vb | 0 {Config => Modules.Config}/ConfigSample.vb | 0 .../My Project/Application.Designer.vb | 0 {Config => Modules.Config}/My Project/Application.myapp | 0 {Config => Modules.Config}/My Project/AssemblyInfo.vb | 0 .../My Project/Resources.Designer.vb | 0 {Config => Modules.Config}/My Project/Resources.resx | 0 .../My Project/Settings.Designer.vb | 0 {Config => Modules.Config}/My Project/Settings.settings | 0 {Config => Modules.Config}/SampleConfig.vb | 0 {Config => Modules.Config}/packages.config | 0 15 files changed, 5 insertions(+), 5 deletions(-) rename {Config => Modules.Config}/Config.vbproj (100%) rename {Config => Modules.Config}/ConfigAttributes.vb (100%) rename {Config => Modules.Config}/ConfigManager.vb (100%) rename {Config => Modules.Config}/ConfigSample.vb (100%) rename {Config => Modules.Config}/My Project/Application.Designer.vb (100%) rename {Config => Modules.Config}/My Project/Application.myapp (100%) rename {Config => Modules.Config}/My Project/AssemblyInfo.vb (100%) rename {Config => Modules.Config}/My Project/Resources.Designer.vb (100%) rename {Config => Modules.Config}/My Project/Resources.resx (100%) rename {Config => Modules.Config}/My Project/Settings.Designer.vb (100%) rename {Config => Modules.Config}/My Project/Settings.settings (100%) rename {Config => Modules.Config}/SampleConfig.vb (100%) rename {Config => Modules.Config}/packages.config (100%) diff --git a/DDMonorepo.sln b/DDMonorepo.sln index 6c269470..c0f0d3c4 100644 --- a/DDMonorepo.sln +++ b/DDMonorepo.sln @@ -27,7 +27,7 @@ Project("{F184B08F-C81C-45F6-A57F-5ABD9991F28F}") = "DDTestService", "DDTestServ EndProject Project("{F184B08F-C81C-45F6-A57F-5ABD9991F28F}") = "Variables", "Variables\Variables.vbproj", "{836C9ADE-E04E-4E1E-B17A-201E68014790}" EndProject -Project("{F184B08F-C81C-45F6-A57F-5ABD9991F28F}") = "Config", "Config\Config.vbproj", "{44982F9B-6116-44E2-85D0-F39650B1EF99}" +Project("{F184B08F-C81C-45F6-A57F-5ABD9991F28F}") = "Config", "Modules.Config\Config.vbproj", "{44982F9B-6116-44E2-85D0-F39650B1EF99}" EndProject Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Controls", "Controls", "{F98C0329-C004-417F-B2AB-7466E88D8220}" EndProject diff --git a/EDMI_ClientSuite/ClientSuite.vbproj b/EDMI_ClientSuite/ClientSuite.vbproj index 44f11aec..a0b1e23c 100644 --- a/EDMI_ClientSuite/ClientSuite.vbproj +++ b/EDMI_ClientSuite/ClientSuite.vbproj @@ -445,10 +445,6 @@ - - {44982f9b-6116-44e2-85d0-f39650b1ef99} - Config - {5b1171dc-fffe-4813-a20d-786aae47b320} EDMIAPI @@ -461,6 +457,10 @@ {3DCD6D1A-C830-4241-B7E4-27430E7EA483} LookupControl + + {44982f9b-6116-44e2-85d0-f39650b1ef99} + Config + {5ebacbfa-f11a-4bbf-8d02-91461f2293ed} License diff --git a/Config/Config.vbproj b/Modules.Config/Config.vbproj similarity index 100% rename from Config/Config.vbproj rename to Modules.Config/Config.vbproj diff --git a/Config/ConfigAttributes.vb b/Modules.Config/ConfigAttributes.vb similarity index 100% rename from Config/ConfigAttributes.vb rename to Modules.Config/ConfigAttributes.vb diff --git a/Config/ConfigManager.vb b/Modules.Config/ConfigManager.vb similarity index 100% rename from Config/ConfigManager.vb rename to Modules.Config/ConfigManager.vb diff --git a/Config/ConfigSample.vb b/Modules.Config/ConfigSample.vb similarity index 100% rename from Config/ConfigSample.vb rename to Modules.Config/ConfigSample.vb diff --git a/Config/My Project/Application.Designer.vb b/Modules.Config/My Project/Application.Designer.vb similarity index 100% rename from Config/My Project/Application.Designer.vb rename to Modules.Config/My Project/Application.Designer.vb diff --git a/Config/My Project/Application.myapp b/Modules.Config/My Project/Application.myapp similarity index 100% rename from Config/My Project/Application.myapp rename to Modules.Config/My Project/Application.myapp diff --git a/Config/My Project/AssemblyInfo.vb b/Modules.Config/My Project/AssemblyInfo.vb similarity index 100% rename from Config/My Project/AssemblyInfo.vb rename to Modules.Config/My Project/AssemblyInfo.vb diff --git a/Config/My Project/Resources.Designer.vb b/Modules.Config/My Project/Resources.Designer.vb similarity index 100% rename from Config/My Project/Resources.Designer.vb rename to Modules.Config/My Project/Resources.Designer.vb diff --git a/Config/My Project/Resources.resx b/Modules.Config/My Project/Resources.resx similarity index 100% rename from Config/My Project/Resources.resx rename to Modules.Config/My Project/Resources.resx diff --git a/Config/My Project/Settings.Designer.vb b/Modules.Config/My Project/Settings.Designer.vb similarity index 100% rename from Config/My Project/Settings.Designer.vb rename to Modules.Config/My Project/Settings.Designer.vb diff --git a/Config/My Project/Settings.settings b/Modules.Config/My Project/Settings.settings similarity index 100% rename from Config/My Project/Settings.settings rename to Modules.Config/My Project/Settings.settings diff --git a/Config/SampleConfig.vb b/Modules.Config/SampleConfig.vb similarity index 100% rename from Config/SampleConfig.vb rename to Modules.Config/SampleConfig.vb diff --git a/Config/packages.config b/Modules.Config/packages.config similarity index 100% rename from Config/packages.config rename to Modules.Config/packages.config From ddec69bc058a1c28badd15d962f52a5ff19e6e86 Mon Sep 17 00:00:00 2001 From: Jonathan Jenne Date: Mon, 15 Apr 2019 14:30:00 +0200 Subject: [PATCH 22/25] move clientsuite to GUIs.ClientSuite folder --- DDMonorepo.sln | 14 ++++++++------ {EDMI_ClientSuite => GUIs.ClientSuite}/App.config | 0 .../ApplicationEvents.vb | 0 .../Base/BaseClass.vb | 0 .../Base/BaseForm.resx | 0 .../Base/BaseForm.vb | 0 .../Base/BaseRibbonForm.vb | 0 .../ClassConfig.vb | 0 .../ClassConstants.vb | 0 .../ClassControlManager.vb | 0 .../ClassControlPatcher.vb | 0 .../ClassDragDrop.vb | 0 .../ClassErrorHandler.vb | 0 .../ClassLayout.vb | 0 .../ClassPanelManager.vb | 0 .../ClassService.vb | 0 .../ClassTimer.vb | 0 .../ClassUIConfig.vb | 0 .../ClassUtils.vb | 0 .../ClientSuite.vbproj | 0 .../Common/ClassCommon.vb | 0 .../Common/ClassCommonCommands.vb | 0 .../Common/ClassCommonViews.vb | 0 .../ControlDefaults/GridControlDefaults.vb | 0 .../ControlDefaults/TreeListDefaults.vb | 0 .../FormDesigner/Controls/Data.vb | 0 .../Controls/Editors/DatasourceEditor.vb | 0 .../Controls/Editors/DatasourceType.vb | 0 .../Controls/Editors/StaticListEditor.vb | 0 .../Editors/frmDatasourceEditor.Designer.vb | 0 .../Controls/Editors/frmDatasourceEditor.resx | 0 .../Controls/Editors/frmDatasourceEditor.vb | 0 .../Editors/frmStaticListEditor.Designer.vb | 0 .../Editors/frmStaticListEditor.en-US.resx | 0 .../Controls/Editors/frmStaticListEditor.resx | 0 .../Controls/Editors/frmStaticListEditor.vb | 0 .../FormDesigner/Controls/Loader.vb | 0 .../FormDesigner/Controls/Localization.vb | 0 .../FormDesigner/Controls/Metadata.vb | 0 .../Controls/Properties/BaseProperties.vb | 0 .../Controls/Properties/CheckboxProperties.vb | 0 .../Controls/Properties/ComboboxProperties.vb | 0 .../Controls/Properties/DatepickerProperties.vb | 0 .../Controls/Properties/MemoeditProperties.vb | 0 .../Controls/Properties/TextboxProperties.vb | 0 .../FormDesigner/frmFormDesigner.Designer.vb | 0 .../FormDesigner/frmFormDesigner.resx | 0 .../FormDesigner/frmFormDesigner.vb | 0 .../UserControlAssignment.Designer.vb | 0 .../FormUserManager/UserControlAssignment.resx | 0 .../FormUserManager/UserControlAssignment.vb | 0 .../FormUserManager/frmUserManager.Designer.vb | 0 .../FormUserManager/frmUserManager.resx | 0 .../FormUserManager/frmUserManager.vb | 0 .../FormWorkflow/frmWorkflowStep.Designer.vb | 0 .../FormWorkflow/frmWorkflowStep.resx | 0 .../FormWorkflow/frmWorkflowStep.vb | 0 .../My Project/Application.Designer.vb | 0 .../My Project/Application.myapp | 0 .../My Project/AssemblyInfo.vb | 0 .../My Project/Resources.Designer.vb | 0 .../My Project/Resources.resx | 0 .../My Project/Settings.Designer.vb | 0 .../My Project/Settings.settings | 0 .../My Project/app.manifest | 0 .../My Project/licenses.licx | 0 .../MyApplication.vb | 0 .../Panels/BasePanel.Designer.vb | 0 .../Panels/BasePanel.vb | 0 .../Panels/DocumentPanel.Designer.vb | 0 .../Panels/DocumentPanel.resx | 0 .../Panels/DocumentPanel.vb | 0 .../Panels/PanelInfo.vb | 0 .../Resources/CheckBox.png | Bin .../Resources/ComboBox.png | Bin .../Resources/DatePicker.png | Bin .../Resources/TextBox.png | Bin .../Resources/email_go.png | Bin .../Resources/folder_go.png | Bin .../Resources/iconfinder_Gowalla_324477.png | Bin .../Resources/user_16xLG.png | Bin .../State/ClassServiceState.vb | 0 .../State/ClassUserState.vb | 0 .../Strings/ControlProperties.Designer.vb | 0 .../Strings/ControlProperties.en.Designer.vb | 0 .../Strings/ControlProperties.en.resx | 0 .../Strings/ControlProperties.resx | 0 .../Widgets/ProcessManagerWidget.Designer.vb | 0 .../Widgets/ProcessManagerWidget.resx | 0 .../Widgets/ProcessManagerWidget.vb | 0 .../_TEST/DockManagerTest.Designer.vb | 0 .../_TEST/DockManagerTest.resx | 0 .../_TEST/DockManagerTest.vb | 0 .../_TEST/frmDocTest.Designer.vb | 0 .../_TEST/frmDocTest.resx | 0 .../_TEST/frmDocTest.vb | 0 .../_TEST/frmFileTest.Designer.vb | 0 .../_TEST/frmFileTest.resx | 0 .../_TEST/frmFileTest.vb | 0 .../_TEST/frmWorkflowTest.Designer.vb | 0 .../_TEST/frmWorkflowTest.resx | 0 .../_TEST/frmWorkflowTest.vb | 0 .../frmConfigService.Designer.vb | 0 .../frmConfigService.resx | 0 .../frmConfigService.vb | 0 .../frmConfigUser.Designer.vb | 0 .../frmConfigUser.resx | 0 .../frmConfigUser.vb | 0 .../frmHome.Designer.vb | 0 .../frmHome.resx | 0 {EDMI_ClientSuite => GUIs.ClientSuite}/frmHome.vb | 0 .../frmMain.Designer.vb | 0 .../frmMain.resx | 0 {EDMI_ClientSuite => GUIs.ClientSuite}/frmMain.vb | 0 .../frmObjectEditor.Designer.vb | 0 .../frmObjectEditor.resx | 0 .../frmObjectEditor.vb | 0 .../frmSearch.Designer.vb | 0 .../frmSearch.resx | 0 .../frmSearch.vb | 0 .../frmSplash.designer.vb | 0 .../frmSplash.resx | 0 .../frmSplash.vb | 0 .../packages.config | 0 124 files changed, 8 insertions(+), 6 deletions(-) rename {EDMI_ClientSuite => GUIs.ClientSuite}/App.config (100%) rename {EDMI_ClientSuite => GUIs.ClientSuite}/ApplicationEvents.vb (100%) rename {EDMI_ClientSuite => GUIs.ClientSuite}/Base/BaseClass.vb (100%) rename {EDMI_ClientSuite => GUIs.ClientSuite}/Base/BaseForm.resx (100%) rename {EDMI_ClientSuite => GUIs.ClientSuite}/Base/BaseForm.vb (100%) rename {EDMI_ClientSuite => GUIs.ClientSuite}/Base/BaseRibbonForm.vb (100%) rename {EDMI_ClientSuite => GUIs.ClientSuite}/ClassConfig.vb (100%) rename {EDMI_ClientSuite => GUIs.ClientSuite}/ClassConstants.vb (100%) rename {EDMI_ClientSuite => GUIs.ClientSuite}/ClassControlManager.vb (100%) rename {EDMI_ClientSuite => GUIs.ClientSuite}/ClassControlPatcher.vb (100%) rename {EDMI_ClientSuite => GUIs.ClientSuite}/ClassDragDrop.vb (100%) rename {EDMI_ClientSuite => GUIs.ClientSuite}/ClassErrorHandler.vb (100%) rename {EDMI_ClientSuite => GUIs.ClientSuite}/ClassLayout.vb (100%) rename {EDMI_ClientSuite => GUIs.ClientSuite}/ClassPanelManager.vb (100%) rename {EDMI_ClientSuite => GUIs.ClientSuite}/ClassService.vb (100%) rename {EDMI_ClientSuite => GUIs.ClientSuite}/ClassTimer.vb (100%) rename {EDMI_ClientSuite => GUIs.ClientSuite}/ClassUIConfig.vb (100%) rename {EDMI_ClientSuite => GUIs.ClientSuite}/ClassUtils.vb (100%) rename {EDMI_ClientSuite => GUIs.ClientSuite}/ClientSuite.vbproj (100%) rename {EDMI_ClientSuite => GUIs.ClientSuite}/Common/ClassCommon.vb (100%) rename {EDMI_ClientSuite => GUIs.ClientSuite}/Common/ClassCommonCommands.vb (100%) rename {EDMI_ClientSuite => GUIs.ClientSuite}/Common/ClassCommonViews.vb (100%) rename {EDMI_ClientSuite => GUIs.ClientSuite}/ControlDefaults/GridControlDefaults.vb (100%) rename {EDMI_ClientSuite => GUIs.ClientSuite}/ControlDefaults/TreeListDefaults.vb (100%) rename {EDMI_ClientSuite => GUIs.ClientSuite}/FormDesigner/Controls/Data.vb (100%) rename {EDMI_ClientSuite => GUIs.ClientSuite}/FormDesigner/Controls/Editors/DatasourceEditor.vb (100%) rename {EDMI_ClientSuite => GUIs.ClientSuite}/FormDesigner/Controls/Editors/DatasourceType.vb (100%) rename {EDMI_ClientSuite => GUIs.ClientSuite}/FormDesigner/Controls/Editors/StaticListEditor.vb (100%) rename {EDMI_ClientSuite => GUIs.ClientSuite}/FormDesigner/Controls/Editors/frmDatasourceEditor.Designer.vb (100%) rename {EDMI_ClientSuite => GUIs.ClientSuite}/FormDesigner/Controls/Editors/frmDatasourceEditor.resx (100%) rename {EDMI_ClientSuite => GUIs.ClientSuite}/FormDesigner/Controls/Editors/frmDatasourceEditor.vb (100%) rename {EDMI_ClientSuite => GUIs.ClientSuite}/FormDesigner/Controls/Editors/frmStaticListEditor.Designer.vb (100%) rename {EDMI_ClientSuite => GUIs.ClientSuite}/FormDesigner/Controls/Editors/frmStaticListEditor.en-US.resx (100%) rename {EDMI_ClientSuite => GUIs.ClientSuite}/FormDesigner/Controls/Editors/frmStaticListEditor.resx (100%) rename {EDMI_ClientSuite => GUIs.ClientSuite}/FormDesigner/Controls/Editors/frmStaticListEditor.vb (100%) rename {EDMI_ClientSuite => GUIs.ClientSuite}/FormDesigner/Controls/Loader.vb (100%) rename {EDMI_ClientSuite => GUIs.ClientSuite}/FormDesigner/Controls/Localization.vb (100%) rename {EDMI_ClientSuite => GUIs.ClientSuite}/FormDesigner/Controls/Metadata.vb (100%) rename {EDMI_ClientSuite => GUIs.ClientSuite}/FormDesigner/Controls/Properties/BaseProperties.vb (100%) rename {EDMI_ClientSuite => GUIs.ClientSuite}/FormDesigner/Controls/Properties/CheckboxProperties.vb (100%) rename {EDMI_ClientSuite => GUIs.ClientSuite}/FormDesigner/Controls/Properties/ComboboxProperties.vb (100%) rename {EDMI_ClientSuite => GUIs.ClientSuite}/FormDesigner/Controls/Properties/DatepickerProperties.vb (100%) rename {EDMI_ClientSuite => GUIs.ClientSuite}/FormDesigner/Controls/Properties/MemoeditProperties.vb (100%) rename {EDMI_ClientSuite => GUIs.ClientSuite}/FormDesigner/Controls/Properties/TextboxProperties.vb (100%) rename {EDMI_ClientSuite => GUIs.ClientSuite}/FormDesigner/frmFormDesigner.Designer.vb (100%) rename {EDMI_ClientSuite => GUIs.ClientSuite}/FormDesigner/frmFormDesigner.resx (100%) rename {EDMI_ClientSuite => GUIs.ClientSuite}/FormDesigner/frmFormDesigner.vb (100%) rename {EDMI_ClientSuite => GUIs.ClientSuite}/FormUserManager/UserControlAssignment.Designer.vb (100%) rename {EDMI_ClientSuite => GUIs.ClientSuite}/FormUserManager/UserControlAssignment.resx (100%) rename {EDMI_ClientSuite => GUIs.ClientSuite}/FormUserManager/UserControlAssignment.vb (100%) rename {EDMI_ClientSuite => GUIs.ClientSuite}/FormUserManager/frmUserManager.Designer.vb (100%) rename {EDMI_ClientSuite => GUIs.ClientSuite}/FormUserManager/frmUserManager.resx (100%) rename {EDMI_ClientSuite => GUIs.ClientSuite}/FormUserManager/frmUserManager.vb (100%) rename {EDMI_ClientSuite => GUIs.ClientSuite}/FormWorkflow/frmWorkflowStep.Designer.vb (100%) rename {EDMI_ClientSuite => GUIs.ClientSuite}/FormWorkflow/frmWorkflowStep.resx (100%) rename {EDMI_ClientSuite => GUIs.ClientSuite}/FormWorkflow/frmWorkflowStep.vb (100%) rename {EDMI_ClientSuite => GUIs.ClientSuite}/My Project/Application.Designer.vb (100%) rename {EDMI_ClientSuite => GUIs.ClientSuite}/My Project/Application.myapp (100%) rename {EDMI_ClientSuite => GUIs.ClientSuite}/My Project/AssemblyInfo.vb (100%) rename {EDMI_ClientSuite => GUIs.ClientSuite}/My Project/Resources.Designer.vb (100%) rename {EDMI_ClientSuite => GUIs.ClientSuite}/My Project/Resources.resx (100%) rename {EDMI_ClientSuite => GUIs.ClientSuite}/My Project/Settings.Designer.vb (100%) rename {EDMI_ClientSuite => GUIs.ClientSuite}/My Project/Settings.settings (100%) rename {EDMI_ClientSuite => GUIs.ClientSuite}/My Project/app.manifest (100%) rename {EDMI_ClientSuite => GUIs.ClientSuite}/My Project/licenses.licx (100%) rename {EDMI_ClientSuite => GUIs.ClientSuite}/MyApplication.vb (100%) rename {EDMI_ClientSuite => GUIs.ClientSuite}/Panels/BasePanel.Designer.vb (100%) rename {EDMI_ClientSuite => GUIs.ClientSuite}/Panels/BasePanel.vb (100%) rename {EDMI_ClientSuite => GUIs.ClientSuite}/Panels/DocumentPanel.Designer.vb (100%) rename {EDMI_ClientSuite => GUIs.ClientSuite}/Panels/DocumentPanel.resx (100%) rename {EDMI_ClientSuite => GUIs.ClientSuite}/Panels/DocumentPanel.vb (100%) rename {EDMI_ClientSuite => GUIs.ClientSuite}/Panels/PanelInfo.vb (100%) rename {EDMI_ClientSuite => GUIs.ClientSuite}/Resources/CheckBox.png (100%) rename {EDMI_ClientSuite => GUIs.ClientSuite}/Resources/ComboBox.png (100%) rename {EDMI_ClientSuite => GUIs.ClientSuite}/Resources/DatePicker.png (100%) rename {EDMI_ClientSuite => GUIs.ClientSuite}/Resources/TextBox.png (100%) rename {EDMI_ClientSuite => GUIs.ClientSuite}/Resources/email_go.png (100%) rename {EDMI_ClientSuite => GUIs.ClientSuite}/Resources/folder_go.png (100%) rename {EDMI_ClientSuite => GUIs.ClientSuite}/Resources/iconfinder_Gowalla_324477.png (100%) rename {EDMI_ClientSuite => GUIs.ClientSuite}/Resources/user_16xLG.png (100%) rename {EDMI_ClientSuite => GUIs.ClientSuite}/State/ClassServiceState.vb (100%) rename {EDMI_ClientSuite => GUIs.ClientSuite}/State/ClassUserState.vb (100%) rename {EDMI_ClientSuite => GUIs.ClientSuite}/Strings/ControlProperties.Designer.vb (100%) rename {EDMI_ClientSuite => GUIs.ClientSuite}/Strings/ControlProperties.en.Designer.vb (100%) rename {EDMI_ClientSuite => GUIs.ClientSuite}/Strings/ControlProperties.en.resx (100%) rename {EDMI_ClientSuite => GUIs.ClientSuite}/Strings/ControlProperties.resx (100%) rename {EDMI_ClientSuite => GUIs.ClientSuite}/Widgets/ProcessManagerWidget.Designer.vb (100%) rename {EDMI_ClientSuite => GUIs.ClientSuite}/Widgets/ProcessManagerWidget.resx (100%) rename {EDMI_ClientSuite => GUIs.ClientSuite}/Widgets/ProcessManagerWidget.vb (100%) rename {EDMI_ClientSuite => GUIs.ClientSuite}/_TEST/DockManagerTest.Designer.vb (100%) rename {EDMI_ClientSuite => GUIs.ClientSuite}/_TEST/DockManagerTest.resx (100%) rename {EDMI_ClientSuite => GUIs.ClientSuite}/_TEST/DockManagerTest.vb (100%) rename {EDMI_ClientSuite => GUIs.ClientSuite}/_TEST/frmDocTest.Designer.vb (100%) rename {EDMI_ClientSuite => GUIs.ClientSuite}/_TEST/frmDocTest.resx (100%) rename {EDMI_ClientSuite => GUIs.ClientSuite}/_TEST/frmDocTest.vb (100%) rename {EDMI_ClientSuite => GUIs.ClientSuite}/_TEST/frmFileTest.Designer.vb (100%) rename {EDMI_ClientSuite => GUIs.ClientSuite}/_TEST/frmFileTest.resx (100%) rename {EDMI_ClientSuite => GUIs.ClientSuite}/_TEST/frmFileTest.vb (100%) rename {EDMI_ClientSuite => GUIs.ClientSuite}/_TEST/frmWorkflowTest.Designer.vb (100%) rename {EDMI_ClientSuite => GUIs.ClientSuite}/_TEST/frmWorkflowTest.resx (100%) rename {EDMI_ClientSuite => GUIs.ClientSuite}/_TEST/frmWorkflowTest.vb (100%) rename {EDMI_ClientSuite => GUIs.ClientSuite}/frmConfigService.Designer.vb (100%) rename {EDMI_ClientSuite => GUIs.ClientSuite}/frmConfigService.resx (100%) rename {EDMI_ClientSuite => GUIs.ClientSuite}/frmConfigService.vb (100%) rename {EDMI_ClientSuite => GUIs.ClientSuite}/frmConfigUser.Designer.vb (100%) rename {EDMI_ClientSuite => GUIs.ClientSuite}/frmConfigUser.resx (100%) rename {EDMI_ClientSuite => GUIs.ClientSuite}/frmConfigUser.vb (100%) rename {EDMI_ClientSuite => GUIs.ClientSuite}/frmHome.Designer.vb (100%) rename {EDMI_ClientSuite => GUIs.ClientSuite}/frmHome.resx (100%) rename {EDMI_ClientSuite => GUIs.ClientSuite}/frmHome.vb (100%) rename {EDMI_ClientSuite => GUIs.ClientSuite}/frmMain.Designer.vb (100%) rename {EDMI_ClientSuite => GUIs.ClientSuite}/frmMain.resx (100%) rename {EDMI_ClientSuite => GUIs.ClientSuite}/frmMain.vb (100%) rename {EDMI_ClientSuite => GUIs.ClientSuite}/frmObjectEditor.Designer.vb (100%) rename {EDMI_ClientSuite => GUIs.ClientSuite}/frmObjectEditor.resx (100%) rename {EDMI_ClientSuite => GUIs.ClientSuite}/frmObjectEditor.vb (100%) rename {EDMI_ClientSuite => GUIs.ClientSuite}/frmSearch.Designer.vb (100%) rename {EDMI_ClientSuite => GUIs.ClientSuite}/frmSearch.resx (100%) rename {EDMI_ClientSuite => GUIs.ClientSuite}/frmSearch.vb (100%) rename {EDMI_ClientSuite => GUIs.ClientSuite}/frmSplash.designer.vb (100%) rename {EDMI_ClientSuite => GUIs.ClientSuite}/frmSplash.resx (100%) rename {EDMI_ClientSuite => GUIs.ClientSuite}/frmSplash.vb (100%) rename {EDMI_ClientSuite => GUIs.ClientSuite}/packages.config (100%) diff --git a/DDMonorepo.sln b/DDMonorepo.sln index c0f0d3c4..69952439 100644 --- a/DDMonorepo.sln +++ b/DDMonorepo.sln @@ -57,7 +57,7 @@ Project("{F184B08F-C81C-45F6-A57F-5ABD9991F28F}") = "DD_CommunicationService", " EndProject Project("{F184B08F-C81C-45F6-A57F-5ABD9991F28F}") = "GUI_EDMI", "GUI_EDMI\GUI_EDMI.vbproj", "{88EDAD5B-1B98-43E4-B068-1251E7AF01A0}" EndProject -Project("{F184B08F-C81C-45F6-A57F-5ABD9991F28F}") = "ClientSuite", "EDMI_ClientSuite\ClientSuite.vbproj", "{406C95F4-9FEA-45B6-8385-1768CDBBF1A7}" +Project("{F184B08F-C81C-45F6-A57F-5ABD9991F28F}") = "ClientSuite", "GUIs.ClientSuite\ClientSuite.vbproj", "{406C95F4-9FEA-45B6-8385-1768CDBBF1A7}" EndProject Project("{F184B08F-C81C-45F6-A57F-5ABD9991F28F}") = "DDEDMService", "SERVICES\DDEDM_NetworkService\DDEDMService.vbproj", "{A8C3F298-76AB-4359-AB3C-986E313B4336}" EndProject @@ -71,6 +71,8 @@ Project("{F184B08F-C81C-45F6-A57F-5ABD9991F28F}") = "ADSyncTest", "ADSyncTest\AD EndProject Project("{F184B08F-C81C-45F6-A57F-5ABD9991F28F}") = "JobRunner", "JobRunner\JobRunner.vbproj", "{59461E98-A5AF-438C-A651-5021ACAE82AD}" EndProject +Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "GUIs.Test", "GUIs.Test", "{CC368D6A-6AC4-4EB9-A092-14700FABEF7A}" +EndProject Global GlobalSection(SolutionConfigurationPlatforms) = preSolution Debug|Any CPU = Debug|Any CPU @@ -182,10 +184,10 @@ Global HideSolutionNode = FALSE EndGlobalSection GlobalSection(NestedProjects) = preSolution - {5284F4E5-A6C1-4BCF-896F-3ABEA985B741} = {8FFE925E-8B84-45F1-93CB-32B1C96F41EB} + {5284F4E5-A6C1-4BCF-896F-3ABEA985B741} = {CC368D6A-6AC4-4EB9-A092-14700FABEF7A} {903B2D7D-3B80-4BE9-8713-7447B704E1B0} = {3E2008C8-27B1-41DD-9B1A-0C4029F6AECC} {4C86DF8F-A280-40D4-85B0-10B1BF66C15C} = {3E2008C8-27B1-41DD-9B1A-0C4029F6AECC} - {93130E7D-A950-4CBD-A0D9-7A6FAF94DDC0} = {8FFE925E-8B84-45F1-93CB-32B1C96F41EB} + {93130E7D-A950-4CBD-A0D9-7A6FAF94DDC0} = {CC368D6A-6AC4-4EB9-A092-14700FABEF7A} {EAF0EA75-5FA7-485D-89C7-B2D843B03A96} = {3E2008C8-27B1-41DD-9B1A-0C4029F6AECC} {AF664D85-0A4B-4BAB-A2F8-83110C06553A} = {3E2008C8-27B1-41DD-9B1A-0C4029F6AECC} {63B0EAA3-8BF5-46DA-9040-15E781F4C3B1} = {7AF3F9C2-C939-4A08-95C1-0453207E298A} @@ -196,16 +198,16 @@ Global {3207D8E7-36E3-4714-9B03-7B5B3D6D351A} = {3E2008C8-27B1-41DD-9B1A-0C4029F6AECC} {7DEEC36E-EA5F-4711-AD1E-FD8894F4AD77} = {7AF3F9C2-C939-4A08-95C1-0453207E298A} {AB6F09BF-E794-4F6A-94BB-C97C0BA84D64} = {3E2008C8-27B1-41DD-9B1A-0C4029F6AECC} - {16156434-E471-43F1-8030-76A0DA17CD5A} = {8FFE925E-8B84-45F1-93CB-32B1C96F41EB} + {16156434-E471-43F1-8030-76A0DA17CD5A} = {CC368D6A-6AC4-4EB9-A092-14700FABEF7A} {39EC839A-3C30-4922-A41E-6B09D1DDE5C3} = {3E2008C8-27B1-41DD-9B1A-0C4029F6AECC} {1FB2854F-C050-427D-9FAC-1D8F232E8025} = {7AF3F9C2-C939-4A08-95C1-0453207E298A} - {88EDAD5B-1B98-43E4-B068-1251E7AF01A0} = {8FFE925E-8B84-45F1-93CB-32B1C96F41EB} + {88EDAD5B-1B98-43E4-B068-1251E7AF01A0} = {CC368D6A-6AC4-4EB9-A092-14700FABEF7A} {406C95F4-9FEA-45B6-8385-1768CDBBF1A7} = {8FFE925E-8B84-45F1-93CB-32B1C96F41EB} {A8C3F298-76AB-4359-AB3C-986E313B4336} = {7AF3F9C2-C939-4A08-95C1-0453207E298A} {5B1171DC-FFFE-4813-A20D-786AAE47B320} = {3E2008C8-27B1-41DD-9B1A-0C4029F6AECC} {CBE9322E-67A1-4CC5-B25F-4A1B4C9FC55C} = {7AF3F9C2-C939-4A08-95C1-0453207E298A} {5EBACBFA-F11A-4BBF-8D02-91461F2293ED} = {3E2008C8-27B1-41DD-9B1A-0C4029F6AECC} - {7386AB04-DF8D-4DFB-809D-1FAC8212CB7E} = {8FFE925E-8B84-45F1-93CB-32B1C96F41EB} + {7386AB04-DF8D-4DFB-809D-1FAC8212CB7E} = {CC368D6A-6AC4-4EB9-A092-14700FABEF7A} {59461E98-A5AF-438C-A651-5021ACAE82AD} = {7AF3F9C2-C939-4A08-95C1-0453207E298A} EndGlobalSection GlobalSection(ExtensibilityGlobals) = postSolution diff --git a/EDMI_ClientSuite/App.config b/GUIs.ClientSuite/App.config similarity index 100% rename from EDMI_ClientSuite/App.config rename to GUIs.ClientSuite/App.config diff --git a/EDMI_ClientSuite/ApplicationEvents.vb b/GUIs.ClientSuite/ApplicationEvents.vb similarity index 100% rename from EDMI_ClientSuite/ApplicationEvents.vb rename to GUIs.ClientSuite/ApplicationEvents.vb diff --git a/EDMI_ClientSuite/Base/BaseClass.vb b/GUIs.ClientSuite/Base/BaseClass.vb similarity index 100% rename from EDMI_ClientSuite/Base/BaseClass.vb rename to GUIs.ClientSuite/Base/BaseClass.vb diff --git a/EDMI_ClientSuite/Base/BaseForm.resx b/GUIs.ClientSuite/Base/BaseForm.resx similarity index 100% rename from EDMI_ClientSuite/Base/BaseForm.resx rename to GUIs.ClientSuite/Base/BaseForm.resx diff --git a/EDMI_ClientSuite/Base/BaseForm.vb b/GUIs.ClientSuite/Base/BaseForm.vb similarity index 100% rename from EDMI_ClientSuite/Base/BaseForm.vb rename to GUIs.ClientSuite/Base/BaseForm.vb diff --git a/EDMI_ClientSuite/Base/BaseRibbonForm.vb b/GUIs.ClientSuite/Base/BaseRibbonForm.vb similarity index 100% rename from EDMI_ClientSuite/Base/BaseRibbonForm.vb rename to GUIs.ClientSuite/Base/BaseRibbonForm.vb diff --git a/EDMI_ClientSuite/ClassConfig.vb b/GUIs.ClientSuite/ClassConfig.vb similarity index 100% rename from EDMI_ClientSuite/ClassConfig.vb rename to GUIs.ClientSuite/ClassConfig.vb diff --git a/EDMI_ClientSuite/ClassConstants.vb b/GUIs.ClientSuite/ClassConstants.vb similarity index 100% rename from EDMI_ClientSuite/ClassConstants.vb rename to GUIs.ClientSuite/ClassConstants.vb diff --git a/EDMI_ClientSuite/ClassControlManager.vb b/GUIs.ClientSuite/ClassControlManager.vb similarity index 100% rename from EDMI_ClientSuite/ClassControlManager.vb rename to GUIs.ClientSuite/ClassControlManager.vb diff --git a/EDMI_ClientSuite/ClassControlPatcher.vb b/GUIs.ClientSuite/ClassControlPatcher.vb similarity index 100% rename from EDMI_ClientSuite/ClassControlPatcher.vb rename to GUIs.ClientSuite/ClassControlPatcher.vb diff --git a/EDMI_ClientSuite/ClassDragDrop.vb b/GUIs.ClientSuite/ClassDragDrop.vb similarity index 100% rename from EDMI_ClientSuite/ClassDragDrop.vb rename to GUIs.ClientSuite/ClassDragDrop.vb diff --git a/EDMI_ClientSuite/ClassErrorHandler.vb b/GUIs.ClientSuite/ClassErrorHandler.vb similarity index 100% rename from EDMI_ClientSuite/ClassErrorHandler.vb rename to GUIs.ClientSuite/ClassErrorHandler.vb diff --git a/EDMI_ClientSuite/ClassLayout.vb b/GUIs.ClientSuite/ClassLayout.vb similarity index 100% rename from EDMI_ClientSuite/ClassLayout.vb rename to GUIs.ClientSuite/ClassLayout.vb diff --git a/EDMI_ClientSuite/ClassPanelManager.vb b/GUIs.ClientSuite/ClassPanelManager.vb similarity index 100% rename from EDMI_ClientSuite/ClassPanelManager.vb rename to GUIs.ClientSuite/ClassPanelManager.vb diff --git a/EDMI_ClientSuite/ClassService.vb b/GUIs.ClientSuite/ClassService.vb similarity index 100% rename from EDMI_ClientSuite/ClassService.vb rename to GUIs.ClientSuite/ClassService.vb diff --git a/EDMI_ClientSuite/ClassTimer.vb b/GUIs.ClientSuite/ClassTimer.vb similarity index 100% rename from EDMI_ClientSuite/ClassTimer.vb rename to GUIs.ClientSuite/ClassTimer.vb diff --git a/EDMI_ClientSuite/ClassUIConfig.vb b/GUIs.ClientSuite/ClassUIConfig.vb similarity index 100% rename from EDMI_ClientSuite/ClassUIConfig.vb rename to GUIs.ClientSuite/ClassUIConfig.vb diff --git a/EDMI_ClientSuite/ClassUtils.vb b/GUIs.ClientSuite/ClassUtils.vb similarity index 100% rename from EDMI_ClientSuite/ClassUtils.vb rename to GUIs.ClientSuite/ClassUtils.vb diff --git a/EDMI_ClientSuite/ClientSuite.vbproj b/GUIs.ClientSuite/ClientSuite.vbproj similarity index 100% rename from EDMI_ClientSuite/ClientSuite.vbproj rename to GUIs.ClientSuite/ClientSuite.vbproj diff --git a/EDMI_ClientSuite/Common/ClassCommon.vb b/GUIs.ClientSuite/Common/ClassCommon.vb similarity index 100% rename from EDMI_ClientSuite/Common/ClassCommon.vb rename to GUIs.ClientSuite/Common/ClassCommon.vb diff --git a/EDMI_ClientSuite/Common/ClassCommonCommands.vb b/GUIs.ClientSuite/Common/ClassCommonCommands.vb similarity index 100% rename from EDMI_ClientSuite/Common/ClassCommonCommands.vb rename to GUIs.ClientSuite/Common/ClassCommonCommands.vb diff --git a/EDMI_ClientSuite/Common/ClassCommonViews.vb b/GUIs.ClientSuite/Common/ClassCommonViews.vb similarity index 100% rename from EDMI_ClientSuite/Common/ClassCommonViews.vb rename to GUIs.ClientSuite/Common/ClassCommonViews.vb diff --git a/EDMI_ClientSuite/ControlDefaults/GridControlDefaults.vb b/GUIs.ClientSuite/ControlDefaults/GridControlDefaults.vb similarity index 100% rename from EDMI_ClientSuite/ControlDefaults/GridControlDefaults.vb rename to GUIs.ClientSuite/ControlDefaults/GridControlDefaults.vb diff --git a/EDMI_ClientSuite/ControlDefaults/TreeListDefaults.vb b/GUIs.ClientSuite/ControlDefaults/TreeListDefaults.vb similarity index 100% rename from EDMI_ClientSuite/ControlDefaults/TreeListDefaults.vb rename to GUIs.ClientSuite/ControlDefaults/TreeListDefaults.vb diff --git a/EDMI_ClientSuite/FormDesigner/Controls/Data.vb b/GUIs.ClientSuite/FormDesigner/Controls/Data.vb similarity index 100% rename from EDMI_ClientSuite/FormDesigner/Controls/Data.vb rename to GUIs.ClientSuite/FormDesigner/Controls/Data.vb diff --git a/EDMI_ClientSuite/FormDesigner/Controls/Editors/DatasourceEditor.vb b/GUIs.ClientSuite/FormDesigner/Controls/Editors/DatasourceEditor.vb similarity index 100% rename from EDMI_ClientSuite/FormDesigner/Controls/Editors/DatasourceEditor.vb rename to GUIs.ClientSuite/FormDesigner/Controls/Editors/DatasourceEditor.vb diff --git a/EDMI_ClientSuite/FormDesigner/Controls/Editors/DatasourceType.vb b/GUIs.ClientSuite/FormDesigner/Controls/Editors/DatasourceType.vb similarity index 100% rename from EDMI_ClientSuite/FormDesigner/Controls/Editors/DatasourceType.vb rename to GUIs.ClientSuite/FormDesigner/Controls/Editors/DatasourceType.vb diff --git a/EDMI_ClientSuite/FormDesigner/Controls/Editors/StaticListEditor.vb b/GUIs.ClientSuite/FormDesigner/Controls/Editors/StaticListEditor.vb similarity index 100% rename from EDMI_ClientSuite/FormDesigner/Controls/Editors/StaticListEditor.vb rename to GUIs.ClientSuite/FormDesigner/Controls/Editors/StaticListEditor.vb diff --git a/EDMI_ClientSuite/FormDesigner/Controls/Editors/frmDatasourceEditor.Designer.vb b/GUIs.ClientSuite/FormDesigner/Controls/Editors/frmDatasourceEditor.Designer.vb similarity index 100% rename from EDMI_ClientSuite/FormDesigner/Controls/Editors/frmDatasourceEditor.Designer.vb rename to GUIs.ClientSuite/FormDesigner/Controls/Editors/frmDatasourceEditor.Designer.vb diff --git a/EDMI_ClientSuite/FormDesigner/Controls/Editors/frmDatasourceEditor.resx b/GUIs.ClientSuite/FormDesigner/Controls/Editors/frmDatasourceEditor.resx similarity index 100% rename from EDMI_ClientSuite/FormDesigner/Controls/Editors/frmDatasourceEditor.resx rename to GUIs.ClientSuite/FormDesigner/Controls/Editors/frmDatasourceEditor.resx diff --git a/EDMI_ClientSuite/FormDesigner/Controls/Editors/frmDatasourceEditor.vb b/GUIs.ClientSuite/FormDesigner/Controls/Editors/frmDatasourceEditor.vb similarity index 100% rename from EDMI_ClientSuite/FormDesigner/Controls/Editors/frmDatasourceEditor.vb rename to GUIs.ClientSuite/FormDesigner/Controls/Editors/frmDatasourceEditor.vb diff --git a/EDMI_ClientSuite/FormDesigner/Controls/Editors/frmStaticListEditor.Designer.vb b/GUIs.ClientSuite/FormDesigner/Controls/Editors/frmStaticListEditor.Designer.vb similarity index 100% rename from EDMI_ClientSuite/FormDesigner/Controls/Editors/frmStaticListEditor.Designer.vb rename to GUIs.ClientSuite/FormDesigner/Controls/Editors/frmStaticListEditor.Designer.vb diff --git a/EDMI_ClientSuite/FormDesigner/Controls/Editors/frmStaticListEditor.en-US.resx b/GUIs.ClientSuite/FormDesigner/Controls/Editors/frmStaticListEditor.en-US.resx similarity index 100% rename from EDMI_ClientSuite/FormDesigner/Controls/Editors/frmStaticListEditor.en-US.resx rename to GUIs.ClientSuite/FormDesigner/Controls/Editors/frmStaticListEditor.en-US.resx diff --git a/EDMI_ClientSuite/FormDesigner/Controls/Editors/frmStaticListEditor.resx b/GUIs.ClientSuite/FormDesigner/Controls/Editors/frmStaticListEditor.resx similarity index 100% rename from EDMI_ClientSuite/FormDesigner/Controls/Editors/frmStaticListEditor.resx rename to GUIs.ClientSuite/FormDesigner/Controls/Editors/frmStaticListEditor.resx diff --git a/EDMI_ClientSuite/FormDesigner/Controls/Editors/frmStaticListEditor.vb b/GUIs.ClientSuite/FormDesigner/Controls/Editors/frmStaticListEditor.vb similarity index 100% rename from EDMI_ClientSuite/FormDesigner/Controls/Editors/frmStaticListEditor.vb rename to GUIs.ClientSuite/FormDesigner/Controls/Editors/frmStaticListEditor.vb diff --git a/EDMI_ClientSuite/FormDesigner/Controls/Loader.vb b/GUIs.ClientSuite/FormDesigner/Controls/Loader.vb similarity index 100% rename from EDMI_ClientSuite/FormDesigner/Controls/Loader.vb rename to GUIs.ClientSuite/FormDesigner/Controls/Loader.vb diff --git a/EDMI_ClientSuite/FormDesigner/Controls/Localization.vb b/GUIs.ClientSuite/FormDesigner/Controls/Localization.vb similarity index 100% rename from EDMI_ClientSuite/FormDesigner/Controls/Localization.vb rename to GUIs.ClientSuite/FormDesigner/Controls/Localization.vb diff --git a/EDMI_ClientSuite/FormDesigner/Controls/Metadata.vb b/GUIs.ClientSuite/FormDesigner/Controls/Metadata.vb similarity index 100% rename from EDMI_ClientSuite/FormDesigner/Controls/Metadata.vb rename to GUIs.ClientSuite/FormDesigner/Controls/Metadata.vb diff --git a/EDMI_ClientSuite/FormDesigner/Controls/Properties/BaseProperties.vb b/GUIs.ClientSuite/FormDesigner/Controls/Properties/BaseProperties.vb similarity index 100% rename from EDMI_ClientSuite/FormDesigner/Controls/Properties/BaseProperties.vb rename to GUIs.ClientSuite/FormDesigner/Controls/Properties/BaseProperties.vb diff --git a/EDMI_ClientSuite/FormDesigner/Controls/Properties/CheckboxProperties.vb b/GUIs.ClientSuite/FormDesigner/Controls/Properties/CheckboxProperties.vb similarity index 100% rename from EDMI_ClientSuite/FormDesigner/Controls/Properties/CheckboxProperties.vb rename to GUIs.ClientSuite/FormDesigner/Controls/Properties/CheckboxProperties.vb diff --git a/EDMI_ClientSuite/FormDesigner/Controls/Properties/ComboboxProperties.vb b/GUIs.ClientSuite/FormDesigner/Controls/Properties/ComboboxProperties.vb similarity index 100% rename from EDMI_ClientSuite/FormDesigner/Controls/Properties/ComboboxProperties.vb rename to GUIs.ClientSuite/FormDesigner/Controls/Properties/ComboboxProperties.vb diff --git a/EDMI_ClientSuite/FormDesigner/Controls/Properties/DatepickerProperties.vb b/GUIs.ClientSuite/FormDesigner/Controls/Properties/DatepickerProperties.vb similarity index 100% rename from EDMI_ClientSuite/FormDesigner/Controls/Properties/DatepickerProperties.vb rename to GUIs.ClientSuite/FormDesigner/Controls/Properties/DatepickerProperties.vb diff --git a/EDMI_ClientSuite/FormDesigner/Controls/Properties/MemoeditProperties.vb b/GUIs.ClientSuite/FormDesigner/Controls/Properties/MemoeditProperties.vb similarity index 100% rename from EDMI_ClientSuite/FormDesigner/Controls/Properties/MemoeditProperties.vb rename to GUIs.ClientSuite/FormDesigner/Controls/Properties/MemoeditProperties.vb diff --git a/EDMI_ClientSuite/FormDesigner/Controls/Properties/TextboxProperties.vb b/GUIs.ClientSuite/FormDesigner/Controls/Properties/TextboxProperties.vb similarity index 100% rename from EDMI_ClientSuite/FormDesigner/Controls/Properties/TextboxProperties.vb rename to GUIs.ClientSuite/FormDesigner/Controls/Properties/TextboxProperties.vb diff --git a/EDMI_ClientSuite/FormDesigner/frmFormDesigner.Designer.vb b/GUIs.ClientSuite/FormDesigner/frmFormDesigner.Designer.vb similarity index 100% rename from EDMI_ClientSuite/FormDesigner/frmFormDesigner.Designer.vb rename to GUIs.ClientSuite/FormDesigner/frmFormDesigner.Designer.vb diff --git a/EDMI_ClientSuite/FormDesigner/frmFormDesigner.resx b/GUIs.ClientSuite/FormDesigner/frmFormDesigner.resx similarity index 100% rename from EDMI_ClientSuite/FormDesigner/frmFormDesigner.resx rename to GUIs.ClientSuite/FormDesigner/frmFormDesigner.resx diff --git a/EDMI_ClientSuite/FormDesigner/frmFormDesigner.vb b/GUIs.ClientSuite/FormDesigner/frmFormDesigner.vb similarity index 100% rename from EDMI_ClientSuite/FormDesigner/frmFormDesigner.vb rename to GUIs.ClientSuite/FormDesigner/frmFormDesigner.vb diff --git a/EDMI_ClientSuite/FormUserManager/UserControlAssignment.Designer.vb b/GUIs.ClientSuite/FormUserManager/UserControlAssignment.Designer.vb similarity index 100% rename from EDMI_ClientSuite/FormUserManager/UserControlAssignment.Designer.vb rename to GUIs.ClientSuite/FormUserManager/UserControlAssignment.Designer.vb diff --git a/EDMI_ClientSuite/FormUserManager/UserControlAssignment.resx b/GUIs.ClientSuite/FormUserManager/UserControlAssignment.resx similarity index 100% rename from EDMI_ClientSuite/FormUserManager/UserControlAssignment.resx rename to GUIs.ClientSuite/FormUserManager/UserControlAssignment.resx diff --git a/EDMI_ClientSuite/FormUserManager/UserControlAssignment.vb b/GUIs.ClientSuite/FormUserManager/UserControlAssignment.vb similarity index 100% rename from EDMI_ClientSuite/FormUserManager/UserControlAssignment.vb rename to GUIs.ClientSuite/FormUserManager/UserControlAssignment.vb diff --git a/EDMI_ClientSuite/FormUserManager/frmUserManager.Designer.vb b/GUIs.ClientSuite/FormUserManager/frmUserManager.Designer.vb similarity index 100% rename from EDMI_ClientSuite/FormUserManager/frmUserManager.Designer.vb rename to GUIs.ClientSuite/FormUserManager/frmUserManager.Designer.vb diff --git a/EDMI_ClientSuite/FormUserManager/frmUserManager.resx b/GUIs.ClientSuite/FormUserManager/frmUserManager.resx similarity index 100% rename from EDMI_ClientSuite/FormUserManager/frmUserManager.resx rename to GUIs.ClientSuite/FormUserManager/frmUserManager.resx diff --git a/EDMI_ClientSuite/FormUserManager/frmUserManager.vb b/GUIs.ClientSuite/FormUserManager/frmUserManager.vb similarity index 100% rename from EDMI_ClientSuite/FormUserManager/frmUserManager.vb rename to GUIs.ClientSuite/FormUserManager/frmUserManager.vb diff --git a/EDMI_ClientSuite/FormWorkflow/frmWorkflowStep.Designer.vb b/GUIs.ClientSuite/FormWorkflow/frmWorkflowStep.Designer.vb similarity index 100% rename from EDMI_ClientSuite/FormWorkflow/frmWorkflowStep.Designer.vb rename to GUIs.ClientSuite/FormWorkflow/frmWorkflowStep.Designer.vb diff --git a/EDMI_ClientSuite/FormWorkflow/frmWorkflowStep.resx b/GUIs.ClientSuite/FormWorkflow/frmWorkflowStep.resx similarity index 100% rename from EDMI_ClientSuite/FormWorkflow/frmWorkflowStep.resx rename to GUIs.ClientSuite/FormWorkflow/frmWorkflowStep.resx diff --git a/EDMI_ClientSuite/FormWorkflow/frmWorkflowStep.vb b/GUIs.ClientSuite/FormWorkflow/frmWorkflowStep.vb similarity index 100% rename from EDMI_ClientSuite/FormWorkflow/frmWorkflowStep.vb rename to GUIs.ClientSuite/FormWorkflow/frmWorkflowStep.vb diff --git a/EDMI_ClientSuite/My Project/Application.Designer.vb b/GUIs.ClientSuite/My Project/Application.Designer.vb similarity index 100% rename from EDMI_ClientSuite/My Project/Application.Designer.vb rename to GUIs.ClientSuite/My Project/Application.Designer.vb diff --git a/EDMI_ClientSuite/My Project/Application.myapp b/GUIs.ClientSuite/My Project/Application.myapp similarity index 100% rename from EDMI_ClientSuite/My Project/Application.myapp rename to GUIs.ClientSuite/My Project/Application.myapp diff --git a/EDMI_ClientSuite/My Project/AssemblyInfo.vb b/GUIs.ClientSuite/My Project/AssemblyInfo.vb similarity index 100% rename from EDMI_ClientSuite/My Project/AssemblyInfo.vb rename to GUIs.ClientSuite/My Project/AssemblyInfo.vb diff --git a/EDMI_ClientSuite/My Project/Resources.Designer.vb b/GUIs.ClientSuite/My Project/Resources.Designer.vb similarity index 100% rename from EDMI_ClientSuite/My Project/Resources.Designer.vb rename to GUIs.ClientSuite/My Project/Resources.Designer.vb diff --git a/EDMI_ClientSuite/My Project/Resources.resx b/GUIs.ClientSuite/My Project/Resources.resx similarity index 100% rename from EDMI_ClientSuite/My Project/Resources.resx rename to GUIs.ClientSuite/My Project/Resources.resx diff --git a/EDMI_ClientSuite/My Project/Settings.Designer.vb b/GUIs.ClientSuite/My Project/Settings.Designer.vb similarity index 100% rename from EDMI_ClientSuite/My Project/Settings.Designer.vb rename to GUIs.ClientSuite/My Project/Settings.Designer.vb diff --git a/EDMI_ClientSuite/My Project/Settings.settings b/GUIs.ClientSuite/My Project/Settings.settings similarity index 100% rename from EDMI_ClientSuite/My Project/Settings.settings rename to GUIs.ClientSuite/My Project/Settings.settings diff --git a/EDMI_ClientSuite/My Project/app.manifest b/GUIs.ClientSuite/My Project/app.manifest similarity index 100% rename from EDMI_ClientSuite/My Project/app.manifest rename to GUIs.ClientSuite/My Project/app.manifest diff --git a/EDMI_ClientSuite/My Project/licenses.licx b/GUIs.ClientSuite/My Project/licenses.licx similarity index 100% rename from EDMI_ClientSuite/My Project/licenses.licx rename to GUIs.ClientSuite/My Project/licenses.licx diff --git a/EDMI_ClientSuite/MyApplication.vb b/GUIs.ClientSuite/MyApplication.vb similarity index 100% rename from EDMI_ClientSuite/MyApplication.vb rename to GUIs.ClientSuite/MyApplication.vb diff --git a/EDMI_ClientSuite/Panels/BasePanel.Designer.vb b/GUIs.ClientSuite/Panels/BasePanel.Designer.vb similarity index 100% rename from EDMI_ClientSuite/Panels/BasePanel.Designer.vb rename to GUIs.ClientSuite/Panels/BasePanel.Designer.vb diff --git a/EDMI_ClientSuite/Panels/BasePanel.vb b/GUIs.ClientSuite/Panels/BasePanel.vb similarity index 100% rename from EDMI_ClientSuite/Panels/BasePanel.vb rename to GUIs.ClientSuite/Panels/BasePanel.vb diff --git a/EDMI_ClientSuite/Panels/DocumentPanel.Designer.vb b/GUIs.ClientSuite/Panels/DocumentPanel.Designer.vb similarity index 100% rename from EDMI_ClientSuite/Panels/DocumentPanel.Designer.vb rename to GUIs.ClientSuite/Panels/DocumentPanel.Designer.vb diff --git a/EDMI_ClientSuite/Panels/DocumentPanel.resx b/GUIs.ClientSuite/Panels/DocumentPanel.resx similarity index 100% rename from EDMI_ClientSuite/Panels/DocumentPanel.resx rename to GUIs.ClientSuite/Panels/DocumentPanel.resx diff --git a/EDMI_ClientSuite/Panels/DocumentPanel.vb b/GUIs.ClientSuite/Panels/DocumentPanel.vb similarity index 100% rename from EDMI_ClientSuite/Panels/DocumentPanel.vb rename to GUIs.ClientSuite/Panels/DocumentPanel.vb diff --git a/EDMI_ClientSuite/Panels/PanelInfo.vb b/GUIs.ClientSuite/Panels/PanelInfo.vb similarity index 100% rename from EDMI_ClientSuite/Panels/PanelInfo.vb rename to GUIs.ClientSuite/Panels/PanelInfo.vb diff --git a/EDMI_ClientSuite/Resources/CheckBox.png b/GUIs.ClientSuite/Resources/CheckBox.png similarity index 100% rename from EDMI_ClientSuite/Resources/CheckBox.png rename to GUIs.ClientSuite/Resources/CheckBox.png diff --git a/EDMI_ClientSuite/Resources/ComboBox.png b/GUIs.ClientSuite/Resources/ComboBox.png similarity index 100% rename from EDMI_ClientSuite/Resources/ComboBox.png rename to GUIs.ClientSuite/Resources/ComboBox.png diff --git a/EDMI_ClientSuite/Resources/DatePicker.png b/GUIs.ClientSuite/Resources/DatePicker.png similarity index 100% rename from EDMI_ClientSuite/Resources/DatePicker.png rename to GUIs.ClientSuite/Resources/DatePicker.png diff --git a/EDMI_ClientSuite/Resources/TextBox.png b/GUIs.ClientSuite/Resources/TextBox.png similarity index 100% rename from EDMI_ClientSuite/Resources/TextBox.png rename to GUIs.ClientSuite/Resources/TextBox.png diff --git a/EDMI_ClientSuite/Resources/email_go.png b/GUIs.ClientSuite/Resources/email_go.png similarity index 100% rename from EDMI_ClientSuite/Resources/email_go.png rename to GUIs.ClientSuite/Resources/email_go.png diff --git a/EDMI_ClientSuite/Resources/folder_go.png b/GUIs.ClientSuite/Resources/folder_go.png similarity index 100% rename from EDMI_ClientSuite/Resources/folder_go.png rename to GUIs.ClientSuite/Resources/folder_go.png diff --git a/EDMI_ClientSuite/Resources/iconfinder_Gowalla_324477.png b/GUIs.ClientSuite/Resources/iconfinder_Gowalla_324477.png similarity index 100% rename from EDMI_ClientSuite/Resources/iconfinder_Gowalla_324477.png rename to GUIs.ClientSuite/Resources/iconfinder_Gowalla_324477.png diff --git a/EDMI_ClientSuite/Resources/user_16xLG.png b/GUIs.ClientSuite/Resources/user_16xLG.png similarity index 100% rename from EDMI_ClientSuite/Resources/user_16xLG.png rename to GUIs.ClientSuite/Resources/user_16xLG.png diff --git a/EDMI_ClientSuite/State/ClassServiceState.vb b/GUIs.ClientSuite/State/ClassServiceState.vb similarity index 100% rename from EDMI_ClientSuite/State/ClassServiceState.vb rename to GUIs.ClientSuite/State/ClassServiceState.vb diff --git a/EDMI_ClientSuite/State/ClassUserState.vb b/GUIs.ClientSuite/State/ClassUserState.vb similarity index 100% rename from EDMI_ClientSuite/State/ClassUserState.vb rename to GUIs.ClientSuite/State/ClassUserState.vb diff --git a/EDMI_ClientSuite/Strings/ControlProperties.Designer.vb b/GUIs.ClientSuite/Strings/ControlProperties.Designer.vb similarity index 100% rename from EDMI_ClientSuite/Strings/ControlProperties.Designer.vb rename to GUIs.ClientSuite/Strings/ControlProperties.Designer.vb diff --git a/EDMI_ClientSuite/Strings/ControlProperties.en.Designer.vb b/GUIs.ClientSuite/Strings/ControlProperties.en.Designer.vb similarity index 100% rename from EDMI_ClientSuite/Strings/ControlProperties.en.Designer.vb rename to GUIs.ClientSuite/Strings/ControlProperties.en.Designer.vb diff --git a/EDMI_ClientSuite/Strings/ControlProperties.en.resx b/GUIs.ClientSuite/Strings/ControlProperties.en.resx similarity index 100% rename from EDMI_ClientSuite/Strings/ControlProperties.en.resx rename to GUIs.ClientSuite/Strings/ControlProperties.en.resx diff --git a/EDMI_ClientSuite/Strings/ControlProperties.resx b/GUIs.ClientSuite/Strings/ControlProperties.resx similarity index 100% rename from EDMI_ClientSuite/Strings/ControlProperties.resx rename to GUIs.ClientSuite/Strings/ControlProperties.resx diff --git a/EDMI_ClientSuite/Widgets/ProcessManagerWidget.Designer.vb b/GUIs.ClientSuite/Widgets/ProcessManagerWidget.Designer.vb similarity index 100% rename from EDMI_ClientSuite/Widgets/ProcessManagerWidget.Designer.vb rename to GUIs.ClientSuite/Widgets/ProcessManagerWidget.Designer.vb diff --git a/EDMI_ClientSuite/Widgets/ProcessManagerWidget.resx b/GUIs.ClientSuite/Widgets/ProcessManagerWidget.resx similarity index 100% rename from EDMI_ClientSuite/Widgets/ProcessManagerWidget.resx rename to GUIs.ClientSuite/Widgets/ProcessManagerWidget.resx diff --git a/EDMI_ClientSuite/Widgets/ProcessManagerWidget.vb b/GUIs.ClientSuite/Widgets/ProcessManagerWidget.vb similarity index 100% rename from EDMI_ClientSuite/Widgets/ProcessManagerWidget.vb rename to GUIs.ClientSuite/Widgets/ProcessManagerWidget.vb diff --git a/EDMI_ClientSuite/_TEST/DockManagerTest.Designer.vb b/GUIs.ClientSuite/_TEST/DockManagerTest.Designer.vb similarity index 100% rename from EDMI_ClientSuite/_TEST/DockManagerTest.Designer.vb rename to GUIs.ClientSuite/_TEST/DockManagerTest.Designer.vb diff --git a/EDMI_ClientSuite/_TEST/DockManagerTest.resx b/GUIs.ClientSuite/_TEST/DockManagerTest.resx similarity index 100% rename from EDMI_ClientSuite/_TEST/DockManagerTest.resx rename to GUIs.ClientSuite/_TEST/DockManagerTest.resx diff --git a/EDMI_ClientSuite/_TEST/DockManagerTest.vb b/GUIs.ClientSuite/_TEST/DockManagerTest.vb similarity index 100% rename from EDMI_ClientSuite/_TEST/DockManagerTest.vb rename to GUIs.ClientSuite/_TEST/DockManagerTest.vb diff --git a/EDMI_ClientSuite/_TEST/frmDocTest.Designer.vb b/GUIs.ClientSuite/_TEST/frmDocTest.Designer.vb similarity index 100% rename from EDMI_ClientSuite/_TEST/frmDocTest.Designer.vb rename to GUIs.ClientSuite/_TEST/frmDocTest.Designer.vb diff --git a/EDMI_ClientSuite/_TEST/frmDocTest.resx b/GUIs.ClientSuite/_TEST/frmDocTest.resx similarity index 100% rename from EDMI_ClientSuite/_TEST/frmDocTest.resx rename to GUIs.ClientSuite/_TEST/frmDocTest.resx diff --git a/EDMI_ClientSuite/_TEST/frmDocTest.vb b/GUIs.ClientSuite/_TEST/frmDocTest.vb similarity index 100% rename from EDMI_ClientSuite/_TEST/frmDocTest.vb rename to GUIs.ClientSuite/_TEST/frmDocTest.vb diff --git a/EDMI_ClientSuite/_TEST/frmFileTest.Designer.vb b/GUIs.ClientSuite/_TEST/frmFileTest.Designer.vb similarity index 100% rename from EDMI_ClientSuite/_TEST/frmFileTest.Designer.vb rename to GUIs.ClientSuite/_TEST/frmFileTest.Designer.vb diff --git a/EDMI_ClientSuite/_TEST/frmFileTest.resx b/GUIs.ClientSuite/_TEST/frmFileTest.resx similarity index 100% rename from EDMI_ClientSuite/_TEST/frmFileTest.resx rename to GUIs.ClientSuite/_TEST/frmFileTest.resx diff --git a/EDMI_ClientSuite/_TEST/frmFileTest.vb b/GUIs.ClientSuite/_TEST/frmFileTest.vb similarity index 100% rename from EDMI_ClientSuite/_TEST/frmFileTest.vb rename to GUIs.ClientSuite/_TEST/frmFileTest.vb diff --git a/EDMI_ClientSuite/_TEST/frmWorkflowTest.Designer.vb b/GUIs.ClientSuite/_TEST/frmWorkflowTest.Designer.vb similarity index 100% rename from EDMI_ClientSuite/_TEST/frmWorkflowTest.Designer.vb rename to GUIs.ClientSuite/_TEST/frmWorkflowTest.Designer.vb diff --git a/EDMI_ClientSuite/_TEST/frmWorkflowTest.resx b/GUIs.ClientSuite/_TEST/frmWorkflowTest.resx similarity index 100% rename from EDMI_ClientSuite/_TEST/frmWorkflowTest.resx rename to GUIs.ClientSuite/_TEST/frmWorkflowTest.resx diff --git a/EDMI_ClientSuite/_TEST/frmWorkflowTest.vb b/GUIs.ClientSuite/_TEST/frmWorkflowTest.vb similarity index 100% rename from EDMI_ClientSuite/_TEST/frmWorkflowTest.vb rename to GUIs.ClientSuite/_TEST/frmWorkflowTest.vb diff --git a/EDMI_ClientSuite/frmConfigService.Designer.vb b/GUIs.ClientSuite/frmConfigService.Designer.vb similarity index 100% rename from EDMI_ClientSuite/frmConfigService.Designer.vb rename to GUIs.ClientSuite/frmConfigService.Designer.vb diff --git a/EDMI_ClientSuite/frmConfigService.resx b/GUIs.ClientSuite/frmConfigService.resx similarity index 100% rename from EDMI_ClientSuite/frmConfigService.resx rename to GUIs.ClientSuite/frmConfigService.resx diff --git a/EDMI_ClientSuite/frmConfigService.vb b/GUIs.ClientSuite/frmConfigService.vb similarity index 100% rename from EDMI_ClientSuite/frmConfigService.vb rename to GUIs.ClientSuite/frmConfigService.vb diff --git a/EDMI_ClientSuite/frmConfigUser.Designer.vb b/GUIs.ClientSuite/frmConfigUser.Designer.vb similarity index 100% rename from EDMI_ClientSuite/frmConfigUser.Designer.vb rename to GUIs.ClientSuite/frmConfigUser.Designer.vb diff --git a/EDMI_ClientSuite/frmConfigUser.resx b/GUIs.ClientSuite/frmConfigUser.resx similarity index 100% rename from EDMI_ClientSuite/frmConfigUser.resx rename to GUIs.ClientSuite/frmConfigUser.resx diff --git a/EDMI_ClientSuite/frmConfigUser.vb b/GUIs.ClientSuite/frmConfigUser.vb similarity index 100% rename from EDMI_ClientSuite/frmConfigUser.vb rename to GUIs.ClientSuite/frmConfigUser.vb diff --git a/EDMI_ClientSuite/frmHome.Designer.vb b/GUIs.ClientSuite/frmHome.Designer.vb similarity index 100% rename from EDMI_ClientSuite/frmHome.Designer.vb rename to GUIs.ClientSuite/frmHome.Designer.vb diff --git a/EDMI_ClientSuite/frmHome.resx b/GUIs.ClientSuite/frmHome.resx similarity index 100% rename from EDMI_ClientSuite/frmHome.resx rename to GUIs.ClientSuite/frmHome.resx diff --git a/EDMI_ClientSuite/frmHome.vb b/GUIs.ClientSuite/frmHome.vb similarity index 100% rename from EDMI_ClientSuite/frmHome.vb rename to GUIs.ClientSuite/frmHome.vb diff --git a/EDMI_ClientSuite/frmMain.Designer.vb b/GUIs.ClientSuite/frmMain.Designer.vb similarity index 100% rename from EDMI_ClientSuite/frmMain.Designer.vb rename to GUIs.ClientSuite/frmMain.Designer.vb diff --git a/EDMI_ClientSuite/frmMain.resx b/GUIs.ClientSuite/frmMain.resx similarity index 100% rename from EDMI_ClientSuite/frmMain.resx rename to GUIs.ClientSuite/frmMain.resx diff --git a/EDMI_ClientSuite/frmMain.vb b/GUIs.ClientSuite/frmMain.vb similarity index 100% rename from EDMI_ClientSuite/frmMain.vb rename to GUIs.ClientSuite/frmMain.vb diff --git a/EDMI_ClientSuite/frmObjectEditor.Designer.vb b/GUIs.ClientSuite/frmObjectEditor.Designer.vb similarity index 100% rename from EDMI_ClientSuite/frmObjectEditor.Designer.vb rename to GUIs.ClientSuite/frmObjectEditor.Designer.vb diff --git a/EDMI_ClientSuite/frmObjectEditor.resx b/GUIs.ClientSuite/frmObjectEditor.resx similarity index 100% rename from EDMI_ClientSuite/frmObjectEditor.resx rename to GUIs.ClientSuite/frmObjectEditor.resx diff --git a/EDMI_ClientSuite/frmObjectEditor.vb b/GUIs.ClientSuite/frmObjectEditor.vb similarity index 100% rename from EDMI_ClientSuite/frmObjectEditor.vb rename to GUIs.ClientSuite/frmObjectEditor.vb diff --git a/EDMI_ClientSuite/frmSearch.Designer.vb b/GUIs.ClientSuite/frmSearch.Designer.vb similarity index 100% rename from EDMI_ClientSuite/frmSearch.Designer.vb rename to GUIs.ClientSuite/frmSearch.Designer.vb diff --git a/EDMI_ClientSuite/frmSearch.resx b/GUIs.ClientSuite/frmSearch.resx similarity index 100% rename from EDMI_ClientSuite/frmSearch.resx rename to GUIs.ClientSuite/frmSearch.resx diff --git a/EDMI_ClientSuite/frmSearch.vb b/GUIs.ClientSuite/frmSearch.vb similarity index 100% rename from EDMI_ClientSuite/frmSearch.vb rename to GUIs.ClientSuite/frmSearch.vb diff --git a/EDMI_ClientSuite/frmSplash.designer.vb b/GUIs.ClientSuite/frmSplash.designer.vb similarity index 100% rename from EDMI_ClientSuite/frmSplash.designer.vb rename to GUIs.ClientSuite/frmSplash.designer.vb diff --git a/EDMI_ClientSuite/frmSplash.resx b/GUIs.ClientSuite/frmSplash.resx similarity index 100% rename from EDMI_ClientSuite/frmSplash.resx rename to GUIs.ClientSuite/frmSplash.resx diff --git a/EDMI_ClientSuite/frmSplash.vb b/GUIs.ClientSuite/frmSplash.vb similarity index 100% rename from EDMI_ClientSuite/frmSplash.vb rename to GUIs.ClientSuite/frmSplash.vb diff --git a/EDMI_ClientSuite/packages.config b/GUIs.ClientSuite/packages.config similarity index 100% rename from EDMI_ClientSuite/packages.config rename to GUIs.ClientSuite/packages.config From 7285c56c930964c871af18ca8901ec9cd92d624e Mon Sep 17 00:00:00 2001 From: Jonathan Jenne Date: Mon, 15 Apr 2019 14:35:02 +0200 Subject: [PATCH 23/25] move test guis to GUIs.Test folders --- DDMonorepo.sln | 10 +++++----- .../ADSyncTest.vbproj | 0 {ADSyncTest => GUIs.Test.ADSyncTest}/App.config | 0 .../Form1.Designer.vb | 0 {ADSyncTest => GUIs.Test.ADSyncTest}/Form1.resx | 0 {ADSyncTest => GUIs.Test.ADSyncTest}/Form1.vb | 0 .../My Project/Application.Designer.vb | 0 .../My Project/Application.myapp | 0 .../My Project/AssemblyInfo.vb | 0 .../My Project/Resources.Designer.vb | 0 .../My Project/Resources.resx | 0 .../My Project/Settings.Designer.vb | 0 .../My Project/Settings.settings | 0 .../packages.config | 0 {EDMDesigner => GUIs.Test.EDMDesigner}/App.config | 0 .../ClassCurrentUser.vb | 0 {EDMDesigner => GUIs.Test.EDMDesigner}/ClassInit.vb | 0 .../EDMDesigner.vbproj | 0 .../FrmConnection.Designer.vb | 0 .../FrmConnection.resx | 0 .../FrmConnection.vb | 0 {EDMDesigner => GUIs.Test.EDMDesigner}/FrmMain.vb | 0 .../FrmNewTable.Designer.vb | 0 .../FrmNewTable.resx | 0 .../FrmNewTable.vb | 0 .../ModuleRuntimeVariables.vb | 0 .../My Project/Application.Designer.vb | 0 .../My Project/Application.myapp | 0 .../My Project/AssemblyInfo.vb | 0 .../EDMDesigner.My.MySettings.datasource | 0 .../My Project/Resources.Designer.vb | 0 .../My Project/Resources.resx | 0 .../My Project/Settings.Designer.vb | 0 .../My Project/Settings.settings | 0 .../My Project/licenses.licx | 0 .../My Project/licenses.licx.bak | 0 .../Resources/database_link.png | Bin .../frmMain.Designer.vb | 0 {EDMDesigner => GUIs.Test.EDMDesigner}/frmMain.resx | 0 {EDMDesigner => GUIs.Test.EDMDesigner}/nlog.config | 0 .../packages.config | 0 {GUI_EDMI => GUIs.Test.GUI_EDMI}/App.config | 0 {GUI_EDMI => GUIs.Test.GUI_EDMI}/GUI_EDMI.vbproj | 0 .../My Project/Application.Designer.vb | 0 .../My Project/Application.myapp | 0 .../My Project/AssemblyInfo.vb | 0 .../My Project/Resources.Designer.vb | 0 .../My Project/Resources.resx | 0 .../My Project/Settings.Designer.vb | 0 .../My Project/Settings.settings | 0 .../My Project/licenses.licx | 0 .../MyDataset.Designer.vb | 0 {GUI_EDMI => GUIs.Test.GUI_EDMI}/MyDataset.xsc | 0 {GUI_EDMI => GUIs.Test.GUI_EDMI}/MyDataset.xsd | 0 {GUI_EDMI => GUIs.Test.GUI_EDMI}/MyDataset.xss | 0 .../Resources/email_go.png | Bin .../Resources/key_16xLG.png | Bin .../Resources/save_16xMD.png | Bin .../TOOL_ohne_slogan.ico | Bin {GUI_EDMI => GUIs.Test.GUI_EDMI}/clsEncryption.vb | 0 .../frmEmailAccount.Designer.vb | 0 .../frmEmailAccount.resx | 0 {GUI_EDMI => GUIs.Test.GUI_EDMI}/frmEmailAccount.vb | 0 .../frmMain.Designer.vb | 0 {GUI_EDMI => GUIs.Test.GUI_EDMI}/frmMain.resx | 0 {GUI_EDMI => GUIs.Test.GUI_EDMI}/frmMain.vb | 0 {GUI_EDMI => GUIs.Test.GUI_EDMI}/packages.config | 0 {TestGUI => GUIs.Test.TestGUI}/App.config | 0 {TestGUI => GUIs.Test.TestGUI}/ApplicationEvents.vb | 0 .../ConfigTest.Designer.vb | 0 {TestGUI => GUIs.Test.TestGUI}/ConfigTest.resx | 0 {TestGUI => GUIs.Test.TestGUI}/ConfigTest.vb | 0 .../FolderWatcher.Designer.vb | 0 {TestGUI => GUIs.Test.TestGUI}/FolderWatcher.resx | 0 {TestGUI => GUIs.Test.TestGUI}/FolderWatcher.vb | 0 {TestGUI => GUIs.Test.TestGUI}/Form1.Designer.vb | 0 {TestGUI => GUIs.Test.TestGUI}/Form1.resx | 0 {TestGUI => GUIs.Test.TestGUI}/Form1.vb | 0 .../My Project/Application.Designer.vb | 0 .../My Project/Application.myapp | 0 .../My Project/AssemblyInfo.vb | 0 .../My Project/Resources.Designer.vb | 0 .../My Project/Resources.resx | 0 .../My Project/Settings.Designer.vb | 0 .../My Project/Settings.settings | 0 .../My Project/app.manifest | 0 .../My Project/licenses.licx | 0 {TestGUI => GUIs.Test.TestGUI}/TestGUI.vbproj | 2 +- {TestGUI => GUIs.Test.TestGUI}/packages.config | 0 {ZUGFeRDTest => GUIs.Test.ZUGFeRDTest}/App.config | 0 .../Form1.Designer.vb | 0 {ZUGFeRDTest => GUIs.Test.ZUGFeRDTest}/Form1.resx | 0 {ZUGFeRDTest => GUIs.Test.ZUGFeRDTest}/Form1.vb | 0 .../My Project/Application.Designer.vb | 0 .../My Project/Application.myapp | 0 .../My Project/AssemblyInfo.vb | 0 .../My Project/Resources.Designer.vb | 0 .../My Project/Resources.resx | 0 .../My Project/Settings.Designer.vb | 0 .../My Project/Settings.settings | 0 .../ZUGFeRDTest.vbproj | 0 .../packages.config | 0 102 files changed, 6 insertions(+), 6 deletions(-) rename {ADSyncTest => GUIs.Test.ADSyncTest}/ADSyncTest.vbproj (100%) rename {ADSyncTest => GUIs.Test.ADSyncTest}/App.config (100%) rename {ADSyncTest => GUIs.Test.ADSyncTest}/Form1.Designer.vb (100%) rename {ADSyncTest => GUIs.Test.ADSyncTest}/Form1.resx (100%) rename {ADSyncTest => GUIs.Test.ADSyncTest}/Form1.vb (100%) rename {ADSyncTest => GUIs.Test.ADSyncTest}/My Project/Application.Designer.vb (100%) rename {ADSyncTest => GUIs.Test.ADSyncTest}/My Project/Application.myapp (100%) rename {ADSyncTest => GUIs.Test.ADSyncTest}/My Project/AssemblyInfo.vb (100%) rename {ADSyncTest => GUIs.Test.ADSyncTest}/My Project/Resources.Designer.vb (100%) rename {ADSyncTest => GUIs.Test.ADSyncTest}/My Project/Resources.resx (100%) rename {ADSyncTest => GUIs.Test.ADSyncTest}/My Project/Settings.Designer.vb (100%) rename {ADSyncTest => GUIs.Test.ADSyncTest}/My Project/Settings.settings (100%) rename {ADSyncTest => GUIs.Test.ADSyncTest}/packages.config (100%) rename {EDMDesigner => GUIs.Test.EDMDesigner}/App.config (100%) rename {EDMDesigner => GUIs.Test.EDMDesigner}/ClassCurrentUser.vb (100%) rename {EDMDesigner => GUIs.Test.EDMDesigner}/ClassInit.vb (100%) rename {EDMDesigner => GUIs.Test.EDMDesigner}/EDMDesigner.vbproj (100%) rename {EDMDesigner => GUIs.Test.EDMDesigner}/FrmConnection.Designer.vb (100%) rename {EDMDesigner => GUIs.Test.EDMDesigner}/FrmConnection.resx (100%) rename {EDMDesigner => GUIs.Test.EDMDesigner}/FrmConnection.vb (100%) rename {EDMDesigner => GUIs.Test.EDMDesigner}/FrmMain.vb (100%) rename {EDMDesigner => GUIs.Test.EDMDesigner}/FrmNewTable.Designer.vb (100%) rename {EDMDesigner => GUIs.Test.EDMDesigner}/FrmNewTable.resx (100%) rename {EDMDesigner => GUIs.Test.EDMDesigner}/FrmNewTable.vb (100%) rename {EDMDesigner => GUIs.Test.EDMDesigner}/ModuleRuntimeVariables.vb (100%) rename {EDMDesigner => GUIs.Test.EDMDesigner}/My Project/Application.Designer.vb (100%) rename {EDMDesigner => GUIs.Test.EDMDesigner}/My Project/Application.myapp (100%) rename {EDMDesigner => GUIs.Test.EDMDesigner}/My Project/AssemblyInfo.vb (100%) rename {EDMDesigner => GUIs.Test.EDMDesigner}/My Project/DataSources/EDMDesigner.My.MySettings.datasource (100%) rename {EDMDesigner => GUIs.Test.EDMDesigner}/My Project/Resources.Designer.vb (100%) rename {EDMDesigner => GUIs.Test.EDMDesigner}/My Project/Resources.resx (100%) rename {EDMDesigner => GUIs.Test.EDMDesigner}/My Project/Settings.Designer.vb (100%) rename {EDMDesigner => GUIs.Test.EDMDesigner}/My Project/Settings.settings (100%) rename {EDMDesigner => GUIs.Test.EDMDesigner}/My Project/licenses.licx (100%) rename {EDMDesigner => GUIs.Test.EDMDesigner}/My Project/licenses.licx.bak (100%) rename {EDMDesigner => GUIs.Test.EDMDesigner}/Resources/database_link.png (100%) rename {EDMDesigner => GUIs.Test.EDMDesigner}/frmMain.Designer.vb (100%) rename {EDMDesigner => GUIs.Test.EDMDesigner}/frmMain.resx (100%) rename {EDMDesigner => GUIs.Test.EDMDesigner}/nlog.config (100%) rename {EDMDesigner => GUIs.Test.EDMDesigner}/packages.config (100%) rename {GUI_EDMI => GUIs.Test.GUI_EDMI}/App.config (100%) rename {GUI_EDMI => GUIs.Test.GUI_EDMI}/GUI_EDMI.vbproj (100%) rename {GUI_EDMI => GUIs.Test.GUI_EDMI}/My Project/Application.Designer.vb (100%) rename {GUI_EDMI => GUIs.Test.GUI_EDMI}/My Project/Application.myapp (100%) rename {GUI_EDMI => GUIs.Test.GUI_EDMI}/My Project/AssemblyInfo.vb (100%) rename {GUI_EDMI => GUIs.Test.GUI_EDMI}/My Project/Resources.Designer.vb (100%) rename {GUI_EDMI => GUIs.Test.GUI_EDMI}/My Project/Resources.resx (100%) rename {GUI_EDMI => GUIs.Test.GUI_EDMI}/My Project/Settings.Designer.vb (100%) rename {GUI_EDMI => GUIs.Test.GUI_EDMI}/My Project/Settings.settings (100%) rename {GUI_EDMI => GUIs.Test.GUI_EDMI}/My Project/licenses.licx (100%) rename {GUI_EDMI => GUIs.Test.GUI_EDMI}/MyDataset.Designer.vb (100%) rename {GUI_EDMI => GUIs.Test.GUI_EDMI}/MyDataset.xsc (100%) rename {GUI_EDMI => GUIs.Test.GUI_EDMI}/MyDataset.xsd (100%) rename {GUI_EDMI => GUIs.Test.GUI_EDMI}/MyDataset.xss (100%) rename {GUI_EDMI => GUIs.Test.GUI_EDMI}/Resources/email_go.png (100%) rename {GUI_EDMI => GUIs.Test.GUI_EDMI}/Resources/key_16xLG.png (100%) rename {GUI_EDMI => GUIs.Test.GUI_EDMI}/Resources/save_16xMD.png (100%) rename {GUI_EDMI => GUIs.Test.GUI_EDMI}/TOOL_ohne_slogan.ico (100%) rename {GUI_EDMI => GUIs.Test.GUI_EDMI}/clsEncryption.vb (100%) rename {GUI_EDMI => GUIs.Test.GUI_EDMI}/frmEmailAccount.Designer.vb (100%) rename {GUI_EDMI => GUIs.Test.GUI_EDMI}/frmEmailAccount.resx (100%) rename {GUI_EDMI => GUIs.Test.GUI_EDMI}/frmEmailAccount.vb (100%) rename {GUI_EDMI => GUIs.Test.GUI_EDMI}/frmMain.Designer.vb (100%) rename {GUI_EDMI => GUIs.Test.GUI_EDMI}/frmMain.resx (100%) rename {GUI_EDMI => GUIs.Test.GUI_EDMI}/frmMain.vb (100%) rename {GUI_EDMI => GUIs.Test.GUI_EDMI}/packages.config (100%) rename {TestGUI => GUIs.Test.TestGUI}/App.config (100%) rename {TestGUI => GUIs.Test.TestGUI}/ApplicationEvents.vb (100%) rename {TestGUI => GUIs.Test.TestGUI}/ConfigTest.Designer.vb (100%) rename {TestGUI => GUIs.Test.TestGUI}/ConfigTest.resx (100%) rename {TestGUI => GUIs.Test.TestGUI}/ConfigTest.vb (100%) rename {TestGUI => GUIs.Test.TestGUI}/FolderWatcher.Designer.vb (100%) rename {TestGUI => GUIs.Test.TestGUI}/FolderWatcher.resx (100%) rename {TestGUI => GUIs.Test.TestGUI}/FolderWatcher.vb (100%) rename {TestGUI => GUIs.Test.TestGUI}/Form1.Designer.vb (100%) rename {TestGUI => GUIs.Test.TestGUI}/Form1.resx (100%) rename {TestGUI => GUIs.Test.TestGUI}/Form1.vb (100%) rename {TestGUI => GUIs.Test.TestGUI}/My Project/Application.Designer.vb (100%) rename {TestGUI => GUIs.Test.TestGUI}/My Project/Application.myapp (100%) rename {TestGUI => GUIs.Test.TestGUI}/My Project/AssemblyInfo.vb (100%) rename {TestGUI => GUIs.Test.TestGUI}/My Project/Resources.Designer.vb (100%) rename {TestGUI => GUIs.Test.TestGUI}/My Project/Resources.resx (100%) rename {TestGUI => GUIs.Test.TestGUI}/My Project/Settings.Designer.vb (100%) rename {TestGUI => GUIs.Test.TestGUI}/My Project/Settings.settings (100%) rename {TestGUI => GUIs.Test.TestGUI}/My Project/app.manifest (100%) rename {TestGUI => GUIs.Test.TestGUI}/My Project/licenses.licx (100%) rename {TestGUI => GUIs.Test.TestGUI}/TestGUI.vbproj (99%) rename {TestGUI => GUIs.Test.TestGUI}/packages.config (100%) rename {ZUGFeRDTest => GUIs.Test.ZUGFeRDTest}/App.config (100%) rename {ZUGFeRDTest => GUIs.Test.ZUGFeRDTest}/Form1.Designer.vb (100%) rename {ZUGFeRDTest => GUIs.Test.ZUGFeRDTest}/Form1.resx (100%) rename {ZUGFeRDTest => GUIs.Test.ZUGFeRDTest}/Form1.vb (100%) rename {ZUGFeRDTest => GUIs.Test.ZUGFeRDTest}/My Project/Application.Designer.vb (100%) rename {ZUGFeRDTest => GUIs.Test.ZUGFeRDTest}/My Project/Application.myapp (100%) rename {ZUGFeRDTest => GUIs.Test.ZUGFeRDTest}/My Project/AssemblyInfo.vb (100%) rename {ZUGFeRDTest => GUIs.Test.ZUGFeRDTest}/My Project/Resources.Designer.vb (100%) rename {ZUGFeRDTest => GUIs.Test.ZUGFeRDTest}/My Project/Resources.resx (100%) rename {ZUGFeRDTest => GUIs.Test.ZUGFeRDTest}/My Project/Settings.Designer.vb (100%) rename {ZUGFeRDTest => GUIs.Test.ZUGFeRDTest}/My Project/Settings.settings (100%) rename {ZUGFeRDTest => GUIs.Test.ZUGFeRDTest}/ZUGFeRDTest.vbproj (100%) rename {ZUGFeRDTest => GUIs.Test.ZUGFeRDTest}/packages.config (100%) diff --git a/DDMonorepo.sln b/DDMonorepo.sln index 69952439..d79bd3b1 100644 --- a/DDMonorepo.sln +++ b/DDMonorepo.sln @@ -9,7 +9,7 @@ Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "GUIs", "GUIs", "{8FFE925E-8 EndProject Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Setups", "Setups", "{D887B4BE-E457-4E45-8E22-D086E92DD2B7}" EndProject -Project("{F184B08F-C81C-45F6-A57F-5ABD9991F28F}") = "EDMDesigner", "EDMDesigner\EDMDesigner.vbproj", "{5284F4E5-A6C1-4BCF-896F-3ABEA985B741}" +Project("{F184B08F-C81C-45F6-A57F-5ABD9991F28F}") = "EDMDesigner", "GUIs.Test.EDMDesigner\EDMDesigner.vbproj", "{5284F4E5-A6C1-4BCF-896F-3ABEA985B741}" EndProject Project("{F184B08F-C81C-45F6-A57F-5ABD9991F28F}") = "Logging", "Modules.Logging\Logging.vbproj", "{903B2D7D-3B80-4BE9-8713-7447B704E1B0}" EndProject @@ -17,7 +17,7 @@ Project("{F184B08F-C81C-45F6-A57F-5ABD9991F28F}") = "Windream", "Modules.Windrea EndProject Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Services", "Services", "{7AF3F9C2-C939-4A08-95C1-0453207E298A}" EndProject -Project("{F184B08F-C81C-45F6-A57F-5ABD9991F28F}") = "TestGUI", "TestGUI\TestGUI.vbproj", "{93130E7D-A950-4CBD-A0D9-7A6FAF94DDC0}" +Project("{F184B08F-C81C-45F6-A57F-5ABD9991F28F}") = "TestGUI", "GUIs.Test.TestGUI\TestGUI.vbproj", "{93130E7D-A950-4CBD-A0D9-7A6FAF94DDC0}" EndProject Project("{F184B08F-C81C-45F6-A57F-5ABD9991F28F}") = "Database", "Modules.Database\Database.vbproj", "{EAF0EA75-5FA7-485D-89C7-B2D843B03A96}" EndProject @@ -49,13 +49,13 @@ Project("{F184B08F-C81C-45F6-A57F-5ABD9991F28F}") = "DDZUGFeRDService", "DDZUGFe EndProject Project("{F184B08F-C81C-45F6-A57F-5ABD9991F28F}") = "Interfaces", "Modules.Interfaces\Interfaces.vbproj", "{AB6F09BF-E794-4F6A-94BB-C97C0BA84D64}" EndProject -Project("{F184B08F-C81C-45F6-A57F-5ABD9991F28F}") = "ZUGFeRDTest", "ZUGFeRDTest\ZUGFeRDTest.vbproj", "{16156434-E471-43F1-8030-76A0DA17CD5A}" +Project("{F184B08F-C81C-45F6-A57F-5ABD9991F28F}") = "ZUGFeRDTest", "GUIs.Test.ZUGFeRDTest\ZUGFeRDTest.vbproj", "{16156434-E471-43F1-8030-76A0DA17CD5A}" EndProject Project("{F184B08F-C81C-45F6-A57F-5ABD9991F28F}") = "Jobs", "Jobs\Jobs.vbproj", "{39EC839A-3C30-4922-A41E-6B09D1DDE5C3}" EndProject Project("{F184B08F-C81C-45F6-A57F-5ABD9991F28F}") = "DD_CommunicationService", "DD_CommunicationService\DD_CommunicationService.vbproj", "{1FB2854F-C050-427D-9FAC-1D8F232E8025}" EndProject -Project("{F184B08F-C81C-45F6-A57F-5ABD9991F28F}") = "GUI_EDMI", "GUI_EDMI\GUI_EDMI.vbproj", "{88EDAD5B-1B98-43E4-B068-1251E7AF01A0}" +Project("{F184B08F-C81C-45F6-A57F-5ABD9991F28F}") = "GUI_EDMI", "GUIs.Test.GUI_EDMI\GUI_EDMI.vbproj", "{88EDAD5B-1B98-43E4-B068-1251E7AF01A0}" EndProject Project("{F184B08F-C81C-45F6-A57F-5ABD9991F28F}") = "ClientSuite", "GUIs.ClientSuite\ClientSuite.vbproj", "{406C95F4-9FEA-45B6-8385-1768CDBBF1A7}" EndProject @@ -67,7 +67,7 @@ Project("{F184B08F-C81C-45F6-A57F-5ABD9991F28F}") = "DDEDMLicenseService", "DDLi EndProject Project("{F184B08F-C81C-45F6-A57F-5ABD9991F28F}") = "License", "Modules.License\License.vbproj", "{5EBACBFA-F11A-4BBF-8D02-91461F2293ED}" EndProject -Project("{F184B08F-C81C-45F6-A57F-5ABD9991F28F}") = "ADSyncTest", "ADSyncTest\ADSyncTest.vbproj", "{7386AB04-DF8D-4DFB-809D-1FAC8212CB7E}" +Project("{F184B08F-C81C-45F6-A57F-5ABD9991F28F}") = "ADSyncTest", "GUIs.Test.ADSyncTest\ADSyncTest.vbproj", "{7386AB04-DF8D-4DFB-809D-1FAC8212CB7E}" EndProject Project("{F184B08F-C81C-45F6-A57F-5ABD9991F28F}") = "JobRunner", "JobRunner\JobRunner.vbproj", "{59461E98-A5AF-438C-A651-5021ACAE82AD}" EndProject diff --git a/ADSyncTest/ADSyncTest.vbproj b/GUIs.Test.ADSyncTest/ADSyncTest.vbproj similarity index 100% rename from ADSyncTest/ADSyncTest.vbproj rename to GUIs.Test.ADSyncTest/ADSyncTest.vbproj diff --git a/ADSyncTest/App.config b/GUIs.Test.ADSyncTest/App.config similarity index 100% rename from ADSyncTest/App.config rename to GUIs.Test.ADSyncTest/App.config diff --git a/ADSyncTest/Form1.Designer.vb b/GUIs.Test.ADSyncTest/Form1.Designer.vb similarity index 100% rename from ADSyncTest/Form1.Designer.vb rename to GUIs.Test.ADSyncTest/Form1.Designer.vb diff --git a/ADSyncTest/Form1.resx b/GUIs.Test.ADSyncTest/Form1.resx similarity index 100% rename from ADSyncTest/Form1.resx rename to GUIs.Test.ADSyncTest/Form1.resx diff --git a/ADSyncTest/Form1.vb b/GUIs.Test.ADSyncTest/Form1.vb similarity index 100% rename from ADSyncTest/Form1.vb rename to GUIs.Test.ADSyncTest/Form1.vb diff --git a/ADSyncTest/My Project/Application.Designer.vb b/GUIs.Test.ADSyncTest/My Project/Application.Designer.vb similarity index 100% rename from ADSyncTest/My Project/Application.Designer.vb rename to GUIs.Test.ADSyncTest/My Project/Application.Designer.vb diff --git a/ADSyncTest/My Project/Application.myapp b/GUIs.Test.ADSyncTest/My Project/Application.myapp similarity index 100% rename from ADSyncTest/My Project/Application.myapp rename to GUIs.Test.ADSyncTest/My Project/Application.myapp diff --git a/ADSyncTest/My Project/AssemblyInfo.vb b/GUIs.Test.ADSyncTest/My Project/AssemblyInfo.vb similarity index 100% rename from ADSyncTest/My Project/AssemblyInfo.vb rename to GUIs.Test.ADSyncTest/My Project/AssemblyInfo.vb diff --git a/ADSyncTest/My Project/Resources.Designer.vb b/GUIs.Test.ADSyncTest/My Project/Resources.Designer.vb similarity index 100% rename from ADSyncTest/My Project/Resources.Designer.vb rename to GUIs.Test.ADSyncTest/My Project/Resources.Designer.vb diff --git a/ADSyncTest/My Project/Resources.resx b/GUIs.Test.ADSyncTest/My Project/Resources.resx similarity index 100% rename from ADSyncTest/My Project/Resources.resx rename to GUIs.Test.ADSyncTest/My Project/Resources.resx diff --git a/ADSyncTest/My Project/Settings.Designer.vb b/GUIs.Test.ADSyncTest/My Project/Settings.Designer.vb similarity index 100% rename from ADSyncTest/My Project/Settings.Designer.vb rename to GUIs.Test.ADSyncTest/My Project/Settings.Designer.vb diff --git a/ADSyncTest/My Project/Settings.settings b/GUIs.Test.ADSyncTest/My Project/Settings.settings similarity index 100% rename from ADSyncTest/My Project/Settings.settings rename to GUIs.Test.ADSyncTest/My Project/Settings.settings diff --git a/ADSyncTest/packages.config b/GUIs.Test.ADSyncTest/packages.config similarity index 100% rename from ADSyncTest/packages.config rename to GUIs.Test.ADSyncTest/packages.config diff --git a/EDMDesigner/App.config b/GUIs.Test.EDMDesigner/App.config similarity index 100% rename from EDMDesigner/App.config rename to GUIs.Test.EDMDesigner/App.config diff --git a/EDMDesigner/ClassCurrentUser.vb b/GUIs.Test.EDMDesigner/ClassCurrentUser.vb similarity index 100% rename from EDMDesigner/ClassCurrentUser.vb rename to GUIs.Test.EDMDesigner/ClassCurrentUser.vb diff --git a/EDMDesigner/ClassInit.vb b/GUIs.Test.EDMDesigner/ClassInit.vb similarity index 100% rename from EDMDesigner/ClassInit.vb rename to GUIs.Test.EDMDesigner/ClassInit.vb diff --git a/EDMDesigner/EDMDesigner.vbproj b/GUIs.Test.EDMDesigner/EDMDesigner.vbproj similarity index 100% rename from EDMDesigner/EDMDesigner.vbproj rename to GUIs.Test.EDMDesigner/EDMDesigner.vbproj diff --git a/EDMDesigner/FrmConnection.Designer.vb b/GUIs.Test.EDMDesigner/FrmConnection.Designer.vb similarity index 100% rename from EDMDesigner/FrmConnection.Designer.vb rename to GUIs.Test.EDMDesigner/FrmConnection.Designer.vb diff --git a/EDMDesigner/FrmConnection.resx b/GUIs.Test.EDMDesigner/FrmConnection.resx similarity index 100% rename from EDMDesigner/FrmConnection.resx rename to GUIs.Test.EDMDesigner/FrmConnection.resx diff --git a/EDMDesigner/FrmConnection.vb b/GUIs.Test.EDMDesigner/FrmConnection.vb similarity index 100% rename from EDMDesigner/FrmConnection.vb rename to GUIs.Test.EDMDesigner/FrmConnection.vb diff --git a/EDMDesigner/FrmMain.vb b/GUIs.Test.EDMDesigner/FrmMain.vb similarity index 100% rename from EDMDesigner/FrmMain.vb rename to GUIs.Test.EDMDesigner/FrmMain.vb diff --git a/EDMDesigner/FrmNewTable.Designer.vb b/GUIs.Test.EDMDesigner/FrmNewTable.Designer.vb similarity index 100% rename from EDMDesigner/FrmNewTable.Designer.vb rename to GUIs.Test.EDMDesigner/FrmNewTable.Designer.vb diff --git a/EDMDesigner/FrmNewTable.resx b/GUIs.Test.EDMDesigner/FrmNewTable.resx similarity index 100% rename from EDMDesigner/FrmNewTable.resx rename to GUIs.Test.EDMDesigner/FrmNewTable.resx diff --git a/EDMDesigner/FrmNewTable.vb b/GUIs.Test.EDMDesigner/FrmNewTable.vb similarity index 100% rename from EDMDesigner/FrmNewTable.vb rename to GUIs.Test.EDMDesigner/FrmNewTable.vb diff --git a/EDMDesigner/ModuleRuntimeVariables.vb b/GUIs.Test.EDMDesigner/ModuleRuntimeVariables.vb similarity index 100% rename from EDMDesigner/ModuleRuntimeVariables.vb rename to GUIs.Test.EDMDesigner/ModuleRuntimeVariables.vb diff --git a/EDMDesigner/My Project/Application.Designer.vb b/GUIs.Test.EDMDesigner/My Project/Application.Designer.vb similarity index 100% rename from EDMDesigner/My Project/Application.Designer.vb rename to GUIs.Test.EDMDesigner/My Project/Application.Designer.vb diff --git a/EDMDesigner/My Project/Application.myapp b/GUIs.Test.EDMDesigner/My Project/Application.myapp similarity index 100% rename from EDMDesigner/My Project/Application.myapp rename to GUIs.Test.EDMDesigner/My Project/Application.myapp diff --git a/EDMDesigner/My Project/AssemblyInfo.vb b/GUIs.Test.EDMDesigner/My Project/AssemblyInfo.vb similarity index 100% rename from EDMDesigner/My Project/AssemblyInfo.vb rename to GUIs.Test.EDMDesigner/My Project/AssemblyInfo.vb diff --git a/EDMDesigner/My Project/DataSources/EDMDesigner.My.MySettings.datasource b/GUIs.Test.EDMDesigner/My Project/DataSources/EDMDesigner.My.MySettings.datasource similarity index 100% rename from EDMDesigner/My Project/DataSources/EDMDesigner.My.MySettings.datasource rename to GUIs.Test.EDMDesigner/My Project/DataSources/EDMDesigner.My.MySettings.datasource diff --git a/EDMDesigner/My Project/Resources.Designer.vb b/GUIs.Test.EDMDesigner/My Project/Resources.Designer.vb similarity index 100% rename from EDMDesigner/My Project/Resources.Designer.vb rename to GUIs.Test.EDMDesigner/My Project/Resources.Designer.vb diff --git a/EDMDesigner/My Project/Resources.resx b/GUIs.Test.EDMDesigner/My Project/Resources.resx similarity index 100% rename from EDMDesigner/My Project/Resources.resx rename to GUIs.Test.EDMDesigner/My Project/Resources.resx diff --git a/EDMDesigner/My Project/Settings.Designer.vb b/GUIs.Test.EDMDesigner/My Project/Settings.Designer.vb similarity index 100% rename from EDMDesigner/My Project/Settings.Designer.vb rename to GUIs.Test.EDMDesigner/My Project/Settings.Designer.vb diff --git a/EDMDesigner/My Project/Settings.settings b/GUIs.Test.EDMDesigner/My Project/Settings.settings similarity index 100% rename from EDMDesigner/My Project/Settings.settings rename to GUIs.Test.EDMDesigner/My Project/Settings.settings diff --git a/EDMDesigner/My Project/licenses.licx b/GUIs.Test.EDMDesigner/My Project/licenses.licx similarity index 100% rename from EDMDesigner/My Project/licenses.licx rename to GUIs.Test.EDMDesigner/My Project/licenses.licx diff --git a/EDMDesigner/My Project/licenses.licx.bak b/GUIs.Test.EDMDesigner/My Project/licenses.licx.bak similarity index 100% rename from EDMDesigner/My Project/licenses.licx.bak rename to GUIs.Test.EDMDesigner/My Project/licenses.licx.bak diff --git a/EDMDesigner/Resources/database_link.png b/GUIs.Test.EDMDesigner/Resources/database_link.png similarity index 100% rename from EDMDesigner/Resources/database_link.png rename to GUIs.Test.EDMDesigner/Resources/database_link.png diff --git a/EDMDesigner/frmMain.Designer.vb b/GUIs.Test.EDMDesigner/frmMain.Designer.vb similarity index 100% rename from EDMDesigner/frmMain.Designer.vb rename to GUIs.Test.EDMDesigner/frmMain.Designer.vb diff --git a/EDMDesigner/frmMain.resx b/GUIs.Test.EDMDesigner/frmMain.resx similarity index 100% rename from EDMDesigner/frmMain.resx rename to GUIs.Test.EDMDesigner/frmMain.resx diff --git a/EDMDesigner/nlog.config b/GUIs.Test.EDMDesigner/nlog.config similarity index 100% rename from EDMDesigner/nlog.config rename to GUIs.Test.EDMDesigner/nlog.config diff --git a/EDMDesigner/packages.config b/GUIs.Test.EDMDesigner/packages.config similarity index 100% rename from EDMDesigner/packages.config rename to GUIs.Test.EDMDesigner/packages.config diff --git a/GUI_EDMI/App.config b/GUIs.Test.GUI_EDMI/App.config similarity index 100% rename from GUI_EDMI/App.config rename to GUIs.Test.GUI_EDMI/App.config diff --git a/GUI_EDMI/GUI_EDMI.vbproj b/GUIs.Test.GUI_EDMI/GUI_EDMI.vbproj similarity index 100% rename from GUI_EDMI/GUI_EDMI.vbproj rename to GUIs.Test.GUI_EDMI/GUI_EDMI.vbproj diff --git a/GUI_EDMI/My Project/Application.Designer.vb b/GUIs.Test.GUI_EDMI/My Project/Application.Designer.vb similarity index 100% rename from GUI_EDMI/My Project/Application.Designer.vb rename to GUIs.Test.GUI_EDMI/My Project/Application.Designer.vb diff --git a/GUI_EDMI/My Project/Application.myapp b/GUIs.Test.GUI_EDMI/My Project/Application.myapp similarity index 100% rename from GUI_EDMI/My Project/Application.myapp rename to GUIs.Test.GUI_EDMI/My Project/Application.myapp diff --git a/GUI_EDMI/My Project/AssemblyInfo.vb b/GUIs.Test.GUI_EDMI/My Project/AssemblyInfo.vb similarity index 100% rename from GUI_EDMI/My Project/AssemblyInfo.vb rename to GUIs.Test.GUI_EDMI/My Project/AssemblyInfo.vb diff --git a/GUI_EDMI/My Project/Resources.Designer.vb b/GUIs.Test.GUI_EDMI/My Project/Resources.Designer.vb similarity index 100% rename from GUI_EDMI/My Project/Resources.Designer.vb rename to GUIs.Test.GUI_EDMI/My Project/Resources.Designer.vb diff --git a/GUI_EDMI/My Project/Resources.resx b/GUIs.Test.GUI_EDMI/My Project/Resources.resx similarity index 100% rename from GUI_EDMI/My Project/Resources.resx rename to GUIs.Test.GUI_EDMI/My Project/Resources.resx diff --git a/GUI_EDMI/My Project/Settings.Designer.vb b/GUIs.Test.GUI_EDMI/My Project/Settings.Designer.vb similarity index 100% rename from GUI_EDMI/My Project/Settings.Designer.vb rename to GUIs.Test.GUI_EDMI/My Project/Settings.Designer.vb diff --git a/GUI_EDMI/My Project/Settings.settings b/GUIs.Test.GUI_EDMI/My Project/Settings.settings similarity index 100% rename from GUI_EDMI/My Project/Settings.settings rename to GUIs.Test.GUI_EDMI/My Project/Settings.settings diff --git a/GUI_EDMI/My Project/licenses.licx b/GUIs.Test.GUI_EDMI/My Project/licenses.licx similarity index 100% rename from GUI_EDMI/My Project/licenses.licx rename to GUIs.Test.GUI_EDMI/My Project/licenses.licx diff --git a/GUI_EDMI/MyDataset.Designer.vb b/GUIs.Test.GUI_EDMI/MyDataset.Designer.vb similarity index 100% rename from GUI_EDMI/MyDataset.Designer.vb rename to GUIs.Test.GUI_EDMI/MyDataset.Designer.vb diff --git a/GUI_EDMI/MyDataset.xsc b/GUIs.Test.GUI_EDMI/MyDataset.xsc similarity index 100% rename from GUI_EDMI/MyDataset.xsc rename to GUIs.Test.GUI_EDMI/MyDataset.xsc diff --git a/GUI_EDMI/MyDataset.xsd b/GUIs.Test.GUI_EDMI/MyDataset.xsd similarity index 100% rename from GUI_EDMI/MyDataset.xsd rename to GUIs.Test.GUI_EDMI/MyDataset.xsd diff --git a/GUI_EDMI/MyDataset.xss b/GUIs.Test.GUI_EDMI/MyDataset.xss similarity index 100% rename from GUI_EDMI/MyDataset.xss rename to GUIs.Test.GUI_EDMI/MyDataset.xss diff --git a/GUI_EDMI/Resources/email_go.png b/GUIs.Test.GUI_EDMI/Resources/email_go.png similarity index 100% rename from GUI_EDMI/Resources/email_go.png rename to GUIs.Test.GUI_EDMI/Resources/email_go.png diff --git a/GUI_EDMI/Resources/key_16xLG.png b/GUIs.Test.GUI_EDMI/Resources/key_16xLG.png similarity index 100% rename from GUI_EDMI/Resources/key_16xLG.png rename to GUIs.Test.GUI_EDMI/Resources/key_16xLG.png diff --git a/GUI_EDMI/Resources/save_16xMD.png b/GUIs.Test.GUI_EDMI/Resources/save_16xMD.png similarity index 100% rename from GUI_EDMI/Resources/save_16xMD.png rename to GUIs.Test.GUI_EDMI/Resources/save_16xMD.png diff --git a/GUI_EDMI/TOOL_ohne_slogan.ico b/GUIs.Test.GUI_EDMI/TOOL_ohne_slogan.ico similarity index 100% rename from GUI_EDMI/TOOL_ohne_slogan.ico rename to GUIs.Test.GUI_EDMI/TOOL_ohne_slogan.ico diff --git a/GUI_EDMI/clsEncryption.vb b/GUIs.Test.GUI_EDMI/clsEncryption.vb similarity index 100% rename from GUI_EDMI/clsEncryption.vb rename to GUIs.Test.GUI_EDMI/clsEncryption.vb diff --git a/GUI_EDMI/frmEmailAccount.Designer.vb b/GUIs.Test.GUI_EDMI/frmEmailAccount.Designer.vb similarity index 100% rename from GUI_EDMI/frmEmailAccount.Designer.vb rename to GUIs.Test.GUI_EDMI/frmEmailAccount.Designer.vb diff --git a/GUI_EDMI/frmEmailAccount.resx b/GUIs.Test.GUI_EDMI/frmEmailAccount.resx similarity index 100% rename from GUI_EDMI/frmEmailAccount.resx rename to GUIs.Test.GUI_EDMI/frmEmailAccount.resx diff --git a/GUI_EDMI/frmEmailAccount.vb b/GUIs.Test.GUI_EDMI/frmEmailAccount.vb similarity index 100% rename from GUI_EDMI/frmEmailAccount.vb rename to GUIs.Test.GUI_EDMI/frmEmailAccount.vb diff --git a/GUI_EDMI/frmMain.Designer.vb b/GUIs.Test.GUI_EDMI/frmMain.Designer.vb similarity index 100% rename from GUI_EDMI/frmMain.Designer.vb rename to GUIs.Test.GUI_EDMI/frmMain.Designer.vb diff --git a/GUI_EDMI/frmMain.resx b/GUIs.Test.GUI_EDMI/frmMain.resx similarity index 100% rename from GUI_EDMI/frmMain.resx rename to GUIs.Test.GUI_EDMI/frmMain.resx diff --git a/GUI_EDMI/frmMain.vb b/GUIs.Test.GUI_EDMI/frmMain.vb similarity index 100% rename from GUI_EDMI/frmMain.vb rename to GUIs.Test.GUI_EDMI/frmMain.vb diff --git a/GUI_EDMI/packages.config b/GUIs.Test.GUI_EDMI/packages.config similarity index 100% rename from GUI_EDMI/packages.config rename to GUIs.Test.GUI_EDMI/packages.config diff --git a/TestGUI/App.config b/GUIs.Test.TestGUI/App.config similarity index 100% rename from TestGUI/App.config rename to GUIs.Test.TestGUI/App.config diff --git a/TestGUI/ApplicationEvents.vb b/GUIs.Test.TestGUI/ApplicationEvents.vb similarity index 100% rename from TestGUI/ApplicationEvents.vb rename to GUIs.Test.TestGUI/ApplicationEvents.vb diff --git a/TestGUI/ConfigTest.Designer.vb b/GUIs.Test.TestGUI/ConfigTest.Designer.vb similarity index 100% rename from TestGUI/ConfigTest.Designer.vb rename to GUIs.Test.TestGUI/ConfigTest.Designer.vb diff --git a/TestGUI/ConfigTest.resx b/GUIs.Test.TestGUI/ConfigTest.resx similarity index 100% rename from TestGUI/ConfigTest.resx rename to GUIs.Test.TestGUI/ConfigTest.resx diff --git a/TestGUI/ConfigTest.vb b/GUIs.Test.TestGUI/ConfigTest.vb similarity index 100% rename from TestGUI/ConfigTest.vb rename to GUIs.Test.TestGUI/ConfigTest.vb diff --git a/TestGUI/FolderWatcher.Designer.vb b/GUIs.Test.TestGUI/FolderWatcher.Designer.vb similarity index 100% rename from TestGUI/FolderWatcher.Designer.vb rename to GUIs.Test.TestGUI/FolderWatcher.Designer.vb diff --git a/TestGUI/FolderWatcher.resx b/GUIs.Test.TestGUI/FolderWatcher.resx similarity index 100% rename from TestGUI/FolderWatcher.resx rename to GUIs.Test.TestGUI/FolderWatcher.resx diff --git a/TestGUI/FolderWatcher.vb b/GUIs.Test.TestGUI/FolderWatcher.vb similarity index 100% rename from TestGUI/FolderWatcher.vb rename to GUIs.Test.TestGUI/FolderWatcher.vb diff --git a/TestGUI/Form1.Designer.vb b/GUIs.Test.TestGUI/Form1.Designer.vb similarity index 100% rename from TestGUI/Form1.Designer.vb rename to GUIs.Test.TestGUI/Form1.Designer.vb diff --git a/TestGUI/Form1.resx b/GUIs.Test.TestGUI/Form1.resx similarity index 100% rename from TestGUI/Form1.resx rename to GUIs.Test.TestGUI/Form1.resx diff --git a/TestGUI/Form1.vb b/GUIs.Test.TestGUI/Form1.vb similarity index 100% rename from TestGUI/Form1.vb rename to GUIs.Test.TestGUI/Form1.vb diff --git a/TestGUI/My Project/Application.Designer.vb b/GUIs.Test.TestGUI/My Project/Application.Designer.vb similarity index 100% rename from TestGUI/My Project/Application.Designer.vb rename to GUIs.Test.TestGUI/My Project/Application.Designer.vb diff --git a/TestGUI/My Project/Application.myapp b/GUIs.Test.TestGUI/My Project/Application.myapp similarity index 100% rename from TestGUI/My Project/Application.myapp rename to GUIs.Test.TestGUI/My Project/Application.myapp diff --git a/TestGUI/My Project/AssemblyInfo.vb b/GUIs.Test.TestGUI/My Project/AssemblyInfo.vb similarity index 100% rename from TestGUI/My Project/AssemblyInfo.vb rename to GUIs.Test.TestGUI/My Project/AssemblyInfo.vb diff --git a/TestGUI/My Project/Resources.Designer.vb b/GUIs.Test.TestGUI/My Project/Resources.Designer.vb similarity index 100% rename from TestGUI/My Project/Resources.Designer.vb rename to GUIs.Test.TestGUI/My Project/Resources.Designer.vb diff --git a/TestGUI/My Project/Resources.resx b/GUIs.Test.TestGUI/My Project/Resources.resx similarity index 100% rename from TestGUI/My Project/Resources.resx rename to GUIs.Test.TestGUI/My Project/Resources.resx diff --git a/TestGUI/My Project/Settings.Designer.vb b/GUIs.Test.TestGUI/My Project/Settings.Designer.vb similarity index 100% rename from TestGUI/My Project/Settings.Designer.vb rename to GUIs.Test.TestGUI/My Project/Settings.Designer.vb diff --git a/TestGUI/My Project/Settings.settings b/GUIs.Test.TestGUI/My Project/Settings.settings similarity index 100% rename from TestGUI/My Project/Settings.settings rename to GUIs.Test.TestGUI/My Project/Settings.settings diff --git a/TestGUI/My Project/app.manifest b/GUIs.Test.TestGUI/My Project/app.manifest similarity index 100% rename from TestGUI/My Project/app.manifest rename to GUIs.Test.TestGUI/My Project/app.manifest diff --git a/TestGUI/My Project/licenses.licx b/GUIs.Test.TestGUI/My Project/licenses.licx similarity index 100% rename from TestGUI/My Project/licenses.licx rename to GUIs.Test.TestGUI/My Project/licenses.licx diff --git a/TestGUI/TestGUI.vbproj b/GUIs.Test.TestGUI/TestGUI.vbproj similarity index 99% rename from TestGUI/TestGUI.vbproj rename to GUIs.Test.TestGUI/TestGUI.vbproj index 6a81b007..07ece0c7 100644 --- a/TestGUI/TestGUI.vbproj +++ b/GUIs.Test.TestGUI/TestGUI.vbproj @@ -168,7 +168,7 @@ - + {44982f9b-6116-44e2-85d0-f39650b1ef99} Config diff --git a/TestGUI/packages.config b/GUIs.Test.TestGUI/packages.config similarity index 100% rename from TestGUI/packages.config rename to GUIs.Test.TestGUI/packages.config diff --git a/ZUGFeRDTest/App.config b/GUIs.Test.ZUGFeRDTest/App.config similarity index 100% rename from ZUGFeRDTest/App.config rename to GUIs.Test.ZUGFeRDTest/App.config diff --git a/ZUGFeRDTest/Form1.Designer.vb b/GUIs.Test.ZUGFeRDTest/Form1.Designer.vb similarity index 100% rename from ZUGFeRDTest/Form1.Designer.vb rename to GUIs.Test.ZUGFeRDTest/Form1.Designer.vb diff --git a/ZUGFeRDTest/Form1.resx b/GUIs.Test.ZUGFeRDTest/Form1.resx similarity index 100% rename from ZUGFeRDTest/Form1.resx rename to GUIs.Test.ZUGFeRDTest/Form1.resx diff --git a/ZUGFeRDTest/Form1.vb b/GUIs.Test.ZUGFeRDTest/Form1.vb similarity index 100% rename from ZUGFeRDTest/Form1.vb rename to GUIs.Test.ZUGFeRDTest/Form1.vb diff --git a/ZUGFeRDTest/My Project/Application.Designer.vb b/GUIs.Test.ZUGFeRDTest/My Project/Application.Designer.vb similarity index 100% rename from ZUGFeRDTest/My Project/Application.Designer.vb rename to GUIs.Test.ZUGFeRDTest/My Project/Application.Designer.vb diff --git a/ZUGFeRDTest/My Project/Application.myapp b/GUIs.Test.ZUGFeRDTest/My Project/Application.myapp similarity index 100% rename from ZUGFeRDTest/My Project/Application.myapp rename to GUIs.Test.ZUGFeRDTest/My Project/Application.myapp diff --git a/ZUGFeRDTest/My Project/AssemblyInfo.vb b/GUIs.Test.ZUGFeRDTest/My Project/AssemblyInfo.vb similarity index 100% rename from ZUGFeRDTest/My Project/AssemblyInfo.vb rename to GUIs.Test.ZUGFeRDTest/My Project/AssemblyInfo.vb diff --git a/ZUGFeRDTest/My Project/Resources.Designer.vb b/GUIs.Test.ZUGFeRDTest/My Project/Resources.Designer.vb similarity index 100% rename from ZUGFeRDTest/My Project/Resources.Designer.vb rename to GUIs.Test.ZUGFeRDTest/My Project/Resources.Designer.vb diff --git a/ZUGFeRDTest/My Project/Resources.resx b/GUIs.Test.ZUGFeRDTest/My Project/Resources.resx similarity index 100% rename from ZUGFeRDTest/My Project/Resources.resx rename to GUIs.Test.ZUGFeRDTest/My Project/Resources.resx diff --git a/ZUGFeRDTest/My Project/Settings.Designer.vb b/GUIs.Test.ZUGFeRDTest/My Project/Settings.Designer.vb similarity index 100% rename from ZUGFeRDTest/My Project/Settings.Designer.vb rename to GUIs.Test.ZUGFeRDTest/My Project/Settings.Designer.vb diff --git a/ZUGFeRDTest/My Project/Settings.settings b/GUIs.Test.ZUGFeRDTest/My Project/Settings.settings similarity index 100% rename from ZUGFeRDTest/My Project/Settings.settings rename to GUIs.Test.ZUGFeRDTest/My Project/Settings.settings diff --git a/ZUGFeRDTest/ZUGFeRDTest.vbproj b/GUIs.Test.ZUGFeRDTest/ZUGFeRDTest.vbproj similarity index 100% rename from ZUGFeRDTest/ZUGFeRDTest.vbproj rename to GUIs.Test.ZUGFeRDTest/ZUGFeRDTest.vbproj diff --git a/ZUGFeRDTest/packages.config b/GUIs.Test.ZUGFeRDTest/packages.config similarity index 100% rename from ZUGFeRDTest/packages.config rename to GUIs.Test.ZUGFeRDTest/packages.config From 9f55f78e867dbba77037597862939e8cbaf1d809 Mon Sep 17 00:00:00 2001 From: Jonathan Jenne Date: Mon, 15 Apr 2019 14:36:26 +0200 Subject: [PATCH 24/25] move LookupGrid to Controls.LookupGrid folder --- {LookupGrid => Controls.LookupGrid}/LookupControl.Designer.vb | 0 {LookupGrid => Controls.LookupGrid}/LookupControl.resx | 0 {LookupGrid => Controls.LookupGrid}/LookupControl.vb | 0 {LookupGrid => Controls.LookupGrid}/LookupControl.vbproj | 0 {LookupGrid => Controls.LookupGrid}/LookupControl2.vb | 0 .../LookupGridControl.Designer.vb | 0 {LookupGrid => Controls.LookupGrid}/LookupGridControl.vb | 0 {LookupGrid => Controls.LookupGrid}/LookupGridHandler.vb | 0 {LookupGrid => Controls.LookupGrid}/LookupGridRegistration.vb | 0 {LookupGrid => Controls.LookupGrid}/LookupGridView.Designer.vb | 0 {LookupGrid => Controls.LookupGrid}/LookupGridView.vb | 0 .../My Project/Application.Designer.vb | 0 .../My Project/Application.myapp | 0 {LookupGrid => Controls.LookupGrid}/My Project/AssemblyInfo.vb | 0 .../My Project/Resources.Designer.vb | 0 {LookupGrid => Controls.LookupGrid}/My Project/Resources.resx | 0 .../My Project/Settings.Designer.vb | 0 .../My Project/Settings.settings | 0 {LookupGrid => Controls.LookupGrid}/My Project/licenses.licx | 0 {LookupGrid => Controls.LookupGrid}/frmLookupGrid.Designer.vb | 0 {LookupGrid => Controls.LookupGrid}/frmLookupGrid.resx | 0 {LookupGrid => Controls.LookupGrid}/frmLookupGrid.vb | 0 DDMonorepo.sln | 2 +- 23 files changed, 1 insertion(+), 1 deletion(-) rename {LookupGrid => Controls.LookupGrid}/LookupControl.Designer.vb (100%) rename {LookupGrid => Controls.LookupGrid}/LookupControl.resx (100%) rename {LookupGrid => Controls.LookupGrid}/LookupControl.vb (100%) rename {LookupGrid => Controls.LookupGrid}/LookupControl.vbproj (100%) rename {LookupGrid => Controls.LookupGrid}/LookupControl2.vb (100%) rename {LookupGrid => Controls.LookupGrid}/LookupGridControl.Designer.vb (100%) rename {LookupGrid => Controls.LookupGrid}/LookupGridControl.vb (100%) rename {LookupGrid => Controls.LookupGrid}/LookupGridHandler.vb (100%) rename {LookupGrid => Controls.LookupGrid}/LookupGridRegistration.vb (100%) rename {LookupGrid => Controls.LookupGrid}/LookupGridView.Designer.vb (100%) rename {LookupGrid => Controls.LookupGrid}/LookupGridView.vb (100%) rename {LookupGrid => Controls.LookupGrid}/My Project/Application.Designer.vb (100%) rename {LookupGrid => Controls.LookupGrid}/My Project/Application.myapp (100%) rename {LookupGrid => Controls.LookupGrid}/My Project/AssemblyInfo.vb (100%) rename {LookupGrid => Controls.LookupGrid}/My Project/Resources.Designer.vb (100%) rename {LookupGrid => Controls.LookupGrid}/My Project/Resources.resx (100%) rename {LookupGrid => Controls.LookupGrid}/My Project/Settings.Designer.vb (100%) rename {LookupGrid => Controls.LookupGrid}/My Project/Settings.settings (100%) rename {LookupGrid => Controls.LookupGrid}/My Project/licenses.licx (100%) rename {LookupGrid => Controls.LookupGrid}/frmLookupGrid.Designer.vb (100%) rename {LookupGrid => Controls.LookupGrid}/frmLookupGrid.resx (100%) rename {LookupGrid => Controls.LookupGrid}/frmLookupGrid.vb (100%) diff --git a/LookupGrid/LookupControl.Designer.vb b/Controls.LookupGrid/LookupControl.Designer.vb similarity index 100% rename from LookupGrid/LookupControl.Designer.vb rename to Controls.LookupGrid/LookupControl.Designer.vb diff --git a/LookupGrid/LookupControl.resx b/Controls.LookupGrid/LookupControl.resx similarity index 100% rename from LookupGrid/LookupControl.resx rename to Controls.LookupGrid/LookupControl.resx diff --git a/LookupGrid/LookupControl.vb b/Controls.LookupGrid/LookupControl.vb similarity index 100% rename from LookupGrid/LookupControl.vb rename to Controls.LookupGrid/LookupControl.vb diff --git a/LookupGrid/LookupControl.vbproj b/Controls.LookupGrid/LookupControl.vbproj similarity index 100% rename from LookupGrid/LookupControl.vbproj rename to Controls.LookupGrid/LookupControl.vbproj diff --git a/LookupGrid/LookupControl2.vb b/Controls.LookupGrid/LookupControl2.vb similarity index 100% rename from LookupGrid/LookupControl2.vb rename to Controls.LookupGrid/LookupControl2.vb diff --git a/LookupGrid/LookupGridControl.Designer.vb b/Controls.LookupGrid/LookupGridControl.Designer.vb similarity index 100% rename from LookupGrid/LookupGridControl.Designer.vb rename to Controls.LookupGrid/LookupGridControl.Designer.vb diff --git a/LookupGrid/LookupGridControl.vb b/Controls.LookupGrid/LookupGridControl.vb similarity index 100% rename from LookupGrid/LookupGridControl.vb rename to Controls.LookupGrid/LookupGridControl.vb diff --git a/LookupGrid/LookupGridHandler.vb b/Controls.LookupGrid/LookupGridHandler.vb similarity index 100% rename from LookupGrid/LookupGridHandler.vb rename to Controls.LookupGrid/LookupGridHandler.vb diff --git a/LookupGrid/LookupGridRegistration.vb b/Controls.LookupGrid/LookupGridRegistration.vb similarity index 100% rename from LookupGrid/LookupGridRegistration.vb rename to Controls.LookupGrid/LookupGridRegistration.vb diff --git a/LookupGrid/LookupGridView.Designer.vb b/Controls.LookupGrid/LookupGridView.Designer.vb similarity index 100% rename from LookupGrid/LookupGridView.Designer.vb rename to Controls.LookupGrid/LookupGridView.Designer.vb diff --git a/LookupGrid/LookupGridView.vb b/Controls.LookupGrid/LookupGridView.vb similarity index 100% rename from LookupGrid/LookupGridView.vb rename to Controls.LookupGrid/LookupGridView.vb diff --git a/LookupGrid/My Project/Application.Designer.vb b/Controls.LookupGrid/My Project/Application.Designer.vb similarity index 100% rename from LookupGrid/My Project/Application.Designer.vb rename to Controls.LookupGrid/My Project/Application.Designer.vb diff --git a/LookupGrid/My Project/Application.myapp b/Controls.LookupGrid/My Project/Application.myapp similarity index 100% rename from LookupGrid/My Project/Application.myapp rename to Controls.LookupGrid/My Project/Application.myapp diff --git a/LookupGrid/My Project/AssemblyInfo.vb b/Controls.LookupGrid/My Project/AssemblyInfo.vb similarity index 100% rename from LookupGrid/My Project/AssemblyInfo.vb rename to Controls.LookupGrid/My Project/AssemblyInfo.vb diff --git a/LookupGrid/My Project/Resources.Designer.vb b/Controls.LookupGrid/My Project/Resources.Designer.vb similarity index 100% rename from LookupGrid/My Project/Resources.Designer.vb rename to Controls.LookupGrid/My Project/Resources.Designer.vb diff --git a/LookupGrid/My Project/Resources.resx b/Controls.LookupGrid/My Project/Resources.resx similarity index 100% rename from LookupGrid/My Project/Resources.resx rename to Controls.LookupGrid/My Project/Resources.resx diff --git a/LookupGrid/My Project/Settings.Designer.vb b/Controls.LookupGrid/My Project/Settings.Designer.vb similarity index 100% rename from LookupGrid/My Project/Settings.Designer.vb rename to Controls.LookupGrid/My Project/Settings.Designer.vb diff --git a/LookupGrid/My Project/Settings.settings b/Controls.LookupGrid/My Project/Settings.settings similarity index 100% rename from LookupGrid/My Project/Settings.settings rename to Controls.LookupGrid/My Project/Settings.settings diff --git a/LookupGrid/My Project/licenses.licx b/Controls.LookupGrid/My Project/licenses.licx similarity index 100% rename from LookupGrid/My Project/licenses.licx rename to Controls.LookupGrid/My Project/licenses.licx diff --git a/LookupGrid/frmLookupGrid.Designer.vb b/Controls.LookupGrid/frmLookupGrid.Designer.vb similarity index 100% rename from LookupGrid/frmLookupGrid.Designer.vb rename to Controls.LookupGrid/frmLookupGrid.Designer.vb diff --git a/LookupGrid/frmLookupGrid.resx b/Controls.LookupGrid/frmLookupGrid.resx similarity index 100% rename from LookupGrid/frmLookupGrid.resx rename to Controls.LookupGrid/frmLookupGrid.resx diff --git a/LookupGrid/frmLookupGrid.vb b/Controls.LookupGrid/frmLookupGrid.vb similarity index 100% rename from LookupGrid/frmLookupGrid.vb rename to Controls.LookupGrid/frmLookupGrid.vb diff --git a/DDMonorepo.sln b/DDMonorepo.sln index d79bd3b1..0019dc38 100644 --- a/DDMonorepo.sln +++ b/DDMonorepo.sln @@ -31,7 +31,7 @@ Project("{F184B08F-C81C-45F6-A57F-5ABD9991F28F}") = "Config", "Modules.Config\Co EndProject Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Controls", "Controls", "{F98C0329-C004-417F-B2AB-7466E88D8220}" EndProject -Project("{F184B08F-C81C-45F6-A57F-5ABD9991F28F}") = "LookupControl", "LookupGrid\LookupControl.vbproj", "{3DCD6D1A-C830-4241-B7E4-27430E7EA483}" +Project("{F184B08F-C81C-45F6-A57F-5ABD9991F28F}") = "LookupControl", "Controls.LookupGrid\LookupControl.vbproj", "{3DCD6D1A-C830-4241-B7E4-27430E7EA483}" EndProject Project("{F184B08F-C81C-45F6-A57F-5ABD9991F28F}") = "Filesystem", "Filesystem\Filesystem.vbproj", "{991D0231-4623-496D-8BD0-9CA906029CBC}" EndProject From 68dc46c6b4b6929e58f3355e12e54f10f2cd2d03 Mon Sep 17 00:00:00 2001 From: Jonathan Jenne Date: Mon, 15 Apr 2019 16:40:02 +0200 Subject: [PATCH 25/25] Add Test Connection String --- GUIs.ClientSuite/ClientSuite.vbproj | 8 +++---- Modules.Config/ConfigAttributes.vb | 4 ++++ Modules.Config/ConfigManager.vb | 36 ++++++++++++++++++----------- Modules.Config/ConfigSample.vb | 3 +++ 4 files changed, 33 insertions(+), 18 deletions(-) diff --git a/GUIs.ClientSuite/ClientSuite.vbproj b/GUIs.ClientSuite/ClientSuite.vbproj index a0b1e23c..b7851db2 100644 --- a/GUIs.ClientSuite/ClientSuite.vbproj +++ b/GUIs.ClientSuite/ClientSuite.vbproj @@ -445,6 +445,10 @@ + + {3dcd6d1a-c830-4241-b7e4-27430e7ea483} + LookupControl + {5b1171dc-fffe-4813-a20d-786aae47b320} EDMIAPI @@ -453,10 +457,6 @@ {991d0231-4623-496d-8bd0-9ca906029cbc} Filesystem - - {3DCD6D1A-C830-4241-B7E4-27430E7EA483} - LookupControl - {44982f9b-6116-44e2-85d0-f39650b1ef99} Config diff --git a/Modules.Config/ConfigAttributes.vb b/Modules.Config/ConfigAttributes.vb index d5b64582..672423f2 100644 --- a/Modules.Config/ConfigAttributes.vb +++ b/Modules.Config/ConfigAttributes.vb @@ -2,4 +2,8 @@ Public Class ConnectionStringAttribute Inherits Attribute End Class + + Public Class ConnectionStringTestAttribute + Inherits Attribute + End Class End Class diff --git a/Modules.Config/ConfigManager.vb b/Modules.Config/ConfigManager.vb index c1e9a300..a082ca94 100644 --- a/Modules.Config/ConfigManager.vb +++ b/Modules.Config/ConfigManager.vb @@ -14,7 +14,8 @@ Public Class ConfigManager(Of T) Private ReadOnly _UserPath As String Private ReadOnly _ComputerPath As String - Private _ForceUserConfig As Boolean + Private _ForceUserConfig As Boolean = False + Private _TestMode As Boolean = False ''' ''' The blueprint class from which the default config is created @@ -90,6 +91,14 @@ Public Class ConfigManager(Of T) End Try End Function + ''' + ''' Copies all properties from Source to Target, except those who have an attribute + ''' listed in ExcludedAttributeTypes + ''' + ''' Config Class + ''' Source config object + ''' Target config object + ''' List of Attribute type to exclude Private Sub CopyValues(Of T)(Source As T, Target As T, Optional ExcludedAttributeTypes As List(Of Type) = Nothing) Dim oType As Type = GetType(T) Dim oExcludedAttributeTypes = IIf(IsNothing(ExcludedAttributeTypes), New List(Of Type), ExcludedAttributeTypes) @@ -126,12 +135,7 @@ Public Class ConfigManager(Of T) If File.Exists(_ComputerPath) Then Try Dim oComputerConfig = ReadFromFile(_ComputerPath) - - ' if a computer config exists, copy values - ' from computer config to final config - If Not IsNothing(oComputerConfig) Then - CopyValues(oComputerConfig, Config) - End If + CopyValues(oComputerConfig, Config) Catch ex As Exception _Logger.Error(ex) _Logger.Warn("Computer config could not be loaded!") @@ -151,12 +155,16 @@ Public Class ConfigManager(Of T) ' if user config exists If Not IsNothing(oUserConfig) Then Dim oExcludedAttributes As New List(Of Type) - If Not _ForceUserConfig Then - oExcludedAttributes.Add(GetType(ConnectionStringAttribute)) - End If ' Copy values from user config to final config - CopyValues(oUserConfig, Config, oExcludedAttributes) + If _ForceUserConfig Then + CopyValues(oUserConfig, Config, New List(Of Type)) + Else + CopyValues(oUserConfig, Config, New List(Of Type) From { + GetType(ConnectionStringAttribute), + GetType(ConnectionStringTestAttribute) + }) + End If End If 'Dim oConnectionProperty = TestHasAttribute(oConfig, GetType(ConnectionStringAttribute)) @@ -182,14 +190,14 @@ Public Class ConfigManager(Of T) Return oConfig End Function - Private Function TestHasAttribute(Config As T, AttributeType As Type) As String + Private Function TestHasAttribute(Config As T, AttributeType As Type) As Boolean For Each oProperty As PropertyInfo In Config.GetType.GetProperties() If Attribute.IsDefined(oProperty, GetType(ConnectionStringAttribute)) Then - Return oProperty.Name + Return True End If Next - Return Nothing + Return False End Function ''' diff --git a/Modules.Config/ConfigSample.vb b/Modules.Config/ConfigSample.vb index f6ded688..0f2f7e75 100644 --- a/Modules.Config/ConfigSample.vb +++ b/Modules.Config/ConfigSample.vb @@ -4,4 +4,7 @@ Public Class ConfigSample Public Property ConnectionString As String + + + Public Property ConnectionStringTest As String End Class