AdvancedLauncher.UI.Windows.Settings.OnRemoveClick C# (CSharp) Метод

OnRemoveClick() приватный Метод

private OnRemoveClick ( object sender, RoutedEventArgs e ) : void
sender object
e System.Windows.RoutedEventArgs
Результат void
        private void OnRemoveClick(object sender, RoutedEventArgs e) {
            if (ProfileList.Items.Count == 1) {
                DialogManager.ShowErrorDialog(LanguageManager.Model.Settings_LastProfile);
                return;
            }
            Profile profile = SelectedProfile;
            if (ProfileList.SelectedIndex != ProfileList.Items.Count - 1) {
                ProfileList.SelectedIndex++;
            } else {
                ProfileList.SelectedIndex--;
            }
            if (ProfileManager.RemoveProfile(profile)) {
                Credentials.Remove(profile);
            }
        }