示例#1
0
        protected virtual SwDmComponent CreateComponentInstance(ISwDMComponent dmComp)
        {
            var comp = SwDmObjectFactory.FromDispatch <SwDmComponent>(dmComp, m_OwnerAssm);

            comp.OwnerAssembly = m_OwnerAssm;
            return(comp);
        }
示例#2
0
        protected virtual SwDmComponent CreateComponentInstance(ISwDMComponent dmComp)
        {
            var compName = ((ISwDMComponent7)dmComp).Name2;

            if (!m_ComponentsCache.TryGetValue(compName, out SwDmComponent comp))
            {
                comp = SwDmObjectFactory.FromDispatch <SwDmComponent>(dmComp, m_ParentAssm);
                m_ComponentsCache.Add(compName, comp);
            }

            return(comp);
        }
示例#3
0
        public IEnumerator <IXDrawingView> GetEnumerator()
        {
            var views = ((ISwDMSheet4)m_Sheet.Sheet).GetViews() as object[] ?? new object[0];

            return(views.Cast <ISwDMView>().Select(v => SwDmObjectFactory.FromDispatch <ISwDmDrawingView>(v, m_Drw)).GetEnumerator());
        }