public MainMenu() { InitializeComponent(); // if (!this.CheckInternetConnection()) // { // Environment.Exit(1); // } nscan = new NetScan(); nscan.Owner = this; nscan.Show(); }
private void button2_Click(object sender, EventArgs e) { if (String.IsNullOrEmpty(textBox1.Text)) { MessageBox.Show("Please, don't left this filed empty"); } NetScan scan = this.Owner as NetScan; if (!scan.DoesExist(textBox1.Text, StrType.EserverName)) { scan.ChangeRow(textBox1.Text, StrType.EserverName); this.Close(); } else { MessageBox.Show("This name is already defined!"); } }