forked from thinkry/wecode
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathAbout.cs
57 lines (51 loc) · 1.57 KB
/
About.cs
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Text;
using System.Windows.Forms;
namespace WeCode1._0
{
public partial class About : Form
{
public About()
{
InitializeComponent();
//从配置文件读取版本
label2.Text = "Version " + PubFunc.GetConfiguration("Version");
}
private void StartProcess(string url)
{
try
{
System.Diagnostics.Process.Start(url);
}
catch (System.ComponentModel.Win32Exception noBrowser)
{
if (noBrowser.ErrorCode == -2147467259)
MessageBox.Show(noBrowser.Message);
}
catch (System.Exception other)
{
MessageBox.Show(other.Message);
}
}
private void linkLabel1_LinkClicked(object sender, LinkLabelLinkClickedEventArgs e)
{
StartProcess("http://wecode.thinkry.com");
}
private void linkLabel2_LinkClicked(object sender, LinkLabelLinkClickedEventArgs e)
{
StartProcess("https://github.com/thinkry/wecode/issues");
}
private void linkLabel3_LinkClicked(object sender, LinkLabelLinkClickedEventArgs e)
{
StartProcess("mailto:[email protected]");
}
private void linkLabel4_LinkClicked(object sender, LinkLabelLinkClickedEventArgs e)
{
StartProcess("mailto:[email protected]");
}
}
}