Esempio n. 1
0
        /// <summary>
        /// Subs the grid.
        /// </summary>
        /// <returns>The grid.</returns>
        /// <param name="row">Row.</param>
        /// <param name="col">Col.</param>
        public ZGrid <T> SubGrid(int row, int col, int width, int height)
        {
            if (row + height >= this.Height)
            {
                return(null);
            }

            if (col + width >= this.Width)
            {
                return(null);
            }

            ZGrid <T> ret = new ZGrid <T> (width, height);


            for (int i = 0; i < height; i++)
            {
                for (int j = 0; j < width; j++)
                {
                    ret.Datas [i, j] = Datas [i + row, j + col];
                }
            }

            return(ret);
        }
Esempio n. 2
0
 internal ZRowIterator(ZGrid <T> grid, int curRow)
 {
     _grid = grid;
     cur   = curRow;
 }
Esempio n. 3
0
 internal ZRowsEnumerator(ZGrid <T> grid)
 {
     _grid = grid;
 }
Esempio n. 4
0
 internal ZGridIterator(ZGrid <T> grid)
 {
     _grid = grid;
 }
Esempio n. 5
0
 internal ZRowEnumerator(ZGrid <T> grid, int curRow)
 {
     _grid       = grid;
     this.curRow = curRow;
 }