private static void ClearItemsList()
 {
     Countrys.Clear();
     Citys.Clear();
     Bitrate.Clear();
     Genres.Clear();
 }
 private void Clear_OnClick(object sender, RoutedEventArgs e)
 {
     Search.Text              = "";
     Sort.SelectedIndex       = 0;
     From.Text                = "1900";
     To.Text                  = "2020";
     Western.IsChecked        = false;
     War.IsChecked            = false;
     Thriller.IsChecked       = false;
     ScienceFiction.IsChecked = false;
     Romance.IsChecked        = false;
     Mystery.IsChecked        = false;
     Horror.IsChecked         = false;
     History.IsChecked        = false;
     Fantasy.IsChecked        = false;
     Family.IsChecked         = false;
     Drama.IsChecked          = false;
     Documentary.IsChecked    = false;
     Crime.IsChecked          = false;
     Comedy.IsChecked         = false;
     Animation.IsChecked      = false;
     Adventure.IsChecked      = false;
     Action.IsChecked         = false;
     Genres.Clear();
 }
Example #3
0
        public override void OnNavigatedTo(NavigatedToEventArgs e, Dictionary <string, object> viewModelState)
        {
            Tracks  = Tracks ?? new SimpleStateSupportCollection <JumpListGroup <VKSaverTrack> >(LoadTracks);
            Artists = Artists ?? new SimpleStateSupportCollection <JumpListGroup <VKSaverArtist> >(LoadArtists);
            Albums  = Albums ?? new SimpleStateSupportCollection <JumpListGroup <VKSaverAlbum> >(LoadAlbums);
            Genres  = Genres ?? new SimpleStateSupportCollection <JumpListGroup <VKSaverGenre> >(LoadGenres);
            Folders = Folders ?? new SimpleStateSupportCollection <VKSaverFolder>(LoadFolders);
            Cached  = Cached ?? new SimpleStateSupportCollection <JumpListGroup <VKSaverTrack> >(LoadCachedTracks);

            if (_libraryDatabaseService.NeedReloadLibraryView)
            {
                Tracks.Clear();
                Artists.Clear();
                Albums.Clear();
                Genres.Clear();
                Folders.Clear();
                Cached.Clear();

                _libraryDatabaseService.NeedReloadLibraryView = false;
            }

            if (viewModelState.Count > 0)
            {
                CurrentPivotIndex = (int)viewModelState[nameof(CurrentPivotIndex)];
            }
            else
            {
                string viewName = (string)e.Parameter;
                SetPivotIndex(viewName);
            }

            base.OnNavigatedTo(e, viewModelState);
        }
        private async Task ExecuteLoadGenreCommand()
        {
            if (IsBusy)
            {
                return;
            }
            IsBusy = true;
            try
            {
                Genres.Clear();
                var genres = await DataStore.GetGenreAsync(true);

                if (genres.Any())
                {
                    foreach (var item in genres)
                    {
                        Genres.Add(item);
                    }
                }
            }
            catch (Exception ex)
            {
                Trace.TraceError(ex.Message);
            }
            finally
            {
                IsBusy = false;
            }
        }
Example #5
0
        private async Task LoadGenres()
        {
            if (IsBusy)
            {
                return;
            }

            IsBusy = true;

            try
            {
                Genres.Clear();
                var genres = await GenreService.GetAsync();

                var itemViewModels = genres.Select(m => CreateGenresItemViewModel(m)).OrderBy(g => g.Genre.Name);
                Genres = new ObservableCollection <GenresItemViewModel>(itemViewModels);
            }
            catch (Exception ex)
            {
                LogManager.GetCurrentClassLogger().Error(ex);
            }
            finally
            {
                IsBusy = false;
            }
        }
Example #6
0
        private void updateObservableListings() /* call whenever adding/removing a movie from static list */
        {
            Genres.Clear();
            Directors.Clear();
            Actors.Clear();

            foreach (Genre genre in NeoSingleton._allGenres())
            {
                if (!Genres.Contains(genre.Name))
                {
                    Genres.Add(genre.Name);
                }
            }

            foreach (Director director in NeoSingleton._allDirectors())
            {
                if (!Directors.Contains(director.Name))
                {
                    Directors.Add(director.Name);
                }
            }

            foreach (Actor actor in NeoSingleton._allActors())
            {
                if (!Actors.Contains(actor.Name))
                {
                    Actors.Add(actor.Name);
                }
            }
        }
Example #7
0
 public void Clear()
 {
     Query = null;
     Genres.Clear();
     IsAction          = false;
     VolumeDirection   = null;
     ControlActionName = null;
 }
Example #8
0
        private void PopulateGenres()
        {
            Genres.Clear();

            foreach (string genre in m_DataModel.Database.Genres)
            {
                Genres.Add(new MusicCollectionItem(genre, Genres.Count));
            }
        }
Example #9
0
        private void LoadGenres()
        {
            Genres.Clear();
            var genresFromDb = dm.Genres.ToList();

            foreach (var genre in genresFromDb)
            {
                Genres.Add(new GenreViewModel(genre));
            }
        }
        public override void Cleanup()
        {
            _nextUpLoaded = _latestUnwatchedLoaded = _upcomingLoaded = _showsLoaded = _genresLoaded = false;
            _parentId     = null;

            NextUpList.Clear();
            LatestUnwatched.Clear();
            Upcoming.Clear();
            Shows.Clear();
            Genres.Clear();

            base.Cleanup();
        }
        public override void Cleanup()
        {
            _artistsLoaded = _albumsLoaded = _songsLoaded = _genresLoaded = false;
            _parentId      = null;

            Genres.Clear();
            Songs.Clear();
            Artists.Clear();
            Albums.Clear();
            SelectedTracks.Clear();

            base.Cleanup();
        }
        public override void Cleanup()
        {
            _moviesLoaded = _boxsetsLoaded = _latestUnwatchedLoaded = _genresLoaded = false;
            _parentId     = null;

            Movies.Clear();
            Boxsets.Clear();
            LatestUnwatched.Clear();
            Genres.Clear();

            UnseenHeader = null;

            base.Cleanup();
        }
Example #13
0
        private void updateObservableListings() /* call whenever adding/removing a movie from static list */
        {
            Genres.Clear();
            Directors.Clear();
            Actors.Clear();
            foreach (Movie movie in movieList.Instance.listMovieValues)
            {
                if (movie.Genres != null)
                {
                    foreach (Genre genre in movie.Genres)
                    {
                        if (!Genres.Contains(genre.Name))
                        {
                            Genres.Add(genre.Name);
                        }
                    }
                }
                if (movie.Directors != null)
                {
                    foreach (Director director in movie.Directors)
                    {
                        if (!Directors.Contains(director.Name))
                        {
                            Directors.Add(director.Name);
                        }
                    }
                }
                if (movie.Actors != null)
                {
                    foreach (Actor actor in movie.Actors)
                    {
                        if (!Actors.Contains(actor.Name))
                        {
                            Actors.Add(actor.Name);
                        }
                    }
                }
            }

            Actors    = new ObservableCollection <string>(Actors.OrderBy(o => o).ToList());
            Directors = new ObservableCollection <string>(Directors.OrderBy(o => o).ToList());
            Genres    = new ObservableCollection <string>(Genres.OrderBy(o => o).ToList());
        }
Example #14
0
        public void Translate(TranslatorLanguage language)
        {
            Translator tr = new Translator();

            tr.ToLanguage = language;

            Summary = tr.Translate(Summary);
            Tagline = tr.Translate(Tagline);

            string tmp = tr.Translate(Genres.ToString());

            Genres.Clear();
            foreach (string currGenre in tmp.Split('|'))
            {
                if (currGenre.Trim().Length > 0)
                {
                    Genres.Add(currGenre.Trim());
                }
            }
        }
        private void ClearGUI()
        {
            // Recommended for identification
            Title.Clear();
            IMDB_ID.Clear();
            TMDB_ID.Clear();

            // additional collection infos
            CollectionTitle.Clear();
            CollectionIndex.Clear();
            CollectionKeywords.Clear();
            // additional movie infos
            ReleaseDate.Clear();
            Overview.Clear();
            Tagline.Clear();
            Certification.Clear();
            Genres.Clear();
            Actors.Clear();
            Directors.Clear();
            Writers.Clear();
            MovieKeywords.Clear();
        }
Example #16
0
        public void ClearCollection()
        {
            Artists.Clear();
            Genres.Clear();
            Directories.Clear();
            Songs.Clear();

            m_AlbumLookup.Clear();
            m_GenreFilteredAlbumLookup.Clear();

            m_ArtistExpansion             = new SortedDictionary <LibraryItem, ISet <Album> >();
            m_AlbumExpansion              = new SortedDictionary <LibraryItem, ISet <Song> >();
            m_GenreExpansion              = new SortedDictionary <LibraryItem, ISet <GenreFilteredAlbum> >();
            m_GenreFilteredAlbumExpansion = new SortedDictionary <LibraryItem, ISet <Song> >();
            m_DirectoryExpansion          = new SortedDictionary <LibraryItem, ISet <LibraryItem> >();

            m_ArtistExpansion.Clear();
            m_AlbumExpansion.Clear();
            m_GenreExpansion.Clear();
            m_GenreFilteredAlbumExpansion.Clear();

            NotifyPropertyChanged("Database");
        }
Example #17
0
 public void RemoveAllGenres()
 {
     Genres.Clear();
 }
Example #18
0
        public void Get(string guideid)
        {
            if (string.IsNullOrEmpty(guideid))
            {
                return;
            }

            GuideId = guideid;
            var sUrl = string.Format(
                "http://opml.radiotime.com/Describe.ashx?id={0}&detail=genre,recommendation&{1}", GuideId,
                Grabber.Settings.GetParamString());

            //Log.Debug("Get Station " + sUrl);
            IsAvailable = false;
            if (string.IsNullOrEmpty(GuideId))
            {
                return;
            }
            IsAvailable = true;
            var response = RetrieveData(sUrl);

            if (response != null)
            {
                Genres.Clear();
                Similar.Clear();
                var reader   = new StreamReader(response, Encoding.UTF8, true);
                var sXmlData = reader.ReadToEnd().Replace('\0', ' ');
                response.Close();
                reader.Close();
                try
                {
                    var doc = new XmlDocument();
                    doc.LoadXml(sXmlData);
                    // skip xml node
                    var root      = doc.FirstChild.NextSibling;
                    var bodynodes = root.SelectSingleNode("body");
                    var i         = 0;
                    foreach (XmlNode node in bodynodes)
                    {
                        switch (i)
                        {
                        case 0:
                            foreach (XmlNode childNode in node.ChildNodes[0].ChildNodes)
                            {
                                switch (childNode.Name.ToLower())
                                {
                                case "name":
                                    Name = childNode.InnerText;
                                    break;

                                case "language":
                                    Language = childNode.InnerText;
                                    break;

                                case "frequency":
                                    Frequency = childNode.InnerText;
                                    break;

                                case "slogan":
                                    Slogan = childNode.InnerText;
                                    break;

                                case "logo":
                                    Logo = childNode.InnerText;
                                    break;

                                case "location":
                                    Location = childNode.InnerText;
                                    break;

                                case "is_preset":
                                    IsPreset = childNode.InnerText == "false" ? false : true;
                                    break;

                                case "is_available":
                                    IsAvailable = childNode.InnerText == "false" ? false : true;
                                    break;

                                case "has_schedule":
                                    HasSchedule = childNode.InnerText == "false" ? false : true;
                                    break;
                                }
                            }
                            break;

                        case 1:
                            foreach (XmlNode childNode in node.ChildNodes)
                            {
                                Genres.Add(new RadioTimeOutline(childNode));
                            }
                            break;

                        case 2:
                            foreach (XmlNode childNode in node.ChildNodes)
                            {
                                Similar.Add(new RadioTimeOutline(childNode));
                            }
                            break;
                        }

                        i++;
                    }
                }
                catch (Exception)
                {
                }
                Slogan   = string.IsNullOrEmpty(Slogan) ? " " : Slogan;
                Language = string.IsNullOrEmpty(Language) ? " " : Language;
            }
        }
Example #19
0
        public override void Fill(int Reference)
        {
            if (Reference == 0)
            {
                return;
            }
            using (new WaitCursor())
                using (IDbCommand cmd = BDPPCDatabase.getCommand())
                {
                    cmd.CommandText = "SELECT REFSERIE, TITRESERIE, TERMINEE, SUJETSERIE, REMARQUESSERIE, SITEWEB, S.REFEDITEUR, S.REFCOLLECTION, NOMCOLLECTION "
                                      + "FROM SERIES S LEFT JOIN COLLECTIONS C ON S.REFCOLLECTION = C.REFCOLLECTION "
                                      + "WHERE REFSERIE = ?";
                    cmd.Parameters.Add(BDPPCDatabase.getParameter("@refserie", Reference));
                    using (IDataReader result = cmd.ExecuteReader())
                        using (BaseDataReader dataReader = new BaseDataReader(result, this.GetType()))
                            if (result != null && result.Read())
                            {
                                dataReader.loadData(this);
                                Terminee = dataReader.GetInt(2, -1);
                                Editeur.Fill();
                            }

                    cmd.CommandText = "SELECT REFALBUM, TITREALBUM, INTEGRALE, HORSSERIE, TOME, TOMEDEBUT, TOMEFIN, REFSERIE "
                                      + "FROM ALBUMS "
                                      + "WHERE REFSERIE = ? ";
                    if (FIdAuteur != -1)
                    {
                        cmd.CommandText += "AND REFALBUM IN (SELECT REFALBUM FROM AUTEURS WHERE REFPERSONNE = ?) ";
                    }
                    cmd.CommandText += "ORDER BY COALESCE(HORSSERIE, -1), COALESCE(INTEGRALE, -1), COALESCE(TOME, -1)";
                    cmd.Parameters.Clear();
                    cmd.Parameters.Add(BDPPCDatabase.getParameter("@RefSerie", Reference));
                    if (FIdAuteur != -1)
                    {
                        cmd.Parameters.Add(BDPPCDatabase.getParameter("@FIdAuteur", FIdAuteur));
                    }

                    using (IDataReader result = cmd.ExecuteReader())
                        using (BaseDataReader dataReader = new BaseDataReader(result, typeof(Album)))
                            if (result != null)
                            {
                                dataReader.fillList(Albums);
                            }

                    cmd.CommandText = "SELECT Genre "
                                      + "FROM GenreSeries s INNER JOIN Genres g ON g.RefGenre = s.RefGenre "
                                      + "WHERE RefSerie = ?";
                    cmd.Parameters.Clear();
                    cmd.Parameters.Add(BDPPCDatabase.getParameter("@RefSerie", Reference));
                    Genres.Clear();
                    using (IDataReader result = cmd.ExecuteReader())
                        using (BaseDataReader dataReader = new BaseDataReader(result, null))
                            while (result.Read())
                            {
                                Genres.Add(dataReader.GetString(0, string.Empty));
                            }

                    ArrayList Auteurs = new ArrayList();
                    StoredProcedures.Proc_Auteurs(Auteurs, -1, Reference);
                    Scenaristes.Clear();
                    Dessinateurs.Clear();
                    Coloristes.Clear();
                    foreach (Auteur auteur in Auteurs)
                    {
                        switch (auteur.Metier)
                        {
                        case 0:
                        {
                            Scenaristes.Add(auteur);
                            break;
                        }

                        case 1:
                        {
                            Dessinateurs.Add(auteur);
                            break;
                        }

                        case 2:
                        {
                            Coloristes.Add(auteur);
                            break;
                        }
                        }
                    }
                }
        }
Example #20
0
 public void ClearList()
 {
     Directors.Clear();
     Genres.Clear();
     Sessions.Clear();
 }