//ObservableCollection<RectangleObstacle> _configurationSpace=new ObservableCollection<RectangleObstacle>(); //public ObservableCollection<RectangleObstacle> ConfigurationSpace //{//TODO: Przerobić na pisanie po bitmapie // get { return _configurationSpace; } // set // { // _configurationSpace = value; // OnPropertyChanged(); // } //} //public WriteableBitmap _configurationSpaceBitmap = new WriteableBitmap( // 360, 360, // 96, // 96, // PixelFormats.Bgr32, // null); public void MoveSelectedObstacles(Point delta) { foreach (var item in ObstaclesCollection.Where(x => x.Selected == true)) { item.MoveObstacle(delta); } }
public void RemoveSelectedObstacles() { List <RectangleObstacle> tempList = new List <RectangleObstacle>(); foreach (var item in ObstaclesCollection.Where(x => x.Selected == true)) { tempList.Add(item); } foreach (var item in tempList) { ObstaclesCollection.Remove(item); } }