override public void Setup_AfterAdd(XML cxml) { base.Setup_AfterAdd(cxml); XML xml = cxml.GetNode("Button"); if (xml == null) { return; } this.title = (string)xml.GetAttribute("title"); this.icon = (string)xml.GetAttribute("icon"); string str; str = (string)xml.GetAttribute("titleColor"); if (str != null) { this.titleColor = UtilsStr.ConvertFromHtmlColor(str); } str = (string)xml.GetAttribute("controller"); if (str != null) { _relatedController = parent.GetController(str); } else { _relatedController = null; } _pageOption.id = (string)xml.GetAttribute("page"); this.selected = (string)xml.GetAttribute("checked") == "true"; }
override public void Setup_BeforeAdd(XML xml) { string str; string type = (string)xml.GetAttribute("type"); if (type != null && type != "empty") { _shape = new UIShape(this); _shape.gOwner = this; _displayObject = _shape; } base.Setup_BeforeAdd(xml); if (_shape != null) { int lineSize; str = (string)xml.GetAttribute("lineSize"); if (str != null) { lineSize = int.Parse(str); } else { lineSize = 1; } uint lineColor; str = (string)xml.GetAttribute("lineColor"); if (str != null) { lineColor = UtilsStr.ConvertFromHtmlColor(str, true); } else { lineColor = 0xFF000000; } uint fillColor; str = (string)xml.GetAttribute("fillColor"); if (str != null) { fillColor = UtilsStr.ConvertFromHtmlColor(str, true); } else { fillColor = 0xFFFFFFFF; } string corner; str = (string)xml.GetAttribute("corner"); if (str != null) { corner = str; } _shape.DrawRect(this.width, this.height, lineSize, lineColor, fillColor); } }
override public void Setup_AfterAdd(XML cxml) { base.Setup_AfterAdd(cxml); XML xml = cxml.GetNode("ComboBox"); if (xml == null) { return; } string str; str = (string)xml.GetAttribute("titleColor"); if (str != null) { this.titleColor = UtilsStr.ConvertFromHtmlColor(str); } str = (string)xml.GetAttribute("visibleItemCount"); if (str != null) { _visibleItemCount = int.Parse(str); } XMLList col = xml.Elements("item"); _items = new string[col.Count]; _values = new string[col.Count]; int i = 0; foreach (XML ix in col) { _items[i] = ix.GetAttribute("title"); _values[i] = ix.GetAttribute("value"); i++; } this.text = (string)xml.GetAttribute("title"); if (str != null && str.Length > 0) { _selectedIndex = Array.IndexOf(_items, this.text); } else if (_items.Length > 0) { _selectedIndex = 0; } else { _selectedIndex = -1; } }
override public void Setup_AfterAdd(XML cxml) { base.Setup_AfterAdd(cxml); XML xml = cxml.GetNode("Label"); if (xml == null) return; this.title = (string)xml.GetAttribute("title"); this.icon = (string)xml.GetAttribute("icon"); string str = (string)xml.GetAttribute("titleColor"); if(str!=null) this.titleColor = UtilsStr.ConvertFromHtmlColor(str); }
override protected object ReadValue(string value) { return(UtilsStr.ConvertFromHtmlColor(value)); }
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) { _color = UtilsStr.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"); } }