Exemple #1
0
    public string GetStyle_class_tag(string classname, hglParser.Element xe)
    {
        var curTag = xe != null ? xe.text : null;

        if (curTag == null)
        {
            return(null);
        }

        string s = null;

        if (string.IsNullOrEmpty(classname))
        {
            s = KEYVAL.Find(curTag, m_list);
        }
        if (s == null)
        {
            s = KEYVAL.Find(curTag + "." + classname, m_list);
        }
        if (s == null)
        {
            s = KEYVAL.Find("." + classname, m_list);
        }

        return(s);
    }
Exemple #2
0
    public bool GetLinkStyleColor(string kind, out Color col)
    {
        col = Color.black;
        var s = KEYVAL.Find(kind, m_list);

        if (string.IsNullOrEmpty(s))
        {
            return(false);
        }
        hglStyle style = new hglStyle(null);

        style.Parse(s);
        col = style.GetColor(StyleKey.color);
        return(true);
    }