/// <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; } }
private void ShowAddSubscriptionWindow() { var newWindow = new NewSubscriptionWindow(); newWindow.ShowDialog(); }