Exemplo n.º 1
0
 /// <summary>
 /// Closes the presentation.
 /// </summary>
 public void Close()
 {
     if (!closed)
     {
         PowerpointViewerController.ClosePPT(this.id);
         closed = true;
     }
 }
Exemplo n.º 2
0
        internal PowerpointViewerDocument(string filename, Rectangle rect, bool generateThumbnails, bool openHidden, int thumbnailWidth)
        {
            this.rect       = rect;
            this.openHidden = openHidden;

            if (generateThumbnails)
            {
                this.captureThumbs  = new List <ThumbnailWrapper>();
                this.thumbnailWidth = thumbnailWidth;
            }

            string cmd = PowerpointViewerController.ViewerPath + " /F /S \"" + filename + "\"";

            del = new PowerpointViewerController.CallbackDelegate(Callback);

            this.id = PowerpointViewerController.OpenPPT(new StringBuilder(cmd), del, IntPtr.Zero, rect.X, rect.Y, rect.Width, rect.Height);
            if (this.id == -1)
            {
                throw new PowerpointViewerController.PowerpointViewerOpenException();
            }
        }