Exemple #1
0
        public void RemoveQuest()
        {
            if (Quests == null || SelectedQuest.Value == null)
            {
                return;
            }

            var index = Quests.IndexOf(SelectedQuest);

            if (!Quests.Remove(SelectedQuest))
            {
                return;
            }

            if (Quests.Any())
            {
                SelectedQuest = ((index - 1) >= 0)
                                        ? Quests[index - 1]
                                        : Quests.First();
            }
        }