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(); } }
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(); }