/// <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); } }
/// <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); } }
/// <summary> /// On Stop /// </summary> public static void StopPresentation() { try { if (HelperMethods.HasPresentationStarted()) { if (g_documentClass == null) { return; } g_documentClass.StopPresentation(); g_documentClass.SetApplicationStatus(false); //Set focus for the Floor window RippleCommonUtilities.HelperMethods.ClickOnFloorToGetFocus(); //Set focus for screen window also Utilities.Helper.ClickOnScreenToGetFocus(); } } catch (Exception ex) { //Do nothing RippleCommonUtilities.LoggingHelper.LogTrace(1, "Went wrong in Stop Presentation for Screen {0}", ex.Message); } }