Ejemplo n.º 1
0
 public HomeController()
 {
     repo          = new ContactUsRepo();
     repoAns       = new AnswerRepo();
     slideshowRepo = new SlideshowRepo();
     newsRepo      = new NewsRepo();
 }
Ejemplo n.º 2
0
        private static void SetMetaData(ISlideshow slideshow, slideshowMetainfo[] metainfo)
        {
            slideshow.MetaData["PageCount"] = slideshow.Slides.Count.ToString();

            foreach (var meta in metainfo)
            {
                slideshow.MetaData[meta.key] = meta.value;
            }

            slideshow.MetaData["CurrentViewer"] = Environment.UserName;
        }
Ejemplo n.º 3
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);
            }
        }
Ejemplo n.º 4
0
        public SlideSectionViewModel(int currentIndex, ISlideshow slideshow)//Footer
        {
            var elements = new ObservableCollection <FrameworkElement>();

            wpfContentManager.Index = currentIndex;
            foreach (var content in slideshow.GetFooter(currentIndex).Contents)
            {
                foreach (var behaviour in content.Value.Behaviours)
                {
                    var uiElement = wpfContentManager.GetControl(behaviour);
                    if (uiElement != null)
                    {
                        elements.Add(uiElement);
                    }
                }
            }
            ContentElements = elements;
        }
Ejemplo n.º 5
0
 public SlideshowController()
 {
     repo = new SlideshowRepo();
 }