예제 #1
0
 public GLoader()
 {
     _url           = string.Empty;
     _align         = AlignType.Left;
     _verticalAlign = VertAlignType.Top;
     showErrorSign  = true;
 }
예제 #2
0
        override public void Setup_BeforeAdd(ByteBuffer buffer, int beginPos)
        {
            base.Setup_BeforeAdd(buffer, beginPos);

            buffer.Seek(beginPos, 5);

            _url             = buffer.ReadS();
            _align           = (AlignType)buffer.ReadByte();
            _verticalAlign   = (VertAlignType)buffer.ReadByte();
            _fill            = (FillType)buffer.ReadByte();
            _shrinkOnly      = buffer.ReadBool();
            _autoSize        = buffer.ReadBool();
            showErrorSign    = buffer.ReadBool();
            _content.playing = buffer.ReadBool();
            _content.frame   = buffer.ReadInt();

            if (buffer.ReadBool())
            {
                _content.color = buffer.ReadColor();
            }
            _content.fillMethod = (FillMethod)buffer.ReadByte();
            if (_content.fillMethod != FillMethod.None)
            {
                _content.fillOrigin    = buffer.ReadByte();
                _content.fillClockwise = buffer.ReadBool();
                _content.fillAmount    = buffer.ReadFloat();
            }

            if (!string.IsNullOrEmpty(_url))
            {
                LoadContent();
            }
        }
예제 #3
0
        override public void Setup_BeforeAdd(ByteBuffer buffer, int beginPos)
        {
            base.Setup_BeforeAdd(buffer, beginPos);

            buffer.Seek(beginPos, 5);

            _url           = buffer.ReadS();
            _align         = (AlignType)buffer.ReadByte();
            _verticalAlign = (VertAlignType)buffer.ReadByte();
            _fill          = (FillType)buffer.ReadByte();
            _shrinkOnly    = buffer.ReadBool();
            _autoSize      = buffer.ReadBool();
            _animationName = buffer.ReadS();
            _skinName      = buffer.ReadS();
            _playing       = buffer.ReadBool();
            _frame         = buffer.ReadInt();
            _loop          = buffer.ReadBool();

            if (buffer.ReadBool())
            {
                this.color = buffer.ReadColor(); //color
            }
            if (!string.IsNullOrEmpty(_url))
            {
                LoadContent();
            }
        }
예제 #4
0
 public GLoader()
 {
     _url = string.Empty;
     _align = AlignType.Left;
     _verticalAlign = VertAlignType.Top;
     showErrorSign = true;
 }
예제 #5
0
 public GLoader3D()
 {
     _url           = string.Empty;
     _align         = AlignType.Left;
     _verticalAlign = VertAlignType.Top;
     _playing       = true;
 }
예제 #6
0
        public GTextField()
            : base()
        {
            underConstruct = true;

            _textFormat = new TextFormat();
            _textFormat.font = UIConfig.defaultFont;
            _textFormat.size = 12;
            _textFormat.color = Color.black;
            _textFormat.lineSpacing = 3;
            _textFormat.letterSpacing = 0;
            _strokeColor = new Color(0, 0, 0, 1);
            UpdateTextFormat();

            _text = string.Empty;
            _align = AlignType.Left;
            _verticalAlign = VertAlignType.Top;

            this.autoSize = AutoSizeType.Both;

            underConstruct = false;

            gearColor = new GearColor(this);

            onFocusIn = new EventListener(this, "onFocusIn");
            onFocusOut = new EventListener(this, "onFocusOut");
            onChanged = new EventListener(this, "onChanged");
        }
예제 #7
0
        public GTextField()
            : base()
        {
            underConstruct = true;

            _textFormat               = new TextFormat();
            _textFormat.font          = UIConfig.defaultFont;
            _textFormat.size          = 12;
            _textFormat.color         = Color.black;
            _textFormat.lineSpacing   = 3;
            _textFormat.letterSpacing = 0;
            _strokeColor              = new Color(0, 0, 0, 1);
            UpdateTextFormat();

            _text          = string.Empty;
            _align         = AlignType.Left;
            _verticalAlign = VertAlignType.Top;

            this.autoSize = AutoSizeType.Both;

            underConstruct = false;

            gearColor = new GearColor(this);

            onFocusIn  = new EventListener(this, "onFocusIn");
            onFocusOut = new EventListener(this, "onFocusOut");
            onChanged  = new EventListener(this, "onChanged");
        }
예제 #8
0
 public GLoader()
 {
     _url            = string.Empty;
     _align          = AlignType.Left;
     _verticalAlign  = VertAlignType.Top;
     showErrorSign   = true;
     _reloadDelegate = OnExternalReload;
 }
