-
Notifications
You must be signed in to change notification settings - Fork 14
/
FormPrivKey.cs
44 lines (40 loc) · 1.28 KB
/
FormPrivKey.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
using System;
using System.Windows.Forms;
namespace Coffeed
{
public partial class FormPrivKey : Form
{
public FormPrivKey()
{
InitializeComponent();
}
private void button1_Click(object sender, EventArgs e)
{
OpenFileDialog ofd = new OpenFileDialog();
ofd.Filter = "Private Key | *.xml";
ofd.DefaultExt = "xml";
ofd.FileName = "PrivateKey";
if (ofd.ShowDialog() == DialogResult.OK)
{
privkeypath.Text = ofd.FileName;
}
}
private void button2_Click(object sender, EventArgs e)
{
if (System.IO.File.Exists(privkeypath.Text))
{
Properties.Settings.Default.privkeypath = privkeypath.Text;
Properties.Settings.Default.Save();
this.Close();
}
else
{
MessageBox.Show("This file doesn't seem to exists, please search for your private key.", "That file doesn't exists!", MessageBoxButtons.OK, MessageBoxIcon.Error);
}
}
private void Form4_Load(object sender, EventArgs e)
{
privkeypath.Text = Properties.Settings.Default.privkeypath;
}
}
}