public void NewProfile() { NetworkProfile profile; if (rdbDhcp.Checked) { profile = new NetworkProfile( profileName, interfaceName); } else { profile = new NetworkProfile( profileName, interfaceName, ipAddress, netmask, gateway, dns1, dns2); } ProfilesCollection.AddProfile(profile); main.UpdateForm(); // refresh dei profili nel main this.Close(); }
public void EditProfile() { ProfilesCollection.RemoveProfile(profileToEdit); NewProfile(); }
// rimuove il profilo selezionato public void RemoveProfile(object sender, EventArgs e) { ProfilesCollection.RemoveProfile(selectedProfile); UpdateForm(); }