private void RenameHandler(object sender, System.EventArgs e)
{
if (profileListBox.SelectedIndex == -1) return;
else
{
ProfileRenameDialog dialog = new ProfileRenameDialog();
Profile selectedProfile = ((Profile)manager.Profiles[profileListBox.SelectedIndex]);
dialog.ProfileName = selectedProfile.Name;
if (dialog.ShowDialog() == DialogResult.OK)
{
selectedProfile.Name = dialog.ProfileName;
UpdateUI();
}
}
}