public void MoveUp(int ElementIndex, int RowIndex) { if (elementValues.ContainsKey(ElementIndex) && 0 <= RowIndex - 1) { RowData x = elementValues[ElementIndex][RowIndex - 1]; RowData y = elementValues[ElementIndex][RowIndex]; elementValues[ElementIndex][RowIndex - 1] = y; elementValues[ElementIndex][RowIndex] = x; } }
public void MoveDown(int ElementIndex, int RowIndex) { if (elementValues.ContainsKey(ElementIndex) && elementValues[ElementIndex].Count > RowIndex + 1) { RowData x = elementValues[ElementIndex][RowIndex + 1]; RowData y = elementValues[ElementIndex][RowIndex]; elementValues[ElementIndex][RowIndex + 1] = y; elementValues[ElementIndex][RowIndex] = x; } }
public RowData(RowData t) { name = t.name; type = t.type; value = t.value; }