Exemple #1
0
        /* ----------------------------------------------------------------- */
        ///
        /// GetTitle
        ///
        /// <summary>
        /// Gets the title of application.
        /// </summary>
        ///
        /// <param name="src">Facade object.</param>
        /// <param name="path">Target filename.</param>
        ///
        /// <returns>Title of application.</returns>
        ///
        /* ----------------------------------------------------------------- */
        public static string GetTitle(this ProgressFacade src, string path)
        {
            var percentage = (int)(src.Report.Ratio * 100.0);
            var dest       = new StringBuilder();

            _ = dest.Append($"{percentage}%");
            if (path.HasValue())
            {
                _ = dest.Append($" - {Io.Get(path).Name}");
            }
            _ = dest.Append($" - {src.GetType().Assembly.GetTitle()}");
            return(dest.ToString());
        }