Ejemplo n.º 1
0
        internal SwSheetEnumerator(SwDrawing doc)
        {
            m_Doc = doc;

            m_CurSheetIndex = -1;
            m_SheetNames    = (string[])m_Doc.Drawing.GetSheetNames();
        }
Ejemplo n.º 2
0
        internal SwDrawingView(IView drwView, SwDrawing drw, ISheet sheet, bool created)
            : base(drw.Model, drwView)
        {
            m_Drawing = drw;
            m_Creator = new ElementCreator <IView>(CreateDrawingView, drwView, created);

            if (created)
            {
                sheet = drwView.Sheet;
            }
            else
            {
                m_CachedLocation = new Point(0, 0, 0);
            }

            m_Sheet = sheet;
        }
Ejemplo n.º 3
0
        private void AttachDocument(IModelDoc2 model)
        {
            if (!m_Documents.ContainsKey(model))
            {
                SwDocument doc = null;

                switch (model)
                {
                case IPartDoc part:
                    doc = new SwPart(part, m_App, m_Logger);
                    break;

                case IAssemblyDoc assm:
                    doc = new SwAssembly(assm, m_App, m_Logger);
                    break;

                case IDrawingDoc drw:
                    doc = new SwDrawing(drw, m_App, m_Logger);
                    break;

                default:
                    throw new NotSupportedException();
                }

                doc.Destroyed += OnDocumentDestroyed;

                m_Documents.Add(model, doc);

                DocumentCreated?.Invoke(doc);
            }
            else
            {
                m_Logger.Log($"Conflict. {model.GetTitle()} already registered");
                Debug.Assert(false, "Document was not unregistered");
            }
        }
Ejemplo n.º 4
0
 internal SwSheetCollection(SwDrawing doc)
 {
     m_Doc = doc;
     m_SheetActivatedEventsHandler = new SheetActivatedEventsHandler(doc);
 }
Ejemplo n.º 5
0
 internal SwDrawingViewsCollection(SwDrawing draw, ISheet sheet)
 {
     m_Draw  = draw;
     m_Sheet = sheet;
 }
Ejemplo n.º 6
0
 internal SwDrawingView(IView drwView, SwDrawing drw)
     : this(drwView, drw, null, true)
 {
 }
Ejemplo n.º 7
0
 internal SwModelBasedDrawingView(IView drwView, SwDrawing drw, ISheet sheet, bool created)
     : base(drwView, drw, sheet, created)
 {
 }
Ejemplo n.º 8
0
 internal SwSheetCollection(SwDrawing doc, ISwApplication app)
 {
     m_App     = app;
     m_Drawing = doc;
     m_SheetActivatedEventsHandler = new SheetActivatedEventsHandler(doc, app);
 }