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