|
/*
* Copyright (c) 2004 Marc Clifton
* All Rights Reserved
*
* License: GNU General Public License, see doc\license.txt
* http://www.gnu.org/licenses/licenses.html#GPL
* Owner: Marc Clifton email: webmaster@knowledgeautomation.com
* First release published:
* http://www.codeproject.com/cs/miscctrl/xmlGuiGenerator.asp
* 2/25/04
*/
using System;
using System.Collections;
namespace MyXaml.Extensions
{
public class Style
{
protected ArrayList styleProperties;
protected Style basedOn;
public ArrayList StyleProperties
{
get {return styleProperties;}
}
public Style BasedOn
{
get {return basedOn;}
set {basedOn=value;}
}
public Style()
{
styleProperties=new ArrayList();
basedOn=null;
}
public string GetAttributeValue(string attrName)
{
foreach (PropertyStyle ps in styleProperties)
{
foreach(DictionaryEntry entry in ps.PropertyValueMap)
{
if (((string)entry.Key)==attrName)
{
return (string)entry.Value;
}
}
}
if (basedOn != null)
{
return basedOn.GetAttributeValue(attrName);
}
return null;
}
}
public class PropertyStyle
{
protected Hashtable propertyValueMap;
protected string className;
public Hashtable PropertyValueMap
{
get {return propertyValueMap;}
}
public string Class
{
get {return className;}
set {className=value;}
}
public PropertyStyle()
{
propertyValueMap=new Hashtable();
}
}
}
|
By viewing downloads associated with this article you agree to the Terms of Service and the article's licence.
If a file you wish to view isn't highlighted, and is a text file (not binary), please
let us know and we'll add colourisation support for it.
This article has no explicit license attached to it but may contain usage terms in the article text or the download files themselves. If in doubt please contact the author via the discussion board below.
A list of licenses authors might use can be found here