-
Notifications
You must be signed in to change notification settings - Fork 28
/
Copy pathWelcomeDoc.cs
96 lines (83 loc) · 2.74 KB
/
WelcomeDoc.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
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Text;
using System.Windows.Forms;
using WeifenLuo.WinFormsUI.Docking;
namespace WeCode1._0
{
public partial class WelcomeDoc :DockContent
{
#region Fields
private string _nodeId;
#endregion Fields
#region Properties
public string NodeId
{
get { return _nodeId; }
set { _nodeId = value; }
}
#endregion
public WelcomeDoc()
{
InitializeComponent();
label5.Text = PubFunc.GetConfiguration("Version");
}
private void WelcomeDoc_Activated(object sender, EventArgs e)
{
Attachment.ActiveNodeId = "-1";
Attachment.ActiveDOCType = "local";
Attachment.AttForm.ReFreshAttachGrid();
Attachment.AttForm.GridDiable();
}
private void linkLabel1_LinkClicked(object sender, LinkLabelLinkClickedEventArgs e)
{
string target = "http://thinkry.github.io";
try
{
System.Diagnostics.Process.Start(target);
}
catch (System.ComponentModel.Win32Exception noBrowser)
{
if (noBrowser.ErrorCode == -2147467259)
MessageBox.Show(noBrowser.Message);
}
catch (System.Exception other)
{
MessageBox.Show(other.Message);
}
}
private void linkLabel2_LinkClicked(object sender, LinkLabelLinkClickedEventArgs e)
{
string target = "https://github.com/thinkry/wecode/issues";
try
{
System.Diagnostics.Process.Start(target);
}
catch (System.ComponentModel.Win32Exception noBrowser)
{
if (noBrowser.ErrorCode == -2147467259)
MessageBox.Show(noBrowser.Message);
}
catch (System.Exception other)
{
MessageBox.Show(other.Message);
}
}
private void WelcomeDoc_Load(object sender, EventArgs e)
{
//设置随机语录
int i = 0;
string[] sWord = new string[5];
sWord[0] = "程序员的知识管理软件";
sWord[1] = "我们是程序员,我们改变世界";
sWord[2] = "总结 分享 提升";
sWord[3] = "自己用心又有计划去做事,是很难失败的";
sWord[4] = "一段写得好的代码,一用好多年,拷贝好带身边";
int random = new Random().Next(0, 2);
label2.Text = sWord[random];
}
}
}