using System;
using System.Data;
using System.Configuration;
using System.Collections;
using System.Web;
using System.Web.Security;
using System.Web.UI;
using System.Web.UI.WebControls;
using System.Web.UI.WebControls.WebParts;
using System.Web.UI.HtmlControls;
using System.Text;
using System.IO;
public partial class themejs : System.Web.UI.Page
{
    protected void Page_Load(object sender, EventArgs e)
    {
        if (!IsPostBack)
            BindJs();
    }

    private void BindJs()
    {
        StringBuilder sb = new StringBuilder();
        DirectoryInfo dir = new DirectoryInfo(@"I:\mdBlog\msn皮肤113套");
        int i = 0;
        foreach (DirectoryInfo d in dir.GetDirectories())
        {
            sb.AppendFormat(" Themes[{0}]=new ThemeClass('{1}');\r\n\n", i, d.Name);
           
                foreach (DirectoryInfo d1 in d.GetDirectories())
                {
                    sb.AppendFormat("Themes[{0}].Add(new themeItem('{1}','{1}','../../style/{1}/{1}.gif'));\n",i,d1.Name);
                
                }

                i++;
        }

       // Response.Write(sb.ToString());
    }
}
