示例#1
0
 private static void WriteSceneComponent(XmlNode componentNode, IceSceneComponent comp, XmlDocument doc)
 {
     foreach (var _property in comp.GetType().GetProperties())
     {
         if (_property.GetCustomAttributes(typeof(IceCream.Attributes.IceComponentPropertyAttribute), true).Length > 0)
         {
             componentNode.AppendChildIfNotNull(WriteProperty(_property.Name, comp, doc));
         }
     }
 }
 internal static object DeepCopyIceSceneComponent(Type type, IceSceneComponent cloneFrom)
 {
     //Create a new instance of the component
     IceSceneComponent comp = (IceSceneComponent)type.Assembly.CreateInstance(type.FullName);
     //CopyPropertiesTo(comp, cloneFrom);
     cloneFrom.CopyValuesTo(comp);
     return comp;
 }
示例#3
0
        public virtual void CopyValuesTo(object target)
        {
            IceSceneComponent component = target as IceSceneComponent;

            component.Enabled = this.Enabled;
        }