UpdateCompartments() статический приватный Метод

Updates the compartments for the shapes associated to the given list of model elements
static private UpdateCompartments ( global elements, global shapeType, string compartmentName, bool repaintOnly ) : void
elements global List of model elements
shapeType global The type of shape that needs updating
compartmentName string The name of the compartment to update
repaintOnly bool If true, the method will only invalidate the shape for a repaint, without re-initializing the shape.
Результат void
Пример #1
0
			internal static void RolePlayerChanged(DslModeling::RolePlayerChangedEventArgs e, bool repaintOnly)
			{
				if(e==null) throw new global::System.ArgumentNullException("e");
				if(typeof(global::Company.OrmLanguage.EntityHasProperties).IsAssignableFrom(e.DomainRelationship.ImplementationClass))
				{
					if(e.DomainRole.IsSource)
					{
						//global::System.Collections.IEnumerable oldElements = CompartmentItemAddRule.GetEntityElementForEntityShapePropertiesFromLastLink((global::Company.OrmLanguage.Property)e.OldRolePlayer);
						//foreach(DslModeling::ModelElement element in oldElements)
						//{
						//	DslModeling::LinkedElementCollection<DslDiagrams::PresentationElement> pels = DslDiagrams::PresentationViewsSubject.GetPresentation(element);
						//	foreach(DslDiagrams::PresentationElement pel in pels)
						//	{
						//		global::Company.OrmLanguage.EntityShape compartmentShape = pel as global::Company.OrmLanguage.EntityShape;
						//		if(compartmentShape != null)
						//		{
						//			compartmentShape.GetCompartmentMappings()[0].InitializeCompartmentShape(compartmentShape);
						//		}
						//	}
						//}
						
						global::System.Collections.IEnumerable elements = CompartmentItemAddRule.GetEntityElementForEntityShapePropertiesFromLastLink((global::Company.OrmLanguage.EntityHasProperties)e.ElementLink);
						CompartmentItemAddRule.UpdateCompartments(elements, typeof(global::Company.OrmLanguage.EntityShape), "Properties", repaintOnly);
					}
					else 
					{
						global::System.Collections.IEnumerable elements = CompartmentItemAddRule.GetEntityElementForEntityShapeProperties((global::Company.OrmLanguage.Property)e.NewRolePlayer);
						CompartmentItemAddRule.UpdateCompartments(elements, typeof(global::Company.OrmLanguage.EntityShape), "Properties", repaintOnly);
					}
				}
			}
Пример #2
0
			internal static void ElementPropertyChanged(DslModeling::ElementPropertyChangedEventArgs e, bool repaintOnly)
			{
				if(e==null) throw new global::System.ArgumentNullException("e");
				if(e.ModelElement is global::Company.OrmLanguage.Property && e.DomainProperty.Id == global::Company.OrmLanguage.Property.NameDomainPropertyId)
				{
					global::System.Collections.IEnumerable elements = CompartmentItemAddRule.GetEntityElementForEntityShapeProperties((global::Company.OrmLanguage.Property)e.ModelElement);
					CompartmentItemAddRule.UpdateCompartments(elements, typeof(global::Company.OrmLanguage.EntityShape), "Properties", repaintOnly);
				}
			}
Пример #3
0
			internal static void ElementDeleted(DslModeling::ElementDeletedEventArgs e, bool repaintOnly)
			{
				if(e==null) throw new global::System.ArgumentNullException("e");
				if(e.ModelElement is global::Company.OrmLanguage.EntityHasProperties)
				{
					global::System.Collections.ICollection elements = CompartmentItemAddRule.GetEntityElementForEntityShapePropertiesFromLastLink((global::Company.OrmLanguage.EntityHasProperties)e.ModelElement);
					CompartmentItemAddRule.UpdateCompartments(elements, typeof(global::Company.OrmLanguage.EntityShape), "Properties", repaintOnly);
				}
			}
Пример #4
0
			internal static void RolePlayerPositionChanged(DslModeling::RolePlayerOrderChangedEventArgs e, bool repaintOnly)
			{
				if(e==null) throw new global::System.ArgumentNullException("e");
				if(typeof(global::Company.OrmLanguage.EntityHasProperties).IsAssignableFrom(e.DomainRelationship.ImplementationClass))
				{
					if(!e.CounterpartDomainRole.IsSource)
					{
						global::System.Collections.IEnumerable elements = CompartmentItemAddRule.GetEntityElementForEntityShapeProperties((global::Company.OrmLanguage.Property)e.CounterpartRolePlayer);
						CompartmentItemAddRule.UpdateCompartments(elements, typeof(global::Company.OrmLanguage.EntityShape), "Properties", repaintOnly);
					}
				}
			}