예제 #1
0
 private void butGenerateControllersTest_Click(object sender, EventArgs e)
 {
     WebAPICodeWriter.ModelClassNameControllerTestGenerated();
 }
예제 #2
0
        private void StartUp()
        {
            splitContainer1.SplitterDistance    = 130;
            panelCSSPEnumsButtons.Dock          = DockStyle.Fill;
            panelCSSPEnumsButtons.Visible       = true;
            panelCSSPModelsButtons.Dock         = DockStyle.Fill;
            panelCSSPModelsButtons.Visible      = false;
            panelCSSPServicesButtons.Dock       = DockStyle.Fill;
            panelCSSPServicesButtons.Visible    = false;
            panelCSSPWebAPIButtons.Dock         = DockStyle.Fill;
            panelCSSPWebAPIButtons.Visible      = false;
            panelCSSPWebToolsAngButtons.Dock    = DockStyle.Fill;
            panelCSSPWebToolsAngButtons.Visible = false;
            panelPostCSSPDocButtons.Dock        = DockStyle.Fill;
            panelPostCSSPDocButtons.Visible     = false;

            #region CSSPEnums
            enumsCodeWriter = new EnumsCodeWriter();

            enumsCodeWriter.CSSPErrorHandler        += CSSPErrorHandler;
            enumsCodeWriter.StatusPermanentHandler  += StatusPermanentHandler;
            enumsCodeWriter.StatusPermanent2Handler += StatusPermanent2Handler;
            enumsCodeWriter.StatusTempHandler       += StatusTempHandler;
            enumsCodeWriter.ClearPermanentHandler   += ClearPermanentHandler;
            enumsCodeWriter.ClearPermanent2Handler  += ClearPermanent2Handler;

            enumsPolSourceCodeWriter = new EnumsPolSourceCodeWriter();

            enumsPolSourceCodeWriter.CSSPErrorHandler        += CSSPErrorHandler;
            enumsPolSourceCodeWriter.StatusPermanentHandler  += StatusPermanentHandler;
            enumsPolSourceCodeWriter.StatusPermanent2Handler += StatusPermanent2Handler;
            enumsPolSourceCodeWriter.StatusTempHandler       += StatusTempHandler;
            enumsPolSourceCodeWriter.ClearPermanentHandler   += ClearPermanentHandler;
            enumsPolSourceCodeWriter.ClearPermanent2Handler  += ClearPermanent2Handler;
            #endregion CSSPEnums

            #region CSSPModels
            modelsCodeWriter = new ModelsCodeWriter();

            modelsCodeWriter.CSSPErrorHandler        += CSSPErrorHandler;
            modelsCodeWriter.StatusPermanentHandler  += StatusPermanentHandler;
            modelsCodeWriter.StatusPermanent2Handler += StatusPermanent2Handler;
            modelsCodeWriter.StatusTempHandler       += StatusTempHandler;
            modelsCodeWriter.ClearPermanentHandler   += ClearPermanentHandler;
            modelsCodeWriter.ClearPermanent2Handler  += ClearPermanent2Handler;

            db = new CSSPDBContext(DatabaseTypeEnum.MemoryTestDB);
            CSSPDBConnectionString = ConfigurationManager.ConnectionStrings["CSSPDB"].ConnectionString;
            TestDBConnectionString = ConfigurationManager.ConnectionStrings["TestDB"].ConnectionString;
            if (System.Environment.UserName == "Charles")
            {
                CSSPDBConnectionString = CSSPDBConnectionString.Replace("wmon01dtchlebl2", "charles-pc");
                TestDBConnectionString = TestDBConnectionString.Replace("wmon01dtchlebl2", "charles-pc");
            }
            #endregion CSSPModels

            #region CSSPServices
            servicesCodeWriter = new ServicesCodeWriter();

            servicesCodeWriter.CSSPErrorHandler        += CSSPErrorHandler;
            servicesCodeWriter.StatusPermanentHandler  += StatusPermanentHandler;
            servicesCodeWriter.StatusPermanent2Handler += StatusPermanent2Handler;
            servicesCodeWriter.StatusTempHandler       += StatusTempHandler;
            servicesCodeWriter.ClearPermanentHandler   += ClearPermanentHandler;
            servicesCodeWriter.ClearPermanent2Handler  += ClearPermanent2Handler;
            #endregion CSSPServices

            #region CSSPWebAPI
            WebAPICodeWriter = new WebAPICodeWriter();

            WebAPICodeWriter.CSSPErrorHandler        += CSSPErrorHandler;
            WebAPICodeWriter.StatusPermanentHandler  += StatusPermanentHandler;
            WebAPICodeWriter.StatusPermanent2Handler += StatusPermanent2Handler;
            WebAPICodeWriter.StatusTempHandler       += StatusTempHandler;
            WebAPICodeWriter.ClearPermanentHandler   += ClearPermanentHandler;
            WebAPICodeWriter.ClearPermanent2Handler  += ClearPermanent2Handler;
            #endregion CSSPWebAPI

            #region CSSPWebToolsAng
            AngularCodeWriter = new AngularCodeWriter();

            AngularCodeWriter.CSSPErrorHandler        += CSSPErrorHandler;
            AngularCodeWriter.StatusPermanentHandler  += StatusPermanentHandler;
            AngularCodeWriter.StatusPermanent2Handler += StatusPermanent2Handler;
            AngularCodeWriter.StatusTempHandler       += StatusTempHandler;
            AngularCodeWriter.ClearPermanentHandler   += ClearPermanentHandler;
            AngularCodeWriter.ClearPermanent2Handler  += ClearPermanent2Handler;
            #endregion CSSPWebToolsAng

            #region PostCSSPDoc
            PostCSSPDocCleanFiles = new PostCSSPDocCleanFiles();

            PostCSSPDocCleanFiles.CSSPErrorHandler        += CSSPErrorHandler;
            PostCSSPDocCleanFiles.StatusPermanentHandler  += StatusPermanentHandler;
            PostCSSPDocCleanFiles.StatusPermanent2Handler += StatusPermanent2Handler;
            PostCSSPDocCleanFiles.StatusTempHandler       += StatusTempHandler;
            PostCSSPDocCleanFiles.ClearPermanentHandler   += ClearPermanentHandler;
            PostCSSPDocCleanFiles.ClearPermanent2Handler  += ClearPermanent2Handler;
            #endregion PostCSSPDoc
        }
예제 #3
0
 private void butGenerateControllersWithDoc_Click(object sender, EventArgs e)
 {
     WebAPICodeWriter.ModelControllerGenerated(true);
 }