ParseAutoSizeType() public static method

public static ParseAutoSizeType ( string value ) : AutoSizeType
value string
return AutoSizeType
Example #1
0
        override public void Setup_BeforeAdd(XML xml)
        {
            base.Setup_BeforeAdd(xml);

            TextFormat tf = _textField.textFormat;

            string str;

            str = xml.GetAttribute("font");
            if (str != null)
            {
                tf.font = str;
            }

            str = xml.GetAttribute("fontSize");
            if (str != null)
            {
                tf.size = int.Parse(str);
            }

            str = xml.GetAttribute("color");
            if (str != null)
            {
                tf.color = ToolSet.ConvertFromHtmlColor(str);
            }

            str = xml.GetAttribute("align");
            if (str != null)
            {
                this.align = FieldTypes.ParseAlign(str);
            }

            str = xml.GetAttribute("vAlign");
            if (str != null)
            {
                this.verticalAlign = FieldTypes.ParseVerticalAlign(str);
            }

            str = xml.GetAttribute("leading");
            if (str != null)
            {
                tf.lineSpacing = int.Parse(str);
            }

            str = xml.GetAttribute("letterSpacing");
            if (str != null)
            {
                tf.letterSpacing = int.Parse(str);
            }

            _ubbEnabled = xml.GetAttributeBool("ubb", false);

            str = xml.GetAttribute("autoSize");
            if (str != null)
            {
                this.autoSize = FieldTypes.ParseAutoSizeType(str);
            }

            tf.underline    = xml.GetAttributeBool("underline", false);
            tf.italic       = xml.GetAttributeBool("italic", false);
            tf.bold         = xml.GetAttributeBool("bold", false);
            this.singleLine = xml.GetAttributeBool("singleLine", false);
            str             = xml.GetAttribute("strokeColor");
            if (str != null)
            {
                this.strokeColor = ToolSet.ConvertFromHtmlColor(str);
                this.stroke      = xml.GetAttributeInt("strokeSize", 1);
            }

            str = xml.GetAttribute("shadowColor");
            if (str != null)
            {
                this.strokeColor  = ToolSet.ConvertFromHtmlColor(str);
                this.shadowOffset = xml.GetAttributeVector("shadowOffset");
            }

            _textField.textFormat = tf;
        }
Example #2
0
        override public void Setup_BeforeAdd(XML xml)
        {
            base.Setup_BeforeAdd(xml);

            string str;

            this.displayAsPassword = xml.GetAttributeBool("password", false);
            str = xml.GetAttribute("font");
            if (str != null)
            {
                _textFormat.font = str;
            }

            str = xml.GetAttribute("fontSize");
            if (str != null)
            {
                _textFormat.size = int.Parse(str);
            }

            str = xml.GetAttribute("color");
            if (str != null)
            {
                _textFormat.color = ToolSet.ConvertFromHtmlColor(str);
            }

            str = xml.GetAttribute("align");
            if (str != null)
            {
                _align = FieldTypes.ParseAlign(str);
            }

            str = xml.GetAttribute("vAlign");
            if (str != null)
            {
                _verticalAlign = FieldTypes.ParseVerticalAlign(str);
            }

            str = xml.GetAttribute("leading");
            if (str != null)
            {
                _textFormat.lineSpacing = int.Parse(str);
            }

            str = xml.GetAttribute("letterSpacing");
            if (str != null)
            {
                _textFormat.letterSpacing = int.Parse(str);
            }

            _ubbEnabled = xml.GetAttributeBool("ubb", false);

            str = xml.GetAttribute("autoSize");
            if (str != null)
            {
                this.autoSize = FieldTypes.ParseAutoSizeType(str);
            }

            _textFormat.underline = xml.GetAttributeBool("underline", false);
            _textFormat.italic    = xml.GetAttributeBool("italic", false);
            _textFormat.bold      = xml.GetAttributeBool("bold", false);
            _singleLine           = xml.GetAttributeBool("singleLine", false);
            str = xml.GetAttribute("strokeColor");
            if (str != null)
            {
                _strokeColor = ToolSet.ConvertFromHtmlColor(str);
                _stroke      = xml.GetAttributeInt("strokeSize", 1);
            }
        }