Example #1
0
        override public void Setup_BeforeAdd(XML xml)
        {
            base.Setup_BeforeAdd(xml);

            string str;

            str = (string)xml.GetAttribute("url");
            if (str != null)
            {
                url = str;
            }
            else
            {
                url = "";
            }

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

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

            str = (string)xml.GetAttribute("overflow");
            if (str != null)
            {
                _overflow = FieldTypes.parseOverflowType(str);
            }
            else
            {
                _overflow = OverflowType.Visible;
            }

            _autoSize = (string)xml.GetAttribute("autoSize") == "true";

            str            = (string)xml.GetAttribute("errorSign");
            _showErrorSign = str == "true";

            str = (string)xml.GetAttribute("jtaAction");
            if (str != null)
            {
                _jtaAction = int.Parse(str);
            }
            else
            {
                _jtaAction = 0;
            }

            str = (string)xml.GetAttribute("jtaDir");
            if (str != null)
            {
                _jtaDir = int.Parse(str);
                if (_jtaDir == 0)
                {
                    _jtaDir = 1;
                }
            }
            else
            {
                _jtaDir = 1;
            }
            _playing = (string)xml.GetAttribute("playing") != "false";

            if (_url != null)
            {
                LoadContent();
            }
        }
Example #2
0
        override public void Setup_BeforeAdd(XML xml)
        {
            base.Setup_BeforeAdd(xml);

            string str;

            this.displayAsPassword = (string)xml.GetAttribute("password") == "true";
            str = (string)xml.GetAttribute("font");
            if (str != null)
            {
                _font = str;
            }

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

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

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

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

            str = (string)xml.GetAttribute("leading");
            if (str != null)
            {
                _leading = int.Parse(str);
            }
            else
            {
                _leading = 3;
            }

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

            _ubbEnabled = (string)xml.GetAttribute("ubb") == "true";

            this.displayAsPassword = (string)xml.GetAttribute("password") == "true";

            str           = (string)xml.GetAttribute("autoSize");
            _updatingSize = true;
            if (str != null)
            {
                this.autoSize = FieldTypes.parseAutoSizeType(str);
            }

            UpdateTextFormat();
            _updatingSize = false;

            str = (string)xml.GetAttribute("text");
            if (str != null && str.Length > 0)
            {
                this.text = (string)xml.GetAttribute("text");
            }
            else
            {
                this.text = (string)xml.GetAttribute("demoText");
            }
        }