Пример #1
0
        protected override bool AcceptPlaceAttribute(PlaceObject3Tag tag, XAttribute attrib)
        {
            switch (attrib.Name.LocalName)
            {
            case NAME_ATTRIB:
                tag.Name = attrib.Value;
                break;

            case "className":
                tag.ClassName = attrib.Value;
                break;

            case REPLACE_ATTRIB:
                tag.Move = CommonFormatter.ParseBool(attrib.Value);
                break;

            case MORPH_ATTRIB:
                tag.Ratio = ushort.Parse(attrib.Value);
                break;

            case ALL_FLAGS1_ATTRIB:
                tag.HasClipActions = true;
                var flags1 = int.Parse(attrib.Value);
                XClipEventFlags.SetFlags1(ref tag.ClipActions.Flags, flags1);
                break;

            case ALL_FLAGS2_ATTRIB:
                tag.HasClipActions = true;
                var flags2 = int.Parse(attrib.Value);
                XClipEventFlags.SetFlags2(ref tag.ClipActions.Flags, flags2);
                break;

            case "hasImage":
                tag.HasImage = CommonFormatter.ParseBool(attrib.Value);
                break;

            case BITMAP_CACHING_ATTRIB:
                tag.BitmapCache = byte.Parse(attrib.Value);
                break;

            default:
                return(false);
            }
            return(true);
        }