From b33a381bb929470d611398834453129400433ae9 Mon Sep 17 00:00:00 2001 From: Jonathan Jenne Date: Tue, 10 Nov 2020 16:24:19 +0100 Subject: [PATCH] ObjectPropertyDialog: Add Loading indicator, show basic object properties, show attribute history --- .../frmObjectPropertyDialog.Designer.vb | 493 +++++++++++++++--- .../frmObjectPropertyDialog.vb | 74 ++- 2 files changed, 501 insertions(+), 66 deletions(-) diff --git a/GUIs.Common/ObjectPropertyDialog/frmObjectPropertyDialog.Designer.vb b/GUIs.Common/ObjectPropertyDialog/frmObjectPropertyDialog.Designer.vb index 36de67cf..68be8152 100644 --- a/GUIs.Common/ObjectPropertyDialog/frmObjectPropertyDialog.Designer.vb +++ b/GUIs.Common/ObjectPropertyDialog/frmObjectPropertyDialog.Designer.vb @@ -22,29 +22,82 @@ Partial Class frmObjectPropertyDialog 'Das Bearbeiten mit dem Code-Editor ist nicht möglich. _ Private Sub InitializeComponent() + Dim SplashScreenManager As DevExpress.XtraSplashScreen.SplashScreenManager = New DevExpress.XtraSplashScreen.SplashScreenManager(Me, Nothing, true, true) Dim resources As System.ComponentModel.ComponentResourceManager = New System.ComponentModel.ComponentResourceManager(GetType(frmObjectPropertyDialog)) Me.RepositoryItemComboBox1 = New DevExpress.XtraEditors.Repository.RepositoryItemComboBox() Me.TabFormControl1 = New DevExpress.XtraBars.TabFormControl() Me.cmbBusinessEntity = New DevExpress.XtraBars.BarEditItem() - Me.TabPageProperties = New DevExpress.XtraBars.TabFormPage() + Me.BarStaticItem1 = New DevExpress.XtraBars.BarStaticItem() + Me.TabPageAttributes = New DevExpress.XtraBars.TabFormPage() Me.TabFormContentContainer1 = New DevExpress.XtraBars.TabFormContentContainer() - Me.LayoutControlProperties = New DevExpress.XtraLayout.LayoutControl() - Me.Root = New DevExpress.XtraLayout.LayoutControlGroup() - Me.TabPageMetadata = New DevExpress.XtraBars.TabFormPage() + Me.LayoutControlAttributes = New DevExpress.XtraLayout.LayoutControl() + Me.AttributeLayout = New DevExpress.XtraLayout.LayoutControlGroup() + Me.TabPageObject = New DevExpress.XtraBars.TabFormPage() Me.TabFormContentContainer2 = New DevExpress.XtraBars.TabFormContentContainer() + Me.LayoutControlObject = New DevExpress.XtraLayout.LayoutControl() + Me.LayoutObject = New DevExpress.XtraLayout.LayoutControlGroup() Me.TabPageLifecycle = New DevExpress.XtraBars.TabFormPage() Me.TabFormContentContainer3 = New DevExpress.XtraBars.TabFormContentContainer() - Me.BarStaticItem1 = New DevExpress.XtraBars.BarStaticItem() - CType(Me.RepositoryItemComboBox1, System.ComponentModel.ISupportInitialize).BeginInit() - CType(Me.TabFormControl1, System.ComponentModel.ISupportInitialize).BeginInit() - Me.TabFormContentContainer1.SuspendLayout() - CType(Me.LayoutControlProperties, System.ComponentModel.ISupportInitialize).BeginInit() - CType(Me.Root, System.ComponentModel.ISupportInitialize).BeginInit() - Me.SuspendLayout() + Me.TabPageHistory = New DevExpress.XtraBars.TabFormPage() + Me.TabFormContentContainer4 = New DevExpress.XtraBars.TabFormContentContainer() + Me.GridValueHistory = New DevExpress.XtraGrid.GridControl() + Me.ViewValueHistory = New DevExpress.XtraGrid.Views.Grid.GridView() + Me.GridColumn1 = New DevExpress.XtraGrid.Columns.GridColumn() + Me.GridColumn2 = New DevExpress.XtraGrid.Columns.GridColumn() + Me.GridColumn3 = New DevExpress.XtraGrid.Columns.GridColumn() + Me.GridColumn4 = New DevExpress.XtraGrid.Columns.GridColumn() + Me.GridColumn5 = New DevExpress.XtraGrid.Columns.GridColumn() + Me.AttributeRoot = New DevExpress.XtraLayout.LayoutControlGroup() + Me.txtCreatedWhen = New DevExpress.XtraEditors.TextEdit() + Me.LayoutControlItem1 = New DevExpress.XtraLayout.LayoutControlItem() + Me.txtChangedWhen = New DevExpress.XtraEditors.TextEdit() + Me.LayoutControlItem2 = New DevExpress.XtraLayout.LayoutControlItem() + Me.txtAccessedWhen = New DevExpress.XtraEditors.TextEdit() + Me.LayoutControlItem3 = New DevExpress.XtraLayout.LayoutControlItem() + Me.txtObjectId = New DevExpress.XtraEditors.TextEdit() + Me.LayoutControlItem4 = New DevExpress.XtraLayout.LayoutControlItem() + Me.SimpleSeparator1 = New DevExpress.XtraLayout.SimpleSeparator() + Me.txtCreatedWho = New DevExpress.XtraEditors.TextEdit() + Me.LayoutControlItem5 = New DevExpress.XtraLayout.LayoutControlItem() + Me.txtChangedWho = New DevExpress.XtraEditors.TextEdit() + Me.LayoutControlItem6 = New DevExpress.XtraLayout.LayoutControlItem() + Me.TextEdit1 = New DevExpress.XtraEditors.TextEdit() + Me.txtAccessedWho = New DevExpress.XtraLayout.LayoutControlItem() + Me.EmptySpaceItem1 = New DevExpress.XtraLayout.EmptySpaceItem() + CType(Me.RepositoryItemComboBox1,System.ComponentModel.ISupportInitialize).BeginInit + CType(Me.TabFormControl1,System.ComponentModel.ISupportInitialize).BeginInit + Me.TabFormContentContainer1.SuspendLayout + CType(Me.LayoutControlAttributes,System.ComponentModel.ISupportInitialize).BeginInit + CType(Me.AttributeLayout,System.ComponentModel.ISupportInitialize).BeginInit + Me.TabFormContentContainer2.SuspendLayout + CType(Me.LayoutControlObject,System.ComponentModel.ISupportInitialize).BeginInit + Me.LayoutControlObject.SuspendLayout + CType(Me.LayoutObject,System.ComponentModel.ISupportInitialize).BeginInit + Me.TabFormContentContainer4.SuspendLayout + CType(Me.GridValueHistory,System.ComponentModel.ISupportInitialize).BeginInit + CType(Me.ViewValueHistory,System.ComponentModel.ISupportInitialize).BeginInit + CType(Me.AttributeRoot,System.ComponentModel.ISupportInitialize).BeginInit + CType(Me.txtCreatedWhen.Properties,System.ComponentModel.ISupportInitialize).BeginInit + CType(Me.LayoutControlItem1,System.ComponentModel.ISupportInitialize).BeginInit + CType(Me.txtChangedWhen.Properties,System.ComponentModel.ISupportInitialize).BeginInit + CType(Me.LayoutControlItem2,System.ComponentModel.ISupportInitialize).BeginInit + CType(Me.txtAccessedWhen.Properties,System.ComponentModel.ISupportInitialize).BeginInit + CType(Me.LayoutControlItem3,System.ComponentModel.ISupportInitialize).BeginInit + CType(Me.txtObjectId.Properties,System.ComponentModel.ISupportInitialize).BeginInit + CType(Me.LayoutControlItem4,System.ComponentModel.ISupportInitialize).BeginInit + CType(Me.SimpleSeparator1,System.ComponentModel.ISupportInitialize).BeginInit + CType(Me.txtCreatedWho.Properties,System.ComponentModel.ISupportInitialize).BeginInit + CType(Me.LayoutControlItem5,System.ComponentModel.ISupportInitialize).BeginInit + CType(Me.txtChangedWho.Properties,System.ComponentModel.ISupportInitialize).BeginInit + CType(Me.LayoutControlItem6,System.ComponentModel.ISupportInitialize).BeginInit + CType(Me.TextEdit1.Properties,System.ComponentModel.ISupportInitialize).BeginInit + CType(Me.txtAccessedWho,System.ComponentModel.ISupportInitialize).BeginInit + CType(Me.EmptySpaceItem1,System.ComponentModel.ISupportInitialize).BeginInit + Me.SuspendLayout ' 'RepositoryItemComboBox1 ' - Me.RepositoryItemComboBox1.AutoHeight = False + Me.RepositoryItemComboBox1.AutoHeight = false Me.RepositoryItemComboBox1.Buttons.AddRange(New DevExpress.XtraEditors.Controls.EditorButton() {New DevExpress.XtraEditors.Controls.EditorButton(DevExpress.XtraEditors.Controls.ButtonPredefines.Combo)}) Me.RepositoryItemComboBox1.Name = "RepositoryItemComboBox1" ' @@ -53,18 +106,19 @@ Partial Class frmObjectPropertyDialog Me.TabFormControl1.Items.AddRange(New DevExpress.XtraBars.BarItem() {Me.cmbBusinessEntity, Me.BarStaticItem1}) Me.TabFormControl1.Location = New System.Drawing.Point(0, 0) Me.TabFormControl1.Name = "TabFormControl1" - Me.TabFormControl1.Pages.Add(Me.TabPageProperties) - Me.TabFormControl1.Pages.Add(Me.TabPageMetadata) + Me.TabFormControl1.Pages.Add(Me.TabPageAttributes) + Me.TabFormControl1.Pages.Add(Me.TabPageObject) Me.TabFormControl1.Pages.Add(Me.TabPageLifecycle) - Me.TabFormControl1.SelectedPage = Me.TabPageProperties - Me.TabFormControl1.ShowAddPageButton = False - Me.TabFormControl1.ShowTabCloseButtons = False + Me.TabFormControl1.Pages.Add(Me.TabPageHistory) + Me.TabFormControl1.SelectedPage = Me.TabPageAttributes + Me.TabFormControl1.ShowAddPageButton = false + Me.TabFormControl1.ShowTabCloseButtons = false Me.TabFormControl1.Size = New System.Drawing.Size(572, 71) Me.TabFormControl1.TabForm = Me Me.TabFormControl1.TabIndex = 0 Me.TabFormControl1.TabRightItemLinks.Add(Me.BarStaticItem1) Me.TabFormControl1.TabRightItemLinks.Add(Me.cmbBusinessEntity) - Me.TabFormControl1.TabStop = False + Me.TabFormControl1.TabStop = false ' 'cmbBusinessEntity ' @@ -74,53 +128,86 @@ Partial Class frmObjectPropertyDialog Me.cmbBusinessEntity.Id = 6 Me.cmbBusinessEntity.Name = "cmbBusinessEntity" ' - 'TabPageProperties + 'BarStaticItem1 ' - Me.TabPageProperties.ContentContainer = Me.TabFormContentContainer1 - Me.TabPageProperties.Name = "TabPageProperties" - Me.TabPageProperties.Text = "Eigenschaften" + Me.BarStaticItem1.Caption = "Entity:" + Me.BarStaticItem1.Id = 0 + Me.BarStaticItem1.Name = "BarStaticItem1" + ' + 'TabPageAttributes + ' + Me.TabPageAttributes.ContentContainer = Me.TabFormContentContainer1 + Me.TabPageAttributes.Name = "TabPageAttributes" + Me.TabPageAttributes.Text = "Attribute" ' 'TabFormContentContainer1 ' - Me.TabFormContentContainer1.Controls.Add(Me.LayoutControlProperties) + Me.TabFormContentContainer1.Controls.Add(Me.LayoutControlAttributes) Me.TabFormContentContainer1.Dock = System.Windows.Forms.DockStyle.Fill Me.TabFormContentContainer1.Location = New System.Drawing.Point(0, 71) Me.TabFormContentContainer1.Name = "TabFormContentContainer1" Me.TabFormContentContainer1.Size = New System.Drawing.Size(572, 534) Me.TabFormContentContainer1.TabIndex = 1 ' - 'LayoutControlProperties + 'LayoutControlAttributes ' - Me.LayoutControlProperties.Dock = System.Windows.Forms.DockStyle.Fill - Me.LayoutControlProperties.Location = New System.Drawing.Point(0, 0) - Me.LayoutControlProperties.Name = "LayoutControlProperties" - Me.LayoutControlProperties.Root = Me.Root - Me.LayoutControlProperties.Size = New System.Drawing.Size(572, 534) - Me.LayoutControlProperties.TabIndex = 0 - Me.LayoutControlProperties.Text = "LayoutControl1" + Me.LayoutControlAttributes.Dock = System.Windows.Forms.DockStyle.Fill + Me.LayoutControlAttributes.Location = New System.Drawing.Point(0, 0) + Me.LayoutControlAttributes.Name = "LayoutControlAttributes" + Me.LayoutControlAttributes.Root = Me.AttributeLayout + Me.LayoutControlAttributes.Size = New System.Drawing.Size(572, 534) + Me.LayoutControlAttributes.TabIndex = 0 + Me.LayoutControlAttributes.Text = "LayoutControl1" ' - 'Root + 'AttributeLayout ' - Me.Root.EnableIndentsWithoutBorders = DevExpress.Utils.DefaultBoolean.[True] - Me.Root.GroupBordersVisible = False - Me.Root.Name = "Root" - Me.Root.Size = New System.Drawing.Size(572, 534) - Me.Root.TextVisible = False + Me.AttributeLayout.EnableIndentsWithoutBorders = DevExpress.Utils.DefaultBoolean.[True] + Me.AttributeLayout.GroupBordersVisible = false + Me.AttributeLayout.Name = "AttributeRoot" + Me.AttributeLayout.Size = New System.Drawing.Size(572, 534) + Me.AttributeLayout.TextVisible = false ' - 'TabPageMetadata + 'TabPageObject ' - Me.TabPageMetadata.ContentContainer = Me.TabFormContentContainer2 - Me.TabPageMetadata.Name = "TabPageMetadata" - Me.TabPageMetadata.Text = "Metadaten" + Me.TabPageObject.ContentContainer = Me.TabFormContentContainer2 + Me.TabPageObject.Name = "TabPageObject" + Me.TabPageObject.Text = "Objekt" ' 'TabFormContentContainer2 ' + Me.TabFormContentContainer2.Controls.Add(Me.LayoutControlObject) Me.TabFormContentContainer2.Dock = System.Windows.Forms.DockStyle.Fill Me.TabFormContentContainer2.Location = New System.Drawing.Point(0, 71) Me.TabFormContentContainer2.Name = "TabFormContentContainer2" Me.TabFormContentContainer2.Size = New System.Drawing.Size(572, 534) Me.TabFormContentContainer2.TabIndex = 2 ' + 'LayoutControlObject + ' + Me.LayoutControlObject.Controls.Add(Me.txtCreatedWhen) + Me.LayoutControlObject.Controls.Add(Me.txtChangedWhen) + Me.LayoutControlObject.Controls.Add(Me.txtAccessedWhen) + Me.LayoutControlObject.Controls.Add(Me.txtObjectId) + Me.LayoutControlObject.Controls.Add(Me.txtCreatedWho) + Me.LayoutControlObject.Controls.Add(Me.txtChangedWho) + Me.LayoutControlObject.Controls.Add(Me.TextEdit1) + Me.LayoutControlObject.Dock = System.Windows.Forms.DockStyle.Fill + Me.LayoutControlObject.Location = New System.Drawing.Point(0, 0) + Me.LayoutControlObject.Name = "LayoutControlObject" + Me.LayoutControlObject.Root = Me.LayoutObject + Me.LayoutControlObject.Size = New System.Drawing.Size(572, 534) + Me.LayoutControlObject.TabIndex = 0 + Me.LayoutControlObject.Text = "LayoutControl1" + ' + 'LayoutObject + ' + Me.LayoutObject.EnableIndentsWithoutBorders = DevExpress.Utils.DefaultBoolean.[True] + Me.LayoutObject.GroupBordersVisible = false + Me.LayoutObject.Items.AddRange(New DevExpress.XtraLayout.BaseLayoutItem() {Me.LayoutControlItem1, Me.LayoutControlItem2, Me.LayoutControlItem3, Me.LayoutControlItem4, Me.SimpleSeparator1, Me.LayoutControlItem5, Me.LayoutControlItem6, Me.txtAccessedWho, Me.EmptySpaceItem1}) + Me.LayoutObject.Name = "LayoutObject" + Me.LayoutObject.Size = New System.Drawing.Size(572, 534) + Me.LayoutObject.TextVisible = false + ' 'TabPageLifecycle ' Me.TabPageLifecycle.ContentContainer = Me.TabFormContentContainer3 @@ -135,42 +222,330 @@ Partial Class frmObjectPropertyDialog Me.TabFormContentContainer3.Size = New System.Drawing.Size(572, 534) Me.TabFormContentContainer3.TabIndex = 3 ' - 'BarStaticItem1 + 'TabPageHistory ' - Me.BarStaticItem1.Caption = "Entity:" - Me.BarStaticItem1.Id = 0 - Me.BarStaticItem1.Name = "BarStaticItem1" + Me.TabPageHistory.ContentContainer = Me.TabFormContentContainer4 + Me.TabPageHistory.Name = "TabPageHistory" + Me.TabPageHistory.Text = "Historie" + ' + 'TabFormContentContainer4 + ' + Me.TabFormContentContainer4.Controls.Add(Me.GridValueHistory) + Me.TabFormContentContainer4.Dock = System.Windows.Forms.DockStyle.Fill + Me.TabFormContentContainer4.Location = New System.Drawing.Point(0, 71) + Me.TabFormContentContainer4.Name = "TabFormContentContainer4" + Me.TabFormContentContainer4.Size = New System.Drawing.Size(572, 534) + Me.TabFormContentContainer4.TabIndex = 3 + ' + 'GridValueHistory + ' + Me.GridValueHistory.Dock = System.Windows.Forms.DockStyle.Fill + Me.GridValueHistory.Location = New System.Drawing.Point(0, 0) + Me.GridValueHistory.MainView = Me.ViewValueHistory + Me.GridValueHistory.Name = "GridValueHistory" + Me.GridValueHistory.Size = New System.Drawing.Size(572, 534) + Me.GridValueHistory.TabIndex = 0 + Me.GridValueHistory.ViewCollection.AddRange(New DevExpress.XtraGrid.Views.Base.BaseView() {Me.ViewValueHistory}) + ' + 'ViewValueHistory + ' + Me.ViewValueHistory.Columns.AddRange(New DevExpress.XtraGrid.Columns.GridColumn() {Me.GridColumn1, Me.GridColumn2, Me.GridColumn3, Me.GridColumn4, Me.GridColumn5}) + Me.ViewValueHistory.GridControl = Me.GridValueHistory + Me.ViewValueHistory.Name = "ViewValueHistory" + Me.ViewValueHistory.OptionsBehavior.Editable = false + Me.ViewValueHistory.OptionsBehavior.ReadOnly = true + ' + 'GridColumn1 + ' + Me.GridColumn1.Caption = "Attribut" + Me.GridColumn1.FieldName = "Attribute" + Me.GridColumn1.Name = "GridColumn1" + Me.GridColumn1.Visible = true + Me.GridColumn1.VisibleIndex = 0 + ' + 'GridColumn2 + ' + Me.GridColumn2.Caption = "Alter Wert" + Me.GridColumn2.FieldName = "Old value" + Me.GridColumn2.Name = "GridColumn2" + Me.GridColumn2.Visible = true + Me.GridColumn2.VisibleIndex = 1 + ' + 'GridColumn3 + ' + Me.GridColumn3.Caption = "Neuer Wert" + Me.GridColumn3.FieldName = "New value" + Me.GridColumn3.Name = "GridColumn3" + Me.GridColumn3.Visible = true + Me.GridColumn3.VisibleIndex = 2 + ' + 'GridColumn4 + ' + Me.GridColumn4.Caption = "Geändert Wer" + Me.GridColumn4.FieldName = "Changed who" + Me.GridColumn4.Name = "GridColumn4" + Me.GridColumn4.Visible = true + Me.GridColumn4.VisibleIndex = 3 + ' + 'GridColumn5 + ' + Me.GridColumn5.Caption = "Geändert Wann" + Me.GridColumn5.FieldName = "Changed when" + Me.GridColumn5.Name = "GridColumn5" + Me.GridColumn5.Visible = true + Me.GridColumn5.VisibleIndex = 4 + ' + 'AttributeRoot + ' + Me.AttributeRoot.EnableIndentsWithoutBorders = DevExpress.Utils.DefaultBoolean.[True] + Me.AttributeRoot.GroupBordersVisible = false + Me.AttributeRoot.Location = New System.Drawing.Point(0, 0) + Me.AttributeRoot.Name = "AttributeRoot" + Me.AttributeRoot.Size = New System.Drawing.Size(572, 534) + Me.AttributeRoot.TextVisible = false + ' + 'txtCreatedWhen + ' + Me.txtCreatedWhen.Location = New System.Drawing.Point(87, 37) + Me.txtCreatedWhen.Name = "txtCreatedWhen" + Me.txtCreatedWhen.Properties.AppearanceReadOnly.BackColor = System.Drawing.Color.White + Me.txtCreatedWhen.Properties.AppearanceReadOnly.Options.UseBackColor = true + Me.txtCreatedWhen.Properties.ReadOnly = true + Me.txtCreatedWhen.Size = New System.Drawing.Size(197, 20) + Me.txtCreatedWhen.StyleController = Me.LayoutControlObject + Me.txtCreatedWhen.TabIndex = 4 + ' + 'LayoutControlItem1 + ' + Me.LayoutControlItem1.Control = Me.txtCreatedWhen + Me.LayoutControlItem1.Location = New System.Drawing.Point(0, 25) + Me.LayoutControlItem1.Name = "LayoutControlItem1" + Me.LayoutControlItem1.Size = New System.Drawing.Size(276, 24) + Me.LayoutControlItem1.Text = "Erstellt" + Me.LayoutControlItem1.TextSize = New System.Drawing.Size(72, 13) + ' + 'txtChangedWhen + ' + Me.txtChangedWhen.Location = New System.Drawing.Point(87, 61) + Me.txtChangedWhen.Name = "txtChangedWhen" + Me.txtChangedWhen.Properties.AppearanceReadOnly.BackColor = System.Drawing.Color.White + Me.txtChangedWhen.Properties.AppearanceReadOnly.Options.UseBackColor = true + Me.txtChangedWhen.Properties.ReadOnly = true + Me.txtChangedWhen.Size = New System.Drawing.Size(197, 20) + Me.txtChangedWhen.StyleController = Me.LayoutControlObject + Me.txtChangedWhen.TabIndex = 5 + ' + 'LayoutControlItem2 + ' + Me.LayoutControlItem2.Control = Me.txtChangedWhen + Me.LayoutControlItem2.Location = New System.Drawing.Point(0, 49) + Me.LayoutControlItem2.Name = "LayoutControlItem2" + Me.LayoutControlItem2.Size = New System.Drawing.Size(276, 24) + Me.LayoutControlItem2.Text = "Geändert" + Me.LayoutControlItem2.TextSize = New System.Drawing.Size(72, 13) + ' + 'txtAccessedWhen + ' + Me.txtAccessedWhen.Location = New System.Drawing.Point(87, 85) + Me.txtAccessedWhen.Name = "txtAccessedWhen" + Me.txtAccessedWhen.Properties.AppearanceReadOnly.BackColor = System.Drawing.Color.White + Me.txtAccessedWhen.Properties.AppearanceReadOnly.Options.UseBackColor = true + Me.txtAccessedWhen.Properties.ReadOnly = true + Me.txtAccessedWhen.Size = New System.Drawing.Size(197, 20) + Me.txtAccessedWhen.StyleController = Me.LayoutControlObject + Me.txtAccessedWhen.TabIndex = 6 + ' + 'LayoutControlItem3 + ' + Me.LayoutControlItem3.Control = Me.txtAccessedWhen + Me.LayoutControlItem3.Location = New System.Drawing.Point(0, 73) + Me.LayoutControlItem3.Name = "LayoutControlItem3" + Me.LayoutControlItem3.Size = New System.Drawing.Size(276, 24) + Me.LayoutControlItem3.Text = "Letzter Zugriff" + Me.LayoutControlItem3.TextSize = New System.Drawing.Size(72, 13) + ' + 'txtObjectId + ' + Me.txtObjectId.Location = New System.Drawing.Point(87, 12) + Me.txtObjectId.Name = "txtObjectId" + Me.txtObjectId.Properties.AppearanceReadOnly.BackColor = System.Drawing.Color.White + Me.txtObjectId.Properties.AppearanceReadOnly.Options.UseBackColor = true + Me.txtObjectId.Properties.ReadOnly = true + Me.txtObjectId.Size = New System.Drawing.Size(473, 20) + Me.txtObjectId.StyleController = Me.LayoutControlObject + Me.txtObjectId.TabIndex = 7 + ' + 'LayoutControlItem4 + ' + Me.LayoutControlItem4.Control = Me.txtObjectId + Me.LayoutControlItem4.Location = New System.Drawing.Point(0, 0) + Me.LayoutControlItem4.Name = "LayoutControlItem4" + Me.LayoutControlItem4.Size = New System.Drawing.Size(552, 24) + Me.LayoutControlItem4.Text = "Objekt Id" + Me.LayoutControlItem4.TextSize = New System.Drawing.Size(72, 13) + ' + 'SimpleSeparator1 + ' + Me.SimpleSeparator1.AllowHotTrack = false + Me.SimpleSeparator1.Location = New System.Drawing.Point(0, 24) + Me.SimpleSeparator1.Name = "SimpleSeparator1" + Me.SimpleSeparator1.Size = New System.Drawing.Size(552, 1) + ' + 'txtCreatedWho + ' + Me.txtCreatedWho.Location = New System.Drawing.Point(363, 37) + Me.txtCreatedWho.Name = "txtCreatedWho" + Me.txtCreatedWho.Properties.AppearanceReadOnly.BackColor = System.Drawing.Color.White + Me.txtCreatedWho.Properties.AppearanceReadOnly.Options.UseBackColor = true + Me.txtCreatedWho.Properties.ReadOnly = true + Me.txtCreatedWho.Size = New System.Drawing.Size(197, 20) + Me.txtCreatedWho.StyleController = Me.LayoutControlObject + Me.txtCreatedWho.TabIndex = 8 + ' + 'LayoutControlItem5 + ' + Me.LayoutControlItem5.Control = Me.txtCreatedWho + Me.LayoutControlItem5.Location = New System.Drawing.Point(276, 25) + Me.LayoutControlItem5.Name = "LayoutControlItem5" + Me.LayoutControlItem5.Size = New System.Drawing.Size(276, 24) + Me.LayoutControlItem5.Text = "von" + Me.LayoutControlItem5.TextSize = New System.Drawing.Size(72, 13) + ' + 'txtChangedWho + ' + Me.txtChangedWho.Location = New System.Drawing.Point(363, 61) + Me.txtChangedWho.Name = "txtChangedWho" + Me.txtChangedWho.Properties.AppearanceReadOnly.BackColor = System.Drawing.Color.White + Me.txtChangedWho.Properties.AppearanceReadOnly.Options.UseBackColor = true + Me.txtChangedWho.Properties.ReadOnly = true + Me.txtChangedWho.Size = New System.Drawing.Size(197, 20) + Me.txtChangedWho.StyleController = Me.LayoutControlObject + Me.txtChangedWho.TabIndex = 9 + ' + 'LayoutControlItem6 + ' + Me.LayoutControlItem6.Control = Me.txtChangedWho + Me.LayoutControlItem6.Location = New System.Drawing.Point(276, 49) + Me.LayoutControlItem6.Name = "LayoutControlItem6" + Me.LayoutControlItem6.Size = New System.Drawing.Size(276, 24) + Me.LayoutControlItem6.Text = "von" + Me.LayoutControlItem6.TextSize = New System.Drawing.Size(72, 13) + ' + 'TextEdit1 + ' + Me.TextEdit1.Location = New System.Drawing.Point(363, 85) + Me.TextEdit1.Name = "TextEdit1" + Me.TextEdit1.Properties.AppearanceReadOnly.BackColor = System.Drawing.Color.White + Me.TextEdit1.Properties.AppearanceReadOnly.Options.UseBackColor = true + Me.TextEdit1.Properties.ReadOnly = true + Me.TextEdit1.Size = New System.Drawing.Size(197, 20) + Me.TextEdit1.StyleController = Me.LayoutControlObject + Me.TextEdit1.TabIndex = 10 + ' + 'txtAccessedWho + ' + Me.txtAccessedWho.Control = Me.TextEdit1 + Me.txtAccessedWho.CustomizationFormText = "von" + Me.txtAccessedWho.Location = New System.Drawing.Point(276, 73) + Me.txtAccessedWho.Name = "txtAccessedWho" + Me.txtAccessedWho.Size = New System.Drawing.Size(276, 24) + Me.txtAccessedWho.Text = "von" + Me.txtAccessedWho.TextSize = New System.Drawing.Size(72, 13) + ' + 'EmptySpaceItem1 + ' + Me.EmptySpaceItem1.AllowHotTrack = false + Me.EmptySpaceItem1.Location = New System.Drawing.Point(0, 97) + Me.EmptySpaceItem1.Name = "EmptySpaceItem1" + Me.EmptySpaceItem1.Size = New System.Drawing.Size(552, 417) + Me.EmptySpaceItem1.TextSize = New System.Drawing.Size(0, 0) + ' + 'SplashScreenManager + ' + SplashScreenManager.ClosingDelay = 500 ' 'frmObjectPropertyDialog ' - Me.AutoScaleDimensions = New System.Drawing.SizeF(6.0!, 13.0!) + Me.AutoScaleDimensions = New System.Drawing.SizeF(6!, 13!) Me.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font Me.ClientSize = New System.Drawing.Size(572, 605) Me.Controls.Add(Me.TabFormContentContainer1) Me.Controls.Add(Me.TabFormControl1) - Me.IconOptions.SvgImage = CType(resources.GetObject("frmObjectPropertyDialog.IconOptions.SvgImage"), DevExpress.Utils.Svg.SvgImage) + Me.IconOptions.SvgImage = CType(resources.GetObject("frmObjectPropertyDialog.IconOptions.SvgImage"),DevExpress.Utils.Svg.SvgImage) Me.Name = "frmObjectPropertyDialog" Me.TabFormControl = Me.TabFormControl1 - Me.Text = "Objekt-Eigenschaften" - CType(Me.RepositoryItemComboBox1, System.ComponentModel.ISupportInitialize).EndInit() - CType(Me.TabFormControl1, System.ComponentModel.ISupportInitialize).EndInit() - Me.TabFormContentContainer1.ResumeLayout(False) - CType(Me.LayoutControlProperties, System.ComponentModel.ISupportInitialize).EndInit() - CType(Me.Root, System.ComponentModel.ISupportInitialize).EndInit() - Me.ResumeLayout(False) + Me.Text = "Eigenschaften" + CType(Me.RepositoryItemComboBox1,System.ComponentModel.ISupportInitialize).EndInit + CType(Me.TabFormControl1,System.ComponentModel.ISupportInitialize).EndInit + Me.TabFormContentContainer1.ResumeLayout(false) + CType(Me.LayoutControlAttributes,System.ComponentModel.ISupportInitialize).EndInit + CType(Me.AttributeLayout,System.ComponentModel.ISupportInitialize).EndInit + Me.TabFormContentContainer2.ResumeLayout(false) + CType(Me.LayoutControlObject,System.ComponentModel.ISupportInitialize).EndInit + Me.LayoutControlObject.ResumeLayout(false) + CType(Me.LayoutObject,System.ComponentModel.ISupportInitialize).EndInit + Me.TabFormContentContainer4.ResumeLayout(false) + CType(Me.GridValueHistory,System.ComponentModel.ISupportInitialize).EndInit + CType(Me.ViewValueHistory,System.ComponentModel.ISupportInitialize).EndInit + CType(Me.AttributeRoot,System.ComponentModel.ISupportInitialize).EndInit + CType(Me.txtCreatedWhen.Properties,System.ComponentModel.ISupportInitialize).EndInit + CType(Me.LayoutControlItem1,System.ComponentModel.ISupportInitialize).EndInit + CType(Me.txtChangedWhen.Properties,System.ComponentModel.ISupportInitialize).EndInit + CType(Me.LayoutControlItem2,System.ComponentModel.ISupportInitialize).EndInit + CType(Me.txtAccessedWhen.Properties,System.ComponentModel.ISupportInitialize).EndInit + CType(Me.LayoutControlItem3,System.ComponentModel.ISupportInitialize).EndInit + CType(Me.txtObjectId.Properties,System.ComponentModel.ISupportInitialize).EndInit + CType(Me.LayoutControlItem4,System.ComponentModel.ISupportInitialize).EndInit + CType(Me.SimpleSeparator1,System.ComponentModel.ISupportInitialize).EndInit + CType(Me.txtCreatedWho.Properties,System.ComponentModel.ISupportInitialize).EndInit + CType(Me.LayoutControlItem5,System.ComponentModel.ISupportInitialize).EndInit + CType(Me.txtChangedWho.Properties,System.ComponentModel.ISupportInitialize).EndInit + CType(Me.LayoutControlItem6,System.ComponentModel.ISupportInitialize).EndInit + CType(Me.TextEdit1.Properties,System.ComponentModel.ISupportInitialize).EndInit + CType(Me.txtAccessedWho,System.ComponentModel.ISupportInitialize).EndInit + CType(Me.EmptySpaceItem1,System.ComponentModel.ISupportInitialize).EndInit + Me.ResumeLayout(false) - End Sub +End Sub Friend WithEvents TabFormControl1 As DevExpress.XtraBars.TabFormControl - Friend WithEvents TabPageProperties As DevExpress.XtraBars.TabFormPage + Friend WithEvents TabPageAttributes As DevExpress.XtraBars.TabFormPage Friend WithEvents TabFormContentContainer1 As DevExpress.XtraBars.TabFormContentContainer - Friend WithEvents TabPageMetadata As DevExpress.XtraBars.TabFormPage + Friend WithEvents TabPageObject As DevExpress.XtraBars.TabFormPage Friend WithEvents TabFormContentContainer2 As DevExpress.XtraBars.TabFormContentContainer Friend WithEvents TabPageLifecycle As DevExpress.XtraBars.TabFormPage Friend WithEvents TabFormContentContainer3 As DevExpress.XtraBars.TabFormContentContainer - Friend WithEvents LayoutControlProperties As DevExpress.XtraLayout.LayoutControl - Friend WithEvents Root As DevExpress.XtraLayout.LayoutControlGroup + Friend WithEvents LayoutControlAttributes As DevExpress.XtraLayout.LayoutControl + Friend WithEvents AttributeRoot As DevExpress.XtraLayout.LayoutControlGroup Friend WithEvents cmbBusinessEntity As DevExpress.XtraBars.BarEditItem Friend WithEvents RepositoryItemComboBox1 As DevExpress.XtraEditors.Repository.RepositoryItemComboBox Friend WithEvents BarStaticItem1 As DevExpress.XtraBars.BarStaticItem + Friend WithEvents TabPageHistory As DevExpress.XtraBars.TabFormPage + Friend WithEvents TabFormContentContainer4 As DevExpress.XtraBars.TabFormContentContainer + Friend WithEvents GridValueHistory As DevExpress.XtraGrid.GridControl + Friend WithEvents ViewValueHistory As DevExpress.XtraGrid.Views.Grid.GridView + Friend WithEvents GridColumn1 As DevExpress.XtraGrid.Columns.GridColumn + Friend WithEvents GridColumn2 As DevExpress.XtraGrid.Columns.GridColumn + Friend WithEvents GridColumn3 As DevExpress.XtraGrid.Columns.GridColumn + Friend WithEvents GridColumn4 As DevExpress.XtraGrid.Columns.GridColumn + Friend WithEvents GridColumn5 As DevExpress.XtraGrid.Columns.GridColumn + Friend WithEvents LayoutControlObject As DevExpress.XtraLayout.LayoutControl + Friend WithEvents LayoutObject As DevExpress.XtraLayout.LayoutControlGroup + Friend WithEvents AttributeLayout As DevExpress.XtraLayout.LayoutControlGroup + Friend WithEvents txtCreatedWhen As DevExpress.XtraEditors.TextEdit + Friend WithEvents txtChangedWhen As DevExpress.XtraEditors.TextEdit + Friend WithEvents txtAccessedWhen As DevExpress.XtraEditors.TextEdit + Friend WithEvents txtObjectId As DevExpress.XtraEditors.TextEdit + Friend WithEvents LayoutControlItem1 As DevExpress.XtraLayout.LayoutControlItem + Friend WithEvents LayoutControlItem2 As DevExpress.XtraLayout.LayoutControlItem + Friend WithEvents LayoutControlItem3 As DevExpress.XtraLayout.LayoutControlItem + Friend WithEvents LayoutControlItem4 As DevExpress.XtraLayout.LayoutControlItem + Friend WithEvents SimpleSeparator1 As DevExpress.XtraLayout.SimpleSeparator + Friend WithEvents txtCreatedWho As DevExpress.XtraEditors.TextEdit + Friend WithEvents txtChangedWho As DevExpress.XtraEditors.TextEdit + Friend WithEvents LayoutControlItem5 As DevExpress.XtraLayout.LayoutControlItem + Friend WithEvents LayoutControlItem6 As DevExpress.XtraLayout.LayoutControlItem + Friend WithEvents TextEdit1 As DevExpress.XtraEditors.TextEdit + Friend WithEvents txtAccessedWho As DevExpress.XtraLayout.LayoutControlItem + Friend WithEvents EmptySpaceItem1 As DevExpress.XtraLayout.EmptySpaceItem End Class diff --git a/GUIs.Common/ObjectPropertyDialog/frmObjectPropertyDialog.vb b/GUIs.Common/ObjectPropertyDialog/frmObjectPropertyDialog.vb index 74aaa834..0ace9315 100644 --- a/GUIs.Common/ObjectPropertyDialog/frmObjectPropertyDialog.vb +++ b/GUIs.Common/ObjectPropertyDialog/frmObjectPropertyDialog.vb @@ -2,6 +2,7 @@ Imports DevExpress.XtraEditors Imports DevExpress.XtraEditors.Repository Imports DevExpress.XtraLayout +Imports DevExpress.XtraSplashScreen Imports DigitalData.Modules.Database Imports DigitalData.Modules.Logging Imports DigitalData.Modules.ZooFlow @@ -28,13 +29,23 @@ Public Class frmObjectPropertyDialog End Sub Private Async Sub frmObjectPropertyDialog_Load(sender As Object, e As EventArgs) Handles MyBase.Load + Dim oHandle As IOverlaySplashScreenHandle = Nothing + Try - Dim EntityIds = Await GetBusinessEntitiesForObjectId(_ObjectId) + oHandle = SplashScreenManager.ShowOverlayForm(Me) + + Dim oEntityIds = Await GetBusinessEntitiesForObjectId(_ObjectId) + Dim oHistoryDataTable = Await GetValueHistoryForObjectId(_ObjectId) + Dim oObjectProperties = Await GetPropertiesForObjectId(_ObjectId) Dim oCombobox As RepositoryItemComboBox = DirectCast(cmbBusinessEntity.Edit, RepositoryItemComboBox) - oCombobox.Items.AddRange(EntityIds) + oCombobox.Items.AddRange(oEntityIds) + + + ShowAttributeHistory(oHistoryDataTable) + ShowObjectProperties(oObjectProperties) - If EntityIds.Count = 1 Then - cmbBusinessEntity.EditValue = EntityIds.First() + If oEntityIds.Count = 1 Then + cmbBusinessEntity.EditValue = oEntityIds.First() End If Catch ex As ApplicationException _Logger.Error(ex) @@ -42,6 +53,10 @@ Public Class frmObjectPropertyDialog Catch ex As Exception _Logger.Error(ex) MessageBox.Show("Unhandled exception occurred please check the log", Text, MessageBoxButtons.OK, MessageBoxIcon.Exclamation) + Finally + If oHandle IsNot Nothing + SplashScreenManager.CloseOverlayForm(oHandle) + End If End Try End Sub @@ -67,7 +82,7 @@ Public Class frmObjectPropertyDialog End If End Function - Private Async Function GetBusinessEntitiesForObjectId(ObjectId) As Task(Of List(Of Long)) + Private Async Function GetBusinessEntitiesForObjectId(ObjectId As Long) As Task(Of List(Of Long)) Dim oSQL = $"SELECT BE_ID FROM TBIDB_OBJECT_BE WHERE IDB_OBJ_ID = {ObjectId}" Dim oDatatable = Await _Db.GetDatatableAsync(oSQL) @@ -84,6 +99,20 @@ Public Class frmObjectPropertyDialog End If End Function + Private Async Function GetValueHistoryForObjectId(ObjectId As Long) As Task(Of DataTable) + Dim oSQL As String = $"SELECT * FROM VWIDB_CHANGE_LOG WHERE IDB_OBJ_ID = {ObjectId} ORDER BY ChangeID DESC" + Dim oDatatable = Await _Db.GetDatatableAsync(oSQL) + + Return oDatatable + End Function + + Private Async Function GetPropertiesForObjectId(ObjectId As Long) As Task(Of DataTable) + Dim oSQL As String = $"SELECT * FROM TBIDB_OBJECT WHERE IDB_OBJ_ID = {ObjectId}" + Dim oDatatable = Await _Db.GetDatatableAsync(oSQL) + + Return oDatatable + End Function + Private Async Function GetAttributeValue(AttributeName As String, ObjectId As Long, Optional LanguageCode As String = "de-DE", Optional IsForeign As Boolean = False) As Task(Of Object) Dim oIsForeign = IIf(IsForeign, 1, 0) Dim oSQL = $"SELECT TERM_VALUE FROM [dbo].[FNIDB_PM_GET_VARIABLE_VALUE] ({ObjectId}, '{AttributeName}', '{LanguageCode}', {oIsForeign})" @@ -103,16 +132,47 @@ Public Class frmObjectPropertyDialog For Each oAttribute As Attribute In oAttributes Dim oControl = _Controls.GetControlForAttribute(oAttribute) - Dim oItem As LayoutControlItem = Root.AddItem() + Dim oItem As LayoutControlItem = AttributeLayout.AddItem() oItem.Text = oAttribute.Title oItem.Name = oAttribute.Title oItem.Control = oControl Next - For Each oItem As LayoutControlItem In Root.Items + For Each oItem As LayoutControlItem In AttributeLayout.Items Dim oValue = Await GetAttributeValue(oItem.Name, _ObjectId) Dim oEdit = DirectCast(oItem.Control, BaseEdit) oEdit.EditValue = oValue Next End Sub + + Private Function ShowAttributeHistory(pDatatable As DataTable) As Boolean + Try + If pDatatable.Rows.Count > 0 + GridValueHistory.DataSource = pDatatable + Else + TabPageHistory.Visible = False + End If + + Return True + Catch ex As Exception + _Logger.Error(ex) + Return False + End Try + End Function + + Private Function ShowObjectProperties(pDatatable As DataTable) As Boolean + Try + Dim oRow As DataRow = pDatatable.Rows.Item(0) + txtObjectId.Text = oRow.Item("IDB_OBJ_ID") + txtCreatedWhen.Text = oRow.Item("ADDED_WHEN") + txtCreatedWho.Text = oRow.Item("ADDED_WHO") + txtChangedWhen.Text = oRow.Item("CHANGED_WHEN") + txtChangedWho.Text = oRow.Item("CHANGED_WHO") + + Return True + Catch ex As Exception + _Logger.Error(ex) + Return False + End Try + End Function End Class \ No newline at end of file