diff --git a/shadowsocks-csharp/View/AboutForm.Designer.cs b/shadowsocks-csharp/View/AboutForm.Designer.cs index 498d31d4..11568121 100644 --- a/shadowsocks-csharp/View/AboutForm.Designer.cs +++ b/shadowsocks-csharp/View/AboutForm.Designer.cs @@ -90,6 +90,7 @@ this.Name = "AboutForm"; this.StartPosition = System.Windows.Forms.FormStartPosition.CenterScreen; this.Text = "About"; + this.Load += new System.EventHandler(this.AboutForm_Load); this.ResumeLayout(false); } diff --git a/shadowsocks-csharp/View/AboutForm.cs b/shadowsocks-csharp/View/AboutForm.cs index 0b182cb5..e2a91e5d 100644 --- a/shadowsocks-csharp/View/AboutForm.cs +++ b/shadowsocks-csharp/View/AboutForm.cs @@ -2,7 +2,9 @@ using System.Collections.Generic; using System.ComponentModel; using System.Data; +using System.Diagnostics; using System.Drawing; +using System.Reflection; using System.Text; using System.Windows.Forms; @@ -20,5 +22,13 @@ namespace Shadowsocks.View string url = "https://github.com/clowwindy/shadowsocks-csharp"; System.Diagnostics.Process.Start(url); } + + private void AboutForm_Load(object sender, EventArgs e) + { + Assembly assembly = Assembly.GetExecutingAssembly(); + FileVersionInfo fvi = FileVersionInfo.GetVersionInfo(assembly.Location); + string version = fvi.FileVersion; + versionLabel.Text = "Version: " + version; + } } }