Exemple #1
0
        private static void EditQuest(EditQuestMessage message)
        {
            Window sender = message.Target as Window;

            EditQuestWindow dlg = new EditQuestWindow(message.Quest)
            {
                Owner = sender
            };

            message.Accepted = dlg.ShowDialog() == true;
        }
Exemple #2
0
        private void AddQuest()
        {
            QuestViewModel newQuest = new QuestViewModel {
                QuestSet = this
            };
            EditQuestMessage message = new EditQuestMessage {
                Quest = newQuest
            };

            this.MessengerInstance.Send(message);
            if (message.Accepted)
            {
                this.AddQuest(newQuest);
            }
        }
Exemple #3
0
        private void Edit()
        {
            QuestViewModel copiedQuest = new QuestViewModel();

            copiedQuest.CopyFrom(this);

            EditQuestMessage message = new EditQuestMessage {
                Quest = copiedQuest
            };

            this.MessengerInstance.Send(message);
            if (message.Accepted)
            {
                this.CopyFrom(copiedQuest);
            }
        }