CancelConversion

 

void CancelConversion( )

Description

Cancel the conversion process.

Example

    C#

using System;

using DigitalOfficePro.PowerFlashPointSDK.PFPConverter;

namespace CancelConversionSample

{

    class Program

    {

        static PFPConverter thePresConverter;

        static System.Timers.Timer convertionTimeOut;

        static void Main(string[] args)

        {

            thePresConverter = new PFPConverter();

            Console.WriteLine("Opening Presentation.");

            thePresConverter.OpenPresentation("C:\\a_large_Presentation.pptx");

            Console.WriteLine("Presentation opened.");

            convertionTimeOut = new System.Timers.Timer();

            convertionTimeOut.Elapsed += new System.Timers.ElapsedEventHandler(convertionTimeOut_Elapsed);

            convertionTimeOut.Interval = 10000;

            convertionTimeOut.Start();

            Console.WriteLine("Conversion Timeout set to " + (convertionTimeOut.Interval / 1000).ToString() + " sec.");

            Console.WriteLine("Starting conversion");

            thePresConverter.Convert("c:\\123.swf");

            thePresConverter.ClosePresentation();

            if (convertionTimeOut.Enabled == true)

            {

                Console.WriteLine("Successfully completed");

            }

            convertionTimeOut.Stop();

           

        }

 

        static void convertionTimeOut_Elapsed(object sender, System.Timers.ElapsedEventArgs e)

        {

            convertionTimeOut.Stop();

            Console.WriteLine("Conversion Timeout.");

            thePresConverter.CancelConversion();

        }

    }

}

 

Related Topics

Methods


Home | About Us | Products | Downloads | Support
© 2016 DigitalOfficePro.com. All Rights Reserved.