Browse Source

add about form

Version now change with AssemblyVersion
pull/45/head
wzxjohn 10 years ago
parent
commit
8e40a6c7d5
2 changed files with 11 additions and 0 deletions
  1. +1
    -0
      shadowsocks-csharp/View/AboutForm.Designer.cs
  2. +10
    -0
      shadowsocks-csharp/View/AboutForm.cs

+ 1
- 0
shadowsocks-csharp/View/AboutForm.Designer.cs View File

@@ -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);

}


+ 10
- 0
shadowsocks-csharp/View/AboutForm.cs View File

@@ -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;
}
}
}

Loading…
Cancel
Save