private void EditSubscription(object sender, RoutedEventArgs e) { SubscriptionEditor editor = new SubscriptionEditor() { Subscription = SelectedSubscriptionViewModel.Subscription, Owner = this }; editor.ShowDialog(); }
private void SubscribeExecuted(object sender, ExecutedRoutedEventArgs e) { SubscriptionEditor editor = new SubscriptionEditor() { Subscription = new WebSubscription(), Owner = this, }; editor.ShowDialog(); if (editor.Accept) { Subscription sub = editor.Subscription; Perform(new Performable() { Description = string.Format("subscribe to {0}", sub.Title), Redo = () => _Subscriptions.Add(sub), Undo = () => _Subscriptions.Remove(sub) }); } }