コード例 #1
0
ファイル: CellError.cs プロジェクト: svtz/GraphLabs
 public MatrixError(CellCoords[] cells)
 {
     //this.Message = Message;
     Cells = new ArrayList(0);
     foreach (CellCoords cc in cells)
         Cells.Add(cc);
 }
コード例 #2
0
ファイル: CellError.cs プロジェクト: svtz/GraphLabs
 //public void AddCell(int RowIndex, int ColumnIndex)
 //{
 //    for (int i = 0; i < Cells.Count; i++)
 //        if ((Cells[i] as CellCoords).ColumnIndex == ColumnIndex &&
 //            (Cells[i] as CellCoords).RowIndex == RowIndex)
 //            return;
 //    Cells.Add(new CellCoords(RowIndex, ColumnIndex));
 //}
 //public void RemoveCell(int RowIndex, int ColumnIndex)
 //{
 //    for (int i = 0; i < Cells.Count; i++)
 //        if ((Cells[i] as CellCoords).ColumnIndex == ColumnIndex &&
 //            (Cells[i] as CellCoords).RowIndex == RowIndex)
 //        {
 //            Cells.RemoveAt(i);
 //            return;
 //        }
 //}
 public bool ContainsCell(CellCoords cell)
 {
     foreach (object cc in Cells)
         if (cell.Equals(cc))
             return true;
     return false;
 }