private void InsertMapObjectsToFloor(List <MapObject> mapObjectsInBuidling) { foreach (MapObject mapObject in mapObjectsInBuidling) { int floorNumber = mapObject.MapObjectDescription.FloorNumber; if (floorNumber != selectedFloor) { continue; } if (IsMapObjectSelected(mapObject.Id)) { mapObject.rectangle.Fill = Brushes.Red; } floor.AddMapObject(mapObject); } }