Retrieve version from Assembly

This commit is contained in:
AdAstra-LD 2023-10-09 15:15:18 +02:00
parent 606f8c9efe
commit a6578a3c4e

View File

@ -24,12 +24,14 @@ using System.Globalization;
using static DSPRE.ROMFiles.Event;
using NSMBe4.NSBMD;
using static DSPRE.ROMFiles.SpeciesFile;
using System.Reflection;
namespace DSPRE {
public partial class MainProgram : Form {
public MainProgram() {
InitializeComponent();
SetMenuLayout(Properties.Settings.Default.menuLayout); //Read user settings for menu layout
Text = "DS Pokémon Rom Editor Reloaded " + GetDSPREVersion() + " (Nømura, AdAstra/LD3005, Mixone)";
}
#region Program Window
@ -311,6 +313,13 @@ namespace DSPRE {
return true;
}
#endregion
public string GetDSPREVersion()
{
return "" + Assembly.GetExecutingAssembly().GetName().Version.Major + "." + Assembly.GetExecutingAssembly().GetName().Version.Minor +
"." + Assembly.GetExecutingAssembly().GetName().Version.Build;
}
private void romToolBoxToolStripMenuItem_Click(object sender, EventArgs e) {
using (ROMToolboxDialog window = new ROMToolboxDialog()) {
window.ShowDialog();
@ -515,7 +524,7 @@ namespace DSPRE {
Update();
}
private void aboutToolStripMenuItem_Click(object sender, EventArgs e) {
string message = "DS Pokémon ROM Editor Reloaded by AdAstra/LD3005" + Environment.NewLine + "version 1.10.1" + Environment.NewLine
string message = "DS Pokémon ROM Editor Reloaded by AdAstra/LD3005" + Environment.NewLine + "version " + GetDSPREVersion() + Environment.NewLine
+ Environment.NewLine + "Based on Nømura's DS Pokémon ROM Editor 1.0.4."
+ Environment.NewLine + "Largely inspired by Markitus95's \"Spiky's DS Map Editor\" (SDSME), from which certain assets were also reused." +
"Credits go to Markitus, Ark, Zark, Florian, and everyone else who deserves credit for SDSME." + Environment.NewLine