示例#1
0
文件: Lib.cs 项目: AlexAbramov/gis
        public void Read(Context context, BinaryReader br)
        {
            id = br.ReadInt32();
//			UpdateGen(this);
            attr = br.ReadInt32();
            name = br.ReadString();
            context.SetStyle(br.ReadString(), ref styleStr, ref style);
            context.SetStyle(br.ReadString(), ref defaultStyleStr, ref defaultStyle);
            smin          = br.ReadInt32();
            smax          = br.ReadInt32();
            bounds        = context.Buf.ReadRect(br);
            indexer       = new Indexer(context.Buf.ReadIntArray(br));
            scales.Values = context.Buf.ReadIntArray(br);
            if (scales.Count == 0)
            {
                scales.InitScales();
            }
        }
示例#2
0
文件: Lib.cs 项目: AlexAbramov/gis
 public GLib(ConnectionFactory connFactory, Rect bounds, IIndexer indexer)
 {
     Init(connFactory);
     this.indexer = indexer == null ? new Indexer() : indexer;
     this.bounds  = bounds;
     this.SMax    = (int)(Math.Max(bounds.Width, bounds.Height) * unitMeasure * 10);
     Scales.InitScales();
     updateAttr[Constants.updateAttrCreated] = true;
     SetChanged();
 }