示例#1
0
        bool CheckColour(int index)
        {
            if (index < 0)
            {
                return(false);
            }
            char code = Text.value[index], col = Text.value[index + 1];

            return((code == '%' || code == '&') && IDrawer2D.ValidColCode(col));
        }
        string GetPart(string line, int start, int end)
        {
            string part    = line.Substring(start, end - start);
            int    lastCol = line.LastIndexOf('&', start, start);

            // We may split up a line into say %e<word><url>
            // url and word both need to have %e at the start.

            if (lastCol >= 0 && IDrawer2D.ValidColCode(line, lastCol + 1))
            {
                part = "&" + line[lastCol + 1] + part;
            }
            return(part);
        }