Ejemplo n.º 1
0
        /// <summary>
        /// To start the presentation
        /// </summary>
        /// <param name="fileName"></param>
        public static void StartPresentation(String fileName)
        {
            try
            {
                if (!DocumentPresentation.HelperMethods.HasPresentationStarted())
                {
                    //Set focus for the Floor window
                    RippleCommonUtilities.HelperMethods.ClickOnFloorToGetFocus();
                    //Set focus for screen window also
                    Utilities.Helper.ClickOnScreenToGetFocus();

                    //Find document type
                    g_doctype = GetDocumentType(fileName);
                    switch (g_doctype)
                    {
                        case DocType.PPT:
                            g_documentClass = new PPTDocumentClass(fileName);
                            break;
                    }
                    if (g_documentClass == null)
                        return;
                    g_documentClass.StartPresentation();
                    g_documentClass.SetApplicationStatus(true);

                    //Speak out
                    myBackgroundWorker = new BackgroundWorker();
                    myBackgroundWorker.DoWork += myBackgroundWorkerForSpeech_DoWork;
                    myBackgroundWorker.RunWorkerAsync();

                    //Set focus for screen window also
                    //Utilities.Helper.ClickOnScreenToGetFocus();

                }
            }
            catch (Exception ex)
            {
                //Do nothing
                RippleCommonUtilities.LoggingHelper.LogTrace(1, "Went wrong in StartPresentation for Screen {0}", ex.Message);
            }

        }
Ejemplo n.º 2
0
        /// <summary>
        /// To start the presentation
        /// </summary>
        /// <param name="fileName"></param>
        public static void StartPresentation(String fileName)
        {
            try
            {
                if (!DocumentPresentation.HelperMethods.HasPresentationStarted())
                {
                    //Set focus for the Floor window
                    RippleCommonUtilities.HelperMethods.ClickOnFloorToGetFocus();
                    //Set focus for screen window also
                    Utilities.Helper.ClickOnScreenToGetFocus();

                    //Find document type
                    g_doctype = GetDocumentType(fileName);
                    switch (g_doctype)
                    {
                    case DocType.PPT:
                        g_documentClass = new PPTDocumentClass(fileName);
                        break;
                    }
                    if (g_documentClass == null)
                    {
                        return;
                    }
                    g_documentClass.StartPresentation();
                    g_documentClass.SetApplicationStatus(true);

                    //Speak out
                    myBackgroundWorker         = new BackgroundWorker();
                    myBackgroundWorker.DoWork += myBackgroundWorkerForSpeech_DoWork;
                    myBackgroundWorker.RunWorkerAsync();

                    //Set focus for screen window also
                    //Utilities.Helper.ClickOnScreenToGetFocus();
                }
            }
            catch (Exception ex)
            {
                //Do nothing
                RippleCommonUtilities.LoggingHelper.LogTrace(1, "Went wrong in StartPresentation for Screen {0}", ex.Message);
            }
        }