-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathAddLink.cs
50 lines (44 loc) · 1.15 KB
/
AddLink.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
using System;
using System.Windows.Forms;
namespace Z_Link
{
public partial class AddLink : Form
{
public AddLink()
{
InitializeComponent();
}
private void LocationSelect_Click(object sender, EventArgs e)
{
using (OpenFileDialog ofd = new OpenFileDialog
{
Title = "Select a file to link...",
Filter = "All Files|*.*",
RestoreDirectory = true
}) if (ofd.ShowDialog() == DialogResult.OK) txt_LinkLocation.Text = ofd.FileName;
}
private void IconSelect_Click(object sender, EventArgs e)
{
using (OpenFileDialog ofd = new OpenFileDialog
{
Title = "Select an icon to link...",
Filter = "Display Icons|*.bmp; *.png; *.jpg; *.jpeg",
RestoreDirectory = true
}) if (ofd.ShowDialog() == DialogResult.OK) txt_LinkIcon.Text = ofd.FileName;
}
private void DialogControl_MouseEnter(object sender, EventArgs e)
{
((Control)sender).Cursor = Win32.GetHandCursor();
}
private void ConfirmLink_Click(object sender, EventArgs e)
{
DialogResult = DialogResult.OK;
Close();
}
private void CancelLink_Click(object sender, EventArgs e)
{
DialogResult = DialogResult.Cancel;
Close();
}
}
}