private void OnSshProfileDeleted(object sender, EventArgs e)
 {
     if (sender is SshProfileViewModel sshProfile)
     {
         if (SelectedSshProfile == sshProfile)
         {
             SelectedSshProfile = SshProfiles.First();
         }
         SshProfiles.Remove(sshProfile);
         _settingsService.DeleteSshProfile(sshProfile.Id);
     }
 }
        private void OnSshProfileDeleted(object sender, EventArgs e)
        {
            if (sender is SshProfileViewModel shellProfile)
            {
                if (SelectedSshProfile == shellProfile)
                {
                    SelectedSshProfile = SshProfiles.First();
                }
                SshProfiles.Remove(shellProfile);

                if (shellProfile.IsDefault)
                {
                    SshProfiles.First().IsDefault = true;
                    _settingsService.SaveDefaultSshProfileId(SshProfiles.First().Id);
                }
                _settingsService.DeleteSshProfile(shellProfile.Id);
            }
        }