コード例 #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)}...");
        }
コード例 #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)));
        }