private void OnDocumentLoaded(object sender, DocumentDataEventArgs e) { if (!e.IsPWEDoc) { return; } var pweDoc = (IPWEDoc)e.Document; pweDoc.TextChanging += this.PweDoc_TextChanging; }
private void OnClosingDocument(object sender, DocumentDataEventArgs e) { if (!e.IsPWEDoc) { return; } var pweDoc = (IPWEDoc)e.Document; try { pweDoc.TextChanging -= this.PweDoc_TextChanging; } catch (Exception) { // ignored } }