mirror of
https://github.com/BepInEx/mono.git
synced 2026-11-16 17:10:20 -10:00
* UI/*.cs -- Added a few attributes. * WebControls/*.cs -- Applied the attributes * ChangeLog -- Notification svn path=/trunk/mcs/; revision=3353
94 lines
1.7 KiB
C#
94 lines
1.7 KiB
C#
/**
|
|
* Namespace: System.Web.UI.WebControls
|
|
* Class: DataListItem
|
|
*
|
|
* Author: Gaurav Vaish
|
|
* Maintainer: [email protected]
|
|
* Contact: <[email protected]>, <[email protected]>
|
|
* Implementation: yes
|
|
* Status: 95%
|
|
*
|
|
* (C) Gaurav Vaish (2002)
|
|
*/
|
|
|
|
using System;
|
|
using System.Collections;
|
|
using System.Web;
|
|
using System.Web.UI;
|
|
using System.ComponentModel;
|
|
|
|
namespace System.Web.UI.WebControls
|
|
{
|
|
[ToolboxItem(false)]
|
|
public class DataListItem : WebControl, INamingContainer
|
|
{
|
|
int itemIndex;
|
|
ListItemType itemType;
|
|
object dataItem;
|
|
|
|
public DataListItem(int itemIndex, ListItemType itemType)
|
|
{
|
|
this.itemIndex = itemIndex;
|
|
this.itemType = itemType;
|
|
}
|
|
|
|
public virtual object DataItem
|
|
{
|
|
get
|
|
{
|
|
return dataItem;
|
|
}
|
|
set
|
|
{
|
|
dataItem = value;
|
|
}
|
|
}
|
|
|
|
public virtual int ItemIndex
|
|
{
|
|
get
|
|
{
|
|
return itemIndex;
|
|
}
|
|
}
|
|
|
|
public virtual ListItemType ItemType
|
|
{
|
|
get
|
|
{
|
|
return itemType;
|
|
}
|
|
}
|
|
|
|
[MonoTODO]
|
|
public virtual void RenderItem(HtmlTextWriter writer, bool extractRows, bool tableLayout)
|
|
{
|
|
//TODO: Complete me!
|
|
throw new NotImplementedException();
|
|
}
|
|
|
|
protected override Style CreateControlStyle()
|
|
{
|
|
return new TableItemStyle();
|
|
}
|
|
|
|
protected override bool OnBubbleEvent(object source, EventArgs e)
|
|
{
|
|
if(e is CommandEventArgs)
|
|
{
|
|
RaiseBubbleEvent(this, new DataListCommandEventArgs(this, source, (CommandEventArgs)e));
|
|
return true;
|
|
}
|
|
return false;
|
|
}
|
|
|
|
internal void SetItemType(ListItemType itemType)
|
|
{
|
|
if(Enum.IsDefined(typeof(ListItemType), itemType))
|
|
{
|
|
this.itemType = itemType;
|
|
}
|
|
}
|
|
}
|
|
}
|