changeset 21:031354c2a34c 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 diff
     1.1 --- a/IBBoard.Windows.Forms.csproj	Sat Jan 21 16:35:20 2012 +0000
     1.2 +++ b/IBBoard.Windows.Forms.csproj	Sat May 19 16:45:19 2012 +0100
     1.3 @@ -88,6 +88,9 @@
     1.4      <Compile Include="AssemblyInfo.cs">
     1.5        <SubType>Code</SubType>
     1.6      </Compile>
     1.7 +    <Compile Include="Windows\Forms\Hyperlink.cs">
     1.8 +      <SubType>Component</SubType>
     1.9 +    </Compile>
    1.10      <Compile Include="Windows\Forms\IBBTabControl.cs">
    1.11        <SubType>Component</SubType>
    1.12      </Compile>
     2.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
     2.2 +++ b/Windows/Forms/Hyperlink.cs	Sat May 19 16:45:19 2012 +0100
     2.3 @@ -0,0 +1,18 @@
     2.4 +´╗┐using System;
     2.5 +using System.Diagnostics;
     2.6 +using System.Windows.Forms;
     2.7 +using IBBoard.Lang;
     2.8 +
     2.9 +namespace IBBoard.Windows.Forms
    2.10 +{
    2.11 +	public class Hyperlink : LinkLabel, ITranslatable
    2.12 +	{
    2.13 +		public string Url { get; set; }
    2.14 +		
    2.15 +		protected override void OnClick(EventArgs e)
    2.16 +		{
    2.17 +			Process.Start(Url);
    2.18 +			base.OnClick(e);
    2.19 +		}
    2.20 +	}
    2.21 +}