Exemplo n.º 1
0
        private void OnBeforeSetActiveDocument(CADDocument newDocument)
        {
            if (CurrentDocument != null)
            {
                //EndOperation(CurrentDocument);

                CurrentDocument.ParentControl.RenderWorkPanel.MouseMove -= ManagementMouseMove;
                CurrentDocument.ParentControl.RenderWorkPanel.MouseDown -= ManagementMouseDown;
                CurrentDocument.ParentControl.RenderWorkPanel.MouseUp   -= ManagementMouseUp;

                CurrentDocument.ParentControl.RenderWorkPanel.KeyDown  -= ManagementKeyDown;
                CurrentDocument.ParentControl.RenderWorkPanel.KeyUp    -= ManagementKeyUp;
                CurrentDocument.ParentControl.RenderWorkPanel.KeyPress -= ManagementKeyPress;

                CurrentDocument.ParentControl.RenderWorkPanel.Paint -= ManagementPaint;
            }

            if (newDocument != null)
            {
                newDocument.ParentControl.RenderWorkPanel.MouseMove += ManagementMouseMove;
                newDocument.ParentControl.RenderWorkPanel.MouseDown += ManagementMouseDown;
                newDocument.ParentControl.RenderWorkPanel.MouseUp   += ManagementMouseUp;

                newDocument.ParentControl.RenderWorkPanel.KeyDown  += ManagementKeyDown;
                newDocument.ParentControl.RenderWorkPanel.KeyUp    += ManagementKeyUp;
                newDocument.ParentControl.RenderWorkPanel.KeyPress += ManagementKeyPress;

                newDocument.ParentControl.RenderWorkPanel.Paint += ManagementPaint;
            }
        }
Exemplo n.º 2
0
 internal CADDocument CreateDocument(DocumentControl control)
 {
     CurrentDocument = new CADDocument {
         ParentControl = control
     };
     _documents.Add(CurrentDocument);
     return(CurrentDocument);
 }
Exemplo n.º 3
0
 public HistoryControl(CADDocument owner)
 {
     OwnerDocument = owner;
 }
Exemplo n.º 4
0
 public VertexList(List <int> indices, CADDocument document)
 {
     _indices  = indices;
     _document = document;
 }