A dialog to rename profiles.
Inheritance: System.Windows.Forms.Form
コード例 #1
0
 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();
         }
     }
 }
コード例 #2
0
 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();
         }
     }
 }