public CurrentHandle(DocxToFlowDocumentConverter converter, TextElement current) { this.converter = converter; this.converter.AddChild(current); this.previous = this.converter.current; this.converter.current = current; }
//CONVERTS FROM DOCX TO FLOWDOC, THEN CALLS SERIALIZESTORYFLOWDOC() private void ReadDocx(string path) { try { using (var stream = File.Open(path, FileMode.Open, FileAccess.Read, FileShare.ReadWrite)) { var flowDocumentConverter = new DocxToFlowDocumentConverter(stream); flowDocumentConverter.Read(); FlowDocument flowDoc = flowDocumentConverter.Document; SerializeStoryFlowDoc(flowDoc); } } catch (Exception err) { exHand.LogException(err, "StoryGenerator-ReadDocx"); } }