Ejemplo n.º 1
0
        internal override bool TrySetPair(DxfCodePair pair)
        {
            switch (pair.Code)
            {
            case 3:
                _lastEntryName = pair.StringValue;
                break;

            case 280:
                this.IsHardOwner = BoolShort(pair.ShortValue);
                break;

            case 281:
                this.DuplicateRecordHandling = (DxfDictionaryDuplicateRecordHandling)(pair.ShortValue);
                break;

            case 350:
            case 360:
                Debug.Assert(_lastEntryName != null);
                var handle = DxfCommonConverters.HandleString(pair.StringValue);
                _items[_lastEntryName] = new DxfPointer(handle);
                _lastEntryName         = null;
                break;

            default:
                return(base.TrySetPair(pair));
            }

            return(true);
        }
Ejemplo n.º 2
0
        public IList <Tuple <DxfEntity, uint> > EntitiesWithDrawOrder()
        {
            List <Tuple <DxfEntity, uint> > ret = new List <Tuple <DxfEntity, uint> >(SortItemsPointers.Count);

            Debug.Assert(SortItemsPointers.Count == EntitiesPointers.Count);
            for (int i = 0; i < SortItemsPointers.Count; ++i)
            {
                DxfPointer ptr = SortItemsPointers.Pointers[i];
                ret.Add(new Tuple <DxfEntity, uint>(EntitiesPointers[i], ptr.Handle));
            }
            return(ret);
        }
Ejemplo n.º 3
0
 public IDxfItem this[string key]
 {
     get { return(_items[key].Item); }
     set { _items[key] = new DxfPointer(value); }
 }
Ejemplo n.º 4
0
 public IDxfItem this[string key]
 {
     get { return(_items.ContainsKey(key) ? _items[key].Item : DefaultObject); }
     set { _items[key] = new DxfPointer(value); }
 }