mirror of
https://github.com/BepInEx/mono.git
synced 2026-11-17 11:21:39 -10:00
* **.cs: Some completed, some left. * ChangeLog, TODO: The best places to see what I do. Highly verbose. svn path=/trunk/mcs/; revision=2857
57 lines
1.1 KiB
C#
57 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()
|
|
{
|
|
}
|
|
|
|
public override void Render(HtmlTextWriter writer)
|
|
{
|
|
SetForeColor();
|
|
Render(writer);
|
|
}
|
|
|
|
private void SetForeColor()
|
|
{
|
|
if(!ControlStyle.IsSet(Style.FORECOLOR))
|
|
{
|
|
Control ctrl = this;
|
|
Color foreCol;
|
|
int ctr = 0;
|
|
//FIXME: Should it be 3 or 2? this-> LinkButton-> WebControl-> Control
|
|
// But control does not have any ForeColor. Need to test.
|
|
while(ctr < 3)
|
|
{
|
|
ctrl = ctrl.Parent;
|
|
foreCol = ctrl.ForeColor;
|
|
if(foreCol != Color.Empty)
|
|
{
|
|
ForeColor = foreCol;
|
|
return;
|
|
}
|
|
ctr++;
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|