Example #1
0
        public WaypointsService()
        {
            VisibleWaypoints  = new ObservableCollectionReadOnlyWrapping <Waypoint>(_visibleWaypoints);
            SelectedWaypoints = new ObservableCollectionReadOnlyWrapping <Waypoint>(_selectedWaypoints);

            RemoveCommand = new DelegateCommand(obj => Waypoints.Remove((Waypoint)obj));

            Waypoints.CollectionChanged += Waypoints_CollectionChanged;
        }
        public GroupsService(IWaypointsService waypointsService)
        {
            _waypointsService = waypointsService;

            Shapes = new ObservableCollectionReadOnlyWrapping <IShapeProvider>(_shapes);

            DefaultGroup = new Group("Не сгруппированные");

            _waypointsService.Waypoints.CollectionChanged += Waypoints_CollectionChanged;
            DefaultGroup.Children.CollectionChanged       += DefaultWaypoints_CollectionChanged;
            Groups.CollectionChanged += Groups_CollectionChanged;
        }