mirror of
https://github.com/claunia/SabreTools.git
synced 2025-12-16 19:14:27 +00:00
Version string -> Prepare
This commit is contained in:
@@ -22,7 +22,7 @@ namespace RombaSharp.Features
|
||||
public override void ProcessFeatures(Dictionary<string, Feature> features)
|
||||
{
|
||||
base.ProcessFeatures(features);
|
||||
logger.User($"RombaSharp version: {Constants.Version}");
|
||||
logger.User($"RombaSharp version: {Prepare.Version}");
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -8,13 +8,6 @@ namespace SabreTools.Core
|
||||
/// </summary>
|
||||
public static class Constants
|
||||
{
|
||||
/// <summary>
|
||||
/// The current toolset version to be used by all child applications
|
||||
/// </summary>
|
||||
//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;
|
||||
|
||||
@@ -1,4 +1,6 @@
|
||||
using System;
|
||||
using System.IO;
|
||||
using System.Reflection;
|
||||
|
||||
namespace SabreTools.Core
|
||||
{
|
||||
@@ -7,6 +9,12 @@ namespace SabreTools.Core
|
||||
/// </summary>
|
||||
public static class Prepare
|
||||
{
|
||||
/// <summary>
|
||||
/// The current toolset version to be used by all child applications
|
||||
/// </summary>
|
||||
//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}";
|
||||
|
||||
/// <summary>
|
||||
/// Readies the console and outputs the header
|
||||
/// </summary>
|
||||
@@ -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);
|
||||
|
||||
Reference in New Issue
Block a user