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); }
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(); } } }
public CS_AlbumModel(CueSheetsSource s) { MySource = s; _filteredList = new List <CS_AlbumInfo>(); Selection = new Hyena.Collections.Selection(); _genre = null; Reload(); }
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(); }
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(); } }
public void filterGenre(CS_GenreInfo g) { _genre = g; Reload(); }