private void EditReputationRewards()
        {
            ObservableCollection<ReputationRewardViewModel> reputationRewards = new ObservableCollection<ReputationRewardViewModel>(this.Quest.ReputationRewards.Select(reward => new ReputationRewardViewModel(reward)));
            
            EditReputationRewardsMessage message = new EditReputationRewardsMessage { ReputationRewards = reputationRewards };
            this.MessengerInstance.Send(message);
            if (!message.Accepted)
            {
                return;
            }

            this.Quest.ReplaceReputationRewards(reputationRewards);
        }
Exemple #2
0
        private static void EditReputationRewards(EditReputationRewardsMessage message)
        {
            Window sender = message.Target as Window;

            EditReputationRewardsViewModel viewModel = new EditReputationRewardsViewModel(message.ReputationRewards);
            EditReputationRewardsWindow dlg = new EditReputationRewardsWindow(viewModel) { Owner = sender };
            if (dlg.ShowDialog() != true)
            {
                return;
            }

            message.Accepted = true;
        }