Add version to window title

This commit is contained in:
MathiasL 2022-05-27 20:58:50 +02:00
parent 5b7ea37d8e
commit 986762688a
2 changed files with 20 additions and 1 deletions

View file

@ -27,6 +27,22 @@ static class Program
[STAThread]
static void Main(string[] args)
{
var cfg = SteamShared.SourceConfig.SourceCFG.FromFile(@"I:\SteamLibrary\steamapps\common\Counter-Strike Global Offensive\csgo\cfg\autoexec.cfg");
foreach(var command in cfg.Commands)
{
Console.Write(command.CommandName + " ");
command.CommandValues?.ForEach(value => Console.Write(value.Value + " "));
Console.WriteLine();
}
return;
foreach (var game in steamHelper.GetInstalledGames())
{
Console.WriteLine(game.Name);
}
return;
string? gamePath = steamHelper.GetGamePathFromExactName("Counter-Strike: Global Offensive");
if (gamePath == null)
@ -282,7 +298,7 @@ static class Program
ExecuteCommands(false, commands);
}
}
Thread.Sleep(50);
Thread.Sleep(500);
}
}

View file

@ -54,6 +54,9 @@ namespace DamagePrinterGUI
{
InitializeComponent();
Version? ver = System.Reflection.Assembly.GetExecutingAssembly().GetName().Version;
this.Title += $" v{(ver == null ? "???" : ver.ToString())}";
if (!this.ensureConsoleLogAndGamePath())
{
MessageBox.Show("The console log could not be created.\n\nAs a workaround, try to create an autoexec config and adding the line 'con_logfile console.log' to it.", "Unknown setup error", MessageBoxButton.OK, MessageBoxImage.Error);