コード例 #1
0
ファイル: Util.cs プロジェクト: Miramac/node-office-script
 public static void ShapeTextReplace(PowerPoint.TextRange textRange, Dictionary<string, string> replaces)
 {
     // var text = textRange.Text;
     foreach (var replace in replaces)
     {
         while(textRange.Text.Contains(replace.Key))
         {
             textRange.Replace(replace.Key, replace.Value);
         }
     }
 }
コード例 #2
0
 public Paragraph(PowerPoint.Shape shape, Dictionary<string, object> parameters)
 {
     this.shape = shape;
     object tmp;
     if (parameters.TryGetValue("start", out tmp))
     {
         this.start = (int)tmp;
     }
     else
     {
         this.start = -1;
     }
     if (parameters.TryGetValue("length", out tmp))
     {
         this.length = (int)tmp;
     }
     else
     {
         this.length = -1;
     }
 }
コード例 #3
0
ファイル: Shape.cs プロジェクト: Miramac/node-office-script
 public Shape(PowerPoint.Shape shape)
 {
     this.shape = shape;
     this.tags = new PowerPointTags(this.shape);
 }
コード例 #4
0
 public Presentation(PowerPoint.Presentation presentation)
 {
     this.presentation = presentation;
     this.tags = new PowerPointTags(this.presentation);
     this.properties = new DocumentProperty(this.presentation);
 }
コード例 #5
0
 public PowerPointTags(PowerPoint.Shape shape)
 {
     this.element = shape;
 }
コード例 #6
0
 public PowerPointTags(PowerPoint.Slide slide)
 {
     this.element = slide;
 }
コード例 #7
0
 public PowerPointTags(PowerPoint.Presentation presentation)
 {
     this.element = presentation;
 }
コード例 #8
0
 public DocumentProperty(PowerPoint.Presentation presentation)
 {
     this.element = presentation;
 }
コード例 #9
0
ファイル: Addin.cs プロジェクト: toddjobe/Home
        /// <summary>
        /// Slide Show End Event handler
        /// </summary>
        /// <param name="command">PowerPoint.Presentation pres.</param>
        private void powerApplication_SlideShowEndEvent(PowerPoint.Presentation pres)
        {
            bool test = true;
            if (test)
            {
                MessageBox.Show("Called SlideshowEndEvent");
            }
            else
            {

                // quit recording video
                // Not sure this will work.  In fact, I'm almost sure it won't.
                _recThread.Start("q");

                // dispose of the slide show event listeners.
                // Not sure this will work nested.
                _powerApplication.SlideShowBeginEvent -= powerApplication_SlideShowBeginEvent;
                _powerApplication.SlideShowEndEvent += powerApplication_SlideShowEndEvent;
            }
        }
コード例 #10
0
ファイル: Addin.cs プロジェクト: toddjobe/Home
        /// <summary>
        /// Slide Show Begin Event handler
        /// </summary>
        /// <param name="command">PowerPoint.Presentation pres.</param>
        private void powerApplication_SlideShowBeginEvent(PowerPoint.SlideShowWindow ssw)
        {
            bool test = true;
            if (test)
            {
                MessageBox.Show("Called SlideshowBeginEvent");
            }
            else
            {

                // Start the screencast recorder (depends on ffmpeg)
                // Could use its API which is libavformat, but I'm lazy right now
                /* pipe the screen as mpeg4 to a file or mux it
                * Not sure exactly how to 'quit' the process right now.  Normally, you'd type 'q' on terminal.
                * ffmpeg -f dshow  -i video="UScreenCapture"  -r 30 -vcodec mpeg4 -q 12 -f %temp%/sermon.mp4
                * This command below uses UDP for streaming which means packets could be lost or bandwidth could be gobbled up.
                * http://nerdlogger.com/2011/11/03/stream-your-windows-desktop-using-ffmpeg/
                ffmpeg -f dshow  -i video="UScreenCapture"  -r 30 -vcodec mpeg4 -q 12 -f mpegts udp://aaa.bbb.ccc.ddd:6666?pkt_size=188?buffer_size=65535
                */

                _recThread = ExecuteCommandAsync("ffmpeg -f dshow  -i video=\"UScreenCapture\"  -r 30 -vcodec mpeg4 -q 12 -f %temp%/sermon.mp4");
            }
        }
コード例 #11
0
ファイル: Slide.cs プロジェクト: Miramac/node-office-script
 private void TextReplace(PowerPoint.TextRange textRange, Dictionary<string, string> replaces)
 {
     var text = textRange.Text;
     foreach (var replace in replaces)
     {
         if(text.Contains(replace.Key))
         {
             textRange.Replace(replace.Key, replace.Value);
         }
     }
 }
コード例 #12
0
ファイル: Slide.cs プロジェクト: Miramac/node-office-script
 public Slide(PowerPoint.Slide slide)
 {
     this.slide = slide;
     this.tags = new PowerPointTags(this.slide);
 }