예제 #1
0
        public void SplitCellImage()
        {
            int indexImage = 0; // Sắp thứ tự  chỉ số các hình

            for (int i = 0; i < BanChoi._rowNumber; i++)
            {
                for (int j = 0; j < BanChoi._colNumber; j++)
                {
                    _arrayCellImage[i, j] = new OHinh(i, j, TachHinh(_img, OHinh._width, OHinh._height, j * OHinh._width, i * OHinh._height), indexImage++);
                }
            }
        }
예제 #2
0
 public void Swap(OHinh _Ohinh)
 {
     Image tempImage      = _img; _img = _Ohinh._img; _Ohinh._img = tempImage;
     Color tempColor      = _colorBorder; _colorBorder = _Ohinh._colorBorder; _Ohinh._colorBorder = tempColor;
     int   tempIndexImage = _indexImage; _indexImage = _Ohinh._indexImage; _Ohinh._indexImage = tempIndexImage;
 }