Exemple #1
0
        public void Init(Media media)
        {
            if (!(media is DocumentMedia))
            {
                throw new ArgumentException("media must be of type DocumentMedia");
            }

            this.media = media as DocumentMedia;

            if (!media.Uri.IsFile)
            {
                throw new NotImplementedException("Loading remote URIs not implemented yet.");
            }

            presentation = this.media.CreatePresentation();
            presentation.DocumentLoaded += (sender, args) =>
            {
                LoadState = ControlPanelLoadState.Loaded;
                Controller.PresentationManager.CurrentPresentation = presentation;
                OnPropertyChanged("FormattedPageCount");
            };
            presentation.Load();
        }
        public void Init(Media media)
        {
            if (!(media is DocumentMedia))
                throw new ArgumentException("media must be of type DocumentMedia");

            this.media = media as DocumentMedia;

            if (!media.Uri.IsFile)
                throw new NotImplementedException("Loading remote URIs not implemented yet.");

            presentation = this.media.CreatePresentation();
            presentation.DocumentLoaded += (sender, args) =>
            {
                LoadState = ControlPanelLoadState.Loaded;
                Controller.PresentationManager.CurrentPresentation = presentation;
                OnPropertyChanged("FormattedPageCount");
            };
            presentation.Load();
        }