ParseVerticalAlign() public static method

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

            string str;

            str = xml.GetAttribute("url");
            if (str != null)
            {
                _url = 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("fill");
            if (str != null)
            {
                _fill = FieldTypes.ParseFillType(str);
            }

            _autoSize = xml.GetAttributeBool("autoSize", false);

            str = xml.GetAttribute("errorSign");
            if (str != null)
            {
                showErrorSign = str == "true";
            }

            _playing = xml.GetAttributeBool("playing", true);

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

            if (_url != null)
            {
                LoadContent();
            }
        }
Example #2
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 #3
0
        override public void Setup_BeforeAdd(XML xml)
        {
            base.Setup_BeforeAdd(xml);

            string str;

            str = xml.GetAttribute("url");
            if (str != null)
            {
                _url = 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("fill");
            if (str != null)
            {
                _fill = FieldTypes.ParseFillType(str);
            }

            _autoSize = xml.GetAttributeBool("autoSize", false);

            str = xml.GetAttribute("errorSign");
            if (str != null)
            {
                showErrorSign = str == "true";
            }

            str = xml.GetAttribute("frame");
            if (str != null)
            {
                _content.currentFrame = int.Parse(str);
            }
            _content.playing = xml.GetAttributeBool("playing", true);

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

            str = xml.GetAttribute("fillMethod");
            if (str != null)
            {
                _content.fillMethod = FieldTypes.ParseFillMethod(str);
            }

            if (_content.fillMethod != FillMethod.None)
            {
                _content.fillOrigin    = xml.GetAttributeInt("fillOrigin");
                _content.fillClockwise = xml.GetAttributeBool("fillClockwise", true);
                _content.fillAmount    = (float)xml.GetAttributeInt("fillAmount", 100) / 100;
            }

            if (_url != null)
            {
                LoadContent();
            }
        }
Example #4
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);
            }
        }