mirror of
https://github.com/BepInEx/mono.git
synced 2026-11-16 17:10:20 -10:00
* *.cs -- Updates from Leen Toelen ([email protected]) svn path=/trunk/mcs/; revision=2142
91 lines
1.7 KiB
C#
Executable File
91 lines
1.7 KiB
C#
Executable File
/* System.Web.UI.HtmlControls
|
|
* Authors
|
|
* Leen Toelen ([email protected])
|
|
*/
|
|
|
|
using System;
|
|
using System.Web;
|
|
using System.Web.UI;
|
|
using System.Globalization;
|
|
|
|
namespace System.Web.UI.HtmlControls{
|
|
|
|
public class HtmlImage : HtmlControl{
|
|
|
|
public HtmlImage(): base("img"){}
|
|
|
|
protected new void RenderAttributes(HtmlTextWriter writer){
|
|
PreProcessRelativeReference(writer,"src");
|
|
RenderAttributes(writer);
|
|
writer.Write(" /");
|
|
}
|
|
|
|
public string Align{
|
|
get{
|
|
string attr = Attributes["align"];
|
|
if (attr != null){
|
|
return attr;
|
|
}
|
|
return String.Empty;
|
|
}
|
|
set{
|
|
Attributes["align"] = AttributeToString(value);
|
|
}
|
|
}
|
|
|
|
public string Alt{
|
|
get{
|
|
string attr = Attributes["alt"];
|
|
if (attr != null){
|
|
return attr;
|
|
}
|
|
return String.Empty;
|
|
}
|
|
set{
|
|
Attributes["alt"] = AttributeToString(value);
|
|
}
|
|
}
|
|
|
|
public int Border{
|
|
get{
|
|
string attr = Attributes["border"];
|
|
if (attr != null){
|
|
return Int32.Parse(attr,CultureInfo.InvariantCulture);
|
|
}
|
|
return -1;
|
|
}
|
|
set{
|
|
Attributes["border"] = AttributeToString(value);
|
|
}
|
|
}
|
|
|
|
public string Src{
|
|
get{
|
|
string attr = Attributes["src"];
|
|
if (attr != null){
|
|
return attr;
|
|
}
|
|
return String.Empty;
|
|
}
|
|
set{
|
|
Attributes["src"] = AttributeToString(value);
|
|
}
|
|
}
|
|
|
|
public int Width{
|
|
get{
|
|
string attr = Attributes["width"];
|
|
if (attr != null){
|
|
return Int32.Parse(attr,CultureInfo.InvariantCulture);
|
|
}
|
|
return -1;
|
|
}
|
|
set{
|
|
Attributes["width"] = AttributeToString(value);
|
|
}
|
|
}
|
|
|
|
} // class HtmlImage
|
|
} // namespace System.Web.UI.HtmlControls
|
|
|