forked from bewl/EliteDangerousTradingAssistant
-
Notifications
You must be signed in to change notification settings - Fork 0
/
AddSystemDialog.cs
36 lines (31 loc) · 916 Bytes
/
AddSystemDialog.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
using System;
using System.Drawing;
using System.Windows.Forms;
namespace EliteDangerousTradingAssistant
{
public partial class AddSystemDialog : Form
{
private StarSystem result;
public StarSystem Result
{
get { return result; }
}
public AddSystemDialog()
{
InitializeComponent();
this.Icon = new Icon("Graphics\\EliteDangerousIcon.ico");
result = null;
}
private void AddButton_Click(object sender, EventArgs e)
{
if (string.IsNullOrEmpty(SystemTextBox.Text))
{
MessageBox.Show("Please provide a name for the system.", "Error: System name needed", MessageBoxButtons.OK);
return;
}
result = new StarSystem();
result.Name = SystemTextBox.Text;
this.Close();
}
}
}