protected override bool AcceptTagAttribute(FileAttributesTag tag, XAttribute attrib) { switch (attrib.Name.LocalName) { case "reserved0": tag.Reserved0 = CommonFormatter.ParseBool(attrib.Value); break; case USE_DIRECT_BLIT: tag.UseDirectBlit = SwfMillPrimitives.ParseBoolean(attrib); break; case USE_GPU: tag.UseGPU = SwfMillPrimitives.ParseBoolean(attrib); break; case HAS_METADATA_ATTRIB: tag.HasMetadata = CommonFormatter.ParseBool(attrib.Value); break; case ALLOW_ABC_ATTRIB: tag.AllowAbc = CommonFormatter.ParseBool(attrib.Value); break; case SUPPRESS_CROSSDOMAIN_CACHING_ATTRIB: tag.SuppressCrossDomainCaching = CommonFormatter.ParseBool(attrib.Value); break; case SWF_RELATIVE_URLS_ATTRIB: tag.SwfRelativeUrls = CommonFormatter.ParseBool(attrib.Value); break; case USE_NETWORK_ATTRIB: tag.UseNetwork = CommonFormatter.ParseBool(attrib.Value); break; case "reserved": tag.Reserved = uint.Parse(attrib.Value); break; default: return(false); } return(true); }
protected override bool AcceptTagAttribute(DefineEditTextTag tag, XAttribute attrib) { switch (attrib.Name.LocalName) { case INITIAL_TEXT_ATTRIB: tag.InitialText = attrib.Value; break; case WORD_WRAP_ATTRIB: tag.WordWrap = SwfMillPrimitives.ParseBoolean(attrib); break; case MULTILINE_ATTRIB: tag.Multiline = SwfMillPrimitives.ParseBoolean(attrib); break; case PASSWORD_ATTRIB: tag.Password = SwfMillPrimitives.ParseBoolean(attrib); break; case READONLY_ATTRIB: tag.ReadOnly = SwfMillPrimitives.ParseBoolean(attrib); break; case AUTOSIZE_ATTRIB: tag.AutoSize = SwfMillPrimitives.ParseBoolean(attrib); break; case HAS_LAYOUT_ATTRIB: tag.HasLayout = CommonFormatter.ParseBool(attrib.Value); break; case NOT_SELECTABLE_ATTRIB: tag.NoSelect = SwfMillPrimitives.ParseBoolean(attrib); break; case HAS_BORDER_ATTRIB: tag.Border = SwfMillPrimitives.ParseBoolean(attrib); break; case "static": tag.WasStatic = CommonFormatter.ParseBool(attrib.Value); break; case IS_HTML_ATTRIB: tag.HTML = SwfMillPrimitives.ParseBoolean(attrib); break; case USE_OUTLINES_ATTRIB: tag.UseOutlines = SwfMillPrimitives.ParseBoolean(attrib); break; case FONT_REF_ATTRIB: tag.FontID = ushort.Parse(attrib.Value); tag.HasFont = true; break; case "fontClass": tag.FontClass = attrib.Value; break; case FONT_HEIGHT_ATTRIB: tag.FontHeight = ushort.Parse(attrib.Value); tag.HasFont = true; break; case MAX_LENGTH_ATTRIB: tag.MaxLength = ushort.Parse(attrib.Value); break; case ALIGN_ATTRIB: tag.Align = byte.Parse(attrib.Value); tag.HasLayout = true; break; case LEFT_MARGIN_ATTRIB: tag.LeftMargin = ushort.Parse(attrib.Value); tag.HasLayout = true; break; case RIGHT_MARGIN_ATTRIB: tag.RightMargin = ushort.Parse(attrib.Value); tag.HasLayout = true; break; case INDENT_ATTRIB: tag.Indent = ushort.Parse(attrib.Value); tag.HasLayout = true; break; case LEADING_ATTRIB: tag.Leading = short.Parse(attrib.Value); tag.HasLayout = true; break; case VARIABLE_NAME_ATTRIB: tag.VariableName = attrib.Value; break; default: return(false); } return(true); }