protected BaseModelElementTreeViewModel(ViewModelStore viewModelStore, ModelElement element, ElementLink link, Guid domainRoleId, BaseModelElementTreeViewModel parent, bool bHookUpEvents, bool bCreateContextMenus, MainModelTreeViewModel mainModelTreeVm) : base(viewModelStore, element, bHookUpEvents, false) { this.parent = parent; this.mainModelTreeVm = mainModelTreeVm; this.bCreateContextMenus = bCreateContextMenus; this.elementLink = link; this.domainRoleId = domainRoleId; this.elementLinkOrder = new List<Guid>(); if (link != null) this.linkDomainClassId = link.GetDomainClass().Id; else this.linkDomainClassId = Guid.Empty; Initialize(); }
protected BaseModelElementTreeViewModel(ViewModelStore viewModelStore, ModelElement element, ElementLink link, Guid domainRoleId, BaseModelElementTreeViewModel parent, bool bHookUpEvents, bool bCreateContextMenus, MainModelTreeViewModel mainModelTreeVm) : base(viewModelStore, element, bHookUpEvents, false) { this.parent = parent; this.mainModelTreeVm = mainModelTreeVm; this.bCreateContextMenus = bCreateContextMenus; this.elementLink = link; this.domainRoleId = domainRoleId; this.elementLinkOrder = new List <Guid>(); if (link != null) { this.linkDomainClassId = link.GetDomainClass().Id; } else { this.linkDomainClassId = Guid.Empty; } Initialize(); }
/// <summary> /// Constructor. /// </summary> /// <param name="viewModelStore">View model store containing view models.</param> /// <param name="element">Element represented by this view model.</param> /// <param name="link">Element link, targeting the hosted element.</param> /// <param name="domainRoleId">Domain role id of the role that the hosted element belongs to.</param> /// <param name="parent">Parent of this view model. Can be null.</param> /// <param name="mainModelTreeVm">Model tree view model, this element vm belongs to.</param> protected BaseModelElementTreeViewModel(ViewModelStore viewModelStore, ModelElement element, ElementLink link, Guid domainRoleId, BaseModelElementTreeViewModel parent, MainModelTreeViewModel mainModelTreeVm) :this(viewModelStore, element, link, domainRoleId, parent, false, false, mainModelTreeVm) { }
public ModelElementTreeViewModel(ViewModelStore viewModelStore, ModelElement element, ElementLink link, System.Guid domainRoleId, ModelElementTreeViewModel parent, bool bHookUpEvents, bool bCreateContextMenus, MainModelTreeViewModel mainModelTreeVm) : base(viewModelStore, element, link, domainRoleId, parent, bHookUpEvents, bCreateContextMenus, mainModelTreeVm) { }
/// <summary> /// Constructor. /// </summary> /// <param name="viewModelStore">View model store containing view models.</param> /// <param name="element">Element represented by this view model.</param> /// <param name="link">Element link, targeting the hosted element.</param> /// <param name="domainRoleId">Domain role id of the role that the hosted element belongs to.</param> /// <param name="parent">Parent of this view model. Can be null.</param> /// <param name="mainModelTreeVm">Model tree view model, this element vm belongs to.</param> protected BaseModelElementTreeViewModel(ViewModelStore viewModelStore, ModelElement element, ElementLink link, Guid domainRoleId, BaseModelElementTreeViewModel parent, MainModelTreeViewModel mainModelTreeVm) : this(viewModelStore, element, link, domainRoleId, parent, false, false, mainModelTreeVm) { }
/// <summary> /// Creates the tree view model for the given model element. /// </summary> /// <param name="element">VModell represented by this view model.</param> /// <param name="link">Element link, targeting the hosted element.</param> /// <param name="domainRoleId">Domain role id of the role that the hosted element belongs to.</param> /// <param name="parent">Parent of this view model.</param> /// <param name="bHookUpEvents">Hook up into model events to update the created view model on changes in model if true.</param> /// <param name="bCreateContextMenus">Creates context menus for adding and deleting model elements if true.</param> /// <param name="mainModelTreeVm">Model tree view model, this element vm belongs to.</param> public abstract ModelElementTreeViewModel CreateModelElementTreeViewModel(ModelElement element, ElementLink link, System.Guid domainRoleId, ModelElementTreeViewModel parent, bool bHookUpEvents, bool bCreateContextMenus, MainModelTreeViewModel mainModelTreeVm);
/// <summary> /// Creates the tree view model for the given model element. Doesnt hook up into model events and also does not create /// context menus. /// </summary> /// <param name="modelElement">Model element for which the tree view model is to be created.</param> /// <param name="mainModelTreeVm">Model tree view model, this element vm belongs to.</param> /// <returns> /// View model of type BaseModelElementTreeViewModel if a view model can be created for the given element. Null otherwise.</returns> /// <remarks> /// A view model of the type BaseModelElementViewModel can obly be created for domain classes and referencing relationships, that /// can be embedded in the model tree. /// </remarks> public BaseModelElementTreeViewModel CreateModelElementTreeViewModel(ModelElement modelElement, MainModelTreeViewModel mainModelTreeVm) { return(CreateModelElementTreeViewModel(modelElement, false, false, mainModelTreeVm)); }
/// <summary> /// Creates the tree view model for the given model element. /// </summary> /// <param name="modelElement">Model element for which the tree view model is to be created.</param> /// <param name="bHookUpEvents">Hook up into model events to update the created view model on changes in model if true.</param> /// <param name="bCreateContextMenus">Creates context menus for adding and deleting model elements if true.</param> /// <param name="mainModelTreeVm">Model tree view model, this element vm belongs to.</param> /// <returns> /// View model of type BaseModelElementTreeViewModel if a view model can be created for the given element. Null otherwise.</returns> /// <remarks> /// A view model of the type BaseModelElementViewModel can obly be created for domain classes and referencing relationships, that /// can be embedded in the model tree. /// </remarks> public abstract BaseModelElementTreeViewModel CreateModelElementTreeViewModel(ModelElement modelElement, bool bHookUpEvents, bool bCreateContextMenus, MainModelTreeViewModel mainModelTreeVm);
/// <summary> /// Creates the tree view model for the given model element. Doesnt hook up into model events and also does not create /// context menus. /// </summary> /// <param name="modelElement">Model element for which the tree view model is to be created.</param> /// <param name="mainModelTreeVm">Model tree view model, this element vm belongs to.</param> /// <returns> /// View model of type BaseModelElementTreeViewModel if a view model can be created for the given element. Null otherwise.</returns> /// <remarks> /// A view model of the type BaseModelElementViewModel can obly be created for domain classes and referencing relationships, that /// can be embedded in the model tree. /// </remarks> public BaseModelElementTreeViewModel CreateModelElementTreeViewModel(ModelElement modelElement, MainModelTreeViewModel mainModelTreeVm) { return CreateModelElementTreeViewModel(modelElement, false, false, mainModelTreeVm); }