globCal = DateTimeFormatInfo.CurrentInfo.Calendar;\r
DateTime visDate = GetEffectiveVisibleDate()\r
DateTime firstDate = GetFirstCalendarDay(visDate);\r
- \r
+\r
bool isEnabled = false;\r
bool isHtmlTextWriter = false;\r
if(Page == null || Site == null || Site.DesignMode == null )\r
defaultTextColor = ForeColor;\r
if(defaultTextColor == Color.Empty)\r
defaultTextColor = Color.Black;\r
- \r
+\r
Table calTable = new Table();\r
calTable.ID = ID;\r
calTable.CopyBaseAttributes(this);\r
calTable.Height = Height;\r
calTable.CellSpacing = CellSpacing;\r
calTable.CellPadding = CellPadding;\r
- \r
+\r
if(ControlStyleCreated && ControlStyle.IsSet(Style.BORDERWIDTH) && BorderWidth != Unit.Empty)\r
{\r
calTable.BorderWidth = BorderWidth;\r
{\r
calTable.BorderWidth = Unit.Pixel(1);\r
}\r
- \r
+\r
if(ShowGridLines)\r
calTable.GridLines = GridLines.Both;\r
else\r
calTable.GridLines = GridLines.None;\r
- \r
+\r
calTable.RenderBeginTag(writer);\r
if(ShowTitle)\r
RenderTitle(writer, visDate, SelectionMode, isEnabled);\r
if(ShowDayHeader)\r
RenderHeader(writer, firstDate, SelectionMode, isEnabled, isHtmlTextWriter);\r
RenderAllDays(writer, firstDate, visDate, SelectionMode, isEnabled, isHtmlTextWriter);\r
- \r
+\r
calTable.RenderEndTag(writer);\r
}\r
\r
return null;\r
}\r
\r
- protected override void TrackViewState(): TrackViewState()\r
+ protected override void TrackViewState()\r
{\r
+ TrackViewState();\r
if(titleStyle!=null)\r
{\r
titleStyle.TrackViewState();\r
{\r
selectDayBool = true;\r
}\r
- \r
+\r
for(int crr = 0; crr < 6; crr++)\r
{\r
writer.Write("<tr>");\r
\r
throw new NotImplementedException();\r
}\r
- \r
+\r
private int GetMask(CalendarDay day)\r
{\r
int retVal = MASK_DAY;\r
headerCell.ApplyStyle(DayHeaderStyle);\r
}\r
RenderCalendarCell(writer, headerCell, selMthText);\r
- \r
+\r
TableCell dayHeaderCell = new TableCell();\r
dayHeaderCell.HorizontalAlign = HorizontalAlign.Center;\r
string content = null;\r
bool isWeekMode = (mode == CalendarSelectionMode.DayWeek || mode == CalendarSelectionMode.DayWeekMonth);\r
titleCell.ColumnSpan = (isWeekMode ? 8 : 7);\r
titleCell.BackColor = "Silver";\r
- \r
+\r
innerTable.GridLines = GridLine.None;\r
innerTable.Width = Unit.Percentage(100);\r
innerTable.CellSpacing = 0;\r
ApplyTitleStyle(innerTable, titleCell, TitleStyle);\r
- \r
+\r
innerTable.RenderBeginTag(writer);\r
titleCell.RenderBeginTag(writer);\r
- \r
+\r
writer.Write("<tr>");\r
string prevContent = String.Empty;\r
if(ShowNextPrevMonth)\r
nextCell.ApplyStyle(NextPrevStyle);\r
RenderCalendarCell(writer, nextCell, GetCalendarLinkText("nextMonth", nextContent, isActive, NextPrevStyle.ForeColor));\r
}\r
- \r
+\r
writer.Write("</tr>");\r
titleCell.RenderEndTag(writer);\r
innerTable.RenderEndTag(writer);\r
- \r
+\r
writer.Write("</tr>");\r
}\r
\r
{\r
cell.VerticalAlign = style.VerticalAlign;\r
}\r
- \r
+\r
if(style.ForeColor != Color.Empty)\r
{\r
table.ForeColor = style.ForeColor;\r
{\r
table.ForeColor = ForeColor;\r
}\r
- \r
+\r
table.Font.CopyFrom(style.Font);\r
table.Font.MergeWith(Font);\r
}\r
public static readonly FontUnit XSmall = new FontUnit(FontSize.XSmall);\r
public static readonly FontUnit XXLarge = new FontUnit(FontSize.XXLarge);\r
public static readonly FontUnit XXSmall = new FontUnit(FontSize.XXSmall);\r
- \r
+\r
private FontSize type;\r
private Unit val;\r
- \r
+\r
public FontUnit(FontSize type)\r
{\r
if(!Enum.IsDefined(typeof(FontSize), type))\r
val = Unit.Empty;\r
}\r
}\r
- \r
+\r
public FontUnit(int value)\r
{\r
type = FontSize.AsUnit;\r
val = Unit.Point(value);\r
}\r
- \r
+\r
public FontUnit(string value): this(value, CultureInfo.CurrentCulture)\r
{\r
}\r
- \r
+\r
public FontUnit(Unit value)\r
{\r
if(val.IsEmpty)\r
val = value;\r
}\r
}\r
- \r
+\r
public FontUnit(string value, CultureInfo culture)\r
{\r
type = FontSize.NotSet;\r
}\r
}\r
}\r
- \r
+\r
private int GetTypeFromString(string strVal)\r
{\r
string[] values = {\r
}\r
return -1;\r
}\r
- \r
- public static FontUnit Parse(string s): Parse(s, CultureInfo.CurrentCulture)\r
+\r
+ public static FontUnit Parse(string s)\r
{\r
+ Parse(s, CultureInfo.CurrentCulture);\r
}\r
- \r
+\r
public static FontUnit Parse(string s, CultureInfo culture)\r
{\r
return new FontUnit(s, culture);\r
}\r
- \r
+\r
public static FontUnit Point(int n)\r
{\r
return new FontUnit(n);\r
}\r
- \r
+\r
public static bool operator ==(FontUnit left, FontUnit right)\r
{\r
return (left.type == right.type && left.val == right.val);\r
}\r
- \r
+\r
public static bool operator !=(FontUnit left, FontUnit right)\r
{\r
return !(left == right);\r
}\r
- \r
+\r
public static implicit operator FontUnit(int n)\r
{\r
return FontUnit.Point(n);\r
}\r
- \r
+\r
public override bool Equals(object obj)\r
{\r
if(obj!= null && obj is FontUnit)\r
}\r
return false;\r
}\r
- \r
+\r
public override int GetHashCode()\r
{\r
return ( (type.GetHashCode() << 2) | val.GetHashCode() );\r
}\r
- \r
- public override string ToString(): ToString(CultureInfo.CurrentCulture)\r
+\r
+ public override string ToString()\r
{\r
+ ToString(CultureInfo.CurrentCulture);\r
}\r
- \r
+\r
public override string ToString(CultureInfo culture)\r
{\r
if(IsEmpty)\r
default: return PropertyConverter.EnumToString(typeof(FontSize), type);\r
}\r
}\r
- \r
+\r
public bool IsEmpty\r
{\r
get\r
return (type == FontSize.NotSet);\r
}\r
}\r
- \r
+\r
public FontSize Type\r
{\r
get\r
return type;\r
}\r
}\r
- \r
+\r
public Unit Unit\r
{\r
get\r
/**\r
* Namespace: System.Web.UI.WebControls\r
* Class: HyperLink\r
- * \r
+ *\r
* Author: Gaurav Vaish\r
* Maintainer: gvaish@iitk.ac.in\r
* Contact: gvaish@iitk.ac.in, myscripts_2001@yahoo.com\r
* Implementation: yes\r
* Status: 100%\r
- * \r
+ *\r
* (C) Gaurav Vaish (2001)\r
*/\r
\r
public HyperLink(): base()\r
{\r
}\r
- \r
+\r
public virtual string ImageUrl\r
{\r
get\r
ViewState["ImageUrl"] = value;\r
}\r
}\r
- \r
+\r
public string NavigateUrl\r
{\r
get\r
ViewState["NavigateUrl"] = value;\r
}\r
}\r
- \r
+\r
public string Target\r
{\r
get\r
ViewState["Target"] = value;\r
}\r
}\r
- \r
+\r
public virtual string Text\r
{\r
get\r
ViewState["Text"] = value;\r
}\r
}\r
- \r
- protected override void AddAttributesToRender(HtmlTextWriter writer) : AddAttributesToRender(writer)\r
+\r
+ protected override void AddAttributesToRender(HtmlTextWriter writer)\r
{\r
+ AddAttributesToRender(writer);\r
if(NavigateUrl.Length > 0)\r
{\r
writer.AddAttribute(HtmlTextWriterAttribute.Href, NavigateUrl);\r
writer.AddAttribute(HtmlTextWriterAttribute.Target, Target);\r
}\r
}\r
- \r
+\r
protected override void AddParsedSubObject(object obj)\r
{\r
if(HasControls())\r
}\r
AddParsedSubObject(obj);\r
}\r
- \r
+\r
protected override void LoadViewState(object savedState)\r
{\r
if(savedState != null)\r
Text = (string)o;\r
}\r
}\r
- \r
+\r
protected override void RenderContents(HtmlTextWriter writer)\r
{\r
if(ImageUrl.Length > 0)\r
{\r
PropertyDescriptor textFieldDescriptor;\r
PropertyDescriptor urlFieldDescriptor;\r
- \r
+\r
public HyperLinkColumn(): base()\r
{\r
}\r
- \r
+\r
public virtual string DataNavigateUrlField\r
{\r
get\r
ViewState["DataNavigateUrlField"] = value;\r
}\r
}\r
- \r
+\r
public virtual string DataNavigateUrlFormatString\r
{\r
get\r
ViewState["DataNavigateUrlFormatString"] = value;\r
}\r
}\r
- \r
+\r
public virtual string DataTextField\r
{\r
get\r
ViewState["DataTextField"] = value;\r
}\r
}\r
- \r
+\r
public virtual string DataTextFormatString\r
{\r
get\r
ViewState["DataTextFormatString"] = value;\r
}\r
}\r
- \r
+\r
public virtual string NavigateUrl\r
{\r
get\r
ViewState["NavigateUrl"] = value;\r
}\r
}\r
- \r
+\r
public virtual string Target\r
{\r
get\r
ViewState["Target"] = value;\r
}\r
}\r
- \r
+\r
public virtual string Text\r
{\r
get\r
ViewState["Text"] = value;\r
}\r
}\r
- \r
+\r
public override void Initialize()\r
{\r
textFieldDescriptor = null;\r
urlFieldDescriptor = null;\r
}\r
- \r
- public override void InitializeCell(TableCell cell, int columnIndex, ListItemType itemType):\r
- InitializeCell(cell, columnIndex, itemType)\r
+\r
+ public override void InitializeCell(TableCell cell, int columnIndex, ListItemType itemType)\r
{\r
+ InitializeCell(cell, columnIndex, itemType);\r
if(Enum.IsDefined(ListItemType, itemType) && itemType != ListItemType.Footer)\r
{\r
HyperLink toDisplay = new HyperLink();\r
cell.Controls.Add(toDisplay);\r
}\r
}\r
- \r
+\r
private void OnDataBindHyperLinkColumn(object sender, EventArgs e)\r
{\r
HyperLink link = (HyperLink)sender;\r
if(urlFieldDescriptor == null && !DesignMode)\r
throw new HttpException(HttpRuntime.FormatResourceString("Field_Not_Found", DataNavigateUrlField));\r
}\r
- \r
+\r
if(textFieldDescritor != null)\r
{\r
link.Text = FormatDataTextValue(textFieldDescritor.GetValue(item));\r
{\r
link.Text = "Sample_DataBound_Text";\r
}\r
- \r
+\r
if(urlFieldDescriptor != null)\r
{\r
link.NavigateUrl = FormatDataNavigateUrlValue(urlFieldDescriptor.GetValue(item));\r
link.NavigateUrl = "url";\r
}\r
}\r
- \r
+\r
protected virtual string FormatDataNavigateUrlValue(object dataUrlValue)\r
{\r
string retVal = String.Empty;\r
}\r
return retVal;\r
}\r
- \r
+\r
protected virtual string FormatDataTextValue(object dataTextValue)\r
{\r
string retVal = String.Empty;\r
}\r
}\r
\r
- protected override void AddAttributesToRender(HtmlTextWriter writer): AddAttributesToRender(writer)\r
+ protected override void AddAttributesToRender(HtmlTextWriter writer)\r
{\r
+ AddAttributesToRender(writer);\r
if(ImageUrl.Length > 0)\r
{\r
writer.AddAttribute(HtmlTextWriterAttribute.Src, ResolveUrl(ImageUrl));\r
writer.AddAttribute(HtmlTextWriterAttribute.Align, Enum.Format(typeof(ImageAlign), ImageAling, "G"));\r
}\r
}\r
- \r
- protected override void RenderContents(HtmlTextWriterAttribute)\r
+\r
+ protected override void RenderContents(HtmlTextWriterAttribute attribute)\r
{\r
}\r
}\r
/**\r
* Namespace: System.Web.UI.WebControls\r
* Class: PagedDataSource\r
- * \r
+ *\r
* Author: Gaurav Vaish\r
* Maintainer: gvaish@iitk.ac.in\r
* Contact: <my_scripts2001@yahoo.com>, <gvaish@iitk.ac.in>\r
* Implementation: yes\r
* Status: 100%\r
- * \r
+ *\r
* (C) Gaurav Vaish (2002)\r
*/\r
\r
{\r
Initialize();\r
}\r
- \r
+\r
private void Initialize()\r
{\r
pageSize = 10;\r
allowCustomPaging = false;\r
virtualCount = 0;\r
}\r
- \r
+\r
public bool AllowCustomPaging\r
{\r
get\r
allowCustomPaging = value;\r
}\r
}\r
- \r
+\r
public bool AllowPaging\r
{\r
get\r
allowPaging = value;\r
}\r
}\r
- \r
+\r
public int Count\r
{\r
get\r
return 0;\r
}\r
}\r
- \r
+\r
public int CurrentPageIndex\r
{\r
get\r
return currentPageIndex;\r
}\r
}\r
- \r
+\r
public IEnumerable DataSource\r
{\r
get\r
dataSource = value;\r
}\r
}\r
- \r
+\r
public int DataSourceCount\r
{\r
get\r
return 0;\r
}\r
}\r
- \r
+\r
public int FirstIndexInPage\r
{\r
get\r
return 0;\r
}\r
}\r
- \r
+\r
public bool IsCustomPagingEnabled\r
{\r
get\r
return (IsPagingEnable && allowCustomPaging);\r
}\r
}\r
- \r
+\r
public bool IsFirstPage\r
{\r
get\r
return (!IsPagingEnabled || (CurrentPageIndex == 0));\r
}\r
}\r
- \r
+\r
public bool IsLastPage\r
{\r
get\r
return (!IsPagingEnabled || (CurrentPageIndex == PageCount));\r
}\r
}\r
- \r
+\r
public bool IsPagingEnabled\r
{\r
get\r
return (allowPaging && pageSize != 0);\r
}\r
}\r
- \r
+\r
public bool IsReadOnly\r
{\r
get\r
return false;\r
}\r
}\r
- \r
+\r
public bool IsSynchronized\r
{\r
get\r
return false;\r
}\r
}\r
- \r
+\r
public int PageCount\r
{\r
get\r
return 0;\r
}\r
}\r
- \r
+\r
public int PageSize\r
{\r
get\r
pageCount = value;\r
}\r
}\r
- \r
+\r
public object SyncRoot\r
{\r
get\r
return this;\r
}\r
}\r
- \r
+\r
public int VirtualCount\r
{\r
get\r
virtualCount = value;\r
}\r
}\r
- \r
+\r
public void CopyTo(Array array, int index)\r
{\r
foreach(object current in this)\r
array.SetValue(array, index++);\r
}\r
}\r
- \r
+\r
public IEnumerator GetEnumerator\r
{\r
- int fInd = FirstIndexInPage;\r
- int count = -1;\r
- if(dataSource is ICollection)\r
+ get\r
{\r
- count = dataSource.Count;\r
- }\r
+ int fInd = FirstIndexInPage;\r
+ int count = -1;\r
+ if(dataSource is ICollection)\r
+ {\r
+ count = dataSource.Count;\r
+ }\r
\r
- if(dataSource is IList)\r
- {\r
- return (new PrivateListEnumerator((IList)dataSource, fInd, count));\r
- }\r
- if(dataSource is Array)\r
- {\r
- return (new PrivateArrayEnumerator((object[])dataSource, fInd, count));\r
- }\r
- if(dataSource is ICollection)\r
- {\r
- return (new PrivateICollectionEnumerator((ICollection)dataSource, fInd, count));\r
- }\r
- if(allowCustomPaging)\r
- {\r
- return (new PrivateIEnumeratorEnumerator(dataSource, Count));\r
+ if(dataSource is IList)\r
+ {\r
+ return (new PrivateListEnumerator((IList)dataSource, fInd, count));\r
+ }\r
+ if(dataSource is Array)\r
+ {\r
+ return (new PrivateArrayEnumerator((object[])dataSource, fInd, count));\r
+ }\r
+ if(dataSource is ICollection)\r
+ {\r
+ return (new PrivateICollectionEnumerator((ICollection)dataSource, fInd, count));\r
+ }\r
+ if(allowCustomPaging)\r
+ {\r
+ return (new PrivateIEnumeratorEnumerator(dataSource, Count));\r
+ }\r
+ return dataSource.GetEnumerator();\r
}\r
- return dataSource.GetEnumerator();\r
}\r
- \r
+\r
private class PrivateIEnumeratorEnumerator\r
{\r
private int index;\r
private int max;\r
\r
private IEnumerator enumerator;\r
- \r
+\r
public PrivateIEnumeratorEnumerator(IEnumerator enumerator, int count)\r
{\r
this.enumerator = enumerator;\r
index = -1;\r
max = count;\r
}\r
- \r
+\r
public bool MoveNext()\r
{\r
enumerator.MoveNext();\r
}\r
}\r
}\r
- \r
+\r
private class PrivateICollectionEnumerator\r
{\r
private int index;\r
\r
private ICollection collection;\r
private IEnumerator collEnum;\r
- \r
+\r
public PrivateICollectionEnumerator(ICollection collection, int start, int count)\r
{\r
this.collection = collection;\r
max = collection.Count;\r
}\r
}\r
- \r
+\r
public bool MoveNext()\r
{\r
if(collEnum == null)\r
}\r
}\r
}\r
- \r
+\r
private class PrivateArrayEnumerator\r
{\r
private int index;\r
private int start;\r
private int max;\r
private object[] values;\r
- \r
+\r
public PrivateArrayEnumerator(object[] values, int start, int count)\r
{\r
this.values = values;\r
max = this.values.Length;\r
}\r
}\r
- \r
+\r
public bool MoveNext()\r
{\r
index++;\r
}\r
}\r
}\r
- \r
+\r
private class PrivateListEnumerator : IEnumerator\r
{\r
private int index;\r
max = list.Count;\r
}\r
}\r
- \r
+\r
public bool MoveNext()\r
{\r
index++;\r
return (index + start < max);\r
}\r
- \r
+\r
public void Reset()\r
{\r
index = -1;\r
}\r
- \r
+\r
public object Current\r
{\r
get\r
/**\r
* Namespace: System.Web.UI.WebControls\r
* Class: RadioButtonList\r
- * \r
+ *\r
* Author: Gaurav Vaish\r
* Maintainer: gvaish@iitk.ac.in\r
* Contact: <my_scripts2001@yahoo.com>, <gvaish@iitk.ac.in>\r
* Implementation: yes\r
* Status: 95%\r
- * \r
+ *\r
* (C) Gaurav Vaish (2002)\r
*/\r
\r
{\r
private bool selectionIndexChanged;\r
private int tabIndex;\r
- \r
+\r
public RadioButtonList(): base()\r
{\r
selectionIndexChanged = false;\r
}\r
- \r
+\r
public virtual int CellPadding\r
{\r
get\r
((TableStyle)ControlStyle).CellPadding = value;\r
}\r
}\r
- \r
+\r
public virtual int CellSpacing\r
{\r
get\r
((TableStyle)ControlStyle).CellSpacing = value;\r
}\r
}\r
- \r
+\r
public virtual int RepeatColumns\r
{\r
get\r
ViewState["RepeatColumns"] = value;\r
}\r
}\r
- \r
+\r
public virtual RepeatDirection RepeatDirection\r
{\r
get\r
ViewState["RepeatDirection"] = value;\r
}\r
}\r
- \r
+\r
public virtual RepeatLayout RepeatLayout\r
{\r
get\r
ViewState["RepeatLayout"] = value;\r
}\r
}\r
- \r
+\r
public virtual TextAlign TextAlign\r
{\r
get\r
ViewState["TextAlign"] = value;\r
}\r
}\r
- \r
+\r
protected override Style CreateControlStyle()\r
{\r
return new TableStyle(ViewState);\r
}\r
- \r
+\r
protected override void Render(HtmlTextWriter writer)\r
{\r
RepeatInfo info = new RepeatInfo();\r
ViewState.SetItemDirty("TabIndex", false);\r
}\r
}\r
- \r
+\r
bool IPostBackDataHandler.LoadPostData(string postDataKey, NameValueCollection postCollection)\r
{\r
string value = postCollection[postDataKey];\r
}\r
return false;\r
}\r
- \r
+\r
void IPostBackDataHandler.RaisePostDataChangedEvent()\r
{\r
if(selectionIndexChanged)\r
OnSelectedIndexChanged(EventArgs.Empty);\r
}\r
- \r
- Style IRepeatInfoUser.GetItemStyle(valuetype System.Web.UI.WebControls.ListItemType itemType, int repeatIndex)\r
+\r
+ Style IRepeatInfoUser.GetItemStyle(System.Web.UI.WebControls.ListItemType itemType, int repeatIndex)\r
{\r
return null;\r
}\r
- \r
+\r
[MonoTODO("RadioButtonList_RenderItem")]\r
- void IRepeatInfoUser.RenderItem(valuetype System.Web.UI.WebControls.ListItemType itemType, int repeatIndex, RepeatInfo repeatInfo, HtmlTextWriter writer)\r
+ void IRepeatInfoUser.RenderItem(System.Web.UI.WebControls.ListItemType itemType, int repeatIndex, RepeatInfo repeatInfo, HtmlTextWriter writer)\r
{\r
throw new NotImplementedException();\r
}\r
- \r
+\r
bool IRepeatInfoUser.HasFooter\r
{\r
get\r
return false;\r
}\r
}\r
- \r
+\r
bool IRepeatInfoUser.HasHeader\r
{\r
get\r
return false;\r
}\r
}\r
- \r
+\r
bool IRepeatInfoUser.HasSeparators\r
{\r
get\r
return false;\r
}\r
}\r
- \r
+\r
int IRepeatInfoUser.RepeatedItemCount\r
{\r
get\r
public class Table: WebControl\r
{\r
private TableRowCollection rows;\r
- \r
+\r
private class TableRowControlCollection : ControlCollection\r
{\r
public TableRowControlCollection(Control owner): base(owner)\r
{\r
}\r
- \r
+\r
public override void Add(Control child)\r
{\r
if(child is TableRow)\r
}\r
throw new ArgumentException(HttpRuntime.FormatResourceString("Cannot_Have_Children_Of_Type", "Table", child.GetType().Name.ToString()));\r
}\r
- \r
+\r
public override void AddAt(int index, Control child)\r
{\r
if(child is TableRow)\r
throw new ArgumentException(HttpRuntime.FormatResourceString("Cannot_Have_Children_Of_Type", "Table", child.GetType().Name.ToString()));\r
}\r
}\r
- \r
+\r
public Table(): base(HtmlTextWriterTag.Table)\r
{\r
}\r
- \r
+\r
public virtual string BackImageUrl\r
{\r
get\r
((TableStyle)ControlStyle).BackImageUrl = value;\r
}\r
}\r
- \r
+\r
public virtual int CellPadding\r
{\r
get\r
((TableStyle)ControlStyle).CellPadding = value;\r
}\r
}\r
- \r
+\r
public virtual int CellSpacing\r
{\r
get\r
((TableStyle)ControlStyle).CellSpacing = value;\r
}\r
}\r
- \r
+\r
public virtual GridLines GridLines\r
{\r
get\r
((TableStyle)ControlStyle).GridLines = value;\r
}\r
}\r
- \r
+\r
public virtual HorizontalAlign HorizontalAlign\r
{\r
get\r
((TableStyle)ControlStyle).HorizontalAlign = value;\r
}\r
}\r
- \r
+\r
public virtual TableRowCollection Rows\r
{\r
get\r
return rows;\r
}\r
}\r
- \r
- protected override void AddAttributesToRender(HtmlTextWriter writer): AddAttributesToRender(writer)\r
+\r
+ protected override void AddAttributesToRender(HtmlTextWriter writer)\r
{\r
+ AddAttributesToRender(writer);\r
if(!BorderColor.IsEmpty)\r
{\r
writer.AddAttribute(HtmlTextWriterAttribute.Bordercolor, ColorTranslator.ToHtml(BorderColor));\r
}\r
- \r
+\r
Unit bw = BorderWidth;\r
if(GridLines == GridLines.None)\r
{\r
}\r
writer.AddAttribute(HtmlTextWriterAttribute.Border, ((int)bw.Value).ToString(NumberFormatInfo.InvariantInfo));\r
}\r
- \r
+\r
protected override ControlCollection CreateControlCollection()\r
{\r
return new TableRowControlCollection(this);\r
}\r
- \r
+\r
protected override Style CreateControlStyle()\r
{\r
return new TableStyle(ViewState);\r
}\r
- \r
+\r
protected override void RenderContents(HtmlTextWriter writer)\r
{\r
foreach(object current in Rows)\r
}\r
}\r
}\r
-}\r
+}
\ No newline at end of file
{\r
//TODO: What's the function to prevent Control to give _auto_generated_id\r
}\r
- \r
+\r
[MonoTODO]\r
internal TableCell(HtmlTextWriterTag tag): base(tag)\r
{\r
//TODO: What's the function to prevent Control to give _auto_generated_id\r
}\r
- \r
+\r
public virtual int ColumnSpan\r
{\r
get\r
ViewState["ColumnSpan"] = value;\r
}\r
}\r
- \r
+\r
public virtual int RowSpan\r
{\r
get\r
ViewState["RowSpan"] = value;\r
}\r
}\r
- \r
+\r
public virtual string Text\r
{\r
get\r
ViewState["Text"] = value;\r
}\r
}\r
- \r
+\r
public virtual HorizontalAlign HorizontalAlign\r
{\r
get\r
((TableItemStyle)ControlStyle).HorizontalAlign = value;\r
}\r
}\r
- \r
+\r
public virtual VerticalAlign VerticalAlign\r
{\r
get\r
((TableItemStyle)ControlStyle).VerticalAlign = value;\r
}\r
}\r
- \r
+\r
public virtual bool Wrap\r
{\r
get\r
((TableItemStyle)ControlStyle).Wrap = value;\r
}\r
}\r
- \r
- protected override void AddAttributesToRender(HtmlTextWriter writer): AddAttributesToRender(writer)\r
+\r
+ protected override void AddAttributesToRender(HtmlTextWriter writer)\r
{\r
+ AddAttributesToRender(writer);\r
if(ColumnSpan > 0)\r
writer.AddAttribute(HtmlTextWriterAttribute.Colspan, Colspan.ToString(NumberFormatInfo.InvariantInfo));\r
if(RowSpan > 0)\r
writer.AddAttribute(HtmlTextWriterAttribute.Rowspan, Rowspan.ToString(NumberFormatInfo.InvariantInfo));\r
}\r
- \r
+\r
protected override void AddParsedSubObject(object obj)\r
{\r
if(HasControls())\r
}\r
AddParsedSubObject(obj);\r
}\r
- \r
+\r
protected override Style CreateControlStyle()\r
{\r
return new TableItemStyle(ViewState);\r
}\r
- \r
+\r
protected override void RenderContents(HtmlTextWriter writer)\r
{\r
if(HasControls())\r
/**\r
* Namespace: System.Web.UI.WebControls\r
* Class: ValidationSummary\r
- * \r
+ *\r
* Author: Gaurav Vaish\r
* Maintainer: gvaish@iitk.ac.in\r
* Contact: <my_scripts2001@yahoo.com>, <gvaish@iitk.ac.in>\r
* Implementation: yes\r
* Status: ??%\r
- * \r
+ *\r
* (C) Gaurav Vaish (2002)\r
*/\r
\r
public class ValidationSummary : WebControl\r
{\r
private bool uplevelRender;\r
- \r
+\r
public ValidationSummary(): base(HtmlTextWriterTag.Div)\r
{\r
uplevelRender = false;\r
ForeColor = Color.Red;\r
}\r
- \r
+\r
public ValidationSummaryDisplayMode DisplayMode\r
{\r
get\r
ViewState["DisplayMode"] = value;\r
}\r
}\r
- \r
+\r
public bool EnableClientScript\r
{\r
get\r
ViewState["EnableClientScript"] = value;\r
}\r
}\r
- \r
+\r
public override Color ForeColor\r
{\r
get\r
ForeColor = value;\r
}\r
}\r
- \r
+\r
public bool ShowMessageBox\r
{\r
get\r
ViewState["ShowMessageBox"] = value;\r
}\r
}\r
- \r
+\r
public bool ShowSummary\r
{\r
get\r
ViewState["ShowSummary"] = value;\r
}\r
}\r
- \r
+\r
public string HeaderText\r
{\r
get\r
ViewState["HeaderText"] = value;\r
}\r
}\r
- \r
- [MonoTODO("FIXME_See_Comments"}]\r
+\r
+ [MonoTODO("FIXME_See_Comments")]\r
protected override void AddAttributesToRender(HtmlTextWriter writer)\r
{\r
AddAttributesToRender(writer);\r