diff options
author | Gaurav Vaish <gvaish@mono-cvs.ximian.com> | 2001-12-18 18:34:40 +0300 |
---|---|---|
committer | Gaurav Vaish <gvaish@mono-cvs.ximian.com> | 2001-12-18 18:34:40 +0300 |
commit | 810ebf9a88cfed9285a93301ba2473d1fdda714e (patch) | |
tree | dc2fe7c85150ba07118d0a05baac549ea146c3b6 | |
parent | 413c75df07c6902c2e1f2c7e1d81cf72eeead4d6 (diff) |
2001-12-18 Gaurav Vaish <gvaish@iitk.ac.in>
* System.Web.UI/*.cs
* System.Web.UI.WebControls.cs -- trying to make build. A nightmare!!
svn path=/trunk/mcs/; revision=1629
3 files changed, 55 insertions, 18 deletions
diff --git a/mcs/class/System.Web/System.Web.UI.WebControls/AdCreatedEventArgs.cs b/mcs/class/System.Web/System.Web.UI.WebControls/AdCreatedEventArgs.cs index fa74e0c6eef..d0e94b87f88 100755 --- a/mcs/class/System.Web/System.Web.UI.WebControls/AdCreatedEventArgs.cs +++ b/mcs/class/System.Web/System.Web.UI.WebControls/AdCreatedEventArgs.cs @@ -26,16 +26,15 @@ namespace System.Web.UI.WebControls private string imageUrl;
private string navigateUrl;
- public AdCreatedEventArgs(IDictionary adProperties)
+ public AdCreatedEventArgs(IDictionary adProperties): base()
{
- super();
Initialize();
this.adProperties = adProperties;
if(adProperties!=null)
{
- imageUrl = (string)adProperties.Item["ImageUrl"];
- navigateUrl = (string)adProperties.Item["NavigateUrl"];
- alternateText = (string)adProperties.Item["AlternateText"];
+ imageUrl = (string)adProperties["ImageUrl"];
+ navigateUrl = (string)adProperties["NavigateUrl"];
+ alternateText = (string)adProperties["AlternateText"];
}
}
diff --git a/mcs/class/System.Web/System.Web.UI.WebControls/DataList.cs b/mcs/class/System.Web/System.Web.UI.WebControls/DataList.cs index a0ca3341b95..28e229313ef 100755 --- a/mcs/class/System.Web/System.Web.UI.WebControls/DataList.cs +++ b/mcs/class/System.Web/System.Web.UI.WebControls/DataList.cs @@ -12,6 +12,7 @@ */
using System;
+using System.Collections;
using System.Web;
using System.Web.UI;
@@ -22,7 +23,7 @@ namespace System.Web.UI.WebControls //
public const string CancelCommandName = "Cancel";
public const string DeleteCommandName = "Delete";
- public const string EditCommandName = "Edit";
+ public const string EditCommandName = "Edit";
public const string SelectCommandName = "Select";
public const string UpdateCommandName = "Update";
@@ -40,6 +41,8 @@ namespace System.Web.UI.WebControls private int editItemIndex;
private bool extractTemplateRows;
+ private ArrayList itemsArray;
+
public DataList()
{
alternatingItemStyle = new TableItemStyle();
@@ -52,6 +55,8 @@ namespace System.Web.UI.WebControls headerTemplate = null;
extractTemplateRows = false;
+
+ itemsArray = null;
}
public virtual TableItemStyle AlternatingItemStyle
@@ -172,11 +177,10 @@ namespace System.Web.UI.WebControls }
}
- //TODO: To implement the following functions found in the BaseDataList abstract class
- /*
- * PrepareControlHierarchy()
- * CreateControlHeirarchy(bool)
- */
+ private DataListItem GetItem(ListItemType itemType, int repeatIndex)
+ {
+ throw new NotImplementedException();
+ }
/// <summary>
/// Undocumented
@@ -217,5 +221,30 @@ namespace System.Web.UI.WebControls return (separatorTemplate!=null);
}
}
+
+ int IRepeatInfoUser.RepeatedItemCount
+ {
+ get
+ {
+ if(itemsArray!=null)
+ return itemsArray.Count;
+ return 0;
+ }
+ }
+
+ void IRepeatInfoUser.RenderItem(ListItemType itemType, int repeatIndex, RepeatInfo repeatInfo, HtmlTextWriter writer)
+ {
+ DataListItem item = GetItem(itemType, repeatIndex);
+ if(item!=null)
+ {
+ item.RenderItem(writer, extractTemplateRows, repeatInfo.RepeatLayout == RepeatLayout.Table);
+ }
+ }
+
+ Style IRepeatInfoUser.GetItemStyle(ListItemType itemType, int repeatIndex)
+ {
+ if(GetItem(itemType, repeatIndex)!=null && ControlStyleCreated)
+ return ControlStyle;
+ }
}
}
diff --git a/mcs/class/System.Web/System.Web.UI/Control.cs b/mcs/class/System.Web/System.Web.UI/Control.cs index 68c0cf438b1..3ac1f1ff6ae 100644 --- a/mcs/class/System.Web/System.Web.UI/Control.cs +++ b/mcs/class/System.Web/System.Web.UI/Control.cs @@ -115,7 +115,7 @@ namespace System.Web.UI public Control()
{
- if (this is NamingContainer) isNamingContainer = true;
+ if (this is INamingContainer) _isNamingContainer = true;
}
public virtual string ClientID //DIT
{
@@ -150,7 +150,7 @@ namespace System.Web.UI {
get //DIT
{
- return _userID;
+ return _userId;
}
set
{
@@ -217,6 +217,7 @@ namespace System.Web.UI {
//TODO: Some Naming container methods here. What are they? Why arnt they declared?
//Note: Nuked the old stuff here. Was total crap. :)
+ throw new NotImplementedException();
}
}
public virtual bool Visible
@@ -262,8 +263,11 @@ namespace System.Web.UI {
get
{
- if (_events != null) return _events;
- _events = new EventHandlerList();
+ if (_events == null)
+ {
+ _events = new EventHandlerList();
+ }
+ return _events;
}
}
protected bool HasChildViewState //DIT
@@ -278,15 +282,20 @@ namespace System.Web.UI {
get
{
- return _trackingViewState;
+ return _trackViewState;
}
}
protected virtual StateBag ViewState
{
get
{
- if (_viewState == null) _viewState = new StateBag(ViewStateIgnoreCase);
- return _viewState;
+ if(_viewState == null)
+ {
+ _viewState = new StateBag(ViewStateIgnoresCase);
+ if(IsTrackingViewState)
+ _viewState.TrackViewState();
+ }
+ return _viewState;
}
}
protected virtual bool ViewStateIgnoresCase //DIT
|