From fe4e5c36fcc1259bae147fc2b66e46a6eb45b149 Mon Sep 17 00:00:00 2001 From: samatrhea Date: Sun, 10 Jan 2021 16:13:37 +0100 Subject: [PATCH 1/2] [Update] ViewModelBase to handle Thing.ModifiedOn updates --- CDP4Composition/Mvvm/ViewModelBase.cs | 1 + 1 file changed, 1 insertion(+) diff --git a/CDP4Composition/Mvvm/ViewModelBase.cs b/CDP4Composition/Mvvm/ViewModelBase.cs index dfa8cdd32..adaad81ef 100644 --- a/CDP4Composition/Mvvm/ViewModelBase.cs +++ b/CDP4Composition/Mvvm/ViewModelBase.cs @@ -234,6 +234,7 @@ protected virtual void Dispose(bool disposing) protected virtual void ObjectChangeEventHandler(ObjectChangedEvent objectChange) { this.RevisionNumber = objectChange.ChangedThing.RevisionNumber; + this.ModifiedOn = objectChange.ChangedThing.ModifiedOn; } } } From 74a5c2fcbacc3e74956e53851934b267611ce2e7 Mon Sep 17 00:00:00 2001 From: samatrhea Date: Sun, 10 Jan 2021 16:41:15 +0100 Subject: [PATCH 2/2] [Update] generated row-view-models using dotliquid generator; fixes #203 --- .../AutoGenRows/ActionItemRowViewModel.cs | 69 +++-- .../ActualFiniteStateListRowViewModel.cs | 92 ++++-- .../ActualFiniteStateRowViewModel.cs | 94 +++++- .../AutoGenRows/AliasRowViewModel.cs | 65 ++-- .../AutoGenRows/AndExpressionRowViewModel.cs | 52 +++- .../AutoGenRows/ApprovalRowViewModel.cs | 102 +++--- .../ArrayParameterTypeRowViewModel.cs | 63 ++-- .../AutoGenRows/BinaryNoteRowViewModel.cs | 78 +++-- .../BinaryRelationshipRowViewModel.cs | 39 ++- .../BinaryRelationshipRuleRowViewModel.cs | 162 ++++++---- .../AutoGenRows/BookRowViewModel.cs | 106 ++++--- .../BooleanExpressionRowViewModel.cs | 52 +++- .../BooleanParameterTypeRowViewModel.cs | 52 +++- .../AutoGenRows/BoundsRowViewModel.cs | 87 ++++-- .../BuiltInRuleVerificationRowViewModel.cs | 52 +++- .../AutoGenRows/CategoryRowViewModel.cs | 39 ++- .../AutoGenRows/ChangeProposalRowViewModel.cs | 59 +++- .../AutoGenRows/ChangeRequestRowViewModel.cs | 52 +++- .../AutoGenRows/CitationRowViewModel.cs | 106 ++++--- .../AutoGenRows/ColorRowViewModel.cs | 65 ++-- .../CommonFileStoreRowViewModel.cs | 52 +++- .../CompoundParameterTypeRowViewModel.cs | 37 ++- .../AutoGenRows/ConstantRowViewModel.cs | 119 ++++--- .../ContractChangeNoticeRowViewModel.cs | 59 +++- .../ContractDeviationRowViewModel.cs | 52 +++- .../ConversionBasedUnitRowViewModel.cs | 78 +++-- .../CyclicRatioScaleRowViewModel.cs | 37 ++- .../DateParameterTypeRowViewModel.cs | 52 +++- .../DateTimeParameterTypeRowViewModel.cs | 52 +++- .../DecompositionRuleRowViewModel.cs | 116 ++++--- .../AutoGenRows/DefinedThingRowViewModel.cs | 39 ++- .../AutoGenRows/DefinitionRowViewModel.cs | 61 ++-- .../DerivedQuantityKindRowViewModel.cs | 52 +++- .../AutoGenRows/DerivedUnitRowViewModel.cs | 52 +++- .../AutoGenRows/DiagramCanvasRowViewModel.cs | 37 ++- .../AutoGenRows/DiagramEdgeRowViewModel.cs | 83 ++++- .../DiagramElementContainerRowViewModel.cs | 52 +++- .../DiagramElementThingRowViewModel.cs | 61 +++- .../AutoGenRows/DiagramObjectRowViewModel.cs | 61 ++-- .../AutoGenRows/DiagramShapeRowViewModel.cs | 52 +++- .../DiagramThingBaseRowViewModel.cs | 37 ++- .../DiagrammingStyleRowViewModel.cs | 245 ++++++++++----- .../AutoGenRows/DiscussionItemRowViewModel.cs | 37 ++- .../DomainFileStoreRowViewModel.cs | 37 ++- .../DomainOfExpertiseGroupRowViewModel.cs | 37 ++- .../DomainOfExpertiseRowViewModel.cs | 37 ++- .../AutoGenRows/ElementBaseRowViewModel.cs | 76 +++-- .../ElementDefinitionRowViewModel.cs | 52 +++- .../AutoGenRows/ElementUsageRowViewModel.cs | 90 ++++-- .../AutoGenRows/EmailAddressRowViewModel.cs | 61 ++-- ...ineeringModelDataAnnotationRowViewModel.cs | 39 ++- ...ringModelDataDiscussionItemRowViewModel.cs | 37 ++- .../EngineeringModelDataNoteRowViewModel.cs | 52 +++- .../EngineeringModelRowViewModel.cs | 76 +++-- .../EngineeringModelSetupRowViewModel.cs | 89 +++--- .../EnumerationParameterTypeRowViewModel.cs | 37 ++- .../EnumerationValueDefinitionRowViewModel.cs | 52 +++- .../ExclusiveOrExpressionRowViewModel.cs | 52 +++- .../ExternalIdentifierMapRowViewModel.cs | 173 ++++++----- .../AutoGenRows/FileRevisionRowViewModel.cs | 121 +++++--- .../AutoGenRows/FileRowViewModel.cs | 116 +++++-- .../AutoGenRows/FileStoreRowViewModel.cs | 102 +++--- .../AutoGenRows/FileTypeRowViewModel.cs | 39 ++- .../AutoGenRows/FolderRowViewModel.cs | 134 +++++--- .../GenericAnnotationRowViewModel.cs | 67 ++-- .../AutoGenRows/GlossaryRowViewModel.cs | 37 ++- .../AutoGenRows/GoalRowViewModel.cs | 52 +++- .../AutoGenRows/HyperLinkRowViewModel.cs | 65 ++-- .../IdCorrespondenceRowViewModel.cs | 100 +++++- .../AutoGenRows/IntervalScaleRowViewModel.cs | 52 +++- .../AutoGenRows/IterationRowViewModel.cs | 167 +++++----- .../AutoGenRows/IterationSetupRowViewModel.cs | 103 +++--- .../LinearConversionUnitRowViewModel.cs | 52 +++- .../LogarithmicScaleRowViewModel.cs | 106 ++++--- .../MappingToReferenceScaleRowViewModel.cs | 139 +++++---- .../MeasurementScaleRowViewModel.cs | 162 +++++----- .../MeasurementUnitRowViewModel.cs | 37 ++- .../AutoGenRows/ModelLogEntryRowViewModel.cs | 113 +++++-- .../ModelReferenceDataLibraryRowViewModel.cs | 52 +++- .../ModellingAnnotationItemRowViewModel.cs | 140 +++++---- .../ModellingThingReferenceRowViewModel.cs | 52 +++- .../MultiRelationshipRowViewModel.cs | 52 +++- .../MultiRelationshipRuleRowViewModel.cs | 102 +++--- .../NaturalLanguageRowViewModel.cs | 63 ++-- .../AutoGenRows/NestedElementRowViewModel.cs | 145 +++++++-- .../NestedParameterRowViewModel.cs | 170 ++++++---- .../AutoGenRows/NotExpressionRowViewModel.cs | 37 ++- .../AutoGenRows/NoteRowViewModel.cs | 106 ++++--- .../AutoGenRows/OptionRowViewModel.cs | 52 +++- .../AutoGenRows/OrExpressionRowViewModel.cs | 52 +++- .../AutoGenRows/OrdinalScaleRowViewModel.cs | 37 ++- .../AutoGenRows/OrganizationRowViewModel.cs | 65 ++-- .../AutoGenRows/OwnedStyleRowViewModel.cs | 52 +++- .../AutoGenRows/PageRowViewModel.cs | 106 ++++--- .../AutoGenRows/ParameterBaseRowViewModel.cs | 268 ++++++++++------ .../AutoGenRows/ParameterGroupRowViewModel.cs | 79 +++-- .../ParameterOrOverrideBaseRowViewModel.cs | 52 +++- .../ParameterOverrideRowViewModel.cs | 244 ++++++++++++++- .../ParameterOverrideValueSetRowViewModel.cs | 139 ++++++++- .../AutoGenRows/ParameterRowViewModel.cs | 80 +++-- .../ParameterSubscriptionRowViewModel.cs | 261 +++++++++++++++- ...rameterSubscriptionValueSetRowViewModel.cs | 205 +++++++++--- .../ParameterTypeComponentRowViewModel.cs | 131 +++++--- .../AutoGenRows/ParameterTypeRowViewModel.cs | 65 ++-- .../AutoGenRows/ParameterValueRowViewModel.cs | 117 ++++--- .../ParameterValueSetBaseRowViewModel.cs | 191 +++++++++--- .../ParameterValueSetRowViewModel.cs | 52 +++- .../ParameterizedCategoryRuleRowViewModel.cs | 76 +++-- .../ParametricConstraintRowViewModel.cs | 86 ++++- .../ParticipantPermissionRowViewModel.cs | 63 ++-- .../ParticipantRoleRowViewModel.cs | 37 ++- .../AutoGenRows/ParticipantRowViewModel.cs | 159 +++++++--- .../PersonPermissionRowViewModel.cs | 63 ++-- .../AutoGenRows/PersonRoleRowViewModel.cs | 37 ++- .../AutoGenRows/PersonRowViewModel.cs | 293 +++++++++++------- .../AutoGenRows/PointRowViewModel.cs | 39 ++- .../PossibleFiniteStateListRowViewModel.cs | 117 ++++--- .../PossibleFiniteStateRowViewModel.cs | 103 +++++- .../AutoGenRows/PrefixedUnitRowViewModel.cs | 107 +++++-- .../AutoGenRows/PublicationRowViewModel.cs | 37 ++- .../QuantityKindFactorRowViewModel.cs | 78 +++-- .../AutoGenRows/QuantityKindRowViewModel.cs | 114 ++++--- .../AutoGenRows/RatioScaleRowViewModel.cs | 52 +++- .../ReferenceDataLibraryRowViewModel.cs | 76 +++-- .../ReferenceSourceRowViewModel.cs | 206 +++++++----- .../AutoGenRows/ReferencerRuleRowViewModel.cs | 102 +++--- .../RelationalExpressionRowViewModel.cs | 131 +++++--- .../RelationshipParameterValueRowViewModel.cs | 52 +++- .../AutoGenRows/RelationshipRowViewModel.cs | 76 +++-- .../RequestForDeviationRowViewModel.cs | 52 +++- .../RequestForWaiverRowViewModel.cs | 52 +++- .../AutoGenRows/RequirementRowViewModel.cs | 90 ++++-- ...entsContainerParameterValueRowViewModel.cs | 52 +++- .../RequirementsContainerRowViewModel.cs | 76 +++-- .../RequirementsGroupRowViewModel.cs | 52 +++- .../RequirementsSpecificationRowViewModel.cs | 37 ++- .../ReviewItemDiscrepancyRowViewModel.cs | 52 +++- .../AutoGenRows/RuleRowViewModel.cs | 37 ++- .../RuleVerificationListRowViewModel.cs | 76 +++-- .../RuleVerificationRowViewModel.cs | 128 ++++++-- .../AutoGenRows/RuleViolationRowViewModel.cs | 37 ++- .../ScalarParameterTypeRowViewModel.cs | 52 +++- ...ScaleReferenceQuantityValueRowViewModel.cs | 90 ++++-- .../ScaleValueDefinitionRowViewModel.cs | 37 ++- .../AutoGenRows/SectionRowViewModel.cs | 106 ++++--- .../AutoGenRows/SharedStyleRowViewModel.cs | 52 +++- .../SimpleParameterValueRowViewModel.cs | 166 +++++++--- .../SimpleParameterizableThingRowViewModel.cs | 76 +++-- .../SimpleQuantityKindRowViewModel.cs | 52 +++- .../AutoGenRows/SimpleUnitRowViewModel.cs | 52 +++- ...SiteDirectoryDataAnnotationRowViewModel.cs | 77 ++++- ...DirectoryDataDiscussionItemRowViewModel.cs | 75 ++++- .../AutoGenRows/SiteDirectoryRowViewModel.cs | 161 ++++++---- ...SiteDirectoryThingReferenceRowViewModel.cs | 52 +++- .../AutoGenRows/SiteLogEntryRowViewModel.cs | 123 ++++++-- .../SiteReferenceDataLibraryRowViewModel.cs | 37 ++- .../AutoGenRows/SolutionRowViewModel.cs | 78 +++-- .../SpecializedQuantityKindRowViewModel.cs | 76 +++-- .../StakeHolderValueMapRowViewModel.cs | 52 +++- ...StakeHolderValueMapSettingsRowViewModel.cs | 180 ++++++----- .../AutoGenRows/StakeholderRowViewModel.cs | 52 +++- .../StakeholderValueRowViewModel.cs | 52 +++- .../TelephoneNumberRowViewModel.cs | 37 ++- .../AutoGenRows/TermRowViewModel.cs | 37 ++- .../TextParameterTypeRowViewModel.cs | 52 +++- .../AutoGenRows/TextualNoteRowViewModel.cs | 39 ++- .../AutoGenRows/ThingReferenceRowViewModel.cs | 39 ++- .../TimeOfDayParameterTypeRowViewModel.cs | 52 +++- .../AutoGenRows/TopContainerRowViewModel.cs | 37 ++- .../AutoGenRows/UnitFactorRowViewModel.cs | 72 +++-- .../AutoGenRows/UnitPrefixRowViewModel.cs | 39 ++- .../AutoGenRows/UserPreferenceRowViewModel.cs | 61 ++-- .../UserRuleVerificationRowViewModel.cs | 87 ++++-- .../AutoGenRows/ValueGroupRowViewModel.cs | 52 +++- .../HandCodedRows/EmailAddressRowViewModel.cs | 29 +- .../ParameterBaseRowViewModel.cs | 38 ++- .../ParameterValueSetBaseRowViewModel.cs | 41 ++- .../ParticipantPermissionRowViewModel.cs | 30 +- .../PersonPermissionRowViewModel.cs | 30 +- .../CommonView/HandCodedRows/PrimitiveRow.cs | 27 +- .../TelephoneNumberRowViewModel.cs | 29 +- .../HandCodedRows/TermRowViewModel.cs | 29 +- 182 files changed, 10487 insertions(+), 3850 deletions(-) diff --git a/CDP4Composition/CommonView/AutoGenRows/ActionItemRowViewModel.cs b/CDP4Composition/CommonView/AutoGenRows/ActionItemRowViewModel.cs index daa13ef57..483d26d6f 100644 --- a/CDP4Composition/CommonView/AutoGenRows/ActionItemRowViewModel.cs +++ b/CDP4Composition/CommonView/AutoGenRows/ActionItemRowViewModel.cs @@ -1,25 +1,47 @@ -// ------------------------------------------------------------------------------------------------- +// -------------------------------------------------------------------------------------------------------------------- // -// Copyright (c) 2015-2018 RHEA System S.A. +// Copyright (c) 2015-2021 RHEA System S.A. +// +// Author: Sam Gerené, Alex Vorobiev, Naron Phou, Alexander van Delft, Nathanael Smiechowski, Ahmed Abulwafa Ahmed +// +// This file is part of CDP4-IME Community Edition. +// This is an auto-generated class. Any manual changes to this file will be overwritten! +// +// The CDP4-IME Community Edition is free software; you can redistribute it and/or +// modify it under the terms of the GNU Affero General Public +// License as published by the Free Software Foundation; either +// version 3 of the License, or (at your option) any later version. +// +// The CDP4-IME Community Edition is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +// Lesser General Public License for more details. +// +// You should have received a copy of the GNU Affero General Public License +// along with this program. If not, see . // // // This is an auto-generated class. Any manual changes on this file will be overwritten! // -// ------------------------------------------------------------------------------------------------- +// -------------------------------------------------------------------------------------------------------------------- namespace CDP4CommonView { using System; using System.Reactive.Linq; + using CDP4Common.CommonData; using CDP4Common.DiagramData; using CDP4Common.EngineeringModelData; using CDP4Common.ReportingData; using CDP4Common.SiteDirectoryData; + using CDP4Composition.Mvvm; + using CDP4Dal; using CDP4Dal.Events; - using CDP4Dal.Permission; + using CDP4Dal.Permission; + using ReactiveUI; /// @@ -27,26 +49,25 @@ namespace CDP4CommonView /// public partial class ActionItemRowViewModel : ModellingAnnotationItemRowViewModel { - /// - /// Backing field for + /// Backing field for property /// - private DateTime dueDate; + private Participant actionee; /// - /// Backing field for + /// Backing field for property /// private DateTime closeOutDate; /// - /// Backing field for + /// Backing field for property /// private string closeOutStatement; /// - /// Backing field for + /// Backing field for property /// - private Participant actionee; + private DateTime dueDate; /// /// Initializes a new instance of the class @@ -59,14 +80,13 @@ public ActionItemRowViewModel(ActionItem actionItem, ISession session, IViewMode this.UpdateProperties(); } - /// - /// Gets or sets the DueDate + /// Gets or sets the Actionee /// - public DateTime DueDate + public Participant Actionee { - get { return this.dueDate; } - set { this.RaiseAndSetIfChanged(ref this.dueDate, value); } + get { return this.actionee; } + set { this.RaiseAndSetIfChanged(ref this.actionee, value); } } /// @@ -88,15 +108,14 @@ public string CloseOutStatement } /// - /// Gets or sets the Actionee + /// Gets or sets the DueDate /// - public Participant Actionee + public DateTime DueDate { - get { return this.actionee; } - set { this.RaiseAndSetIfChanged(ref this.actionee, value); } + get { return this.dueDate; } + set { this.RaiseAndSetIfChanged(ref this.dueDate, value); } } - /// /// The event-handler that is invoked by the subscription that listens for updates /// on the that is being represented by the view-model @@ -107,6 +126,7 @@ public Participant Actionee protected override void ObjectChangeEventHandler(ObjectChangedEvent objectChange) { base.ObjectChangeEventHandler(objectChange); + this.UpdateProperties(); } @@ -115,14 +135,13 @@ protected override void ObjectChangeEventHandler(ObjectChangedEvent objectChange /// private void UpdateProperties() { - this.ModifiedOn = this.Thing.ModifiedOn; - this.DueDate = this.Thing.DueDate; - if(this.Thing.CloseOutDate.HasValue) + this.Actionee = this.Thing.Actionee; + if (this.Thing.CloseOutDate.HasValue) { this.CloseOutDate = this.Thing.CloseOutDate.Value; } this.CloseOutStatement = this.Thing.CloseOutStatement; - this.Actionee = this.Thing.Actionee; + this.DueDate = this.Thing.DueDate; } } } diff --git a/CDP4Composition/CommonView/AutoGenRows/ActualFiniteStateListRowViewModel.cs b/CDP4Composition/CommonView/AutoGenRows/ActualFiniteStateListRowViewModel.cs index 5981f6b64..9840cd0f2 100644 --- a/CDP4Composition/CommonView/AutoGenRows/ActualFiniteStateListRowViewModel.cs +++ b/CDP4Composition/CommonView/AutoGenRows/ActualFiniteStateListRowViewModel.cs @@ -1,25 +1,47 @@ -// ------------------------------------------------------------------------------------------------- +// -------------------------------------------------------------------------------------------------------------------- // -// Copyright (c) 2015-2018 RHEA System S.A. +// Copyright (c) 2015-2021 RHEA System S.A. +// +// Author: Sam Gerené, Alex Vorobiev, Naron Phou, Alexander van Delft, Nathanael Smiechowski, Ahmed Abulwafa Ahmed +// +// This file is part of CDP4-IME Community Edition. +// This is an auto-generated class. Any manual changes to this file will be overwritten! +// +// The CDP4-IME Community Edition is free software; you can redistribute it and/or +// modify it under the terms of the GNU Affero General Public +// License as published by the Free Software Foundation; either +// version 3 of the License, or (at your option) any later version. +// +// The CDP4-IME Community Edition is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +// Lesser General Public License for more details. +// +// You should have received a copy of the GNU Affero General Public License +// along with this program. If not, see . // // // This is an auto-generated class. Any manual changes on this file will be overwritten! // -// ------------------------------------------------------------------------------------------------- +// -------------------------------------------------------------------------------------------------------------------- namespace CDP4CommonView { using System; using System.Reactive.Linq; + using CDP4Common.CommonData; using CDP4Common.DiagramData; using CDP4Common.EngineeringModelData; using CDP4Common.ReportingData; using CDP4Common.SiteDirectoryData; + using CDP4Composition.Mvvm; + using CDP4Dal; using CDP4Dal.Events; - using CDP4Dal.Permission; + using CDP4Dal.Permission; + using ReactiveUI; /// @@ -27,31 +49,30 @@ namespace CDP4CommonView /// public partial class ActualFiniteStateListRowViewModel : RowViewModelBase { - /// - /// Backing field for + /// Backing field for property /// private string name; /// - /// Backing field for + /// Backing field for property /// - private string shortName; + private DomainOfExpertise owner; /// - /// Backing field for + /// Backing field for property /// - private DomainOfExpertise owner; + private string ownerName; /// - /// Backing field for + /// Backing field for property /// private string ownerShortName; /// - /// Backing field for + /// Backing field for property /// - private string ownerName; + private string shortName; /// /// Initializes a new instance of the class @@ -64,7 +85,6 @@ public ActualFiniteStateListRowViewModel(ActualFiniteStateList actualFiniteState this.UpdateProperties(); } - /// /// Gets or sets the Name /// @@ -75,21 +95,21 @@ public string Name } /// - /// Gets or sets the ShortName + /// Gets or sets the Owner /// - public string ShortName + public DomainOfExpertise Owner { - get { return this.shortName; } - set { this.RaiseAndSetIfChanged(ref this.shortName, value); } + get { return this.owner; } + set { this.RaiseAndSetIfChanged(ref this.owner, value); } } /// - /// Gets or sets the Owner + /// Gets or set the Name of /// - public DomainOfExpertise Owner + public string OwnerName { - get { return this.owner; } - set { this.RaiseAndSetIfChanged(ref this.owner, value); } + get { return this.ownerName; } + set { this.RaiseAndSetIfChanged(ref this.ownerName, value); } } /// @@ -102,15 +122,14 @@ public string OwnerShortName } /// - /// Gets or set the Name of + /// Gets or sets the ShortName /// - public string OwnerName + public string ShortName { - get { return this.ownerName; } - set { this.RaiseAndSetIfChanged(ref this.ownerName, value); } + get { return this.shortName; } + set { this.RaiseAndSetIfChanged(ref this.shortName, value); } } - /// /// The event-handler that is invoked by the subscription that listens for updates /// on the that is being represented by the view-model @@ -121,6 +140,7 @@ public string OwnerName protected override void ObjectChangeEventHandler(ObjectChangedEvent objectChange) { base.ObjectChangeEventHandler(objectChange); + this.UpdateProperties(); } @@ -129,15 +149,19 @@ protected override void ObjectChangeEventHandler(ObjectChangedEvent objectChange /// private void UpdateProperties() { - this.ModifiedOn = this.Thing.ModifiedOn; this.Name = this.Thing.Name; - this.ShortName = this.Thing.ShortName; - if (this.Thing.Owner != null) - { - this.OwnerShortName = this.Thing.Owner.ShortName; - this.OwnerName = this.Thing.Owner.Name; - } this.Owner = this.Thing.Owner; + if (this.Thing.Owner != null) + { + this.OwnerName = this.Thing.Owner.Name; + this.OwnerShortName = this.Thing.Owner.ShortName; + } + else + { + this.OwnerName = string.Empty; + this.OwnerShortName = string.Empty; + } + this.ShortName = this.Thing.ShortName; } } } diff --git a/CDP4Composition/CommonView/AutoGenRows/ActualFiniteStateRowViewModel.cs b/CDP4Composition/CommonView/AutoGenRows/ActualFiniteStateRowViewModel.cs index 835aea6b1..e8f016c7f 100644 --- a/CDP4Composition/CommonView/AutoGenRows/ActualFiniteStateRowViewModel.cs +++ b/CDP4Composition/CommonView/AutoGenRows/ActualFiniteStateRowViewModel.cs @@ -1,25 +1,47 @@ -// ------------------------------------------------------------------------------------------------- +// -------------------------------------------------------------------------------------------------------------------- // -// Copyright (c) 2015-2018 RHEA System S.A. +// Copyright (c) 2015-2021 RHEA System S.A. +// +// Author: Sam Gerené, Alex Vorobiev, Naron Phou, Alexander van Delft, Nathanael Smiechowski, Ahmed Abulwafa Ahmed +// +// This file is part of CDP4-IME Community Edition. +// This is an auto-generated class. Any manual changes to this file will be overwritten! +// +// The CDP4-IME Community Edition is free software; you can redistribute it and/or +// modify it under the terms of the GNU Affero General Public +// License as published by the Free Software Foundation; either +// version 3 of the License, or (at your option) any later version. +// +// The CDP4-IME Community Edition is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +// Lesser General Public License for more details. +// +// You should have received a copy of the GNU Affero General Public License +// along with this program. If not, see . // // // This is an auto-generated class. Any manual changes on this file will be overwritten! // -// ------------------------------------------------------------------------------------------------- +// -------------------------------------------------------------------------------------------------------------------- namespace CDP4CommonView { using System; using System.Reactive.Linq; + using CDP4Common.CommonData; using CDP4Common.DiagramData; using CDP4Common.EngineeringModelData; using CDP4Common.ReportingData; using CDP4Common.SiteDirectoryData; + using CDP4Composition.Mvvm; + using CDP4Dal; using CDP4Dal.Events; - using CDP4Dal.Permission; + using CDP4Dal.Permission; + using ReactiveUI; /// @@ -27,19 +49,33 @@ namespace CDP4CommonView /// public partial class ActualFiniteStateRowViewModel : RowViewModelBase { - /// - /// Backing field for + /// Backing field for property /// private ActualFiniteStateKind kind; /// - /// Backing field for + /// Backing field for property /// private string name; /// - /// Backing field for + /// Backing field for property + /// + private DomainOfExpertise owner; + + /// + /// Backing field for property + /// + private string ownerName; + + /// + /// Backing field for property + /// + private string ownerShortName; + + /// + /// Backing field for property /// private string shortName; @@ -54,7 +90,6 @@ public ActualFiniteStateRowViewModel(ActualFiniteState actualFiniteState, ISessi this.UpdateProperties(); } - /// /// Gets or sets the Kind /// @@ -73,6 +108,33 @@ public string Name set { this.RaiseAndSetIfChanged(ref this.name, value); } } + /// + /// Gets or sets the Owner + /// + public DomainOfExpertise Owner + { + get { return this.owner; } + set { this.RaiseAndSetIfChanged(ref this.owner, value); } + } + + /// + /// Gets or set the Name of + /// + public string OwnerName + { + get { return this.ownerName; } + set { this.RaiseAndSetIfChanged(ref this.ownerName, value); } + } + + /// + /// Gets or set the ShortName of + /// + public string OwnerShortName + { + get { return this.ownerShortName; } + set { this.RaiseAndSetIfChanged(ref this.ownerShortName, value); } + } + /// /// Gets or sets the ShortName /// @@ -82,7 +144,6 @@ public string ShortName set { this.RaiseAndSetIfChanged(ref this.shortName, value); } } - /// /// The event-handler that is invoked by the subscription that listens for updates /// on the that is being represented by the view-model @@ -93,6 +154,7 @@ public string ShortName protected override void ObjectChangeEventHandler(ObjectChangedEvent objectChange) { base.ObjectChangeEventHandler(objectChange); + this.UpdateProperties(); } @@ -101,9 +163,19 @@ protected override void ObjectChangeEventHandler(ObjectChangedEvent objectChange /// private void UpdateProperties() { - this.ModifiedOn = this.Thing.ModifiedOn; this.Kind = this.Thing.Kind; this.Name = this.Thing.Name; + this.Owner = this.Thing.Owner; + if (this.Thing.Owner != null) + { + this.OwnerName = this.Thing.Owner.Name; + this.OwnerShortName = this.Thing.Owner.ShortName; + } + else + { + this.OwnerName = string.Empty; + this.OwnerShortName = string.Empty; + } this.ShortName = this.Thing.ShortName; } } diff --git a/CDP4Composition/CommonView/AutoGenRows/AliasRowViewModel.cs b/CDP4Composition/CommonView/AutoGenRows/AliasRowViewModel.cs index 44e6eb87a..5e79788fa 100644 --- a/CDP4Composition/CommonView/AutoGenRows/AliasRowViewModel.cs +++ b/CDP4Composition/CommonView/AutoGenRows/AliasRowViewModel.cs @@ -1,25 +1,47 @@ -// ------------------------------------------------------------------------------------------------- +// -------------------------------------------------------------------------------------------------------------------- // -// Copyright (c) 2015-2018 RHEA System S.A. +// Copyright (c) 2015-2021 RHEA System S.A. +// +// Author: Sam Gerené, Alex Vorobiev, Naron Phou, Alexander van Delft, Nathanael Smiechowski, Ahmed Abulwafa Ahmed +// +// This file is part of CDP4-IME Community Edition. +// This is an auto-generated class. Any manual changes to this file will be overwritten! +// +// The CDP4-IME Community Edition is free software; you can redistribute it and/or +// modify it under the terms of the GNU Affero General Public +// License as published by the Free Software Foundation; either +// version 3 of the License, or (at your option) any later version. +// +// The CDP4-IME Community Edition is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +// Lesser General Public License for more details. +// +// You should have received a copy of the GNU Affero General Public License +// along with this program. If not, see . // // // This is an auto-generated class. Any manual changes on this file will be overwritten! // -// ------------------------------------------------------------------------------------------------- +// -------------------------------------------------------------------------------------------------------------------- namespace CDP4CommonView { using System; using System.Reactive.Linq; + using CDP4Common.CommonData; using CDP4Common.DiagramData; using CDP4Common.EngineeringModelData; using CDP4Common.ReportingData; using CDP4Common.SiteDirectoryData; + using CDP4Composition.Mvvm; + using CDP4Dal; using CDP4Dal.Events; - using CDP4Dal.Permission; + using CDP4Dal.Permission; + using ReactiveUI; /// @@ -27,21 +49,20 @@ namespace CDP4CommonView /// public partial class AliasRowViewModel : RowViewModelBase { - /// - /// Backing field for + /// Backing field for property /// - private bool isSynonym; + private string content; /// - /// Backing field for + /// Backing field for property /// - private string languageCode; + private bool isSynonym; /// - /// Backing field for + /// Backing field for property /// - private string content; + private string languageCode; /// /// Initializes a new instance of the class @@ -54,6 +75,14 @@ public AliasRowViewModel(Alias alias, ISession session, IViewModelBase co this.UpdateProperties(); } + /// + /// Gets or sets the Content + /// + public string Content + { + get { return this.content; } + set { this.RaiseAndSetIfChanged(ref this.content, value); } + } /// /// Gets or sets the IsSynonym @@ -73,16 +102,6 @@ public string LanguageCode set { this.RaiseAndSetIfChanged(ref this.languageCode, value); } } - /// - /// Gets or sets the Content - /// - public string Content - { - get { return this.content; } - set { this.RaiseAndSetIfChanged(ref this.content, value); } - } - - /// /// The event-handler that is invoked by the subscription that listens for updates /// on the that is being represented by the view-model @@ -93,6 +112,7 @@ public string Content protected override void ObjectChangeEventHandler(ObjectChangedEvent objectChange) { base.ObjectChangeEventHandler(objectChange); + this.UpdateProperties(); } @@ -101,10 +121,9 @@ protected override void ObjectChangeEventHandler(ObjectChangedEvent objectChange /// private void UpdateProperties() { - this.ModifiedOn = this.Thing.ModifiedOn; + this.Content = this.Thing.Content; this.IsSynonym = this.Thing.IsSynonym; this.LanguageCode = this.Thing.LanguageCode; - this.Content = this.Thing.Content; } } } diff --git a/CDP4Composition/CommonView/AutoGenRows/AndExpressionRowViewModel.cs b/CDP4Composition/CommonView/AutoGenRows/AndExpressionRowViewModel.cs index fe0fdd249..08656ef1d 100644 --- a/CDP4Composition/CommonView/AutoGenRows/AndExpressionRowViewModel.cs +++ b/CDP4Composition/CommonView/AutoGenRows/AndExpressionRowViewModel.cs @@ -1,25 +1,47 @@ -// ------------------------------------------------------------------------------------------------- +// -------------------------------------------------------------------------------------------------------------------- // -// Copyright (c) 2015-2018 RHEA System S.A. +// Copyright (c) 2015-2021 RHEA System S.A. +// +// Author: Sam Gerené, Alex Vorobiev, Naron Phou, Alexander van Delft, Nathanael Smiechowski, Ahmed Abulwafa Ahmed +// +// This file is part of CDP4-IME Community Edition. +// This is an auto-generated class. Any manual changes to this file will be overwritten! +// +// The CDP4-IME Community Edition is free software; you can redistribute it and/or +// modify it under the terms of the GNU Affero General Public +// License as published by the Free Software Foundation; either +// version 3 of the License, or (at your option) any later version. +// +// The CDP4-IME Community Edition is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +// Lesser General Public License for more details. +// +// You should have received a copy of the GNU Affero General Public License +// along with this program. If not, see . // // // This is an auto-generated class. Any manual changes on this file will be overwritten! // -// ------------------------------------------------------------------------------------------------- +// -------------------------------------------------------------------------------------------------------------------- namespace CDP4CommonView { using System; using System.Reactive.Linq; + using CDP4Common.CommonData; using CDP4Common.DiagramData; using CDP4Common.EngineeringModelData; using CDP4Common.ReportingData; using CDP4Common.SiteDirectoryData; + using CDP4Composition.Mvvm; + using CDP4Dal; using CDP4Dal.Events; - using CDP4Dal.Permission; + using CDP4Dal.Permission; + using ReactiveUI; /// @@ -27,7 +49,6 @@ namespace CDP4CommonView /// public partial class AndExpressionRowViewModel : BooleanExpressionRowViewModel { - /// /// Initializes a new instance of the class /// @@ -36,9 +57,28 @@ public partial class AndExpressionRowViewModel : BooleanExpressionRowViewModelThe that is the container of this public AndExpressionRowViewModel(AndExpression andExpression, ISession session, IViewModelBase containerViewModel) : base(andExpression, session, containerViewModel) { + this.UpdateProperties(); } + /// + /// The event-handler that is invoked by the subscription that listens for updates + /// on the that is being represented by the view-model + /// + /// + /// The payload of the event that is being handled + /// + protected override void ObjectChangeEventHandler(ObjectChangedEvent objectChange) + { + base.ObjectChangeEventHandler(objectChange); + + this.UpdateProperties(); + } - + /// + /// Updates the properties of this row + /// + private void UpdateProperties() + { + } } } diff --git a/CDP4Composition/CommonView/AutoGenRows/ApprovalRowViewModel.cs b/CDP4Composition/CommonView/AutoGenRows/ApprovalRowViewModel.cs index 7dad80d38..ec9bfdbfd 100644 --- a/CDP4Composition/CommonView/AutoGenRows/ApprovalRowViewModel.cs +++ b/CDP4Composition/CommonView/AutoGenRows/ApprovalRowViewModel.cs @@ -1,25 +1,47 @@ -// ------------------------------------------------------------------------------------------------- +// -------------------------------------------------------------------------------------------------------------------- // -// Copyright (c) 2015-2018 RHEA System S.A. +// Copyright (c) 2015-2021 RHEA System S.A. +// +// Author: Sam Gerené, Alex Vorobiev, Naron Phou, Alexander van Delft, Nathanael Smiechowski, Ahmed Abulwafa Ahmed +// +// This file is part of CDP4-IME Community Edition. +// This is an auto-generated class. Any manual changes to this file will be overwritten! +// +// The CDP4-IME Community Edition is free software; you can redistribute it and/or +// modify it under the terms of the GNU Affero General Public +// License as published by the Free Software Foundation; either +// version 3 of the License, or (at your option) any later version. +// +// The CDP4-IME Community Edition is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +// Lesser General Public License for more details. +// +// You should have received a copy of the GNU Affero General Public License +// along with this program. If not, see . // // // This is an auto-generated class. Any manual changes on this file will be overwritten! // -// ------------------------------------------------------------------------------------------------- +// -------------------------------------------------------------------------------------------------------------------- namespace CDP4CommonView { using System; using System.Reactive.Linq; + using CDP4Common.CommonData; using CDP4Common.DiagramData; using CDP4Common.EngineeringModelData; using CDP4Common.ReportingData; using CDP4Common.SiteDirectoryData; + using CDP4Composition.Mvvm; + using CDP4Dal; using CDP4Dal.Events; - using CDP4Dal.Permission; + using CDP4Dal.Permission; + using ReactiveUI; /// @@ -27,31 +49,30 @@ namespace CDP4CommonView /// public partial class ApprovalRowViewModel : GenericAnnotationRowViewModel { - /// - /// Backing field for + /// Backing field for property /// - private AnnotationApprovalKind classification; + private Participant author; /// - /// Backing field for + /// Backing field for property /// - private Participant author; + private AnnotationApprovalKind classification; /// - /// Backing field for + /// Backing field for property /// private DomainOfExpertise owner; /// - /// Backing field for + /// Backing field for property /// - private string ownerShortName; + private string ownerName; /// - /// Backing field for + /// Backing field for property /// - private string ownerName; + private string ownerShortName; /// /// Initializes a new instance of the class @@ -64,23 +85,22 @@ public ApprovalRowViewModel(Approval approval, ISession session, IViewModelBase< this.UpdateProperties(); } - /// - /// Gets or sets the Classification + /// Gets or sets the Author /// - public AnnotationApprovalKind Classification + public Participant Author { - get { return this.classification; } - set { this.RaiseAndSetIfChanged(ref this.classification, value); } + get { return this.author; } + set { this.RaiseAndSetIfChanged(ref this.author, value); } } /// - /// Gets or sets the Author + /// Gets or sets the Classification /// - public Participant Author + public AnnotationApprovalKind Classification { - get { return this.author; } - set { this.RaiseAndSetIfChanged(ref this.author, value); } + get { return this.classification; } + set { this.RaiseAndSetIfChanged(ref this.classification, value); } } /// @@ -93,24 +113,23 @@ public DomainOfExpertise Owner } /// - /// Gets or set the ShortName of + /// Gets or set the Name of /// - public string OwnerShortName + public string OwnerName { - get { return this.ownerShortName; } - set { this.RaiseAndSetIfChanged(ref this.ownerShortName, value); } + get { return this.ownerName; } + set { this.RaiseAndSetIfChanged(ref this.ownerName, value); } } /// - /// Gets or set the Name of + /// Gets or set the ShortName of /// - public string OwnerName + public string OwnerShortName { - get { return this.ownerName; } - set { this.RaiseAndSetIfChanged(ref this.ownerName, value); } + get { return this.ownerShortName; } + set { this.RaiseAndSetIfChanged(ref this.ownerShortName, value); } } - /// /// The event-handler that is invoked by the subscription that listens for updates /// on the that is being represented by the view-model @@ -121,6 +140,7 @@ public string OwnerName protected override void ObjectChangeEventHandler(ObjectChangedEvent objectChange) { base.ObjectChangeEventHandler(objectChange); + this.UpdateProperties(); } @@ -129,15 +149,19 @@ protected override void ObjectChangeEventHandler(ObjectChangedEvent objectChange /// private void UpdateProperties() { - this.ModifiedOn = this.Thing.ModifiedOn; - this.Classification = this.Thing.Classification; this.Author = this.Thing.Author; - if (this.Thing.Owner != null) - { - this.OwnerShortName = this.Thing.Owner.ShortName; - this.OwnerName = this.Thing.Owner.Name; - } + this.Classification = this.Thing.Classification; this.Owner = this.Thing.Owner; + if (this.Thing.Owner != null) + { + this.OwnerName = this.Thing.Owner.Name; + this.OwnerShortName = this.Thing.Owner.ShortName; + } + else + { + this.OwnerName = string.Empty; + this.OwnerShortName = string.Empty; + } } } } diff --git a/CDP4Composition/CommonView/AutoGenRows/ArrayParameterTypeRowViewModel.cs b/CDP4Composition/CommonView/AutoGenRows/ArrayParameterTypeRowViewModel.cs index d047141e8..392d45909 100644 --- a/CDP4Composition/CommonView/AutoGenRows/ArrayParameterTypeRowViewModel.cs +++ b/CDP4Composition/CommonView/AutoGenRows/ArrayParameterTypeRowViewModel.cs @@ -1,25 +1,47 @@ -// ------------------------------------------------------------------------------------------------- +// -------------------------------------------------------------------------------------------------------------------- // -// Copyright (c) 2015-2018 RHEA System S.A. +// Copyright (c) 2015-2021 RHEA System S.A. +// +// Author: Sam Gerené, Alex Vorobiev, Naron Phou, Alexander van Delft, Nathanael Smiechowski, Ahmed Abulwafa Ahmed +// +// This file is part of CDP4-IME Community Edition. +// This is an auto-generated class. Any manual changes to this file will be overwritten! +// +// The CDP4-IME Community Edition is free software; you can redistribute it and/or +// modify it under the terms of the GNU Affero General Public +// License as published by the Free Software Foundation; either +// version 3 of the License, or (at your option) any later version. +// +// The CDP4-IME Community Edition is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +// Lesser General Public License for more details. +// +// You should have received a copy of the GNU Affero General Public License +// along with this program. If not, see . // // // This is an auto-generated class. Any manual changes on this file will be overwritten! // -// ------------------------------------------------------------------------------------------------- +// -------------------------------------------------------------------------------------------------------------------- namespace CDP4CommonView { using System; using System.Reactive.Linq; + using CDP4Common.CommonData; using CDP4Common.DiagramData; using CDP4Common.EngineeringModelData; using CDP4Common.ReportingData; using CDP4Common.SiteDirectoryData; + using CDP4Composition.Mvvm; + using CDP4Dal; using CDP4Dal.Events; - using CDP4Dal.Permission; + using CDP4Dal.Permission; + using ReactiveUI; /// @@ -27,19 +49,18 @@ namespace CDP4CommonView /// public partial class ArrayParameterTypeRowViewModel : CompoundParameterTypeRowViewModel { - /// - /// Backing field for + /// Backing field for property /// - private bool isTensor; + private bool hasSingleComponentType; /// - /// Backing field for + /// Backing field for property /// - private bool hasSingleComponentType; + private bool isTensor; /// - /// Backing field for + /// Backing field for property /// private int rank; @@ -54,23 +75,22 @@ public ArrayParameterTypeRowViewModel(ArrayParameterType arrayParameterType, ISe this.UpdateProperties(); } - /// - /// Gets or sets the IsTensor + /// Gets or sets the HasSingleComponentType /// - public bool IsTensor + public bool HasSingleComponentType { - get { return this.isTensor; } - set { this.RaiseAndSetIfChanged(ref this.isTensor, value); } + get { return this.hasSingleComponentType; } + set { this.RaiseAndSetIfChanged(ref this.hasSingleComponentType, value); } } /// - /// Gets or sets the HasSingleComponentType + /// Gets or sets the IsTensor /// - public bool HasSingleComponentType + public bool IsTensor { - get { return this.hasSingleComponentType; } - set { this.RaiseAndSetIfChanged(ref this.hasSingleComponentType, value); } + get { return this.isTensor; } + set { this.RaiseAndSetIfChanged(ref this.isTensor, value); } } /// @@ -82,7 +102,6 @@ public int Rank set { this.RaiseAndSetIfChanged(ref this.rank, value); } } - /// /// The event-handler that is invoked by the subscription that listens for updates /// on the that is being represented by the view-model @@ -93,6 +112,7 @@ public int Rank protected override void ObjectChangeEventHandler(ObjectChangedEvent objectChange) { base.ObjectChangeEventHandler(objectChange); + this.UpdateProperties(); } @@ -101,9 +121,8 @@ protected override void ObjectChangeEventHandler(ObjectChangedEvent objectChange /// private void UpdateProperties() { - this.ModifiedOn = this.Thing.ModifiedOn; - this.IsTensor = ((ArrayParameterType)this.Thing).IsTensor; this.HasSingleComponentType = ((ArrayParameterType)this.Thing).HasSingleComponentType; + this.IsTensor = ((ArrayParameterType)this.Thing).IsTensor; this.Rank = ((ArrayParameterType)this.Thing).Rank; } } diff --git a/CDP4Composition/CommonView/AutoGenRows/BinaryNoteRowViewModel.cs b/CDP4Composition/CommonView/AutoGenRows/BinaryNoteRowViewModel.cs index e971481a5..fd6e1b1b7 100644 --- a/CDP4Composition/CommonView/AutoGenRows/BinaryNoteRowViewModel.cs +++ b/CDP4Composition/CommonView/AutoGenRows/BinaryNoteRowViewModel.cs @@ -1,25 +1,47 @@ -// ------------------------------------------------------------------------------------------------- +// -------------------------------------------------------------------------------------------------------------------- // -// Copyright (c) 2015-2018 RHEA System S.A. +// Copyright (c) 2015-2021 RHEA System S.A. +// +// Author: Sam Gerené, Alex Vorobiev, Naron Phou, Alexander van Delft, Nathanael Smiechowski, Ahmed Abulwafa Ahmed +// +// This file is part of CDP4-IME Community Edition. +// This is an auto-generated class. Any manual changes to this file will be overwritten! +// +// The CDP4-IME Community Edition is free software; you can redistribute it and/or +// modify it under the terms of the GNU Affero General Public +// License as published by the Free Software Foundation; either +// version 3 of the License, or (at your option) any later version. +// +// The CDP4-IME Community Edition is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +// Lesser General Public License for more details. +// +// You should have received a copy of the GNU Affero General Public License +// along with this program. If not, see . // // // This is an auto-generated class. Any manual changes on this file will be overwritten! // -// ------------------------------------------------------------------------------------------------- +// -------------------------------------------------------------------------------------------------------------------- namespace CDP4CommonView { using System; using System.Reactive.Linq; + using CDP4Common.CommonData; using CDP4Common.DiagramData; using CDP4Common.EngineeringModelData; using CDP4Common.ReportingData; using CDP4Common.SiteDirectoryData; + using CDP4Composition.Mvvm; + using CDP4Dal; using CDP4Dal.Events; - using CDP4Dal.Permission; + using CDP4Dal.Permission; + using ReactiveUI; /// @@ -27,26 +49,25 @@ namespace CDP4CommonView /// public partial class BinaryNoteRowViewModel : NoteRowViewModel { - /// - /// Backing field for + /// Backing field for property /// private string caption; /// - /// Backing field for + /// Backing field for property /// private FileType fileType; /// - /// Backing field for + /// Backing field for property /// - private string fileTypeShortName; + private string fileTypeName; /// - /// Backing field for + /// Backing field for property /// - private string fileTypeName; + private string fileTypeShortName; /// /// Initializes a new instance of the class @@ -59,7 +80,6 @@ public BinaryNoteRowViewModel(BinaryNote binaryNote, ISession session, IViewMode this.UpdateProperties(); } - /// /// Gets or sets the Caption /// @@ -79,24 +99,23 @@ public FileType FileType } /// - /// Gets or set the ShortName of + /// Gets or set the Name of /// - public string FileTypeShortName + public string FileTypeName { - get { return this.fileTypeShortName; } - set { this.RaiseAndSetIfChanged(ref this.fileTypeShortName, value); } + get { return this.fileTypeName; } + set { this.RaiseAndSetIfChanged(ref this.fileTypeName, value); } } /// - /// Gets or set the Name of + /// Gets or set the ShortName of /// - public string FileTypeName + public string FileTypeShortName { - get { return this.fileTypeName; } - set { this.RaiseAndSetIfChanged(ref this.fileTypeName, value); } + get { return this.fileTypeShortName; } + set { this.RaiseAndSetIfChanged(ref this.fileTypeShortName, value); } } - /// /// The event-handler that is invoked by the subscription that listens for updates /// on the that is being represented by the view-model @@ -107,6 +126,7 @@ public string FileTypeName protected override void ObjectChangeEventHandler(ObjectChangedEvent objectChange) { base.ObjectChangeEventHandler(objectChange); + this.UpdateProperties(); } @@ -115,14 +135,18 @@ protected override void ObjectChangeEventHandler(ObjectChangedEvent objectChange /// private void UpdateProperties() { - this.ModifiedOn = this.Thing.ModifiedOn; this.Caption = this.Thing.Caption; - if (this.Thing.FileType != null) - { - this.FileTypeShortName = this.Thing.FileType.ShortName; - this.FileTypeName = this.Thing.FileType.Name; - } this.FileType = this.Thing.FileType; + if (this.Thing.FileType != null) + { + this.FileTypeName = this.Thing.FileType.Name; + this.FileTypeShortName = this.Thing.FileType.ShortName; + } + else + { + this.FileTypeName = string.Empty; + this.FileTypeShortName = string.Empty; + } } } } diff --git a/CDP4Composition/CommonView/AutoGenRows/BinaryRelationshipRowViewModel.cs b/CDP4Composition/CommonView/AutoGenRows/BinaryRelationshipRowViewModel.cs index 55d092160..713388169 100644 --- a/CDP4Composition/CommonView/AutoGenRows/BinaryRelationshipRowViewModel.cs +++ b/CDP4Composition/CommonView/AutoGenRows/BinaryRelationshipRowViewModel.cs @@ -1,25 +1,47 @@ -// ------------------------------------------------------------------------------------------------- +// -------------------------------------------------------------------------------------------------------------------- // -// Copyright (c) 2015-2018 RHEA System S.A. +// Copyright (c) 2015-2021 RHEA System S.A. +// +// Author: Sam Gerené, Alex Vorobiev, Naron Phou, Alexander van Delft, Nathanael Smiechowski, Ahmed Abulwafa Ahmed +// +// This file is part of CDP4-IME Community Edition. +// This is an auto-generated class. Any manual changes to this file will be overwritten! +// +// The CDP4-IME Community Edition is free software; you can redistribute it and/or +// modify it under the terms of the GNU Affero General Public +// License as published by the Free Software Foundation; either +// version 3 of the License, or (at your option) any later version. +// +// The CDP4-IME Community Edition is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +// Lesser General Public License for more details. +// +// You should have received a copy of the GNU Affero General Public License +// along with this program. If not, see . // // // This is an auto-generated class. Any manual changes on this file will be overwritten! // -// ------------------------------------------------------------------------------------------------- +// -------------------------------------------------------------------------------------------------------------------- namespace CDP4CommonView { using System; using System.Reactive.Linq; + using CDP4Common.CommonData; using CDP4Common.DiagramData; using CDP4Common.EngineeringModelData; using CDP4Common.ReportingData; using CDP4Common.SiteDirectoryData; + using CDP4Composition.Mvvm; + using CDP4Dal; using CDP4Dal.Events; - using CDP4Dal.Permission; + using CDP4Dal.Permission; + using ReactiveUI; /// @@ -27,14 +49,13 @@ namespace CDP4CommonView /// public partial class BinaryRelationshipRowViewModel : RelationshipRowViewModel { - /// - /// Backing field for + /// Backing field for property /// private Thing source; /// - /// Backing field for + /// Backing field for property /// private Thing target; @@ -49,7 +70,6 @@ public BinaryRelationshipRowViewModel(BinaryRelationship binaryRelationship, ISe this.UpdateProperties(); } - /// /// Gets or sets the Source /// @@ -68,7 +88,6 @@ public Thing Target set { this.RaiseAndSetIfChanged(ref this.target, value); } } - /// /// The event-handler that is invoked by the subscription that listens for updates /// on the that is being represented by the view-model @@ -79,6 +98,7 @@ public Thing Target protected override void ObjectChangeEventHandler(ObjectChangedEvent objectChange) { base.ObjectChangeEventHandler(objectChange); + this.UpdateProperties(); } @@ -87,7 +107,6 @@ protected override void ObjectChangeEventHandler(ObjectChangedEvent objectChange /// private void UpdateProperties() { - this.ModifiedOn = this.Thing.ModifiedOn; this.Source = this.Thing.Source; this.Target = this.Thing.Target; } diff --git a/CDP4Composition/CommonView/AutoGenRows/BinaryRelationshipRuleRowViewModel.cs b/CDP4Composition/CommonView/AutoGenRows/BinaryRelationshipRuleRowViewModel.cs index c4b6fa84c..4fdf61bf5 100644 --- a/CDP4Composition/CommonView/AutoGenRows/BinaryRelationshipRuleRowViewModel.cs +++ b/CDP4Composition/CommonView/AutoGenRows/BinaryRelationshipRuleRowViewModel.cs @@ -1,25 +1,47 @@ -// ------------------------------------------------------------------------------------------------- +// -------------------------------------------------------------------------------------------------------------------- // -// Copyright (c) 2015-2018 RHEA System S.A. +// Copyright (c) 2015-2021 RHEA System S.A. +// +// Author: Sam Gerené, Alex Vorobiev, Naron Phou, Alexander van Delft, Nathanael Smiechowski, Ahmed Abulwafa Ahmed +// +// This file is part of CDP4-IME Community Edition. +// This is an auto-generated class. Any manual changes to this file will be overwritten! +// +// The CDP4-IME Community Edition is free software; you can redistribute it and/or +// modify it under the terms of the GNU Affero General Public +// License as published by the Free Software Foundation; either +// version 3 of the License, or (at your option) any later version. +// +// The CDP4-IME Community Edition is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +// Lesser General Public License for more details. +// +// You should have received a copy of the GNU Affero General Public License +// along with this program. If not, see . // // // This is an auto-generated class. Any manual changes on this file will be overwritten! // -// ------------------------------------------------------------------------------------------------- +// -------------------------------------------------------------------------------------------------------------------- namespace CDP4CommonView { using System; using System.Reactive.Linq; + using CDP4Common.CommonData; using CDP4Common.DiagramData; using CDP4Common.EngineeringModelData; using CDP4Common.ReportingData; using CDP4Common.SiteDirectoryData; + using CDP4Composition.Mvvm; + using CDP4Dal; using CDP4Dal.Events; - using CDP4Dal.Permission; + using CDP4Dal.Permission; + using ReactiveUI; /// @@ -27,61 +49,60 @@ namespace CDP4CommonView /// public partial class BinaryRelationshipRuleRowViewModel : RuleRowViewModel { - /// - /// Backing field for + /// Backing field for property /// private string forwardRelationshipName; /// - /// Backing field for + /// Backing field for property /// private string inverseRelationshipName; /// - /// Backing field for + /// Backing field for property /// private Category relationshipCategory; /// - /// Backing field for + /// Backing field for property /// - private string relationshipCategoryShortName; + private string relationshipCategoryName; /// - /// Backing field for + /// Backing field for property /// - private string relationshipCategoryName; + private string relationshipCategoryShortName; /// - /// Backing field for + /// Backing field for property /// private Category sourceCategory; /// - /// Backing field for + /// Backing field for property /// - private string sourceCategoryShortName; + private string sourceCategoryName; /// - /// Backing field for + /// Backing field for property /// - private string sourceCategoryName; + private string sourceCategoryShortName; /// - /// Backing field for + /// Backing field for property /// private Category targetCategory; /// - /// Backing field for + /// Backing field for property /// - private string targetCategoryShortName; + private string targetCategoryName; /// - /// Backing field for + /// Backing field for property /// - private string targetCategoryName; + private string targetCategoryShortName; /// /// Initializes a new instance of the class @@ -94,7 +115,6 @@ public BinaryRelationshipRuleRowViewModel(BinaryRelationshipRule binaryRelations this.UpdateProperties(); } - /// /// Gets or sets the ForwardRelationshipName /// @@ -123,21 +143,21 @@ public Category RelationshipCategory } /// - /// Gets or set the ShortName of + /// Gets or set the Name of /// - public string RelationshipCategoryShortName + public string RelationshipCategoryName { - get { return this.relationshipCategoryShortName; } - set { this.RaiseAndSetIfChanged(ref this.relationshipCategoryShortName, value); } + get { return this.relationshipCategoryName; } + set { this.RaiseAndSetIfChanged(ref this.relationshipCategoryName, value); } } /// - /// Gets or set the Name of + /// Gets or set the ShortName of /// - public string RelationshipCategoryName + public string RelationshipCategoryShortName { - get { return this.relationshipCategoryName; } - set { this.RaiseAndSetIfChanged(ref this.relationshipCategoryName, value); } + get { return this.relationshipCategoryShortName; } + set { this.RaiseAndSetIfChanged(ref this.relationshipCategoryShortName, value); } } /// @@ -150,21 +170,21 @@ public Category SourceCategory } /// - /// Gets or set the ShortName of + /// Gets or set the Name of /// - public string SourceCategoryShortName + public string SourceCategoryName { - get { return this.sourceCategoryShortName; } - set { this.RaiseAndSetIfChanged(ref this.sourceCategoryShortName, value); } + get { return this.sourceCategoryName; } + set { this.RaiseAndSetIfChanged(ref this.sourceCategoryName, value); } } /// - /// Gets or set the Name of + /// Gets or set the ShortName of /// - public string SourceCategoryName + public string SourceCategoryShortName { - get { return this.sourceCategoryName; } - set { this.RaiseAndSetIfChanged(ref this.sourceCategoryName, value); } + get { return this.sourceCategoryShortName; } + set { this.RaiseAndSetIfChanged(ref this.sourceCategoryShortName, value); } } /// @@ -177,24 +197,23 @@ public Category TargetCategory } /// - /// Gets or set the ShortName of + /// Gets or set the Name of /// - public string TargetCategoryShortName + public string TargetCategoryName { - get { return this.targetCategoryShortName; } - set { this.RaiseAndSetIfChanged(ref this.targetCategoryShortName, value); } + get { return this.targetCategoryName; } + set { this.RaiseAndSetIfChanged(ref this.targetCategoryName, value); } } /// - /// Gets or set the Name of + /// Gets or set the ShortName of /// - public string TargetCategoryName + public string TargetCategoryShortName { - get { return this.targetCategoryName; } - set { this.RaiseAndSetIfChanged(ref this.targetCategoryName, value); } + get { return this.targetCategoryShortName; } + set { this.RaiseAndSetIfChanged(ref this.targetCategoryShortName, value); } } - /// /// The event-handler that is invoked by the subscription that listens for updates /// on the that is being represented by the view-model @@ -205,6 +224,7 @@ public string TargetCategoryName protected override void ObjectChangeEventHandler(ObjectChangedEvent objectChange) { base.ObjectChangeEventHandler(objectChange); + this.UpdateProperties(); } @@ -213,27 +233,41 @@ protected override void ObjectChangeEventHandler(ObjectChangedEvent objectChange /// private void UpdateProperties() { - this.ModifiedOn = this.Thing.ModifiedOn; this.ForwardRelationshipName = this.Thing.ForwardRelationshipName; this.InverseRelationshipName = this.Thing.InverseRelationshipName; - if (this.Thing.RelationshipCategory != null) - { - this.RelationshipCategoryShortName = this.Thing.RelationshipCategory.ShortName; - this.RelationshipCategoryName = this.Thing.RelationshipCategory.Name; - } this.RelationshipCategory = this.Thing.RelationshipCategory; - if (this.Thing.SourceCategory != null) - { - this.SourceCategoryShortName = this.Thing.SourceCategory.ShortName; - this.SourceCategoryName = this.Thing.SourceCategory.Name; - } + if (this.Thing.RelationshipCategory != null) + { + this.RelationshipCategoryName = this.Thing.RelationshipCategory.Name; + this.RelationshipCategoryShortName = this.Thing.RelationshipCategory.ShortName; + } + else + { + this.RelationshipCategoryName = string.Empty; + this.RelationshipCategoryShortName = string.Empty; + } this.SourceCategory = this.Thing.SourceCategory; - if (this.Thing.TargetCategory != null) - { - this.TargetCategoryShortName = this.Thing.TargetCategory.ShortName; - this.TargetCategoryName = this.Thing.TargetCategory.Name; - } + if (this.Thing.SourceCategory != null) + { + this.SourceCategoryName = this.Thing.SourceCategory.Name; + this.SourceCategoryShortName = this.Thing.SourceCategory.ShortName; + } + else + { + this.SourceCategoryName = string.Empty; + this.SourceCategoryShortName = string.Empty; + } this.TargetCategory = this.Thing.TargetCategory; + if (this.Thing.TargetCategory != null) + { + this.TargetCategoryName = this.Thing.TargetCategory.Name; + this.TargetCategoryShortName = this.Thing.TargetCategory.ShortName; + } + else + { + this.TargetCategoryName = string.Empty; + this.TargetCategoryShortName = string.Empty; + } } } } diff --git a/CDP4Composition/CommonView/AutoGenRows/BookRowViewModel.cs b/CDP4Composition/CommonView/AutoGenRows/BookRowViewModel.cs index c1d9b4f34..35a6dc0cb 100644 --- a/CDP4Composition/CommonView/AutoGenRows/BookRowViewModel.cs +++ b/CDP4Composition/CommonView/AutoGenRows/BookRowViewModel.cs @@ -1,25 +1,47 @@ -// ------------------------------------------------------------------------------------------------- +// -------------------------------------------------------------------------------------------------------------------- // -// Copyright (c) 2015-2018 RHEA System S.A. +// Copyright (c) 2015-2021 RHEA System S.A. +// +// Author: Sam Gerené, Alex Vorobiev, Naron Phou, Alexander van Delft, Nathanael Smiechowski, Ahmed Abulwafa Ahmed +// +// This file is part of CDP4-IME Community Edition. +// This is an auto-generated class. Any manual changes to this file will be overwritten! +// +// The CDP4-IME Community Edition is free software; you can redistribute it and/or +// modify it under the terms of the GNU Affero General Public +// License as published by the Free Software Foundation; either +// version 3 of the License, or (at your option) any later version. +// +// The CDP4-IME Community Edition is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +// Lesser General Public License for more details. +// +// You should have received a copy of the GNU Affero General Public License +// along with this program. If not, see . // // // This is an auto-generated class. Any manual changes on this file will be overwritten! // -// ------------------------------------------------------------------------------------------------- +// -------------------------------------------------------------------------------------------------------------------- namespace CDP4CommonView { using System; using System.Reactive.Linq; + using CDP4Common.CommonData; using CDP4Common.DiagramData; using CDP4Common.EngineeringModelData; using CDP4Common.ReportingData; using CDP4Common.SiteDirectoryData; + using CDP4Composition.Mvvm; + using CDP4Dal; using CDP4Dal.Events; - using CDP4Dal.Permission; + using CDP4Dal.Permission; + using ReactiveUI; /// @@ -27,36 +49,35 @@ namespace CDP4CommonView /// public partial class BookRowViewModel : RowViewModelBase { - /// - /// Backing field for + /// Backing field for property /// - private string shortName; + private DateTime createdOn; /// - /// Backing field for + /// Backing field for property /// private string name; /// - /// Backing field for + /// Backing field for property /// - private DateTime createdOn; + private DomainOfExpertise owner; /// - /// Backing field for + /// Backing field for property /// - private DomainOfExpertise owner; + private string ownerName; /// - /// Backing field for + /// Backing field for property /// private string ownerShortName; /// - /// Backing field for + /// Backing field for property /// - private string ownerName; + private string shortName; /// /// Initializes a new instance of the class @@ -69,14 +90,13 @@ public BookRowViewModel(Book book, ISession session, IViewModelBase conta this.UpdateProperties(); } - /// - /// Gets or sets the ShortName + /// Gets or sets the CreatedOn /// - public string ShortName + public DateTime CreatedOn { - get { return this.shortName; } - set { this.RaiseAndSetIfChanged(ref this.shortName, value); } + get { return this.createdOn; } + set { this.RaiseAndSetIfChanged(ref this.createdOn, value); } } /// @@ -89,21 +109,21 @@ public string Name } /// - /// Gets or sets the CreatedOn + /// Gets or sets the Owner /// - public DateTime CreatedOn + public DomainOfExpertise Owner { - get { return this.createdOn; } - set { this.RaiseAndSetIfChanged(ref this.createdOn, value); } + get { return this.owner; } + set { this.RaiseAndSetIfChanged(ref this.owner, value); } } /// - /// Gets or sets the Owner + /// Gets or set the Name of /// - public DomainOfExpertise Owner + public string OwnerName { - get { return this.owner; } - set { this.RaiseAndSetIfChanged(ref this.owner, value); } + get { return this.ownerName; } + set { this.RaiseAndSetIfChanged(ref this.ownerName, value); } } /// @@ -116,15 +136,14 @@ public string OwnerShortName } /// - /// Gets or set the Name of + /// Gets or sets the ShortName /// - public string OwnerName + public string ShortName { - get { return this.ownerName; } - set { this.RaiseAndSetIfChanged(ref this.ownerName, value); } + get { return this.shortName; } + set { this.RaiseAndSetIfChanged(ref this.shortName, value); } } - /// /// The event-handler that is invoked by the subscription that listens for updates /// on the that is being represented by the view-model @@ -135,6 +154,7 @@ public string OwnerName protected override void ObjectChangeEventHandler(ObjectChangedEvent objectChange) { base.ObjectChangeEventHandler(objectChange); + this.UpdateProperties(); } @@ -143,16 +163,20 @@ protected override void ObjectChangeEventHandler(ObjectChangedEvent objectChange /// private void UpdateProperties() { - this.ModifiedOn = this.Thing.ModifiedOn; - this.ShortName = this.Thing.ShortName; - this.Name = this.Thing.Name; this.CreatedOn = this.Thing.CreatedOn; - if (this.Thing.Owner != null) - { - this.OwnerShortName = this.Thing.Owner.ShortName; - this.OwnerName = this.Thing.Owner.Name; - } + this.Name = this.Thing.Name; this.Owner = this.Thing.Owner; + if (this.Thing.Owner != null) + { + this.OwnerName = this.Thing.Owner.Name; + this.OwnerShortName = this.Thing.Owner.ShortName; + } + else + { + this.OwnerName = string.Empty; + this.OwnerShortName = string.Empty; + } + this.ShortName = this.Thing.ShortName; } } } diff --git a/CDP4Composition/CommonView/AutoGenRows/BooleanExpressionRowViewModel.cs b/CDP4Composition/CommonView/AutoGenRows/BooleanExpressionRowViewModel.cs index af15e49dc..9a28ba5d8 100644 --- a/CDP4Composition/CommonView/AutoGenRows/BooleanExpressionRowViewModel.cs +++ b/CDP4Composition/CommonView/AutoGenRows/BooleanExpressionRowViewModel.cs @@ -1,25 +1,47 @@ -// ------------------------------------------------------------------------------------------------- +// -------------------------------------------------------------------------------------------------------------------- // -// Copyright (c) 2015-2018 RHEA System S.A. +// Copyright (c) 2015-2021 RHEA System S.A. +// +// Author: Sam Gerené, Alex Vorobiev, Naron Phou, Alexander van Delft, Nathanael Smiechowski, Ahmed Abulwafa Ahmed +// +// This file is part of CDP4-IME Community Edition. +// This is an auto-generated class. Any manual changes to this file will be overwritten! +// +// The CDP4-IME Community Edition is free software; you can redistribute it and/or +// modify it under the terms of the GNU Affero General Public +// License as published by the Free Software Foundation; either +// version 3 of the License, or (at your option) any later version. +// +// The CDP4-IME Community Edition is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +// Lesser General Public License for more details. +// +// You should have received a copy of the GNU Affero General Public License +// along with this program. If not, see . // // // This is an auto-generated class. Any manual changes on this file will be overwritten! // -// ------------------------------------------------------------------------------------------------- +// -------------------------------------------------------------------------------------------------------------------- namespace CDP4CommonView { using System; using System.Reactive.Linq; + using CDP4Common.CommonData; using CDP4Common.DiagramData; using CDP4Common.EngineeringModelData; using CDP4Common.ReportingData; using CDP4Common.SiteDirectoryData; + using CDP4Composition.Mvvm; + using CDP4Dal; using CDP4Dal.Events; - using CDP4Dal.Permission; + using CDP4Dal.Permission; + using ReactiveUI; /// @@ -27,7 +49,6 @@ namespace CDP4CommonView /// public abstract partial class BooleanExpressionRowViewModel : RowViewModelBase where T : BooleanExpression { - /// /// Initializes a new instance of the class /// @@ -36,9 +57,28 @@ public abstract partial class BooleanExpressionRowViewModel : RowViewModelBas /// The that is the container of this protected BooleanExpressionRowViewModel(T booleanExpression, ISession session, IViewModelBase containerViewModel) : base(booleanExpression, session, containerViewModel) { + this.UpdateProperties(); } + /// + /// The event-handler that is invoked by the subscription that listens for updates + /// on the that is being represented by the view-model + /// + /// + /// The payload of the event that is being handled + /// + protected override void ObjectChangeEventHandler(ObjectChangedEvent objectChange) + { + base.ObjectChangeEventHandler(objectChange); + + this.UpdateProperties(); + } - + /// + /// Updates the properties of this row + /// + private void UpdateProperties() + { + } } } diff --git a/CDP4Composition/CommonView/AutoGenRows/BooleanParameterTypeRowViewModel.cs b/CDP4Composition/CommonView/AutoGenRows/BooleanParameterTypeRowViewModel.cs index f11c54ea6..fec3f4fd9 100644 --- a/CDP4Composition/CommonView/AutoGenRows/BooleanParameterTypeRowViewModel.cs +++ b/CDP4Composition/CommonView/AutoGenRows/BooleanParameterTypeRowViewModel.cs @@ -1,25 +1,47 @@ -// ------------------------------------------------------------------------------------------------- +// -------------------------------------------------------------------------------------------------------------------- // -// Copyright (c) 2015-2018 RHEA System S.A. +// Copyright (c) 2015-2021 RHEA System S.A. +// +// Author: Sam Gerené, Alex Vorobiev, Naron Phou, Alexander van Delft, Nathanael Smiechowski, Ahmed Abulwafa Ahmed +// +// This file is part of CDP4-IME Community Edition. +// This is an auto-generated class. Any manual changes to this file will be overwritten! +// +// The CDP4-IME Community Edition is free software; you can redistribute it and/or +// modify it under the terms of the GNU Affero General Public +// License as published by the Free Software Foundation; either +// version 3 of the License, or (at your option) any later version. +// +// The CDP4-IME Community Edition is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +// Lesser General Public License for more details. +// +// You should have received a copy of the GNU Affero General Public License +// along with this program. If not, see . // // // This is an auto-generated class. Any manual changes on this file will be overwritten! // -// ------------------------------------------------------------------------------------------------- +// -------------------------------------------------------------------------------------------------------------------- namespace CDP4CommonView { using System; using System.Reactive.Linq; + using CDP4Common.CommonData; using CDP4Common.DiagramData; using CDP4Common.EngineeringModelData; using CDP4Common.ReportingData; using CDP4Common.SiteDirectoryData; + using CDP4Composition.Mvvm; + using CDP4Dal; using CDP4Dal.Events; - using CDP4Dal.Permission; + using CDP4Dal.Permission; + using ReactiveUI; /// @@ -27,7 +49,6 @@ namespace CDP4CommonView /// public partial class BooleanParameterTypeRowViewModel : ScalarParameterTypeRowViewModel { - /// /// Initializes a new instance of the class /// @@ -36,9 +57,28 @@ public partial class BooleanParameterTypeRowViewModel : ScalarParameterTypeRowVi /// The that is the container of this public BooleanParameterTypeRowViewModel(BooleanParameterType booleanParameterType, ISession session, IViewModelBase containerViewModel) : base(booleanParameterType, session, containerViewModel) { + this.UpdateProperties(); } + /// + /// The event-handler that is invoked by the subscription that listens for updates + /// on the that is being represented by the view-model + /// + /// + /// The payload of the event that is being handled + /// + protected override void ObjectChangeEventHandler(ObjectChangedEvent objectChange) + { + base.ObjectChangeEventHandler(objectChange); + + this.UpdateProperties(); + } - + /// + /// Updates the properties of this row + /// + private void UpdateProperties() + { + } } } diff --git a/CDP4Composition/CommonView/AutoGenRows/BoundsRowViewModel.cs b/CDP4Composition/CommonView/AutoGenRows/BoundsRowViewModel.cs index 0ac4adda3..2db0748cd 100644 --- a/CDP4Composition/CommonView/AutoGenRows/BoundsRowViewModel.cs +++ b/CDP4Composition/CommonView/AutoGenRows/BoundsRowViewModel.cs @@ -1,25 +1,47 @@ -// ------------------------------------------------------------------------------------------------- +// -------------------------------------------------------------------------------------------------------------------- // -// Copyright (c) 2015-2018 RHEA System S.A. +// Copyright (c) 2015-2021 RHEA System S.A. +// +// Author: Sam Gerené, Alex Vorobiev, Naron Phou, Alexander van Delft, Nathanael Smiechowski, Ahmed Abulwafa Ahmed +// +// This file is part of CDP4-IME Community Edition. +// This is an auto-generated class. Any manual changes to this file will be overwritten! +// +// The CDP4-IME Community Edition is free software; you can redistribute it and/or +// modify it under the terms of the GNU Affero General Public +// License as published by the Free Software Foundation; either +// version 3 of the License, or (at your option) any later version. +// +// The CDP4-IME Community Edition is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +// Lesser General Public License for more details. +// +// You should have received a copy of the GNU Affero General Public License +// along with this program. If not, see . // // // This is an auto-generated class. Any manual changes on this file will be overwritten! // -// ------------------------------------------------------------------------------------------------- +// -------------------------------------------------------------------------------------------------------------------- namespace CDP4CommonView { using System; using System.Reactive.Linq; + using CDP4Common.CommonData; using CDP4Common.DiagramData; using CDP4Common.EngineeringModelData; using CDP4Common.ReportingData; using CDP4Common.SiteDirectoryData; + using CDP4Composition.Mvvm; + using CDP4Dal; using CDP4Dal.Events; - using CDP4Dal.Permission; + using CDP4Dal.Permission; + using ReactiveUI; /// @@ -27,26 +49,25 @@ namespace CDP4CommonView /// public partial class BoundsRowViewModel : DiagramThingBaseRowViewModel { - /// - /// Backing field for + /// Backing field for property /// - private float x; + private float height; /// - /// Backing field for + /// Backing field for property /// - private float y; + private float width; /// - /// Backing field for + /// Backing field for property /// - private float width; + private float x; /// - /// Backing field for + /// Backing field for property /// - private float height; + private float y; /// /// Initializes a new instance of the class @@ -59,44 +80,42 @@ public BoundsRowViewModel(Bounds bounds, ISession session, IViewModelBase this.UpdateProperties(); } - /// - /// Gets or sets the X + /// Gets or sets the Height /// - public float X + public float Height { - get { return this.x; } - set { this.RaiseAndSetIfChanged(ref this.x, value); } + get { return this.height; } + set { this.RaiseAndSetIfChanged(ref this.height, value); } } /// - /// Gets or sets the Y + /// Gets or sets the Width /// - public float Y + public float Width { - get { return this.y; } - set { this.RaiseAndSetIfChanged(ref this.y, value); } + get { return this.width; } + set { this.RaiseAndSetIfChanged(ref this.width, value); } } /// - /// Gets or sets the Width + /// Gets or sets the X /// - public float Width + public float X { - get { return this.width; } - set { this.RaiseAndSetIfChanged(ref this.width, value); } + get { return this.x; } + set { this.RaiseAndSetIfChanged(ref this.x, value); } } /// - /// Gets or sets the Height + /// Gets or sets the Y /// - public float Height + public float Y { - get { return this.height; } - set { this.RaiseAndSetIfChanged(ref this.height, value); } + get { return this.y; } + set { this.RaiseAndSetIfChanged(ref this.y, value); } } - /// /// The event-handler that is invoked by the subscription that listens for updates /// on the that is being represented by the view-model @@ -107,6 +126,7 @@ public float Height protected override void ObjectChangeEventHandler(ObjectChangedEvent objectChange) { base.ObjectChangeEventHandler(objectChange); + this.UpdateProperties(); } @@ -115,11 +135,10 @@ protected override void ObjectChangeEventHandler(ObjectChangedEvent objectChange /// private void UpdateProperties() { - this.ModifiedOn = this.Thing.ModifiedOn; + this.Height = this.Thing.Height; + this.Width = this.Thing.Width; this.X = this.Thing.X; this.Y = this.Thing.Y; - this.Width = this.Thing.Width; - this.Height = this.Thing.Height; } } } diff --git a/CDP4Composition/CommonView/AutoGenRows/BuiltInRuleVerificationRowViewModel.cs b/CDP4Composition/CommonView/AutoGenRows/BuiltInRuleVerificationRowViewModel.cs index 1122444b3..bac7f3a77 100644 --- a/CDP4Composition/CommonView/AutoGenRows/BuiltInRuleVerificationRowViewModel.cs +++ b/CDP4Composition/CommonView/AutoGenRows/BuiltInRuleVerificationRowViewModel.cs @@ -1,25 +1,47 @@ -// ------------------------------------------------------------------------------------------------- +// -------------------------------------------------------------------------------------------------------------------- // -// Copyright (c) 2015-2018 RHEA System S.A. +// Copyright (c) 2015-2021 RHEA System S.A. +// +// Author: Sam Gerené, Alex Vorobiev, Naron Phou, Alexander van Delft, Nathanael Smiechowski, Ahmed Abulwafa Ahmed +// +// This file is part of CDP4-IME Community Edition. +// This is an auto-generated class. Any manual changes to this file will be overwritten! +// +// The CDP4-IME Community Edition is free software; you can redistribute it and/or +// modify it under the terms of the GNU Affero General Public +// License as published by the Free Software Foundation; either +// version 3 of the License, or (at your option) any later version. +// +// The CDP4-IME Community Edition is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +// Lesser General Public License for more details. +// +// You should have received a copy of the GNU Affero General Public License +// along with this program. If not, see . // // // This is an auto-generated class. Any manual changes on this file will be overwritten! // -// ------------------------------------------------------------------------------------------------- +// -------------------------------------------------------------------------------------------------------------------- namespace CDP4CommonView { using System; using System.Reactive.Linq; + using CDP4Common.CommonData; using CDP4Common.DiagramData; using CDP4Common.EngineeringModelData; using CDP4Common.ReportingData; using CDP4Common.SiteDirectoryData; + using CDP4Composition.Mvvm; + using CDP4Dal; using CDP4Dal.Events; - using CDP4Dal.Permission; + using CDP4Dal.Permission; + using ReactiveUI; /// @@ -27,7 +49,6 @@ namespace CDP4CommonView /// public partial class BuiltInRuleVerificationRowViewModel : RuleVerificationRowViewModel { - /// /// Initializes a new instance of the class /// @@ -36,9 +57,28 @@ public partial class BuiltInRuleVerificationRowViewModel : RuleVerificationRowVi /// The that is the container of this public BuiltInRuleVerificationRowViewModel(BuiltInRuleVerification builtInRuleVerification, ISession session, IViewModelBase containerViewModel) : base(builtInRuleVerification, session, containerViewModel) { + this.UpdateProperties(); } + /// + /// The event-handler that is invoked by the subscription that listens for updates + /// on the that is being represented by the view-model + /// + /// + /// The payload of the event that is being handled + /// + protected override void ObjectChangeEventHandler(ObjectChangedEvent objectChange) + { + base.ObjectChangeEventHandler(objectChange); + + this.UpdateProperties(); + } - + /// + /// Updates the properties of this row + /// + private void UpdateProperties() + { + } } } diff --git a/CDP4Composition/CommonView/AutoGenRows/CategoryRowViewModel.cs b/CDP4Composition/CommonView/AutoGenRows/CategoryRowViewModel.cs index db8876f52..5a3fc2ed5 100644 --- a/CDP4Composition/CommonView/AutoGenRows/CategoryRowViewModel.cs +++ b/CDP4Composition/CommonView/AutoGenRows/CategoryRowViewModel.cs @@ -1,25 +1,47 @@ -// ------------------------------------------------------------------------------------------------- +// -------------------------------------------------------------------------------------------------------------------- // -// Copyright (c) 2015-2018 RHEA System S.A. +// Copyright (c) 2015-2021 RHEA System S.A. +// +// Author: Sam Gerené, Alex Vorobiev, Naron Phou, Alexander van Delft, Nathanael Smiechowski, Ahmed Abulwafa Ahmed +// +// This file is part of CDP4-IME Community Edition. +// This is an auto-generated class. Any manual changes to this file will be overwritten! +// +// The CDP4-IME Community Edition is free software; you can redistribute it and/or +// modify it under the terms of the GNU Affero General Public +// License as published by the Free Software Foundation; either +// version 3 of the License, or (at your option) any later version. +// +// The CDP4-IME Community Edition is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +// Lesser General Public License for more details. +// +// You should have received a copy of the GNU Affero General Public License +// along with this program. If not, see . // // // This is an auto-generated class. Any manual changes on this file will be overwritten! // -// ------------------------------------------------------------------------------------------------- +// -------------------------------------------------------------------------------------------------------------------- namespace CDP4CommonView { using System; using System.Reactive.Linq; + using CDP4Common.CommonData; using CDP4Common.DiagramData; using CDP4Common.EngineeringModelData; using CDP4Common.ReportingData; using CDP4Common.SiteDirectoryData; + using CDP4Composition.Mvvm; + using CDP4Dal; using CDP4Dal.Events; - using CDP4Dal.Permission; + using CDP4Dal.Permission; + using ReactiveUI; /// @@ -27,14 +49,13 @@ namespace CDP4CommonView /// public partial class CategoryRowViewModel : DefinedThingRowViewModel { - /// - /// Backing field for + /// Backing field for property /// private bool isAbstract; /// - /// Backing field for + /// Backing field for property /// private bool isDeprecated; @@ -49,7 +70,6 @@ public CategoryRowViewModel(Category category, ISession session, IViewModelBase< this.UpdateProperties(); } - /// /// Gets or sets the IsAbstract /// @@ -68,7 +88,6 @@ public bool IsDeprecated set { this.RaiseAndSetIfChanged(ref this.isDeprecated, value); } } - /// /// The event-handler that is invoked by the subscription that listens for updates /// on the that is being represented by the view-model @@ -79,6 +98,7 @@ public bool IsDeprecated protected override void ObjectChangeEventHandler(ObjectChangedEvent objectChange) { base.ObjectChangeEventHandler(objectChange); + this.UpdateProperties(); } @@ -87,7 +107,6 @@ protected override void ObjectChangeEventHandler(ObjectChangedEvent objectChange /// private void UpdateProperties() { - this.ModifiedOn = this.Thing.ModifiedOn; this.IsAbstract = this.Thing.IsAbstract; this.IsDeprecated = this.Thing.IsDeprecated; } diff --git a/CDP4Composition/CommonView/AutoGenRows/ChangeProposalRowViewModel.cs b/CDP4Composition/CommonView/AutoGenRows/ChangeProposalRowViewModel.cs index 4e095f7e1..4c8f68c36 100644 --- a/CDP4Composition/CommonView/AutoGenRows/ChangeProposalRowViewModel.cs +++ b/CDP4Composition/CommonView/AutoGenRows/ChangeProposalRowViewModel.cs @@ -1,25 +1,47 @@ -// ------------------------------------------------------------------------------------------------- +// -------------------------------------------------------------------------------------------------------------------- // -// Copyright (c) 2015-2018 RHEA System S.A. +// Copyright (c) 2015-2021 RHEA System S.A. +// +// Author: Sam Gerené, Alex Vorobiev, Naron Phou, Alexander van Delft, Nathanael Smiechowski, Ahmed Abulwafa Ahmed +// +// This file is part of CDP4-IME Community Edition. +// This is an auto-generated class. Any manual changes to this file will be overwritten! +// +// The CDP4-IME Community Edition is free software; you can redistribute it and/or +// modify it under the terms of the GNU Affero General Public +// License as published by the Free Software Foundation; either +// version 3 of the License, or (at your option) any later version. +// +// The CDP4-IME Community Edition is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +// Lesser General Public License for more details. +// +// You should have received a copy of the GNU Affero General Public License +// along with this program. If not, see . // // // This is an auto-generated class. Any manual changes on this file will be overwritten! // -// ------------------------------------------------------------------------------------------------- +// -------------------------------------------------------------------------------------------------------------------- namespace CDP4CommonView { using System; using System.Reactive.Linq; + using CDP4Common.CommonData; using CDP4Common.DiagramData; using CDP4Common.EngineeringModelData; using CDP4Common.ReportingData; using CDP4Common.SiteDirectoryData; + using CDP4Composition.Mvvm; + using CDP4Dal; using CDP4Dal.Events; - using CDP4Dal.Permission; + using CDP4Dal.Permission; + using ReactiveUI; /// @@ -27,12 +49,16 @@ namespace CDP4CommonView /// public partial class ChangeProposalRowViewModel : ModellingAnnotationItemRowViewModel { - /// - /// Backing field for + /// Backing field for property /// private ChangeRequest changeRequest; + /// + /// Backing field for property + /// + private string changeRequestShortName; + /// /// Initializes a new instance of the class /// @@ -44,7 +70,6 @@ public ChangeProposalRowViewModel(ChangeProposal changeProposal, ISession sessio this.UpdateProperties(); } - /// /// Gets or sets the ChangeRequest /// @@ -54,7 +79,15 @@ public ChangeRequest ChangeRequest set { this.RaiseAndSetIfChanged(ref this.changeRequest, value); } } - + /// + /// Gets or set the ShortName of + /// + public string ChangeRequestShortName + { + get { return this.changeRequestShortName; } + set { this.RaiseAndSetIfChanged(ref this.changeRequestShortName, value); } + } + /// /// The event-handler that is invoked by the subscription that listens for updates /// on the that is being represented by the view-model @@ -65,6 +98,7 @@ public ChangeRequest ChangeRequest protected override void ObjectChangeEventHandler(ObjectChangedEvent objectChange) { base.ObjectChangeEventHandler(objectChange); + this.UpdateProperties(); } @@ -73,8 +107,15 @@ protected override void ObjectChangeEventHandler(ObjectChangedEvent objectChange /// private void UpdateProperties() { - this.ModifiedOn = this.Thing.ModifiedOn; this.ChangeRequest = this.Thing.ChangeRequest; + if (this.Thing.ChangeRequest != null) + { + this.ChangeRequestShortName = this.Thing.ChangeRequest.ShortName; + } + else + { + this.ChangeRequestShortName = string.Empty; + } } } } diff --git a/CDP4Composition/CommonView/AutoGenRows/ChangeRequestRowViewModel.cs b/CDP4Composition/CommonView/AutoGenRows/ChangeRequestRowViewModel.cs index f03e81319..94a46d9d2 100644 --- a/CDP4Composition/CommonView/AutoGenRows/ChangeRequestRowViewModel.cs +++ b/CDP4Composition/CommonView/AutoGenRows/ChangeRequestRowViewModel.cs @@ -1,25 +1,47 @@ -// ------------------------------------------------------------------------------------------------- +// -------------------------------------------------------------------------------------------------------------------- // -// Copyright (c) 2015-2018 RHEA System S.A. +// Copyright (c) 2015-2021 RHEA System S.A. +// +// Author: Sam Gerené, Alex Vorobiev, Naron Phou, Alexander van Delft, Nathanael Smiechowski, Ahmed Abulwafa Ahmed +// +// This file is part of CDP4-IME Community Edition. +// This is an auto-generated class. Any manual changes to this file will be overwritten! +// +// The CDP4-IME Community Edition is free software; you can redistribute it and/or +// modify it under the terms of the GNU Affero General Public +// License as published by the Free Software Foundation; either +// version 3 of the License, or (at your option) any later version. +// +// The CDP4-IME Community Edition is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +// Lesser General Public License for more details. +// +// You should have received a copy of the GNU Affero General Public License +// along with this program. If not, see . // // // This is an auto-generated class. Any manual changes on this file will be overwritten! // -// ------------------------------------------------------------------------------------------------- +// -------------------------------------------------------------------------------------------------------------------- namespace CDP4CommonView { using System; using System.Reactive.Linq; + using CDP4Common.CommonData; using CDP4Common.DiagramData; using CDP4Common.EngineeringModelData; using CDP4Common.ReportingData; using CDP4Common.SiteDirectoryData; + using CDP4Composition.Mvvm; + using CDP4Dal; using CDP4Dal.Events; - using CDP4Dal.Permission; + using CDP4Dal.Permission; + using ReactiveUI; /// @@ -27,7 +49,6 @@ namespace CDP4CommonView /// public partial class ChangeRequestRowViewModel : ContractDeviationRowViewModel { - /// /// Initializes a new instance of the class /// @@ -36,9 +57,28 @@ public partial class ChangeRequestRowViewModel : ContractDeviationRowViewModelThe that is the container of this public ChangeRequestRowViewModel(ChangeRequest changeRequest, ISession session, IViewModelBase containerViewModel) : base(changeRequest, session, containerViewModel) { + this.UpdateProperties(); } + /// + /// The event-handler that is invoked by the subscription that listens for updates + /// on the that is being represented by the view-model + /// + /// + /// The payload of the event that is being handled + /// + protected override void ObjectChangeEventHandler(ObjectChangedEvent objectChange) + { + base.ObjectChangeEventHandler(objectChange); + + this.UpdateProperties(); + } - + /// + /// Updates the properties of this row + /// + private void UpdateProperties() + { + } } } diff --git a/CDP4Composition/CommonView/AutoGenRows/CitationRowViewModel.cs b/CDP4Composition/CommonView/AutoGenRows/CitationRowViewModel.cs index a9dc82271..282ee5bd9 100644 --- a/CDP4Composition/CommonView/AutoGenRows/CitationRowViewModel.cs +++ b/CDP4Composition/CommonView/AutoGenRows/CitationRowViewModel.cs @@ -1,25 +1,47 @@ -// ------------------------------------------------------------------------------------------------- +// -------------------------------------------------------------------------------------------------------------------- // -// Copyright (c) 2015-2018 RHEA System S.A. +// Copyright (c) 2015-2021 RHEA System S.A. +// +// Author: Sam Gerené, Alex Vorobiev, Naron Phou, Alexander van Delft, Nathanael Smiechowski, Ahmed Abulwafa Ahmed +// +// This file is part of CDP4-IME Community Edition. +// This is an auto-generated class. Any manual changes to this file will be overwritten! +// +// The CDP4-IME Community Edition is free software; you can redistribute it and/or +// modify it under the terms of the GNU Affero General Public +// License as published by the Free Software Foundation; either +// version 3 of the License, or (at your option) any later version. +// +// The CDP4-IME Community Edition is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +// Lesser General Public License for more details. +// +// You should have received a copy of the GNU Affero General Public License +// along with this program. If not, see . // // // This is an auto-generated class. Any manual changes on this file will be overwritten! // -// ------------------------------------------------------------------------------------------------- +// -------------------------------------------------------------------------------------------------------------------- namespace CDP4CommonView { using System; using System.Reactive.Linq; + using CDP4Common.CommonData; using CDP4Common.DiagramData; using CDP4Common.EngineeringModelData; using CDP4Common.ReportingData; using CDP4Common.SiteDirectoryData; + using CDP4Composition.Mvvm; + using CDP4Dal; using CDP4Dal.Events; - using CDP4Dal.Permission; + using CDP4Dal.Permission; + using ReactiveUI; /// @@ -27,41 +49,40 @@ namespace CDP4CommonView /// public partial class CitationRowViewModel : RowViewModelBase { - /// - /// Backing field for + /// Backing field for property /// - private string location; + private bool isAdaptation; /// - /// Backing field for + /// Backing field for property /// - private bool isAdaptation; + private string location; /// - /// Backing field for + /// Backing field for property /// private string remark; /// - /// Backing field for + /// Backing field for property /// private string shortName; /// - /// Backing field for + /// Backing field for property /// private ReferenceSource source; /// - /// Backing field for + /// Backing field for property /// - private string sourceShortName; + private string sourceName; /// - /// Backing field for + /// Backing field for property /// - private string sourceName; + private string sourceShortName; /// /// Initializes a new instance of the class @@ -74,23 +95,22 @@ public CitationRowViewModel(Citation citation, ISession session, IViewModelBase< this.UpdateProperties(); } - /// - /// Gets or sets the Location + /// Gets or sets the IsAdaptation /// - public string Location + public bool IsAdaptation { - get { return this.location; } - set { this.RaiseAndSetIfChanged(ref this.location, value); } + get { return this.isAdaptation; } + set { this.RaiseAndSetIfChanged(ref this.isAdaptation, value); } } /// - /// Gets or sets the IsAdaptation + /// Gets or sets the Location /// - public bool IsAdaptation + public string Location { - get { return this.isAdaptation; } - set { this.RaiseAndSetIfChanged(ref this.isAdaptation, value); } + get { return this.location; } + set { this.RaiseAndSetIfChanged(ref this.location, value); } } /// @@ -121,24 +141,23 @@ public ReferenceSource Source } /// - /// Gets or set the ShortName of + /// Gets or set the Name of /// - public string SourceShortName + public string SourceName { - get { return this.sourceShortName; } - set { this.RaiseAndSetIfChanged(ref this.sourceShortName, value); } + get { return this.sourceName; } + set { this.RaiseAndSetIfChanged(ref this.sourceName, value); } } /// - /// Gets or set the Name of + /// Gets or set the ShortName of /// - public string SourceName + public string SourceShortName { - get { return this.sourceName; } - set { this.RaiseAndSetIfChanged(ref this.sourceName, value); } + get { return this.sourceShortName; } + set { this.RaiseAndSetIfChanged(ref this.sourceShortName, value); } } - /// /// The event-handler that is invoked by the subscription that listens for updates /// on the that is being represented by the view-model @@ -149,6 +168,7 @@ public string SourceName protected override void ObjectChangeEventHandler(ObjectChangedEvent objectChange) { base.ObjectChangeEventHandler(objectChange); + this.UpdateProperties(); } @@ -157,17 +177,21 @@ protected override void ObjectChangeEventHandler(ObjectChangedEvent objectChange /// private void UpdateProperties() { - this.ModifiedOn = this.Thing.ModifiedOn; - this.Location = this.Thing.Location; this.IsAdaptation = this.Thing.IsAdaptation; + this.Location = this.Thing.Location; this.Remark = this.Thing.Remark; this.ShortName = this.Thing.ShortName; - if (this.Thing.Source != null) - { - this.SourceShortName = this.Thing.Source.ShortName; - this.SourceName = this.Thing.Source.Name; - } this.Source = this.Thing.Source; + if (this.Thing.Source != null) + { + this.SourceName = this.Thing.Source.Name; + this.SourceShortName = this.Thing.Source.ShortName; + } + else + { + this.SourceName = string.Empty; + this.SourceShortName = string.Empty; + } } } } diff --git a/CDP4Composition/CommonView/AutoGenRows/ColorRowViewModel.cs b/CDP4Composition/CommonView/AutoGenRows/ColorRowViewModel.cs index 4eb8a18a0..098ced085 100644 --- a/CDP4Composition/CommonView/AutoGenRows/ColorRowViewModel.cs +++ b/CDP4Composition/CommonView/AutoGenRows/ColorRowViewModel.cs @@ -1,25 +1,47 @@ -// ------------------------------------------------------------------------------------------------- +// -------------------------------------------------------------------------------------------------------------------- // -// Copyright (c) 2015-2018 RHEA System S.A. +// Copyright (c) 2015-2021 RHEA System S.A. +// +// Author: Sam Gerené, Alex Vorobiev, Naron Phou, Alexander van Delft, Nathanael Smiechowski, Ahmed Abulwafa Ahmed +// +// This file is part of CDP4-IME Community Edition. +// This is an auto-generated class. Any manual changes to this file will be overwritten! +// +// The CDP4-IME Community Edition is free software; you can redistribute it and/or +// modify it under the terms of the GNU Affero General Public +// License as published by the Free Software Foundation; either +// version 3 of the License, or (at your option) any later version. +// +// The CDP4-IME Community Edition is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +// Lesser General Public License for more details. +// +// You should have received a copy of the GNU Affero General Public License +// along with this program. If not, see . // // // This is an auto-generated class. Any manual changes on this file will be overwritten! // -// ------------------------------------------------------------------------------------------------- +// -------------------------------------------------------------------------------------------------------------------- namespace CDP4CommonView { using System; using System.Reactive.Linq; + using CDP4Common.CommonData; using CDP4Common.DiagramData; using CDP4Common.EngineeringModelData; using CDP4Common.ReportingData; using CDP4Common.SiteDirectoryData; + using CDP4Composition.Mvvm; + using CDP4Dal; using CDP4Dal.Events; - using CDP4Dal.Permission; + using CDP4Dal.Permission; + using ReactiveUI; /// @@ -27,21 +49,20 @@ namespace CDP4CommonView /// public partial class ColorRowViewModel : DiagramThingBaseRowViewModel { - /// - /// Backing field for + /// Backing field for property /// - private int red; + private int blue; /// - /// Backing field for + /// Backing field for property /// private int green; /// - /// Backing field for + /// Backing field for property /// - private int blue; + private int red; /// /// Initializes a new instance of the class @@ -54,14 +75,13 @@ public ColorRowViewModel(Color color, ISession session, IViewModelBase co this.UpdateProperties(); } - /// - /// Gets or sets the Red + /// Gets or sets the Blue /// - public int Red + public int Blue { - get { return this.red; } - set { this.RaiseAndSetIfChanged(ref this.red, value); } + get { return this.blue; } + set { this.RaiseAndSetIfChanged(ref this.blue, value); } } /// @@ -74,15 +94,14 @@ public int Green } /// - /// Gets or sets the Blue + /// Gets or sets the Red /// - public int Blue + public int Red { - get { return this.blue; } - set { this.RaiseAndSetIfChanged(ref this.blue, value); } + get { return this.red; } + set { this.RaiseAndSetIfChanged(ref this.red, value); } } - /// /// The event-handler that is invoked by the subscription that listens for updates /// on the that is being represented by the view-model @@ -93,6 +112,7 @@ public int Blue protected override void ObjectChangeEventHandler(ObjectChangedEvent objectChange) { base.ObjectChangeEventHandler(objectChange); + this.UpdateProperties(); } @@ -101,10 +121,9 @@ protected override void ObjectChangeEventHandler(ObjectChangedEvent objectChange /// private void UpdateProperties() { - this.ModifiedOn = this.Thing.ModifiedOn; - this.Red = this.Thing.Red; - this.Green = this.Thing.Green; this.Blue = this.Thing.Blue; + this.Green = this.Thing.Green; + this.Red = this.Thing.Red; } } } diff --git a/CDP4Composition/CommonView/AutoGenRows/CommonFileStoreRowViewModel.cs b/CDP4Composition/CommonView/AutoGenRows/CommonFileStoreRowViewModel.cs index 7ac41257e..d5ab96b8e 100644 --- a/CDP4Composition/CommonView/AutoGenRows/CommonFileStoreRowViewModel.cs +++ b/CDP4Composition/CommonView/AutoGenRows/CommonFileStoreRowViewModel.cs @@ -1,25 +1,47 @@ -// ------------------------------------------------------------------------------------------------- +// -------------------------------------------------------------------------------------------------------------------- // -// Copyright (c) 2015-2018 RHEA System S.A. +// Copyright (c) 2015-2021 RHEA System S.A. +// +// Author: Sam Gerené, Alex Vorobiev, Naron Phou, Alexander van Delft, Nathanael Smiechowski, Ahmed Abulwafa Ahmed +// +// This file is part of CDP4-IME Community Edition. +// This is an auto-generated class. Any manual changes to this file will be overwritten! +// +// The CDP4-IME Community Edition is free software; you can redistribute it and/or +// modify it under the terms of the GNU Affero General Public +// License as published by the Free Software Foundation; either +// version 3 of the License, or (at your option) any later version. +// +// The CDP4-IME Community Edition is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +// Lesser General Public License for more details. +// +// You should have received a copy of the GNU Affero General Public License +// along with this program. If not, see . // // // This is an auto-generated class. Any manual changes on this file will be overwritten! // -// ------------------------------------------------------------------------------------------------- +// -------------------------------------------------------------------------------------------------------------------- namespace CDP4CommonView { using System; using System.Reactive.Linq; + using CDP4Common.CommonData; using CDP4Common.DiagramData; using CDP4Common.EngineeringModelData; using CDP4Common.ReportingData; using CDP4Common.SiteDirectoryData; + using CDP4Composition.Mvvm; + using CDP4Dal; using CDP4Dal.Events; - using CDP4Dal.Permission; + using CDP4Dal.Permission; + using ReactiveUI; /// @@ -27,7 +49,6 @@ namespace CDP4CommonView /// public partial class CommonFileStoreRowViewModel : FileStoreRowViewModel { - /// /// Initializes a new instance of the class /// @@ -36,9 +57,28 @@ public partial class CommonFileStoreRowViewModel : FileStoreRowViewModelThe that is the container of this public CommonFileStoreRowViewModel(CommonFileStore commonFileStore, ISession session, IViewModelBase containerViewModel) : base(commonFileStore, session, containerViewModel) { + this.UpdateProperties(); } + /// + /// The event-handler that is invoked by the subscription that listens for updates + /// on the that is being represented by the view-model + /// + /// + /// The payload of the event that is being handled + /// + protected override void ObjectChangeEventHandler(ObjectChangedEvent objectChange) + { + base.ObjectChangeEventHandler(objectChange); + + this.UpdateProperties(); + } - + /// + /// Updates the properties of this row + /// + private void UpdateProperties() + { + } } } diff --git a/CDP4Composition/CommonView/AutoGenRows/CompoundParameterTypeRowViewModel.cs b/CDP4Composition/CommonView/AutoGenRows/CompoundParameterTypeRowViewModel.cs index f62f3e200..57bd29cc1 100644 --- a/CDP4Composition/CommonView/AutoGenRows/CompoundParameterTypeRowViewModel.cs +++ b/CDP4Composition/CommonView/AutoGenRows/CompoundParameterTypeRowViewModel.cs @@ -1,25 +1,47 @@ -// ------------------------------------------------------------------------------------------------- +// -------------------------------------------------------------------------------------------------------------------- // -// Copyright (c) 2015-2018 RHEA System S.A. +// Copyright (c) 2015-2021 RHEA System S.A. +// +// Author: Sam Gerené, Alex Vorobiev, Naron Phou, Alexander van Delft, Nathanael Smiechowski, Ahmed Abulwafa Ahmed +// +// This file is part of CDP4-IME Community Edition. +// This is an auto-generated class. Any manual changes to this file will be overwritten! +// +// The CDP4-IME Community Edition is free software; you can redistribute it and/or +// modify it under the terms of the GNU Affero General Public +// License as published by the Free Software Foundation; either +// version 3 of the License, or (at your option) any later version. +// +// The CDP4-IME Community Edition is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +// Lesser General Public License for more details. +// +// You should have received a copy of the GNU Affero General Public License +// along with this program. If not, see . // // // This is an auto-generated class. Any manual changes on this file will be overwritten! // -// ------------------------------------------------------------------------------------------------- +// -------------------------------------------------------------------------------------------------------------------- namespace CDP4CommonView { using System; using System.Reactive.Linq; + using CDP4Common.CommonData; using CDP4Common.DiagramData; using CDP4Common.EngineeringModelData; using CDP4Common.ReportingData; using CDP4Common.SiteDirectoryData; + using CDP4Composition.Mvvm; + using CDP4Dal; using CDP4Dal.Events; - using CDP4Dal.Permission; + using CDP4Dal.Permission; + using ReactiveUI; /// @@ -27,9 +49,8 @@ namespace CDP4CommonView /// public partial class CompoundParameterTypeRowViewModel : ParameterTypeRowViewModel { - /// - /// Backing field for + /// Backing field for property /// private bool isFinalized; @@ -44,7 +65,6 @@ public CompoundParameterTypeRowViewModel(CompoundParameterType compoundParameter this.UpdateProperties(); } - /// /// Gets or sets the IsFinalized /// @@ -54,7 +74,6 @@ public bool IsFinalized set { this.RaiseAndSetIfChanged(ref this.isFinalized, value); } } - /// /// The event-handler that is invoked by the subscription that listens for updates /// on the that is being represented by the view-model @@ -65,6 +84,7 @@ public bool IsFinalized protected override void ObjectChangeEventHandler(ObjectChangedEvent objectChange) { base.ObjectChangeEventHandler(objectChange); + this.UpdateProperties(); } @@ -73,7 +93,6 @@ protected override void ObjectChangeEventHandler(ObjectChangedEvent objectChange /// private void UpdateProperties() { - this.ModifiedOn = this.Thing.ModifiedOn; this.IsFinalized = this.Thing.IsFinalized; } } diff --git a/CDP4Composition/CommonView/AutoGenRows/ConstantRowViewModel.cs b/CDP4Composition/CommonView/AutoGenRows/ConstantRowViewModel.cs index 45eb1c21f..b546dd3e9 100644 --- a/CDP4Composition/CommonView/AutoGenRows/ConstantRowViewModel.cs +++ b/CDP4Composition/CommonView/AutoGenRows/ConstantRowViewModel.cs @@ -1,25 +1,47 @@ -// ------------------------------------------------------------------------------------------------- +// -------------------------------------------------------------------------------------------------------------------- // -// Copyright (c) 2015-2018 RHEA System S.A. +// Copyright (c) 2015-2021 RHEA System S.A. +// +// Author: Sam Gerené, Alex Vorobiev, Naron Phou, Alexander van Delft, Nathanael Smiechowski, Ahmed Abulwafa Ahmed +// +// This file is part of CDP4-IME Community Edition. +// This is an auto-generated class. Any manual changes to this file will be overwritten! +// +// The CDP4-IME Community Edition is free software; you can redistribute it and/or +// modify it under the terms of the GNU Affero General Public +// License as published by the Free Software Foundation; either +// version 3 of the License, or (at your option) any later version. +// +// The CDP4-IME Community Edition is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +// Lesser General Public License for more details. +// +// You should have received a copy of the GNU Affero General Public License +// along with this program. If not, see . // // // This is an auto-generated class. Any manual changes on this file will be overwritten! // -// ------------------------------------------------------------------------------------------------- +// -------------------------------------------------------------------------------------------------------------------- namespace CDP4CommonView { using System; using System.Reactive.Linq; + using CDP4Common.CommonData; using CDP4Common.DiagramData; using CDP4Common.EngineeringModelData; using CDP4Common.ReportingData; using CDP4Common.SiteDirectoryData; + using CDP4Composition.Mvvm; + using CDP4Dal; using CDP4Dal.Events; - using CDP4Dal.Permission; + using CDP4Dal.Permission; + using ReactiveUI; /// @@ -27,41 +49,40 @@ namespace CDP4CommonView /// public partial class ConstantRowViewModel : DefinedThingRowViewModel { - /// - /// Backing field for + /// Backing field for property /// private bool isDeprecated; /// - /// Backing field for + /// Backing field for property /// private ParameterType parameterType; /// - /// Backing field for + /// Backing field for property /// - private string parameterTypeShortName; + private string parameterTypeName; /// - /// Backing field for + /// Backing field for property /// - private string parameterTypeName; + private string parameterTypeShortName; /// - /// Backing field for + /// Backing field for property /// private MeasurementScale scale; /// - /// Backing field for + /// Backing field for property /// - private string scaleShortName; + private string scaleName; /// - /// Backing field for + /// Backing field for property /// - private string scaleName; + private string scaleShortName; /// /// Initializes a new instance of the class @@ -74,7 +95,6 @@ public ConstantRowViewModel(Constant constant, ISession session, IViewModelBase< this.UpdateProperties(); } - /// /// Gets or sets the IsDeprecated /// @@ -94,21 +114,21 @@ public ParameterType ParameterType } /// - /// Gets or set the ShortName of + /// Gets or set the Name of /// - public string ParameterTypeShortName + public string ParameterTypeName { - get { return this.parameterTypeShortName; } - set { this.RaiseAndSetIfChanged(ref this.parameterTypeShortName, value); } + get { return this.parameterTypeName; } + set { this.RaiseAndSetIfChanged(ref this.parameterTypeName, value); } } /// - /// Gets or set the Name of + /// Gets or set the ShortName of /// - public string ParameterTypeName + public string ParameterTypeShortName { - get { return this.parameterTypeName; } - set { this.RaiseAndSetIfChanged(ref this.parameterTypeName, value); } + get { return this.parameterTypeShortName; } + set { this.RaiseAndSetIfChanged(ref this.parameterTypeShortName, value); } } /// @@ -121,24 +141,23 @@ public MeasurementScale Scale } /// - /// Gets or set the ShortName of + /// Gets or set the Name of /// - public string ScaleShortName + public string ScaleName { - get { return this.scaleShortName; } - set { this.RaiseAndSetIfChanged(ref this.scaleShortName, value); } + get { return this.scaleName; } + set { this.RaiseAndSetIfChanged(ref this.scaleName, value); } } /// - /// Gets or set the Name of + /// Gets or set the ShortName of /// - public string ScaleName + public string ScaleShortName { - get { return this.scaleName; } - set { this.RaiseAndSetIfChanged(ref this.scaleName, value); } + get { return this.scaleShortName; } + set { this.RaiseAndSetIfChanged(ref this.scaleShortName, value); } } - /// /// The event-handler that is invoked by the subscription that listens for updates /// on the that is being represented by the view-model @@ -149,6 +168,7 @@ public string ScaleName protected override void ObjectChangeEventHandler(ObjectChangedEvent objectChange) { base.ObjectChangeEventHandler(objectChange); + this.UpdateProperties(); } @@ -157,20 +177,29 @@ protected override void ObjectChangeEventHandler(ObjectChangedEvent objectChange /// private void UpdateProperties() { - this.ModifiedOn = this.Thing.ModifiedOn; this.IsDeprecated = this.Thing.IsDeprecated; - if (this.Thing.ParameterType != null) - { - this.ParameterTypeShortName = this.Thing.ParameterType.ShortName; - this.ParameterTypeName = this.Thing.ParameterType.Name; - } this.ParameterType = this.Thing.ParameterType; - if (this.Thing.Scale != null) - { - this.ScaleShortName = this.Thing.Scale.ShortName; - this.ScaleName = this.Thing.Scale.Name; - } + if (this.Thing.ParameterType != null) + { + this.ParameterTypeName = this.Thing.ParameterType.Name; + this.ParameterTypeShortName = this.Thing.ParameterType.ShortName; + } + else + { + this.ParameterTypeName = string.Empty; + this.ParameterTypeShortName = string.Empty; + } this.Scale = this.Thing.Scale; + if (this.Thing.Scale != null) + { + this.ScaleName = this.Thing.Scale.Name; + this.ScaleShortName = this.Thing.Scale.ShortName; + } + else + { + this.ScaleName = string.Empty; + this.ScaleShortName = string.Empty; + } } } } diff --git a/CDP4Composition/CommonView/AutoGenRows/ContractChangeNoticeRowViewModel.cs b/CDP4Composition/CommonView/AutoGenRows/ContractChangeNoticeRowViewModel.cs index b1afe6cb1..482bc691a 100644 --- a/CDP4Composition/CommonView/AutoGenRows/ContractChangeNoticeRowViewModel.cs +++ b/CDP4Composition/CommonView/AutoGenRows/ContractChangeNoticeRowViewModel.cs @@ -1,25 +1,47 @@ -// ------------------------------------------------------------------------------------------------- +// -------------------------------------------------------------------------------------------------------------------- // -// Copyright (c) 2015-2018 RHEA System S.A. +// Copyright (c) 2015-2021 RHEA System S.A. +// +// Author: Sam Gerené, Alex Vorobiev, Naron Phou, Alexander van Delft, Nathanael Smiechowski, Ahmed Abulwafa Ahmed +// +// This file is part of CDP4-IME Community Edition. +// This is an auto-generated class. Any manual changes to this file will be overwritten! +// +// The CDP4-IME Community Edition is free software; you can redistribute it and/or +// modify it under the terms of the GNU Affero General Public +// License as published by the Free Software Foundation; either +// version 3 of the License, or (at your option) any later version. +// +// The CDP4-IME Community Edition is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +// Lesser General Public License for more details. +// +// You should have received a copy of the GNU Affero General Public License +// along with this program. If not, see . // // // This is an auto-generated class. Any manual changes on this file will be overwritten! // -// ------------------------------------------------------------------------------------------------- +// -------------------------------------------------------------------------------------------------------------------- namespace CDP4CommonView { using System; using System.Reactive.Linq; + using CDP4Common.CommonData; using CDP4Common.DiagramData; using CDP4Common.EngineeringModelData; using CDP4Common.ReportingData; using CDP4Common.SiteDirectoryData; + using CDP4Composition.Mvvm; + using CDP4Dal; using CDP4Dal.Events; - using CDP4Dal.Permission; + using CDP4Dal.Permission; + using ReactiveUI; /// @@ -27,12 +49,16 @@ namespace CDP4CommonView /// public partial class ContractChangeNoticeRowViewModel : ModellingAnnotationItemRowViewModel { - /// - /// Backing field for + /// Backing field for property /// private ChangeProposal changeProposal; + /// + /// Backing field for property + /// + private string changeProposalShortName; + /// /// Initializes a new instance of the class /// @@ -44,7 +70,6 @@ public ContractChangeNoticeRowViewModel(ContractChangeNotice contractChangeNotic this.UpdateProperties(); } - /// /// Gets or sets the ChangeProposal /// @@ -54,7 +79,15 @@ public ChangeProposal ChangeProposal set { this.RaiseAndSetIfChanged(ref this.changeProposal, value); } } - + /// + /// Gets or set the ShortName of + /// + public string ChangeProposalShortName + { + get { return this.changeProposalShortName; } + set { this.RaiseAndSetIfChanged(ref this.changeProposalShortName, value); } + } + /// /// The event-handler that is invoked by the subscription that listens for updates /// on the that is being represented by the view-model @@ -65,6 +98,7 @@ public ChangeProposal ChangeProposal protected override void ObjectChangeEventHandler(ObjectChangedEvent objectChange) { base.ObjectChangeEventHandler(objectChange); + this.UpdateProperties(); } @@ -73,8 +107,15 @@ protected override void ObjectChangeEventHandler(ObjectChangedEvent objectChange /// private void UpdateProperties() { - this.ModifiedOn = this.Thing.ModifiedOn; this.ChangeProposal = this.Thing.ChangeProposal; + if (this.Thing.ChangeProposal != null) + { + this.ChangeProposalShortName = this.Thing.ChangeProposal.ShortName; + } + else + { + this.ChangeProposalShortName = string.Empty; + } } } } diff --git a/CDP4Composition/CommonView/AutoGenRows/ContractDeviationRowViewModel.cs b/CDP4Composition/CommonView/AutoGenRows/ContractDeviationRowViewModel.cs index f647128a9..949ade474 100644 --- a/CDP4Composition/CommonView/AutoGenRows/ContractDeviationRowViewModel.cs +++ b/CDP4Composition/CommonView/AutoGenRows/ContractDeviationRowViewModel.cs @@ -1,25 +1,47 @@ -// ------------------------------------------------------------------------------------------------- +// -------------------------------------------------------------------------------------------------------------------- // -// Copyright (c) 2015-2018 RHEA System S.A. +// Copyright (c) 2015-2021 RHEA System S.A. +// +// Author: Sam Gerené, Alex Vorobiev, Naron Phou, Alexander van Delft, Nathanael Smiechowski, Ahmed Abulwafa Ahmed +// +// This file is part of CDP4-IME Community Edition. +// This is an auto-generated class. Any manual changes to this file will be overwritten! +// +// The CDP4-IME Community Edition is free software; you can redistribute it and/or +// modify it under the terms of the GNU Affero General Public +// License as published by the Free Software Foundation; either +// version 3 of the License, or (at your option) any later version. +// +// The CDP4-IME Community Edition is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +// Lesser General Public License for more details. +// +// You should have received a copy of the GNU Affero General Public License +// along with this program. If not, see . // // // This is an auto-generated class. Any manual changes on this file will be overwritten! // -// ------------------------------------------------------------------------------------------------- +// -------------------------------------------------------------------------------------------------------------------- namespace CDP4CommonView { using System; using System.Reactive.Linq; + using CDP4Common.CommonData; using CDP4Common.DiagramData; using CDP4Common.EngineeringModelData; using CDP4Common.ReportingData; using CDP4Common.SiteDirectoryData; + using CDP4Composition.Mvvm; + using CDP4Dal; using CDP4Dal.Events; - using CDP4Dal.Permission; + using CDP4Dal.Permission; + using ReactiveUI; /// @@ -27,7 +49,6 @@ namespace CDP4CommonView /// public abstract partial class ContractDeviationRowViewModel : ModellingAnnotationItemRowViewModel where T : ContractDeviation { - /// /// Initializes a new instance of the class /// @@ -36,9 +57,28 @@ public abstract partial class ContractDeviationRowViewModel : ModellingAnnota /// The that is the container of this protected ContractDeviationRowViewModel(T contractDeviation, ISession session, IViewModelBase containerViewModel) : base(contractDeviation, session, containerViewModel) { + this.UpdateProperties(); } + /// + /// The event-handler that is invoked by the subscription that listens for updates + /// on the that is being represented by the view-model + /// + /// + /// The payload of the event that is being handled + /// + protected override void ObjectChangeEventHandler(ObjectChangedEvent objectChange) + { + base.ObjectChangeEventHandler(objectChange); + + this.UpdateProperties(); + } - + /// + /// Updates the properties of this row + /// + private void UpdateProperties() + { + } } } diff --git a/CDP4Composition/CommonView/AutoGenRows/ConversionBasedUnitRowViewModel.cs b/CDP4Composition/CommonView/AutoGenRows/ConversionBasedUnitRowViewModel.cs index ff1880d4e..9b4abf2bc 100644 --- a/CDP4Composition/CommonView/AutoGenRows/ConversionBasedUnitRowViewModel.cs +++ b/CDP4Composition/CommonView/AutoGenRows/ConversionBasedUnitRowViewModel.cs @@ -1,25 +1,47 @@ -// ------------------------------------------------------------------------------------------------- +// -------------------------------------------------------------------------------------------------------------------- // -// Copyright (c) 2015-2018 RHEA System S.A. +// Copyright (c) 2015-2021 RHEA System S.A. +// +// Author: Sam Gerené, Alex Vorobiev, Naron Phou, Alexander van Delft, Nathanael Smiechowski, Ahmed Abulwafa Ahmed +// +// This file is part of CDP4-IME Community Edition. +// This is an auto-generated class. Any manual changes to this file will be overwritten! +// +// The CDP4-IME Community Edition is free software; you can redistribute it and/or +// modify it under the terms of the GNU Affero General Public +// License as published by the Free Software Foundation; either +// version 3 of the License, or (at your option) any later version. +// +// The CDP4-IME Community Edition is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +// Lesser General Public License for more details. +// +// You should have received a copy of the GNU Affero General Public License +// along with this program. If not, see . // // // This is an auto-generated class. Any manual changes on this file will be overwritten! // -// ------------------------------------------------------------------------------------------------- +// -------------------------------------------------------------------------------------------------------------------- namespace CDP4CommonView { using System; using System.Reactive.Linq; + using CDP4Common.CommonData; using CDP4Common.DiagramData; using CDP4Common.EngineeringModelData; using CDP4Common.ReportingData; using CDP4Common.SiteDirectoryData; + using CDP4Composition.Mvvm; + using CDP4Dal; using CDP4Dal.Events; - using CDP4Dal.Permission; + using CDP4Dal.Permission; + using ReactiveUI; /// @@ -27,26 +49,25 @@ namespace CDP4CommonView /// public abstract partial class ConversionBasedUnitRowViewModel : MeasurementUnitRowViewModel where T : ConversionBasedUnit { - /// - /// Backing field for + /// Backing field for property /// private string conversionFactor; /// - /// Backing field for + /// Backing field for property /// private MeasurementUnit referenceUnit; /// - /// Backing field for + /// Backing field for property /// - private string referenceUnitShortName; + private string referenceUnitName; /// - /// Backing field for + /// Backing field for property /// - private string referenceUnitName; + private string referenceUnitShortName; /// /// Initializes a new instance of the class @@ -59,7 +80,6 @@ protected ConversionBasedUnitRowViewModel(T conversionBasedUnit, ISession sessio this.UpdateProperties(); } - /// /// Gets or sets the ConversionFactor /// @@ -79,24 +99,23 @@ public MeasurementUnit ReferenceUnit } /// - /// Gets or set the ShortName of + /// Gets or set the Name of /// - public string ReferenceUnitShortName + public string ReferenceUnitName { - get { return this.referenceUnitShortName; } - set { this.RaiseAndSetIfChanged(ref this.referenceUnitShortName, value); } + get { return this.referenceUnitName; } + set { this.RaiseAndSetIfChanged(ref this.referenceUnitName, value); } } /// - /// Gets or set the Name of + /// Gets or set the ShortName of /// - public string ReferenceUnitName + public string ReferenceUnitShortName { - get { return this.referenceUnitName; } - set { this.RaiseAndSetIfChanged(ref this.referenceUnitName, value); } + get { return this.referenceUnitShortName; } + set { this.RaiseAndSetIfChanged(ref this.referenceUnitShortName, value); } } - /// /// The event-handler that is invoked by the subscription that listens for updates /// on the that is being represented by the view-model @@ -107,6 +126,7 @@ public string ReferenceUnitName protected override void ObjectChangeEventHandler(ObjectChangedEvent objectChange) { base.ObjectChangeEventHandler(objectChange); + this.UpdateProperties(); } @@ -115,14 +135,18 @@ protected override void ObjectChangeEventHandler(ObjectChangedEvent objectChange /// private void UpdateProperties() { - this.ModifiedOn = this.Thing.ModifiedOn; this.ConversionFactor = this.Thing.ConversionFactor; - if (this.Thing.ReferenceUnit != null) - { - this.ReferenceUnitShortName = this.Thing.ReferenceUnit.ShortName; - this.ReferenceUnitName = this.Thing.ReferenceUnit.Name; - } this.ReferenceUnit = this.Thing.ReferenceUnit; + if (this.Thing.ReferenceUnit != null) + { + this.ReferenceUnitName = this.Thing.ReferenceUnit.Name; + this.ReferenceUnitShortName = this.Thing.ReferenceUnit.ShortName; + } + else + { + this.ReferenceUnitName = string.Empty; + this.ReferenceUnitShortName = string.Empty; + } } } } diff --git a/CDP4Composition/CommonView/AutoGenRows/CyclicRatioScaleRowViewModel.cs b/CDP4Composition/CommonView/AutoGenRows/CyclicRatioScaleRowViewModel.cs index b4b91edd1..19f457843 100644 --- a/CDP4Composition/CommonView/AutoGenRows/CyclicRatioScaleRowViewModel.cs +++ b/CDP4Composition/CommonView/AutoGenRows/CyclicRatioScaleRowViewModel.cs @@ -1,25 +1,47 @@ -// ------------------------------------------------------------------------------------------------- +// -------------------------------------------------------------------------------------------------------------------- // -// Copyright (c) 2015-2018 RHEA System S.A. +// Copyright (c) 2015-2021 RHEA System S.A. +// +// Author: Sam Gerené, Alex Vorobiev, Naron Phou, Alexander van Delft, Nathanael Smiechowski, Ahmed Abulwafa Ahmed +// +// This file is part of CDP4-IME Community Edition. +// This is an auto-generated class. Any manual changes to this file will be overwritten! +// +// The CDP4-IME Community Edition is free software; you can redistribute it and/or +// modify it under the terms of the GNU Affero General Public +// License as published by the Free Software Foundation; either +// version 3 of the License, or (at your option) any later version. +// +// The CDP4-IME Community Edition is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +// Lesser General Public License for more details. +// +// You should have received a copy of the GNU Affero General Public License +// along with this program. If not, see . // // // This is an auto-generated class. Any manual changes on this file will be overwritten! // -// ------------------------------------------------------------------------------------------------- +// -------------------------------------------------------------------------------------------------------------------- namespace CDP4CommonView { using System; using System.Reactive.Linq; + using CDP4Common.CommonData; using CDP4Common.DiagramData; using CDP4Common.EngineeringModelData; using CDP4Common.ReportingData; using CDP4Common.SiteDirectoryData; + using CDP4Composition.Mvvm; + using CDP4Dal; using CDP4Dal.Events; - using CDP4Dal.Permission; + using CDP4Dal.Permission; + using ReactiveUI; /// @@ -27,9 +49,8 @@ namespace CDP4CommonView /// public partial class CyclicRatioScaleRowViewModel : RatioScaleRowViewModel { - /// - /// Backing field for + /// Backing field for property /// private string modulus; @@ -44,7 +65,6 @@ public CyclicRatioScaleRowViewModel(CyclicRatioScale cyclicRatioScale, ISession this.UpdateProperties(); } - /// /// Gets or sets the Modulus /// @@ -54,7 +74,6 @@ public string Modulus set { this.RaiseAndSetIfChanged(ref this.modulus, value); } } - /// /// The event-handler that is invoked by the subscription that listens for updates /// on the that is being represented by the view-model @@ -65,6 +84,7 @@ public string Modulus protected override void ObjectChangeEventHandler(ObjectChangedEvent objectChange) { base.ObjectChangeEventHandler(objectChange); + this.UpdateProperties(); } @@ -73,7 +93,6 @@ protected override void ObjectChangeEventHandler(ObjectChangedEvent objectChange /// private void UpdateProperties() { - this.ModifiedOn = this.Thing.ModifiedOn; this.Modulus = ((CyclicRatioScale)this.Thing).Modulus; } } diff --git a/CDP4Composition/CommonView/AutoGenRows/DateParameterTypeRowViewModel.cs b/CDP4Composition/CommonView/AutoGenRows/DateParameterTypeRowViewModel.cs index 5770fbb1f..62b9c01ee 100644 --- a/CDP4Composition/CommonView/AutoGenRows/DateParameterTypeRowViewModel.cs +++ b/CDP4Composition/CommonView/AutoGenRows/DateParameterTypeRowViewModel.cs @@ -1,25 +1,47 @@ -// ------------------------------------------------------------------------------------------------- +// -------------------------------------------------------------------------------------------------------------------- // -// Copyright (c) 2015-2018 RHEA System S.A. +// Copyright (c) 2015-2021 RHEA System S.A. +// +// Author: Sam Gerené, Alex Vorobiev, Naron Phou, Alexander van Delft, Nathanael Smiechowski, Ahmed Abulwafa Ahmed +// +// This file is part of CDP4-IME Community Edition. +// This is an auto-generated class. Any manual changes to this file will be overwritten! +// +// The CDP4-IME Community Edition is free software; you can redistribute it and/or +// modify it under the terms of the GNU Affero General Public +// License as published by the Free Software Foundation; either +// version 3 of the License, or (at your option) any later version. +// +// The CDP4-IME Community Edition is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +// Lesser General Public License for more details. +// +// You should have received a copy of the GNU Affero General Public License +// along with this program. If not, see . // // // This is an auto-generated class. Any manual changes on this file will be overwritten! // -// ------------------------------------------------------------------------------------------------- +// -------------------------------------------------------------------------------------------------------------------- namespace CDP4CommonView { using System; using System.Reactive.Linq; + using CDP4Common.CommonData; using CDP4Common.DiagramData; using CDP4Common.EngineeringModelData; using CDP4Common.ReportingData; using CDP4Common.SiteDirectoryData; + using CDP4Composition.Mvvm; + using CDP4Dal; using CDP4Dal.Events; - using CDP4Dal.Permission; + using CDP4Dal.Permission; + using ReactiveUI; /// @@ -27,7 +49,6 @@ namespace CDP4CommonView /// public partial class DateParameterTypeRowViewModel : ScalarParameterTypeRowViewModel { - /// /// Initializes a new instance of the class /// @@ -36,9 +57,28 @@ public partial class DateParameterTypeRowViewModel : ScalarParameterTypeRowViewM /// The that is the container of this public DateParameterTypeRowViewModel(DateParameterType dateParameterType, ISession session, IViewModelBase containerViewModel) : base(dateParameterType, session, containerViewModel) { + this.UpdateProperties(); } + /// + /// The event-handler that is invoked by the subscription that listens for updates + /// on the that is being represented by the view-model + /// + /// + /// The payload of the event that is being handled + /// + protected override void ObjectChangeEventHandler(ObjectChangedEvent objectChange) + { + base.ObjectChangeEventHandler(objectChange); + + this.UpdateProperties(); + } - + /// + /// Updates the properties of this row + /// + private void UpdateProperties() + { + } } } diff --git a/CDP4Composition/CommonView/AutoGenRows/DateTimeParameterTypeRowViewModel.cs b/CDP4Composition/CommonView/AutoGenRows/DateTimeParameterTypeRowViewModel.cs index 7f8e4e029..63c4d8fd9 100644 --- a/CDP4Composition/CommonView/AutoGenRows/DateTimeParameterTypeRowViewModel.cs +++ b/CDP4Composition/CommonView/AutoGenRows/DateTimeParameterTypeRowViewModel.cs @@ -1,25 +1,47 @@ -// ------------------------------------------------------------------------------------------------- +// -------------------------------------------------------------------------------------------------------------------- // -// Copyright (c) 2015-2018 RHEA System S.A. +// Copyright (c) 2015-2021 RHEA System S.A. +// +// Author: Sam Gerené, Alex Vorobiev, Naron Phou, Alexander van Delft, Nathanael Smiechowski, Ahmed Abulwafa Ahmed +// +// This file is part of CDP4-IME Community Edition. +// This is an auto-generated class. Any manual changes to this file will be overwritten! +// +// The CDP4-IME Community Edition is free software; you can redistribute it and/or +// modify it under the terms of the GNU Affero General Public +// License as published by the Free Software Foundation; either +// version 3 of the License, or (at your option) any later version. +// +// The CDP4-IME Community Edition is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +// Lesser General Public License for more details. +// +// You should have received a copy of the GNU Affero General Public License +// along with this program. If not, see . // // // This is an auto-generated class. Any manual changes on this file will be overwritten! // -// ------------------------------------------------------------------------------------------------- +// -------------------------------------------------------------------------------------------------------------------- namespace CDP4CommonView { using System; using System.Reactive.Linq; + using CDP4Common.CommonData; using CDP4Common.DiagramData; using CDP4Common.EngineeringModelData; using CDP4Common.ReportingData; using CDP4Common.SiteDirectoryData; + using CDP4Composition.Mvvm; + using CDP4Dal; using CDP4Dal.Events; - using CDP4Dal.Permission; + using CDP4Dal.Permission; + using ReactiveUI; /// @@ -27,7 +49,6 @@ namespace CDP4CommonView /// public partial class DateTimeParameterTypeRowViewModel : ScalarParameterTypeRowViewModel { - /// /// Initializes a new instance of the class /// @@ -36,9 +57,28 @@ public partial class DateTimeParameterTypeRowViewModel : ScalarParameterTypeRowV /// The that is the container of this public DateTimeParameterTypeRowViewModel(DateTimeParameterType dateTimeParameterType, ISession session, IViewModelBase containerViewModel) : base(dateTimeParameterType, session, containerViewModel) { + this.UpdateProperties(); } + /// + /// The event-handler that is invoked by the subscription that listens for updates + /// on the that is being represented by the view-model + /// + /// + /// The payload of the event that is being handled + /// + protected override void ObjectChangeEventHandler(ObjectChangedEvent objectChange) + { + base.ObjectChangeEventHandler(objectChange); + + this.UpdateProperties(); + } - + /// + /// Updates the properties of this row + /// + private void UpdateProperties() + { + } } } diff --git a/CDP4Composition/CommonView/AutoGenRows/DecompositionRuleRowViewModel.cs b/CDP4Composition/CommonView/AutoGenRows/DecompositionRuleRowViewModel.cs index 86db74e3a..4d5dc5c0e 100644 --- a/CDP4Composition/CommonView/AutoGenRows/DecompositionRuleRowViewModel.cs +++ b/CDP4Composition/CommonView/AutoGenRows/DecompositionRuleRowViewModel.cs @@ -1,25 +1,47 @@ -// ------------------------------------------------------------------------------------------------- +// -------------------------------------------------------------------------------------------------------------------- // -// Copyright (c) 2015-2018 RHEA System S.A. +// Copyright (c) 2015-2021 RHEA System S.A. +// +// Author: Sam Gerené, Alex Vorobiev, Naron Phou, Alexander van Delft, Nathanael Smiechowski, Ahmed Abulwafa Ahmed +// +// This file is part of CDP4-IME Community Edition. +// This is an auto-generated class. Any manual changes to this file will be overwritten! +// +// The CDP4-IME Community Edition is free software; you can redistribute it and/or +// modify it under the terms of the GNU Affero General Public +// License as published by the Free Software Foundation; either +// version 3 of the License, or (at your option) any later version. +// +// The CDP4-IME Community Edition is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +// Lesser General Public License for more details. +// +// You should have received a copy of the GNU Affero General Public License +// along with this program. If not, see . // // // This is an auto-generated class. Any manual changes on this file will be overwritten! // -// ------------------------------------------------------------------------------------------------- +// -------------------------------------------------------------------------------------------------------------------- namespace CDP4CommonView { using System; using System.Reactive.Linq; + using CDP4Common.CommonData; using CDP4Common.DiagramData; using CDP4Common.EngineeringModelData; using CDP4Common.ReportingData; using CDP4Common.SiteDirectoryData; + using CDP4Composition.Mvvm; + using CDP4Dal; using CDP4Dal.Events; - using CDP4Dal.Permission; + using CDP4Dal.Permission; + using ReactiveUI; /// @@ -27,31 +49,30 @@ namespace CDP4CommonView /// public partial class DecompositionRuleRowViewModel : RuleRowViewModel { - /// - /// Backing field for + /// Backing field for property /// - private int minContained; + private Category containingCategory; /// - /// Backing field for + /// Backing field for property /// - private int maxContained; + private string containingCategoryName; /// - /// Backing field for + /// Backing field for property /// - private Category containingCategory; + private string containingCategoryShortName; /// - /// Backing field for + /// Backing field for property /// - private string containingCategoryShortName; + private int maxContained; /// - /// Backing field for + /// Backing field for property /// - private string containingCategoryName; + private int minContained; /// /// Initializes a new instance of the class @@ -64,53 +85,51 @@ public DecompositionRuleRowViewModel(DecompositionRule decompositionRule, ISessi this.UpdateProperties(); } - /// - /// Gets or sets the MinContained + /// Gets or sets the ContainingCategory /// - public int MinContained + public Category ContainingCategory { - get { return this.minContained; } - set { this.RaiseAndSetIfChanged(ref this.minContained, value); } + get { return this.containingCategory; } + set { this.RaiseAndSetIfChanged(ref this.containingCategory, value); } } /// - /// Gets or sets the MaxContained + /// Gets or set the Name of /// - public int MaxContained + public string ContainingCategoryName { - get { return this.maxContained; } - set { this.RaiseAndSetIfChanged(ref this.maxContained, value); } + get { return this.containingCategoryName; } + set { this.RaiseAndSetIfChanged(ref this.containingCategoryName, value); } } /// - /// Gets or sets the ContainingCategory + /// Gets or set the ShortName of /// - public Category ContainingCategory + public string ContainingCategoryShortName { - get { return this.containingCategory; } - set { this.RaiseAndSetIfChanged(ref this.containingCategory, value); } + get { return this.containingCategoryShortName; } + set { this.RaiseAndSetIfChanged(ref this.containingCategoryShortName, value); } } /// - /// Gets or set the ShortName of + /// Gets or sets the MaxContained /// - public string ContainingCategoryShortName + public int MaxContained { - get { return this.containingCategoryShortName; } - set { this.RaiseAndSetIfChanged(ref this.containingCategoryShortName, value); } + get { return this.maxContained; } + set { this.RaiseAndSetIfChanged(ref this.maxContained, value); } } /// - /// Gets or set the Name of + /// Gets or sets the MinContained /// - public string ContainingCategoryName + public int MinContained { - get { return this.containingCategoryName; } - set { this.RaiseAndSetIfChanged(ref this.containingCategoryName, value); } + get { return this.minContained; } + set { this.RaiseAndSetIfChanged(ref this.minContained, value); } } - /// /// The event-handler that is invoked by the subscription that listens for updates /// on the that is being represented by the view-model @@ -121,6 +140,7 @@ public string ContainingCategoryName protected override void ObjectChangeEventHandler(ObjectChangedEvent objectChange) { base.ObjectChangeEventHandler(objectChange); + this.UpdateProperties(); } @@ -129,18 +149,22 @@ protected override void ObjectChangeEventHandler(ObjectChangedEvent objectChange /// private void UpdateProperties() { - this.ModifiedOn = this.Thing.ModifiedOn; - this.MinContained = this.Thing.MinContained; - if(this.Thing.MaxContained.HasValue) + this.ContainingCategory = this.Thing.ContainingCategory; + if (this.Thing.ContainingCategory != null) + { + this.ContainingCategoryName = this.Thing.ContainingCategory.Name; + this.ContainingCategoryShortName = this.Thing.ContainingCategory.ShortName; + } + else + { + this.ContainingCategoryName = string.Empty; + this.ContainingCategoryShortName = string.Empty; + } + if (this.Thing.MaxContained.HasValue) { this.MaxContained = this.Thing.MaxContained.Value; } - if (this.Thing.ContainingCategory != null) - { - this.ContainingCategoryShortName = this.Thing.ContainingCategory.ShortName; - this.ContainingCategoryName = this.Thing.ContainingCategory.Name; - } - this.ContainingCategory = this.Thing.ContainingCategory; + this.MinContained = this.Thing.MinContained; } } } diff --git a/CDP4Composition/CommonView/AutoGenRows/DefinedThingRowViewModel.cs b/CDP4Composition/CommonView/AutoGenRows/DefinedThingRowViewModel.cs index 01d1e06d7..2e804eea3 100644 --- a/CDP4Composition/CommonView/AutoGenRows/DefinedThingRowViewModel.cs +++ b/CDP4Composition/CommonView/AutoGenRows/DefinedThingRowViewModel.cs @@ -1,25 +1,47 @@ -// ------------------------------------------------------------------------------------------------- +// -------------------------------------------------------------------------------------------------------------------- // -// Copyright (c) 2015-2018 RHEA System S.A. +// Copyright (c) 2015-2021 RHEA System S.A. +// +// Author: Sam Gerené, Alex Vorobiev, Naron Phou, Alexander van Delft, Nathanael Smiechowski, Ahmed Abulwafa Ahmed +// +// This file is part of CDP4-IME Community Edition. +// This is an auto-generated class. Any manual changes to this file will be overwritten! +// +// The CDP4-IME Community Edition is free software; you can redistribute it and/or +// modify it under the terms of the GNU Affero General Public +// License as published by the Free Software Foundation; either +// version 3 of the License, or (at your option) any later version. +// +// The CDP4-IME Community Edition is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +// Lesser General Public License for more details. +// +// You should have received a copy of the GNU Affero General Public License +// along with this program. If not, see . // // // This is an auto-generated class. Any manual changes on this file will be overwritten! // -// ------------------------------------------------------------------------------------------------- +// -------------------------------------------------------------------------------------------------------------------- namespace CDP4CommonView { using System; using System.Reactive.Linq; + using CDP4Common.CommonData; using CDP4Common.DiagramData; using CDP4Common.EngineeringModelData; using CDP4Common.ReportingData; using CDP4Common.SiteDirectoryData; + using CDP4Composition.Mvvm; + using CDP4Dal; using CDP4Dal.Events; - using CDP4Dal.Permission; + using CDP4Dal.Permission; + using ReactiveUI; /// @@ -27,14 +49,13 @@ namespace CDP4CommonView /// public abstract partial class DefinedThingRowViewModel : RowViewModelBase where T : DefinedThing { - /// - /// Backing field for + /// Backing field for property /// private string name; /// - /// Backing field for + /// Backing field for property /// private string shortName; @@ -49,7 +70,6 @@ protected DefinedThingRowViewModel(T definedThing, ISession session, IViewModelB this.UpdateProperties(); } - /// /// Gets or sets the Name /// @@ -68,7 +88,6 @@ public string ShortName set { this.RaiseAndSetIfChanged(ref this.shortName, value); } } - /// /// The event-handler that is invoked by the subscription that listens for updates /// on the that is being represented by the view-model @@ -79,6 +98,7 @@ public string ShortName protected override void ObjectChangeEventHandler(ObjectChangedEvent objectChange) { base.ObjectChangeEventHandler(objectChange); + this.UpdateProperties(); } @@ -87,7 +107,6 @@ protected override void ObjectChangeEventHandler(ObjectChangedEvent objectChange /// private void UpdateProperties() { - this.ModifiedOn = this.Thing.ModifiedOn; this.Name = this.Thing.Name; this.ShortName = this.Thing.ShortName; } diff --git a/CDP4Composition/CommonView/AutoGenRows/DefinitionRowViewModel.cs b/CDP4Composition/CommonView/AutoGenRows/DefinitionRowViewModel.cs index 19f3e87d0..88947103d 100644 --- a/CDP4Composition/CommonView/AutoGenRows/DefinitionRowViewModel.cs +++ b/CDP4Composition/CommonView/AutoGenRows/DefinitionRowViewModel.cs @@ -1,25 +1,47 @@ -// ------------------------------------------------------------------------------------------------- +// -------------------------------------------------------------------------------------------------------------------- // -// Copyright (c) 2015-2018 RHEA System S.A. +// Copyright (c) 2015-2021 RHEA System S.A. +// +// Author: Sam Gerené, Alex Vorobiev, Naron Phou, Alexander van Delft, Nathanael Smiechowski, Ahmed Abulwafa Ahmed +// +// This file is part of CDP4-IME Community Edition. +// This is an auto-generated class. Any manual changes to this file will be overwritten! +// +// The CDP4-IME Community Edition is free software; you can redistribute it and/or +// modify it under the terms of the GNU Affero General Public +// License as published by the Free Software Foundation; either +// version 3 of the License, or (at your option) any later version. +// +// The CDP4-IME Community Edition is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +// Lesser General Public License for more details. +// +// You should have received a copy of the GNU Affero General Public License +// along with this program. If not, see . // // // This is an auto-generated class. Any manual changes on this file will be overwritten! // -// ------------------------------------------------------------------------------------------------- +// -------------------------------------------------------------------------------------------------------------------- namespace CDP4CommonView { using System; using System.Reactive.Linq; + using CDP4Common.CommonData; using CDP4Common.DiagramData; using CDP4Common.EngineeringModelData; using CDP4Common.ReportingData; using CDP4Common.SiteDirectoryData; + using CDP4Composition.Mvvm; + using CDP4Dal; using CDP4Dal.Events; - using CDP4Dal.Permission; + using CDP4Dal.Permission; + using ReactiveUI; /// @@ -27,16 +49,15 @@ namespace CDP4CommonView /// public partial class DefinitionRowViewModel : RowViewModelBase { - /// - /// Backing field for + /// Backing field for property /// - private string languageCode; + private string content; /// - /// Backing field for + /// Backing field for property /// - private string content; + private string languageCode; /// /// Initializes a new instance of the class @@ -49,26 +70,24 @@ public DefinitionRowViewModel(Definition definition, ISession session, IViewMode this.UpdateProperties(); } - /// - /// Gets or sets the LanguageCode + /// Gets or sets the Content /// - public string LanguageCode + public string Content { - get { return this.languageCode; } - set { this.RaiseAndSetIfChanged(ref this.languageCode, value); } + get { return this.content; } + set { this.RaiseAndSetIfChanged(ref this.content, value); } } /// - /// Gets or sets the Content + /// Gets or sets the LanguageCode /// - public string Content + public string LanguageCode { - get { return this.content; } - set { this.RaiseAndSetIfChanged(ref this.content, value); } + get { return this.languageCode; } + set { this.RaiseAndSetIfChanged(ref this.languageCode, value); } } - /// /// The event-handler that is invoked by the subscription that listens for updates /// on the that is being represented by the view-model @@ -79,6 +98,7 @@ public string Content protected override void ObjectChangeEventHandler(ObjectChangedEvent objectChange) { base.ObjectChangeEventHandler(objectChange); + this.UpdateProperties(); } @@ -87,9 +107,8 @@ protected override void ObjectChangeEventHandler(ObjectChangedEvent objectChange /// private void UpdateProperties() { - this.ModifiedOn = this.Thing.ModifiedOn; - this.LanguageCode = this.Thing.LanguageCode; this.Content = this.Thing.Content; + this.LanguageCode = this.Thing.LanguageCode; } } } diff --git a/CDP4Composition/CommonView/AutoGenRows/DerivedQuantityKindRowViewModel.cs b/CDP4Composition/CommonView/AutoGenRows/DerivedQuantityKindRowViewModel.cs index 019ffede9..f956084c8 100644 --- a/CDP4Composition/CommonView/AutoGenRows/DerivedQuantityKindRowViewModel.cs +++ b/CDP4Composition/CommonView/AutoGenRows/DerivedQuantityKindRowViewModel.cs @@ -1,25 +1,47 @@ -// ------------------------------------------------------------------------------------------------- +// -------------------------------------------------------------------------------------------------------------------- // -// Copyright (c) 2015-2018 RHEA System S.A. +// Copyright (c) 2015-2021 RHEA System S.A. +// +// Author: Sam Gerené, Alex Vorobiev, Naron Phou, Alexander van Delft, Nathanael Smiechowski, Ahmed Abulwafa Ahmed +// +// This file is part of CDP4-IME Community Edition. +// This is an auto-generated class. Any manual changes to this file will be overwritten! +// +// The CDP4-IME Community Edition is free software; you can redistribute it and/or +// modify it under the terms of the GNU Affero General Public +// License as published by the Free Software Foundation; either +// version 3 of the License, or (at your option) any later version. +// +// The CDP4-IME Community Edition is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +// Lesser General Public License for more details. +// +// You should have received a copy of the GNU Affero General Public License +// along with this program. If not, see . // // // This is an auto-generated class. Any manual changes on this file will be overwritten! // -// ------------------------------------------------------------------------------------------------- +// -------------------------------------------------------------------------------------------------------------------- namespace CDP4CommonView { using System; using System.Reactive.Linq; + using CDP4Common.CommonData; using CDP4Common.DiagramData; using CDP4Common.EngineeringModelData; using CDP4Common.ReportingData; using CDP4Common.SiteDirectoryData; + using CDP4Composition.Mvvm; + using CDP4Dal; using CDP4Dal.Events; - using CDP4Dal.Permission; + using CDP4Dal.Permission; + using ReactiveUI; /// @@ -27,7 +49,6 @@ namespace CDP4CommonView /// public partial class DerivedQuantityKindRowViewModel : QuantityKindRowViewModel { - /// /// Initializes a new instance of the class /// @@ -36,9 +57,28 @@ public partial class DerivedQuantityKindRowViewModel : QuantityKindRowViewModel< /// The that is the container of this public DerivedQuantityKindRowViewModel(DerivedQuantityKind derivedQuantityKind, ISession session, IViewModelBase containerViewModel) : base(derivedQuantityKind, session, containerViewModel) { + this.UpdateProperties(); } + /// + /// The event-handler that is invoked by the subscription that listens for updates + /// on the that is being represented by the view-model + /// + /// + /// The payload of the event that is being handled + /// + protected override void ObjectChangeEventHandler(ObjectChangedEvent objectChange) + { + base.ObjectChangeEventHandler(objectChange); + + this.UpdateProperties(); + } - + /// + /// Updates the properties of this row + /// + private void UpdateProperties() + { + } } } diff --git a/CDP4Composition/CommonView/AutoGenRows/DerivedUnitRowViewModel.cs b/CDP4Composition/CommonView/AutoGenRows/DerivedUnitRowViewModel.cs index 4c57496e8..833ab690b 100644 --- a/CDP4Composition/CommonView/AutoGenRows/DerivedUnitRowViewModel.cs +++ b/CDP4Composition/CommonView/AutoGenRows/DerivedUnitRowViewModel.cs @@ -1,25 +1,47 @@ -// ------------------------------------------------------------------------------------------------- +// -------------------------------------------------------------------------------------------------------------------- // -// Copyright (c) 2015-2018 RHEA System S.A. +// Copyright (c) 2015-2021 RHEA System S.A. +// +// Author: Sam Gerené, Alex Vorobiev, Naron Phou, Alexander van Delft, Nathanael Smiechowski, Ahmed Abulwafa Ahmed +// +// This file is part of CDP4-IME Community Edition. +// This is an auto-generated class. Any manual changes to this file will be overwritten! +// +// The CDP4-IME Community Edition is free software; you can redistribute it and/or +// modify it under the terms of the GNU Affero General Public +// License as published by the Free Software Foundation; either +// version 3 of the License, or (at your option) any later version. +// +// The CDP4-IME Community Edition is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +// Lesser General Public License for more details. +// +// You should have received a copy of the GNU Affero General Public License +// along with this program. If not, see . // // // This is an auto-generated class. Any manual changes on this file will be overwritten! // -// ------------------------------------------------------------------------------------------------- +// -------------------------------------------------------------------------------------------------------------------- namespace CDP4CommonView { using System; using System.Reactive.Linq; + using CDP4Common.CommonData; using CDP4Common.DiagramData; using CDP4Common.EngineeringModelData; using CDP4Common.ReportingData; using CDP4Common.SiteDirectoryData; + using CDP4Composition.Mvvm; + using CDP4Dal; using CDP4Dal.Events; - using CDP4Dal.Permission; + using CDP4Dal.Permission; + using ReactiveUI; /// @@ -27,7 +49,6 @@ namespace CDP4CommonView /// public partial class DerivedUnitRowViewModel : MeasurementUnitRowViewModel { - /// /// Initializes a new instance of the class /// @@ -36,9 +57,28 @@ public partial class DerivedUnitRowViewModel : MeasurementUnitRowViewModelThe that is the container of this public DerivedUnitRowViewModel(DerivedUnit derivedUnit, ISession session, IViewModelBase containerViewModel) : base(derivedUnit, session, containerViewModel) { + this.UpdateProperties(); } + /// + /// The event-handler that is invoked by the subscription that listens for updates + /// on the that is being represented by the view-model + /// + /// + /// The payload of the event that is being handled + /// + protected override void ObjectChangeEventHandler(ObjectChangedEvent objectChange) + { + base.ObjectChangeEventHandler(objectChange); + + this.UpdateProperties(); + } - + /// + /// Updates the properties of this row + /// + private void UpdateProperties() + { + } } } diff --git a/CDP4Composition/CommonView/AutoGenRows/DiagramCanvasRowViewModel.cs b/CDP4Composition/CommonView/AutoGenRows/DiagramCanvasRowViewModel.cs index 515fa4c97..4803f95b1 100644 --- a/CDP4Composition/CommonView/AutoGenRows/DiagramCanvasRowViewModel.cs +++ b/CDP4Composition/CommonView/AutoGenRows/DiagramCanvasRowViewModel.cs @@ -1,25 +1,47 @@ -// ------------------------------------------------------------------------------------------------- +// -------------------------------------------------------------------------------------------------------------------- // -// Copyright (c) 2015-2018 RHEA System S.A. +// Copyright (c) 2015-2021 RHEA System S.A. +// +// Author: Sam Gerené, Alex Vorobiev, Naron Phou, Alexander van Delft, Nathanael Smiechowski, Ahmed Abulwafa Ahmed +// +// This file is part of CDP4-IME Community Edition. +// This is an auto-generated class. Any manual changes to this file will be overwritten! +// +// The CDP4-IME Community Edition is free software; you can redistribute it and/or +// modify it under the terms of the GNU Affero General Public +// License as published by the Free Software Foundation; either +// version 3 of the License, or (at your option) any later version. +// +// The CDP4-IME Community Edition is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +// Lesser General Public License for more details. +// +// You should have received a copy of the GNU Affero General Public License +// along with this program. If not, see . // // // This is an auto-generated class. Any manual changes on this file will be overwritten! // -// ------------------------------------------------------------------------------------------------- +// -------------------------------------------------------------------------------------------------------------------- namespace CDP4CommonView { using System; using System.Reactive.Linq; + using CDP4Common.CommonData; using CDP4Common.DiagramData; using CDP4Common.EngineeringModelData; using CDP4Common.ReportingData; using CDP4Common.SiteDirectoryData; + using CDP4Composition.Mvvm; + using CDP4Dal; using CDP4Dal.Events; - using CDP4Dal.Permission; + using CDP4Dal.Permission; + using ReactiveUI; /// @@ -27,9 +49,8 @@ namespace CDP4CommonView /// public partial class DiagramCanvasRowViewModel : DiagramElementContainerRowViewModel { - /// - /// Backing field for + /// Backing field for property /// private DateTime createdOn; @@ -44,7 +65,6 @@ public DiagramCanvasRowViewModel(DiagramCanvas diagramCanvas, ISession session, this.UpdateProperties(); } - /// /// Gets or sets the CreatedOn /// @@ -54,7 +74,6 @@ public DateTime CreatedOn set { this.RaiseAndSetIfChanged(ref this.createdOn, value); } } - /// /// The event-handler that is invoked by the subscription that listens for updates /// on the that is being represented by the view-model @@ -65,6 +84,7 @@ public DateTime CreatedOn protected override void ObjectChangeEventHandler(ObjectChangedEvent objectChange) { base.ObjectChangeEventHandler(objectChange); + this.UpdateProperties(); } @@ -73,7 +93,6 @@ protected override void ObjectChangeEventHandler(ObjectChangedEvent objectChange /// private void UpdateProperties() { - this.ModifiedOn = this.Thing.ModifiedOn; this.CreatedOn = this.Thing.CreatedOn; } } diff --git a/CDP4Composition/CommonView/AutoGenRows/DiagramEdgeRowViewModel.cs b/CDP4Composition/CommonView/AutoGenRows/DiagramEdgeRowViewModel.cs index 81771c7cd..7ced85bf1 100644 --- a/CDP4Composition/CommonView/AutoGenRows/DiagramEdgeRowViewModel.cs +++ b/CDP4Composition/CommonView/AutoGenRows/DiagramEdgeRowViewModel.cs @@ -1,25 +1,47 @@ -// ------------------------------------------------------------------------------------------------- +// -------------------------------------------------------------------------------------------------------------------- // -// Copyright (c) 2015-2018 RHEA System S.A. +// Copyright (c) 2015-2021 RHEA System S.A. +// +// Author: Sam Gerené, Alex Vorobiev, Naron Phou, Alexander van Delft, Nathanael Smiechowski, Ahmed Abulwafa Ahmed +// +// This file is part of CDP4-IME Community Edition. +// This is an auto-generated class. Any manual changes to this file will be overwritten! +// +// The CDP4-IME Community Edition is free software; you can redistribute it and/or +// modify it under the terms of the GNU Affero General Public +// License as published by the Free Software Foundation; either +// version 3 of the License, or (at your option) any later version. +// +// The CDP4-IME Community Edition is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +// Lesser General Public License for more details. +// +// You should have received a copy of the GNU Affero General Public License +// along with this program. If not, see . // // // This is an auto-generated class. Any manual changes on this file will be overwritten! // -// ------------------------------------------------------------------------------------------------- +// -------------------------------------------------------------------------------------------------------------------- namespace CDP4CommonView { using System; using System.Reactive.Linq; + using CDP4Common.CommonData; using CDP4Common.DiagramData; using CDP4Common.EngineeringModelData; using CDP4Common.ReportingData; using CDP4Common.SiteDirectoryData; + using CDP4Composition.Mvvm; + using CDP4Dal; using CDP4Dal.Events; - using CDP4Dal.Permission; + using CDP4Dal.Permission; + using ReactiveUI; /// @@ -27,17 +49,26 @@ namespace CDP4CommonView /// public partial class DiagramEdgeRowViewModel : DiagramElementThingRowViewModel { - /// - /// Backing field for + /// Backing field for property /// private DiagramElementThing source; /// - /// Backing field for + /// Backing field for property + /// + private string sourceName; + + /// + /// Backing field for property /// private DiagramElementThing target; + /// + /// Backing field for property + /// + private string targetName; + /// /// Initializes a new instance of the class /// @@ -49,7 +80,6 @@ public DiagramEdgeRowViewModel(DiagramEdge diagramEdge, ISession session, IViewM this.UpdateProperties(); } - /// /// Gets or sets the Source /// @@ -59,6 +89,15 @@ public DiagramElementThing Source set { this.RaiseAndSetIfChanged(ref this.source, value); } } + /// + /// Gets or set the Name of + /// + public string SourceName + { + get { return this.sourceName; } + set { this.RaiseAndSetIfChanged(ref this.sourceName, value); } + } + /// /// Gets or sets the Target /// @@ -68,7 +107,15 @@ public DiagramElementThing Target set { this.RaiseAndSetIfChanged(ref this.target, value); } } - + /// + /// Gets or set the Name of + /// + public string TargetName + { + get { return this.targetName; } + set { this.RaiseAndSetIfChanged(ref this.targetName, value); } + } + /// /// The event-handler that is invoked by the subscription that listens for updates /// on the that is being represented by the view-model @@ -79,6 +126,7 @@ public DiagramElementThing Target protected override void ObjectChangeEventHandler(ObjectChangedEvent objectChange) { base.ObjectChangeEventHandler(objectChange); + this.UpdateProperties(); } @@ -87,9 +135,24 @@ protected override void ObjectChangeEventHandler(ObjectChangedEvent objectChange /// private void UpdateProperties() { - this.ModifiedOn = this.Thing.ModifiedOn; this.Source = this.Thing.Source; + if (this.Thing.Source != null) + { + this.SourceName = this.Thing.Source.Name; + } + else + { + this.SourceName = string.Empty; + } this.Target = this.Thing.Target; + if (this.Thing.Target != null) + { + this.TargetName = this.Thing.Target.Name; + } + else + { + this.TargetName = string.Empty; + } } } } diff --git a/CDP4Composition/CommonView/AutoGenRows/DiagramElementContainerRowViewModel.cs b/CDP4Composition/CommonView/AutoGenRows/DiagramElementContainerRowViewModel.cs index 78fa8f85c..46fa584ea 100644 --- a/CDP4Composition/CommonView/AutoGenRows/DiagramElementContainerRowViewModel.cs +++ b/CDP4Composition/CommonView/AutoGenRows/DiagramElementContainerRowViewModel.cs @@ -1,25 +1,47 @@ -// ------------------------------------------------------------------------------------------------- +// -------------------------------------------------------------------------------------------------------------------- // -// Copyright (c) 2015-2018 RHEA System S.A. +// Copyright (c) 2015-2021 RHEA System S.A. +// +// Author: Sam Gerené, Alex Vorobiev, Naron Phou, Alexander van Delft, Nathanael Smiechowski, Ahmed Abulwafa Ahmed +// +// This file is part of CDP4-IME Community Edition. +// This is an auto-generated class. Any manual changes to this file will be overwritten! +// +// The CDP4-IME Community Edition is free software; you can redistribute it and/or +// modify it under the terms of the GNU Affero General Public +// License as published by the Free Software Foundation; either +// version 3 of the License, or (at your option) any later version. +// +// The CDP4-IME Community Edition is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +// Lesser General Public License for more details. +// +// You should have received a copy of the GNU Affero General Public License +// along with this program. If not, see . // // // This is an auto-generated class. Any manual changes on this file will be overwritten! // -// ------------------------------------------------------------------------------------------------- +// -------------------------------------------------------------------------------------------------------------------- namespace CDP4CommonView { using System; using System.Reactive.Linq; + using CDP4Common.CommonData; using CDP4Common.DiagramData; using CDP4Common.EngineeringModelData; using CDP4Common.ReportingData; using CDP4Common.SiteDirectoryData; + using CDP4Composition.Mvvm; + using CDP4Dal; using CDP4Dal.Events; - using CDP4Dal.Permission; + using CDP4Dal.Permission; + using ReactiveUI; /// @@ -27,7 +49,6 @@ namespace CDP4CommonView /// public abstract partial class DiagramElementContainerRowViewModel : DiagramThingBaseRowViewModel where T : DiagramElementContainer { - /// /// Initializes a new instance of the class /// @@ -36,9 +57,28 @@ public abstract partial class DiagramElementContainerRowViewModel : DiagramTh /// The that is the container of this protected DiagramElementContainerRowViewModel(T diagramElementContainer, ISession session, IViewModelBase containerViewModel) : base(diagramElementContainer, session, containerViewModel) { + this.UpdateProperties(); } + /// + /// The event-handler that is invoked by the subscription that listens for updates + /// on the that is being represented by the view-model + /// + /// + /// The payload of the event that is being handled + /// + protected override void ObjectChangeEventHandler(ObjectChangedEvent objectChange) + { + base.ObjectChangeEventHandler(objectChange); + + this.UpdateProperties(); + } - + /// + /// Updates the properties of this row + /// + private void UpdateProperties() + { + } } } diff --git a/CDP4Composition/CommonView/AutoGenRows/DiagramElementThingRowViewModel.cs b/CDP4Composition/CommonView/AutoGenRows/DiagramElementThingRowViewModel.cs index bf6ad1333..93481bd84 100644 --- a/CDP4Composition/CommonView/AutoGenRows/DiagramElementThingRowViewModel.cs +++ b/CDP4Composition/CommonView/AutoGenRows/DiagramElementThingRowViewModel.cs @@ -1,25 +1,47 @@ -// ------------------------------------------------------------------------------------------------- +// -------------------------------------------------------------------------------------------------------------------- // -// Copyright (c) 2015-2018 RHEA System S.A. +// Copyright (c) 2015-2021 RHEA System S.A. +// +// Author: Sam Gerené, Alex Vorobiev, Naron Phou, Alexander van Delft, Nathanael Smiechowski, Ahmed Abulwafa Ahmed +// +// This file is part of CDP4-IME Community Edition. +// This is an auto-generated class. Any manual changes to this file will be overwritten! +// +// The CDP4-IME Community Edition is free software; you can redistribute it and/or +// modify it under the terms of the GNU Affero General Public +// License as published by the Free Software Foundation; either +// version 3 of the License, or (at your option) any later version. +// +// The CDP4-IME Community Edition is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +// Lesser General Public License for more details. +// +// You should have received a copy of the GNU Affero General Public License +// along with this program. If not, see . // // // This is an auto-generated class. Any manual changes on this file will be overwritten! // -// ------------------------------------------------------------------------------------------------- +// -------------------------------------------------------------------------------------------------------------------- namespace CDP4CommonView { using System; using System.Reactive.Linq; + using CDP4Common.CommonData; using CDP4Common.DiagramData; using CDP4Common.EngineeringModelData; using CDP4Common.ReportingData; using CDP4Common.SiteDirectoryData; + using CDP4Composition.Mvvm; + using CDP4Dal; using CDP4Dal.Events; - using CDP4Dal.Permission; + using CDP4Dal.Permission; + using ReactiveUI; /// @@ -27,17 +49,21 @@ namespace CDP4CommonView /// public abstract partial class DiagramElementThingRowViewModel : DiagramElementContainerRowViewModel where T : DiagramElementThing { - /// - /// Backing field for + /// Backing field for property /// private Thing depictedThing; /// - /// Backing field for + /// Backing field for property /// private SharedStyle sharedStyle; + /// + /// Backing field for property + /// + private string sharedStyleName; + /// /// Initializes a new instance of the class /// @@ -49,7 +75,6 @@ protected DiagramElementThingRowViewModel(T diagramElementThing, ISession sessio this.UpdateProperties(); } - /// /// Gets or sets the DepictedThing /// @@ -68,7 +93,15 @@ public SharedStyle SharedStyle set { this.RaiseAndSetIfChanged(ref this.sharedStyle, value); } } - + /// + /// Gets or set the Name of + /// + public string SharedStyleName + { + get { return this.sharedStyleName; } + set { this.RaiseAndSetIfChanged(ref this.sharedStyleName, value); } + } + /// /// The event-handler that is invoked by the subscription that listens for updates /// on the that is being represented by the view-model @@ -79,6 +112,7 @@ public SharedStyle SharedStyle protected override void ObjectChangeEventHandler(ObjectChangedEvent objectChange) { base.ObjectChangeEventHandler(objectChange); + this.UpdateProperties(); } @@ -87,9 +121,16 @@ protected override void ObjectChangeEventHandler(ObjectChangedEvent objectChange /// private void UpdateProperties() { - this.ModifiedOn = this.Thing.ModifiedOn; this.DepictedThing = this.Thing.DepictedThing; this.SharedStyle = this.Thing.SharedStyle; + if (this.Thing.SharedStyle != null) + { + this.SharedStyleName = this.Thing.SharedStyle.Name; + } + else + { + this.SharedStyleName = string.Empty; + } } } } diff --git a/CDP4Composition/CommonView/AutoGenRows/DiagramObjectRowViewModel.cs b/CDP4Composition/CommonView/AutoGenRows/DiagramObjectRowViewModel.cs index 228995e11..ecf6a0a83 100644 --- a/CDP4Composition/CommonView/AutoGenRows/DiagramObjectRowViewModel.cs +++ b/CDP4Composition/CommonView/AutoGenRows/DiagramObjectRowViewModel.cs @@ -1,25 +1,47 @@ -// ------------------------------------------------------------------------------------------------- +// -------------------------------------------------------------------------------------------------------------------- // -// Copyright (c) 2015-2018 RHEA System S.A. +// Copyright (c) 2015-2021 RHEA System S.A. +// +// Author: Sam Gerené, Alex Vorobiev, Naron Phou, Alexander van Delft, Nathanael Smiechowski, Ahmed Abulwafa Ahmed +// +// This file is part of CDP4-IME Community Edition. +// This is an auto-generated class. Any manual changes to this file will be overwritten! +// +// The CDP4-IME Community Edition is free software; you can redistribute it and/or +// modify it under the terms of the GNU Affero General Public +// License as published by the Free Software Foundation; either +// version 3 of the License, or (at your option) any later version. +// +// The CDP4-IME Community Edition is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +// Lesser General Public License for more details. +// +// You should have received a copy of the GNU Affero General Public License +// along with this program. If not, see . // // // This is an auto-generated class. Any manual changes on this file will be overwritten! // -// ------------------------------------------------------------------------------------------------- +// -------------------------------------------------------------------------------------------------------------------- namespace CDP4CommonView { using System; using System.Reactive.Linq; + using CDP4Common.CommonData; using CDP4Common.DiagramData; using CDP4Common.EngineeringModelData; using CDP4Common.ReportingData; using CDP4Common.SiteDirectoryData; + using CDP4Composition.Mvvm; + using CDP4Dal; using CDP4Dal.Events; - using CDP4Dal.Permission; + using CDP4Dal.Permission; + using ReactiveUI; /// @@ -27,16 +49,15 @@ namespace CDP4CommonView /// public partial class DiagramObjectRowViewModel : DiagramShapeRowViewModel { - /// - /// Backing field for + /// Backing field for property /// - private float resolution; + private string documentation; /// - /// Backing field for + /// Backing field for property /// - private string documentation; + private float resolution; /// /// Initializes a new instance of the class @@ -49,26 +70,24 @@ public DiagramObjectRowViewModel(DiagramObject diagramObject, ISession session, this.UpdateProperties(); } - /// - /// Gets or sets the Resolution + /// Gets or sets the Documentation /// - public float Resolution + public string Documentation { - get { return this.resolution; } - set { this.RaiseAndSetIfChanged(ref this.resolution, value); } + get { return this.documentation; } + set { this.RaiseAndSetIfChanged(ref this.documentation, value); } } /// - /// Gets or sets the Documentation + /// Gets or sets the Resolution /// - public string Documentation + public float Resolution { - get { return this.documentation; } - set { this.RaiseAndSetIfChanged(ref this.documentation, value); } + get { return this.resolution; } + set { this.RaiseAndSetIfChanged(ref this.resolution, value); } } - /// /// The event-handler that is invoked by the subscription that listens for updates /// on the that is being represented by the view-model @@ -79,6 +98,7 @@ public string Documentation protected override void ObjectChangeEventHandler(ObjectChangedEvent objectChange) { base.ObjectChangeEventHandler(objectChange); + this.UpdateProperties(); } @@ -87,9 +107,8 @@ protected override void ObjectChangeEventHandler(ObjectChangedEvent objectChange /// private void UpdateProperties() { - this.ModifiedOn = this.Thing.ModifiedOn; - this.Resolution = this.Thing.Resolution; this.Documentation = this.Thing.Documentation; + this.Resolution = this.Thing.Resolution; } } } diff --git a/CDP4Composition/CommonView/AutoGenRows/DiagramShapeRowViewModel.cs b/CDP4Composition/CommonView/AutoGenRows/DiagramShapeRowViewModel.cs index 2ca72d33b..3b61d897e 100644 --- a/CDP4Composition/CommonView/AutoGenRows/DiagramShapeRowViewModel.cs +++ b/CDP4Composition/CommonView/AutoGenRows/DiagramShapeRowViewModel.cs @@ -1,25 +1,47 @@ -// ------------------------------------------------------------------------------------------------- +// -------------------------------------------------------------------------------------------------------------------- // -// Copyright (c) 2015-2018 RHEA System S.A. +// Copyright (c) 2015-2021 RHEA System S.A. +// +// Author: Sam Gerené, Alex Vorobiev, Naron Phou, Alexander van Delft, Nathanael Smiechowski, Ahmed Abulwafa Ahmed +// +// This file is part of CDP4-IME Community Edition. +// This is an auto-generated class. Any manual changes to this file will be overwritten! +// +// The CDP4-IME Community Edition is free software; you can redistribute it and/or +// modify it under the terms of the GNU Affero General Public +// License as published by the Free Software Foundation; either +// version 3 of the License, or (at your option) any later version. +// +// The CDP4-IME Community Edition is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +// Lesser General Public License for more details. +// +// You should have received a copy of the GNU Affero General Public License +// along with this program. If not, see . // // // This is an auto-generated class. Any manual changes on this file will be overwritten! // -// ------------------------------------------------------------------------------------------------- +// -------------------------------------------------------------------------------------------------------------------- namespace CDP4CommonView { using System; using System.Reactive.Linq; + using CDP4Common.CommonData; using CDP4Common.DiagramData; using CDP4Common.EngineeringModelData; using CDP4Common.ReportingData; using CDP4Common.SiteDirectoryData; + using CDP4Composition.Mvvm; + using CDP4Dal; using CDP4Dal.Events; - using CDP4Dal.Permission; + using CDP4Dal.Permission; + using ReactiveUI; /// @@ -27,7 +49,6 @@ namespace CDP4CommonView /// public abstract partial class DiagramShapeRowViewModel : DiagramElementThingRowViewModel where T : DiagramShape { - /// /// Initializes a new instance of the class /// @@ -36,9 +57,28 @@ public abstract partial class DiagramShapeRowViewModel : DiagramElementThingR /// The that is the container of this protected DiagramShapeRowViewModel(T diagramShape, ISession session, IViewModelBase containerViewModel) : base(diagramShape, session, containerViewModel) { + this.UpdateProperties(); } + /// + /// The event-handler that is invoked by the subscription that listens for updates + /// on the that is being represented by the view-model + /// + /// + /// The payload of the event that is being handled + /// + protected override void ObjectChangeEventHandler(ObjectChangedEvent objectChange) + { + base.ObjectChangeEventHandler(objectChange); + + this.UpdateProperties(); + } - + /// + /// Updates the properties of this row + /// + private void UpdateProperties() + { + } } } diff --git a/CDP4Composition/CommonView/AutoGenRows/DiagramThingBaseRowViewModel.cs b/CDP4Composition/CommonView/AutoGenRows/DiagramThingBaseRowViewModel.cs index 489fd9dab..2af1f973b 100644 --- a/CDP4Composition/CommonView/AutoGenRows/DiagramThingBaseRowViewModel.cs +++ b/CDP4Composition/CommonView/AutoGenRows/DiagramThingBaseRowViewModel.cs @@ -1,25 +1,47 @@ -// ------------------------------------------------------------------------------------------------- +// -------------------------------------------------------------------------------------------------------------------- // -// Copyright (c) 2015-2018 RHEA System S.A. +// Copyright (c) 2015-2021 RHEA System S.A. +// +// Author: Sam Gerené, Alex Vorobiev, Naron Phou, Alexander van Delft, Nathanael Smiechowski, Ahmed Abulwafa Ahmed +// +// This file is part of CDP4-IME Community Edition. +// This is an auto-generated class. Any manual changes to this file will be overwritten! +// +// The CDP4-IME Community Edition is free software; you can redistribute it and/or +// modify it under the terms of the GNU Affero General Public +// License as published by the Free Software Foundation; either +// version 3 of the License, or (at your option) any later version. +// +// The CDP4-IME Community Edition is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +// Lesser General Public License for more details. +// +// You should have received a copy of the GNU Affero General Public License +// along with this program. If not, see . // // // This is an auto-generated class. Any manual changes on this file will be overwritten! // -// ------------------------------------------------------------------------------------------------- +// -------------------------------------------------------------------------------------------------------------------- namespace CDP4CommonView { using System; using System.Reactive.Linq; + using CDP4Common.CommonData; using CDP4Common.DiagramData; using CDP4Common.EngineeringModelData; using CDP4Common.ReportingData; using CDP4Common.SiteDirectoryData; + using CDP4Composition.Mvvm; + using CDP4Dal; using CDP4Dal.Events; - using CDP4Dal.Permission; + using CDP4Dal.Permission; + using ReactiveUI; /// @@ -27,9 +49,8 @@ namespace CDP4CommonView /// public abstract partial class DiagramThingBaseRowViewModel : RowViewModelBase where T : DiagramThingBase { - /// - /// Backing field for + /// Backing field for property /// private string name; @@ -44,7 +65,6 @@ protected DiagramThingBaseRowViewModel(T diagramThingBase, ISession session, IVi this.UpdateProperties(); } - /// /// Gets or sets the Name /// @@ -54,7 +74,6 @@ public string Name set { this.RaiseAndSetIfChanged(ref this.name, value); } } - /// /// The event-handler that is invoked by the subscription that listens for updates /// on the that is being represented by the view-model @@ -65,6 +84,7 @@ public string Name protected override void ObjectChangeEventHandler(ObjectChangedEvent objectChange) { base.ObjectChangeEventHandler(objectChange); + this.UpdateProperties(); } @@ -73,7 +93,6 @@ protected override void ObjectChangeEventHandler(ObjectChangedEvent objectChange /// private void UpdateProperties() { - this.ModifiedOn = this.Thing.ModifiedOn; this.Name = this.Thing.Name; } } diff --git a/CDP4Composition/CommonView/AutoGenRows/DiagrammingStyleRowViewModel.cs b/CDP4Composition/CommonView/AutoGenRows/DiagrammingStyleRowViewModel.cs index aead5fbd1..b18841a90 100644 --- a/CDP4Composition/CommonView/AutoGenRows/DiagrammingStyleRowViewModel.cs +++ b/CDP4Composition/CommonView/AutoGenRows/DiagrammingStyleRowViewModel.cs @@ -1,25 +1,47 @@ -// ------------------------------------------------------------------------------------------------- +// -------------------------------------------------------------------------------------------------------------------- // -// Copyright (c) 2015-2018 RHEA System S.A. +// Copyright (c) 2015-2021 RHEA System S.A. +// +// Author: Sam Gerené, Alex Vorobiev, Naron Phou, Alexander van Delft, Nathanael Smiechowski, Ahmed Abulwafa Ahmed +// +// This file is part of CDP4-IME Community Edition. +// This is an auto-generated class. Any manual changes to this file will be overwritten! +// +// The CDP4-IME Community Edition is free software; you can redistribute it and/or +// modify it under the terms of the GNU Affero General Public +// License as published by the Free Software Foundation; either +// version 3 of the License, or (at your option) any later version. +// +// The CDP4-IME Community Edition is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +// Lesser General Public License for more details. +// +// You should have received a copy of the GNU Affero General Public License +// along with this program. If not, see . // // // This is an auto-generated class. Any manual changes on this file will be overwritten! // -// ------------------------------------------------------------------------------------------------- +// -------------------------------------------------------------------------------------------------------------------- namespace CDP4CommonView { using System; using System.Reactive.Linq; + using CDP4Common.CommonData; using CDP4Common.DiagramData; using CDP4Common.EngineeringModelData; using CDP4Common.ReportingData; using CDP4Common.SiteDirectoryData; + using CDP4Composition.Mvvm; + using CDP4Dal; using CDP4Dal.Events; - using CDP4Dal.Permission; + using CDP4Dal.Permission; + using ReactiveUI; /// @@ -27,66 +49,80 @@ namespace CDP4CommonView /// public abstract partial class DiagrammingStyleRowViewModel : DiagramThingBaseRowViewModel where T : DiagrammingStyle { + /// + /// Backing field for property + /// + private Color fillColor; /// - /// Backing field for + /// Backing field for property /// - private float fillOpacity; + private string fillColorName; /// - /// Backing field for + /// Backing field for property /// - private float strokeWidth; + private float fillOpacity; /// - /// Backing field for + /// Backing field for property /// - private float strokeOpacity; + private bool fontBold; /// - /// Backing field for + /// Backing field for property /// - private float fontSize; + private Color fontColor; /// - /// Backing field for + /// Backing field for property /// - private string fontName; + private string fontColorName; /// - /// Backing field for + /// Backing field for property /// private bool fontItalic; /// - /// Backing field for + /// Backing field for property /// - private bool fontBold; + private string fontName; /// - /// Backing field for + /// Backing field for property /// - private bool fontUnderline; + private float fontSize; /// - /// Backing field for + /// Backing field for property /// private bool fontStrokeThrough; /// - /// Backing field for + /// Backing field for property /// - private Color fillColor; + private bool fontUnderline; /// - /// Backing field for + /// Backing field for property /// private Color strokeColor; /// - /// Backing field for + /// Backing field for property /// - private Color fontColor; + private string strokeColorName; + + /// + /// Backing field for property + /// + private float strokeOpacity; + + /// + /// Backing field for property + /// + private float strokeWidth; /// /// Initializes a new instance of the class @@ -99,50 +135,58 @@ protected DiagrammingStyleRowViewModel(T diagrammingStyle, ISession session, IVi this.UpdateProperties(); } + /// + /// Gets or sets the FillColor + /// + public Color FillColor + { + get { return this.fillColor; } + set { this.RaiseAndSetIfChanged(ref this.fillColor, value); } + } /// - /// Gets or sets the FillOpacity + /// Gets or set the Name of /// - public float FillOpacity + public string FillColorName { - get { return this.fillOpacity; } - set { this.RaiseAndSetIfChanged(ref this.fillOpacity, value); } + get { return this.fillColorName; } + set { this.RaiseAndSetIfChanged(ref this.fillColorName, value); } } /// - /// Gets or sets the StrokeWidth + /// Gets or sets the FillOpacity /// - public float StrokeWidth + public float FillOpacity { - get { return this.strokeWidth; } - set { this.RaiseAndSetIfChanged(ref this.strokeWidth, value); } + get { return this.fillOpacity; } + set { this.RaiseAndSetIfChanged(ref this.fillOpacity, value); } } /// - /// Gets or sets the StrokeOpacity + /// Gets or sets the FontBold /// - public float StrokeOpacity + public bool FontBold { - get { return this.strokeOpacity; } - set { this.RaiseAndSetIfChanged(ref this.strokeOpacity, value); } + get { return this.fontBold; } + set { this.RaiseAndSetIfChanged(ref this.fontBold, value); } } /// - /// Gets or sets the FontSize + /// Gets or sets the FontColor /// - public float FontSize + public Color FontColor { - get { return this.fontSize; } - set { this.RaiseAndSetIfChanged(ref this.fontSize, value); } + get { return this.fontColor; } + set { this.RaiseAndSetIfChanged(ref this.fontColor, value); } } /// - /// Gets or sets the FontName + /// Gets or set the Name of /// - public string FontName + public string FontColorName { - get { return this.fontName; } - set { this.RaiseAndSetIfChanged(ref this.fontName, value); } + get { return this.fontColorName; } + set { this.RaiseAndSetIfChanged(ref this.fontColorName, value); } } /// @@ -155,21 +199,21 @@ public bool FontItalic } /// - /// Gets or sets the FontBold + /// Gets or sets the FontName /// - public bool FontBold + public string FontName { - get { return this.fontBold; } - set { this.RaiseAndSetIfChanged(ref this.fontBold, value); } + get { return this.fontName; } + set { this.RaiseAndSetIfChanged(ref this.fontName, value); } } /// - /// Gets or sets the FontUnderline + /// Gets or sets the FontSize /// - public bool FontUnderline + public float FontSize { - get { return this.fontUnderline; } - set { this.RaiseAndSetIfChanged(ref this.fontUnderline, value); } + get { return this.fontSize; } + set { this.RaiseAndSetIfChanged(ref this.fontSize, value); } } /// @@ -182,12 +226,12 @@ public bool FontStrokeThrough } /// - /// Gets or sets the FillColor + /// Gets or sets the FontUnderline /// - public Color FillColor + public bool FontUnderline { - get { return this.fillColor; } - set { this.RaiseAndSetIfChanged(ref this.fillColor, value); } + get { return this.fontUnderline; } + set { this.RaiseAndSetIfChanged(ref this.fontUnderline, value); } } /// @@ -200,15 +244,32 @@ public Color StrokeColor } /// - /// Gets or sets the FontColor + /// Gets or set the Name of /// - public Color FontColor + public string StrokeColorName { - get { return this.fontColor; } - set { this.RaiseAndSetIfChanged(ref this.fontColor, value); } + get { return this.strokeColorName; } + set { this.RaiseAndSetIfChanged(ref this.strokeColorName, value); } + } + + /// + /// Gets or sets the StrokeOpacity + /// + public float StrokeOpacity + { + get { return this.strokeOpacity; } + set { this.RaiseAndSetIfChanged(ref this.strokeOpacity, value); } + } + + /// + /// Gets or sets the StrokeWidth + /// + public float StrokeWidth + { + get { return this.strokeWidth; } + set { this.RaiseAndSetIfChanged(ref this.strokeWidth, value); } } - /// /// The event-handler that is invoked by the subscription that listens for updates /// on the that is being represented by the view-model @@ -219,6 +280,7 @@ public Color FontColor protected override void ObjectChangeEventHandler(ObjectChangedEvent objectChange) { base.ObjectChangeEventHandler(objectChange); + this.UpdateProperties(); } @@ -227,43 +289,66 @@ protected override void ObjectChangeEventHandler(ObjectChangedEvent objectChange /// private void UpdateProperties() { - this.ModifiedOn = this.Thing.ModifiedOn; - if(this.Thing.FillOpacity.HasValue) + this.FillColor = this.Thing.FillColor; + if (this.Thing.FillColor != null) + { + this.FillColorName = this.Thing.FillColor.Name; + } + else + { + this.FillColorName = string.Empty; + } + if (this.Thing.FillOpacity.HasValue) { this.FillOpacity = this.Thing.FillOpacity.Value; } - if(this.Thing.StrokeWidth.HasValue) + if (this.Thing.FontBold.HasValue) { - this.StrokeWidth = this.Thing.StrokeWidth.Value; + this.FontBold = this.Thing.FontBold.Value; } - if(this.Thing.StrokeOpacity.HasValue) + this.FontColor = this.Thing.FontColor; + if (this.Thing.FontColor != null) { - this.StrokeOpacity = this.Thing.StrokeOpacity.Value; + this.FontColorName = this.Thing.FontColor.Name; } - if(this.Thing.FontSize.HasValue) + else { - this.FontSize = this.Thing.FontSize.Value; + this.FontColorName = string.Empty; } - this.FontName = this.Thing.FontName; - if(this.Thing.FontItalic.HasValue) + if (this.Thing.FontItalic.HasValue) { this.FontItalic = this.Thing.FontItalic.Value; } - if(this.Thing.FontBold.HasValue) + this.FontName = this.Thing.FontName; + if (this.Thing.FontSize.HasValue) + { + this.FontSize = this.Thing.FontSize.Value; + } + if (this.Thing.FontStrokeThrough.HasValue) { - this.FontBold = this.Thing.FontBold.Value; + this.FontStrokeThrough = this.Thing.FontStrokeThrough.Value; } - if(this.Thing.FontUnderline.HasValue) + if (this.Thing.FontUnderline.HasValue) { this.FontUnderline = this.Thing.FontUnderline.Value; } - if(this.Thing.FontStrokeThrough.HasValue) + this.StrokeColor = this.Thing.StrokeColor; + if (this.Thing.StrokeColor != null) { - this.FontStrokeThrough = this.Thing.FontStrokeThrough.Value; + this.StrokeColorName = this.Thing.StrokeColor.Name; + } + else + { + this.StrokeColorName = string.Empty; + } + if (this.Thing.StrokeOpacity.HasValue) + { + this.StrokeOpacity = this.Thing.StrokeOpacity.Value; + } + if (this.Thing.StrokeWidth.HasValue) + { + this.StrokeWidth = this.Thing.StrokeWidth.Value; } - this.FillColor = this.Thing.FillColor; - this.StrokeColor = this.Thing.StrokeColor; - this.FontColor = this.Thing.FontColor; } } } diff --git a/CDP4Composition/CommonView/AutoGenRows/DiscussionItemRowViewModel.cs b/CDP4Composition/CommonView/AutoGenRows/DiscussionItemRowViewModel.cs index 124aa6f7f..8d3c8e5c8 100644 --- a/CDP4Composition/CommonView/AutoGenRows/DiscussionItemRowViewModel.cs +++ b/CDP4Composition/CommonView/AutoGenRows/DiscussionItemRowViewModel.cs @@ -1,25 +1,47 @@ -// ------------------------------------------------------------------------------------------------- +// -------------------------------------------------------------------------------------------------------------------- // -// Copyright (c) 2015-2018 RHEA System S.A. +// Copyright (c) 2015-2021 RHEA System S.A. +// +// Author: Sam Gerené, Alex Vorobiev, Naron Phou, Alexander van Delft, Nathanael Smiechowski, Ahmed Abulwafa Ahmed +// +// This file is part of CDP4-IME Community Edition. +// This is an auto-generated class. Any manual changes to this file will be overwritten! +// +// The CDP4-IME Community Edition is free software; you can redistribute it and/or +// modify it under the terms of the GNU Affero General Public +// License as published by the Free Software Foundation; either +// version 3 of the License, or (at your option) any later version. +// +// The CDP4-IME Community Edition is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +// Lesser General Public License for more details. +// +// You should have received a copy of the GNU Affero General Public License +// along with this program. If not, see . // // // This is an auto-generated class. Any manual changes on this file will be overwritten! // -// ------------------------------------------------------------------------------------------------- +// -------------------------------------------------------------------------------------------------------------------- namespace CDP4CommonView { using System; using System.Reactive.Linq; + using CDP4Common.CommonData; using CDP4Common.DiagramData; using CDP4Common.EngineeringModelData; using CDP4Common.ReportingData; using CDP4Common.SiteDirectoryData; + using CDP4Composition.Mvvm; + using CDP4Dal; using CDP4Dal.Events; - using CDP4Dal.Permission; + using CDP4Dal.Permission; + using ReactiveUI; /// @@ -27,9 +49,8 @@ namespace CDP4CommonView /// public abstract partial class DiscussionItemRowViewModel : GenericAnnotationRowViewModel where T : DiscussionItem { - /// - /// Backing field for + /// Backing field for property /// private DiscussionItem replyTo; @@ -44,7 +65,6 @@ protected DiscussionItemRowViewModel(T discussionItem, ISession session, IViewMo this.UpdateProperties(); } - /// /// Gets or sets the ReplyTo /// @@ -54,7 +74,6 @@ public DiscussionItem ReplyTo set { this.RaiseAndSetIfChanged(ref this.replyTo, value); } } - /// /// The event-handler that is invoked by the subscription that listens for updates /// on the that is being represented by the view-model @@ -65,6 +84,7 @@ public DiscussionItem ReplyTo protected override void ObjectChangeEventHandler(ObjectChangedEvent objectChange) { base.ObjectChangeEventHandler(objectChange); + this.UpdateProperties(); } @@ -73,7 +93,6 @@ protected override void ObjectChangeEventHandler(ObjectChangedEvent objectChange /// private void UpdateProperties() { - this.ModifiedOn = this.Thing.ModifiedOn; this.ReplyTo = this.Thing.ReplyTo; } } diff --git a/CDP4Composition/CommonView/AutoGenRows/DomainFileStoreRowViewModel.cs b/CDP4Composition/CommonView/AutoGenRows/DomainFileStoreRowViewModel.cs index 44f26d6e9..841c5d5a1 100644 --- a/CDP4Composition/CommonView/AutoGenRows/DomainFileStoreRowViewModel.cs +++ b/CDP4Composition/CommonView/AutoGenRows/DomainFileStoreRowViewModel.cs @@ -1,25 +1,47 @@ -// ------------------------------------------------------------------------------------------------- +// -------------------------------------------------------------------------------------------------------------------- // -// Copyright (c) 2015-2018 RHEA System S.A. +// Copyright (c) 2015-2021 RHEA System S.A. +// +// Author: Sam Gerené, Alex Vorobiev, Naron Phou, Alexander van Delft, Nathanael Smiechowski, Ahmed Abulwafa Ahmed +// +// This file is part of CDP4-IME Community Edition. +// This is an auto-generated class. Any manual changes to this file will be overwritten! +// +// The CDP4-IME Community Edition is free software; you can redistribute it and/or +// modify it under the terms of the GNU Affero General Public +// License as published by the Free Software Foundation; either +// version 3 of the License, or (at your option) any later version. +// +// The CDP4-IME Community Edition is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +// Lesser General Public License for more details. +// +// You should have received a copy of the GNU Affero General Public License +// along with this program. If not, see . // // // This is an auto-generated class. Any manual changes on this file will be overwritten! // -// ------------------------------------------------------------------------------------------------- +// -------------------------------------------------------------------------------------------------------------------- namespace CDP4CommonView { using System; using System.Reactive.Linq; + using CDP4Common.CommonData; using CDP4Common.DiagramData; using CDP4Common.EngineeringModelData; using CDP4Common.ReportingData; using CDP4Common.SiteDirectoryData; + using CDP4Composition.Mvvm; + using CDP4Dal; using CDP4Dal.Events; - using CDP4Dal.Permission; + using CDP4Dal.Permission; + using ReactiveUI; /// @@ -27,9 +49,8 @@ namespace CDP4CommonView /// public partial class DomainFileStoreRowViewModel : FileStoreRowViewModel { - /// - /// Backing field for + /// Backing field for property /// private bool isHidden; @@ -44,7 +65,6 @@ public DomainFileStoreRowViewModel(DomainFileStore domainFileStore, ISession ses this.UpdateProperties(); } - /// /// Gets or sets the IsHidden /// @@ -54,7 +74,6 @@ public bool IsHidden set { this.RaiseAndSetIfChanged(ref this.isHidden, value); } } - /// /// The event-handler that is invoked by the subscription that listens for updates /// on the that is being represented by the view-model @@ -65,6 +84,7 @@ public bool IsHidden protected override void ObjectChangeEventHandler(ObjectChangedEvent objectChange) { base.ObjectChangeEventHandler(objectChange); + this.UpdateProperties(); } @@ -73,7 +93,6 @@ protected override void ObjectChangeEventHandler(ObjectChangedEvent objectChange /// private void UpdateProperties() { - this.ModifiedOn = this.Thing.ModifiedOn; this.IsHidden = this.Thing.IsHidden; } } diff --git a/CDP4Composition/CommonView/AutoGenRows/DomainOfExpertiseGroupRowViewModel.cs b/CDP4Composition/CommonView/AutoGenRows/DomainOfExpertiseGroupRowViewModel.cs index 9bd7a70c0..600117975 100644 --- a/CDP4Composition/CommonView/AutoGenRows/DomainOfExpertiseGroupRowViewModel.cs +++ b/CDP4Composition/CommonView/AutoGenRows/DomainOfExpertiseGroupRowViewModel.cs @@ -1,25 +1,47 @@ -// ------------------------------------------------------------------------------------------------- +// -------------------------------------------------------------------------------------------------------------------- // -// Copyright (c) 2015-2018 RHEA System S.A. +// Copyright (c) 2015-2021 RHEA System S.A. +// +// Author: Sam Gerené, Alex Vorobiev, Naron Phou, Alexander van Delft, Nathanael Smiechowski, Ahmed Abulwafa Ahmed +// +// This file is part of CDP4-IME Community Edition. +// This is an auto-generated class. Any manual changes to this file will be overwritten! +// +// The CDP4-IME Community Edition is free software; you can redistribute it and/or +// modify it under the terms of the GNU Affero General Public +// License as published by the Free Software Foundation; either +// version 3 of the License, or (at your option) any later version. +// +// The CDP4-IME Community Edition is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +// Lesser General Public License for more details. +// +// You should have received a copy of the GNU Affero General Public License +// along with this program. If not, see . // // // This is an auto-generated class. Any manual changes on this file will be overwritten! // -// ------------------------------------------------------------------------------------------------- +// -------------------------------------------------------------------------------------------------------------------- namespace CDP4CommonView { using System; using System.Reactive.Linq; + using CDP4Common.CommonData; using CDP4Common.DiagramData; using CDP4Common.EngineeringModelData; using CDP4Common.ReportingData; using CDP4Common.SiteDirectoryData; + using CDP4Composition.Mvvm; + using CDP4Dal; using CDP4Dal.Events; - using CDP4Dal.Permission; + using CDP4Dal.Permission; + using ReactiveUI; /// @@ -27,9 +49,8 @@ namespace CDP4CommonView /// public partial class DomainOfExpertiseGroupRowViewModel : DefinedThingRowViewModel { - /// - /// Backing field for + /// Backing field for property /// private bool isDeprecated; @@ -44,7 +65,6 @@ public DomainOfExpertiseGroupRowViewModel(DomainOfExpertiseGroup domainOfExperti this.UpdateProperties(); } - /// /// Gets or sets the IsDeprecated /// @@ -54,7 +74,6 @@ public bool IsDeprecated set { this.RaiseAndSetIfChanged(ref this.isDeprecated, value); } } - /// /// The event-handler that is invoked by the subscription that listens for updates /// on the that is being represented by the view-model @@ -65,6 +84,7 @@ public bool IsDeprecated protected override void ObjectChangeEventHandler(ObjectChangedEvent objectChange) { base.ObjectChangeEventHandler(objectChange); + this.UpdateProperties(); } @@ -73,7 +93,6 @@ protected override void ObjectChangeEventHandler(ObjectChangedEvent objectChange /// private void UpdateProperties() { - this.ModifiedOn = this.Thing.ModifiedOn; this.IsDeprecated = this.Thing.IsDeprecated; } } diff --git a/CDP4Composition/CommonView/AutoGenRows/DomainOfExpertiseRowViewModel.cs b/CDP4Composition/CommonView/AutoGenRows/DomainOfExpertiseRowViewModel.cs index effb803e8..f761ba706 100644 --- a/CDP4Composition/CommonView/AutoGenRows/DomainOfExpertiseRowViewModel.cs +++ b/CDP4Composition/CommonView/AutoGenRows/DomainOfExpertiseRowViewModel.cs @@ -1,25 +1,47 @@ -// ------------------------------------------------------------------------------------------------- +// -------------------------------------------------------------------------------------------------------------------- // -// Copyright (c) 2015-2018 RHEA System S.A. +// Copyright (c) 2015-2021 RHEA System S.A. +// +// Author: Sam Gerené, Alex Vorobiev, Naron Phou, Alexander van Delft, Nathanael Smiechowski, Ahmed Abulwafa Ahmed +// +// This file is part of CDP4-IME Community Edition. +// This is an auto-generated class. Any manual changes to this file will be overwritten! +// +// The CDP4-IME Community Edition is free software; you can redistribute it and/or +// modify it under the terms of the GNU Affero General Public +// License as published by the Free Software Foundation; either +// version 3 of the License, or (at your option) any later version. +// +// The CDP4-IME Community Edition is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +// Lesser General Public License for more details. +// +// You should have received a copy of the GNU Affero General Public License +// along with this program. If not, see . // // // This is an auto-generated class. Any manual changes on this file will be overwritten! // -// ------------------------------------------------------------------------------------------------- +// -------------------------------------------------------------------------------------------------------------------- namespace CDP4CommonView { using System; using System.Reactive.Linq; + using CDP4Common.CommonData; using CDP4Common.DiagramData; using CDP4Common.EngineeringModelData; using CDP4Common.ReportingData; using CDP4Common.SiteDirectoryData; + using CDP4Composition.Mvvm; + using CDP4Dal; using CDP4Dal.Events; - using CDP4Dal.Permission; + using CDP4Dal.Permission; + using ReactiveUI; /// @@ -27,9 +49,8 @@ namespace CDP4CommonView /// public partial class DomainOfExpertiseRowViewModel : DefinedThingRowViewModel { - /// - /// Backing field for + /// Backing field for property /// private bool isDeprecated; @@ -44,7 +65,6 @@ public DomainOfExpertiseRowViewModel(DomainOfExpertise domainOfExpertise, ISessi this.UpdateProperties(); } - /// /// Gets or sets the IsDeprecated /// @@ -54,7 +74,6 @@ public bool IsDeprecated set { this.RaiseAndSetIfChanged(ref this.isDeprecated, value); } } - /// /// The event-handler that is invoked by the subscription that listens for updates /// on the that is being represented by the view-model @@ -65,6 +84,7 @@ public bool IsDeprecated protected override void ObjectChangeEventHandler(ObjectChangedEvent objectChange) { base.ObjectChangeEventHandler(objectChange); + this.UpdateProperties(); } @@ -73,7 +93,6 @@ protected override void ObjectChangeEventHandler(ObjectChangedEvent objectChange /// private void UpdateProperties() { - this.ModifiedOn = this.Thing.ModifiedOn; this.IsDeprecated = this.Thing.IsDeprecated; } } diff --git a/CDP4Composition/CommonView/AutoGenRows/ElementBaseRowViewModel.cs b/CDP4Composition/CommonView/AutoGenRows/ElementBaseRowViewModel.cs index c547cfe82..f1ce3792e 100644 --- a/CDP4Composition/CommonView/AutoGenRows/ElementBaseRowViewModel.cs +++ b/CDP4Composition/CommonView/AutoGenRows/ElementBaseRowViewModel.cs @@ -1,25 +1,47 @@ -// ------------------------------------------------------------------------------------------------- +// -------------------------------------------------------------------------------------------------------------------- // -// Copyright (c) 2015-2018 RHEA System S.A. +// Copyright (c) 2015-2021 RHEA System S.A. +// +// Author: Sam Gerené, Alex Vorobiev, Naron Phou, Alexander van Delft, Nathanael Smiechowski, Ahmed Abulwafa Ahmed +// +// This file is part of CDP4-IME Community Edition. +// This is an auto-generated class. Any manual changes to this file will be overwritten! +// +// The CDP4-IME Community Edition is free software; you can redistribute it and/or +// modify it under the terms of the GNU Affero General Public +// License as published by the Free Software Foundation; either +// version 3 of the License, or (at your option) any later version. +// +// The CDP4-IME Community Edition is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +// Lesser General Public License for more details. +// +// You should have received a copy of the GNU Affero General Public License +// along with this program. If not, see . // // // This is an auto-generated class. Any manual changes on this file will be overwritten! // -// ------------------------------------------------------------------------------------------------- +// -------------------------------------------------------------------------------------------------------------------- namespace CDP4CommonView { using System; using System.Reactive.Linq; + using CDP4Common.CommonData; using CDP4Common.DiagramData; using CDP4Common.EngineeringModelData; using CDP4Common.ReportingData; using CDP4Common.SiteDirectoryData; + using CDP4Composition.Mvvm; + using CDP4Dal; using CDP4Dal.Events; - using CDP4Dal.Permission; + using CDP4Dal.Permission; + using ReactiveUI; /// @@ -27,21 +49,20 @@ namespace CDP4CommonView /// public abstract partial class ElementBaseRowViewModel : DefinedThingRowViewModel where T : ElementBase { - /// - /// Backing field for + /// Backing field for property /// private DomainOfExpertise owner; /// - /// Backing field for + /// Backing field for property /// - private string ownerShortName; + private string ownerName; /// - /// Backing field for + /// Backing field for property /// - private string ownerName; + private string ownerShortName; /// /// Initializes a new instance of the class @@ -54,7 +75,6 @@ protected ElementBaseRowViewModel(T elementBase, ISession session, IViewModelBas this.UpdateProperties(); } - /// /// Gets or sets the Owner /// @@ -65,24 +85,23 @@ public DomainOfExpertise Owner } /// - /// Gets or set the ShortName of + /// Gets or set the Name of /// - public string OwnerShortName + public string OwnerName { - get { return this.ownerShortName; } - set { this.RaiseAndSetIfChanged(ref this.ownerShortName, value); } + get { return this.ownerName; } + set { this.RaiseAndSetIfChanged(ref this.ownerName, value); } } /// - /// Gets or set the Name of + /// Gets or set the ShortName of /// - public string OwnerName + public string OwnerShortName { - get { return this.ownerName; } - set { this.RaiseAndSetIfChanged(ref this.ownerName, value); } + get { return this.ownerShortName; } + set { this.RaiseAndSetIfChanged(ref this.ownerShortName, value); } } - /// /// The event-handler that is invoked by the subscription that listens for updates /// on the that is being represented by the view-model @@ -93,6 +112,7 @@ public string OwnerName protected override void ObjectChangeEventHandler(ObjectChangedEvent objectChange) { base.ObjectChangeEventHandler(objectChange); + this.UpdateProperties(); } @@ -101,13 +121,17 @@ protected override void ObjectChangeEventHandler(ObjectChangedEvent objectChange /// private void UpdateProperties() { - this.ModifiedOn = this.Thing.ModifiedOn; - if (this.Thing.Owner != null) - { - this.OwnerShortName = this.Thing.Owner.ShortName; - this.OwnerName = this.Thing.Owner.Name; - } this.Owner = this.Thing.Owner; + if (this.Thing.Owner != null) + { + this.OwnerName = this.Thing.Owner.Name; + this.OwnerShortName = this.Thing.Owner.ShortName; + } + else + { + this.OwnerName = string.Empty; + this.OwnerShortName = string.Empty; + } } } } diff --git a/CDP4Composition/CommonView/AutoGenRows/ElementDefinitionRowViewModel.cs b/CDP4Composition/CommonView/AutoGenRows/ElementDefinitionRowViewModel.cs index 2f2e7e700..64944cc28 100644 --- a/CDP4Composition/CommonView/AutoGenRows/ElementDefinitionRowViewModel.cs +++ b/CDP4Composition/CommonView/AutoGenRows/ElementDefinitionRowViewModel.cs @@ -1,25 +1,47 @@ -// ------------------------------------------------------------------------------------------------- +// -------------------------------------------------------------------------------------------------------------------- // -// Copyright (c) 2015-2018 RHEA System S.A. +// Copyright (c) 2015-2021 RHEA System S.A. +// +// Author: Sam Gerené, Alex Vorobiev, Naron Phou, Alexander van Delft, Nathanael Smiechowski, Ahmed Abulwafa Ahmed +// +// This file is part of CDP4-IME Community Edition. +// This is an auto-generated class. Any manual changes to this file will be overwritten! +// +// The CDP4-IME Community Edition is free software; you can redistribute it and/or +// modify it under the terms of the GNU Affero General Public +// License as published by the Free Software Foundation; either +// version 3 of the License, or (at your option) any later version. +// +// The CDP4-IME Community Edition is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +// Lesser General Public License for more details. +// +// You should have received a copy of the GNU Affero General Public License +// along with this program. If not, see . // // // This is an auto-generated class. Any manual changes on this file will be overwritten! // -// ------------------------------------------------------------------------------------------------- +// -------------------------------------------------------------------------------------------------------------------- namespace CDP4CommonView { using System; using System.Reactive.Linq; + using CDP4Common.CommonData; using CDP4Common.DiagramData; using CDP4Common.EngineeringModelData; using CDP4Common.ReportingData; using CDP4Common.SiteDirectoryData; + using CDP4Composition.Mvvm; + using CDP4Dal; using CDP4Dal.Events; - using CDP4Dal.Permission; + using CDP4Dal.Permission; + using ReactiveUI; /// @@ -27,7 +49,6 @@ namespace CDP4CommonView /// public partial class ElementDefinitionRowViewModel : ElementBaseRowViewModel { - /// /// Initializes a new instance of the class /// @@ -36,9 +57,28 @@ public partial class ElementDefinitionRowViewModel : ElementBaseRowViewModelThe that is the container of this public ElementDefinitionRowViewModel(ElementDefinition elementDefinition, ISession session, IViewModelBase containerViewModel) : base(elementDefinition, session, containerViewModel) { + this.UpdateProperties(); } + /// + /// The event-handler that is invoked by the subscription that listens for updates + /// on the that is being represented by the view-model + /// + /// + /// The payload of the event that is being handled + /// + protected override void ObjectChangeEventHandler(ObjectChangedEvent objectChange) + { + base.ObjectChangeEventHandler(objectChange); + + this.UpdateProperties(); + } - + /// + /// Updates the properties of this row + /// + private void UpdateProperties() + { + } } } diff --git a/CDP4Composition/CommonView/AutoGenRows/ElementUsageRowViewModel.cs b/CDP4Composition/CommonView/AutoGenRows/ElementUsageRowViewModel.cs index 78fb90682..9f75a25e4 100644 --- a/CDP4Composition/CommonView/AutoGenRows/ElementUsageRowViewModel.cs +++ b/CDP4Composition/CommonView/AutoGenRows/ElementUsageRowViewModel.cs @@ -1,25 +1,47 @@ -// ------------------------------------------------------------------------------------------------- +// -------------------------------------------------------------------------------------------------------------------- // -// Copyright (c) 2015-2018 RHEA System S.A. +// Copyright (c) 2015-2021 RHEA System S.A. +// +// Author: Sam Gerené, Alex Vorobiev, Naron Phou, Alexander van Delft, Nathanael Smiechowski, Ahmed Abulwafa Ahmed +// +// This file is part of CDP4-IME Community Edition. +// This is an auto-generated class. Any manual changes to this file will be overwritten! +// +// The CDP4-IME Community Edition is free software; you can redistribute it and/or +// modify it under the terms of the GNU Affero General Public +// License as published by the Free Software Foundation; either +// version 3 of the License, or (at your option) any later version. +// +// The CDP4-IME Community Edition is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +// Lesser General Public License for more details. +// +// You should have received a copy of the GNU Affero General Public License +// along with this program. If not, see . // // // This is an auto-generated class. Any manual changes on this file will be overwritten! // -// ------------------------------------------------------------------------------------------------- +// -------------------------------------------------------------------------------------------------------------------- namespace CDP4CommonView { using System; using System.Reactive.Linq; + using CDP4Common.CommonData; using CDP4Common.DiagramData; using CDP4Common.EngineeringModelData; using CDP4Common.ReportingData; using CDP4Common.SiteDirectoryData; + using CDP4Composition.Mvvm; + using CDP4Dal; using CDP4Dal.Events; - using CDP4Dal.Permission; + using CDP4Dal.Permission; + using ReactiveUI; /// @@ -27,26 +49,25 @@ namespace CDP4CommonView /// public partial class ElementUsageRowViewModel : ElementBaseRowViewModel { - /// - /// Backing field for + /// Backing field for property /// - private InterfaceEndKind interfaceEnd; + private ElementDefinition elementDefinition; /// - /// Backing field for + /// Backing field for property /// - private ElementDefinition elementDefinition; + private string elementDefinitionName; /// - /// Backing field for + /// Backing field for property /// private string elementDefinitionShortName; /// - /// Backing field for + /// Backing field for property /// - private string elementDefinitionName; + private InterfaceEndKind interfaceEnd; /// /// Initializes a new instance of the class @@ -59,23 +80,22 @@ public ElementUsageRowViewModel(ElementUsage elementUsage, ISession session, IVi this.UpdateProperties(); } - /// - /// Gets or sets the InterfaceEnd + /// Gets or sets the ElementDefinition /// - public InterfaceEndKind InterfaceEnd + public ElementDefinition ElementDefinition { - get { return this.interfaceEnd; } - set { this.RaiseAndSetIfChanged(ref this.interfaceEnd, value); } + get { return this.elementDefinition; } + set { this.RaiseAndSetIfChanged(ref this.elementDefinition, value); } } /// - /// Gets or sets the ElementDefinition + /// Gets or set the Name of /// - public ElementDefinition ElementDefinition + public string ElementDefinitionName { - get { return this.elementDefinition; } - set { this.RaiseAndSetIfChanged(ref this.elementDefinition, value); } + get { return this.elementDefinitionName; } + set { this.RaiseAndSetIfChanged(ref this.elementDefinitionName, value); } } /// @@ -88,15 +108,14 @@ public string ElementDefinitionShortName } /// - /// Gets or set the Name of + /// Gets or sets the InterfaceEnd /// - public string ElementDefinitionName + public InterfaceEndKind InterfaceEnd { - get { return this.elementDefinitionName; } - set { this.RaiseAndSetIfChanged(ref this.elementDefinitionName, value); } + get { return this.interfaceEnd; } + set { this.RaiseAndSetIfChanged(ref this.interfaceEnd, value); } } - /// /// The event-handler that is invoked by the subscription that listens for updates /// on the that is being represented by the view-model @@ -107,6 +126,7 @@ public string ElementDefinitionName protected override void ObjectChangeEventHandler(ObjectChangedEvent objectChange) { base.ObjectChangeEventHandler(objectChange); + this.UpdateProperties(); } @@ -115,14 +135,18 @@ protected override void ObjectChangeEventHandler(ObjectChangedEvent objectChange /// private void UpdateProperties() { - this.ModifiedOn = this.Thing.ModifiedOn; - this.InterfaceEnd = this.Thing.InterfaceEnd; - if (this.Thing.ElementDefinition != null) - { - this.ElementDefinitionShortName = this.Thing.ElementDefinition.ShortName; - this.ElementDefinitionName = this.Thing.ElementDefinition.Name; - } this.ElementDefinition = this.Thing.ElementDefinition; + if (this.Thing.ElementDefinition != null) + { + this.ElementDefinitionName = this.Thing.ElementDefinition.Name; + this.ElementDefinitionShortName = this.Thing.ElementDefinition.ShortName; + } + else + { + this.ElementDefinitionName = string.Empty; + this.ElementDefinitionShortName = string.Empty; + } + this.InterfaceEnd = this.Thing.InterfaceEnd; } } } diff --git a/CDP4Composition/CommonView/AutoGenRows/EmailAddressRowViewModel.cs b/CDP4Composition/CommonView/AutoGenRows/EmailAddressRowViewModel.cs index 76ba85955..7e69f35e0 100644 --- a/CDP4Composition/CommonView/AutoGenRows/EmailAddressRowViewModel.cs +++ b/CDP4Composition/CommonView/AutoGenRows/EmailAddressRowViewModel.cs @@ -1,25 +1,47 @@ -// ------------------------------------------------------------------------------------------------- +// -------------------------------------------------------------------------------------------------------------------- // -// Copyright (c) 2015-2018 RHEA System S.A. +// Copyright (c) 2015-2021 RHEA System S.A. +// +// Author: Sam Gerené, Alex Vorobiev, Naron Phou, Alexander van Delft, Nathanael Smiechowski, Ahmed Abulwafa Ahmed +// +// This file is part of CDP4-IME Community Edition. +// This is an auto-generated class. Any manual changes to this file will be overwritten! +// +// The CDP4-IME Community Edition is free software; you can redistribute it and/or +// modify it under the terms of the GNU Affero General Public +// License as published by the Free Software Foundation; either +// version 3 of the License, or (at your option) any later version. +// +// The CDP4-IME Community Edition is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +// Lesser General Public License for more details. +// +// You should have received a copy of the GNU Affero General Public License +// along with this program. If not, see . // // // This is an auto-generated class. Any manual changes on this file will be overwritten! // -// ------------------------------------------------------------------------------------------------- +// -------------------------------------------------------------------------------------------------------------------- namespace CDP4CommonView { using System; using System.Reactive.Linq; + using CDP4Common.CommonData; using CDP4Common.DiagramData; using CDP4Common.EngineeringModelData; using CDP4Common.ReportingData; using CDP4Common.SiteDirectoryData; + using CDP4Composition.Mvvm; + using CDP4Dal; using CDP4Dal.Events; - using CDP4Dal.Permission; + using CDP4Dal.Permission; + using ReactiveUI; /// @@ -27,16 +49,15 @@ namespace CDP4CommonView /// public partial class EmailAddressRowViewModel : RowViewModelBase { - /// - /// Backing field for + /// Backing field for property /// - private VcardEmailAddressKind vcardType; + private string value; /// - /// Backing field for + /// Backing field for property /// - private string value; + private VcardEmailAddressKind vcardType; /// /// Initializes a new instance of the class @@ -49,26 +70,24 @@ public EmailAddressRowViewModel(EmailAddress emailAddress, ISession session, IVi this.UpdateProperties(); } - /// - /// Gets or sets the VcardType + /// Gets or sets the Value /// - public VcardEmailAddressKind VcardType + public string Value { - get { return this.vcardType; } - set { this.RaiseAndSetIfChanged(ref this.vcardType, value); } + get { return this.value; } + set { this.RaiseAndSetIfChanged(ref this.value, value); } } /// - /// Gets or sets the Value + /// Gets or sets the VcardType /// - public string Value + public VcardEmailAddressKind VcardType { - get { return this.value; } - set { this.RaiseAndSetIfChanged(ref this.value, value); } + get { return this.vcardType; } + set { this.RaiseAndSetIfChanged(ref this.vcardType, value); } } - /// /// The event-handler that is invoked by the subscription that listens for updates /// on the that is being represented by the view-model @@ -79,6 +98,7 @@ public string Value protected override void ObjectChangeEventHandler(ObjectChangedEvent objectChange) { base.ObjectChangeEventHandler(objectChange); + this.UpdateProperties(); } @@ -87,9 +107,8 @@ protected override void ObjectChangeEventHandler(ObjectChangedEvent objectChange /// private void UpdateProperties() { - this.ModifiedOn = this.Thing.ModifiedOn; - this.VcardType = this.Thing.VcardType; this.Value = this.Thing.Value; + this.VcardType = this.Thing.VcardType; } } } diff --git a/CDP4Composition/CommonView/AutoGenRows/EngineeringModelDataAnnotationRowViewModel.cs b/CDP4Composition/CommonView/AutoGenRows/EngineeringModelDataAnnotationRowViewModel.cs index e508e3539..8bfab8733 100644 --- a/CDP4Composition/CommonView/AutoGenRows/EngineeringModelDataAnnotationRowViewModel.cs +++ b/CDP4Composition/CommonView/AutoGenRows/EngineeringModelDataAnnotationRowViewModel.cs @@ -1,25 +1,47 @@ -// ------------------------------------------------------------------------------------------------- +// -------------------------------------------------------------------------------------------------------------------- // -// Copyright (c) 2015-2018 RHEA System S.A. +// Copyright (c) 2015-2021 RHEA System S.A. +// +// Author: Sam Gerené, Alex Vorobiev, Naron Phou, Alexander van Delft, Nathanael Smiechowski, Ahmed Abulwafa Ahmed +// +// This file is part of CDP4-IME Community Edition. +// This is an auto-generated class. Any manual changes to this file will be overwritten! +// +// The CDP4-IME Community Edition is free software; you can redistribute it and/or +// modify it under the terms of the GNU Affero General Public +// License as published by the Free Software Foundation; either +// version 3 of the License, or (at your option) any later version. +// +// The CDP4-IME Community Edition is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +// Lesser General Public License for more details. +// +// You should have received a copy of the GNU Affero General Public License +// along with this program. If not, see . // // // This is an auto-generated class. Any manual changes on this file will be overwritten! // -// ------------------------------------------------------------------------------------------------- +// -------------------------------------------------------------------------------------------------------------------- namespace CDP4CommonView { using System; using System.Reactive.Linq; + using CDP4Common.CommonData; using CDP4Common.DiagramData; using CDP4Common.EngineeringModelData; using CDP4Common.ReportingData; using CDP4Common.SiteDirectoryData; + using CDP4Composition.Mvvm; + using CDP4Dal; using CDP4Dal.Events; - using CDP4Dal.Permission; + using CDP4Dal.Permission; + using ReactiveUI; /// @@ -27,14 +49,13 @@ namespace CDP4CommonView /// public abstract partial class EngineeringModelDataAnnotationRowViewModel : GenericAnnotationRowViewModel where T : EngineeringModelDataAnnotation { - /// - /// Backing field for + /// Backing field for property /// private Participant author; /// - /// Backing field for + /// Backing field for property /// private ModellingThingReference primaryAnnotatedThing; @@ -49,7 +70,6 @@ protected EngineeringModelDataAnnotationRowViewModel(T engineeringModelDataAnnot this.UpdateProperties(); } - /// /// Gets or sets the Author /// @@ -68,7 +88,6 @@ public ModellingThingReference PrimaryAnnotatedThing set { this.RaiseAndSetIfChanged(ref this.primaryAnnotatedThing, value); } } - /// /// The event-handler that is invoked by the subscription that listens for updates /// on the that is being represented by the view-model @@ -79,6 +98,7 @@ public ModellingThingReference PrimaryAnnotatedThing protected override void ObjectChangeEventHandler(ObjectChangedEvent objectChange) { base.ObjectChangeEventHandler(objectChange); + this.UpdateProperties(); } @@ -87,7 +107,6 @@ protected override void ObjectChangeEventHandler(ObjectChangedEvent objectChange /// private void UpdateProperties() { - this.ModifiedOn = this.Thing.ModifiedOn; this.Author = this.Thing.Author; this.PrimaryAnnotatedThing = this.Thing.PrimaryAnnotatedThing; } diff --git a/CDP4Composition/CommonView/AutoGenRows/EngineeringModelDataDiscussionItemRowViewModel.cs b/CDP4Composition/CommonView/AutoGenRows/EngineeringModelDataDiscussionItemRowViewModel.cs index 94b5cd55d..f463455ce 100644 --- a/CDP4Composition/CommonView/AutoGenRows/EngineeringModelDataDiscussionItemRowViewModel.cs +++ b/CDP4Composition/CommonView/AutoGenRows/EngineeringModelDataDiscussionItemRowViewModel.cs @@ -1,25 +1,47 @@ -// ------------------------------------------------------------------------------------------------- +// -------------------------------------------------------------------------------------------------------------------- // -// Copyright (c) 2015-2018 RHEA System S.A. +// Copyright (c) 2015-2021 RHEA System S.A. +// +// Author: Sam Gerené, Alex Vorobiev, Naron Phou, Alexander van Delft, Nathanael Smiechowski, Ahmed Abulwafa Ahmed +// +// This file is part of CDP4-IME Community Edition. +// This is an auto-generated class. Any manual changes to this file will be overwritten! +// +// The CDP4-IME Community Edition is free software; you can redistribute it and/or +// modify it under the terms of the GNU Affero General Public +// License as published by the Free Software Foundation; either +// version 3 of the License, or (at your option) any later version. +// +// The CDP4-IME Community Edition is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +// Lesser General Public License for more details. +// +// You should have received a copy of the GNU Affero General Public License +// along with this program. If not, see . // // // This is an auto-generated class. Any manual changes on this file will be overwritten! // -// ------------------------------------------------------------------------------------------------- +// -------------------------------------------------------------------------------------------------------------------- namespace CDP4CommonView { using System; using System.Reactive.Linq; + using CDP4Common.CommonData; using CDP4Common.DiagramData; using CDP4Common.EngineeringModelData; using CDP4Common.ReportingData; using CDP4Common.SiteDirectoryData; + using CDP4Composition.Mvvm; + using CDP4Dal; using CDP4Dal.Events; - using CDP4Dal.Permission; + using CDP4Dal.Permission; + using ReactiveUI; /// @@ -27,9 +49,8 @@ namespace CDP4CommonView /// public partial class EngineeringModelDataDiscussionItemRowViewModel : DiscussionItemRowViewModel { - /// - /// Backing field for + /// Backing field for property /// private Participant author; @@ -44,7 +65,6 @@ public EngineeringModelDataDiscussionItemRowViewModel(EngineeringModelDataDiscus this.UpdateProperties(); } - /// /// Gets or sets the Author /// @@ -54,7 +74,6 @@ public Participant Author set { this.RaiseAndSetIfChanged(ref this.author, value); } } - /// /// The event-handler that is invoked by the subscription that listens for updates /// on the that is being represented by the view-model @@ -65,6 +84,7 @@ public Participant Author protected override void ObjectChangeEventHandler(ObjectChangedEvent objectChange) { base.ObjectChangeEventHandler(objectChange); + this.UpdateProperties(); } @@ -73,7 +93,6 @@ protected override void ObjectChangeEventHandler(ObjectChangedEvent objectChange /// private void UpdateProperties() { - this.ModifiedOn = this.Thing.ModifiedOn; this.Author = this.Thing.Author; } } diff --git a/CDP4Composition/CommonView/AutoGenRows/EngineeringModelDataNoteRowViewModel.cs b/CDP4Composition/CommonView/AutoGenRows/EngineeringModelDataNoteRowViewModel.cs index dec70276a..51760abf3 100644 --- a/CDP4Composition/CommonView/AutoGenRows/EngineeringModelDataNoteRowViewModel.cs +++ b/CDP4Composition/CommonView/AutoGenRows/EngineeringModelDataNoteRowViewModel.cs @@ -1,25 +1,47 @@ -// ------------------------------------------------------------------------------------------------- +// -------------------------------------------------------------------------------------------------------------------- // -// Copyright (c) 2015-2018 RHEA System S.A. +// Copyright (c) 2015-2021 RHEA System S.A. +// +// Author: Sam Gerené, Alex Vorobiev, Naron Phou, Alexander van Delft, Nathanael Smiechowski, Ahmed Abulwafa Ahmed +// +// This file is part of CDP4-IME Community Edition. +// This is an auto-generated class. Any manual changes to this file will be overwritten! +// +// The CDP4-IME Community Edition is free software; you can redistribute it and/or +// modify it under the terms of the GNU Affero General Public +// License as published by the Free Software Foundation; either +// version 3 of the License, or (at your option) any later version. +// +// The CDP4-IME Community Edition is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +// Lesser General Public License for more details. +// +// You should have received a copy of the GNU Affero General Public License +// along with this program. If not, see . // // // This is an auto-generated class. Any manual changes on this file will be overwritten! // -// ------------------------------------------------------------------------------------------------- +// -------------------------------------------------------------------------------------------------------------------- namespace CDP4CommonView { using System; using System.Reactive.Linq; + using CDP4Common.CommonData; using CDP4Common.DiagramData; using CDP4Common.EngineeringModelData; using CDP4Common.ReportingData; using CDP4Common.SiteDirectoryData; + using CDP4Composition.Mvvm; + using CDP4Dal; using CDP4Dal.Events; - using CDP4Dal.Permission; + using CDP4Dal.Permission; + using ReactiveUI; /// @@ -27,7 +49,6 @@ namespace CDP4CommonView /// public partial class EngineeringModelDataNoteRowViewModel : EngineeringModelDataAnnotationRowViewModel { - /// /// Initializes a new instance of the class /// @@ -36,9 +57,28 @@ public partial class EngineeringModelDataNoteRowViewModel : EngineeringModelData /// The that is the container of this public EngineeringModelDataNoteRowViewModel(EngineeringModelDataNote engineeringModelDataNote, ISession session, IViewModelBase containerViewModel) : base(engineeringModelDataNote, session, containerViewModel) { + this.UpdateProperties(); } + /// + /// The event-handler that is invoked by the subscription that listens for updates + /// on the that is being represented by the view-model + /// + /// + /// The payload of the event that is being handled + /// + protected override void ObjectChangeEventHandler(ObjectChangedEvent objectChange) + { + base.ObjectChangeEventHandler(objectChange); + + this.UpdateProperties(); + } - + /// + /// Updates the properties of this row + /// + private void UpdateProperties() + { + } } } diff --git a/CDP4Composition/CommonView/AutoGenRows/EngineeringModelRowViewModel.cs b/CDP4Composition/CommonView/AutoGenRows/EngineeringModelRowViewModel.cs index 98c1fb77b..dac50d30a 100644 --- a/CDP4Composition/CommonView/AutoGenRows/EngineeringModelRowViewModel.cs +++ b/CDP4Composition/CommonView/AutoGenRows/EngineeringModelRowViewModel.cs @@ -1,25 +1,47 @@ -// ------------------------------------------------------------------------------------------------- +// -------------------------------------------------------------------------------------------------------------------- // -// Copyright (c) 2015-2018 RHEA System S.A. +// Copyright (c) 2015-2021 RHEA System S.A. +// +// Author: Sam Gerené, Alex Vorobiev, Naron Phou, Alexander van Delft, Nathanael Smiechowski, Ahmed Abulwafa Ahmed +// +// This file is part of CDP4-IME Community Edition. +// This is an auto-generated class. Any manual changes to this file will be overwritten! +// +// The CDP4-IME Community Edition is free software; you can redistribute it and/or +// modify it under the terms of the GNU Affero General Public +// License as published by the Free Software Foundation; either +// version 3 of the License, or (at your option) any later version. +// +// The CDP4-IME Community Edition is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +// Lesser General Public License for more details. +// +// You should have received a copy of the GNU Affero General Public License +// along with this program. If not, see . // // // This is an auto-generated class. Any manual changes on this file will be overwritten! // -// ------------------------------------------------------------------------------------------------- +// -------------------------------------------------------------------------------------------------------------------- namespace CDP4CommonView { using System; using System.Reactive.Linq; + using CDP4Common.CommonData; using CDP4Common.DiagramData; using CDP4Common.EngineeringModelData; using CDP4Common.ReportingData; using CDP4Common.SiteDirectoryData; + using CDP4Composition.Mvvm; + using CDP4Dal; using CDP4Dal.Events; - using CDP4Dal.Permission; + using CDP4Dal.Permission; + using ReactiveUI; /// @@ -27,21 +49,20 @@ namespace CDP4CommonView /// public partial class EngineeringModelRowViewModel : TopContainerRowViewModel { - /// - /// Backing field for + /// Backing field for property /// private EngineeringModelSetup engineeringModelSetup; /// - /// Backing field for + /// Backing field for property /// - private string engineeringModelSetupShortName; + private string engineeringModelSetupName; /// - /// Backing field for + /// Backing field for property /// - private string engineeringModelSetupName; + private string engineeringModelSetupShortName; /// /// Initializes a new instance of the class @@ -54,7 +75,6 @@ public EngineeringModelRowViewModel(EngineeringModel engineeringModel, ISession this.UpdateProperties(); } - /// /// Gets or sets the EngineeringModelSetup /// @@ -65,24 +85,23 @@ public EngineeringModelSetup EngineeringModelSetup } /// - /// Gets or set the ShortName of + /// Gets or set the Name of /// - public string EngineeringModelSetupShortName + public string EngineeringModelSetupName { - get { return this.engineeringModelSetupShortName; } - set { this.RaiseAndSetIfChanged(ref this.engineeringModelSetupShortName, value); } + get { return this.engineeringModelSetupName; } + set { this.RaiseAndSetIfChanged(ref this.engineeringModelSetupName, value); } } /// - /// Gets or set the Name of + /// Gets or set the ShortName of /// - public string EngineeringModelSetupName + public string EngineeringModelSetupShortName { - get { return this.engineeringModelSetupName; } - set { this.RaiseAndSetIfChanged(ref this.engineeringModelSetupName, value); } + get { return this.engineeringModelSetupShortName; } + set { this.RaiseAndSetIfChanged(ref this.engineeringModelSetupShortName, value); } } - /// /// The event-handler that is invoked by the subscription that listens for updates /// on the that is being represented by the view-model @@ -93,6 +112,7 @@ public string EngineeringModelSetupName protected override void ObjectChangeEventHandler(ObjectChangedEvent objectChange) { base.ObjectChangeEventHandler(objectChange); + this.UpdateProperties(); } @@ -101,13 +121,17 @@ protected override void ObjectChangeEventHandler(ObjectChangedEvent objectChange /// private void UpdateProperties() { - this.ModifiedOn = this.Thing.ModifiedOn; - if (this.Thing.EngineeringModelSetup != null) - { - this.EngineeringModelSetupShortName = this.Thing.EngineeringModelSetup.ShortName; - this.EngineeringModelSetupName = this.Thing.EngineeringModelSetup.Name; - } this.EngineeringModelSetup = this.Thing.EngineeringModelSetup; + if (this.Thing.EngineeringModelSetup != null) + { + this.EngineeringModelSetupName = this.Thing.EngineeringModelSetup.Name; + this.EngineeringModelSetupShortName = this.Thing.EngineeringModelSetup.ShortName; + } + else + { + this.EngineeringModelSetupName = string.Empty; + this.EngineeringModelSetupShortName = string.Empty; + } } } } diff --git a/CDP4Composition/CommonView/AutoGenRows/EngineeringModelSetupRowViewModel.cs b/CDP4Composition/CommonView/AutoGenRows/EngineeringModelSetupRowViewModel.cs index c81511664..116b6036b 100644 --- a/CDP4Composition/CommonView/AutoGenRows/EngineeringModelSetupRowViewModel.cs +++ b/CDP4Composition/CommonView/AutoGenRows/EngineeringModelSetupRowViewModel.cs @@ -1,25 +1,47 @@ -// ------------------------------------------------------------------------------------------------- +// -------------------------------------------------------------------------------------------------------------------- // -// Copyright (c) 2015-2018 RHEA System S.A. +// Copyright (c) 2015-2021 RHEA System S.A. +// +// Author: Sam Gerené, Alex Vorobiev, Naron Phou, Alexander van Delft, Nathanael Smiechowski, Ahmed Abulwafa Ahmed +// +// This file is part of CDP4-IME Community Edition. +// This is an auto-generated class. Any manual changes to this file will be overwritten! +// +// The CDP4-IME Community Edition is free software; you can redistribute it and/or +// modify it under the terms of the GNU Affero General Public +// License as published by the Free Software Foundation; either +// version 3 of the License, or (at your option) any later version. +// +// The CDP4-IME Community Edition is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +// Lesser General Public License for more details. +// +// You should have received a copy of the GNU Affero General Public License +// along with this program. If not, see . // // // This is an auto-generated class. Any manual changes on this file will be overwritten! // -// ------------------------------------------------------------------------------------------------- +// -------------------------------------------------------------------------------------------------------------------- namespace CDP4CommonView { using System; using System.Reactive.Linq; + using CDP4Common.CommonData; using CDP4Common.DiagramData; using CDP4Common.EngineeringModelData; using CDP4Common.ReportingData; using CDP4Common.SiteDirectoryData; + using CDP4Composition.Mvvm; + using CDP4Dal; using CDP4Dal.Events; - using CDP4Dal.Permission; + using CDP4Dal.Permission; + using ReactiveUI; /// @@ -27,26 +49,25 @@ namespace CDP4CommonView /// public partial class EngineeringModelSetupRowViewModel : DefinedThingRowViewModel { - /// - /// Backing field for + /// Backing field for property /// - private EngineeringModelKind kind; + private Guid engineeringModelIid; /// - /// Backing field for + /// Backing field for property /// - private StudyPhaseKind studyPhase; + private EngineeringModelKind kind; /// - /// Backing field for + /// Backing field for property /// - private Guid engineeringModelIid; + private Guid sourceEngineeringModelSetupIid; /// - /// Backing field for + /// Backing field for property /// - private Guid sourceEngineeringModelSetupIid; + private StudyPhaseKind studyPhase; /// /// Initializes a new instance of the class @@ -59,44 +80,42 @@ public EngineeringModelSetupRowViewModel(EngineeringModelSetup engineeringModelS this.UpdateProperties(); } - /// - /// Gets or sets the Kind + /// Gets or sets the EngineeringModelIid /// - public EngineeringModelKind Kind + public Guid EngineeringModelIid { - get { return this.kind; } - set { this.RaiseAndSetIfChanged(ref this.kind, value); } + get { return this.engineeringModelIid; } + set { this.RaiseAndSetIfChanged(ref this.engineeringModelIid, value); } } /// - /// Gets or sets the StudyPhase + /// Gets or sets the Kind /// - public StudyPhaseKind StudyPhase + public EngineeringModelKind Kind { - get { return this.studyPhase; } - set { this.RaiseAndSetIfChanged(ref this.studyPhase, value); } + get { return this.kind; } + set { this.RaiseAndSetIfChanged(ref this.kind, value); } } /// - /// Gets or sets the EngineeringModelIid + /// Gets or sets the SourceEngineeringModelSetupIid /// - public Guid EngineeringModelIid + public Guid SourceEngineeringModelSetupIid { - get { return this.engineeringModelIid; } - set { this.RaiseAndSetIfChanged(ref this.engineeringModelIid, value); } + get { return this.sourceEngineeringModelSetupIid; } + set { this.RaiseAndSetIfChanged(ref this.sourceEngineeringModelSetupIid, value); } } /// - /// Gets or sets the SourceEngineeringModelSetupIid + /// Gets or sets the StudyPhase /// - public Guid SourceEngineeringModelSetupIid + public StudyPhaseKind StudyPhase { - get { return this.sourceEngineeringModelSetupIid; } - set { this.RaiseAndSetIfChanged(ref this.sourceEngineeringModelSetupIid, value); } + get { return this.studyPhase; } + set { this.RaiseAndSetIfChanged(ref this.studyPhase, value); } } - /// /// The event-handler that is invoked by the subscription that listens for updates /// on the that is being represented by the view-model @@ -107,6 +126,7 @@ public Guid SourceEngineeringModelSetupIid protected override void ObjectChangeEventHandler(ObjectChangedEvent objectChange) { base.ObjectChangeEventHandler(objectChange); + this.UpdateProperties(); } @@ -115,14 +135,13 @@ protected override void ObjectChangeEventHandler(ObjectChangedEvent objectChange /// private void UpdateProperties() { - this.ModifiedOn = this.Thing.ModifiedOn; - this.Kind = this.Thing.Kind; - this.StudyPhase = this.Thing.StudyPhase; this.EngineeringModelIid = this.Thing.EngineeringModelIid; - if(this.Thing.SourceEngineeringModelSetupIid.HasValue) + this.Kind = this.Thing.Kind; + if (this.Thing.SourceEngineeringModelSetupIid.HasValue) { this.SourceEngineeringModelSetupIid = this.Thing.SourceEngineeringModelSetupIid.Value; } + this.StudyPhase = this.Thing.StudyPhase; } } } diff --git a/CDP4Composition/CommonView/AutoGenRows/EnumerationParameterTypeRowViewModel.cs b/CDP4Composition/CommonView/AutoGenRows/EnumerationParameterTypeRowViewModel.cs index e33ba142c..155f1e5de 100644 --- a/CDP4Composition/CommonView/AutoGenRows/EnumerationParameterTypeRowViewModel.cs +++ b/CDP4Composition/CommonView/AutoGenRows/EnumerationParameterTypeRowViewModel.cs @@ -1,25 +1,47 @@ -// ------------------------------------------------------------------------------------------------- +// -------------------------------------------------------------------------------------------------------------------- // -// Copyright (c) 2015-2018 RHEA System S.A. +// Copyright (c) 2015-2021 RHEA System S.A. +// +// Author: Sam Gerené, Alex Vorobiev, Naron Phou, Alexander van Delft, Nathanael Smiechowski, Ahmed Abulwafa Ahmed +// +// This file is part of CDP4-IME Community Edition. +// This is an auto-generated class. Any manual changes to this file will be overwritten! +// +// The CDP4-IME Community Edition is free software; you can redistribute it and/or +// modify it under the terms of the GNU Affero General Public +// License as published by the Free Software Foundation; either +// version 3 of the License, or (at your option) any later version. +// +// The CDP4-IME Community Edition is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +// Lesser General Public License for more details. +// +// You should have received a copy of the GNU Affero General Public License +// along with this program. If not, see . // // // This is an auto-generated class. Any manual changes on this file will be overwritten! // -// ------------------------------------------------------------------------------------------------- +// -------------------------------------------------------------------------------------------------------------------- namespace CDP4CommonView { using System; using System.Reactive.Linq; + using CDP4Common.CommonData; using CDP4Common.DiagramData; using CDP4Common.EngineeringModelData; using CDP4Common.ReportingData; using CDP4Common.SiteDirectoryData; + using CDP4Composition.Mvvm; + using CDP4Dal; using CDP4Dal.Events; - using CDP4Dal.Permission; + using CDP4Dal.Permission; + using ReactiveUI; /// @@ -27,9 +49,8 @@ namespace CDP4CommonView /// public partial class EnumerationParameterTypeRowViewModel : ScalarParameterTypeRowViewModel { - /// - /// Backing field for + /// Backing field for property /// private bool allowMultiSelect; @@ -44,7 +65,6 @@ public EnumerationParameterTypeRowViewModel(EnumerationParameterType enumeration this.UpdateProperties(); } - /// /// Gets or sets the AllowMultiSelect /// @@ -54,7 +74,6 @@ public bool AllowMultiSelect set { this.RaiseAndSetIfChanged(ref this.allowMultiSelect, value); } } - /// /// The event-handler that is invoked by the subscription that listens for updates /// on the that is being represented by the view-model @@ -65,6 +84,7 @@ public bool AllowMultiSelect protected override void ObjectChangeEventHandler(ObjectChangedEvent objectChange) { base.ObjectChangeEventHandler(objectChange); + this.UpdateProperties(); } @@ -73,7 +93,6 @@ protected override void ObjectChangeEventHandler(ObjectChangedEvent objectChange /// private void UpdateProperties() { - this.ModifiedOn = this.Thing.ModifiedOn; this.AllowMultiSelect = this.Thing.AllowMultiSelect; } } diff --git a/CDP4Composition/CommonView/AutoGenRows/EnumerationValueDefinitionRowViewModel.cs b/CDP4Composition/CommonView/AutoGenRows/EnumerationValueDefinitionRowViewModel.cs index 95b3a508f..5892b5195 100644 --- a/CDP4Composition/CommonView/AutoGenRows/EnumerationValueDefinitionRowViewModel.cs +++ b/CDP4Composition/CommonView/AutoGenRows/EnumerationValueDefinitionRowViewModel.cs @@ -1,25 +1,47 @@ -// ------------------------------------------------------------------------------------------------- +// -------------------------------------------------------------------------------------------------------------------- // -// Copyright (c) 2015-2018 RHEA System S.A. +// Copyright (c) 2015-2021 RHEA System S.A. +// +// Author: Sam Gerené, Alex Vorobiev, Naron Phou, Alexander van Delft, Nathanael Smiechowski, Ahmed Abulwafa Ahmed +// +// This file is part of CDP4-IME Community Edition. +// This is an auto-generated class. Any manual changes to this file will be overwritten! +// +// The CDP4-IME Community Edition is free software; you can redistribute it and/or +// modify it under the terms of the GNU Affero General Public +// License as published by the Free Software Foundation; either +// version 3 of the License, or (at your option) any later version. +// +// The CDP4-IME Community Edition is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +// Lesser General Public License for more details. +// +// You should have received a copy of the GNU Affero General Public License +// along with this program. If not, see . // // // This is an auto-generated class. Any manual changes on this file will be overwritten! // -// ------------------------------------------------------------------------------------------------- +// -------------------------------------------------------------------------------------------------------------------- namespace CDP4CommonView { using System; using System.Reactive.Linq; + using CDP4Common.CommonData; using CDP4Common.DiagramData; using CDP4Common.EngineeringModelData; using CDP4Common.ReportingData; using CDP4Common.SiteDirectoryData; + using CDP4Composition.Mvvm; + using CDP4Dal; using CDP4Dal.Events; - using CDP4Dal.Permission; + using CDP4Dal.Permission; + using ReactiveUI; /// @@ -27,7 +49,6 @@ namespace CDP4CommonView /// public partial class EnumerationValueDefinitionRowViewModel : DefinedThingRowViewModel { - /// /// Initializes a new instance of the class /// @@ -36,9 +57,28 @@ public partial class EnumerationValueDefinitionRowViewModel : DefinedThingRowVie /// The that is the container of this public EnumerationValueDefinitionRowViewModel(EnumerationValueDefinition enumerationValueDefinition, ISession session, IViewModelBase containerViewModel) : base(enumerationValueDefinition, session, containerViewModel) { + this.UpdateProperties(); } + /// + /// The event-handler that is invoked by the subscription that listens for updates + /// on the that is being represented by the view-model + /// + /// + /// The payload of the event that is being handled + /// + protected override void ObjectChangeEventHandler(ObjectChangedEvent objectChange) + { + base.ObjectChangeEventHandler(objectChange); + + this.UpdateProperties(); + } - + /// + /// Updates the properties of this row + /// + private void UpdateProperties() + { + } } } diff --git a/CDP4Composition/CommonView/AutoGenRows/ExclusiveOrExpressionRowViewModel.cs b/CDP4Composition/CommonView/AutoGenRows/ExclusiveOrExpressionRowViewModel.cs index 66c9cc7a5..cec0bdfcf 100644 --- a/CDP4Composition/CommonView/AutoGenRows/ExclusiveOrExpressionRowViewModel.cs +++ b/CDP4Composition/CommonView/AutoGenRows/ExclusiveOrExpressionRowViewModel.cs @@ -1,25 +1,47 @@ -// ------------------------------------------------------------------------------------------------- +// -------------------------------------------------------------------------------------------------------------------- // -// Copyright (c) 2015-2018 RHEA System S.A. +// Copyright (c) 2015-2021 RHEA System S.A. +// +// Author: Sam Gerené, Alex Vorobiev, Naron Phou, Alexander van Delft, Nathanael Smiechowski, Ahmed Abulwafa Ahmed +// +// This file is part of CDP4-IME Community Edition. +// This is an auto-generated class. Any manual changes to this file will be overwritten! +// +// The CDP4-IME Community Edition is free software; you can redistribute it and/or +// modify it under the terms of the GNU Affero General Public +// License as published by the Free Software Foundation; either +// version 3 of the License, or (at your option) any later version. +// +// The CDP4-IME Community Edition is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +// Lesser General Public License for more details. +// +// You should have received a copy of the GNU Affero General Public License +// along with this program. If not, see . // // // This is an auto-generated class. Any manual changes on this file will be overwritten! // -// ------------------------------------------------------------------------------------------------- +// -------------------------------------------------------------------------------------------------------------------- namespace CDP4CommonView { using System; using System.Reactive.Linq; + using CDP4Common.CommonData; using CDP4Common.DiagramData; using CDP4Common.EngineeringModelData; using CDP4Common.ReportingData; using CDP4Common.SiteDirectoryData; + using CDP4Composition.Mvvm; + using CDP4Dal; using CDP4Dal.Events; - using CDP4Dal.Permission; + using CDP4Dal.Permission; + using ReactiveUI; /// @@ -27,7 +49,6 @@ namespace CDP4CommonView /// public partial class ExclusiveOrExpressionRowViewModel : BooleanExpressionRowViewModel { - /// /// Initializes a new instance of the class /// @@ -36,9 +57,28 @@ public partial class ExclusiveOrExpressionRowViewModel : BooleanExpressionRowVie /// The that is the container of this public ExclusiveOrExpressionRowViewModel(ExclusiveOrExpression exclusiveOrExpression, ISession session, IViewModelBase containerViewModel) : base(exclusiveOrExpression, session, containerViewModel) { + this.UpdateProperties(); } + /// + /// The event-handler that is invoked by the subscription that listens for updates + /// on the that is being represented by the view-model + /// + /// + /// The payload of the event that is being handled + /// + protected override void ObjectChangeEventHandler(ObjectChangedEvent objectChange) + { + base.ObjectChangeEventHandler(objectChange); + + this.UpdateProperties(); + } - + /// + /// Updates the properties of this row + /// + private void UpdateProperties() + { + } } } diff --git a/CDP4Composition/CommonView/AutoGenRows/ExternalIdentifierMapRowViewModel.cs b/CDP4Composition/CommonView/AutoGenRows/ExternalIdentifierMapRowViewModel.cs index ea7547af2..9c66551c9 100644 --- a/CDP4Composition/CommonView/AutoGenRows/ExternalIdentifierMapRowViewModel.cs +++ b/CDP4Composition/CommonView/AutoGenRows/ExternalIdentifierMapRowViewModel.cs @@ -1,25 +1,47 @@ -// ------------------------------------------------------------------------------------------------- +// -------------------------------------------------------------------------------------------------------------------- // -// Copyright (c) 2015-2018 RHEA System S.A. +// Copyright (c) 2015-2021 RHEA System S.A. +// +// Author: Sam Gerené, Alex Vorobiev, Naron Phou, Alexander van Delft, Nathanael Smiechowski, Ahmed Abulwafa Ahmed +// +// This file is part of CDP4-IME Community Edition. +// This is an auto-generated class. Any manual changes to this file will be overwritten! +// +// The CDP4-IME Community Edition is free software; you can redistribute it and/or +// modify it under the terms of the GNU Affero General Public +// License as published by the Free Software Foundation; either +// version 3 of the License, or (at your option) any later version. +// +// The CDP4-IME Community Edition is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +// Lesser General Public License for more details. +// +// You should have received a copy of the GNU Affero General Public License +// along with this program. If not, see . // // // This is an auto-generated class. Any manual changes on this file will be overwritten! // -// ------------------------------------------------------------------------------------------------- +// -------------------------------------------------------------------------------------------------------------------- namespace CDP4CommonView { using System; using System.Reactive.Linq; + using CDP4Common.CommonData; using CDP4Common.DiagramData; using CDP4Common.EngineeringModelData; using CDP4Common.ReportingData; using CDP4Common.SiteDirectoryData; + using CDP4Composition.Mvvm; + using CDP4Dal; using CDP4Dal.Events; - using CDP4Dal.Permission; + using CDP4Dal.Permission; + using ReactiveUI; /// @@ -27,56 +49,55 @@ namespace CDP4CommonView /// public partial class ExternalIdentifierMapRowViewModel : RowViewModelBase { - /// - /// Backing field for + /// Backing field for property /// - private string externalModelName; + private ReferenceSource externalFormat; /// - /// Backing field for + /// Backing field for property /// - private string externalToolName; + private string externalFormatName; /// - /// Backing field for + /// Backing field for property /// - private string externalToolVersion; + private string externalFormatShortName; /// - /// Backing field for + /// Backing field for property /// - private string name; + private string externalModelName; /// - /// Backing field for + /// Backing field for property /// - private ReferenceSource externalFormat; + private string externalToolName; /// - /// Backing field for + /// Backing field for property /// - private string externalFormatShortName; + private string externalToolVersion; /// - /// Backing field for + /// Backing field for property /// - private string externalFormatName; + private string name; /// - /// Backing field for + /// Backing field for property /// private DomainOfExpertise owner; /// - /// Backing field for + /// Backing field for property /// - private string ownerShortName; + private string ownerName; /// - /// Backing field for + /// Backing field for property /// - private string ownerName; + private string ownerShortName; /// /// Initializes a new instance of the class @@ -89,6 +110,32 @@ public ExternalIdentifierMapRowViewModel(ExternalIdentifierMap externalIdentifie this.UpdateProperties(); } + /// + /// Gets or sets the ExternalFormat + /// + public ReferenceSource ExternalFormat + { + get { return this.externalFormat; } + set { this.RaiseAndSetIfChanged(ref this.externalFormat, value); } + } + + /// + /// Gets or set the Name of + /// + public string ExternalFormatName + { + get { return this.externalFormatName; } + set { this.RaiseAndSetIfChanged(ref this.externalFormatName, value); } + } + + /// + /// Gets or set the ShortName of + /// + public string ExternalFormatShortName + { + get { return this.externalFormatShortName; } + set { this.RaiseAndSetIfChanged(ref this.externalFormatShortName, value); } + } /// /// Gets or sets the ExternalModelName @@ -126,33 +173,6 @@ public string Name set { this.RaiseAndSetIfChanged(ref this.name, value); } } - /// - /// Gets or sets the ExternalFormat - /// - public ReferenceSource ExternalFormat - { - get { return this.externalFormat; } - set { this.RaiseAndSetIfChanged(ref this.externalFormat, value); } - } - - /// - /// Gets or set the ShortName of - /// - public string ExternalFormatShortName - { - get { return this.externalFormatShortName; } - set { this.RaiseAndSetIfChanged(ref this.externalFormatShortName, value); } - } - - /// - /// Gets or set the Name of - /// - public string ExternalFormatName - { - get { return this.externalFormatName; } - set { this.RaiseAndSetIfChanged(ref this.externalFormatName, value); } - } - /// /// Gets or sets the Owner /// @@ -163,24 +183,23 @@ public DomainOfExpertise Owner } /// - /// Gets or set the ShortName of + /// Gets or set the Name of /// - public string OwnerShortName + public string OwnerName { - get { return this.ownerShortName; } - set { this.RaiseAndSetIfChanged(ref this.ownerShortName, value); } + get { return this.ownerName; } + set { this.RaiseAndSetIfChanged(ref this.ownerName, value); } } /// - /// Gets or set the Name of + /// Gets or set the ShortName of /// - public string OwnerName + public string OwnerShortName { - get { return this.ownerName; } - set { this.RaiseAndSetIfChanged(ref this.ownerName, value); } + get { return this.ownerShortName; } + set { this.RaiseAndSetIfChanged(ref this.ownerShortName, value); } } - /// /// The event-handler that is invoked by the subscription that listens for updates /// on the that is being represented by the view-model @@ -191,6 +210,7 @@ public string OwnerName protected override void ObjectChangeEventHandler(ObjectChangedEvent objectChange) { base.ObjectChangeEventHandler(objectChange); + this.UpdateProperties(); } @@ -199,23 +219,32 @@ protected override void ObjectChangeEventHandler(ObjectChangedEvent objectChange /// private void UpdateProperties() { - this.ModifiedOn = this.Thing.ModifiedOn; + this.ExternalFormat = this.Thing.ExternalFormat; + if (this.Thing.ExternalFormat != null) + { + this.ExternalFormatName = this.Thing.ExternalFormat.Name; + this.ExternalFormatShortName = this.Thing.ExternalFormat.ShortName; + } + else + { + this.ExternalFormatName = string.Empty; + this.ExternalFormatShortName = string.Empty; + } this.ExternalModelName = this.Thing.ExternalModelName; this.ExternalToolName = this.Thing.ExternalToolName; this.ExternalToolVersion = this.Thing.ExternalToolVersion; this.Name = this.Thing.Name; - if (this.Thing.ExternalFormat != null) - { - this.ExternalFormatShortName = this.Thing.ExternalFormat.ShortName; - this.ExternalFormatName = this.Thing.ExternalFormat.Name; - } - this.ExternalFormat = this.Thing.ExternalFormat; - if (this.Thing.Owner != null) - { - this.OwnerShortName = this.Thing.Owner.ShortName; - this.OwnerName = this.Thing.Owner.Name; - } this.Owner = this.Thing.Owner; + if (this.Thing.Owner != null) + { + this.OwnerName = this.Thing.Owner.Name; + this.OwnerShortName = this.Thing.Owner.ShortName; + } + else + { + this.OwnerName = string.Empty; + this.OwnerShortName = string.Empty; + } } } } diff --git a/CDP4Composition/CommonView/AutoGenRows/FileRevisionRowViewModel.cs b/CDP4Composition/CommonView/AutoGenRows/FileRevisionRowViewModel.cs index 36ac17ccd..f00fceb42 100644 --- a/CDP4Composition/CommonView/AutoGenRows/FileRevisionRowViewModel.cs +++ b/CDP4Composition/CommonView/AutoGenRows/FileRevisionRowViewModel.cs @@ -1,25 +1,47 @@ -// ------------------------------------------------------------------------------------------------- +// -------------------------------------------------------------------------------------------------------------------- // -// Copyright (c) 2015-2018 RHEA System S.A. +// Copyright (c) 2015-2021 RHEA System S.A. +// +// Author: Sam Gerené, Alex Vorobiev, Naron Phou, Alexander van Delft, Nathanael Smiechowski, Ahmed Abulwafa Ahmed +// +// This file is part of CDP4-IME Community Edition. +// This is an auto-generated class. Any manual changes to this file will be overwritten! +// +// The CDP4-IME Community Edition is free software; you can redistribute it and/or +// modify it under the terms of the GNU Affero General Public +// License as published by the Free Software Foundation; either +// version 3 of the License, or (at your option) any later version. +// +// The CDP4-IME Community Edition is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +// Lesser General Public License for more details. +// +// You should have received a copy of the GNU Affero General Public License +// along with this program. If not, see . // // // This is an auto-generated class. Any manual changes on this file will be overwritten! // -// ------------------------------------------------------------------------------------------------- +// -------------------------------------------------------------------------------------------------------------------- namespace CDP4CommonView { using System; using System.Reactive.Linq; + using CDP4Common.CommonData; using CDP4Common.DiagramData; using CDP4Common.EngineeringModelData; using CDP4Common.ReportingData; using CDP4Common.SiteDirectoryData; + using CDP4Composition.Mvvm; + using CDP4Dal; using CDP4Dal.Events; - using CDP4Dal.Permission; + using CDP4Dal.Permission; + using ReactiveUI; /// @@ -27,36 +49,40 @@ namespace CDP4CommonView /// public partial class FileRevisionRowViewModel : RowViewModelBase { + /// + /// Backing field for property + /// + private Folder containingFolder; /// - /// Backing field for + /// Backing field for property /// - private string contentHash; + private string containingFolderName; /// - /// Backing field for + /// Backing field for property /// - private string path; + private string contentHash; /// - /// Backing field for + /// Backing field for property /// private DateTime createdOn; /// - /// Backing field for + /// Backing field for property /// - private string name; + private Participant creator; /// - /// Backing field for + /// Backing field for property /// - private Participant creator; + private string name; /// - /// Backing field for + /// Backing field for property /// - private Folder containingFolder; + private string path; /// /// Initializes a new instance of the class @@ -69,23 +95,31 @@ public FileRevisionRowViewModel(FileRevision fileRevision, ISession session, IVi this.UpdateProperties(); } + /// + /// Gets or sets the ContainingFolder + /// + public Folder ContainingFolder + { + get { return this.containingFolder; } + set { this.RaiseAndSetIfChanged(ref this.containingFolder, value); } + } /// - /// Gets or sets the ContentHash + /// Gets or set the Name of /// - public string ContentHash + public string ContainingFolderName { - get { return this.contentHash; } - set { this.RaiseAndSetIfChanged(ref this.contentHash, value); } + get { return this.containingFolderName; } + set { this.RaiseAndSetIfChanged(ref this.containingFolderName, value); } } /// - /// Gets or sets the Path + /// Gets or sets the ContentHash /// - public string Path + public string ContentHash { - get { return this.path; } - set { this.RaiseAndSetIfChanged(ref this.path, value); } + get { return this.contentHash; } + set { this.RaiseAndSetIfChanged(ref this.contentHash, value); } } /// @@ -98,33 +132,32 @@ public DateTime CreatedOn } /// - /// Gets or sets the Name + /// Gets or sets the Creator /// - public string Name + public Participant Creator { - get { return this.name; } - set { this.RaiseAndSetIfChanged(ref this.name, value); } + get { return this.creator; } + set { this.RaiseAndSetIfChanged(ref this.creator, value); } } /// - /// Gets or sets the Creator + /// Gets or sets the Name /// - public Participant Creator + public string Name { - get { return this.creator; } - set { this.RaiseAndSetIfChanged(ref this.creator, value); } + get { return this.name; } + set { this.RaiseAndSetIfChanged(ref this.name, value); } } /// - /// Gets or sets the ContainingFolder + /// Gets or sets the Path /// - public Folder ContainingFolder + public string Path { - get { return this.containingFolder; } - set { this.RaiseAndSetIfChanged(ref this.containingFolder, value); } + get { return this.path; } + set { this.RaiseAndSetIfChanged(ref this.path, value); } } - /// /// The event-handler that is invoked by the subscription that listens for updates /// on the that is being represented by the view-model @@ -135,6 +168,7 @@ public Folder ContainingFolder protected override void ObjectChangeEventHandler(ObjectChangedEvent objectChange) { base.ObjectChangeEventHandler(objectChange); + this.UpdateProperties(); } @@ -143,13 +177,20 @@ protected override void ObjectChangeEventHandler(ObjectChangedEvent objectChange /// private void UpdateProperties() { - this.ModifiedOn = this.Thing.ModifiedOn; + this.ContainingFolder = this.Thing.ContainingFolder; + if (this.Thing.ContainingFolder != null) + { + this.ContainingFolderName = this.Thing.ContainingFolder.Name; + } + else + { + this.ContainingFolderName = string.Empty; + } this.ContentHash = this.Thing.ContentHash; - this.Path = this.Thing.Path; this.CreatedOn = this.Thing.CreatedOn; - this.Name = this.Thing.Name; this.Creator = this.Thing.Creator; - this.ContainingFolder = this.Thing.ContainingFolder; + this.Name = this.Thing.Name; + this.Path = this.Thing.Path; } } } diff --git a/CDP4Composition/CommonView/AutoGenRows/FileRowViewModel.cs b/CDP4Composition/CommonView/AutoGenRows/FileRowViewModel.cs index 96fa1101d..d00c01aaf 100644 --- a/CDP4Composition/CommonView/AutoGenRows/FileRowViewModel.cs +++ b/CDP4Composition/CommonView/AutoGenRows/FileRowViewModel.cs @@ -1,25 +1,47 @@ -// ------------------------------------------------------------------------------------------------- +// -------------------------------------------------------------------------------------------------------------------- // -// Copyright (c) 2015-2018 RHEA System S.A. +// Copyright (c) 2015-2021 RHEA System S.A. +// +// Author: Sam Gerené, Alex Vorobiev, Naron Phou, Alexander van Delft, Nathanael Smiechowski, Ahmed Abulwafa Ahmed +// +// This file is part of CDP4-IME Community Edition. +// This is an auto-generated class. Any manual changes to this file will be overwritten! +// +// The CDP4-IME Community Edition is free software; you can redistribute it and/or +// modify it under the terms of the GNU Affero General Public +// License as published by the Free Software Foundation; either +// version 3 of the License, or (at your option) any later version. +// +// The CDP4-IME Community Edition is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +// Lesser General Public License for more details. +// +// You should have received a copy of the GNU Affero General Public License +// along with this program. If not, see . // // // This is an auto-generated class. Any manual changes on this file will be overwritten! // -// ------------------------------------------------------------------------------------------------- +// -------------------------------------------------------------------------------------------------------------------- namespace CDP4CommonView { using System; using System.Reactive.Linq; + using CDP4Common.CommonData; using CDP4Common.DiagramData; using CDP4Common.EngineeringModelData; using CDP4Common.ReportingData; using CDP4Common.SiteDirectoryData; + using CDP4Composition.Mvvm; + using CDP4Dal; using CDP4Dal.Events; - using CDP4Dal.Permission; + using CDP4Dal.Permission; + using ReactiveUI; /// @@ -27,27 +49,36 @@ namespace CDP4CommonView /// public partial class FileRowViewModel : RowViewModelBase { - /// - /// Backing field for + /// Backing field for property /// private Person lockedBy; /// - /// Backing field for + /// Backing field for property /// - private DomainOfExpertise owner; + private string lockedByName; /// - /// Backing field for + /// Backing field for property /// - private string ownerShortName; + private string lockedByShortName; + + /// + /// Backing field for property + /// + private DomainOfExpertise owner; /// - /// Backing field for + /// Backing field for property /// private string ownerName; + /// + /// Backing field for property + /// + private string ownerShortName; + /// /// Initializes a new instance of the class /// @@ -59,7 +90,6 @@ public FileRowViewModel(File file, ISession session, IViewModelBase conta this.UpdateProperties(); } - /// /// Gets or sets the LockedBy /// @@ -70,21 +100,30 @@ public Person LockedBy } /// - /// Gets or sets the Owner + /// Gets or set the Name of /// - public DomainOfExpertise Owner + public string LockedByName { - get { return this.owner; } - set { this.RaiseAndSetIfChanged(ref this.owner, value); } + get { return this.lockedByName; } + set { this.RaiseAndSetIfChanged(ref this.lockedByName, value); } } /// - /// Gets or set the ShortName of + /// Gets or set the ShortName of /// - public string OwnerShortName + public string LockedByShortName { - get { return this.ownerShortName; } - set { this.RaiseAndSetIfChanged(ref this.ownerShortName, value); } + get { return this.lockedByShortName; } + set { this.RaiseAndSetIfChanged(ref this.lockedByShortName, value); } + } + + /// + /// Gets or sets the Owner + /// + public DomainOfExpertise Owner + { + get { return this.owner; } + set { this.RaiseAndSetIfChanged(ref this.owner, value); } } /// @@ -96,7 +135,15 @@ public string OwnerName set { this.RaiseAndSetIfChanged(ref this.ownerName, value); } } - + /// + /// Gets or set the ShortName of + /// + public string OwnerShortName + { + get { return this.ownerShortName; } + set { this.RaiseAndSetIfChanged(ref this.ownerShortName, value); } + } + /// /// The event-handler that is invoked by the subscription that listens for updates /// on the that is being represented by the view-model @@ -107,6 +154,7 @@ public string OwnerName protected override void ObjectChangeEventHandler(ObjectChangedEvent objectChange) { base.ObjectChangeEventHandler(objectChange); + this.UpdateProperties(); } @@ -115,14 +163,28 @@ protected override void ObjectChangeEventHandler(ObjectChangedEvent objectChange /// private void UpdateProperties() { - this.ModifiedOn = this.Thing.ModifiedOn; this.LockedBy = this.Thing.LockedBy; - if (this.Thing.Owner != null) - { - this.OwnerShortName = this.Thing.Owner.ShortName; - this.OwnerName = this.Thing.Owner.Name; - } + if (this.Thing.LockedBy != null) + { + this.LockedByName = this.Thing.LockedBy.Name; + this.LockedByShortName = this.Thing.LockedBy.ShortName; + } + else + { + this.LockedByName = string.Empty; + this.LockedByShortName = string.Empty; + } this.Owner = this.Thing.Owner; + if (this.Thing.Owner != null) + { + this.OwnerName = this.Thing.Owner.Name; + this.OwnerShortName = this.Thing.Owner.ShortName; + } + else + { + this.OwnerName = string.Empty; + this.OwnerShortName = string.Empty; + } } } } diff --git a/CDP4Composition/CommonView/AutoGenRows/FileStoreRowViewModel.cs b/CDP4Composition/CommonView/AutoGenRows/FileStoreRowViewModel.cs index cead3fa08..723e09283 100644 --- a/CDP4Composition/CommonView/AutoGenRows/FileStoreRowViewModel.cs +++ b/CDP4Composition/CommonView/AutoGenRows/FileStoreRowViewModel.cs @@ -1,25 +1,47 @@ -// ------------------------------------------------------------------------------------------------- +// -------------------------------------------------------------------------------------------------------------------- // -// Copyright (c) 2015-2018 RHEA System S.A. +// Copyright (c) 2015-2021 RHEA System S.A. +// +// Author: Sam Gerené, Alex Vorobiev, Naron Phou, Alexander van Delft, Nathanael Smiechowski, Ahmed Abulwafa Ahmed +// +// This file is part of CDP4-IME Community Edition. +// This is an auto-generated class. Any manual changes to this file will be overwritten! +// +// The CDP4-IME Community Edition is free software; you can redistribute it and/or +// modify it under the terms of the GNU Affero General Public +// License as published by the Free Software Foundation; either +// version 3 of the License, or (at your option) any later version. +// +// The CDP4-IME Community Edition is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +// Lesser General Public License for more details. +// +// You should have received a copy of the GNU Affero General Public License +// along with this program. If not, see . // // // This is an auto-generated class. Any manual changes on this file will be overwritten! // -// ------------------------------------------------------------------------------------------------- +// -------------------------------------------------------------------------------------------------------------------- namespace CDP4CommonView { using System; using System.Reactive.Linq; + using CDP4Common.CommonData; using CDP4Common.DiagramData; using CDP4Common.EngineeringModelData; using CDP4Common.ReportingData; using CDP4Common.SiteDirectoryData; + using CDP4Composition.Mvvm; + using CDP4Dal; using CDP4Dal.Events; - using CDP4Dal.Permission; + using CDP4Dal.Permission; + using ReactiveUI; /// @@ -27,31 +49,30 @@ namespace CDP4CommonView /// public abstract partial class FileStoreRowViewModel : RowViewModelBase where T : FileStore { - /// - /// Backing field for + /// Backing field for property /// - private string name; + private DateTime createdOn; /// - /// Backing field for + /// Backing field for property /// - private DateTime createdOn; + private string name; /// - /// Backing field for + /// Backing field for property /// private DomainOfExpertise owner; /// - /// Backing field for + /// Backing field for property /// - private string ownerShortName; + private string ownerName; /// - /// Backing field for + /// Backing field for property /// - private string ownerName; + private string ownerShortName; /// /// Initializes a new instance of the class @@ -64,23 +85,22 @@ protected FileStoreRowViewModel(T fileStore, ISession session, IViewModelBase - /// Gets or sets the Name + /// Gets or sets the CreatedOn /// - public string Name + public DateTime CreatedOn { - get { return this.name; } - set { this.RaiseAndSetIfChanged(ref this.name, value); } + get { return this.createdOn; } + set { this.RaiseAndSetIfChanged(ref this.createdOn, value); } } /// - /// Gets or sets the CreatedOn + /// Gets or sets the Name /// - public DateTime CreatedOn + public string Name { - get { return this.createdOn; } - set { this.RaiseAndSetIfChanged(ref this.createdOn, value); } + get { return this.name; } + set { this.RaiseAndSetIfChanged(ref this.name, value); } } /// @@ -93,24 +113,23 @@ public DomainOfExpertise Owner } /// - /// Gets or set the ShortName of + /// Gets or set the Name of /// - public string OwnerShortName + public string OwnerName { - get { return this.ownerShortName; } - set { this.RaiseAndSetIfChanged(ref this.ownerShortName, value); } + get { return this.ownerName; } + set { this.RaiseAndSetIfChanged(ref this.ownerName, value); } } /// - /// Gets or set the Name of + /// Gets or set the ShortName of /// - public string OwnerName + public string OwnerShortName { - get { return this.ownerName; } - set { this.RaiseAndSetIfChanged(ref this.ownerName, value); } + get { return this.ownerShortName; } + set { this.RaiseAndSetIfChanged(ref this.ownerShortName, value); } } - /// /// The event-handler that is invoked by the subscription that listens for updates /// on the that is being represented by the view-model @@ -121,6 +140,7 @@ public string OwnerName protected override void ObjectChangeEventHandler(ObjectChangedEvent objectChange) { base.ObjectChangeEventHandler(objectChange); + this.UpdateProperties(); } @@ -129,15 +149,19 @@ protected override void ObjectChangeEventHandler(ObjectChangedEvent objectChange /// private void UpdateProperties() { - this.ModifiedOn = this.Thing.ModifiedOn; - this.Name = this.Thing.Name; this.CreatedOn = this.Thing.CreatedOn; - if (this.Thing.Owner != null) - { - this.OwnerShortName = this.Thing.Owner.ShortName; - this.OwnerName = this.Thing.Owner.Name; - } + this.Name = this.Thing.Name; this.Owner = this.Thing.Owner; + if (this.Thing.Owner != null) + { + this.OwnerName = this.Thing.Owner.Name; + this.OwnerShortName = this.Thing.Owner.ShortName; + } + else + { + this.OwnerName = string.Empty; + this.OwnerShortName = string.Empty; + } } } } diff --git a/CDP4Composition/CommonView/AutoGenRows/FileTypeRowViewModel.cs b/CDP4Composition/CommonView/AutoGenRows/FileTypeRowViewModel.cs index 665399726..f7c7cad92 100644 --- a/CDP4Composition/CommonView/AutoGenRows/FileTypeRowViewModel.cs +++ b/CDP4Composition/CommonView/AutoGenRows/FileTypeRowViewModel.cs @@ -1,25 +1,47 @@ -// ------------------------------------------------------------------------------------------------- +// -------------------------------------------------------------------------------------------------------------------- // -// Copyright (c) 2015-2018 RHEA System S.A. +// Copyright (c) 2015-2021 RHEA System S.A. +// +// Author: Sam Gerené, Alex Vorobiev, Naron Phou, Alexander van Delft, Nathanael Smiechowski, Ahmed Abulwafa Ahmed +// +// This file is part of CDP4-IME Community Edition. +// This is an auto-generated class. Any manual changes to this file will be overwritten! +// +// The CDP4-IME Community Edition is free software; you can redistribute it and/or +// modify it under the terms of the GNU Affero General Public +// License as published by the Free Software Foundation; either +// version 3 of the License, or (at your option) any later version. +// +// The CDP4-IME Community Edition is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +// Lesser General Public License for more details. +// +// You should have received a copy of the GNU Affero General Public License +// along with this program. If not, see . // // // This is an auto-generated class. Any manual changes on this file will be overwritten! // -// ------------------------------------------------------------------------------------------------- +// -------------------------------------------------------------------------------------------------------------------- namespace CDP4CommonView { using System; using System.Reactive.Linq; + using CDP4Common.CommonData; using CDP4Common.DiagramData; using CDP4Common.EngineeringModelData; using CDP4Common.ReportingData; using CDP4Common.SiteDirectoryData; + using CDP4Composition.Mvvm; + using CDP4Dal; using CDP4Dal.Events; - using CDP4Dal.Permission; + using CDP4Dal.Permission; + using ReactiveUI; /// @@ -27,14 +49,13 @@ namespace CDP4CommonView /// public partial class FileTypeRowViewModel : DefinedThingRowViewModel { - /// - /// Backing field for + /// Backing field for property /// private string extension; /// - /// Backing field for + /// Backing field for property /// private bool isDeprecated; @@ -49,7 +70,6 @@ public FileTypeRowViewModel(FileType fileType, ISession session, IViewModelBase< this.UpdateProperties(); } - /// /// Gets or sets the Extension /// @@ -68,7 +88,6 @@ public bool IsDeprecated set { this.RaiseAndSetIfChanged(ref this.isDeprecated, value); } } - /// /// The event-handler that is invoked by the subscription that listens for updates /// on the that is being represented by the view-model @@ -79,6 +98,7 @@ public bool IsDeprecated protected override void ObjectChangeEventHandler(ObjectChangedEvent objectChange) { base.ObjectChangeEventHandler(objectChange); + this.UpdateProperties(); } @@ -87,7 +107,6 @@ protected override void ObjectChangeEventHandler(ObjectChangedEvent objectChange /// private void UpdateProperties() { - this.ModifiedOn = this.Thing.ModifiedOn; this.Extension = this.Thing.Extension; this.IsDeprecated = this.Thing.IsDeprecated; } diff --git a/CDP4Composition/CommonView/AutoGenRows/FolderRowViewModel.cs b/CDP4Composition/CommonView/AutoGenRows/FolderRowViewModel.cs index 31881e850..156a52c3e 100644 --- a/CDP4Composition/CommonView/AutoGenRows/FolderRowViewModel.cs +++ b/CDP4Composition/CommonView/AutoGenRows/FolderRowViewModel.cs @@ -1,25 +1,47 @@ -// ------------------------------------------------------------------------------------------------- +// -------------------------------------------------------------------------------------------------------------------- // -// Copyright (c) 2015-2018 RHEA System S.A. +// Copyright (c) 2015-2021 RHEA System S.A. +// +// Author: Sam Gerené, Alex Vorobiev, Naron Phou, Alexander van Delft, Nathanael Smiechowski, Ahmed Abulwafa Ahmed +// +// This file is part of CDP4-IME Community Edition. +// This is an auto-generated class. Any manual changes to this file will be overwritten! +// +// The CDP4-IME Community Edition is free software; you can redistribute it and/or +// modify it under the terms of the GNU Affero General Public +// License as published by the Free Software Foundation; either +// version 3 of the License, or (at your option) any later version. +// +// The CDP4-IME Community Edition is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +// Lesser General Public License for more details. +// +// You should have received a copy of the GNU Affero General Public License +// along with this program. If not, see . // // // This is an auto-generated class. Any manual changes on this file will be overwritten! // -// ------------------------------------------------------------------------------------------------- +// -------------------------------------------------------------------------------------------------------------------- namespace CDP4CommonView { using System; using System.Reactive.Linq; + using CDP4Common.CommonData; using CDP4Common.DiagramData; using CDP4Common.EngineeringModelData; using CDP4Common.ReportingData; using CDP4Common.SiteDirectoryData; + using CDP4Composition.Mvvm; + using CDP4Dal; using CDP4Dal.Events; - using CDP4Dal.Permission; + using CDP4Dal.Permission; + using ReactiveUI; /// @@ -27,46 +49,50 @@ namespace CDP4CommonView /// public partial class FolderRowViewModel : RowViewModelBase { - /// - /// Backing field for + /// Backing field for property /// - private string path; + private Folder containingFolder; /// - /// Backing field for + /// Backing field for property /// - private string name; + private string containingFolderName; /// - /// Backing field for + /// Backing field for property /// private DateTime createdOn; /// - /// Backing field for + /// Backing field for property /// private Participant creator; /// - /// Backing field for + /// Backing field for property /// - private Folder containingFolder; + private string name; /// - /// Backing field for + /// Backing field for property /// private DomainOfExpertise owner; /// - /// Backing field for + /// Backing field for property + /// + private string ownerName; + + /// + /// Backing field for property /// private string ownerShortName; /// - /// Backing field for + /// Backing field for property /// - private string ownerName; + private string path; /// /// Initializes a new instance of the class @@ -79,23 +105,22 @@ public FolderRowViewModel(Folder folder, ISession session, IViewModelBase this.UpdateProperties(); } - /// - /// Gets or sets the Path + /// Gets or sets the ContainingFolder /// - public string Path + public Folder ContainingFolder { - get { return this.path; } - set { this.RaiseAndSetIfChanged(ref this.path, value); } + get { return this.containingFolder; } + set { this.RaiseAndSetIfChanged(ref this.containingFolder, value); } } /// - /// Gets or sets the Name + /// Gets or set the Name of /// - public string Name + public string ContainingFolderName { - get { return this.name; } - set { this.RaiseAndSetIfChanged(ref this.name, value); } + get { return this.containingFolderName; } + set { this.RaiseAndSetIfChanged(ref this.containingFolderName, value); } } /// @@ -117,12 +142,12 @@ public Participant Creator } /// - /// Gets or sets the ContainingFolder + /// Gets or sets the Name /// - public Folder ContainingFolder + public string Name { - get { return this.containingFolder; } - set { this.RaiseAndSetIfChanged(ref this.containingFolder, value); } + get { return this.name; } + set { this.RaiseAndSetIfChanged(ref this.name, value); } } /// @@ -134,6 +159,15 @@ public DomainOfExpertise Owner set { this.RaiseAndSetIfChanged(ref this.owner, value); } } + /// + /// Gets or set the Name of + /// + public string OwnerName + { + get { return this.ownerName; } + set { this.RaiseAndSetIfChanged(ref this.ownerName, value); } + } + /// /// Gets or set the ShortName of /// @@ -144,15 +178,14 @@ public string OwnerShortName } /// - /// Gets or set the Name of + /// Gets or sets the Path /// - public string OwnerName + public string Path { - get { return this.ownerName; } - set { this.RaiseAndSetIfChanged(ref this.ownerName, value); } + get { return this.path; } + set { this.RaiseAndSetIfChanged(ref this.path, value); } } - /// /// The event-handler that is invoked by the subscription that listens for updates /// on the that is being represented by the view-model @@ -163,6 +196,7 @@ public string OwnerName protected override void ObjectChangeEventHandler(ObjectChangedEvent objectChange) { base.ObjectChangeEventHandler(objectChange); + this.UpdateProperties(); } @@ -171,18 +205,30 @@ protected override void ObjectChangeEventHandler(ObjectChangedEvent objectChange /// private void UpdateProperties() { - this.ModifiedOn = this.Thing.ModifiedOn; - this.Path = this.Thing.Path; - this.Name = this.Thing.Name; + this.ContainingFolder = this.Thing.ContainingFolder; + if (this.Thing.ContainingFolder != null) + { + this.ContainingFolderName = this.Thing.ContainingFolder.Name; + } + else + { + this.ContainingFolderName = string.Empty; + } this.CreatedOn = this.Thing.CreatedOn; this.Creator = this.Thing.Creator; - this.ContainingFolder = this.Thing.ContainingFolder; - if (this.Thing.Owner != null) - { - this.OwnerShortName = this.Thing.Owner.ShortName; - this.OwnerName = this.Thing.Owner.Name; - } + this.Name = this.Thing.Name; this.Owner = this.Thing.Owner; + if (this.Thing.Owner != null) + { + this.OwnerName = this.Thing.Owner.Name; + this.OwnerShortName = this.Thing.Owner.ShortName; + } + else + { + this.OwnerName = string.Empty; + this.OwnerShortName = string.Empty; + } + this.Path = this.Thing.Path; } } } diff --git a/CDP4Composition/CommonView/AutoGenRows/GenericAnnotationRowViewModel.cs b/CDP4Composition/CommonView/AutoGenRows/GenericAnnotationRowViewModel.cs index 7b8905609..630fdeb8f 100644 --- a/CDP4Composition/CommonView/AutoGenRows/GenericAnnotationRowViewModel.cs +++ b/CDP4Composition/CommonView/AutoGenRows/GenericAnnotationRowViewModel.cs @@ -1,25 +1,47 @@ -// ------------------------------------------------------------------------------------------------- +// -------------------------------------------------------------------------------------------------------------------- // -// Copyright (c) 2015-2018 RHEA System S.A. +// Copyright (c) 2015-2021 RHEA System S.A. +// +// Author: Sam Gerené, Alex Vorobiev, Naron Phou, Alexander van Delft, Nathanael Smiechowski, Ahmed Abulwafa Ahmed +// +// This file is part of CDP4-IME Community Edition. +// This is an auto-generated class. Any manual changes to this file will be overwritten! +// +// The CDP4-IME Community Edition is free software; you can redistribute it and/or +// modify it under the terms of the GNU Affero General Public +// License as published by the Free Software Foundation; either +// version 3 of the License, or (at your option) any later version. +// +// The CDP4-IME Community Edition is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +// Lesser General Public License for more details. +// +// You should have received a copy of the GNU Affero General Public License +// along with this program. If not, see . // // // This is an auto-generated class. Any manual changes on this file will be overwritten! // -// ------------------------------------------------------------------------------------------------- +// -------------------------------------------------------------------------------------------------------------------- namespace CDP4CommonView { using System; using System.Reactive.Linq; + using CDP4Common.CommonData; using CDP4Common.DiagramData; using CDP4Common.EngineeringModelData; using CDP4Common.ReportingData; using CDP4Common.SiteDirectoryData; + using CDP4Composition.Mvvm; + using CDP4Dal; using CDP4Dal.Events; - using CDP4Dal.Permission; + using CDP4Dal.Permission; + using ReactiveUI; /// @@ -27,21 +49,20 @@ namespace CDP4CommonView /// public abstract partial class GenericAnnotationRowViewModel : RowViewModelBase where T : GenericAnnotation { - /// - /// Backing field for + /// Backing field for property /// - private string languageCode; + private string content; /// - /// Backing field for + /// Backing field for property /// - private string content; + private DateTime createdOn; /// - /// Backing field for + /// Backing field for property /// - private DateTime createdOn; + private string languageCode; /// /// Initializes a new instance of the class @@ -54,16 +75,6 @@ protected GenericAnnotationRowViewModel(T genericAnnotation, ISession session, I this.UpdateProperties(); } - - /// - /// Gets or sets the LanguageCode - /// - public string LanguageCode - { - get { return this.languageCode; } - set { this.RaiseAndSetIfChanged(ref this.languageCode, value); } - } - /// /// Gets or sets the Content /// @@ -82,7 +93,15 @@ public DateTime CreatedOn set { this.RaiseAndSetIfChanged(ref this.createdOn, value); } } - + /// + /// Gets or sets the LanguageCode + /// + public string LanguageCode + { + get { return this.languageCode; } + set { this.RaiseAndSetIfChanged(ref this.languageCode, value); } + } + /// /// The event-handler that is invoked by the subscription that listens for updates /// on the that is being represented by the view-model @@ -93,6 +112,7 @@ public DateTime CreatedOn protected override void ObjectChangeEventHandler(ObjectChangedEvent objectChange) { base.ObjectChangeEventHandler(objectChange); + this.UpdateProperties(); } @@ -101,10 +121,9 @@ protected override void ObjectChangeEventHandler(ObjectChangedEvent objectChange /// private void UpdateProperties() { - this.ModifiedOn = this.Thing.ModifiedOn; - this.LanguageCode = this.Thing.LanguageCode; this.Content = this.Thing.Content; this.CreatedOn = this.Thing.CreatedOn; + this.LanguageCode = this.Thing.LanguageCode; } } } diff --git a/CDP4Composition/CommonView/AutoGenRows/GlossaryRowViewModel.cs b/CDP4Composition/CommonView/AutoGenRows/GlossaryRowViewModel.cs index 99a5b3bb6..bf9cc43e9 100644 --- a/CDP4Composition/CommonView/AutoGenRows/GlossaryRowViewModel.cs +++ b/CDP4Composition/CommonView/AutoGenRows/GlossaryRowViewModel.cs @@ -1,25 +1,47 @@ -// ------------------------------------------------------------------------------------------------- +// -------------------------------------------------------------------------------------------------------------------- // -// Copyright (c) 2015-2018 RHEA System S.A. +// Copyright (c) 2015-2021 RHEA System S.A. +// +// Author: Sam Gerené, Alex Vorobiev, Naron Phou, Alexander van Delft, Nathanael Smiechowski, Ahmed Abulwafa Ahmed +// +// This file is part of CDP4-IME Community Edition. +// This is an auto-generated class. Any manual changes to this file will be overwritten! +// +// The CDP4-IME Community Edition is free software; you can redistribute it and/or +// modify it under the terms of the GNU Affero General Public +// License as published by the Free Software Foundation; either +// version 3 of the License, or (at your option) any later version. +// +// The CDP4-IME Community Edition is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +// Lesser General Public License for more details. +// +// You should have received a copy of the GNU Affero General Public License +// along with this program. If not, see . // // // This is an auto-generated class. Any manual changes on this file will be overwritten! // -// ------------------------------------------------------------------------------------------------- +// -------------------------------------------------------------------------------------------------------------------- namespace CDP4CommonView { using System; using System.Reactive.Linq; + using CDP4Common.CommonData; using CDP4Common.DiagramData; using CDP4Common.EngineeringModelData; using CDP4Common.ReportingData; using CDP4Common.SiteDirectoryData; + using CDP4Composition.Mvvm; + using CDP4Dal; using CDP4Dal.Events; - using CDP4Dal.Permission; + using CDP4Dal.Permission; + using ReactiveUI; /// @@ -27,9 +49,8 @@ namespace CDP4CommonView /// public partial class GlossaryRowViewModel : DefinedThingRowViewModel { - /// - /// Backing field for + /// Backing field for property /// private bool isDeprecated; @@ -44,7 +65,6 @@ public GlossaryRowViewModel(Glossary glossary, ISession session, IViewModelBase< this.UpdateProperties(); } - /// /// Gets or sets the IsDeprecated /// @@ -54,7 +74,6 @@ public bool IsDeprecated set { this.RaiseAndSetIfChanged(ref this.isDeprecated, value); } } - /// /// The event-handler that is invoked by the subscription that listens for updates /// on the that is being represented by the view-model @@ -65,6 +84,7 @@ public bool IsDeprecated protected override void ObjectChangeEventHandler(ObjectChangedEvent objectChange) { base.ObjectChangeEventHandler(objectChange); + this.UpdateProperties(); } @@ -73,7 +93,6 @@ protected override void ObjectChangeEventHandler(ObjectChangedEvent objectChange /// private void UpdateProperties() { - this.ModifiedOn = this.Thing.ModifiedOn; this.IsDeprecated = this.Thing.IsDeprecated; } } diff --git a/CDP4Composition/CommonView/AutoGenRows/GoalRowViewModel.cs b/CDP4Composition/CommonView/AutoGenRows/GoalRowViewModel.cs index 2f4d01881..9d7f64299 100644 --- a/CDP4Composition/CommonView/AutoGenRows/GoalRowViewModel.cs +++ b/CDP4Composition/CommonView/AutoGenRows/GoalRowViewModel.cs @@ -1,25 +1,47 @@ -// ------------------------------------------------------------------------------------------------- +// -------------------------------------------------------------------------------------------------------------------- // -// Copyright (c) 2015-2018 RHEA System S.A. +// Copyright (c) 2015-2021 RHEA System S.A. +// +// Author: Sam Gerené, Alex Vorobiev, Naron Phou, Alexander van Delft, Nathanael Smiechowski, Ahmed Abulwafa Ahmed +// +// This file is part of CDP4-IME Community Edition. +// This is an auto-generated class. Any manual changes to this file will be overwritten! +// +// The CDP4-IME Community Edition is free software; you can redistribute it and/or +// modify it under the terms of the GNU Affero General Public +// License as published by the Free Software Foundation; either +// version 3 of the License, or (at your option) any later version. +// +// The CDP4-IME Community Edition is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +// Lesser General Public License for more details. +// +// You should have received a copy of the GNU Affero General Public License +// along with this program. If not, see . // // // This is an auto-generated class. Any manual changes on this file will be overwritten! // -// ------------------------------------------------------------------------------------------------- +// -------------------------------------------------------------------------------------------------------------------- namespace CDP4CommonView { using System; using System.Reactive.Linq; + using CDP4Common.CommonData; using CDP4Common.DiagramData; using CDP4Common.EngineeringModelData; using CDP4Common.ReportingData; using CDP4Common.SiteDirectoryData; + using CDP4Composition.Mvvm; + using CDP4Dal; using CDP4Dal.Events; - using CDP4Dal.Permission; + using CDP4Dal.Permission; + using ReactiveUI; /// @@ -27,7 +49,6 @@ namespace CDP4CommonView /// public partial class GoalRowViewModel : DefinedThingRowViewModel { - /// /// Initializes a new instance of the class /// @@ -36,9 +57,28 @@ public partial class GoalRowViewModel : DefinedThingRowViewModel /// The that is the container of this public GoalRowViewModel(Goal goal, ISession session, IViewModelBase containerViewModel) : base(goal, session, containerViewModel) { + this.UpdateProperties(); } + /// + /// The event-handler that is invoked by the subscription that listens for updates + /// on the that is being represented by the view-model + /// + /// + /// The payload of the event that is being handled + /// + protected override void ObjectChangeEventHandler(ObjectChangedEvent objectChange) + { + base.ObjectChangeEventHandler(objectChange); + + this.UpdateProperties(); + } - + /// + /// Updates the properties of this row + /// + private void UpdateProperties() + { + } } } diff --git a/CDP4Composition/CommonView/AutoGenRows/HyperLinkRowViewModel.cs b/CDP4Composition/CommonView/AutoGenRows/HyperLinkRowViewModel.cs index 17fee532d..078281870 100644 --- a/CDP4Composition/CommonView/AutoGenRows/HyperLinkRowViewModel.cs +++ b/CDP4Composition/CommonView/AutoGenRows/HyperLinkRowViewModel.cs @@ -1,25 +1,47 @@ -// ------------------------------------------------------------------------------------------------- +// -------------------------------------------------------------------------------------------------------------------- // -// Copyright (c) 2015-2018 RHEA System S.A. +// Copyright (c) 2015-2021 RHEA System S.A. +// +// Author: Sam Gerené, Alex Vorobiev, Naron Phou, Alexander van Delft, Nathanael Smiechowski, Ahmed Abulwafa Ahmed +// +// This file is part of CDP4-IME Community Edition. +// This is an auto-generated class. Any manual changes to this file will be overwritten! +// +// The CDP4-IME Community Edition is free software; you can redistribute it and/or +// modify it under the terms of the GNU Affero General Public +// License as published by the Free Software Foundation; either +// version 3 of the License, or (at your option) any later version. +// +// The CDP4-IME Community Edition is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +// Lesser General Public License for more details. +// +// You should have received a copy of the GNU Affero General Public License +// along with this program. If not, see . // // // This is an auto-generated class. Any manual changes on this file will be overwritten! // -// ------------------------------------------------------------------------------------------------- +// -------------------------------------------------------------------------------------------------------------------- namespace CDP4CommonView { using System; using System.Reactive.Linq; + using CDP4Common.CommonData; using CDP4Common.DiagramData; using CDP4Common.EngineeringModelData; using CDP4Common.ReportingData; using CDP4Common.SiteDirectoryData; + using CDP4Composition.Mvvm; + using CDP4Dal; using CDP4Dal.Events; - using CDP4Dal.Permission; + using CDP4Dal.Permission; + using ReactiveUI; /// @@ -27,21 +49,20 @@ namespace CDP4CommonView /// public partial class HyperLinkRowViewModel : RowViewModelBase { - /// - /// Backing field for + /// Backing field for property /// - private string uri; + private string content; /// - /// Backing field for + /// Backing field for property /// private string languageCode; /// - /// Backing field for + /// Backing field for property /// - private string content; + private string uri; /// /// Initializes a new instance of the class @@ -54,14 +75,13 @@ public HyperLinkRowViewModel(HyperLink hyperLink, ISession session, IViewModelBa this.UpdateProperties(); } - /// - /// Gets or sets the Uri + /// Gets or sets the Content /// - public string Uri + public string Content { - get { return this.uri; } - set { this.RaiseAndSetIfChanged(ref this.uri, value); } + get { return this.content; } + set { this.RaiseAndSetIfChanged(ref this.content, value); } } /// @@ -74,15 +94,14 @@ public string LanguageCode } /// - /// Gets or sets the Content + /// Gets or sets the Uri /// - public string Content + public string Uri { - get { return this.content; } - set { this.RaiseAndSetIfChanged(ref this.content, value); } + get { return this.uri; } + set { this.RaiseAndSetIfChanged(ref this.uri, value); } } - /// /// The event-handler that is invoked by the subscription that listens for updates /// on the that is being represented by the view-model @@ -93,6 +112,7 @@ public string Content protected override void ObjectChangeEventHandler(ObjectChangedEvent objectChange) { base.ObjectChangeEventHandler(objectChange); + this.UpdateProperties(); } @@ -101,10 +121,9 @@ protected override void ObjectChangeEventHandler(ObjectChangedEvent objectChange /// private void UpdateProperties() { - this.ModifiedOn = this.Thing.ModifiedOn; - this.Uri = this.Thing.Uri; - this.LanguageCode = this.Thing.LanguageCode; this.Content = this.Thing.Content; + this.LanguageCode = this.Thing.LanguageCode; + this.Uri = this.Thing.Uri; } } } diff --git a/CDP4Composition/CommonView/AutoGenRows/IdCorrespondenceRowViewModel.cs b/CDP4Composition/CommonView/AutoGenRows/IdCorrespondenceRowViewModel.cs index 0a93a60d3..aa167ab1a 100644 --- a/CDP4Composition/CommonView/AutoGenRows/IdCorrespondenceRowViewModel.cs +++ b/CDP4Composition/CommonView/AutoGenRows/IdCorrespondenceRowViewModel.cs @@ -1,25 +1,47 @@ -// ------------------------------------------------------------------------------------------------- +// -------------------------------------------------------------------------------------------------------------------- // -// Copyright (c) 2015-2018 RHEA System S.A. +// Copyright (c) 2015-2021 RHEA System S.A. +// +// Author: Sam Gerené, Alex Vorobiev, Naron Phou, Alexander van Delft, Nathanael Smiechowski, Ahmed Abulwafa Ahmed +// +// This file is part of CDP4-IME Community Edition. +// This is an auto-generated class. Any manual changes to this file will be overwritten! +// +// The CDP4-IME Community Edition is free software; you can redistribute it and/or +// modify it under the terms of the GNU Affero General Public +// License as published by the Free Software Foundation; either +// version 3 of the License, or (at your option) any later version. +// +// The CDP4-IME Community Edition is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +// Lesser General Public License for more details. +// +// You should have received a copy of the GNU Affero General Public License +// along with this program. If not, see . // // // This is an auto-generated class. Any manual changes on this file will be overwritten! // -// ------------------------------------------------------------------------------------------------- +// -------------------------------------------------------------------------------------------------------------------- namespace CDP4CommonView { using System; using System.Reactive.Linq; + using CDP4Common.CommonData; using CDP4Common.DiagramData; using CDP4Common.EngineeringModelData; using CDP4Common.ReportingData; using CDP4Common.SiteDirectoryData; + using CDP4Composition.Mvvm; + using CDP4Dal; using CDP4Dal.Events; - using CDP4Dal.Permission; + using CDP4Dal.Permission; + using ReactiveUI; /// @@ -27,16 +49,30 @@ namespace CDP4CommonView /// public partial class IdCorrespondenceRowViewModel : RowViewModelBase { + /// + /// Backing field for property + /// + private string externalId; /// - /// Backing field for + /// Backing field for property /// private Guid internalThing; /// - /// Backing field for + /// Backing field for property /// - private string externalId; + private DomainOfExpertise owner; + + /// + /// Backing field for property + /// + private string ownerName; + + /// + /// Backing field for property + /// + private string ownerShortName; /// /// Initializes a new instance of the class @@ -49,6 +85,14 @@ public IdCorrespondenceRowViewModel(IdCorrespondence idCorrespondence, ISession this.UpdateProperties(); } + /// + /// Gets or sets the ExternalId + /// + public string ExternalId + { + get { return this.externalId; } + set { this.RaiseAndSetIfChanged(ref this.externalId, value); } + } /// /// Gets or sets the InternalThing @@ -60,15 +104,32 @@ public Guid InternalThing } /// - /// Gets or sets the ExternalId + /// Gets or sets the Owner /// - public string ExternalId + public DomainOfExpertise Owner { - get { return this.externalId; } - set { this.RaiseAndSetIfChanged(ref this.externalId, value); } + get { return this.owner; } + set { this.RaiseAndSetIfChanged(ref this.owner, value); } + } + + /// + /// Gets or set the Name of + /// + public string OwnerName + { + get { return this.ownerName; } + set { this.RaiseAndSetIfChanged(ref this.ownerName, value); } + } + + /// + /// Gets or set the ShortName of + /// + public string OwnerShortName + { + get { return this.ownerShortName; } + set { this.RaiseAndSetIfChanged(ref this.ownerShortName, value); } } - /// /// The event-handler that is invoked by the subscription that listens for updates /// on the that is being represented by the view-model @@ -79,6 +140,7 @@ public string ExternalId protected override void ObjectChangeEventHandler(ObjectChangedEvent objectChange) { base.ObjectChangeEventHandler(objectChange); + this.UpdateProperties(); } @@ -87,9 +149,19 @@ protected override void ObjectChangeEventHandler(ObjectChangedEvent objectChange /// private void UpdateProperties() { - this.ModifiedOn = this.Thing.ModifiedOn; - this.InternalThing = this.Thing.InternalThing; this.ExternalId = this.Thing.ExternalId; + this.InternalThing = this.Thing.InternalThing; + this.Owner = this.Thing.Owner; + if (this.Thing.Owner != null) + { + this.OwnerName = this.Thing.Owner.Name; + this.OwnerShortName = this.Thing.Owner.ShortName; + } + else + { + this.OwnerName = string.Empty; + this.OwnerShortName = string.Empty; + } } } } diff --git a/CDP4Composition/CommonView/AutoGenRows/IntervalScaleRowViewModel.cs b/CDP4Composition/CommonView/AutoGenRows/IntervalScaleRowViewModel.cs index 9dbec8df4..0b2625977 100644 --- a/CDP4Composition/CommonView/AutoGenRows/IntervalScaleRowViewModel.cs +++ b/CDP4Composition/CommonView/AutoGenRows/IntervalScaleRowViewModel.cs @@ -1,25 +1,47 @@ -// ------------------------------------------------------------------------------------------------- +// -------------------------------------------------------------------------------------------------------------------- // -// Copyright (c) 2015-2018 RHEA System S.A. +// Copyright (c) 2015-2021 RHEA System S.A. +// +// Author: Sam Gerené, Alex Vorobiev, Naron Phou, Alexander van Delft, Nathanael Smiechowski, Ahmed Abulwafa Ahmed +// +// This file is part of CDP4-IME Community Edition. +// This is an auto-generated class. Any manual changes to this file will be overwritten! +// +// The CDP4-IME Community Edition is free software; you can redistribute it and/or +// modify it under the terms of the GNU Affero General Public +// License as published by the Free Software Foundation; either +// version 3 of the License, or (at your option) any later version. +// +// The CDP4-IME Community Edition is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +// Lesser General Public License for more details. +// +// You should have received a copy of the GNU Affero General Public License +// along with this program. If not, see . // // // This is an auto-generated class. Any manual changes on this file will be overwritten! // -// ------------------------------------------------------------------------------------------------- +// -------------------------------------------------------------------------------------------------------------------- namespace CDP4CommonView { using System; using System.Reactive.Linq; + using CDP4Common.CommonData; using CDP4Common.DiagramData; using CDP4Common.EngineeringModelData; using CDP4Common.ReportingData; using CDP4Common.SiteDirectoryData; + using CDP4Composition.Mvvm; + using CDP4Dal; using CDP4Dal.Events; - using CDP4Dal.Permission; + using CDP4Dal.Permission; + using ReactiveUI; /// @@ -27,7 +49,6 @@ namespace CDP4CommonView /// public partial class IntervalScaleRowViewModel : MeasurementScaleRowViewModel { - /// /// Initializes a new instance of the class /// @@ -36,9 +57,28 @@ public partial class IntervalScaleRowViewModel : MeasurementScaleRowViewModelThe that is the container of this public IntervalScaleRowViewModel(IntervalScale intervalScale, ISession session, IViewModelBase containerViewModel) : base(intervalScale, session, containerViewModel) { + this.UpdateProperties(); } + /// + /// The event-handler that is invoked by the subscription that listens for updates + /// on the that is being represented by the view-model + /// + /// + /// The payload of the event that is being handled + /// + protected override void ObjectChangeEventHandler(ObjectChangedEvent objectChange) + { + base.ObjectChangeEventHandler(objectChange); + + this.UpdateProperties(); + } - + /// + /// Updates the properties of this row + /// + private void UpdateProperties() + { + } } } diff --git a/CDP4Composition/CommonView/AutoGenRows/IterationRowViewModel.cs b/CDP4Composition/CommonView/AutoGenRows/IterationRowViewModel.cs index 6cfb1dd5f..8c41f9397 100644 --- a/CDP4Composition/CommonView/AutoGenRows/IterationRowViewModel.cs +++ b/CDP4Composition/CommonView/AutoGenRows/IterationRowViewModel.cs @@ -1,25 +1,47 @@ -// ------------------------------------------------------------------------------------------------- +// -------------------------------------------------------------------------------------------------------------------- // -// Copyright (c) 2015-2018 RHEA System S.A. +// Copyright (c) 2015-2021 RHEA System S.A. +// +// Author: Sam Gerené, Alex Vorobiev, Naron Phou, Alexander van Delft, Nathanael Smiechowski, Ahmed Abulwafa Ahmed +// +// This file is part of CDP4-IME Community Edition. +// This is an auto-generated class. Any manual changes to this file will be overwritten! +// +// The CDP4-IME Community Edition is free software; you can redistribute it and/or +// modify it under the terms of the GNU Affero General Public +// License as published by the Free Software Foundation; either +// version 3 of the License, or (at your option) any later version. +// +// The CDP4-IME Community Edition is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +// Lesser General Public License for more details. +// +// You should have received a copy of the GNU Affero General Public License +// along with this program. If not, see . // // // This is an auto-generated class. Any manual changes on this file will be overwritten! // -// ------------------------------------------------------------------------------------------------- +// -------------------------------------------------------------------------------------------------------------------- namespace CDP4CommonView { using System; using System.Reactive.Linq; + using CDP4Common.CommonData; using CDP4Common.DiagramData; using CDP4Common.EngineeringModelData; using CDP4Common.ReportingData; using CDP4Common.SiteDirectoryData; + using CDP4Composition.Mvvm; + using CDP4Dal; using CDP4Dal.Events; - using CDP4Dal.Permission; + using CDP4Dal.Permission; + using ReactiveUI; /// @@ -27,46 +49,45 @@ namespace CDP4CommonView /// public partial class IterationRowViewModel : RowViewModelBase { - /// - /// Backing field for + /// Backing field for property /// - private Guid sourceIterationIid; + private Option defaultOption; /// - /// Backing field for + /// Backing field for property /// - private IterationSetup iterationSetup; + private string defaultOptionName; /// - /// Backing field for + /// Backing field for property /// - private ElementDefinition topElement; + private string defaultOptionShortName; /// - /// Backing field for + /// Backing field for property /// - private string topElementShortName; + private IterationSetup iterationSetup; /// - /// Backing field for + /// Backing field for property /// - private string topElementName; + private Guid sourceIterationIid; /// - /// Backing field for + /// Backing field for property /// - private Option defaultOption; + private ElementDefinition topElement; /// - /// Backing field for + /// Backing field for property /// - private string defaultOptionShortName; + private string topElementName; /// - /// Backing field for + /// Backing field for property /// - private string defaultOptionName; + private string topElementShortName; /// /// Initializes a new instance of the class @@ -79,80 +100,78 @@ public IterationRowViewModel(Iteration iteration, ISession session, IViewModelBa this.UpdateProperties(); } - /// - /// Gets or sets the SourceIterationIid + /// Gets or sets the DefaultOption /// - public Guid SourceIterationIid + public Option DefaultOption { - get { return this.sourceIterationIid; } - set { this.RaiseAndSetIfChanged(ref this.sourceIterationIid, value); } + get { return this.defaultOption; } + set { this.RaiseAndSetIfChanged(ref this.defaultOption, value); } } /// - /// Gets or sets the IterationSetup + /// Gets or set the Name of /// - public IterationSetup IterationSetup + public string DefaultOptionName { - get { return this.iterationSetup; } - set { this.RaiseAndSetIfChanged(ref this.iterationSetup, value); } + get { return this.defaultOptionName; } + set { this.RaiseAndSetIfChanged(ref this.defaultOptionName, value); } } /// - /// Gets or sets the TopElement + /// Gets or set the ShortName of /// - public ElementDefinition TopElement + public string DefaultOptionShortName { - get { return this.topElement; } - set { this.RaiseAndSetIfChanged(ref this.topElement, value); } + get { return this.defaultOptionShortName; } + set { this.RaiseAndSetIfChanged(ref this.defaultOptionShortName, value); } } /// - /// Gets or set the ShortName of + /// Gets or sets the IterationSetup /// - public string TopElementShortName + public IterationSetup IterationSetup { - get { return this.topElementShortName; } - set { this.RaiseAndSetIfChanged(ref this.topElementShortName, value); } + get { return this.iterationSetup; } + set { this.RaiseAndSetIfChanged(ref this.iterationSetup, value); } } /// - /// Gets or set the Name of + /// Gets or sets the SourceIterationIid /// - public string TopElementName + public Guid SourceIterationIid { - get { return this.topElementName; } - set { this.RaiseAndSetIfChanged(ref this.topElementName, value); } + get { return this.sourceIterationIid; } + set { this.RaiseAndSetIfChanged(ref this.sourceIterationIid, value); } } /// - /// Gets or sets the DefaultOption + /// Gets or sets the TopElement /// - public Option DefaultOption + public ElementDefinition TopElement { - get { return this.defaultOption; } - set { this.RaiseAndSetIfChanged(ref this.defaultOption, value); } + get { return this.topElement; } + set { this.RaiseAndSetIfChanged(ref this.topElement, value); } } /// - /// Gets or set the ShortName of + /// Gets or set the Name of /// - public string DefaultOptionShortName + public string TopElementName { - get { return this.defaultOptionShortName; } - set { this.RaiseAndSetIfChanged(ref this.defaultOptionShortName, value); } + get { return this.topElementName; } + set { this.RaiseAndSetIfChanged(ref this.topElementName, value); } } /// - /// Gets or set the Name of + /// Gets or set the ShortName of /// - public string DefaultOptionName + public string TopElementShortName { - get { return this.defaultOptionName; } - set { this.RaiseAndSetIfChanged(ref this.defaultOptionName, value); } + get { return this.topElementShortName; } + set { this.RaiseAndSetIfChanged(ref this.topElementShortName, value); } } - /// /// The event-handler that is invoked by the subscription that listens for updates /// on the that is being represented by the view-model @@ -163,6 +182,7 @@ public string DefaultOptionName protected override void ObjectChangeEventHandler(ObjectChangedEvent objectChange) { base.ObjectChangeEventHandler(objectChange); + this.UpdateProperties(); } @@ -171,24 +191,33 @@ protected override void ObjectChangeEventHandler(ObjectChangedEvent objectChange /// private void UpdateProperties() { - this.ModifiedOn = this.Thing.ModifiedOn; - if(this.Thing.SourceIterationIid.HasValue) + this.DefaultOption = this.Thing.DefaultOption; + if (this.Thing.DefaultOption != null) { - this.SourceIterationIid = this.Thing.SourceIterationIid.Value; + this.DefaultOptionName = this.Thing.DefaultOption.Name; + this.DefaultOptionShortName = this.Thing.DefaultOption.ShortName; + } + else + { + this.DefaultOptionName = string.Empty; + this.DefaultOptionShortName = string.Empty; } this.IterationSetup = this.Thing.IterationSetup; - if (this.Thing.TopElement != null) - { - this.TopElementShortName = this.Thing.TopElement.ShortName; - this.TopElementName = this.Thing.TopElement.Name; - } + if (this.Thing.SourceIterationIid.HasValue) + { + this.SourceIterationIid = this.Thing.SourceIterationIid.Value; + } this.TopElement = this.Thing.TopElement; - if (this.Thing.DefaultOption != null) - { - this.DefaultOptionShortName = this.Thing.DefaultOption.ShortName; - this.DefaultOptionName = this.Thing.DefaultOption.Name; - } - this.DefaultOption = this.Thing.DefaultOption; + if (this.Thing.TopElement != null) + { + this.TopElementName = this.Thing.TopElement.Name; + this.TopElementShortName = this.Thing.TopElement.ShortName; + } + else + { + this.TopElementName = string.Empty; + this.TopElementShortName = string.Empty; + } } } } diff --git a/CDP4Composition/CommonView/AutoGenRows/IterationSetupRowViewModel.cs b/CDP4Composition/CommonView/AutoGenRows/IterationSetupRowViewModel.cs index a943d34d6..9956bbbb1 100644 --- a/CDP4Composition/CommonView/AutoGenRows/IterationSetupRowViewModel.cs +++ b/CDP4Composition/CommonView/AutoGenRows/IterationSetupRowViewModel.cs @@ -1,25 +1,47 @@ -// ------------------------------------------------------------------------------------------------- +// -------------------------------------------------------------------------------------------------------------------- // -// Copyright (c) 2015-2018 RHEA System S.A. +// Copyright (c) 2015-2021 RHEA System S.A. +// +// Author: Sam Gerené, Alex Vorobiev, Naron Phou, Alexander van Delft, Nathanael Smiechowski, Ahmed Abulwafa Ahmed +// +// This file is part of CDP4-IME Community Edition. +// This is an auto-generated class. Any manual changes to this file will be overwritten! +// +// The CDP4-IME Community Edition is free software; you can redistribute it and/or +// modify it under the terms of the GNU Affero General Public +// License as published by the Free Software Foundation; either +// version 3 of the License, or (at your option) any later version. +// +// The CDP4-IME Community Edition is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +// Lesser General Public License for more details. +// +// You should have received a copy of the GNU Affero General Public License +// along with this program. If not, see . // // // This is an auto-generated class. Any manual changes on this file will be overwritten! // -// ------------------------------------------------------------------------------------------------- +// -------------------------------------------------------------------------------------------------------------------- namespace CDP4CommonView { using System; using System.Reactive.Linq; + using CDP4Common.CommonData; using CDP4Common.DiagramData; using CDP4Common.EngineeringModelData; using CDP4Common.ReportingData; using CDP4Common.SiteDirectoryData; + using CDP4Composition.Mvvm; + using CDP4Dal; using CDP4Dal.Events; - using CDP4Dal.Permission; + using CDP4Dal.Permission; + using ReactiveUI; /// @@ -27,39 +49,38 @@ namespace CDP4CommonView /// public partial class IterationSetupRowViewModel : RowViewModelBase { - /// - /// Backing field for + /// Backing field for property /// - private Guid iterationIid; - - /// - /// Backing field for - /// - private int iterationNumber; + private DateTime createdOn; /// - /// Backing field for + /// Backing field for property /// private string description; /// - /// Backing field for + /// Backing field for property /// private DateTime frozenOn; /// - /// Backing field for + /// Backing field for property /// private bool isDeleted; /// - /// Backing field for + /// Backing field for property /// - private DateTime createdOn; + private Guid iterationIid; + + /// + /// Backing field for property + /// + private int iterationNumber; /// - /// Backing field for + /// Backing field for property /// private IterationSetup sourceIterationSetup; @@ -74,23 +95,13 @@ public IterationSetupRowViewModel(IterationSetup iterationSetup, ISession sessio this.UpdateProperties(); } - /// - /// Gets or sets the IterationIid - /// - public Guid IterationIid - { - get { return this.iterationIid; } - set { this.RaiseAndSetIfChanged(ref this.iterationIid, value); } - } - - /// - /// Gets or sets the IterationNumber + /// Gets or sets the CreatedOn /// - public int IterationNumber + public DateTime CreatedOn { - get { return this.iterationNumber; } - set { this.RaiseAndSetIfChanged(ref this.iterationNumber, value); } + get { return this.createdOn; } + set { this.RaiseAndSetIfChanged(ref this.createdOn, value); } } /// @@ -121,12 +132,21 @@ public bool IsDeleted } /// - /// Gets or sets the CreatedOn + /// Gets or sets the IterationIid /// - public DateTime CreatedOn + public Guid IterationIid { - get { return this.createdOn; } - set { this.RaiseAndSetIfChanged(ref this.createdOn, value); } + get { return this.iterationIid; } + set { this.RaiseAndSetIfChanged(ref this.iterationIid, value); } + } + + /// + /// Gets or sets the IterationNumber + /// + public int IterationNumber + { + get { return this.iterationNumber; } + set { this.RaiseAndSetIfChanged(ref this.iterationNumber, value); } } /// @@ -138,7 +158,6 @@ public IterationSetup SourceIterationSetup set { this.RaiseAndSetIfChanged(ref this.sourceIterationSetup, value); } } - /// /// The event-handler that is invoked by the subscription that listens for updates /// on the that is being represented by the view-model @@ -149,6 +168,7 @@ public IterationSetup SourceIterationSetup protected override void ObjectChangeEventHandler(ObjectChangedEvent objectChange) { base.ObjectChangeEventHandler(objectChange); + this.UpdateProperties(); } @@ -157,16 +177,15 @@ protected override void ObjectChangeEventHandler(ObjectChangedEvent objectChange /// private void UpdateProperties() { - this.ModifiedOn = this.Thing.ModifiedOn; - this.IterationIid = this.Thing.IterationIid; - this.IterationNumber = this.Thing.IterationNumber; + this.CreatedOn = this.Thing.CreatedOn; this.Description = this.Thing.Description; - if(this.Thing.FrozenOn.HasValue) + if (this.Thing.FrozenOn.HasValue) { this.FrozenOn = this.Thing.FrozenOn.Value; } this.IsDeleted = this.Thing.IsDeleted; - this.CreatedOn = this.Thing.CreatedOn; + this.IterationIid = this.Thing.IterationIid; + this.IterationNumber = this.Thing.IterationNumber; this.SourceIterationSetup = this.Thing.SourceIterationSetup; } } diff --git a/CDP4Composition/CommonView/AutoGenRows/LinearConversionUnitRowViewModel.cs b/CDP4Composition/CommonView/AutoGenRows/LinearConversionUnitRowViewModel.cs index c22d8b9ec..ce8a6a7fe 100644 --- a/CDP4Composition/CommonView/AutoGenRows/LinearConversionUnitRowViewModel.cs +++ b/CDP4Composition/CommonView/AutoGenRows/LinearConversionUnitRowViewModel.cs @@ -1,25 +1,47 @@ -// ------------------------------------------------------------------------------------------------- +// -------------------------------------------------------------------------------------------------------------------- // -// Copyright (c) 2015-2018 RHEA System S.A. +// Copyright (c) 2015-2021 RHEA System S.A. +// +// Author: Sam Gerené, Alex Vorobiev, Naron Phou, Alexander van Delft, Nathanael Smiechowski, Ahmed Abulwafa Ahmed +// +// This file is part of CDP4-IME Community Edition. +// This is an auto-generated class. Any manual changes to this file will be overwritten! +// +// The CDP4-IME Community Edition is free software; you can redistribute it and/or +// modify it under the terms of the GNU Affero General Public +// License as published by the Free Software Foundation; either +// version 3 of the License, or (at your option) any later version. +// +// The CDP4-IME Community Edition is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +// Lesser General Public License for more details. +// +// You should have received a copy of the GNU Affero General Public License +// along with this program. If not, see . // // // This is an auto-generated class. Any manual changes on this file will be overwritten! // -// ------------------------------------------------------------------------------------------------- +// -------------------------------------------------------------------------------------------------------------------- namespace CDP4CommonView { using System; using System.Reactive.Linq; + using CDP4Common.CommonData; using CDP4Common.DiagramData; using CDP4Common.EngineeringModelData; using CDP4Common.ReportingData; using CDP4Common.SiteDirectoryData; + using CDP4Composition.Mvvm; + using CDP4Dal; using CDP4Dal.Events; - using CDP4Dal.Permission; + using CDP4Dal.Permission; + using ReactiveUI; /// @@ -27,7 +49,6 @@ namespace CDP4CommonView /// public partial class LinearConversionUnitRowViewModel : ConversionBasedUnitRowViewModel { - /// /// Initializes a new instance of the class /// @@ -36,9 +57,28 @@ public partial class LinearConversionUnitRowViewModel : ConversionBasedUnitRowVi /// The that is the container of this public LinearConversionUnitRowViewModel(LinearConversionUnit linearConversionUnit, ISession session, IViewModelBase containerViewModel) : base(linearConversionUnit, session, containerViewModel) { + this.UpdateProperties(); } + /// + /// The event-handler that is invoked by the subscription that listens for updates + /// on the that is being represented by the view-model + /// + /// + /// The payload of the event that is being handled + /// + protected override void ObjectChangeEventHandler(ObjectChangedEvent objectChange) + { + base.ObjectChangeEventHandler(objectChange); + + this.UpdateProperties(); + } - + /// + /// Updates the properties of this row + /// + private void UpdateProperties() + { + } } } diff --git a/CDP4Composition/CommonView/AutoGenRows/LogarithmicScaleRowViewModel.cs b/CDP4Composition/CommonView/AutoGenRows/LogarithmicScaleRowViewModel.cs index 4402f4879..1f2bc8c5c 100644 --- a/CDP4Composition/CommonView/AutoGenRows/LogarithmicScaleRowViewModel.cs +++ b/CDP4Composition/CommonView/AutoGenRows/LogarithmicScaleRowViewModel.cs @@ -1,25 +1,47 @@ -// ------------------------------------------------------------------------------------------------- +// -------------------------------------------------------------------------------------------------------------------- // -// Copyright (c) 2015-2018 RHEA System S.A. +// Copyright (c) 2015-2021 RHEA System S.A. +// +// Author: Sam Gerené, Alex Vorobiev, Naron Phou, Alexander van Delft, Nathanael Smiechowski, Ahmed Abulwafa Ahmed +// +// This file is part of CDP4-IME Community Edition. +// This is an auto-generated class. Any manual changes to this file will be overwritten! +// +// The CDP4-IME Community Edition is free software; you can redistribute it and/or +// modify it under the terms of the GNU Affero General Public +// License as published by the Free Software Foundation; either +// version 3 of the License, or (at your option) any later version. +// +// The CDP4-IME Community Edition is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +// Lesser General Public License for more details. +// +// You should have received a copy of the GNU Affero General Public License +// along with this program. If not, see . // // // This is an auto-generated class. Any manual changes on this file will be overwritten! // -// ------------------------------------------------------------------------------------------------- +// -------------------------------------------------------------------------------------------------------------------- namespace CDP4CommonView { using System; using System.Reactive.Linq; + using CDP4Common.CommonData; using CDP4Common.DiagramData; using CDP4Common.EngineeringModelData; using CDP4Common.ReportingData; using CDP4Common.SiteDirectoryData; + using CDP4Composition.Mvvm; + using CDP4Dal; using CDP4Dal.Events; - using CDP4Dal.Permission; + using CDP4Dal.Permission; + using ReactiveUI; /// @@ -27,36 +49,35 @@ namespace CDP4CommonView /// public partial class LogarithmicScaleRowViewModel : MeasurementScaleRowViewModel { - /// - /// Backing field for + /// Backing field for property /// - private LogarithmBaseKind logarithmBase; + private string exponent; /// - /// Backing field for + /// Backing field for property /// private string factor; /// - /// Backing field for + /// Backing field for property /// - private string exponent; + private LogarithmBaseKind logarithmBase; /// - /// Backing field for + /// Backing field for property /// private QuantityKind referenceQuantityKind; /// - /// Backing field for + /// Backing field for property /// - private string referenceQuantityKindShortName; + private string referenceQuantityKindName; /// - /// Backing field for + /// Backing field for property /// - private string referenceQuantityKindName; + private string referenceQuantityKindShortName; /// /// Initializes a new instance of the class @@ -69,14 +90,13 @@ public LogarithmicScaleRowViewModel(LogarithmicScale logarithmicScale, ISession this.UpdateProperties(); } - /// - /// Gets or sets the LogarithmBase + /// Gets or sets the Exponent /// - public LogarithmBaseKind LogarithmBase + public string Exponent { - get { return this.logarithmBase; } - set { this.RaiseAndSetIfChanged(ref this.logarithmBase, value); } + get { return this.exponent; } + set { this.RaiseAndSetIfChanged(ref this.exponent, value); } } /// @@ -89,12 +109,12 @@ public string Factor } /// - /// Gets or sets the Exponent + /// Gets or sets the LogarithmBase /// - public string Exponent + public LogarithmBaseKind LogarithmBase { - get { return this.exponent; } - set { this.RaiseAndSetIfChanged(ref this.exponent, value); } + get { return this.logarithmBase; } + set { this.RaiseAndSetIfChanged(ref this.logarithmBase, value); } } /// @@ -107,24 +127,23 @@ public QuantityKind ReferenceQuantityKind } /// - /// Gets or set the ShortName of + /// Gets or set the Name of /// - public string ReferenceQuantityKindShortName + public string ReferenceQuantityKindName { - get { return this.referenceQuantityKindShortName; } - set { this.RaiseAndSetIfChanged(ref this.referenceQuantityKindShortName, value); } + get { return this.referenceQuantityKindName; } + set { this.RaiseAndSetIfChanged(ref this.referenceQuantityKindName, value); } } /// - /// Gets or set the Name of + /// Gets or set the ShortName of /// - public string ReferenceQuantityKindName + public string ReferenceQuantityKindShortName { - get { return this.referenceQuantityKindName; } - set { this.RaiseAndSetIfChanged(ref this.referenceQuantityKindName, value); } + get { return this.referenceQuantityKindShortName; } + set { this.RaiseAndSetIfChanged(ref this.referenceQuantityKindShortName, value); } } - /// /// The event-handler that is invoked by the subscription that listens for updates /// on the that is being represented by the view-model @@ -135,6 +154,7 @@ public string ReferenceQuantityKindName protected override void ObjectChangeEventHandler(ObjectChangedEvent objectChange) { base.ObjectChangeEventHandler(objectChange); + this.UpdateProperties(); } @@ -143,16 +163,20 @@ protected override void ObjectChangeEventHandler(ObjectChangedEvent objectChange /// private void UpdateProperties() { - this.ModifiedOn = this.Thing.ModifiedOn; - this.LogarithmBase = this.Thing.LogarithmBase; - this.Factor = this.Thing.Factor; this.Exponent = this.Thing.Exponent; - if (this.Thing.ReferenceQuantityKind != null) - { - this.ReferenceQuantityKindShortName = this.Thing.ReferenceQuantityKind.ShortName; - this.ReferenceQuantityKindName = this.Thing.ReferenceQuantityKind.Name; - } + this.Factor = this.Thing.Factor; + this.LogarithmBase = this.Thing.LogarithmBase; this.ReferenceQuantityKind = this.Thing.ReferenceQuantityKind; + if (this.Thing.ReferenceQuantityKind != null) + { + this.ReferenceQuantityKindName = this.Thing.ReferenceQuantityKind.Name; + this.ReferenceQuantityKindShortName = this.Thing.ReferenceQuantityKind.ShortName; + } + else + { + this.ReferenceQuantityKindName = string.Empty; + this.ReferenceQuantityKindShortName = string.Empty; + } } } } diff --git a/CDP4Composition/CommonView/AutoGenRows/MappingToReferenceScaleRowViewModel.cs b/CDP4Composition/CommonView/AutoGenRows/MappingToReferenceScaleRowViewModel.cs index 99d3d8291..1291d876d 100644 --- a/CDP4Composition/CommonView/AutoGenRows/MappingToReferenceScaleRowViewModel.cs +++ b/CDP4Composition/CommonView/AutoGenRows/MappingToReferenceScaleRowViewModel.cs @@ -1,25 +1,47 @@ -// ------------------------------------------------------------------------------------------------- +// -------------------------------------------------------------------------------------------------------------------- // -// Copyright (c) 2015-2018 RHEA System S.A. +// Copyright (c) 2015-2021 RHEA System S.A. +// +// Author: Sam Gerené, Alex Vorobiev, Naron Phou, Alexander van Delft, Nathanael Smiechowski, Ahmed Abulwafa Ahmed +// +// This file is part of CDP4-IME Community Edition. +// This is an auto-generated class. Any manual changes to this file will be overwritten! +// +// The CDP4-IME Community Edition is free software; you can redistribute it and/or +// modify it under the terms of the GNU Affero General Public +// License as published by the Free Software Foundation; either +// version 3 of the License, or (at your option) any later version. +// +// The CDP4-IME Community Edition is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +// Lesser General Public License for more details. +// +// You should have received a copy of the GNU Affero General Public License +// along with this program. If not, see . // // // This is an auto-generated class. Any manual changes on this file will be overwritten! // -// ------------------------------------------------------------------------------------------------- +// -------------------------------------------------------------------------------------------------------------------- namespace CDP4CommonView { using System; using System.Reactive.Linq; + using CDP4Common.CommonData; using CDP4Common.DiagramData; using CDP4Common.EngineeringModelData; using CDP4Common.ReportingData; using CDP4Common.SiteDirectoryData; + using CDP4Composition.Mvvm; + using CDP4Dal; using CDP4Dal.Events; - using CDP4Dal.Permission; + using CDP4Dal.Permission; + using ReactiveUI; /// @@ -27,36 +49,35 @@ namespace CDP4CommonView /// public partial class MappingToReferenceScaleRowViewModel : RowViewModelBase { - /// - /// Backing field for + /// Backing field for property /// - private ScaleValueDefinition referenceScaleValue; + private ScaleValueDefinition dependentScaleValue; /// - /// Backing field for + /// Backing field for property /// - private string referenceScaleValueShortName; + private string dependentScaleValueName; /// - /// Backing field for + /// Backing field for property /// - private string referenceScaleValueName; + private string dependentScaleValueShortName; /// - /// Backing field for + /// Backing field for property /// - private ScaleValueDefinition dependentScaleValue; + private ScaleValueDefinition referenceScaleValue; /// - /// Backing field for + /// Backing field for property /// - private string dependentScaleValueShortName; + private string referenceScaleValueName; /// - /// Backing field for + /// Backing field for property /// - private string dependentScaleValueName; + private string referenceScaleValueShortName; /// /// Initializes a new instance of the class @@ -69,62 +90,60 @@ public MappingToReferenceScaleRowViewModel(MappingToReferenceScale mappingToRefe this.UpdateProperties(); } - /// - /// Gets or sets the ReferenceScaleValue + /// Gets or sets the DependentScaleValue /// - public ScaleValueDefinition ReferenceScaleValue + public ScaleValueDefinition DependentScaleValue { - get { return this.referenceScaleValue; } - set { this.RaiseAndSetIfChanged(ref this.referenceScaleValue, value); } + get { return this.dependentScaleValue; } + set { this.RaiseAndSetIfChanged(ref this.dependentScaleValue, value); } } /// - /// Gets or set the ShortName of + /// Gets or set the Name of /// - public string ReferenceScaleValueShortName + public string DependentScaleValueName { - get { return this.referenceScaleValueShortName; } - set { this.RaiseAndSetIfChanged(ref this.referenceScaleValueShortName, value); } + get { return this.dependentScaleValueName; } + set { this.RaiseAndSetIfChanged(ref this.dependentScaleValueName, value); } } /// - /// Gets or set the Name of + /// Gets or set the ShortName of /// - public string ReferenceScaleValueName + public string DependentScaleValueShortName { - get { return this.referenceScaleValueName; } - set { this.RaiseAndSetIfChanged(ref this.referenceScaleValueName, value); } + get { return this.dependentScaleValueShortName; } + set { this.RaiseAndSetIfChanged(ref this.dependentScaleValueShortName, value); } } /// - /// Gets or sets the DependentScaleValue + /// Gets or sets the ReferenceScaleValue /// - public ScaleValueDefinition DependentScaleValue + public ScaleValueDefinition ReferenceScaleValue { - get { return this.dependentScaleValue; } - set { this.RaiseAndSetIfChanged(ref this.dependentScaleValue, value); } + get { return this.referenceScaleValue; } + set { this.RaiseAndSetIfChanged(ref this.referenceScaleValue, value); } } /// - /// Gets or set the ShortName of + /// Gets or set the Name of /// - public string DependentScaleValueShortName + public string ReferenceScaleValueName { - get { return this.dependentScaleValueShortName; } - set { this.RaiseAndSetIfChanged(ref this.dependentScaleValueShortName, value); } + get { return this.referenceScaleValueName; } + set { this.RaiseAndSetIfChanged(ref this.referenceScaleValueName, value); } } /// - /// Gets or set the Name of + /// Gets or set the ShortName of /// - public string DependentScaleValueName + public string ReferenceScaleValueShortName { - get { return this.dependentScaleValueName; } - set { this.RaiseAndSetIfChanged(ref this.dependentScaleValueName, value); } + get { return this.referenceScaleValueShortName; } + set { this.RaiseAndSetIfChanged(ref this.referenceScaleValueShortName, value); } } - /// /// The event-handler that is invoked by the subscription that listens for updates /// on the that is being represented by the view-model @@ -135,6 +154,7 @@ public string DependentScaleValueName protected override void ObjectChangeEventHandler(ObjectChangedEvent objectChange) { base.ObjectChangeEventHandler(objectChange); + this.UpdateProperties(); } @@ -143,19 +163,28 @@ protected override void ObjectChangeEventHandler(ObjectChangedEvent objectChange /// private void UpdateProperties() { - this.ModifiedOn = this.Thing.ModifiedOn; - if (this.Thing.ReferenceScaleValue != null) - { - this.ReferenceScaleValueShortName = this.Thing.ReferenceScaleValue.ShortName; - this.ReferenceScaleValueName = this.Thing.ReferenceScaleValue.Name; - } - this.ReferenceScaleValue = this.Thing.ReferenceScaleValue; - if (this.Thing.DependentScaleValue != null) - { - this.DependentScaleValueShortName = this.Thing.DependentScaleValue.ShortName; - this.DependentScaleValueName = this.Thing.DependentScaleValue.Name; - } this.DependentScaleValue = this.Thing.DependentScaleValue; + if (this.Thing.DependentScaleValue != null) + { + this.DependentScaleValueName = this.Thing.DependentScaleValue.Name; + this.DependentScaleValueShortName = this.Thing.DependentScaleValue.ShortName; + } + else + { + this.DependentScaleValueName = string.Empty; + this.DependentScaleValueShortName = string.Empty; + } + this.ReferenceScaleValue = this.Thing.ReferenceScaleValue; + if (this.Thing.ReferenceScaleValue != null) + { + this.ReferenceScaleValueName = this.Thing.ReferenceScaleValue.Name; + this.ReferenceScaleValueShortName = this.Thing.ReferenceScaleValue.ShortName; + } + else + { + this.ReferenceScaleValueName = string.Empty; + this.ReferenceScaleValueShortName = string.Empty; + } } } } diff --git a/CDP4Composition/CommonView/AutoGenRows/MeasurementScaleRowViewModel.cs b/CDP4Composition/CommonView/AutoGenRows/MeasurementScaleRowViewModel.cs index 925cf7976..a3279c89c 100644 --- a/CDP4Composition/CommonView/AutoGenRows/MeasurementScaleRowViewModel.cs +++ b/CDP4Composition/CommonView/AutoGenRows/MeasurementScaleRowViewModel.cs @@ -1,25 +1,47 @@ -// ------------------------------------------------------------------------------------------------- +// -------------------------------------------------------------------------------------------------------------------- // -// Copyright (c) 2015-2018 RHEA System S.A. +// Copyright (c) 2015-2021 RHEA System S.A. +// +// Author: Sam Gerené, Alex Vorobiev, Naron Phou, Alexander van Delft, Nathanael Smiechowski, Ahmed Abulwafa Ahmed +// +// This file is part of CDP4-IME Community Edition. +// This is an auto-generated class. Any manual changes to this file will be overwritten! +// +// The CDP4-IME Community Edition is free software; you can redistribute it and/or +// modify it under the terms of the GNU Affero General Public +// License as published by the Free Software Foundation; either +// version 3 of the License, or (at your option) any later version. +// +// The CDP4-IME Community Edition is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +// Lesser General Public License for more details. +// +// You should have received a copy of the GNU Affero General Public License +// along with this program. If not, see . // // // This is an auto-generated class. Any manual changes on this file will be overwritten! // -// ------------------------------------------------------------------------------------------------- +// -------------------------------------------------------------------------------------------------------------------- namespace CDP4CommonView { using System; using System.Reactive.Linq; + using CDP4Common.CommonData; using CDP4Common.DiagramData; using CDP4Common.EngineeringModelData; using CDP4Common.ReportingData; using CDP4Common.SiteDirectoryData; + using CDP4Composition.Mvvm; + using CDP4Dal; using CDP4Dal.Events; - using CDP4Dal.Permission; + using CDP4Dal.Permission; + using ReactiveUI; /// @@ -27,61 +49,60 @@ namespace CDP4CommonView /// public abstract partial class MeasurementScaleRowViewModel : DefinedThingRowViewModel where T : MeasurementScale { - /// - /// Backing field for + /// Backing field for property /// - private NumberSetKind numberSet; + private bool isDeprecated; /// - /// Backing field for + /// Backing field for property /// - private string minimumPermissibleValue; + private bool isMaximumInclusive; /// - /// Backing field for + /// Backing field for property /// private bool isMinimumInclusive; /// - /// Backing field for + /// Backing field for property /// private string maximumPermissibleValue; /// - /// Backing field for + /// Backing field for property /// - private bool isMaximumInclusive; + private string minimumPermissibleValue; /// - /// Backing field for + /// Backing field for property /// - private string positiveValueConnotation; + private string negativeValueConnotation; /// - /// Backing field for + /// Backing field for property /// - private string negativeValueConnotation; + private NumberSetKind numberSet; /// - /// Backing field for + /// Backing field for property /// - private bool isDeprecated; + private string positiveValueConnotation; /// - /// Backing field for + /// Backing field for property /// private MeasurementUnit unit; /// - /// Backing field for + /// Backing field for property /// - private string unitShortName; + private string unitName; /// - /// Backing field for + /// Backing field for property /// - private string unitName; + private string unitShortName; /// /// Initializes a new instance of the class @@ -94,23 +115,22 @@ protected MeasurementScaleRowViewModel(T measurementScale, ISession session, IVi this.UpdateProperties(); } - /// - /// Gets or sets the NumberSet + /// Gets or sets the IsDeprecated /// - public NumberSetKind NumberSet + public bool IsDeprecated { - get { return this.numberSet; } - set { this.RaiseAndSetIfChanged(ref this.numberSet, value); } + get { return this.isDeprecated; } + set { this.RaiseAndSetIfChanged(ref this.isDeprecated, value); } } /// - /// Gets or sets the MinimumPermissibleValue + /// Gets or sets the IsMaximumInclusive /// - public string MinimumPermissibleValue + public bool IsMaximumInclusive { - get { return this.minimumPermissibleValue; } - set { this.RaiseAndSetIfChanged(ref this.minimumPermissibleValue, value); } + get { return this.isMaximumInclusive; } + set { this.RaiseAndSetIfChanged(ref this.isMaximumInclusive, value); } } /// @@ -132,39 +152,39 @@ public string MaximumPermissibleValue } /// - /// Gets or sets the IsMaximumInclusive + /// Gets or sets the MinimumPermissibleValue /// - public bool IsMaximumInclusive + public string MinimumPermissibleValue { - get { return this.isMaximumInclusive; } - set { this.RaiseAndSetIfChanged(ref this.isMaximumInclusive, value); } + get { return this.minimumPermissibleValue; } + set { this.RaiseAndSetIfChanged(ref this.minimumPermissibleValue, value); } } /// - /// Gets or sets the PositiveValueConnotation + /// Gets or sets the NegativeValueConnotation /// - public string PositiveValueConnotation + public string NegativeValueConnotation { - get { return this.positiveValueConnotation; } - set { this.RaiseAndSetIfChanged(ref this.positiveValueConnotation, value); } + get { return this.negativeValueConnotation; } + set { this.RaiseAndSetIfChanged(ref this.negativeValueConnotation, value); } } /// - /// Gets or sets the NegativeValueConnotation + /// Gets or sets the NumberSet /// - public string NegativeValueConnotation + public NumberSetKind NumberSet { - get { return this.negativeValueConnotation; } - set { this.RaiseAndSetIfChanged(ref this.negativeValueConnotation, value); } + get { return this.numberSet; } + set { this.RaiseAndSetIfChanged(ref this.numberSet, value); } } /// - /// Gets or sets the IsDeprecated + /// Gets or sets the PositiveValueConnotation /// - public bool IsDeprecated + public string PositiveValueConnotation { - get { return this.isDeprecated; } - set { this.RaiseAndSetIfChanged(ref this.isDeprecated, value); } + get { return this.positiveValueConnotation; } + set { this.RaiseAndSetIfChanged(ref this.positiveValueConnotation, value); } } /// @@ -177,24 +197,23 @@ public MeasurementUnit Unit } /// - /// Gets or set the ShortName of + /// Gets or set the Name of /// - public string UnitShortName + public string UnitName { - get { return this.unitShortName; } - set { this.RaiseAndSetIfChanged(ref this.unitShortName, value); } + get { return this.unitName; } + set { this.RaiseAndSetIfChanged(ref this.unitName, value); } } /// - /// Gets or set the Name of + /// Gets or set the ShortName of /// - public string UnitName + public string UnitShortName { - get { return this.unitName; } - set { this.RaiseAndSetIfChanged(ref this.unitName, value); } + get { return this.unitShortName; } + set { this.RaiseAndSetIfChanged(ref this.unitShortName, value); } } - /// /// The event-handler that is invoked by the subscription that listens for updates /// on the that is being represented by the view-model @@ -205,6 +224,7 @@ public string UnitName protected override void ObjectChangeEventHandler(ObjectChangedEvent objectChange) { base.ObjectChangeEventHandler(objectChange); + this.UpdateProperties(); } @@ -213,21 +233,25 @@ protected override void ObjectChangeEventHandler(ObjectChangedEvent objectChange /// private void UpdateProperties() { - this.ModifiedOn = this.Thing.ModifiedOn; - this.NumberSet = this.Thing.NumberSet; - this.MinimumPermissibleValue = this.Thing.MinimumPermissibleValue; + this.IsDeprecated = this.Thing.IsDeprecated; + this.IsMaximumInclusive = this.Thing.IsMaximumInclusive; this.IsMinimumInclusive = this.Thing.IsMinimumInclusive; this.MaximumPermissibleValue = this.Thing.MaximumPermissibleValue; - this.IsMaximumInclusive = this.Thing.IsMaximumInclusive; - this.PositiveValueConnotation = this.Thing.PositiveValueConnotation; + this.MinimumPermissibleValue = this.Thing.MinimumPermissibleValue; this.NegativeValueConnotation = this.Thing.NegativeValueConnotation; - this.IsDeprecated = this.Thing.IsDeprecated; - if (this.Thing.Unit != null) - { - this.UnitShortName = this.Thing.Unit.ShortName; - this.UnitName = this.Thing.Unit.Name; - } + this.NumberSet = this.Thing.NumberSet; + this.PositiveValueConnotation = this.Thing.PositiveValueConnotation; this.Unit = this.Thing.Unit; + if (this.Thing.Unit != null) + { + this.UnitName = this.Thing.Unit.Name; + this.UnitShortName = this.Thing.Unit.ShortName; + } + else + { + this.UnitName = string.Empty; + this.UnitShortName = string.Empty; + } } } } diff --git a/CDP4Composition/CommonView/AutoGenRows/MeasurementUnitRowViewModel.cs b/CDP4Composition/CommonView/AutoGenRows/MeasurementUnitRowViewModel.cs index 50608f8b8..5176a9888 100644 --- a/CDP4Composition/CommonView/AutoGenRows/MeasurementUnitRowViewModel.cs +++ b/CDP4Composition/CommonView/AutoGenRows/MeasurementUnitRowViewModel.cs @@ -1,25 +1,47 @@ -// ------------------------------------------------------------------------------------------------- +// -------------------------------------------------------------------------------------------------------------------- // -// Copyright (c) 2015-2018 RHEA System S.A. +// Copyright (c) 2015-2021 RHEA System S.A. +// +// Author: Sam Gerené, Alex Vorobiev, Naron Phou, Alexander van Delft, Nathanael Smiechowski, Ahmed Abulwafa Ahmed +// +// This file is part of CDP4-IME Community Edition. +// This is an auto-generated class. Any manual changes to this file will be overwritten! +// +// The CDP4-IME Community Edition is free software; you can redistribute it and/or +// modify it under the terms of the GNU Affero General Public +// License as published by the Free Software Foundation; either +// version 3 of the License, or (at your option) any later version. +// +// The CDP4-IME Community Edition is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +// Lesser General Public License for more details. +// +// You should have received a copy of the GNU Affero General Public License +// along with this program. If not, see . // // // This is an auto-generated class. Any manual changes on this file will be overwritten! // -// ------------------------------------------------------------------------------------------------- +// -------------------------------------------------------------------------------------------------------------------- namespace CDP4CommonView { using System; using System.Reactive.Linq; + using CDP4Common.CommonData; using CDP4Common.DiagramData; using CDP4Common.EngineeringModelData; using CDP4Common.ReportingData; using CDP4Common.SiteDirectoryData; + using CDP4Composition.Mvvm; + using CDP4Dal; using CDP4Dal.Events; - using CDP4Dal.Permission; + using CDP4Dal.Permission; + using ReactiveUI; /// @@ -27,9 +49,8 @@ namespace CDP4CommonView /// public abstract partial class MeasurementUnitRowViewModel : DefinedThingRowViewModel where T : MeasurementUnit { - /// - /// Backing field for + /// Backing field for property /// private bool isDeprecated; @@ -44,7 +65,6 @@ protected MeasurementUnitRowViewModel(T measurementUnit, ISession session, IView this.UpdateProperties(); } - /// /// Gets or sets the IsDeprecated /// @@ -54,7 +74,6 @@ public bool IsDeprecated set { this.RaiseAndSetIfChanged(ref this.isDeprecated, value); } } - /// /// The event-handler that is invoked by the subscription that listens for updates /// on the that is being represented by the view-model @@ -65,6 +84,7 @@ public bool IsDeprecated protected override void ObjectChangeEventHandler(ObjectChangedEvent objectChange) { base.ObjectChangeEventHandler(objectChange); + this.UpdateProperties(); } @@ -73,7 +93,6 @@ protected override void ObjectChangeEventHandler(ObjectChangedEvent objectChange /// private void UpdateProperties() { - this.ModifiedOn = this.Thing.ModifiedOn; this.IsDeprecated = this.Thing.IsDeprecated; } } diff --git a/CDP4Composition/CommonView/AutoGenRows/ModelLogEntryRowViewModel.cs b/CDP4Composition/CommonView/AutoGenRows/ModelLogEntryRowViewModel.cs index 90deffc58..1cb34c908 100644 --- a/CDP4Composition/CommonView/AutoGenRows/ModelLogEntryRowViewModel.cs +++ b/CDP4Composition/CommonView/AutoGenRows/ModelLogEntryRowViewModel.cs @@ -1,25 +1,47 @@ -// ------------------------------------------------------------------------------------------------- +// -------------------------------------------------------------------------------------------------------------------- // -// Copyright (c) 2015-2018 RHEA System S.A. +// Copyright (c) 2015-2021 RHEA System S.A. +// +// Author: Sam Gerené, Alex Vorobiev, Naron Phou, Alexander van Delft, Nathanael Smiechowski, Ahmed Abulwafa Ahmed +// +// This file is part of CDP4-IME Community Edition. +// This is an auto-generated class. Any manual changes to this file will be overwritten! +// +// The CDP4-IME Community Edition is free software; you can redistribute it and/or +// modify it under the terms of the GNU Affero General Public +// License as published by the Free Software Foundation; either +// version 3 of the License, or (at your option) any later version. +// +// The CDP4-IME Community Edition is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +// Lesser General Public License for more details. +// +// You should have received a copy of the GNU Affero General Public License +// along with this program. If not, see . // // // This is an auto-generated class. Any manual changes on this file will be overwritten! // -// ------------------------------------------------------------------------------------------------- +// -------------------------------------------------------------------------------------------------------------------- namespace CDP4CommonView { using System; using System.Reactive.Linq; + using CDP4Common.CommonData; using CDP4Common.DiagramData; using CDP4Common.EngineeringModelData; using CDP4Common.ReportingData; using CDP4Common.SiteDirectoryData; + using CDP4Composition.Mvvm; + using CDP4Dal; using CDP4Dal.Events; - using CDP4Dal.Permission; + using CDP4Dal.Permission; + using ReactiveUI; /// @@ -27,31 +49,40 @@ namespace CDP4CommonView /// public partial class ModelLogEntryRowViewModel : RowViewModelBase { + /// + /// Backing field for property + /// + private Person author; /// - /// Backing field for + /// Backing field for property /// - private string languageCode; + private string authorName; + + /// + /// Backing field for property + /// + private string authorShortName; /// - /// Backing field for + /// Backing field for property /// private string content; /// - /// Backing field for + /// Backing field for property /// private DateTime createdOn; /// - /// Backing field for + /// Backing field for property /// - private LogLevelKind level; + private string languageCode; /// - /// Backing field for + /// Backing field for property /// - private Person author; + private LogLevelKind level; /// /// Initializes a new instance of the class @@ -64,14 +95,31 @@ public ModelLogEntryRowViewModel(ModelLogEntry modelLogEntry, ISession session, this.UpdateProperties(); } + /// + /// Gets or sets the Author + /// + public Person Author + { + get { return this.author; } + set { this.RaiseAndSetIfChanged(ref this.author, value); } + } /// - /// Gets or sets the LanguageCode + /// Gets or set the Name of /// - public string LanguageCode + public string AuthorName { - get { return this.languageCode; } - set { this.RaiseAndSetIfChanged(ref this.languageCode, value); } + get { return this.authorName; } + set { this.RaiseAndSetIfChanged(ref this.authorName, value); } + } + + /// + /// Gets or set the ShortName of + /// + public string AuthorShortName + { + get { return this.authorShortName; } + set { this.RaiseAndSetIfChanged(ref this.authorShortName, value); } } /// @@ -93,24 +141,23 @@ public DateTime CreatedOn } /// - /// Gets or sets the Level + /// Gets or sets the LanguageCode /// - public LogLevelKind Level + public string LanguageCode { - get { return this.level; } - set { this.RaiseAndSetIfChanged(ref this.level, value); } + get { return this.languageCode; } + set { this.RaiseAndSetIfChanged(ref this.languageCode, value); } } /// - /// Gets or sets the Author + /// Gets or sets the Level /// - public Person Author + public LogLevelKind Level { - get { return this.author; } - set { this.RaiseAndSetIfChanged(ref this.author, value); } + get { return this.level; } + set { this.RaiseAndSetIfChanged(ref this.level, value); } } - /// /// The event-handler that is invoked by the subscription that listens for updates /// on the that is being represented by the view-model @@ -121,6 +168,7 @@ public Person Author protected override void ObjectChangeEventHandler(ObjectChangedEvent objectChange) { base.ObjectChangeEventHandler(objectChange); + this.UpdateProperties(); } @@ -129,12 +177,21 @@ protected override void ObjectChangeEventHandler(ObjectChangedEvent objectChange /// private void UpdateProperties() { - this.ModifiedOn = this.Thing.ModifiedOn; - this.LanguageCode = this.Thing.LanguageCode; + this.Author = this.Thing.Author; + if (this.Thing.Author != null) + { + this.AuthorName = this.Thing.Author.Name; + this.AuthorShortName = this.Thing.Author.ShortName; + } + else + { + this.AuthorName = string.Empty; + this.AuthorShortName = string.Empty; + } this.Content = this.Thing.Content; this.CreatedOn = this.Thing.CreatedOn; + this.LanguageCode = this.Thing.LanguageCode; this.Level = this.Thing.Level; - this.Author = this.Thing.Author; } } } diff --git a/CDP4Composition/CommonView/AutoGenRows/ModelReferenceDataLibraryRowViewModel.cs b/CDP4Composition/CommonView/AutoGenRows/ModelReferenceDataLibraryRowViewModel.cs index 86f1d28b5..f93263088 100644 --- a/CDP4Composition/CommonView/AutoGenRows/ModelReferenceDataLibraryRowViewModel.cs +++ b/CDP4Composition/CommonView/AutoGenRows/ModelReferenceDataLibraryRowViewModel.cs @@ -1,25 +1,47 @@ -// ------------------------------------------------------------------------------------------------- +// -------------------------------------------------------------------------------------------------------------------- // -// Copyright (c) 2015-2018 RHEA System S.A. +// Copyright (c) 2015-2021 RHEA System S.A. +// +// Author: Sam Gerené, Alex Vorobiev, Naron Phou, Alexander van Delft, Nathanael Smiechowski, Ahmed Abulwafa Ahmed +// +// This file is part of CDP4-IME Community Edition. +// This is an auto-generated class. Any manual changes to this file will be overwritten! +// +// The CDP4-IME Community Edition is free software; you can redistribute it and/or +// modify it under the terms of the GNU Affero General Public +// License as published by the Free Software Foundation; either +// version 3 of the License, or (at your option) any later version. +// +// The CDP4-IME Community Edition is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +// Lesser General Public License for more details. +// +// You should have received a copy of the GNU Affero General Public License +// along with this program. If not, see . // // // This is an auto-generated class. Any manual changes on this file will be overwritten! // -// ------------------------------------------------------------------------------------------------- +// -------------------------------------------------------------------------------------------------------------------- namespace CDP4CommonView { using System; using System.Reactive.Linq; + using CDP4Common.CommonData; using CDP4Common.DiagramData; using CDP4Common.EngineeringModelData; using CDP4Common.ReportingData; using CDP4Common.SiteDirectoryData; + using CDP4Composition.Mvvm; + using CDP4Dal; using CDP4Dal.Events; - using CDP4Dal.Permission; + using CDP4Dal.Permission; + using ReactiveUI; /// @@ -27,7 +49,6 @@ namespace CDP4CommonView /// public partial class ModelReferenceDataLibraryRowViewModel : ReferenceDataLibraryRowViewModel { - /// /// Initializes a new instance of the class /// @@ -36,9 +57,28 @@ public partial class ModelReferenceDataLibraryRowViewModel : ReferenceDataLibrar /// The that is the container of this public ModelReferenceDataLibraryRowViewModel(ModelReferenceDataLibrary modelReferenceDataLibrary, ISession session, IViewModelBase containerViewModel) : base(modelReferenceDataLibrary, session, containerViewModel) { + this.UpdateProperties(); } + /// + /// The event-handler that is invoked by the subscription that listens for updates + /// on the that is being represented by the view-model + /// + /// + /// The payload of the event that is being handled + /// + protected override void ObjectChangeEventHandler(ObjectChangedEvent objectChange) + { + base.ObjectChangeEventHandler(objectChange); + + this.UpdateProperties(); + } - + /// + /// Updates the properties of this row + /// + private void UpdateProperties() + { + } } } diff --git a/CDP4Composition/CommonView/AutoGenRows/ModellingAnnotationItemRowViewModel.cs b/CDP4Composition/CommonView/AutoGenRows/ModellingAnnotationItemRowViewModel.cs index a3934af78..7b54e3d56 100644 --- a/CDP4Composition/CommonView/AutoGenRows/ModellingAnnotationItemRowViewModel.cs +++ b/CDP4Composition/CommonView/AutoGenRows/ModellingAnnotationItemRowViewModel.cs @@ -1,25 +1,47 @@ -// ------------------------------------------------------------------------------------------------- +// -------------------------------------------------------------------------------------------------------------------- // -// Copyright (c) 2015-2018 RHEA System S.A. +// Copyright (c) 2015-2021 RHEA System S.A. +// +// Author: Sam Gerené, Alex Vorobiev, Naron Phou, Alexander van Delft, Nathanael Smiechowski, Ahmed Abulwafa Ahmed +// +// This file is part of CDP4-IME Community Edition. +// This is an auto-generated class. Any manual changes to this file will be overwritten! +// +// The CDP4-IME Community Edition is free software; you can redistribute it and/or +// modify it under the terms of the GNU Affero General Public +// License as published by the Free Software Foundation; either +// version 3 of the License, or (at your option) any later version. +// +// The CDP4-IME Community Edition is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +// Lesser General Public License for more details. +// +// You should have received a copy of the GNU Affero General Public License +// along with this program. If not, see . // // // This is an auto-generated class. Any manual changes on this file will be overwritten! // -// ------------------------------------------------------------------------------------------------- +// -------------------------------------------------------------------------------------------------------------------- namespace CDP4CommonView { using System; using System.Reactive.Linq; + using CDP4Common.CommonData; using CDP4Common.DiagramData; using CDP4Common.EngineeringModelData; using CDP4Common.ReportingData; using CDP4Common.SiteDirectoryData; + using CDP4Composition.Mvvm; + using CDP4Dal; using CDP4Dal.Events; - using CDP4Dal.Permission; + using CDP4Dal.Permission; + using ReactiveUI; /// @@ -27,41 +49,40 @@ namespace CDP4CommonView /// public abstract partial class ModellingAnnotationItemRowViewModel : EngineeringModelDataAnnotationRowViewModel where T : ModellingAnnotationItem { - /// - /// Backing field for + /// Backing field for property /// - private AnnotationStatusKind status; + private AnnotationClassificationKind classification; /// - /// Backing field for + /// Backing field for property /// - private string title; + private DomainOfExpertise owner; /// - /// Backing field for + /// Backing field for property /// - private AnnotationClassificationKind classification; + private string ownerName; /// - /// Backing field for + /// Backing field for property /// - private string shortName; + private string ownerShortName; /// - /// Backing field for + /// Backing field for property /// - private DomainOfExpertise owner; + private string shortName; /// - /// Backing field for + /// Backing field for property /// - private string ownerShortName; + private AnnotationStatusKind status; /// - /// Backing field for + /// Backing field for property /// - private string ownerName; + private string title; /// /// Initializes a new instance of the class @@ -74,71 +95,69 @@ protected ModellingAnnotationItemRowViewModel(T modellingAnnotationItem, ISessio this.UpdateProperties(); } - /// - /// Gets or sets the Status + /// Gets or sets the Classification /// - public AnnotationStatusKind Status + public AnnotationClassificationKind Classification { - get { return this.status; } - set { this.RaiseAndSetIfChanged(ref this.status, value); } + get { return this.classification; } + set { this.RaiseAndSetIfChanged(ref this.classification, value); } } /// - /// Gets or sets the Title + /// Gets or sets the Owner /// - public string Title + public DomainOfExpertise Owner { - get { return this.title; } - set { this.RaiseAndSetIfChanged(ref this.title, value); } + get { return this.owner; } + set { this.RaiseAndSetIfChanged(ref this.owner, value); } } /// - /// Gets or sets the Classification + /// Gets or set the Name of /// - public AnnotationClassificationKind Classification + public string OwnerName { - get { return this.classification; } - set { this.RaiseAndSetIfChanged(ref this.classification, value); } + get { return this.ownerName; } + set { this.RaiseAndSetIfChanged(ref this.ownerName, value); } } /// - /// Gets or sets the ShortName + /// Gets or set the ShortName of /// - public string ShortName + public string OwnerShortName { - get { return this.shortName; } - set { this.RaiseAndSetIfChanged(ref this.shortName, value); } + get { return this.ownerShortName; } + set { this.RaiseAndSetIfChanged(ref this.ownerShortName, value); } } /// - /// Gets or sets the Owner + /// Gets or sets the ShortName /// - public DomainOfExpertise Owner + public string ShortName { - get { return this.owner; } - set { this.RaiseAndSetIfChanged(ref this.owner, value); } + get { return this.shortName; } + set { this.RaiseAndSetIfChanged(ref this.shortName, value); } } /// - /// Gets or set the ShortName of + /// Gets or sets the Status /// - public string OwnerShortName + public AnnotationStatusKind Status { - get { return this.ownerShortName; } - set { this.RaiseAndSetIfChanged(ref this.ownerShortName, value); } + get { return this.status; } + set { this.RaiseAndSetIfChanged(ref this.status, value); } } /// - /// Gets or set the Name of + /// Gets or sets the Title /// - public string OwnerName + public string Title { - get { return this.ownerName; } - set { this.RaiseAndSetIfChanged(ref this.ownerName, value); } + get { return this.title; } + set { this.RaiseAndSetIfChanged(ref this.title, value); } } - /// /// The event-handler that is invoked by the subscription that listens for updates /// on the that is being represented by the view-model @@ -149,6 +168,7 @@ public string OwnerName protected override void ObjectChangeEventHandler(ObjectChangedEvent objectChange) { base.ObjectChangeEventHandler(objectChange); + this.UpdateProperties(); } @@ -157,17 +177,21 @@ protected override void ObjectChangeEventHandler(ObjectChangedEvent objectChange /// private void UpdateProperties() { - this.ModifiedOn = this.Thing.ModifiedOn; - this.Status = this.Thing.Status; - this.Title = this.Thing.Title; this.Classification = this.Thing.Classification; - this.ShortName = this.Thing.ShortName; - if (this.Thing.Owner != null) - { - this.OwnerShortName = this.Thing.Owner.ShortName; - this.OwnerName = this.Thing.Owner.Name; - } this.Owner = this.Thing.Owner; + if (this.Thing.Owner != null) + { + this.OwnerName = this.Thing.Owner.Name; + this.OwnerShortName = this.Thing.Owner.ShortName; + } + else + { + this.OwnerName = string.Empty; + this.OwnerShortName = string.Empty; + } + this.ShortName = this.Thing.ShortName; + this.Status = this.Thing.Status; + this.Title = this.Thing.Title; } } } diff --git a/CDP4Composition/CommonView/AutoGenRows/ModellingThingReferenceRowViewModel.cs b/CDP4Composition/CommonView/AutoGenRows/ModellingThingReferenceRowViewModel.cs index 7ddca500f..ea52f0f87 100644 --- a/CDP4Composition/CommonView/AutoGenRows/ModellingThingReferenceRowViewModel.cs +++ b/CDP4Composition/CommonView/AutoGenRows/ModellingThingReferenceRowViewModel.cs @@ -1,25 +1,47 @@ -// ------------------------------------------------------------------------------------------------- +// -------------------------------------------------------------------------------------------------------------------- // -// Copyright (c) 2015-2018 RHEA System S.A. +// Copyright (c) 2015-2021 RHEA System S.A. +// +// Author: Sam Gerené, Alex Vorobiev, Naron Phou, Alexander van Delft, Nathanael Smiechowski, Ahmed Abulwafa Ahmed +// +// This file is part of CDP4-IME Community Edition. +// This is an auto-generated class. Any manual changes to this file will be overwritten! +// +// The CDP4-IME Community Edition is free software; you can redistribute it and/or +// modify it under the terms of the GNU Affero General Public +// License as published by the Free Software Foundation; either +// version 3 of the License, or (at your option) any later version. +// +// The CDP4-IME Community Edition is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +// Lesser General Public License for more details. +// +// You should have received a copy of the GNU Affero General Public License +// along with this program. If not, see . // // // This is an auto-generated class. Any manual changes on this file will be overwritten! // -// ------------------------------------------------------------------------------------------------- +// -------------------------------------------------------------------------------------------------------------------- namespace CDP4CommonView { using System; using System.Reactive.Linq; + using CDP4Common.CommonData; using CDP4Common.DiagramData; using CDP4Common.EngineeringModelData; using CDP4Common.ReportingData; using CDP4Common.SiteDirectoryData; + using CDP4Composition.Mvvm; + using CDP4Dal; using CDP4Dal.Events; - using CDP4Dal.Permission; + using CDP4Dal.Permission; + using ReactiveUI; /// @@ -27,7 +49,6 @@ namespace CDP4CommonView /// public partial class ModellingThingReferenceRowViewModel : ThingReferenceRowViewModel { - /// /// Initializes a new instance of the class /// @@ -36,9 +57,28 @@ public partial class ModellingThingReferenceRowViewModel : ThingReferenceRowView /// The that is the container of this public ModellingThingReferenceRowViewModel(ModellingThingReference modellingThingReference, ISession session, IViewModelBase containerViewModel) : base(modellingThingReference, session, containerViewModel) { + this.UpdateProperties(); } + /// + /// The event-handler that is invoked by the subscription that listens for updates + /// on the that is being represented by the view-model + /// + /// + /// The payload of the event that is being handled + /// + protected override void ObjectChangeEventHandler(ObjectChangedEvent objectChange) + { + base.ObjectChangeEventHandler(objectChange); + + this.UpdateProperties(); + } - + /// + /// Updates the properties of this row + /// + private void UpdateProperties() + { + } } } diff --git a/CDP4Composition/CommonView/AutoGenRows/MultiRelationshipRowViewModel.cs b/CDP4Composition/CommonView/AutoGenRows/MultiRelationshipRowViewModel.cs index eb963addf..6b8ae2e19 100644 --- a/CDP4Composition/CommonView/AutoGenRows/MultiRelationshipRowViewModel.cs +++ b/CDP4Composition/CommonView/AutoGenRows/MultiRelationshipRowViewModel.cs @@ -1,25 +1,47 @@ -// ------------------------------------------------------------------------------------------------- +// -------------------------------------------------------------------------------------------------------------------- // -// Copyright (c) 2015-2018 RHEA System S.A. +// Copyright (c) 2015-2021 RHEA System S.A. +// +// Author: Sam Gerené, Alex Vorobiev, Naron Phou, Alexander van Delft, Nathanael Smiechowski, Ahmed Abulwafa Ahmed +// +// This file is part of CDP4-IME Community Edition. +// This is an auto-generated class. Any manual changes to this file will be overwritten! +// +// The CDP4-IME Community Edition is free software; you can redistribute it and/or +// modify it under the terms of the GNU Affero General Public +// License as published by the Free Software Foundation; either +// version 3 of the License, or (at your option) any later version. +// +// The CDP4-IME Community Edition is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +// Lesser General Public License for more details. +// +// You should have received a copy of the GNU Affero General Public License +// along with this program. If not, see . // // // This is an auto-generated class. Any manual changes on this file will be overwritten! // -// ------------------------------------------------------------------------------------------------- +// -------------------------------------------------------------------------------------------------------------------- namespace CDP4CommonView { using System; using System.Reactive.Linq; + using CDP4Common.CommonData; using CDP4Common.DiagramData; using CDP4Common.EngineeringModelData; using CDP4Common.ReportingData; using CDP4Common.SiteDirectoryData; + using CDP4Composition.Mvvm; + using CDP4Dal; using CDP4Dal.Events; - using CDP4Dal.Permission; + using CDP4Dal.Permission; + using ReactiveUI; /// @@ -27,7 +49,6 @@ namespace CDP4CommonView /// public partial class MultiRelationshipRowViewModel : RelationshipRowViewModel { - /// /// Initializes a new instance of the class /// @@ -36,9 +57,28 @@ public partial class MultiRelationshipRowViewModel : RelationshipRowViewModelThe that is the container of this public MultiRelationshipRowViewModel(MultiRelationship multiRelationship, ISession session, IViewModelBase containerViewModel) : base(multiRelationship, session, containerViewModel) { + this.UpdateProperties(); } + /// + /// The event-handler that is invoked by the subscription that listens for updates + /// on the that is being represented by the view-model + /// + /// + /// The payload of the event that is being handled + /// + protected override void ObjectChangeEventHandler(ObjectChangedEvent objectChange) + { + base.ObjectChangeEventHandler(objectChange); + + this.UpdateProperties(); + } - + /// + /// Updates the properties of this row + /// + private void UpdateProperties() + { + } } } diff --git a/CDP4Composition/CommonView/AutoGenRows/MultiRelationshipRuleRowViewModel.cs b/CDP4Composition/CommonView/AutoGenRows/MultiRelationshipRuleRowViewModel.cs index 1a18fbeea..7fd110f8c 100644 --- a/CDP4Composition/CommonView/AutoGenRows/MultiRelationshipRuleRowViewModel.cs +++ b/CDP4Composition/CommonView/AutoGenRows/MultiRelationshipRuleRowViewModel.cs @@ -1,25 +1,47 @@ -// ------------------------------------------------------------------------------------------------- +// -------------------------------------------------------------------------------------------------------------------- // -// Copyright (c) 2015-2018 RHEA System S.A. +// Copyright (c) 2015-2021 RHEA System S.A. +// +// Author: Sam Gerené, Alex Vorobiev, Naron Phou, Alexander van Delft, Nathanael Smiechowski, Ahmed Abulwafa Ahmed +// +// This file is part of CDP4-IME Community Edition. +// This is an auto-generated class. Any manual changes to this file will be overwritten! +// +// The CDP4-IME Community Edition is free software; you can redistribute it and/or +// modify it under the terms of the GNU Affero General Public +// License as published by the Free Software Foundation; either +// version 3 of the License, or (at your option) any later version. +// +// The CDP4-IME Community Edition is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +// Lesser General Public License for more details. +// +// You should have received a copy of the GNU Affero General Public License +// along with this program. If not, see . // // // This is an auto-generated class. Any manual changes on this file will be overwritten! // -// ------------------------------------------------------------------------------------------------- +// -------------------------------------------------------------------------------------------------------------------- namespace CDP4CommonView { using System; using System.Reactive.Linq; + using CDP4Common.CommonData; using CDP4Common.DiagramData; using CDP4Common.EngineeringModelData; using CDP4Common.ReportingData; using CDP4Common.SiteDirectoryData; + using CDP4Composition.Mvvm; + using CDP4Dal; using CDP4Dal.Events; - using CDP4Dal.Permission; + using CDP4Dal.Permission; + using ReactiveUI; /// @@ -27,31 +49,30 @@ namespace CDP4CommonView /// public partial class MultiRelationshipRuleRowViewModel : RuleRowViewModel { - /// - /// Backing field for + /// Backing field for property /// - private int minRelated; + private int maxRelated; /// - /// Backing field for + /// Backing field for property /// - private int maxRelated; + private int minRelated; /// - /// Backing field for + /// Backing field for property /// private Category relationshipCategory; /// - /// Backing field for + /// Backing field for property /// - private string relationshipCategoryShortName; + private string relationshipCategoryName; /// - /// Backing field for + /// Backing field for property /// - private string relationshipCategoryName; + private string relationshipCategoryShortName; /// /// Initializes a new instance of the class @@ -64,23 +85,22 @@ public MultiRelationshipRuleRowViewModel(MultiRelationshipRule multiRelationship this.UpdateProperties(); } - /// - /// Gets or sets the MinRelated + /// Gets or sets the MaxRelated /// - public int MinRelated + public int MaxRelated { - get { return this.minRelated; } - set { this.RaiseAndSetIfChanged(ref this.minRelated, value); } + get { return this.maxRelated; } + set { this.RaiseAndSetIfChanged(ref this.maxRelated, value); } } /// - /// Gets or sets the MaxRelated + /// Gets or sets the MinRelated /// - public int MaxRelated + public int MinRelated { - get { return this.maxRelated; } - set { this.RaiseAndSetIfChanged(ref this.maxRelated, value); } + get { return this.minRelated; } + set { this.RaiseAndSetIfChanged(ref this.minRelated, value); } } /// @@ -93,24 +113,23 @@ public Category RelationshipCategory } /// - /// Gets or set the ShortName of + /// Gets or set the Name of /// - public string RelationshipCategoryShortName + public string RelationshipCategoryName { - get { return this.relationshipCategoryShortName; } - set { this.RaiseAndSetIfChanged(ref this.relationshipCategoryShortName, value); } + get { return this.relationshipCategoryName; } + set { this.RaiseAndSetIfChanged(ref this.relationshipCategoryName, value); } } /// - /// Gets or set the Name of + /// Gets or set the ShortName of /// - public string RelationshipCategoryName + public string RelationshipCategoryShortName { - get { return this.relationshipCategoryName; } - set { this.RaiseAndSetIfChanged(ref this.relationshipCategoryName, value); } + get { return this.relationshipCategoryShortName; } + set { this.RaiseAndSetIfChanged(ref this.relationshipCategoryShortName, value); } } - /// /// The event-handler that is invoked by the subscription that listens for updates /// on the that is being represented by the view-model @@ -121,6 +140,7 @@ public string RelationshipCategoryName protected override void ObjectChangeEventHandler(ObjectChangedEvent objectChange) { base.ObjectChangeEventHandler(objectChange); + this.UpdateProperties(); } @@ -129,15 +149,19 @@ protected override void ObjectChangeEventHandler(ObjectChangedEvent objectChange /// private void UpdateProperties() { - this.ModifiedOn = this.Thing.ModifiedOn; - this.MinRelated = this.Thing.MinRelated; this.MaxRelated = this.Thing.MaxRelated; - if (this.Thing.RelationshipCategory != null) - { - this.RelationshipCategoryShortName = this.Thing.RelationshipCategory.ShortName; - this.RelationshipCategoryName = this.Thing.RelationshipCategory.Name; - } + this.MinRelated = this.Thing.MinRelated; this.RelationshipCategory = this.Thing.RelationshipCategory; + if (this.Thing.RelationshipCategory != null) + { + this.RelationshipCategoryName = this.Thing.RelationshipCategory.Name; + this.RelationshipCategoryShortName = this.Thing.RelationshipCategory.ShortName; + } + else + { + this.RelationshipCategoryName = string.Empty; + this.RelationshipCategoryShortName = string.Empty; + } } } } diff --git a/CDP4Composition/CommonView/AutoGenRows/NaturalLanguageRowViewModel.cs b/CDP4Composition/CommonView/AutoGenRows/NaturalLanguageRowViewModel.cs index f28fff173..dcd4b9b6d 100644 --- a/CDP4Composition/CommonView/AutoGenRows/NaturalLanguageRowViewModel.cs +++ b/CDP4Composition/CommonView/AutoGenRows/NaturalLanguageRowViewModel.cs @@ -1,25 +1,47 @@ -// ------------------------------------------------------------------------------------------------- +// -------------------------------------------------------------------------------------------------------------------- // -// Copyright (c) 2015-2018 RHEA System S.A. +// Copyright (c) 2015-2021 RHEA System S.A. +// +// Author: Sam Gerené, Alex Vorobiev, Naron Phou, Alexander van Delft, Nathanael Smiechowski, Ahmed Abulwafa Ahmed +// +// This file is part of CDP4-IME Community Edition. +// This is an auto-generated class. Any manual changes to this file will be overwritten! +// +// The CDP4-IME Community Edition is free software; you can redistribute it and/or +// modify it under the terms of the GNU Affero General Public +// License as published by the Free Software Foundation; either +// version 3 of the License, or (at your option) any later version. +// +// The CDP4-IME Community Edition is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +// Lesser General Public License for more details. +// +// You should have received a copy of the GNU Affero General Public License +// along with this program. If not, see . // // // This is an auto-generated class. Any manual changes on this file will be overwritten! // -// ------------------------------------------------------------------------------------------------- +// -------------------------------------------------------------------------------------------------------------------- namespace CDP4CommonView { using System; using System.Reactive.Linq; + using CDP4Common.CommonData; using CDP4Common.DiagramData; using CDP4Common.EngineeringModelData; using CDP4Common.ReportingData; using CDP4Common.SiteDirectoryData; + using CDP4Composition.Mvvm; + using CDP4Dal; using CDP4Dal.Events; - using CDP4Dal.Permission; + using CDP4Dal.Permission; + using ReactiveUI; /// @@ -27,21 +49,20 @@ namespace CDP4CommonView /// public partial class NaturalLanguageRowViewModel : RowViewModelBase { - /// - /// Backing field for + /// Backing field for property /// private string languageCode; /// - /// Backing field for + /// Backing field for property /// - private string nativeName; + private string name; /// - /// Backing field for + /// Backing field for property /// - private string name; + private string nativeName; /// /// Initializes a new instance of the class @@ -54,7 +75,6 @@ public NaturalLanguageRowViewModel(NaturalLanguage naturalLanguage, ISession ses this.UpdateProperties(); } - /// /// Gets or sets the LanguageCode /// @@ -65,24 +85,23 @@ public string LanguageCode } /// - /// Gets or sets the NativeName + /// Gets or sets the Name /// - public string NativeName + public string Name { - get { return this.nativeName; } - set { this.RaiseAndSetIfChanged(ref this.nativeName, value); } + get { return this.name; } + set { this.RaiseAndSetIfChanged(ref this.name, value); } } /// - /// Gets or sets the Name + /// Gets or sets the NativeName /// - public string Name + public string NativeName { - get { return this.name; } - set { this.RaiseAndSetIfChanged(ref this.name, value); } + get { return this.nativeName; } + set { this.RaiseAndSetIfChanged(ref this.nativeName, value); } } - /// /// The event-handler that is invoked by the subscription that listens for updates /// on the that is being represented by the view-model @@ -93,6 +112,7 @@ public string Name protected override void ObjectChangeEventHandler(ObjectChangedEvent objectChange) { base.ObjectChangeEventHandler(objectChange); + this.UpdateProperties(); } @@ -101,10 +121,9 @@ protected override void ObjectChangeEventHandler(ObjectChangedEvent objectChange /// private void UpdateProperties() { - this.ModifiedOn = this.Thing.ModifiedOn; this.LanguageCode = this.Thing.LanguageCode; - this.NativeName = this.Thing.NativeName; this.Name = this.Thing.Name; + this.NativeName = this.Thing.NativeName; } } } diff --git a/CDP4Composition/CommonView/AutoGenRows/NestedElementRowViewModel.cs b/CDP4Composition/CommonView/AutoGenRows/NestedElementRowViewModel.cs index 5e04a9c83..d46965e99 100644 --- a/CDP4Composition/CommonView/AutoGenRows/NestedElementRowViewModel.cs +++ b/CDP4Composition/CommonView/AutoGenRows/NestedElementRowViewModel.cs @@ -1,25 +1,47 @@ -// ------------------------------------------------------------------------------------------------- +// -------------------------------------------------------------------------------------------------------------------- // -// Copyright (c) 2015-2018 RHEA System S.A. +// Copyright (c) 2015-2021 RHEA System S.A. +// +// Author: Sam Gerené, Alex Vorobiev, Naron Phou, Alexander van Delft, Nathanael Smiechowski, Ahmed Abulwafa Ahmed +// +// This file is part of CDP4-IME Community Edition. +// This is an auto-generated class. Any manual changes to this file will be overwritten! +// +// The CDP4-IME Community Edition is free software; you can redistribute it and/or +// modify it under the terms of the GNU Affero General Public +// License as published by the Free Software Foundation; either +// version 3 of the License, or (at your option) any later version. +// +// The CDP4-IME Community Edition is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +// Lesser General Public License for more details. +// +// You should have received a copy of the GNU Affero General Public License +// along with this program. If not, see . // // // This is an auto-generated class. Any manual changes on this file will be overwritten! // -// ------------------------------------------------------------------------------------------------- +// -------------------------------------------------------------------------------------------------------------------- namespace CDP4CommonView { using System; using System.Reactive.Linq; + using CDP4Common.CommonData; using CDP4Common.DiagramData; using CDP4Common.EngineeringModelData; using CDP4Common.ReportingData; using CDP4Common.SiteDirectoryData; + using CDP4Composition.Mvvm; + using CDP4Dal; using CDP4Dal.Events; - using CDP4Dal.Permission; + using CDP4Dal.Permission; + using ReactiveUI; /// @@ -27,36 +49,50 @@ namespace CDP4CommonView /// public partial class NestedElementRowViewModel : RowViewModelBase { + /// + /// Backing field for property + /// + private bool isVolatile; /// - /// Backing field for + /// Backing field for property /// private string name; /// - /// Backing field for + /// Backing field for property /// - private string shortName; + private DomainOfExpertise owner; /// - /// Backing field for + /// Backing field for property /// - private bool isVolatile; + private string ownerName; + + /// + /// Backing field for property + /// + private string ownerShortName; /// - /// Backing field for + /// Backing field for property /// private ElementDefinition rootElement; /// - /// Backing field for + /// Backing field for property + /// + private string rootElementName; + + /// + /// Backing field for property /// private string rootElementShortName; /// - /// Backing field for + /// Backing field for property /// - private string rootElementName; + private string shortName; /// /// Initializes a new instance of the class @@ -69,6 +105,14 @@ public NestedElementRowViewModel(NestedElement nestedElement, ISession session, this.UpdateProperties(); } + /// + /// Gets or sets the IsVolatile + /// + public bool IsVolatile + { + get { return this.isVolatile; } + set { this.RaiseAndSetIfChanged(ref this.isVolatile, value); } + } /// /// Gets or sets the Name @@ -80,21 +124,30 @@ public string Name } /// - /// Gets or sets the ShortName + /// Gets or sets the Owner /// - public string ShortName + public DomainOfExpertise Owner { - get { return this.shortName; } - set { this.RaiseAndSetIfChanged(ref this.shortName, value); } + get { return this.owner; } + set { this.RaiseAndSetIfChanged(ref this.owner, value); } } /// - /// Gets or sets the IsVolatile + /// Gets or set the Name of /// - public bool IsVolatile + public string OwnerName { - get { return this.isVolatile; } - set { this.RaiseAndSetIfChanged(ref this.isVolatile, value); } + get { return this.ownerName; } + set { this.RaiseAndSetIfChanged(ref this.ownerName, value); } + } + + /// + /// Gets or set the ShortName of + /// + public string OwnerShortName + { + get { return this.ownerShortName; } + set { this.RaiseAndSetIfChanged(ref this.ownerShortName, value); } } /// @@ -106,6 +159,15 @@ public ElementDefinition RootElement set { this.RaiseAndSetIfChanged(ref this.rootElement, value); } } + /// + /// Gets or set the Name of + /// + public string RootElementName + { + get { return this.rootElementName; } + set { this.RaiseAndSetIfChanged(ref this.rootElementName, value); } + } + /// /// Gets or set the ShortName of /// @@ -116,15 +178,14 @@ public string RootElementShortName } /// - /// Gets or set the Name of + /// Gets or sets the ShortName /// - public string RootElementName + public string ShortName { - get { return this.rootElementName; } - set { this.RaiseAndSetIfChanged(ref this.rootElementName, value); } + get { return this.shortName; } + set { this.RaiseAndSetIfChanged(ref this.shortName, value); } } - /// /// The event-handler that is invoked by the subscription that listens for updates /// on the that is being represented by the view-model @@ -135,6 +196,7 @@ public string RootElementName protected override void ObjectChangeEventHandler(ObjectChangedEvent objectChange) { base.ObjectChangeEventHandler(objectChange); + this.UpdateProperties(); } @@ -143,16 +205,31 @@ protected override void ObjectChangeEventHandler(ObjectChangedEvent objectChange /// private void UpdateProperties() { - this.ModifiedOn = this.Thing.ModifiedOn; - this.Name = this.Thing.Name; - this.ShortName = this.Thing.ShortName; this.IsVolatile = this.Thing.IsVolatile; - if (this.Thing.RootElement != null) - { - this.RootElementShortName = this.Thing.RootElement.ShortName; - this.RootElementName = this.Thing.RootElement.Name; - } + this.Name = this.Thing.Name; + this.Owner = this.Thing.Owner; + if (this.Thing.Owner != null) + { + this.OwnerName = this.Thing.Owner.Name; + this.OwnerShortName = this.Thing.Owner.ShortName; + } + else + { + this.OwnerName = string.Empty; + this.OwnerShortName = string.Empty; + } this.RootElement = this.Thing.RootElement; + if (this.Thing.RootElement != null) + { + this.RootElementName = this.Thing.RootElement.Name; + this.RootElementShortName = this.Thing.RootElement.ShortName; + } + else + { + this.RootElementName = string.Empty; + this.RootElementShortName = string.Empty; + } + this.ShortName = this.Thing.ShortName; } } } diff --git a/CDP4Composition/CommonView/AutoGenRows/NestedParameterRowViewModel.cs b/CDP4Composition/CommonView/AutoGenRows/NestedParameterRowViewModel.cs index 28a687cb8..3a78b75f2 100644 --- a/CDP4Composition/CommonView/AutoGenRows/NestedParameterRowViewModel.cs +++ b/CDP4Composition/CommonView/AutoGenRows/NestedParameterRowViewModel.cs @@ -1,25 +1,47 @@ -// ------------------------------------------------------------------------------------------------- +// -------------------------------------------------------------------------------------------------------------------- // -// Copyright (c) 2015-2018 RHEA System S.A. +// Copyright (c) 2015-2021 RHEA System S.A. +// +// Author: Sam Gerené, Alex Vorobiev, Naron Phou, Alexander van Delft, Nathanael Smiechowski, Ahmed Abulwafa Ahmed +// +// This file is part of CDP4-IME Community Edition. +// This is an auto-generated class. Any manual changes to this file will be overwritten! +// +// The CDP4-IME Community Edition is free software; you can redistribute it and/or +// modify it under the terms of the GNU Affero General Public +// License as published by the Free Software Foundation; either +// version 3 of the License, or (at your option) any later version. +// +// The CDP4-IME Community Edition is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +// Lesser General Public License for more details. +// +// You should have received a copy of the GNU Affero General Public License +// along with this program. If not, see . // // // This is an auto-generated class. Any manual changes on this file will be overwritten! // -// ------------------------------------------------------------------------------------------------- +// -------------------------------------------------------------------------------------------------------------------- namespace CDP4CommonView { using System; using System.Reactive.Linq; + using CDP4Common.CommonData; using CDP4Common.DiagramData; using CDP4Common.EngineeringModelData; using CDP4Common.ReportingData; using CDP4Common.SiteDirectoryData; + using CDP4Composition.Mvvm; + using CDP4Dal; using CDP4Dal.Events; - using CDP4Dal.Permission; + using CDP4Dal.Permission; + using ReactiveUI; /// @@ -27,51 +49,60 @@ namespace CDP4CommonView /// public partial class NestedParameterRowViewModel : RowViewModelBase { + /// + /// Backing field for property + /// + private ActualFiniteState actualState; /// - /// Backing field for + /// Backing field for property /// - private string path; + private string actualStateName; /// - /// Backing field for + /// Backing field for property /// - private string formula; + private string actualStateShortName; /// - /// Backing field for + /// Backing field for property /// private string actualValue; /// - /// Backing field for + /// Backing field for property /// - private bool isVolatile; + private ParameterBase associatedParameter; /// - /// Backing field for + /// Backing field for property /// - private ParameterBase associatedParameter; + private string formula; /// - /// Backing field for + /// Backing field for property /// - private ActualFiniteState actualState; + private bool isVolatile; /// - /// Backing field for + /// Backing field for property /// private DomainOfExpertise owner; /// - /// Backing field for + /// Backing field for property + /// + private string ownerName; + + /// + /// Backing field for property /// private string ownerShortName; /// - /// Backing field for + /// Backing field for property /// - private string ownerName; + private string path; /// /// Initializes a new instance of the class @@ -84,23 +115,31 @@ public NestedParameterRowViewModel(NestedParameter nestedParameter, ISession ses this.UpdateProperties(); } + /// + /// Gets or sets the ActualState + /// + public ActualFiniteState ActualState + { + get { return this.actualState; } + set { this.RaiseAndSetIfChanged(ref this.actualState, value); } + } /// - /// Gets or sets the Path + /// Gets or set the Name of /// - public string Path + public string ActualStateName { - get { return this.path; } - set { this.RaiseAndSetIfChanged(ref this.path, value); } + get { return this.actualStateName; } + set { this.RaiseAndSetIfChanged(ref this.actualStateName, value); } } /// - /// Gets or sets the Formula + /// Gets or set the ShortName of /// - public string Formula + public string ActualStateShortName { - get { return this.formula; } - set { this.RaiseAndSetIfChanged(ref this.formula, value); } + get { return this.actualStateShortName; } + set { this.RaiseAndSetIfChanged(ref this.actualStateShortName, value); } } /// @@ -113,30 +152,30 @@ public string ActualValue } /// - /// Gets or sets the IsVolatile + /// Gets or sets the AssociatedParameter /// - public bool IsVolatile + public ParameterBase AssociatedParameter { - get { return this.isVolatile; } - set { this.RaiseAndSetIfChanged(ref this.isVolatile, value); } + get { return this.associatedParameter; } + set { this.RaiseAndSetIfChanged(ref this.associatedParameter, value); } } /// - /// Gets or sets the AssociatedParameter + /// Gets or sets the Formula /// - public ParameterBase AssociatedParameter + public string Formula { - get { return this.associatedParameter; } - set { this.RaiseAndSetIfChanged(ref this.associatedParameter, value); } + get { return this.formula; } + set { this.RaiseAndSetIfChanged(ref this.formula, value); } } /// - /// Gets or sets the ActualState + /// Gets or sets the IsVolatile /// - public ActualFiniteState ActualState + public bool IsVolatile { - get { return this.actualState; } - set { this.RaiseAndSetIfChanged(ref this.actualState, value); } + get { return this.isVolatile; } + set { this.RaiseAndSetIfChanged(ref this.isVolatile, value); } } /// @@ -148,6 +187,15 @@ public DomainOfExpertise Owner set { this.RaiseAndSetIfChanged(ref this.owner, value); } } + /// + /// Gets or set the Name of + /// + public string OwnerName + { + get { return this.ownerName; } + set { this.RaiseAndSetIfChanged(ref this.ownerName, value); } + } + /// /// Gets or set the ShortName of /// @@ -158,15 +206,14 @@ public string OwnerShortName } /// - /// Gets or set the Name of + /// Gets or sets the Path /// - public string OwnerName + public string Path { - get { return this.ownerName; } - set { this.RaiseAndSetIfChanged(ref this.ownerName, value); } + get { return this.path; } + set { this.RaiseAndSetIfChanged(ref this.path, value); } } - /// /// The event-handler that is invoked by the subscription that listens for updates /// on the that is being represented by the view-model @@ -177,6 +224,7 @@ public string OwnerName protected override void ObjectChangeEventHandler(ObjectChangedEvent objectChange) { base.ObjectChangeEventHandler(objectChange); + this.UpdateProperties(); } @@ -185,19 +233,33 @@ protected override void ObjectChangeEventHandler(ObjectChangedEvent objectChange /// private void UpdateProperties() { - this.ModifiedOn = this.Thing.ModifiedOn; - this.Path = this.Thing.Path; - this.Formula = this.Thing.Formula; + this.ActualState = this.Thing.ActualState; + if (this.Thing.ActualState != null) + { + this.ActualStateName = this.Thing.ActualState.Name; + this.ActualStateShortName = this.Thing.ActualState.ShortName; + } + else + { + this.ActualStateName = string.Empty; + this.ActualStateShortName = string.Empty; + } this.ActualValue = this.Thing.ActualValue; - this.IsVolatile = this.Thing.IsVolatile; this.AssociatedParameter = this.Thing.AssociatedParameter; - this.ActualState = this.Thing.ActualState; - if (this.Thing.Owner != null) - { - this.OwnerShortName = this.Thing.Owner.ShortName; - this.OwnerName = this.Thing.Owner.Name; - } + this.Formula = this.Thing.Formula; + this.IsVolatile = this.Thing.IsVolatile; this.Owner = this.Thing.Owner; + if (this.Thing.Owner != null) + { + this.OwnerName = this.Thing.Owner.Name; + this.OwnerShortName = this.Thing.Owner.ShortName; + } + else + { + this.OwnerName = string.Empty; + this.OwnerShortName = string.Empty; + } + this.Path = this.Thing.Path; } } } diff --git a/CDP4Composition/CommonView/AutoGenRows/NotExpressionRowViewModel.cs b/CDP4Composition/CommonView/AutoGenRows/NotExpressionRowViewModel.cs index b014b7baf..01df58f8b 100644 --- a/CDP4Composition/CommonView/AutoGenRows/NotExpressionRowViewModel.cs +++ b/CDP4Composition/CommonView/AutoGenRows/NotExpressionRowViewModel.cs @@ -1,25 +1,47 @@ -// ------------------------------------------------------------------------------------------------- +// -------------------------------------------------------------------------------------------------------------------- // -// Copyright (c) 2015-2018 RHEA System S.A. +// Copyright (c) 2015-2021 RHEA System S.A. +// +// Author: Sam Gerené, Alex Vorobiev, Naron Phou, Alexander van Delft, Nathanael Smiechowski, Ahmed Abulwafa Ahmed +// +// This file is part of CDP4-IME Community Edition. +// This is an auto-generated class. Any manual changes to this file will be overwritten! +// +// The CDP4-IME Community Edition is free software; you can redistribute it and/or +// modify it under the terms of the GNU Affero General Public +// License as published by the Free Software Foundation; either +// version 3 of the License, or (at your option) any later version. +// +// The CDP4-IME Community Edition is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +// Lesser General Public License for more details. +// +// You should have received a copy of the GNU Affero General Public License +// along with this program. If not, see . // // // This is an auto-generated class. Any manual changes on this file will be overwritten! // -// ------------------------------------------------------------------------------------------------- +// -------------------------------------------------------------------------------------------------------------------- namespace CDP4CommonView { using System; using System.Reactive.Linq; + using CDP4Common.CommonData; using CDP4Common.DiagramData; using CDP4Common.EngineeringModelData; using CDP4Common.ReportingData; using CDP4Common.SiteDirectoryData; + using CDP4Composition.Mvvm; + using CDP4Dal; using CDP4Dal.Events; - using CDP4Dal.Permission; + using CDP4Dal.Permission; + using ReactiveUI; /// @@ -27,9 +49,8 @@ namespace CDP4CommonView /// public partial class NotExpressionRowViewModel : BooleanExpressionRowViewModel { - /// - /// Backing field for + /// Backing field for property /// private BooleanExpression term; @@ -44,7 +65,6 @@ public NotExpressionRowViewModel(NotExpression notExpression, ISession session, this.UpdateProperties(); } - /// /// Gets or sets the Term /// @@ -54,7 +74,6 @@ public BooleanExpression Term set { this.RaiseAndSetIfChanged(ref this.term, value); } } - /// /// The event-handler that is invoked by the subscription that listens for updates /// on the that is being represented by the view-model @@ -65,6 +84,7 @@ public BooleanExpression Term protected override void ObjectChangeEventHandler(ObjectChangedEvent objectChange) { base.ObjectChangeEventHandler(objectChange); + this.UpdateProperties(); } @@ -73,7 +93,6 @@ protected override void ObjectChangeEventHandler(ObjectChangedEvent objectChange /// private void UpdateProperties() { - this.ModifiedOn = this.Thing.ModifiedOn; this.Term = this.Thing.Term; } } diff --git a/CDP4Composition/CommonView/AutoGenRows/NoteRowViewModel.cs b/CDP4Composition/CommonView/AutoGenRows/NoteRowViewModel.cs index 3d392a466..26e73cfb8 100644 --- a/CDP4Composition/CommonView/AutoGenRows/NoteRowViewModel.cs +++ b/CDP4Composition/CommonView/AutoGenRows/NoteRowViewModel.cs @@ -1,25 +1,47 @@ -// ------------------------------------------------------------------------------------------------- +// -------------------------------------------------------------------------------------------------------------------- // -// Copyright (c) 2015-2018 RHEA System S.A. +// Copyright (c) 2015-2021 RHEA System S.A. +// +// Author: Sam Gerené, Alex Vorobiev, Naron Phou, Alexander van Delft, Nathanael Smiechowski, Ahmed Abulwafa Ahmed +// +// This file is part of CDP4-IME Community Edition. +// This is an auto-generated class. Any manual changes to this file will be overwritten! +// +// The CDP4-IME Community Edition is free software; you can redistribute it and/or +// modify it under the terms of the GNU Affero General Public +// License as published by the Free Software Foundation; either +// version 3 of the License, or (at your option) any later version. +// +// The CDP4-IME Community Edition is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +// Lesser General Public License for more details. +// +// You should have received a copy of the GNU Affero General Public License +// along with this program. If not, see . // // // This is an auto-generated class. Any manual changes on this file will be overwritten! // -// ------------------------------------------------------------------------------------------------- +// -------------------------------------------------------------------------------------------------------------------- namespace CDP4CommonView { using System; using System.Reactive.Linq; + using CDP4Common.CommonData; using CDP4Common.DiagramData; using CDP4Common.EngineeringModelData; using CDP4Common.ReportingData; using CDP4Common.SiteDirectoryData; + using CDP4Composition.Mvvm; + using CDP4Dal; using CDP4Dal.Events; - using CDP4Dal.Permission; + using CDP4Dal.Permission; + using ReactiveUI; /// @@ -27,36 +49,35 @@ namespace CDP4CommonView /// public abstract partial class NoteRowViewModel : RowViewModelBase where T : Note { - /// - /// Backing field for + /// Backing field for property /// - private string shortName; + private DateTime createdOn; /// - /// Backing field for + /// Backing field for property /// private string name; /// - /// Backing field for + /// Backing field for property /// - private DateTime createdOn; + private DomainOfExpertise owner; /// - /// Backing field for + /// Backing field for property /// - private DomainOfExpertise owner; + private string ownerName; /// - /// Backing field for + /// Backing field for property /// private string ownerShortName; /// - /// Backing field for + /// Backing field for property /// - private string ownerName; + private string shortName; /// /// Initializes a new instance of the class @@ -69,14 +90,13 @@ protected NoteRowViewModel(T note, ISession session, IViewModelBase conta this.UpdateProperties(); } - /// - /// Gets or sets the ShortName + /// Gets or sets the CreatedOn /// - public string ShortName + public DateTime CreatedOn { - get { return this.shortName; } - set { this.RaiseAndSetIfChanged(ref this.shortName, value); } + get { return this.createdOn; } + set { this.RaiseAndSetIfChanged(ref this.createdOn, value); } } /// @@ -89,21 +109,21 @@ public string Name } /// - /// Gets or sets the CreatedOn + /// Gets or sets the Owner /// - public DateTime CreatedOn + public DomainOfExpertise Owner { - get { return this.createdOn; } - set { this.RaiseAndSetIfChanged(ref this.createdOn, value); } + get { return this.owner; } + set { this.RaiseAndSetIfChanged(ref this.owner, value); } } /// - /// Gets or sets the Owner + /// Gets or set the Name of /// - public DomainOfExpertise Owner + public string OwnerName { - get { return this.owner; } - set { this.RaiseAndSetIfChanged(ref this.owner, value); } + get { return this.ownerName; } + set { this.RaiseAndSetIfChanged(ref this.ownerName, value); } } /// @@ -116,15 +136,14 @@ public string OwnerShortName } /// - /// Gets or set the Name of + /// Gets or sets the ShortName /// - public string OwnerName + public string ShortName { - get { return this.ownerName; } - set { this.RaiseAndSetIfChanged(ref this.ownerName, value); } + get { return this.shortName; } + set { this.RaiseAndSetIfChanged(ref this.shortName, value); } } - /// /// The event-handler that is invoked by the subscription that listens for updates /// on the that is being represented by the view-model @@ -135,6 +154,7 @@ public string OwnerName protected override void ObjectChangeEventHandler(ObjectChangedEvent objectChange) { base.ObjectChangeEventHandler(objectChange); + this.UpdateProperties(); } @@ -143,16 +163,20 @@ protected override void ObjectChangeEventHandler(ObjectChangedEvent objectChange /// private void UpdateProperties() { - this.ModifiedOn = this.Thing.ModifiedOn; - this.ShortName = this.Thing.ShortName; - this.Name = this.Thing.Name; this.CreatedOn = this.Thing.CreatedOn; - if (this.Thing.Owner != null) - { - this.OwnerShortName = this.Thing.Owner.ShortName; - this.OwnerName = this.Thing.Owner.Name; - } + this.Name = this.Thing.Name; this.Owner = this.Thing.Owner; + if (this.Thing.Owner != null) + { + this.OwnerName = this.Thing.Owner.Name; + this.OwnerShortName = this.Thing.Owner.ShortName; + } + else + { + this.OwnerName = string.Empty; + this.OwnerShortName = string.Empty; + } + this.ShortName = this.Thing.ShortName; } } } diff --git a/CDP4Composition/CommonView/AutoGenRows/OptionRowViewModel.cs b/CDP4Composition/CommonView/AutoGenRows/OptionRowViewModel.cs index acfd28583..ec0e2952a 100644 --- a/CDP4Composition/CommonView/AutoGenRows/OptionRowViewModel.cs +++ b/CDP4Composition/CommonView/AutoGenRows/OptionRowViewModel.cs @@ -1,25 +1,47 @@ -// ------------------------------------------------------------------------------------------------- +// -------------------------------------------------------------------------------------------------------------------- // -// Copyright (c) 2015-2018 RHEA System S.A. +// Copyright (c) 2015-2021 RHEA System S.A. +// +// Author: Sam Gerené, Alex Vorobiev, Naron Phou, Alexander van Delft, Nathanael Smiechowski, Ahmed Abulwafa Ahmed +// +// This file is part of CDP4-IME Community Edition. +// This is an auto-generated class. Any manual changes to this file will be overwritten! +// +// The CDP4-IME Community Edition is free software; you can redistribute it and/or +// modify it under the terms of the GNU Affero General Public +// License as published by the Free Software Foundation; either +// version 3 of the License, or (at your option) any later version. +// +// The CDP4-IME Community Edition is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +// Lesser General Public License for more details. +// +// You should have received a copy of the GNU Affero General Public License +// along with this program. If not, see . // // // This is an auto-generated class. Any manual changes on this file will be overwritten! // -// ------------------------------------------------------------------------------------------------- +// -------------------------------------------------------------------------------------------------------------------- namespace CDP4CommonView { using System; using System.Reactive.Linq; + using CDP4Common.CommonData; using CDP4Common.DiagramData; using CDP4Common.EngineeringModelData; using CDP4Common.ReportingData; using CDP4Common.SiteDirectoryData; + using CDP4Composition.Mvvm; + using CDP4Dal; using CDP4Dal.Events; - using CDP4Dal.Permission; + using CDP4Dal.Permission; + using ReactiveUI; /// @@ -27,7 +49,6 @@ namespace CDP4CommonView /// public partial class OptionRowViewModel : DefinedThingRowViewModel