public void AddRowExecuted() { if (SelectedRow != null) { VoxelCollection.Insert(VoxelCollection.IndexOf(SelectedRow) + 1, (AsteroidByteFillProperties)SelectedRow.Clone()); } else { VoxelCollection.Add(_dataModel.NewDefaultVoxel(VoxelCollection.Count + 1)); } _dataModel.RenumberCollection(); }
public void AddRandomRowExecuted() { var filler = new AsteroidByteFiller(); var randomModel = (AsteroidByteFillProperties)filler.CreateRandom(VoxelCollection.Count + 1, _dataModel.BaseMaterial, MaterialsCollection, VoxelFileList); if (SelectedRow != null) { VoxelCollection.Insert(VoxelCollection.IndexOf(SelectedRow) + 1, randomModel); } else { VoxelCollection.Add(randomModel); } _dataModel.RenumberCollection(); }