public ElementValueChangedEventArgs(PartElement component, string propertyName, object oldValue, object newValue)
 {
     Element      = component;
     PropertyName = propertyName;
     OldValue     = oldValue;
     NewValue     = newValue;
 }
Ejemplo n.º 2
0
 public ValidationMessage(PartElement sourceElement, string messageCode, ValidationLevel level, params object[] arguments)
 {
     Code          = messageCode;
     Level         = level;
     SourceElement = sourceElement;
     if (sourceElement is PartSurface)
     {
         SourceKey = "SURFACE";
     }
     else if (sourceElement is SurfaceComponent)
     {
         SourceKey = "COMPONENT";
     }
     else if (sourceElement is PartProperties)
     {
         SourceKey = "PART";
     }
     else if (sourceElement is PartBone)
     {
         SourceKey = "BONE";
     }
     else
     {
         SourceKey = "PROJECT";
     }
     MessageArguments = arguments;
 }
Ejemplo n.º 3
0
        public static IElementExtender CreateExtender(PartElement element, Type extensionType)
        {
            var finalType = GetExtenderType(element.GetType(), extensionType);

            if (finalType != null)
            {
                var ctor = finalType.GetConstructor(new Type[] { typeof(PartElement) });
                if (ctor != null)
                {
                    return((IElementExtender)ctor.Invoke(new object[] { element }));
                }

                ctor = finalType.GetConstructor(new Type[] { element.GetType() });
                if (ctor != null)
                {
                    return((IElementExtender)ctor.Invoke(new object[] { element }));
                }

                return((IElementExtender)Activator.CreateInstance(finalType));
            }
            return(null);
        }
Ejemplo n.º 4
0
 public CollectionChangeItemInfo(PartElement element, int oldIndex, int newIndex)
 {
     Element  = element;
     OldIndex = oldIndex;
     NewIndex = newIndex;
 }