예제 #9
0
        public GLoader()
        {
            _url           = string.Empty;
            _align         = AlignType.Left;
            _verticalAlign = VertAlignType.Top;
            showErrorSign  = true;

            _content2SizeChangedDelegate = onContent2SizeChanged;
        }
예제 #10
0
        public GLoader()
        {
            _playing = true;
            _url = string.Empty;
            _align = AlignType.Left;
            _verticalAlign = VertAlignType.Top;
            showErrorSign = true;

            gearAnimation = new GearAnimation(this);
            gearColor = new GearColor(this);
        }
예제 #11
0
        public GLoader()
        {
            _playing       = true;
            _url           = string.Empty;
            _align         = AlignType.Left;
            _verticalAlign = VertAlignType.Top;
            showErrorSign  = true;

            gearAnimation = new GearAnimation(this);
            gearColor     = new GearColor(this);
        }
예제 #12
0
 public GLoader()
 {
     _playing       = true;
     _url           = "";
     _align         = AlignType.Left;
     _verticalAlign = VertAlignType.Top;
     _overflow      = OverflowType.Visible;
     _jtaDir        = 1;
     _loading       = 0;
     _showErrorSign = true;
 }
예제 #13
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();
            }
        }
예제 #14
0
        public GTextField() : base()
        {
            _fontSize      = 12;
            _align         = AlignType.Left;
            _verticalAlign = VertAlignType.Top;
            _text          = "";
            _leading       = 3;

            _autoSize       = AutoSizeType.Both;
            _widthAutoSize  = true;
            _heightAutoSize = true;


            gearColor = new GearColor(this);

            //
            onFocusIn  = new EventListener(this, "onFocusIn");
            onFocusOut = new EventListener(this, "onFocusOut");
            onChanged  = new EventListener(this, "onChanged");
        }
예제 #15
0
        public override 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);

            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();
        }
예제 #16
0
        public void Load()
        {
            int cnt = Items.Count;

            for (int i = 0; i < cnt; i++)
            {
                ConfigValue value = Items[i];
                if (!value.valid)
                {
                    continue;
                }

                switch ((UIConfig.ConfigKey)i)
                {
                case ConfigKey.ButtonSound:
                    if (Application.isPlaying)
                    {
                        UIConfig.buttonSound = UIPackage.GetItemAssetByURL(value.s) as NAudioClip;
                    }
                    break;

                case ConfigKey.ButtonSoundVolumeScale:
                    UIConfig.buttonSoundVolumeScale = value.f;
                    break;

                case ConfigKey.ClickDragSensitivity:
                    UIConfig.clickDragSensitivity = value.i;
                    break;

                case ConfigKey.DefaultComboBoxVisibleItemCount:
                    UIConfig.defaultComboBoxVisibleItemCount = value.i;
                    break;

                case ConfigKey.DefaultFont:
                    UIConfig.defaultFont = value.s;
                    break;

                case ConfigKey.DefaultScrollBarDisplay:
                    UIConfig.defaultScrollBarDisplay = (ScrollBarDisplayType)value.i;
                    break;

                case ConfigKey.DefaultScrollBounceEffect:
                    UIConfig.defaultScrollBounceEffect = value.b;
                    break;

                case ConfigKey.DefaultScrollStep:
                    UIConfig.defaultScrollStep = value.i;
                    break;

                case ConfigKey.DefaultScrollTouchEffect:
                    UIConfig.defaultScrollTouchEffect = value.b;
                    break;

                case ConfigKey.GlobalModalWaiting:
                    UIConfig.globalModalWaiting = value.s;
                    break;

                case ConfigKey.HorizontalScrollBar:
                    UIConfig.horizontalScrollBar = value.s;
                    break;

                case ConfigKey.LoaderErrorSign:
                    UIConfig.loaderErrorSign = value.s;
                    break;

                case ConfigKey.ModalLayerColor:
                    UIConfig.modalLayerColor = value.c;
                    break;

                case ConfigKey.PopupMenu:
                    UIConfig.popupMenu = value.s;
                    break;

                case ConfigKey.PopupMenu_seperator:
                    UIConfig.popupMenu_seperator = value.s;
                    break;

                case ConfigKey.TooltipsWin:
                    UIConfig.tooltipsWin = value.s;
                    break;

                case ConfigKey.TouchDragSensitivity:
                    UIConfig.touchDragSensitivity = value.i;
                    break;

                case ConfigKey.TouchScrollSensitivity:
                    UIConfig.touchScrollSensitivity = value.i;
                    break;

                case ConfigKey.VerticalScrollBar:
                    UIConfig.verticalScrollBar = value.s;
                    break;

                case ConfigKey.WindowModalWaiting:
                    UIConfig.windowModalWaiting = value.s;
                    break;

                case ConfigKey.AllowSoftnessOnTopOrLeftSide:
                    UIConfig.allowSoftnessOnTopOrLeftSide = value.b;
                    break;

                case ConfigKey.InputCaretSize:
                    UIConfig.inputCaretSize = value.i;
                    break;

                case ConfigKey.InputHighlightColor:
                    UIConfig.inputHighlightColor = value.c;
                    break;

                case ConfigKey.DepthSupportForPaintingMode:
                    UIConfig.depthSupportForPaintingMode = value.b;
                    break;

                case ConfigKey.EnhancedTextOutlineEffect:
                    UIConfig.enhancedTextOutlineEffect = value.b;
                    break;

                case ConfigKey.RichTextRowVerticalAlign:
                    UIConfig.richTextRowVerticalAlign = (VertAlignType)value.i;
                    break;

                case ConfigKey.Branch:
                    UIPackage.branch = value.s;
                    break;
                }
            }
        }
