diff --git a/RechatTool/Extensions.cs b/RechatTool/Extensions.cs index dd6ce08..85ab449 100644 --- a/RechatTool/Extensions.cs +++ b/RechatTool/Extensions.cs @@ -14,5 +14,9 @@ public static string NullIfEmpty(this string s) { public static long? TryParseInt64(this string s) { return Int64.TryParse(s, out long n) ? n : (long?)null; } + + public static string ToDisplayString(this Version v) { + return $"{v.Major}.{v.Minor}.{v.Revision}"; + } } } diff --git a/RechatTool/Program.cs b/RechatTool/Program.cs index 311869f..d7052a3 100644 --- a/RechatTool/Program.cs +++ b/RechatTool/Program.cs @@ -9,6 +9,8 @@ namespace RechatTool { internal class Program { + public const string Version = "1.1.0.0"; + private static int Main(string[] args) { int iArg = 0; string GetArg(bool optional = false) => @@ -50,6 +52,8 @@ void UpdateProgress(int downloaded, int total) { return 0; } catch (InvalidArgumentException) { + Console.WriteLine($"RechatTool v{new Version(Version).ToDisplayString()}"); + Console.WriteLine(); Console.WriteLine("Modes:"); Console.WriteLine(" -d videoid [path]"); Console.WriteLine(" Downloads chat replay for the specified videoid. If path is not"); diff --git a/RechatTool/Properties/AssemblyInfo.cs b/RechatTool/Properties/AssemblyInfo.cs index bad9db1..4ccac67 100644 --- a/RechatTool/Properties/AssemblyInfo.cs +++ b/RechatTool/Properties/AssemblyInfo.cs @@ -1,5 +1,6 @@ using System.Reflection; using System.Runtime.InteropServices; +using RechatTool; // General Information about an assembly is controlled through the following // set of attributes. Change these attribute values to modify the information @@ -31,5 +32,5 @@ // You can specify all the values or you can default the Build and Revision Numbers // by using the '*' as shown below: // [assembly: AssemblyVersion("1.0.*")] -[assembly: AssemblyVersion("1.0.0.0")] -[assembly: AssemblyFileVersion("1.0.0.0")] +[assembly: AssemblyVersion(Program.Version)] +[assembly: AssemblyFileVersion(Program.Version)]