private static void GetSavedDocument(object obj) { object[] arr = (obj as object[]); FileInfo inputFile = (FileInfo)arr[0]; HtmlStore[] retValue = null; string fileName = WordAdapter.SaveDocument(inputFile.FullName); retValue = DocxParser.Parse(fileName); try { if (!String.IsNullOrEmpty(fileName)) { File.Delete(fileName); } } catch { } ParsingFinishDelegate callback = (ParsingFinishDelegate)arr[1]; callback.Invoke(inputFile, retValue); }
private static void GetTestAsync(object obj) { object[] arr = (obj as object[]); FileInfo inputFile = (FileInfo)arr[0]; HtmlStore[] retValue = null; ParsingFinishDelegate callback = (ParsingFinishDelegate)arr[1]; try { retValue = DocxParser.Parse(inputFile.FullName); } catch (IOException ex) { SystemMessage.ShowErrorMessage(ex); callback.Invoke(inputFile, null); return; } callback.Invoke(inputFile, retValue); }