User: cmicali Date: 06/06/09 15:27:24 Modified: etc/andromda-dotnet/AndroMDA.VS80AddIn/AndroMDA.VS80AddIn AndroMDA.VS80AddIn.csproj Resource1.Designer.cs Resource1.resx WizardSolutionProcessor.cs etc/andromda-dotnet/AndroMDA.VS80AddIn/AndroMDA.VS80AddIn/Commands AddInCommandBase.cs etc/andromda-dotnet/AndroMDA.VS80AddIn/AndroMDA.VS80AddIn/Dialogs AboutOptionsPage.cs MDAProjectSetupControl.cs MDAProjectSetupControl.designer.cs MDASolutionWizard.cs MDASolutionWizard.designer.cs MDASolutionWizard.resx etc/andromda-dotnet/AndroMDA.VS80AddIn/AndroMDA.VS80AddIn/Resources/Web cvsignore etc/andromda-dotnet/AndroMDA.VS80AddIn/AndroMDA.VS80AddIn/Resources/mda/src/uml empty.model.xml etc/andromda-dotnet/AndroMDA.VS80AddIn/AndroMDA.VS80AddIn/Utils AddInUtils.cs Added: etc/andromda-dotnet/AndroMDA.VS80AddIn/AndroMDA.VS80AddIn/Resources/Web web.config.membershipsection web.config.rolesection etc/andromda-dotnet/AndroMDA.VS80AddIn/AndroMDA.VS80AddIn/Resources/mda/src/uml empty.model.membership.xml etc/andromda-dotnet/AndroMDA.VS80AddIn/AndroMDA.VS80AddIn/Resources/Membership DomainMembershipProvider.cs DomainMembershipUser.cs DomainRoleProvider.cs MembershipServiceImpl.cs UserDaoImpl.cs Log: - Added membership support to solution wizard processor - Redesigned and cleaned up the solution wizard UI Revision Changes Path 1.13 +9 -0 plugins/etc/andromda-dotnet/AndroMDA.VS80AddIn/AndroMDA.VS80AddIn/AndroMDA.VS80AddIn.csproj Index: AndroMDA.VS80AddIn.csproj =================================================================== RCS file: /cvsroot/andromdaplugins/plugins/etc/andromda-dotnet/AndroMDA.VS80AddIn/AndroMDA.VS80AddIn/AndroMDA.VS80AddIn.csproj,v retrieving revision 1.12 retrieving revision 1.13 diff -u -w -r1.12 -r1.13 --- AndroMDA.VS80AddIn.csproj 30 May 2006 17:36:21 -0000 1.12 +++ AndroMDA.VS80AddIn.csproj 9 Jun 2006 22:27:23 -0000 1.13 @@ -39,6 +39,7 @@ <Reference Include="Microsoft.VisualStudio.VCProject, Version=8.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" /> <Reference Include="Microsoft.VisualStudio.VCProjectEngine, Version=8.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" /> <Reference Include="System" /> + <Reference Include="System.configuration" /> <Reference Include="System.Data" /> <Reference Include="System.Design" /> <Reference Include="System.Drawing" /> @@ -111,6 +112,11 @@ <Compile Include="MavenProxy.cs" /> <Compile Include="MDAProject.cs" /> <Compile Include="MDASolutionManager.cs" /> + <None Include="Resources\Membership\DomainMembershipProvider.cs" /> + <None Include="Resources\Membership\DomainMembershipUser.cs" /> + <None Include="Resources\Membership\DomainRoleProvider.cs" /> + <None Include="Resources\Membership\MembershipServiceImpl.cs" /> + <None Include="Resources\Membership\UserDaoImpl.cs" /> <Compile Include="Utils\CodeModelUtils.cs" /> <Compile Include="WizardSolutionProcessor.cs" /> <Compile Include="AddInSettings.cs" /> @@ -276,6 +282,7 @@ <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory> </Content> <Content Include="AddIn.ico" /> + <Content Include="Resources\mda\src\uml\empty.model.membership.xml" /> <None Include="Resources\Common\cvsignore" /> <None Include="Resources\Core\cvsignore" /> <None Include="Resources\cvsignore" /> @@ -305,9 +312,11 @@ <None Include="Resources\Lib\NHibernate.dll" /> <None Include="Resources\Lib\NHibernate.Nullables2.dll" /> <None Include="Resources\Web\Bin\cvsignore" /> + <None Include="Resources\Web\web.config.membershipsection" /> <None Include="Resources\Web\cvsignore" /> <None Include="Resources\Web\web.config" /> <None Include="Resources\Web\web.config.nhibernate" /> + <None Include="Resources\Web\web.config.rolesection" /> </ItemGroup> <ItemGroup> <Folder Include="MavenProxy\" /> 1.6 +234 -4 plugins/etc/andromda-dotnet/AndroMDA.VS80AddIn/AndroMDA.VS80AddIn/Resource1.Designer.cs Index: Resource1.Designer.cs =================================================================== RCS file: /cvsroot/andromdaplugins/plugins/etc/andromda-dotnet/AndroMDA.VS80AddIn/AndroMDA.VS80AddIn/Resource1.Designer.cs,v retrieving revision 1.5 retrieving revision 1.6 diff -u -w -r1.5 -r1.6 --- Resource1.Designer.cs 28 May 2006 19:32:27 -0000 1.5 +++ Resource1.Designer.cs 9 Jun 2006 22:27:23 -0000 1.6 @@ -320,6 +320,26 @@ /// <summary> /// Looks up a localized string similar to <?xml version='1.0' encoding='UTF-8'?> ///<!-- <!DOCTYPE XMI SYSTEM "uml14xmi12.dtd"> --> + ///<!-- This xmi file is optimized for MagicDraw UML. Some references are not saved. --> + ///<!-- Change MagicDraw UML environment options property General->.Save Rich XMI --> + /// + ///<XMI xmi.version='1.2' timestamp='Fri Jun 09 17:43:05 EDT 2006' xmlns:UML='omg.org/UML/1.4'> + /// <XMI.header> + /// <XMI.documentation> + /// <XMI.exporter>MagicDraw UML</XMI.exporter> + /// <XMI.exporterVersion>9.5</XMI.exporterVersion> + /// </XMI.documentation> + /// <XMI. [rest of string was truncated]";. + /// </summary> + internal static string mda_src_uml_empty_model_membership_xml { + get { + return ResourceManager.GetString("mda_src_uml_empty_model_membership_xml", resourceCulture); + } + } + + /// <summary> + /// Looks up a localized string similar to <?xml version='1.0' encoding='UTF-8'?> + ///<!-- <!DOCTYPE XMI SYSTEM "uml14xmi12.dtd"> --> /// ///<XMI xmi.version='1.2' timestamp='Mon Aug 29 07:45:39 MDT 2005' xmlns:UML='omg.org/UML/1.4'> /// <XMI.header> @@ -330,7 +350,7 @@ /// <XMI.metamodel xmi.name='UML' xmi.version='1.4'/> /// </XMI.header> /// <XMI.content> - /// <UML:Model xmi.id='eee_1045467100313_135436_1' name='Data' isRoot='false' isLeaf [rest of string was truncated]";. + /// <UML:Model xmi.id='eee_1045467100313_135436_1' name='Data' isRoot='false' isLeaf='false' isA [rest of string was truncated]";. /// </summary> internal static string mda_src_uml_empty_model_xml { get { @@ -339,6 +359,157 @@ } /// <summary> + /// Looks up a localized string similar to // + ///// DomainMembershipProvider + ///// + /// + ///#region Using statements + /// + ///using System; + ///using System.Web; + ///using System.Web.Hosting; + ///using System.Web.Security; + ///using System.Web.Configuration; + ///using System.Security.Principal; + ///using System.Security.Permissions; + ///using System.Globalization; + ///using System.Runtime.Serialization; + ///using System.Collections; + ///using System.Collections.Specialized; + ///using System.Security.Cryptography; + ///using System.Text; + ///using System.Text.RegularExpressions; + ///using System.Configuratio [rest of string was truncated]";. + /// </summary> + internal static string Membership_DomainMembershipProvider_cs { + get { + return ResourceManager.GetString("Membership_DomainMembershipProvider_cs", resourceCulture); + } + } + + /// <summary> + /// Looks up a localized string similar to // + ///// DomainMembershipUser + ///// + /// + ///#region Using statements + /// + ///using System; + ///using System.Data; + ///using System.Data.SqlClient; + ///using System.Configuration; + ///using System.Web; + ///using System.Web.Configuration; + ///using System.Web.Security; + ///using System.Web.UI; + ///using System.Web.UI.WebControls; + ///using System.Web.UI.WebControls.WebParts; + ///using System.Web.UI.HtmlControls; + /// + ///#endregion + /// + ///using ${wizard.solution.name}.VO; + /// + ///namespace ${wizard.projects.web.common.name} + ///{ + /// [Serializable] + /// public class DomainMe [rest of string was truncated]";. + /// </summary> + internal static string Membership_DomainMembershipUser_cs { + get { + return ResourceManager.GetString("Membership_DomainMembershipUser_cs", resourceCulture); + } + } + + /// <summary> + /// Looks up a localized string similar to // + ///// DomainRoleProvider + ///// + /// + ///#region Using statements + /// + ///using System; + ///using System.Web; + ///using System.Web.Configuration; + ///using System.Web.Security; + ///using System.Security.Principal; + ///using System.Security.Permissions; + ///using System.Globalization; + ///using System.Runtime.Serialization; + ///using System.Collections; + ///using System.Collections.Specialized; + ///using System.Text; + ///using System.Configuration.Provider; + ///using System.Configuration; + ///using System.Web.DataAccess; + ///using System.Web.Hosting; + ///using Syst [rest of string was truncated]";. + /// </summary> + internal static string Membership_DomainRoleProvider_cs { + get { + return ResourceManager.GetString("Membership_DomainRoleProvider_cs", resourceCulture); + } + } + + /// <summary> + /// Looks up a localized string similar to // Name: MembershipServiceImpl.cs + ///// license-header cs merge-point + ///// + ///// This is only generated once! It will never be overwritten. + ///// You can (and have to!) safely modify it by hand. + /// + ///using System; + ///using System.Collections; + /// + ///using NHibernate; + ///using AndroMDA.NHibernateSupport; + /// + ///using ${wizard.solution.name}.VO; + ///using ${wizard.solution.name}.Domain; + /// + ///namespace ${wizard.solution.name}.Service + ///{ + /// /// <summary> + /// /// @see MembershipExample.Service.MembershipService + /// /// </summary> + /// [rest of string was truncated]";. + /// </summary> + internal static string Membership_MembershipServiceImpl_cs { + get { + return ResourceManager.GetString("Membership_MembershipServiceImpl_cs", resourceCulture); + } + } + + /// <summary> + /// Looks up a localized string similar to // Name: UserDaoImpl.cs + ///// license-header cs merge-point + ///// + ///// This is only generated once! It will never be overwritten. + ///// You can (and have to!) safely modify it by hand. + /// + ///using System; + /// + ///using Iesi.Collections; + /// + ///using ${wizard.solution.name}.VO; + /// + ///namespace ${wizard.solution.name}.Domain + ///{ + /// /// <summary> + /// /// @see MembershipExample.Domain.User + /// /// </summary> + /// public class UserDaoImpl : UserDaoBase + /// { + /// /// <summary> + /// /// @see MembershipExample.Domain.IUserD [rest of string was truncated]";. + /// </summary> + internal static string Membership_UserDaoImpl_cs { + get { + return ResourceManager.GetString("Membership_UserDaoImpl_cs", resourceCulture); + } + } + + /// <summary> /// Looks up a localized string similar to <?xml version="1.0" encoding="utf-8" ?> ///<hibernate-configuration xmlns="urn:nhibernate-configuration-2.0" > /// <session-factory name="nhibernator"> @@ -466,7 +637,7 @@ } /// <summary> - /// Looks up a localized string similar to App_WebReferences. + /// Looks up a localized string similar to . /// </summary> internal static string web_cvsignore { get { @@ -475,7 +646,21 @@ } /// <summary> - /// Looks up a localized string similar to . + /// Looks up a localized string similar to <?xml version="1.0"?> + ///<!-- + /// Note: As an alternative to hand editing this file you can use the + /// web admin tool to configure settings for your application. Use + /// the Website->Asp.Net Configuration option in Visual Studio. + /// A full list of settings and comments can be found in + /// machine.config.comments usually located in + /// \Windows\Microsoft.Net\Framework\v2.x\Config + ///--> + ///<configuration> + /// + /// <appSettings> + /// <add key="nhibernate.config" value="~/nhibernate.config"/> + /// </appSettings> + /// [rest of string was truncated]";. /// </summary> internal static string web_web_config { get { @@ -484,12 +669,57 @@ } /// <summary> - /// Looks up a localized string similar to . + /// Looks up a localized string similar to <membership defaultProvider="DomainMembershipProvider"> + /// <providers> + /// <clear/> + /// <add name="DomainMembershipProvider" + /// type="${wizard.projects.web.common.name}.DomainMembershipProvider, ${wizard.projects.web.common.name}" + /// enablePasswordRetrieval="false" + /// enablePasswordReset="false" + /// requiresUniqueEmail="true" + /// requiresQuestionAndAnswer="false" + /// minRequiredPasswordLength="1" + /// minRequiredNonalphanumericCharacters="0" + /// hashAlgorithmType="SHA1" passwordFormat="Hashed [rest of string was truncated]";. + /// </summary> + internal static string web_web_config_membershipsection { + get { + return ResourceManager.GetString("web_web_config_membershipsection", resourceCulture); + } + } + + /// <summary> + /// Looks up a localized string similar to <?xml version="1.0"?> + ///<!-- + /// Note: As an alternative to hand editing this file you can use the + /// web admin tool to configure settings for your application. Use + /// the Website->Asp.Net Configuration option in Visual Studio. + /// A full list of settings and comments can be found in + /// machine.config.comments usually located in + /// \Windows\Microsoft.Net\Framework\v2.x\Config + ///--> + ///<configuration> + /// + /// <configSections> + /// <section name="nhibernate" type="System.Configuration.NameValueSectionHan [rest of string was truncated]";. /// </summary> internal static string web_web_config_nhibernate { get { return ResourceManager.GetString("web_web_config_nhibernate", resourceCulture); } } + + /// <summary> + /// Looks up a localized string similar to <roleManager enabled="true" cacheRolesInCookie="true" cookieName=".DRPRoles" defaultProvider="DomainRoleProvider"> + /// <providers> + /// <add name="DomainRoleProvider" type="${wizard.projects.web.common.name}.DomainRoleProvider, ${wizard.projects.web.common.name}" /> + /// </providers> + ///</roleManager>. + /// </summary> + internal static string web_web_config_rolesection { + get { + return ResourceManager.GetString("web_web_config_rolesection", resourceCulture); + } + } } } 1.6 +24 -0 plugins/etc/andromda-dotnet/AndroMDA.VS80AddIn/AndroMDA.VS80AddIn/Resource1.resx Index: Resource1.resx =================================================================== RCS file: /cvsroot/andromdaplugins/plugins/etc/andromda-dotnet/AndroMDA.VS80AddIn/AndroMDA.VS80AddIn/Resource1.resx,v retrieving revision 1.5 retrieving revision 1.6 diff -u -w -r1.5 -r1.6 --- Resource1.resx 28 May 2006 19:32:27 -0000 1.5 +++ Resource1.resx 9 Jun 2006 22:27:23 -0000 1.6 @@ -214,4 +214,28 @@ <data name="web_web_config_nhibernate" type="System.Resources.ResXFileRef, System.Windows.Forms"> <value>Resources\Web\web.config.nhibernate;System.String, mscorlib, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value> </data> + <data name="Membership_DomainMembershipProvider_cs" type="System.Resources.ResXFileRef, System.Windows.Forms"> + <value>Resources\Membership\DomainMembershipProvider.cs;System.String, mscorlib, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089;Windows-1252</value> + </data> + <data name="Membership_DomainMembershipUser_cs" type="System.Resources.ResXFileRef, System.Windows.Forms"> + <value>Resources\Membership\DomainMembershipUser.cs;System.String, mscorlib, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089;Windows-1252</value> + </data> + <data name="Membership_DomainRoleProvider_cs" type="System.Resources.ResXFileRef, System.Windows.Forms"> + <value>Resources\Membership\DomainRoleProvider.cs;System.String, mscorlib, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089;Windows-1252</value> + </data> + <data name="Membership_MembershipServiceImpl_cs" type="System.Resources.ResXFileRef, System.Windows.Forms"> + <value>Resources\Membership\MembershipServiceImpl.cs;System.String, mscorlib, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089;Windows-1252</value> + </data> + <data name="Membership_UserDaoImpl_cs" type="System.Resources.ResXFileRef, System.Windows.Forms"> + <value>Resources\Membership\UserDaoImpl.cs;System.String, mscorlib, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089;Windows-1252</value> + </data> + <data name="web_web_config_membershipsection" type="System.Resources.ResXFileRef, System.Windows.Forms"> + <value>Resources\Web\web.config.membershipsection;System.String, mscorlib, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089;Windows-1252</value> + </data> + <data name="web_web_config_rolesection" type="System.Resources.ResXFileRef, System.Windows.Forms"> + <value>Resources\Web\web.config.rolesection;System.String, mscorlib, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089;Windows-1252</value> + </data> + <data name="mda_src_uml_empty_model_membership_xml" type="System.Resources.ResXFileRef, System.Windows.Forms"> + <value>Resources\mda\src\uml\empty.model.membership.xml;System.String, mscorlib, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089;Windows-1252</value> + </data> </root> \ No newline at end of file 1.8 +202 -26 plugins/etc/andromda-dotnet/AndroMDA.VS80AddIn/AndroMDA.VS80AddIn/WizardSolutionProcessor.cs Index: WizardSolutionProcessor.cs =================================================================== RCS file: /cvsroot/andromdaplugins/plugins/etc/andromda-dotnet/AndroMDA.VS80AddIn/AndroMDA.VS80AddIn/WizardSolutionProcessor.cs,v retrieving revision 1.7 retrieving revision 1.8 diff -u -w -r1.7 -r1.8 --- WizardSolutionProcessor.cs 29 May 2006 14:56:13 -0000 1.7 +++ WizardSolutionProcessor.cs 9 Jun 2006 22:27:23 -0000 1.8 @@ -5,10 +5,12 @@ #region Using statements using System; +using System.Configuration; using System.IO; using System.Text; using System.ComponentModel; using System.Threading; +using System.Xml; using EnvDTE; using EnvDTE80; @@ -93,6 +95,7 @@ Project coreProject = null; Project schemaExportProject = null; Project webProject = null; + Project webCommonProject = null; string versionControlType = m_configuration["application.versioncontrol"]; bool versionControl = versionControlType != "None"; @@ -102,11 +105,11 @@ case "CVS": ignoreFile = ".cvsignore"; break; - case "Subversion": - ignoreFile = ".svnignore"; - break; } + string emptyModelFileData = Resource1.mda_src_uml_empty_model_xml; + + ////////////////////////////////// // Create/find the common project if (m_configuration["projects.common.create"] == "true") { @@ -129,6 +132,8 @@ WriteFile(basePath + "\\" + m_configuration["projects.common.dir"] + "\\" + ignoreFile, ParseVariables(Resource1.common_cvsignore)); } + + ////////////////////////////////// // Create/find the core project if (m_configuration["projects.core.create"] == "true") { @@ -150,6 +155,7 @@ } + ////////////////////////////////// // Create the schema export project if (m_configuration["projects.schemaexport.create"] == "true") { @@ -176,17 +182,45 @@ } } - // Create the web project + + ////////////////////////////////// + // Configure the web project + if (m_configuration["projects.web.configure"] == "true") + { + + ////////////////////////////////// + // Create/find the web project if (m_configuration["projects.web.create"] == "true") { AddToStatus("Creating web project " + m_configuration["projects.web.name"] + "..."); webProject = VSSolutionUtils.AddWebProjectToSolution(m_configuration["projects.web.name"], (Solution2)m_applicationObject.Solution); - VsWebSite.VSWebSite webSite = webProject.Object as VsWebSite.VSWebSite; + } + else + { + AddToStatus("Using existing web project " + m_configuration["projects.web.name"] + "..."); + webProject = VSSolutionUtils.FindProjectByName(m_configuration["projects.web.name"], m_applicationObject.Solution); + } + + // Write the nhibernate.config if required + if (m_configuration["projects.web.usenhibernateconfig"] == "true") + { + WriteFile(webProject.Name + "nhibernate.config", ParseVariables(Resource1.nhibernate_config)); + } + + string webConfigDstFile = webProject.Name + "Web.config"; + if (System.IO.File.Exists(webConfigDstFile)) + { + // Update existing web.config file + System.Configuration.Configuration webconfig = OpenWebConfig(webConfigDstFile); + config.AppSettings.Settings["nhibernate.config"].Value = "~/nhibernate.config"; + } + else + { + // Render web.config file string webconfig; if (m_configuration["projects.web.usenhibernateconfig"] == "true") { - WriteFile(basePath + "\\" + m_configuration["projects.web.dir"] + "\\nhibernate.config", ParseVariables(Resource1.nhibernate_config)); webconfig = Resource1.web_web_config; } else @@ -194,22 +228,100 @@ webconfig = Resource1.web_web_config_nhibernate; } - WriteFile(basePath + "\\" + m_configuration["projects.web.dir"] + "\\Web.config", ParseVariables(webconfig)); - webProject.ProjectItems.AddFromFile(basePath + "\\" + m_configuration["projects.web.dir"] + "\\Web.config"); + WriteFile(webConfigDstFile, ParseVariables(webconfig)); + webProject.ProjectItems.AddFromFile(webConfigDstFile); + } + + //Configuration webconfig = WebConfigurationManager.OpenWebConfiguration(webConfigDstFile); - // TODO: Render Global.asax (if applicable) // Write Web/cvsignore and Web\Bin\cvsignore if (versionControl) { - WriteFile(basePath + "\\" + m_configuration["projects.web.dir"] + "\\" + ignoreFile, ParseVariables(Resource1.web_cvsignore)); - CreateDirectory(basePath + "\\" + m_configuration["projects.web.dir"] + "\\Bin"); - WriteFile(basePath + "\\" + m_configuration["projects.web.dir"] + "\\Bin\\" + ignoreFile, ParseVariables(Resource1.web_bin_cvsignore)); + WriteFile(webProject.Name + ignoreFile, ParseVariables(Resource1.web_cvsignore)); + CreateDirectory(webProject.Name + "Bin"); + WriteFile(webProject.Name + "Bin\\" + ignoreFile, ParseVariables(Resource1.web_bin_cvsignore)); + } + + + if (m_configuration["projects.web.common.configure"] == "true") + { + // Create/find the core project + if (m_configuration["projects.web.common.create"] == "true") + { + AddToStatus("Creating web common project " + m_configuration["projects.web.common.name"] + "..."); + webCommonProject = VSSolutionUtils.AddClassLibraryProjectToSolution(m_configuration["projects.web.common.name"], (Solution2)m_applicationObject.Solution); + } + else + { + AddToStatus("Using existing web common project " + m_configuration["projects.web.common.name"] + "..."); + webCommonProject = VSSolutionUtils.FindProjectByName(m_configuration["projects.web.common.name"], m_applicationObject.Solution); } + } + + // Get the web site object + VsWebSite.VSWebSite webSite = webProject.Object as VsWebSite.VSWebSite; + // Refresh folder view webSite.Refresh(); + // Add Membership support + if (m_configuration["projects.web.addmembership"] == "true") + { + AddToStatus("Adding membership support..."); + + string file; + ProjectItem membershipFolder = webCommonProject.ProjectItems.AddFolder("Membership", Constants.vsProjectItemKindPhysicalFolder); + + // Render DomainMembershipProvider.cs + file = basePath + "\\" + m_configuration["projects.web.common.dir"] + "\\Membership\\DomainMembershipProvider.cs"; + WriteFile(file, ParseVariables(Resource1.Membership_DomainMembershipProvider_cs)); + membershipFolder.ProjectItems.AddFromFile(file); + + // Render DomainRoleProvider.cs + file = basePath + "\\" + m_configuration["projects.web.common.dir"] + "\\Membership\\DomainRoleProvider.cs"; + WriteFile(file, ParseVariables(Resource1.Membership_DomainRoleProvider_cs)); + membershipFolder.ProjectItems.AddFromFile(file); + + // Render DomainMembershipUser.cs + file = basePath + "\\" + m_configuration["projects.web.common.dir"] + "\\Membership\\DomainMembershipUser.cs"; + WriteFile(file, ParseVariables(Resource1.Membership_DomainMembershipUser_cs)); + membershipFolder.ProjectItems.AddFromFile(file); + + // Create core/src/* folder tree from namespace + string solutionName = m_configuration["solution.name"]; + string[] namespaces = solutionName.Split('.'); + file = basePath + "\\" + m_configuration["projects.core.dir"] + "\\src\\"; + foreach (string folder in namespaces) + { + file = file + folder; + CreateDirectory(file); + file = file + "\\"; + } + CreateDirectory(file + "Domain"); + CreateDirectory(file + "Service"); + + // Render UserDaoImpl.cs + WriteFile(file + "Domain\\UserDaoImpl.cs", ParseVariables(Resource1.Membership_UserDaoImpl_cs)); + coreProject.ProjectItems.AddFromFile(file + "Domain\\UserDaoImpl.cs"); + + // Render MembershipServiceImpl.cs + WriteFile(file + "Service\\MembershipServiceImpl.cs", ParseVariables(Resource1.Membership_MembershipServiceImpl_cs)); + coreProject.ProjectItems.AddFromFile(file + "Service\\MembershipServiceImpl.cs"); + + // Add membership to web.config + System.Configuration.Configuration webconfig = OpenWebConfig(webConfigDstFile); + + ConfigurationSectionGroup systemweb = webconfig.SectionGroups["system.web"]; + systemweb.Sections["membership"].SectionInformation.SetRawXml(ParseVariables(Resource1.web_web_config_membershipsection)); + systemweb.Sections["roleManager"].SectionInformation.SetRawXml(ParseVariables(Resource1.web_web_config_rolesection)); + systemweb.Sections["membership"].SectionInformation.ForceSave = true; + systemweb.Sections["roleManager"].SectionInformation.ForceSave = true; + webconfig.Save(); + } + + } AddToStatus("Creating AndroMDA configuration files..."); @@ -258,8 +370,16 @@ System.IO.Directory.CreateDirectory(basePath + "\\mda\\src"); // Create mda/uml directory System.IO.Directory.CreateDirectory(basePath + "\\mda\\src\\uml"); + + string modelPackageXML = "<UML:Model xmi.id='_9_5_1_874026a_1149883877463_480535_0' name='" + m_configuration["solution.name"] + "'><UML:Namespace.ownedElement>"; + string xmiIdBase = "_9_5_1_874026a_" + DateTime.Now.Ticks.ToString(); + modelPackageXML += GetXMI(m_configuration["solution.name"].Split('.'), xmiIdBase); + modelPackageXML += "</UML:Namespace.ownedElement></UML:Model>"; + + emptyModelFileData = emptyModelFileData.Replace("${wizard.model.packagestructure.xml}", modelPackageXML); + // Create the empty model file - WriteCompressedFile(m_configuration["application.model.filename.unzipped"], basePath + "\\mda\\src\\uml\\" + m_configuration["application.model.filename"], Resource1.mda_src_uml_empty_model_xml); + WriteCompressedFile(m_configuration["application.model.filename.unzipped"], basePath + "\\mda\\src\\uml\\" + m_configuration["application.model.filename"], emptyModelFileData); // Create the lib directory CreateDirectory(basePath + "\\Lib"); @@ -307,12 +427,51 @@ proj.References.AddFromProject(commonProject); proj.References.AddFromProject(coreProject); + if (webCommonProject != null) + { + proj.References.AddFromProject(webCommonProject); + } + } + + if (webCommonProject != null) + { + AddToStatus("Adding project references to web common project..."); + VSProject proj = webCommonProject.Object as VSProject; + proj.References.AddProject(commonProject); + proj.References.AddProject(coreProject); + proj.References.Add("System.Configuration"); + proj.References.Add("System.Web"); } } #region Helper methods + private string GetXMI(string[] namespaces, string xmlIdBase) + { + return GetXMI(namespaces, xmlIdBase, 0); + } + + private string GetXMI(string[] namespaces, string xmlIdBase, int index) + { + string name = namespaces[index]; + if (index == namespaces.Length - 1) + { + if (m_configuration["projects.web.addmembership"] == "true") + { + return "<UML:Package xmi.id='" + xmlIdBase + "_" + index + "' name='" + name + "'><UML:Namespace.ownedElement>\n" + Resource1.mda_src_uml_empty_model_membership_xml + "\n</UML:Namespace.ownedElement></UML:Package>"; + } + else + { + return "<UML:Package xmi.id='" + xmlIdBase + "_" + index + "' name='" + name + "'/>"; + } + } + else + { + return "<UML:Package xmi.id='" + xmlIdBase + "_" + index + "' name='" + name + "'><UML:Namespace.ownedElement>" + GetXMI(namespaces, xmlIdBase, index + 1) + "</UML:Namespace.ownedElement></UML:Package>"; + } + } + /// <summary> /// Adds a line of text to the status window /// </summary> @@ -435,19 +594,19 @@ zip.SetLevel(6); System.Text.ASCIIEncoding encoding = new System.Text.ASCIIEncoding(); - byte[] modelData = encoding.GetBytes(Resource1.mda_src_uml_empty_model_xml); + byte[] fileData = encoding.GetBytes(fileContent); ZipEntry entry = new ZipEntry(fileNameInZip); entry.DateTime = DateTime.Now; - entry.Size = modelData.Length; + entry.Size = fileData.Length; Crc32 crc = new Crc32(); crc.Reset(); - crc.Update(modelData); + crc.Update(fileData); entry.Crc = crc.Value; zip.PutNextEntry(entry); - zip.Write(modelData, 0, modelData.Length); + zip.Write(fileData, 0, fileData.Length); zip.Finish(); zip.Close(); @@ -473,6 +632,23 @@ fs.Close(); } + private System.Configuration.Configuration OpenWebConfig(string path) + { + string filename = FileUtils.GetFilename(path); + path = FileUtils.GetPathFromFilename(path); + + string currentDirectory = System.IO.Directory.GetCurrentDirectory(); + System.IO.Directory.SetCurrentDirectory(path); + + ExeConfigurationFileMap map = new ExeConfigurationFileMap(); + map.ExeConfigFilename = filename; + System.Configuration.Configuration config = System.Configuration.ConfigurationManager.OpenMappedExeConfiguration(map, ConfigurationUserLevel.None); + + System.IO.Directory.SetCurrentDirectory(currentDirectory); + + return config; + } + #endregion } 1.7 +7 -0 plugins/etc/andromda-dotnet/AndroMDA.VS80AddIn/AndroMDA.VS80AddIn/Commands/AddInCommandBase.cs Index: AddInCommandBase.cs =================================================================== RCS file: /cvsroot/andromdaplugins/plugins/etc/andromda-dotnet/AndroMDA.VS80AddIn/AndroMDA.VS80AddIn/Commands/AddInCommandBase.cs,v retrieving revision 1.6 retrieving revision 1.7 diff -u -w -r1.6 -r1.7 --- AddInCommandBase.cs 30 May 2006 17:36:21 -0000 1.6 +++ AddInCommandBase.cs 9 Jun 2006 22:27:23 -0000 1.7 @@ -135,6 +135,13 @@ { _CommandBars cmdBars = (_CommandBars)m_application.CommandBars; CommandBar cmdBar = cmdBars["Code Window"]; + foreach(CommandBarControl c in cmdBar.Controls) + { + if (c.Caption == m_buttonText) + { + return; + } + } m_command.AddControl(cmdBar, 1); } } 1.6 +6 -27 plugins/etc/andromda-dotnet/AndroMDA.VS80AddIn/AndroMDA.VS80AddIn/Dialogs/AboutOptionsPage.cs Index: AboutOptionsPage.cs =================================================================== RCS file: /cvsroot/andromdaplugins/plugins/etc/andromda-dotnet/AndroMDA.VS80AddIn/AndroMDA.VS80AddIn/Dialogs/AboutOptionsPage.cs,v retrieving revision 1.5 retrieving revision 1.6 diff -u -w -r1.5 -r1.6 --- AboutOptionsPage.cs 4 Jun 2006 02:06:01 -0000 1.5 +++ AboutOptionsPage.cs 9 Jun 2006 22:27:23 -0000 1.6 @@ -38,7 +38,7 @@ { set { - InsertListViewItem(listViewStatus, "Solution Is Using MDA", value, "AndroMDA"); + AddInUtils.InsertListViewItem(listViewStatus, "Solution Is Using MDA", value, "AndroMDA"); } } @@ -46,7 +46,7 @@ { set { - InsertListViewItem(listViewStatus, "Model File", value, "AndroMDA"); + AddInUtils.InsertListViewItem(listViewStatus, "Model File", value, "AndroMDA"); } } @@ -54,7 +54,7 @@ { set { - InsertListViewItem(listViewStatus, "Last Generated", value, "AndroMDA"); + AddInUtils.InsertListViewItem(listViewStatus, "Last Generated", value, "AndroMDA"); } } @@ -62,7 +62,7 @@ { set { - InsertListViewItem(listViewStatus, "Core Project", value, "Projects"); + AddInUtils.InsertListViewItem(listViewStatus, "Core Project", value, "Projects"); } } @@ -70,7 +70,7 @@ { set { - InsertListViewItem(listViewStatus, "Common Project", value, "Projects"); + AddInUtils.InsertListViewItem(listViewStatus, "Common Project", value, "Projects"); } } @@ -78,7 +78,7 @@ { set { - InsertListViewItem(listViewStatus, "Schema Export Project", value, "Projects"); + AddInUtils.InsertListViewItem(listViewStatus, "Schema Export Project", value, "Projects"); } } @@ -92,27 +92,6 @@ return lvi; } - private void InsertListViewItem(ListView listView, string name, string value, string groupName) - { - ListViewItem lvi = new ListViewItem(); - lvi.Group = null; - foreach (ListViewGroup group in listView.Groups) - { - if (group.Header == groupName) - { - lvi.Group = group; - } - } - if (lvi.Group == null) - { - lvi.Group = new ListViewGroup(groupName); - listView.Groups.Add(lvi.Group); - } - lvi.Text = name; - lvi.SubItems.Add(new ListViewItem.ListViewSubItem(lvi, value)); - listView.Items.Add(lvi); - } - public void Reset() { listViewStatus.Items.Clear(); 1.3 +48 -2 plugins/etc/andromda-dotnet/AndroMDA.VS80AddIn/AndroMDA.VS80AddIn/Dialogs/MDAProjectSetupControl.cs Index: MDAProjectSetupControl.cs =================================================================== RCS file: /cvsroot/andromdaplugins/plugins/etc/andromda-dotnet/AndroMDA.VS80AddIn/AndroMDA.VS80AddIn/Dialogs/MDAProjectSetupControl.cs,v retrieving revision 1.2 retrieving revision 1.3 diff -u -w -r1.2 -r1.3 --- MDAProjectSetupControl.cs 27 May 2006 22:31:46 -0000 1.2 +++ MDAProjectSetupControl.cs 9 Jun 2006 22:27:23 -0000 1.3 @@ -5,7 +5,7 @@ #region Using statements using System; -using System.Collections.Generic; +using System.Collections; using System.ComponentModel; using System.Drawing; using System.Data; @@ -13,6 +13,7 @@ using System.Windows.Forms; using EnvDTE; +using VSLangProj; #endregion @@ -47,6 +48,45 @@ set { lblDescription.Text = value; } } */ + + private bool m_webProjectMode = false; + + [Category("Behavior")] + [LocalizableAttribute(true)] + [BindableAttribute(true)] + [DefaultValue(false)] + public bool WebProjectMode + { + get { return m_webProjectMode; } + set + { + /* + rbDontAddSupport.Enabled = rbDontAddSupport.Visible = value; + int baseY = value ? 23 : 0; + rbCreate.Top = baseY + 0; + txtNewProject.Top = baseY + 20; + rbExisting.Top = baseY + 45; + ddlExistingProject.Top = baseY + 66; + */ + m_webProjectMode = value; + if (m_webProjectMode) + { + rbExisting.Text = "Use existing web site"; + rbCreate.Text = "Create new web site"; + } + else + { + rbExisting.Text = "Use existing project"; + rbCreate.Text = "Create new project"; + } + } + } + + public bool DontAddSupport + { + get { return rbDontAddSupport.Checked; } + } + public bool CreateNewProject { get { return rbCreate.Checked; } @@ -87,8 +127,14 @@ ddlExistingProject.Items.Clear(); foreach (Project p in applicationObject.Solution.Projects) { + if ( + (m_webProjectMode && p.Kind == "{E24C65DC-7377-472b-9ABA-BC803B73C61A}") || + (!m_webProjectMode && p.Kind != "{E24C65DC-7377-472b-9ABA-BC803B73C61A}") + ) + { ddlExistingProject.Items.Add(p.Name); } + } if (ddlExistingProject.Items.Count > 0) { ddlExistingProject.SelectedIndex = 0; 1.3 +31 -13 plugins/etc/andromda-dotnet/AndroMDA.VS80AddIn/AndroMDA.VS80AddIn/Dialogs/MDAProjectSetupControl.designer.cs Index: MDAProjectSetupControl.designer.cs =================================================================== RCS file: /cvsroot/andromdaplugins/plugins/etc/andromda-dotnet/AndroMDA.VS80AddIn/AndroMDA.VS80AddIn/Dialogs/MDAProjectSetupControl.designer.cs,v retrieving revision 1.2 retrieving revision 1.3 diff -u -w -r1.2 -r1.3 --- MDAProjectSetupControl.designer.cs 27 May 2006 22:31:46 -0000 1.2 +++ MDAProjectSetupControl.designer.cs 9 Jun 2006 22:27:23 -0000 1.3 @@ -32,6 +32,7 @@ this.txtNewProject = new System.Windows.Forms.TextBox(); this.rbExisting = new System.Windows.Forms.RadioButton(); this.rbCreate = new System.Windows.Forms.RadioButton(); + this.rbDontAddSupport = new System.Windows.Forms.RadioButton(); this.SuspendLayout(); // // ddlExistingProject @@ -39,26 +40,26 @@ this.ddlExistingProject.DropDownStyle = System.Windows.Forms.ComboBoxStyle.DropDownList; this.ddlExistingProject.Enabled = false; this.ddlExistingProject.FormattingEnabled = true; - this.ddlExistingProject.Location = new System.Drawing.Point(18, 66); + this.ddlExistingProject.Location = new System.Drawing.Point(18, 72); this.ddlExistingProject.Name = "ddlExistingProject"; - this.ddlExistingProject.Size = new System.Drawing.Size(320, 21); - this.ddlExistingProject.TabIndex = 6; + this.ddlExistingProject.Size = new System.Drawing.Size(394, 21); + this.ddlExistingProject.TabIndex = 16; // // txtNewProject // - this.txtNewProject.Location = new System.Drawing.Point(18, 20); + this.txtNewProject.Location = new System.Drawing.Point(18, 23); this.txtNewProject.Name = "txtNewProject"; - this.txtNewProject.Size = new System.Drawing.Size(320, 20); - this.txtNewProject.TabIndex = 4; + this.txtNewProject.Size = new System.Drawing.Size(394, 20); + this.txtNewProject.TabIndex = 13; // // rbExisting // this.rbExisting.AutoSize = true; this.rbExisting.Font = new System.Drawing.Font("Tahoma", 8.25F, System.Drawing.FontStyle.Bold); - this.rbExisting.Location = new System.Drawing.Point(0, 45); + this.rbExisting.Location = new System.Drawing.Point(0, 49); this.rbExisting.Name = "rbExisting"; this.rbExisting.Size = new System.Drawing.Size(138, 17); - this.rbExisting.TabIndex = 5; + this.rbExisting.TabIndex = 15; this.rbExisting.Text = "Use existing project"; this.rbExisting.UseVisualStyleBackColor = true; this.rbExisting.CheckedChanged += new System.EventHandler(this.checkChanged); @@ -71,12 +72,25 @@ this.rbCreate.Location = new System.Drawing.Point(0, 0); this.rbCreate.Name = "rbCreate"; this.rbCreate.Size = new System.Drawing.Size(133, 17); - this.rbCreate.TabIndex = 3; + this.rbCreate.TabIndex = 12; this.rbCreate.TabStop = true; this.rbCreate.Text = "Create new project"; this.rbCreate.UseVisualStyleBackColor = true; this.rbCreate.CheckedChanged += new System.EventHandler(this.checkChanged); // + // rbDontAddSupport + // + this.rbDontAddSupport.AutoSize = true; + this.rbDontAddSupport.Enabled = false; + this.rbDontAddSupport.Font = new System.Drawing.Font("Tahoma", 8.25F, System.Drawing.FontStyle.Bold); + this.rbDontAddSupport.Location = new System.Drawing.Point(0, 0); + this.rbDontAddSupport.Name = "rbDontAddSupport"; + this.rbDontAddSupport.Size = new System.Drawing.Size(203, 17); + this.rbDontAddSupport.TabIndex = 14; + this.rbDontAddSupport.Text = "Do not add web project support"; + this.rbDontAddSupport.UseVisualStyleBackColor = true; + this.rbDontAddSupport.Visible = false; + // // MDAProjectSetupControl // this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F); @@ -85,8 +99,9 @@ this.Controls.Add(this.txtNewProject); this.Controls.Add(this.rbExisting); this.Controls.Add(this.rbCreate); + this.Controls.Add(this.rbDontAddSupport); this.Name = "MDAProjectSetupControl"; - this.Size = new System.Drawing.Size(369, 99); + this.Size = new System.Drawing.Size(434, 138); this.ResumeLayout(false); this.PerformLayout(); @@ -98,5 +113,8 @@ private System.Windows.Forms.TextBox txtNewProject; private System.Windows.Forms.RadioButton rbExisting; private System.Windows.Forms.RadioButton rbCreate; + private System.Windows.Forms.RadioButton rbDontAddSupport; + + } } 1.8 +92 -35 plugins/etc/andromda-dotnet/AndroMDA.VS80AddIn/AndroMDA.VS80AddIn/Dialogs/MDASolutionWizard.cs Index: MDASolutionWizard.cs =================================================================== RCS file: /cvsroot/andromdaplugins/plugins/etc/andromda-dotnet/AndroMDA.VS80AddIn/AndroMDA.VS80AddIn/Dialogs/MDASolutionWizard.cs,v retrieving revision 1.7 retrieving revision 1.8 diff -u -w -r1.7 -r1.8 --- MDASolutionWizard.cs 29 May 2006 14:56:12 -0000 1.7 +++ MDASolutionWizard.cs 9 Jun 2006 22:27:23 -0000 1.8 @@ -75,11 +75,13 @@ usrCommonProject.ProjectName = solutionName + ".Common"; usrCoreProject.ProjectName = solutionName + ".Core"; txtSchemaExportProject.Text = solutionName + ".SchemaExport"; - txtWebProject.Text = solutionName + ".Web"; + usrWebProject.ProjectName = solutionName + ".Web"; + usrWebCommonProject.ProjectName = solutionName + ".Web.Common"; cbCreateSchemaExport.Checked = true; - cbCreateWebProject.Checked = false; - rbNHibernateConfig.Enabled = cbCreateWebProject.Checked; - rbWebConfig.Enabled = cbCreateWebProject.Checked; + cbConfigureWebProject.Checked = true; + cbConfigureWebProject.Checked = false; + cbConfigureWebCommonProject.Checked = true; + cbConfigureWebCommonProject.Checked = false; // Give the wizard a reference to this form so it can // set this.AcceptButton to the Next button @@ -99,9 +101,31 @@ private void cbCreateWebProject_CheckedChanged(object sender, EventArgs e) { - txtWebProject.Enabled = cbCreateWebProject.Checked; - rbNHibernateConfig.Enabled = cbCreateWebProject.Checked; - rbWebConfig.Enabled = cbCreateWebProject.Checked; + //txtWebProject.Enabled = cbCreateWebProject.Checked; + //rbNHibernateConfig.Enabled = cbCreateWebProject.Checked; + //rbWebConfig.Enabled = cbCreateWebProject.Checked; + } + + private void cbAddWebProjectSupport_CheckedChanged(object sender, EventArgs e) + { + usrWebProject.Enabled = cbConfigureWebProject.Checked; + rbNHibernateConfig.Enabled = cbConfigureWebProject.Checked; + rbWebConfig.Enabled = cbConfigureWebProject.Checked; + cbAddMembershipSupport.Enabled = cbConfigureWebProject.Checked; + lblAddMembershipSupportText.Enabled = cbConfigureWebProject.Checked; + } + + private void cbEnableWebCommonProject_CheckedChanged(object sender, EventArgs e) + { + usrWebCommonProject.Enabled = cbConfigureWebCommonProject.Checked; + } + + private void cbAddMembershipSupport_CheckedChanged(object sender, EventArgs e) + { + lblMembershipSelected.Visible = cbAddMembershipSupport.Checked; + lblMembershipSelectedImage.Visible = cbAddMembershipSupport.Checked; + cbConfigureWebCommonProject.Checked = cbAddMembershipSupport.Checked; + cbConfigureWebCommonProject.Enabled = !cbAddMembershipSupport.Checked; } /// <summary> @@ -111,30 +135,32 @@ /// <param name="e">The <see cref="T:System.EventArgs"/> instance containing the event data.</param> private void wizardPageConfirmChoices_ShowFromNext(object sender, EventArgs e) { - lblApplicationName.Text = txtApplicationName.Text; - lblDatabaseType.Text = ddlDatabaseType.SelectedItem.ToString(); - lblCommonProject.Text = usrCommonProject.ProjectName; - lblCoreProject.Text = usrCoreProject.ProjectName; + lstChoiceOverview.Items.Clear(); + AddInUtils.InsertListViewItem(lstChoiceOverview, "Application Name", txtApplicationName.Text, "General Settings"); + AddInUtils.InsertListViewItem(lstChoiceOverview, "Database Type", ddlDatabaseType.SelectedItem.ToString(), "General Settings"); + AddInUtils.InsertListViewItem(lstChoiceOverview, "Common Project", usrCommonProject.ProjectName, "Project Settings"); + AddInUtils.InsertListViewItem(lstChoiceOverview, "Core Project", usrCoreProject.ProjectName, "Project Settings"); + + AddInUtils.InsertListViewItem(lstChoiceOverview, "Generate Schema Export Project", cbCreateSchemaExport.Checked ? "Yes" : "No", "Project Settings"); if (cbCreateSchemaExport.Checked) { - lblGenerateSchemaExportProject.Text = "Yes"; - lblSchemaExportProject.Text = txtSchemaExportProject.Text; + AddInUtils.InsertListViewItem(lstChoiceOverview, "Schema Export Project", txtSchemaExportProject.Text, "Project Settings"); } - else + + AddInUtils.InsertListViewItem(lstChoiceOverview, "Configure Web Project", cbConfigureWebProject.Checked ? "Yes" : "No", "Web Settings"); + AddInUtils.InsertListViewItem(lstChoiceOverview, "Configure Web Common Project", cbConfigureWebCommonProject.Checked ? "Yes" : "No", "Web Settings"); + if (cbConfigureWebProject.Checked) { - lblGenerateSchemaExportProject.Text = "No"; - lblSchemaExportProject.Text = "n/a"; - } - if (cbCreateWebProject.Checked) + AddInUtils.InsertListViewItem(lstChoiceOverview, "Web Project", usrWebProject.ProjectName, "Web Settings"); + if (cbConfigureWebCommonProject.Checked) { - lblGenerateWebProject.Text = "Yes"; - lblWebProject.Text = txtWebProject.Text; + AddInUtils.InsertListViewItem(lstChoiceOverview, "Web Common Project", usrWebCommonProject.ProjectName, "Web Settings"); } - else - { - lblGenerateWebProject.Text = "No"; - lblWebProject.Text = "n/a"; + AddInUtils.InsertListViewItem(lstChoiceOverview, "NHibernate Configuration", rbNHibernateConfig.Checked ? "Stored in nhibernate.config" : "Stored in web.config", "Web Settings"); + AddInUtils.InsertListViewItem(lstChoiceOverview, "Membership Support", cbAddMembershipSupport.Checked ? "Yes" : "No", "Web Settings"); } + + } /// <summary> @@ -270,9 +296,9 @@ private void wizardPageWebProject_CloseFromNext(object sender, Gui.Wizard.PageEventArgs e) { bool v1 = true; - if (cbCreateWebProject.Checked) + if (cbConfigureWebProject.Checked) { - v1 = ValidationUtils.ValidateRequiredTextBox(txtWebProject); + v1 = usrWebProject.ValidateControl(); } bool pageValid = v1; if (!pageValid) @@ -288,16 +314,40 @@ /// <param name="e">The <see cref="T:System.EventArgs"/> instance containing the event data.</param> private void wizardPageWebProject_ShowFromNext(object sender, EventArgs e) { - if (cbCreateWebProject.Checked) + usrWebProject.OnEnter(sender, e, m_applicationObject); + if (cbConfigureWebProject.Checked == false) + { + cbConfigureWebProject.Focus(); + } + } + + + private void wizardPageWebCommonProject_CloseFromNext(object sender, Gui.Wizard.PageEventArgs e) + { + } + + private void wizardPageWebCommonProject_ShowFromBack(object sender, EventArgs e) + { + if (cbConfigureWebProject.Checked) { - txtWebProject.Focus(); } else { - cbCreateWebProject.Focus(); + wizard1.Back(); } } + private void wizardPageWebCommonProject_ShowFromNext(object sender, EventArgs e) + { + if (cbConfigureWebProject.Checked) + { + usrWebCommonProject.OnEnter(sender, e, m_applicationObject); + } + else + { + wizard1.Next(); + } + } /// <summary> /// Handles the ShowFromNext event of the wizardPageSolutionInfo control. @@ -344,10 +394,17 @@ config["projects.schemaexport.dir"] = txtSchemaExportProject.Text; config["projects.schemaexport.create"] = cbCreateSchemaExport.Checked ? "true" : "false"; - config["projects.web.name"] = txtWebProject.Text; - config["projects.web.dir"] = txtWebProject.Text; - config["projects.web.create"] = cbCreateWebProject.Checked ? "true" : "false"; + config["projects.web.configure"] = cbConfigureWebProject.Checked ? "true" : "false"; + config["projects.web.name"] = usrWebProject.ProjectName; + config["projects.web.dir"] = usrWebProject.ProjectName; + config["projects.web.create"] = usrWebProject.CreateNewProject ? "true" : "false"; config["projects.web.usenhibernateconfig"] = rbNHibernateConfig.Checked ? "true" : "false"; + config["projects.web.addmembership"] = cbAddMembershipSupport.Checked ? "true" : "false"; + + config["projects.web.common.configure"] = cbConfigureWebCommonProject.Checked ? "true" : "false"; + config["projects.web.common.name"] = usrWebCommonProject.ProjectName; + config["projects.web.common.dir"] = usrWebCommonProject.ProjectName; + config["projects.web.common.create"] = cbConfigureWebCommonProject.Checked ? "true" : "false"; config["database.name"] = txtApplicationName.Text.Replace(" ", string.Empty).Replace(".", string.Empty); 1.6 +390 -416 plugins/etc/andromda-dotnet/AndroMDA.VS80AddIn/AndroMDA.VS80AddIn/Dialogs/MDASolutionWizard.designer.cs Index: MDASolutionWizard.designer.cs =================================================================== RCS file: /cvsroot/andromdaplugins/plugins/etc/andromda-dotnet/AndroMDA.VS80AddIn/AndroMDA.VS80AddIn/Dialogs/MDASolutionWizard.designer.cs,v retrieving revision 1.5 retrieving revision 1.6 diff -u -w -r1.5 -r1.6 --- MDASolutionWizard.designer.cs 29 May 2006 14:56:12 -0000 1.5 +++ MDASolutionWizard.designer.cs 9 Jun 2006 22:27:23 -0000 1.6 @@ -33,40 +33,24 @@ this.imageList1 = new System.Windows.Forms.ImageList(this.components); this.wizard1 = new Gui.Wizard.Wizard(); this.wizardPageConfirmChoices = new Gui.Wizard.WizardPage(); - this.lblWebProject = new System.Windows.Forms.Label(); - this.lblSchemaExportProject = new System.Windows.Forms.Label(); - this.lblGenerateWebProject = new System.Windows.Forms.Label(); - this.lblGenerateSchemaExportProject = new System.Windows.Forms.Label(); - this.lblDatabaseType = new System.Windows.Forms.Label(); - this.lblCoreProject = new System.Windows.Forms.Label(); - this.lblApplicationName = new System.Windows.Forms.Label(); - this.lblCommonProject = new System.Windows.Forms.Label(); - this.label20 = new System.Windows.Forms.Label(); - this.label6 = new System.Windows.Forms.Label(); - this.label18 = new System.Windows.Forms.Label(); - this.label19 = new System.Windows.Forms.Label(); - this.label5 = new System.Windows.Forms.Label(); - this.label15 = new System.Windows.Forms.Label(); - this.label4 = new System.Windows.Forms.Label(); - this.label3 = new System.Windows.Forms.Label(); + this.lstChoiceOverview = new System.Windows.Forms.ListView(); + this.columnHeader1 = new System.Windows.Forms.ColumnHeader(); + this.columnHeader2 = new System.Windows.Forms.ColumnHeader(); this.header4 = new Gui.Wizard.Header(); + this.wizardPageWebCommonProject = new Gui.Wizard.WizardPage(); + this.lblMembershipSelectedImage = new System.Windows.Forms.Label(); + this.lblMembershipSelected = new System.Windows.Forms.Label(); + this.cbConfigureWebCommonProject = new System.Windows.Forms.CheckBox(); + this.usrWebCommonProject = new AndroMDA.VS80AddIn.Dialogs.MDAProjectSetupControl(); + this.header8 = new Gui.Wizard.Header(); this.wizardPageWebProject = new Gui.Wizard.WizardPage(); + this.cbConfigureWebProject = new System.Windows.Forms.CheckBox(); + this.usrWebProject = new AndroMDA.VS80AddIn.Dialogs.MDAProjectSetupControl(); + this.lblAddMembershipSupportText = new System.Windows.Forms.Label(); this.rbWebConfig = new System.Windows.Forms.RadioButton(); this.rbNHibernateConfig = new System.Windows.Forms.RadioButton(); - this.cbCreateWebProject = new System.Windows.Forms.CheckBox(); - this.txtWebProject = new System.Windows.Forms.TextBox(); + this.cbAddMembershipSupport = new System.Windows.Forms.CheckBox(); this.header7 = new Gui.Wizard.Header(); - this.wizardPageProcessing = new Gui.Wizard.WizardPage(); - this.lstStatus = new System.Windows.Forms.ListBox(); - this.label7 = new System.Windows.Forms.Label(); - this.header5 = new Gui.Wizard.Header(); - this.pictureBoxThrobber = new System.Windows.Forms.PictureBox(); - this.wizardPageComplete = new Gui.Wizard.WizardPage(); - this.lblFinishPageTitle = new System.Windows.Forms.Label(); - this.pictureBoxComplete = new System.Windows.Forms.PictureBox(); - this.lblFinishPageDescription = new System.Windows.Forms.Label(); - this.lblFinishPageTitleImage = new System.Windows.Forms.Label(); - this.txtErrorMessage = new System.Windows.Forms.TextBox(); this.wizardPageSchemaExportProject = new Gui.Wizard.WizardPage(); this.cbCreateSchemaExport = new System.Windows.Forms.CheckBox(); this.txtSchemaExportProject = new System.Windows.Forms.TextBox(); @@ -87,23 +71,37 @@ this.label12 = new System.Windows.Forms.Label(); this.header6 = new Gui.Wizard.Header(); this.wizardPageWelcome = new Gui.Wizard.WizardPage(); + this.groupBox1 = new System.Windows.Forms.GroupBox(); this.label9 = new System.Windows.Forms.Label(); + this.label2 = new System.Windows.Forms.Label(); this.label8 = new System.Windows.Forms.Label(); this.pictureBoxWelcome = new System.Windows.Forms.PictureBox(); + this.wizardPageComplete = new Gui.Wizard.WizardPage(); + this.lblFinishPageTitle = new System.Windows.Forms.Label(); + this.pictureBoxComplete = new System.Windows.Forms.PictureBox(); + this.lblFinishPageDescription = new System.Windows.Forms.Label(); + this.lblFinishPageTitleImage = new System.Windows.Forms.Label(); + this.txtErrorMessage = new System.Windows.Forms.TextBox(); + this.wizardPageProcessing = new Gui.Wizard.WizardPage(); + this.lstStatus = new System.Windows.Forms.ListBox(); + this.label7 = new System.Windows.Forms.Label(); + this.... [truncated message content] |