private void CheckForLatestVersion() { UpdaterPath = EmbeddedResourceHelper.GetEmbeddedResourcePath( "YTMusicUploader.Updater.exe", "Embedded", EmbeddedResourceHelper.TargetAssemblyType.Executing, false); if (VersionHelper.LatestVersionGreaterThanCurrentVersion(out string htmlUrl, out string latestVersion)) { Logger.DontLogToSourdceCauseEarlierVersion = true; LatestVersionUrl = htmlUrl; LatestVersionTag = latestVersion; SetVersionWarningVisible(true); NewVersionTooltip.SetToolTip(pbUpdate, "\nVersion " + LatestVersionTag + " available.\nClick for details."); Logger.LogInfo("CheckForLatestVersion", "Newer software version detected"); } else { Logger.DontLogToSourdceCauseEarlierVersion = false; LatestVersionUrl = null; LatestVersionTag = null; SetVersionWarningVisible(false); } }
/// <summary> /// Produce ASCII art text. Use a range of FIGlet fonts easily set via enum list. /// </summary> /// <param name="font">FIGlet Font enum</param> public static void WriteAsciiArt(FigFontEnum font, Color color, string text) { string fontPath = EmbeddedResourceHelper.GetEmbeddedResourcePath( font.ToString() + ".flf", "Dependencies_Embedded.FIGLetFonts", EmbeddedResourceHelper.TargetAssemblyType.Executing, true); var figFont = FigletFont.Load(fontPath); var figlet = new Figlet(figFont); Colorful.Console.WriteLine(figlet.ToAscii(text), color); }