Ejemplo n.º 1
0
 /// <summary>
 /// Prompts the user for a new subscription, and creates it.
 /// </summary>
 private async void OnNewSubscriptionCommand()
 {
     IsLoading = true;
     try
     {
         try
         {
             Subscription subscription = NewSubscriptionWindow.PromptUser(TopicItem.FullName);
             if (subscription != null)
             {
                 await DataSource.NewSubscriptionAsync(subscription);
             }
         }
         catch (DataSourceException e)
         {
             Debug.Write(e.Message, "New Subscription");
             UserPromptUtils.ErrorPrompt(
                 Resources.PubSubNewSubscriptionErrorMessage, Resources.PubSubNewSubscriptionErrorHeader);
         }
         await Refresh();
     }
     finally
     {
         IsLoading = false;
     }
 }
Ejemplo n.º 2
0
        private void ShowAddSubscriptionWindow()
        {
            var newWindow = new NewSubscriptionWindow();

            newWindow.ShowDialog();
        }