4.2.12. GetScreenWidth()——获得系统的页面宽度设置
public string GetScreenWidth()
五. PageProperty——动态属性对象
class PageProperty
该类提供用户属性定义及控制的方法。
5.1. 属性
5.1.1. Count——属性项的个数 5.1.2. Level——嵌套属性的级别
嵌套属性的级别,顶级为0
5.1.3. ParentPropertyItem——父属性 5.1.4. Html——HTML对象
属性集合对应的Html对象。
5.1.4.1. 属性
5.1.4.1.1. ControlIDSuffix——控件的前缀 5.1.4.1.2. CaptionWidth——标题区的宽度 5.1.4.1.3. ValueWidth——编辑区的宽度 5.1.4.1.4. EscapeValue——值是否编码
5.1.4.2. 方法
5.1.4.2.1. getHtmlControl——得到属性的html代码
public HtmlTable getHtmlControl()
返回的是一个HtmlTable对象
5.2. 方法
5.2.1. AddProperty——添加动态属性项
AddProperty(string key,string name)
AddProperty(string key,string name,string aValue)
AddProperty(string key,string name,string aValue,string description) 返回新添加的属性项元素对象。参见使用例子
5.2.2. AppendPropertyAndValue——追加动态属性项
AppendPropertyAndValue (PageProperty p,bool replaceValue)
从另一个属性对象集中添加所有的属性项,replaceValue决定是否替换掉原有的值
5.2.3. RemoveProperty(string key)——删除一个属性项 5.2.4. HasProperty——动态属性是否存在
HasProperty (string key) 返回动态属性是否存在
5.2.5. GetProperty——获取动态属性
GetProperty (string key) GetProperty (int index)
根据key或索引号返回动态属性
5.2.6. GetIndex——获取动态属性索引号
GetIndex (string key)
根据key返回动态属性的索引号
5.2.7. getPropertyIndex——获取属性索引号
public int getPropertyIndex(string key)
public int getPropertyIndex(string key,bool mustExisted) mustExisted——指定不存在是时候报异常。
5.2.8. getKey(int index)——根据索引号得到key 5.2.9. getValue——获取动态属性值
string getValue (string key) string getValue (int index) 根据key或索引号返回动态属性的值
5.2.10. setValue——设置动态属性值
setValue (string key,string aValue) 根据key设置动态属性的值
5.2.11. getName——得到属性名称
public string getName(string key) public string getName(int index)
5.2.12. setName——设置动态属性的名称
public void setName(string key,string name) 根据key设置动态属性的名称
5.2.13. getMode——获得属性模式
public string getMode(string key) public string getMode(int index)
其中的模式类型参见:属性项模式Mode
5.2.14. setMode(string key,string mode)——设置属性的模式
public void setMode(string key,string mode)
其中的模式类型参见:属性项模式Mode
5.2.15. getStyle——获得属性风格
public string getStyle(string key) public string getStyle(int index)
其中的模式类型参见:属性项风格Style
5.2.16. setStyle(string key,string style)——设置属性项风格
其中的模式类型参见:属性项风格Style
5.2.17. getDescription——获得属性描述
public string getDescription(string key) public string getDescription(int index)
5.2.18. setDescription(string key,string description)——设置属性描述 5.2.19. getRequired——获得属性Required
public string getRequired(string key) public string getRequired(int index)
5.2.20. setRequired(string key,string required)——设置属性Required 5.2.21. setHashTable——从Hashtable中更新属性值
public void setHashTable(Hashtable table) -- 不替换现有值
public void setHashTable(Hashtable table,bool replaceMode) -- 可控制是否替换现有值
5.2.22. getHashTable—— 从属性中得到Hashtable 5.2.23. getDataItems——得到附加数据项集合
public ArrayList getDataItems(string key) public ArrayList getDataItems(int index)
其中返回的ArrayList中的每一个元素都是一个DataItem对象。
5.2.24. getDataItemByID(string key,string itemID)——得到附加数据项
public DataItem getDataItemByID(string key,string itemID) 其中返回的对象是一个DataItem对象。
5.2.25. AddDataItem——添加附加数据项
public void AddDataItem(string key,string id,string avalue) 其中:key:属性的key;id:附加数据项的id;avalue:附加数据项的值。
5.2.26. UnescapeValue——解码属性值
public void UnescapeValue()
5.2.27. GenPagePropertyByParameter——从字符串编码中解析出属性对象
public PageProperty GenPagePropertyByParameter(string parameter) parameter格式:
? ? ? ? 不同的参数项用“|”分割,对应属性中的每一个属性项; 每一个参数的属性设置项用“#分割”,即每一个属性项的key、Name、Mode等等 不同的附加数据项用“%”分割,即属性项的每一个可选附加数据项; 每一个附加数据项的id和值用“$”分割
5.2.28. GenPageProperty——从字符串编码中解析出属性对象
public static PageProperty GenPageProperty(string parameter) 用法同上。
六. PagePropertyItem——动态属性项对象
Wesoft.Sys.FrameWork.Common.Base. PagePropertyItem
该对象就是ModuleBase.Property对象中的属性项,对应其中的一个动态属性。