private static void EditItemStack(EditItemStackMessage message) { Window sender = message.Target as Window; EditItemStackWindow dlg = new EditItemStackWindow(message.ItemStack) { Owner = sender }; message.Accepted = dlg.ShowDialog() == true; }
private void EditIcon() { this.Quest.Icon = this.Quest.Icon ?? new ItemStackViewModel(); ItemStackViewModel itemStack = new ItemStackViewModel(); itemStack.CopyFrom(this.Quest.Icon); EditItemStackMessage message = new EditItemStackMessage { ItemStack = itemStack }; this.MessengerInstance.Send(message); if (!message.Accepted) { return; } this.Quest.Icon.CopyFrom(message.ItemStack); }