public void ColorChangeTest1() { Spreadsheet sheet = new Spreadsheet(26, 50); Cell cell = sheet.GetCell("A1"); sheet.ChangeCellColor(cell, 0xFFF5FFFA); Assert.AreEqual(0xFFF5FFFA, cell.Color); }
public void ColorChangeTest2() { Spreadsheet sheet = new Spreadsheet(26, 50); Cell cell = sheet.GetCell("C20"); sheet.ChangeCellColor(cell, 0xFFFF0000); Assert.AreEqual(0xFFFF0000, cell.Color); }
// allows updating of spreadsheet cell color based on dialog input private void ChangeCellColor(DataGridViewCell gridCell, Color color) { int column = gridCell.ColumnIndex; int row = gridCell.RowIndex; Cell cell = sheet.GetCell(column, row); int newColor = color.ToArgb(); sheet.ChangeCellColor(cell, (uint)newColor); }