Skip to content

Commit

Permalink
Added GetAppVersion() method.
Browse files Browse the repository at this point in the history
  • Loading branch information
xvitaly committed Dec 4, 2015
1 parent 565c268 commit 108ec2c
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion FrmMhed.cs
Original file line number Diff line number Diff line change
Expand Up @@ -130,6 +130,11 @@ private string GetAppCompany()
object[] Attribs = Assembly.GetExecutingAssembly().GetCustomAttributes(typeof(AssemblyCompanyAttribute), false);
return Attribs.Length != 0 ? ((AssemblyCompanyAttribute)Attribs[0]).Company : null;
}

private Version GetAppVersion()
{
return Assembly.GetEntryAssembly().GetName().Version;
}

private void frmHEd_Load(object sender, EventArgs e)
{
Expand Down Expand Up @@ -171,7 +176,7 @@ private void HEd_M_OnlHelp_Click(object sender, EventArgs e)

private void HEd_M_About_Click(object sender, EventArgs e)
{
MessageBox.Show(String.Format("{0} by {1}. Version: {2}.", Properties.Resources.AppName, GetAppCompany(), Assembly.GetEntryAssembly().GetName().Version.ToString()), Properties.Resources.AppName, MessageBoxButtons.OK, MessageBoxIcon.Information);
MessageBox.Show(String.Format("{0} by {1}. Version: {2}.", Properties.Resources.AppName, GetAppCompany(), GetAppVersion()), Properties.Resources.AppName, MessageBoxButtons.OK, MessageBoxIcon.Information);
}

private void HEd_T_RemRw_Click(object sender, EventArgs e)
Expand Down

0 comments on commit 108ec2c

Please sign in to comment.