public App() { this.InitializeComponent(); this.Suspending += (s, a) => { }; bool connected = false; while (!connected) { try { NeoSingleton._connect(); } catch (Exception exception) { continue; } connected = true; } foreach (Movie obj in NeoSingleton._readAll()) { movieList.Instance.addMovie(obj); } foreach (TVShow obj in NeoSingleton._readTVShows()) { seasonList.Instance.addTVShow(obj); } }
private void CommandInvokedHandler(IUICommand command) { Movie selected = (Movie)MovieGridView.SelectedItem; if (command.Label == "Cancel") { return; } else { movieList.Instance.deleteMovie(selected.Id); NeoSingleton._connect(); NeoSingleton._removeMovie(selected); } GenresComboBox.SelectedIndex = -1; DirectorsComboBox.SelectedIndex = -1; ActorsComboBox.SelectedIndex = -1; updateObservable(); updateObservableListings(); TitleTextblock.Text = ""; YearTextblock.Text = ""; PlotTextblock.Text = ""; GenresTextblock.Text = ""; DirectorsTextblock.Text = ""; ActorsTextblock.Text = ""; DirectorsTextblockHolder.Text = ""; ActorsTextblockHolder.Text = ""; PathTextblock.Text = ""; PosterImage.Source = null; }
private void AddButton_Click(object sender, RoutedEventArgs e) { NeoSingleton._connect(); NeoSingleton._addMovie(addMovie); MovieBox.NeoModels.Movie movie = (MovieBox.NeoModels.Movie)MoviesList.SelectedItem; movieList.Instance.addMovie(addMovie); moviesPath.Remove(movie); }
private void CommandInvokedHandler(IUICommand command) { TVShowView selected = (TVShowView)SeasonGridView.SelectedItem; if (command.Label == "Cancel") { return; } else { int foundSeasons = 0; foreach (TVShowView obj in Series) { if (obj.Id == selected.Id) { foundSeasons++; } } if (foundSeasons == 1) { seasonList.Instance.deleteShow(selected); NeoSingleton._connect(); NeoSingleton._removeTVShow(selected); } else { seasonList.Instance.deleteSeason(selected, selected.Seasons[0]); NeoSingleton._connect(); NeoSingleton._removeSeason(selected.Seasons[0]); } } updateObservableSeries(); TitleTextblock.Text = ""; YearTextblock.Text = ""; PlotTextblock.Text = ""; GenresTextblock.Text = ""; NetworksTextblock.Text = ""; WritersTextblock.Text = ""; AirDateTextblock.Text = ""; NumberOfEpisodesTextblock.Text = ""; PopularityTextblock.Text = ""; WritersTextblockHolder.Text = ""; PathTextblock.Text = ""; NetworksTextblockHolder.Text = ""; AirDateTextblockHolder.Text = ""; NumberOfEpisodesTextblockHolder.Text = ""; PopularityTextblockHolder.Text = ""; PosterImage.Source = null; }
private void ContentDialog_PrimaryButtonClickAsync(ContentDialog sender, ContentDialogButtonClickEventArgs args) { if (!btnPath.IsEnabled) { return; } movieList.Instance.addMovie(addMovie); NeoSingleton._connect(); NeoSingleton._addMovie(addMovie); return; }
private void AddToButton_Click(object sender, RoutedEventArgs e) { int index = 0; foreach (NeoModels.Movie movie in Suggested) { if (ShouldAdd[index]) { movieList.Instance.addMovie(movie); NeoSingleton._connect(); NeoSingleton._addMovie(movie); } index++; } Frame.Navigate(typeof(MoviesPage)); }
private void ContentDialog_PrimaryButtonClick(ContentDialog sender, ContentDialogButtonClickEventArgs args) { if (!btnPath.IsEnabled) { return; } NeoSingleton._connect(); if (already) { NeoSingleton._addSeason(addSeason, show); seasonList.Instance.addSeason(addSeason, show); } else { NeoSingleton._addTvShow(show); seasonList.Instance.addTVShow(show); } }
private void ContentDialog_PrimaryButtonClick(ContentDialog sender, ContentDialogButtonClickEventArgs args) { movieList.Instance.modifyMovie(addMovie); NeoSingleton._connect(); NeoSingleton._modifyMovie(addMovie); }