예제 #17
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);
            }
        }
예제 #18
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();
            }
        }
예제 #19
0
        public override 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);
            }
        }
예제 #20
0
        public override 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;
        }
예제 #21
0
        public override 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();
        }
예제 #22
0
        public override void Setup_BeforeAdd(XML xml)
        {
            base.Setup_BeforeAdd(xml);

            string str;
            string[] arr;

            str = xml.GetAttribute("layout");
            if (str != null)
                _layout = FieldTypes.ParseListLayoutType(str);
            else
                _layout = ListLayoutType.SingleColumn;

            str = xml.GetAttribute("selectionMode");
            if (str != null)
                selectionMode = FieldTypes.ParseListSelectionMode(str);
            else
                selectionMode = ListSelectionMode.Single;

            OverflowType overflow;
            str = xml.GetAttribute("overflow");
            if (str != null)
                overflow = FieldTypes.ParseOverflowType(str);
            else
                overflow = OverflowType.Visible;

            str = xml.GetAttribute("margin");
            if (str != null)
                _margin.Parse(str);

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

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

            if (overflow == OverflowType.Scroll)
            {
                ScrollType scroll;
                str = xml.GetAttribute("scroll");
                if (str != null)
                    scroll = FieldTypes.ParseScrollType(str);
                else
                    scroll = ScrollType.Vertical;

                ScrollBarDisplayType scrollBarDisplay;
                str = xml.GetAttribute("scrollBar");
                if (str != null)
                    scrollBarDisplay = FieldTypes.ParseScrollBarDisplayType(str);
                else
                    scrollBarDisplay = ScrollBarDisplayType.Default;

                int scrollBarFlags = xml.GetAttributeInt("scrollBarFlags");

                Margin scrollBarMargin = new Margin();
                str = xml.GetAttribute("scrollBarMargin");
                if (str != null)
                    scrollBarMargin.Parse(str);

                string vtScrollBarRes = null;
                string hzScrollBarRes = null;
                arr = xml.GetAttributeArray("scrollBarRes");
                if (arr != null)
                {
                    vtScrollBarRes = arr[0];
                    hzScrollBarRes = arr[1];
                }

                SetupScroll(scrollBarMargin, scroll, scrollBarDisplay, scrollBarFlags, vtScrollBarRes, hzScrollBarRes);
            }
            else
            {
                SetupOverflow(overflow);
            }

            arr = xml.GetAttributeArray("clipSoftness");
            if (arr != null)
                this.clipSoftness = new Vector2(int.Parse(arr[0]), int.Parse(arr[1]));

            _lineGap = xml.GetAttributeInt("lineGap");
            _columnGap = xml.GetAttributeInt("colGap");
            _lineItemCount = xml.GetAttributeInt("lineItemCount");
            defaultItem = xml.GetAttribute("defaultItem");

            autoResizeItem = xml.GetAttributeBool("autoItemSize", true);

            XMLList.Enumerator et = xml.GetEnumerator("item");
            while (et.MoveNext())
            {
                XML ix = et.Current;
                string url = ix.GetAttribute("url");
                if (string.IsNullOrEmpty(url))
                {
                    url = defaultItem;
                    if (string.IsNullOrEmpty(url))
                        continue;
                }

                GObject obj = GetFromPool(url);
                if (obj != null)
                {
                    AddChild(obj);
                    str = ix.GetAttribute("title");
                    if (str != null)
                        obj.text = str;
                    str = ix.GetAttribute("icon");
                    if (str != null)
                        obj.icon = str;
                    str = ix.GetAttribute("name");
                    if (str != null)
                        obj.name = str;
                }
            }
        }
예제 #23
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();
            }
        }
예제 #24
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");
            }
        }