//------------------FOR DEMO USE ONLY---------------------------------- //-------- Copyright by Artem Saveliev artem@savelev.com -------------- //--------------------------------------------------------------------- public static void setStyles(WebControls.IWebControl o,IControl c){ if (c.ControlStyle.width != null) o.Width = c.ControlStyle.width.WebUnit(); if (c.ControlStyle.height != null) o.Height = c.ControlStyle.height.WebUnit(); if (c.ControlStyle.fontSize != null) o.Font.Size = new FontUnit(c.ControlStyle.fontSize.WebUnit()); if (c.ControlStyle.fontFamily != null) o.Font.Names = new string[] {c.ControlStyle.fontFamily}; if (!c.ControlStyle.bgcolor.IsEmpty) o.BackColor = c.ControlStyle.bgcolor; if (!c.ControlStyle.color.IsEmpty) o.ForeColor = c.ControlStyle.color; foreach (System.Collections.DictionaryEntry v in c.ControlStyle.unparsed) o.Style.Add(v.Key.ToString(),v.Value.ToString()); } private object getClassValue(object o,IControl c){ string[] fieldPath; System.Type t; object o2 = o; try{ if (o!=null && c.DataField != null){ //-- If we are regenerating from postback there's no object at this step fieldPath = c.DataField.Split('.'); for (int i=0;i 0) txtcontrol.MaxLength = c.MaxLength; txtcontrol.Columns = ((tires.Components.XFDL.Controls.TextBox)c).Columns; if (((tires.Components.XFDL.Controls.TextBox)c).Rows != 0){ txtcontrol.TextMode = TextBoxMode.MultiLine; txtcontrol.Rows = ((tires.Components.XFDL.Controls.TextBox)c).Rows; } if((c.Modifier & tires.Components.XFDL.Controls.Modifier.Identifier) != 0 || (c.Modifier & tires.Components.XFDL.Controls.Modifier.ReadOnly) != 0) // set ID parameter txtcontrol.ReadOnly = true; if (c.AccessKey != null) txtcontrol.AccessKey = c.AccessKey; // TODO: move DataType related visual adjustments to separate method if (c.DataType == tires.Components.XFDL.Controls.DataType.Money) txtcontrol.Style.Add("text-align","right"); txtcontrol.EnableViewState = true; return txtcontrol; } default: return null; } default: return null; } }