private void EditProfile_Click(object sender, EventArgs e)
 {
     ProfileForm pf = new ProfileForm(_selectedProfile, _applicationContext) {
         Text = _applicationContext.ProgramLocalization.EditingProfileTitle
     };
     pf.ShowDialog();
     if (pf.DialogResult == DialogResult.OK) {
         _profileManager.Profiles.Remove(_profileManager.LastUsedProfile);
         if (_profileManager.Profiles.ContainsKey(pf.CurrentProfile.ProfileName)) {
             RadMessageBox.Show(_applicationContext.ProgramLocalization.ProfileAlreadyExistsErrorText,
                 _applicationContext.ProgramLocalization.Error,
                 MessageBoxButtons.OK, RadMessageIcon.Error);
             UpdateProfileList();
             return;
         }
         _profileManager.Profiles.Add(pf.CurrentProfile.ProfileName, pf.CurrentProfile);
         _profileManager.LastUsedProfile = pf.CurrentProfile.ProfileName;
     }
     SaveProfiles();
     UpdateProfileList();
 }
 private void AddProfile_Click(object sender, EventArgs e)
 {
     Profile editedProfile = Profile.ParseProfile(_selectedProfile.ToString());
     editedProfile.ProfileName = $"Copy of '{_selectedProfile.ProfileName}'({LinuxTimeStamp})";
     ProfileForm pf = new ProfileForm(editedProfile, _applicationContext) {Text = _applicationContext.ProgramLocalization.AddingProfileTitle};
     pf.ShowDialog();
     if (pf.DialogResult == DialogResult.OK) {
         if (_profileManager.Profiles.ContainsKey(editedProfile.ProfileName)) {
             RadMessageBox.Show(_applicationContext.ProgramLocalization.ProfileAlreadyExistsErrorText,
                 _applicationContext.ProgramLocalization.Error,
                 MessageBoxButtons.OK, RadMessageIcon.Error);
             return;
         }
         _profileManager.Profiles.Add(editedProfile.ProfileName, editedProfile);
         _profileManager.LastUsedProfile = pf.CurrentProfile.ProfileName;
     }
     SaveProfiles();
     UpdateProfileList();
 }