public void CreateNewProfile() { ProfileEdit dlg = new ProfileEdit(null); if (dlg.ShowDialog(Env.MainForm) == DialogResult.OK) { Env.Profiles.AddProfile(dlg.ResultProfile); Env.MainForm.RefreshAllProfiles(); } }
public void EditProfile(ChannelProfile prof) { if (Env.Connections.IsConnected(prof)) { Util.Warning(Env.MainForm, Env.Strings.GetString("Message.Commands.CannotEditConnectedProfile")); return; } ProfileEdit dlg = new ProfileEdit(prof); if (dlg.ShowDialog(Env.MainForm) == DialogResult.OK) { Env.Profiles.ReplaceProfile(prof, dlg.ResultProfile); Env.MainForm.RefreshAllProfiles(); } }