/// <summary> /// this is to delete a certain module from the time table /// </summary> /// <param name="x"></param> /// <param name="y"></param> public void DelItem(int x, int y) { sCell Empty = new sCell(); sTable[x, y] = Empty; InitialiseCell(x, y); }
public static sCell[,] getSerArray(GameObject[,] cellArray) { sCell[,] ser = new sCell[cellArray.GetLength(0), cellArray.GetLength(1)]; for (int x = 0; x < ser.GetLength(0); x++) { for (int y = 0; y < ser.GetLength(1); y++) { ser[x, y] = new sCell(cellArray[x, y]); } } return ser; }
public static GameObject[,] getCellArray(sCell[,] ser) { GameObject[,] cells = new GameObject[ser.GetLength(0),ser.GetLength(1)]; for (int x = 0; x < ser.GetLength(0); x++) { for (int y = 0; y < ser.GetLength(1); y++) { cells[x, y] = ser[x, y].getCell(); } } return cells; }
public Spreadsheet(int Col, int Row) { columns = Col; rows = Row; Grid = new sCell[Row, Col]; int i, j; for (i = 0; i < rows; i++) { for (j = 0; j < Col; j++) { sCell newCell = sCell.createCell(i, j); Grid[i, j] = newCell; newCell.PropertyChanged += cell_PropertyChanged; //handler; //OnCellPropertyChanged(newCell, "Grid"); } } }