/**\r
-* Namespace: System.Web.UI.WebControls\r
-* Class: CheckBox\r
-*\r
-* Author: Gaurav Vaish\r
-* Maintainer: gvaish@iitk.ac.in\r
-* Contact: <my_scripts2001@yahoo.com>, <gvaish@iitk.ac.in>\r
-* Status: 100%\r
-*\r
-* (C) Gaurav Vaish (2001)\r
-* Thanks to Leen Toelen (toelen@hotmail.com)'s classes that helped me\r
-* to write the contents of the function LoadPostData(...)\r
-*/\r
+ * Namespace: System.Web.UI.WebControls\r
+ * Class: CheckBox\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
+ * (C) Gaurav Vaish (2001)\r
+ * Thanks to Leen Toelen (toelen@hotmail.com)'s classes that helped me\r
+ * to write the contents of the function LoadPostData(...)\r
+ */\r
\r
using System;\r
using System.Collections;\r
{\r
private static readonly object CheckedChangedEvent = new object();\r
\r
- public CheckBox()\r
+ public CheckBox(): base(HtmlTextWriterTag.Input)\r
{\r
- //\r
}\r
\r
public virtual bool AutoPostBack\r
protected virtual void OnCheckedChanged(EventArgs e)\r
{\r
if(Events!=null)\r
- {\r
- EventHandler eh = (EventHandler)(Events[CheckedChangedEvent]);\r
- if(eh!=null)\r
- eh(this, e);\r
- }\r
+ {\r
+ EventHandler eh = (EventHandler)(Events[CheckedChangedEvent]);\r
+ if(eh!=null)\r
+ eh(this, e);\r
+ }\r
}\r
\r
protected override void OnPreRender(EventArgs e)\r
{\r
if(Page!=null)\r
+ {\r
+ if(Enabled)\r
{\r
- if(Enabled)\r
- {\r
- Page.RegisterRequiresPostBack(this);\r
- }\r
+ Page.RegisterRequiresPostBack(this);\r
}\r
- if(SaveCheckedViewState)\r
- {\r
- ViewState.SetItemDirty("checked", false);\r
- }\r
+ }\r
+ if(SaveCheckedViewState)\r
+ {\r
+ ViewState.SetItemDirty("checked", false);\r
+ }\r
}\r
\r
+ [MonoTODO("Internal_Call_Requirements")]\r
protected override void Render(HtmlTextWriter writer)\r
{\r
bool hasBeginRendering = false;\r
writer.RenderEndTag();\r
}\r
\r
- public bool LoadPostData(string postDataKey, NameValueCollection postCollection)\r
+ bool IPostBackDataHandler.LoadPostData(string postDataKey, NameValueCollection postCollection)\r
{\r
string postedVal = postCollection[postDataKey];\r
bool postChecked = false;\r
return (postChecked == Checked == false);\r
}\r
\r
- public void RaisePostDataChangedEvent()\r
+ void IPostBackDataHandler.RaisePostDataChangedEvent()\r
{\r
OnCheckedChanged(EventArgs.Empty);\r
}\r