/// <summary> /// After document was parsed, now it's time for charts, processed concurrent with presentation /// </summary> /// <param name="path">Source document path</param> /// <param name="worker">Background Worker</param> /// <param name="document">Current KineSis Document</param> public static void CreateNewDocumentCharts(String path, BackgroundWorker worker, Document document) { FileInfo file = new FileInfo(path); DocumentHelper helper = GetHelperForDocument(path); if (helper != null) { ProcessingProgress pp = new ProcessingProgress(worker); try { if (helper is PowerPointDocumentHelper) { PowerPointDocumentHelper h = (PowerPointDocumentHelper)helper; h.ParseNewDocumentCharts(path, pp, document); } else if (helper is ExcelDocumentHelper) { ExcelDocumentHelper h = (ExcelDocumentHelper)helper; h.ParseNewDocumentCharts(path, pp, document); } else if (helper is WordDocumentHelper) { WordDocumentHelper h = (WordDocumentHelper)helper; h.ParseNewDocumentCharts(path, pp, document); } } catch (Exception ex) { pp.OverallOperationName = "[Exception] " + ex.Message; // pp.OverallOperationTotalElements = 1; // MessageBox.Show(ex.Message); } Document.serialize(document, TEMP_DIRECTORY + "\\" + document.Location + ".xml"); ProfileManager.AddDocumentToActive(document.Name, document.Location); ProfileManager.Serialize(); } }