Esempio n. 1
0
        public static string MakeCssScript(CssScript css)
        {
            string tStrOpen   = "<" + EnumUtil.GetDescription(css.sxml) + " type=" + EnumUtil.GetDescription(css.mime_Type) + ">";
            string tStrMiddle = "";

            if (css.html_Type != "#")
            {
                tStrMiddle = "" + css.html_Type + "." + css.type_Name + " {" + "\n";
            }
            else
            {
                tStrMiddle = "" + css.html_Type + css.type_Name + " {" + "\n";
            }
            int i = 0;

            foreach (css_variables str in css.variables)
            {
                tStrMiddle += EnumUtil.GetDescription(str) + ":" + css.values[i] + ";" + "\n";
                if (i == (css.variables.Length - 1))
                {
                    tStrMiddle += "}";
                }
                i++;
            }

            string tStrEnd = "</" + EnumUtil.GetDescription(css.sxml) + ">";

            return(tStrOpen + "\n" + tStrMiddle + "\n" + tStrEnd + "\n");
        }
Esempio n. 2
0
        public static string MakeCssScript(CssScript css)
        {
            string tStrOpen = "<" + EnumUtil.GetDescription(css.sxml) + " type=" + EnumUtil.GetDescription(css.mime_Type) + ">";
            string tStrMiddle = "";
            if (css.html_Type != "#")
            {
                tStrMiddle = "" + css.html_Type + "." + css.type_Name + " {" + "\n";
            }
            else
            {
                tStrMiddle = "" + css.html_Type + css.type_Name + " {" + "\n";
            }
            int i = 0;

            foreach (css_variables str in css.variables)
            {
                tStrMiddle += EnumUtil.GetDescription(str) + ":" + css.values[i] + ";" + "\n";
                if (i == (css.variables.Length - 1))
                {
                    tStrMiddle += "}";
                }
                i++;
            }

            string tStrEnd = "</" + EnumUtil.GetDescription(css.sxml) + ">";
            return tStrOpen + "\n" + tStrMiddle + "\n" + tStrEnd + "\n";
        }