mirror of
https://github.com/BepInEx/mono.git
synced 2026-11-17 11:21:39 -10:00
* DataGrid.cs: AutoGenerateColumns defaults to true. Fixed CreateColumnSet. Set the owner of the column when auto generated. In PrepareControlHierarchyForItem, fixed for loop bound. * LinkButtonInternal.cs: fixed infinite recursion bug. Fixes bug #37124. svn path=/trunk/mcs/; revision=10910
56 lines
1.1 KiB
C#
56 lines
1.1 KiB
C#
/**
|
|
* Namespace: System.Web.UI.WebControls
|
|
* Class: LinkButtonInternal
|
|
*
|
|
* Author: Gaurav Vaish
|
|
* Maintainer: [email protected]
|
|
* Contact: <[email protected]>, <[email protected]>
|
|
* Implementation: yes
|
|
* Status: 100%
|
|
*
|
|
* (C) Gaurav Vaish (2002)
|
|
*/
|
|
|
|
using System;
|
|
using System.Drawing;
|
|
using System.Web;
|
|
using System.Web.UI;
|
|
|
|
namespace System.Web.UI.WebControls
|
|
{
|
|
internal class LinkButtonInternal : LinkButton
|
|
{
|
|
public LinkButtonInternal() : base()
|
|
{
|
|
}
|
|
|
|
protected override void Render(HtmlTextWriter writer)
|
|
{
|
|
SetForeColor();
|
|
base.Render(writer);
|
|
}
|
|
|
|
private void SetForeColor()
|
|
{
|
|
if(!ControlStyle.IsSet(System.Web.UI.WebControls.Style.FORECOLOR))
|
|
{
|
|
Control ctrl = this;
|
|
Color foreCol;
|
|
int ctr = 0;
|
|
//FIXME: this-> LinkButton-> WebControl
|
|
while(ctr < 2)
|
|
{
|
|
ctrl = ctrl.Parent;
|
|
foreCol = ((WebControl)ctrl).ForeColor;
|
|
if(foreCol != Color.Empty)
|
|
{
|
|
ForeColor = foreCol;
|
|
return;
|
|
}
|
|
ctr++;
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|