-
Notifications
You must be signed in to change notification settings - Fork 4
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
2 changed files
with
12 additions
and
6 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,18 +1,23 @@ | ||
using Spectre.Console; | ||
using Spectre.Console.Rendering; | ||
using System.Diagnostics; | ||
using System.Reflection; | ||
|
||
namespace KuruExtract; | ||
internal static class Constants | ||
{ | ||
public static IRenderable Header => | ||
new Panel(new Markup("\nExtracts game content for DayZ\nby Wardog\n").Centered()) | ||
.Header($"ExtractDayZ v{Version}", Justify.Center) | ||
.Header($"DayZExtract v{Version}", Justify.Center) | ||
.SafeBorder() | ||
.Border(BoxBorder.Heavy) | ||
.Expand(); | ||
|
||
public static string Version => | ||
FileVersionInfo.GetVersionInfo(Assembly.GetExecutingAssembly().Location).FileVersion ?? "0.0.0"; | ||
public static string Version | ||
{ | ||
get | ||
{ | ||
var version = Assembly.GetExecutingAssembly()?.GetName()?.Version; | ||
return version != null ? $"{version.Major}.{version.Minor}.{version.Build}" : "0.0.0"; | ||
} | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters