Exemplo n.º 1
0
        public void ToggleGrid()
        {
            ArtistInfo   aa        = MySource.getAlbumModel().filterArtist();
            CS_GenreInfo gg        = MySource.getAlbumModel().filterGenre();
            string       fa        = "";
            bool         in_tracks = false;

            MySource.getAlbumModel().filterAlbumOrTracks(out fa, out in_tracks);
            string a = "@@allartist@@";

            if (aa != null)
            {
                a = aa.Name;
            }
            string g = "@@allgenre@@";

            if (gg != null)
            {
                g = gg.Genre;
            }
            string f = "@@searchfilter@@";

            if (fa != null)
            {
                f = fa;
            }
            string id = a + "-" + g + "-" + f;

            ToggleGrid(id);
        }
Exemplo n.º 2
0
 public void filterGenre(CS_GenreInfo g)
 {
     if (g == null)
     {
         _genre = null;
         Reload();
     }
     else if (_genre == null)
     {
         _genre    = g;
         _artist   = null;
         _composer = null;
         Reload();
     }
     else
     {
         if (_genre.Genre == g.Genre)
         {
             // do nothing
         }
         else
         {
             _genre    = g;
             _artist   = null;
             _composer = null;
             Reload();
         }
     }
 }
Exemplo n.º 3
0
 public CS_AlbumModel(CueSheetsSource s)
 {
     MySource      = s;
     _filteredList = new List <CS_AlbumInfo>();
     Selection     = new Hyena.Collections.Selection();
     _genre        = null;
     Reload();
 }
Exemplo n.º 4
0
        public void EvtGenreActivated(object sender, RowActivatedArgs <CS_GenreInfo> args)
        {
            CS_GenreInfo g = args.RowValue;

            if (MySource.getGenreModel().isNullGenre(g))
            {
                g = null;
            }
            MySource.getAlbumModel().filterGenre(g);
            MySource.getArtistModel().filterGenre(g);
            MySource.getComposerModel().filterGenre(g);
            SetGrid();
        }
Exemplo n.º 5
0
        public void SetGrid()
        {
            ArtistInfo   aa        = MySource.getAlbumModel().filterArtist();
            CS_GenreInfo gg        = MySource.getAlbumModel().filterGenre();
            string       fa        = "";
            bool         in_tracks = false;

            MySource.getAlbumModel().filterAlbumOrTracks(out fa, out in_tracks);
            string a = "@@allartist@@";

            if (aa != null)
            {
                a = aa.Name;
            }
            string g = "@@allgenre@@";

            if (gg != null)
            {
                g = gg.Genre;
            }
            string f = "@@searchfilter@@";

            if (fa != null)
            {
                f = fa;
            }
            string id = a + "-" + g + "-" + f;

            Hyena.Log.Information("SetGrid for id " + id);
            bool grid = MySource.getGridLayout(id);

            Hyena.Log.Information("Grid = " + grid);
            if (grid)
            {
                aview.EnableGrid();
            }
            else
            {
                aview.DisableGrid();
            }
        }
Exemplo n.º 6
0
 public void filterGenre(CS_GenreInfo g)
 {
     _genre = g;
     Reload();
 }