public Region(String id, Int32 left, Int32 top, Int32 width, Int32 height, RegionMode mode)
 {
     if (Regions != null && Regions.Any(r => r.Id == id))
     {
         throw new ArgumentException("id");
     }
     this.Id = id;
     this.Mode = mode;
     this.Left = left;
     this.Top = top;
     this.Width = width;
     this.Height = height;
     this._cells = new Cell[this.Width * this.Height];
     this._buffer = new StringBuilder();
     this.CharTranslator = new Dictionary<Char, IEnumerable<Char>>();
     this.CursorPosition = this.Relative(0, 0);
 }
Exemple #2
0
 public static Region CreateRegion(String id, Int32 left, Int32 top, Int32 width, Int32 height, RegionMode mode)
 {
     var region = new Region(id, left, top, width, height, mode);
     _regions.Insert(0, region);
     return region;
 }