private void OnDocumentClosing(IXDocument doc, DocumentCloseType_e type) { if (doc == m_App.Documents.Active) { InvokeTrigger(Triggers_e.DocumentClose, doc); } if (type == DocumentCloseType_e.Destroy) { switch (doc) { case IXDocument3D doc3D: doc3D.Configurations.ConfigurationActivated -= OnConfigurationActivated; break; case IXDrawing draw: draw.Sheets.SheetActivated -= OnSheetActivated; break; } doc.Selections.NewSelection -= OnNewSelection; doc.Selections.ClearSelection -= OnClearSelection; doc.Saving -= OnSaving; doc.Rebuilt -= OnRebuild; doc.Closing -= OnDocumentClosing; } }
private void OnModelClosing(IXDocument doc, DocumentCloseType_e type) { //TODO: handle closing }