예제 #1
0
 public RemoveArtifactsForm(Project project, ArtifactContext container, Logger logger)
 {
     this.project = project;
     this.logger  = logger;
     InitializeForm();
     InitializeComponent();
     artifactsListView.View = View.Details;
     artifactContext        = container;
 }
예제 #2
0
        public NPandayImportProjectForm(DTE2 applicationObject, Logger logger)
        {
            this.applicationObject = applicationObject;
            this.logger            = logger;
            InitializeComponent();

            if (applicationObject != null && applicationObject.Solution != null && applicationObject.Solution.FileName != null)
            {
                txtBrowseDotNetSolutionFile.Text = applicationObject.Solution.FileName;
                try
                {
                    string companyId = Registry.LocalMachine.OpenSubKey(@"Software\Microsoft\Windows NT\CurrentVersion").GetValue("RegisteredOrganization", "mycompany").ToString();
                    string groupId   = string.Empty;

                    if (companyId != string.Empty)
                    {
                        groupId = FilterID(ConvertToPascalCase(companyId)) + ".";
                    }

                    groupId         = groupId + FilterID(ConvertToPascalCase(new FileInfo(applicationObject.Solution.FileName).Name.Replace(".sln", "")));
                    txtGroupId.Text = groupId;
                    string scmTag      = string.Empty; //getSCMTag(applicationObject.Solution.FileName);
                    string version     = "1.0-SNAPSHOT";
                    string pomFilePath = applicationObject.Solution.FileName.Substring(0, applicationObject.Solution.FileName.LastIndexOf("\\"));
                    pomFilePath += "\\pom.xml";
                    if (File.Exists(pomFilePath))
                    {
                        XmlDocument doc = new XmlDocument();
                        doc.Load(pomFilePath);
                        System.Xml.XmlNamespaceManager xmlnsManager = new System.Xml.XmlNamespaceManager(doc.NameTable);
                        xmlnsManager.AddNamespace("pom", "http://maven.apache.org/POM/4.0.0");
                        XmlNode node = doc.SelectSingleNode("/pom:project/pom:scm/pom:developerConnection", xmlnsManager);
                        if (node != null)
                        {
                            scmTag = node.InnerText;
                        }
                        node = doc.SelectSingleNode("/pom:project/pom:version", xmlnsManager);
                        if (node != null)
                        {
                            version = node.InnerText;
                        }
                    }

                    if (!string.IsNullOrEmpty(scmTag))
                    {
                        txtSCMTag.Text = scmTag;
                    }

                    txtVersion.Text = version;

                    // TODO: remember this, or have a default
                    useMsDeployCheckBox.Checked = true;
                }
                catch { /*do nothing*/ }
            }
        }
예제 #3
0
 public AddArtifactsForm(Project project, ArtifactContext container, Logger logger, FileInfo pom)
 {
     this.project = project;
     this.logger  = logger;
     InitializeForm();
     InitializeComponent();
     addArtifact.Visible = true;
     localListView.View  = View.Details;
     artifactContext     = container;
     this.pom            = pom;
 }
예제 #4
0
        public NPandaySignAssembly(Project project, ArtifactContext container, Logger logger, FileInfo pom)
        {
            this.project         = project;
            this.logger          = logger;
            this.artifactContext = container;

            InitializeComponent();
            this.pom        = pom;
            this.pomUtility = new PomHelperUtility(pom);

            this.txtBrowseAssemblySignKey.Text = pomUtility.CompilerPluginConfigurationKeyfile;
        }