Exemple #1
0
        /// <summary>
        /// Method that deletes rosters.
        /// </summary>
        private void DeleteRoster()
        {
            if (_currentRoster != null)
            {
                MessageBoxResult notice = System.Windows.MessageBox.Show($"Confirm: Delete {CurrentRoster.ListName}?", "Confirm", System.Windows.MessageBoxButton.YesNo);

                if (notice == MessageBoxResult.Yes)
                {
                    // _ktBusiness.DeleteRosterFromPersistance(CurrentRoster.ListID);
                    AvailableRosters.Remove(CurrentRoster);
                    CreateRosterSelectList();
                    CurrentRoster = AvailableRosters.FirstOrDefault();
                }
            }
        }
Exemple #2
0
 /// <summary>
 /// Helper method that takes the selected Roster Name and uses it to set the active fighterlist object.
 /// </summary>
 private void SetCurrentRosterByName()
 {
     CurrentRoster = AvailableRosters.FirstOrDefault(r => r.ListName == SelectedRosterName);
 }