/// <summary> /// Add new Notebook /// </summary> /// <param name="sender"></param> /// <param name="e"></param> private async void AddNotebookClickAsync(object sender, Windows.UI.Xaml.RoutedEventArgs e) { // Show input dialog to get the new Notebook name var dialog = new InputDialog("Add Nootbook"); var result = await dialog.ShowAsync(); if (result != ContentDialogResult.Primary) { return; } DataManager.Notebook.Add(dialog.Text); ReloadAll(); }
/// <summary> /// Rename the current Notebook /// </summary> /// <param name="sender"></param> /// <param name="e"></param> private async void RenameNotebookClickAsync(object sender, Windows.UI.Xaml.RoutedEventArgs e) { AppBarButton button = (AppBarButton)sender; BangumiNotebook notebook = (BangumiNotebook)button.DataContext; // Show input dialog to get the new Notebook name var dialog = new InputDialog("Rename Nootbook", notebook.Title); var result = await dialog.ShowAsync(); if (result != ContentDialogResult.Primary) { return; } notebook.Title = dialog.Text; }
/// <summary> /// Add new series to to-watch list /// </summary> public static async void AddToWatchClickAsync() { // Show input dialog to get the new Series name var dialog = new InputDialog("Add To-Watch Series"); var result = await dialog.ShowAsync(); if (result != ContentDialogResult.Primary) { return; } // Create new Series var si = DataManager.ToWatch.Add(dialog.Text); // Display the Series' details MainPage.NavigateDetailView(si); }
/// <summary> /// Add new series /// </summary> public static async void AddSeriesClickAsync() { // Show input dialog to get the new Series name var dialog = new InputDialog("Add Series"); var result = await dialog.ShowAsync(); if (result != ContentDialogResult.Primary) { return; } // Create new Series SeriesIndex si = DataManager.Watched.Add(dialog.Text); if (!IsFiltered) { StaticIndices.Add(si); } MainPage.NavigateDetailView(si); }