Exemplo n.º 1
0
        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;
            }
        }
Exemplo n.º 2
0
 private void OnModelClosing(IXDocument doc, DocumentCloseType_e type)
 {
     //TODO: handle closing
 }