/// <summary>
        /// Indicates if the settings in this object are inheritable by another object.
        /// </summary>
        /// <param name="type">The type of the object to test for inheritability</param>
        /// <returns><c>true</c> if the settings can be inherited, else <c>false</c></returns>
        public bool IsInheritableBy(ObjectType type)
        {
            if (type == ObjectType.Inherit)
            {
                throw new ArgumentException("Can not test inheritability by inherit objects", "type");
            }

            if (ObjectType != ObjectType.Inherit)
            {
                return(false);
            }

            InheritType setting = (InheritType)((_type & 0x00F00000) >> 20);

            return(setting == InheritType.AnyObject ||
                   (setting == InheritType.ApplicationObjects && type == ObjectType.Application) ||
                   (setting == InheritType.DeviceObjects && type == ObjectType.Device));
        }
            public string expandChildren;   // 謎

            public Part(NodeReader node)
            {
                name        = node.AtText("name");
                index       = node.AtInteger("arrayIndex");
                parent      = node.AtInteger("parentIndex");
                type        = NodeTypeOperator.FromString(node.AtText("type"));
                boundsType  = BoundsTypeOperator.FromString(node.AtText("boundsType"));
                inheritType = InheritTypeOperator.FromString(node.AtText("inheritType"));
                //inheritRates
                blendType = AlphaBlendTypeOperator.FromString(node.AtText("alphaBlendType"));
                show      = node.AtBoolean("show");

                var n = node.ChildOrNull("expandAttribute");

                expandAttribute = n != null?n.AtText() : null;

                n = node.ChildOrNull("expandChildren");
                expandChildren = n != null?n.AtText() : null;
            }
Esempio n. 3
0
 /// <summary>
 /// Creates an 'inherit' object that contains common settings.
 /// </summary>
 /// <param name="id">The identity of the object to create.</param>
 /// <param name="inheritType">The type of object the settings apply to.</param>
 /// <returns>The object representing the new settings.</returns>
 public BcdObject CreateInherit(Guid id, InheritType inheritType)
 {
     Guid obj = _store.CreateObject(id, BcdObject.MakeInheritType(inheritType));
     return new BcdObject(_store, obj);
 }
 internal static int MakeInheritType(InheritType inheritType)
 {
     return 0x20000000 | (((int)inheritType << 20) & 0x00F00000);
 }
 internal static int MakeInheritType(InheritType inheritType)
 {
     return(0x20000000 | (((int)inheritType << 20) & 0x00F00000));
 }
Esempio n. 6
0
        /// <summary>
        /// Creates an 'inherit' object that contains common settings.
        /// </summary>
        /// <param name="id">The identity of the object to create</param>
        /// <param name="inheritType">The type of object the settings apply to</param>
        /// <returns>The object representing the new settings</returns>
        public BcdObject CreateInherit(Guid id, InheritType inheritType)
        {
            Guid obj = _store.CreateObject(id, BcdObject.MakeInheritType(inheritType));

            return(new BcdObject(_store, obj));
        }
            public Part( NodeReader node )
            {
                name = node.AtText( "name" );
                index = node.AtInteger( "arrayIndex" );
                parent = node.AtInteger( "parentIndex" );
                type = NodeTypeOperator.FromString( node.AtText( "type" ) );
                boundsType = BoundsTypeOperator.FromString( node.AtText( "boundsType" ) );
                inheritType = InheritTypeOperator.FromString( node.AtText( "inheritType" ) );
                //inheritRates
                blendType = AlphaBlendTypeOperator.FromString( node.AtText( "alphaBlendType" ) );
                show = node.AtBoolean( "show" );

                var n = node.ChildOrNull( "expandAttribute" );
                expandAttribute = n != null ? n.AtText() : null;

                n = node.ChildOrNull( "expandChildren" );
                expandChildren = n != null ? n.AtText() : null;
            }