Exemple #1
0
        /// <summary>
        /// Creates the web files.
        /// </summary>
        public void CreateWebFiles()
        {
            WebProj web = WebProj.getInstance();

            string webPath = _rootDirPath + "//" + _projectHash["webName"] + "//";

            //Create Files
            _CreateFile(webPath + _projectHash["webName"] + ".csproj.user", web.CreateProject_Web_user());
            _CreateFile(webPath + "Web.Debug.config", web.CreateWebDebugConfig());
            _CreateFile(webPath + "Web.Release.config", web.CrateWebReleaseConfig());
            _CreateFile(webPath + "Web.config", web.CreateWebConfig());
            _CreateFile(webPath + "Default.aspx", web.CreateDefault_Html(_projectHash["webName"].ToString()));
            _CreateFile(webPath + "Default.aspx.cs", web.CreateDefault_CS(_projectHash["webName"].ToString()));
            _CreateFile(webPath + "Default.aspx.designer.cs", web.Create_DesignerCS(_projectHash["webName"].ToString(), "Default"));

            #region MainDir
            string nameSpace = _projectHash["webName"].ToString() + ".Main";
            _CreateFile(webPath + "Main/Desk.aspx", web.CreateDesk_Html(nameSpace));
            _CreateFile(webPath + "Main/Desk.aspx.cs", web.CreateDesk_CS(_projectName, "Desk"));
            _CreateFile(webPath + "Main/Desk.aspx.designer.cs", web.Create_DesignerCS(nameSpace, "Desk"));

            _CreateFile(webPath + "Main/Index.aspx", web.CreateIndex_Html(nameSpace));
            _CreateFile(webPath + "Main/Index.aspx.cs", web.CreateIndex_CS(_projectName, "Index"));
            _CreateFile(webPath + "Main/Index.aspx.designer.cs", web.Create_DesignerCS(nameSpace, "Index"));

            _CreateFile(webPath + "Main/Login.aspx", web.CreateLogin_Html(nameSpace));
            _CreateFile(webPath + "Main/Login.aspx.cs", web.CreateLogin_CS(nameSpace, "Login"));
            _CreateFile(webPath + "Main/Login.aspx.designer.cs", web.Create_DesignerCS(nameSpace, "Login"));
            #endregion

            #region Create UserControls
            _CreateFile(webPath + "UserControl/Header.ascx", web.CreateUC_Header(_projectHash["webName"].ToString()));
            _CreateFile(webPath + "UserControl/Header.ascx.cs", web.CreateUC_HeaderCs(_projectHash["webName"].ToString()));
            _CreateFile(webPath + "UserControl/Header.ascx.designer.cs", web.CreateUC_HeaderDesigner(_projectHash["webName"].ToString() + ".Header"));

            _CreateFile(webPath + "UserControl/Navigator.ascx", web.CreateUC_Nav(_projectHash["webName"].ToString(), "Navigator"));
            _CreateFile(webPath + "UserControl/Navigator.ascx.cs", web.CreateUC_NavCs(_projectHash["webName"].ToString()));
            _CreateFile(webPath + "UserControl/Navigator.ascx.designer.cs", web.CreateUC_NavDesigner(_projectHash["webName"].ToString() + ".Navigator"));

            #endregion

            _CreateFile(webPath + "Commands/HelperCommand.cs", web.CreateWebCommand_Helper(_projectHash["webName"].ToString() + ".Commands"));

            #region Create JS
            _CreateFile(webPath + "js/global/jquery.min.js", web.CreateJs_jquery());
            _CreateFile(webPath + "js/global/ListPage.js", web.CreateJs_ListPage());
            _CreateFile(webPath + "js/page/Login.js", "");
            #endregion
            #region 创建CSS文件
            _CreateFile(webPath + "css/global/list_default.css", web.CreateCssListStyle());
            _CreateFile(webPath + "css/global/control_default.css", web.CreateCssControlCss());
            _CreateFile(webPath + "css/global/global.css", web.CreateCssGlobal());
            _CreateFile(webPath + "css/page/login.css", web.CreateCssLogin());
            _CreateFile(webPath + "css/page/navcss.css", web.CreateCssNav());

            _CreateFile(webPath + "cssui/global/global.css", web.CreateCssUIGloble());
            _CreateFile(webPath + "cssui/global/style.css", web.CreateCssUIStyle());
            #endregion
        }