📄 htmlattributecollection.cs
字号:
namespace Imps.Utils.TagParser
{
using System;
using System.Collections;
using System.Reflection;
public class HtmlAttributeCollection : CollectionBase
{
private TagElement mElement;
public HtmlAttributeCollection()
{
this.mElement = null;
}
internal HtmlAttributeCollection(TagElement element)
{
this.mElement = element;
}
public int Add(TagAttribute attribute)
{
return base.List.Add(attribute);
}
public TagAttribute FindByName(string name)
{
if (this.IndexOf(name) == -1)
{
return null;
}
return this[this.IndexOf(name)];
}
public int IndexOf(string name)
{
for (int i = 0; i < base.List.Count; i++)
{
if (this[i].Name.ToLower().Equals(name.ToLower()))
{
return i;
}
}
return -1;
}
public TagAttribute this[string name]
{
get
{
return this.FindByName(name);
}
}
public TagAttribute this[int index]
{
get
{
return (TagAttribute) base.List[index];
}
set
{
base.List[index] = value;
}
}
}
}
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -