private void Button_Click_2(object sender, RoutedEventArgs e) { var value = rand.Next(1, 10); NotifyMessage msg = null; if (value % 2 == 0) { msg = new NotifyMessage("Images/GreenSkin.png", "Green Skin Title", "Du hast dich heute nicht viel bewogen. Willst du Spiel starten?", () => MessageBox.Show("Green Skin has been chosen.", "Green Skin", MessageBoxButton.OK)); } else { /* msg = new NotifyMessage("Images/BlueSkin.png", "Blue Skin Title", "Blue Skin has been chosen.", () => MessageBox.Show("Blue Skin has been chosen.", "Blue Skin", MessageBoxButton.OK));*/ } notifyMessageController.EnqueueMessage(msg); }
public NotifyMessageViewModel(NotifyMessage content, AnimatedLocation location, Action closedAction) { this.content = content; this.location = location; this.closedAction = closedAction; }
public void EnqueueMessage(NotifyMessage msg) { QueuedMessages.Enqueue(msg); Start(); }