示例#1
0
        private void EditSubscription(object sender, RoutedEventArgs e)
        {
            SubscriptionEditor editor = new SubscriptionEditor()
            {
                Subscription = SelectedSubscriptionViewModel.Subscription,
                Owner        = this
            };

            editor.ShowDialog();
        }
示例#2
0
        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)
                });
            }
        }