private void RemoveMultipleRows() { var rowsToRemove = (int)(MaxRows * PortionToRemoveWhenOverflows); ValueMatrix = ValueMatrix.Skip(rowsToRemove).ToList(); OnPropertyChanged(nameof(Rows)); OnRowsRemoved(); }
public void AddRow(List <FaiItem> faiItems, ProductLevel productLevel, string rowName) { // Sort fai items by header order var values = new List <FaiItem>(); foreach (var faiName in _header) { values.Add(faiItems.First(item => item.Name == faiName).Clone()); } var row = new DataRowViewModel() { Values = values, RowName = rowName, ProductLevel = productLevel }; ValueMatrix.Add(row); OnPropertyChanged(nameof(Rows)); OnNewRowAdded(row); if (Rows > MaxRows) { RemoveMultipleRows(); } }
public override bool SaveResult(object valumatrix) { this.m_ValueMatrix = (ValueMatrix<short>) valumatrix; return true; }