private void BtnServerAdd_Click(object sender, EventArgs e) { string serverName = ""; int serverID = 0; using (AddServer addServer = new AddServer()) { if (addServer.ShowDialog() == DialogResult.OK) { serverName = addServer.ServerName; serverID = addServer.ServerID; } } newServ = new RestServer(serverID, serverName); lstServers.Items.Add(newServ); }
private void BtnServerAdd_Click(object sender, EventArgs e) { AddServer addServer = new AddServer(); addServer.ShowDialog(); }