Example #1
0
        private void loadBackground(object options)
        {
            foreach (FilteredTitleCollection year in TitleCollectionManager.GetAllYearsGrouped(m_filters))
            {
                Library.Code.V3.YearBrowseGroup testGroup2 = new Library.Code.V3.YearBrowseGroup(new List <Title>(year.Titles));
                testGroup2.Owner = this;
                //tmp hack for unknown dates
                if (year.Name == "1900")
                {
                    testGroup2.Description = "UNKNOWN";
                }
                else
                {
                    testGroup2.Description = year.Name;
                }

                testGroup2.DefaultImage = null;
                testGroup2.Invoked     += delegate(object sender, EventArgs args)
                {
                    OMLProperties properties = new OMLProperties();
                    properties.Add("Application", OMLApplication.Current);
                    properties.Add("I18n", I18n.Instance);
                    Command CommandContextPopOverlay = new Command();
                    properties.Add("CommandContextPopOverlay", CommandContextPopOverlay);

                    List <TitleFilter> newFilter = new List <TitleFilter>(m_filters);
                    newFilter.Add(new TitleFilter(TitleFilterType.Year, year.Name));

                    Library.Code.V3.GalleryPage gallery = new Library.Code.V3.GalleryPage(newFilter, testGroup2.Description);

                    properties.Add("Page", gallery);
                    OMLApplication.Current.Session.GoToPage(@"resx://Library/Library.Resources/V3_GalleryPage", properties);
                };

                testGroup2.ContentLabelTemplate = Library.Code.V3.BrowseGroup.StandardContentLabelTemplate;
                m_listContent.Add(testGroup2);
            }

            this.IsBusy = false;
        }