コード例 #1
0
        private static void Loadthemes(string inputUrl)
        {
            JabberPoint.Data.theme data;

            ThemeXmlLoader loader = new ThemeXmlLoader(inputUrl);

            data = loader.RootObject;

            var themes = Themes.GetSingleton();
            var theme  = new JabberPoint.Domain.Themes.ThemeCollection();

            theme.Name = inputUrl;
            foreach (var filter in data.themefilters)
            {
                if (string.Compare(filter.@for, "default", true) == 0)
                {
                    theme.PageThemes.Add(-1, SetPageTheme(filter, data.styles));
                }
                else
                {
                    foreach (var page in [email protected](','))
                    {
                        theme.PageThemes.Add(int.Parse(page), SetPageTheme(filter, data.styles));
                    }
                }
            }
            themes.SetList(new List <ThemeCollection>()
            {
                theme
            });
            themes.SetCurrentTheme(theme.Name);
        }
コード例 #2
0
        public static void SetFooter(ISlideshow slideshow)
        {
            slideshow.Footers.Clear();
            var theme = Themes.GetSingleton();

            foreach (var footer in theme.GetFooterData())
            {
                ISlideSection footerSection = new SlideSection(slideshow);
                foreach (var footerdata in footer.Value)
                {
                    footerSection.Contents.Add(footerSection.Contents.Count, new TextContentFactory(footerdata.Text, footerdata.Level).GetContent(slideshow));
                }
                slideshow.Footers.Add(footer.Key, footerSection);
            }
        }
コード例 #3
0
        public void UpdateSlide(ISlideSection slide, int currentIndex)
        {
            var themes = Themes.GetSingleton();
            var used   = !string.IsNullOrWhiteSpace(themes.GetBackgroundImage(currentIndex));

            BackGroundUsed = used;

            if (used)
            {
                BackgroundImage = AppDomain.CurrentDomain.BaseDirectory + "\\" + themes.GetBackgroundImage(currentIndex);
            }

            if (!BackGroundUsed)
            {
                BackgroundColor = new SolidColorBrush((Color)ColorConverter.ConvertFromString(themes.GetBackgroundColor(currentIndex)));
            }

            CurrentSlideVM = new SlideSectionViewModel(slide, currentIndex);
        }