diff --git a/RombaSharp/Features/Version.cs b/RombaSharp/Features/Version.cs index 89dc3f1a..1019d09f 100644 --- a/RombaSharp/Features/Version.cs +++ b/RombaSharp/Features/Version.cs @@ -22,7 +22,7 @@ namespace RombaSharp.Features public override void ProcessFeatures(Dictionary features) { base.ProcessFeatures(features); - logger.User($"RombaSharp version: {Constants.Version}"); + logger.User($"RombaSharp version: {Prepare.Version}"); } } } diff --git a/SabreTools.Core/Constants.cs b/SabreTools.Core/Constants.cs index 7e540b5a..52190fb4 100644 --- a/SabreTools.Core/Constants.cs +++ b/SabreTools.Core/Constants.cs @@ -8,13 +8,6 @@ namespace SabreTools.Core /// public static class Constants { - /// - /// The current toolset version to be used by all child applications - /// - //public readonly static string Version = $"v1.0.4"; - public readonly static string Version = $"v1.0.4-{File.GetCreationTime(Assembly.GetExecutingAssembly().Location):yyyy-MM-dd HH:mm:ss}"; - public const int HeaderHeight = 3; - #region 0-byte file constants public const long SizeZero = 0; diff --git a/SabreTools.Core/Prepare.cs b/SabreTools.Core/Prepare.cs index 9f15b539..519a502b 100644 --- a/SabreTools.Core/Prepare.cs +++ b/SabreTools.Core/Prepare.cs @@ -1,4 +1,6 @@ using System; +using System.IO; +using System.Reflection; namespace SabreTools.Core { @@ -7,6 +9,12 @@ namespace SabreTools.Core /// public static class Prepare { + /// + /// The current toolset version to be used by all child applications + /// + //public readonly static string Version = $"v1.0.4"; + public readonly static string Version = $"v1.0.4-{File.GetCreationTime(Assembly.GetExecutingAssembly().Location):yyyy-MM-dd HH:mm:ss}"; + /// /// Readies the console and outputs the header /// @@ -16,7 +24,7 @@ namespace SabreTools.Core // Dynamically create the header string, adapted from http://stackoverflow.com/questions/8200661/how-to-align-string-in-fixed-length-string int width = Console.WindowWidth - 3; string border = $"+{new string('-', width)}+"; - string mid = $"{program} {Constants.Version}"; + string mid = $"{program} {Version}"; mid = $"|{mid.PadLeft(((width - mid.Length) / 2) + mid.Length).PadRight(width)}|"; // If we're outputting to console, do fancy things @@ -34,7 +42,7 @@ namespace SabreTools.Core Console.BackgroundColor = ConsoleColor.Blue; } - Console.Title = $"{program} {Constants.Version}"; + Console.Title = $"{program} {Version}"; // Output the header Console.WriteLine(border);