changeset 21:031354c2a34c default tip

* Add Hyperlink that does sensible stuff by default
author IBBoard <dev@ibboard.co.uk>
date Sat, 19 May 2012 16:45:19 +0100
parents 5f35edc84791
children
files IBBoard.Windows.Forms.csproj Windows/Forms/Hyperlink.cs
diffstat 2 files changed, 21 insertions(+), 0 deletions(-) [+]
line wrap: on
line diff
--- a/IBBoard.Windows.Forms.csproj	Sat Jan 21 16:35:20 2012 +0000
+++ b/IBBoard.Windows.Forms.csproj	Sat May 19 16:45:19 2012 +0100
@@ -88,6 +88,9 @@
     <Compile Include="AssemblyInfo.cs">
       <SubType>Code</SubType>
     </Compile>
+    <Compile Include="Windows\Forms\Hyperlink.cs">
+      <SubType>Component</SubType>
+    </Compile>
     <Compile Include="Windows\Forms\IBBTabControl.cs">
       <SubType>Component</SubType>
     </Compile>
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/Windows/Forms/Hyperlink.cs	Sat May 19 16:45:19 2012 +0100
@@ -0,0 +1,18 @@
+using System;
+using System.Diagnostics;
+using System.Windows.Forms;
+using IBBoard.Lang;
+
+namespace IBBoard.Windows.Forms
+{
+	public class Hyperlink : LinkLabel, ITranslatable
+	{
+		public string Url { get; set; }
+		
+		protected override void OnClick(EventArgs e)
+		{
+			Process.Start(Url);
+			base.OnClick(e);
+		}
+	}
+}