Exemplo n.º 1
0
        /// <summary>
        /// Gets the build progress tool window caption to be displayed.
        /// </summary>
        /// <returns>The string to be displayed as the tool window caption.</returns>
        private string GetToolWindowCaption()
        {
            var    projectNames = BuildingProjects.Select(x => $"\"{ExtractProjectName(x)}\"").ToList();
            string buildString  = GetBuildTypeString(BuildScope, BuildAction);

            string progressString = string.Empty;

            if (NumberOfProjectsToBeBuilt > 0)
            {
                string projectsString = NumberOfProjectsToBeBuilt.ToString(CultureInfo.CurrentUICulture);
                string completeString = NumberOfProjectsBuilt.ToString(CultureInfo.CurrentUICulture).PadLeft(projectsString.Length);

                progressString = $" {completeString} of {projectsString}";
            }

            return($"{DefaultCaption}{progressString}: {buildString} {string.Join(", ", projectNames)}...");
        }
Exemplo n.º 2
0
        /// <summary>
        /// Gets the build progress tool window caption to be displayed.
        /// </summary>
        /// <returns>The string to be displayed as the tool window caption.</returns>
        private string GetToolWindowCaption()
        {
            var    projectNames = BuildingProjects.Select(x => string.Format("\"{0}\"", ExtractProjectName(x))).ToList();
            string buildString  = GetBuildTypeString(BuildScope, BuildAction);

            string progressString = string.Empty;

            if (NumberOfProjectsToBeBuilt > 0)
            {
                string projectsString = NumberOfProjectsToBeBuilt.ToString(CultureInfo.CurrentUICulture);
                string completeString = NumberOfProjectsBuilt.ToString(CultureInfo.CurrentUICulture).PadLeft(projectsString.Length);

                progressString = string.Format(" {0} of {1}", completeString, projectsString);
            }

            return(string.Format("{0}{1}: {2} {3}...",
                                 DefaultCaption, progressString, buildString, string.Join(", ", projectNames)));
        }
Exemplo n.º 3
0
        /// <summary>
        /// A method called to notify the tool window that an individual project build has begun.
        /// </summary>
        /// <param name="project">The project.</param>
        /// <param name="projectConfig">The project config.</param>
        /// <param name="platform">The platform.</param>
        /// <param name="solutionConfig">The solution config.</param>
        internal void NotifyBuildProjConfigBegin(string project, string projectConfig, string platform, string solutionConfig)
        {
            string projectName = ExtractProjectName(project);
            string buildString = GetBuildTypeString(BuildScope, BuildAction);

            string progressString = string.Empty;

            if (NumberOfProjectsToBeBuilt > 0)
            {
                string projectsString = NumberOfProjectsToBeBuilt.ToString(CultureInfo.CurrentUICulture);
                string completeString = (++NumberOfProjectsBuilt).ToString(CultureInfo.CurrentUICulture).PadLeft(projectsString.Length);

                progressString = string.Format(" {0} of {1}", completeString, projectsString);
            }

            Caption = string.Format("{0}: {1}{2} \"{3}\"...",
                                    DefaultCaption, buildString, progressString, projectName);
            _viewModel.ProgressPercentage = ProgressPercentage;
        }