-
Notifications
You must be signed in to change notification settings - Fork 0
/
NewEntry.cs
43 lines (37 loc) · 1.04 KB
/
NewEntry.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
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Windows.Forms;
namespace HostsEditor
{
public partial class NewEntry : Form
{
public string IpAddress { get; set; }
public string UrlAddress { get; set; }
public bool IsEnabled { get; set; }
public NewEntry()
{
InitializeComponent();
}
private void Button_Cancel_Click(object sender, EventArgs e)
{
this.Close();
}
private void NewEntry_Load(object sender, EventArgs e)
{
}
private void Button_Save_Click(object sender, EventArgs e)
{
//TODO: Validate data
this.DialogResult = DialogResult.OK;
IpAddress = ipAddressControl.Text.Replace(" ", string.Empty);
UrlAddress = textBox1.Text;
IsEnabled = checkBox1.Checked;
}
}
}