Пример #1
0
 public HighliteViewModel(PhotoStore photoStore, HighliteService highliteService) : base("Highlite")
 {
     _photoStore      = photoStore;
     _highliteService = highliteService;
     _mainViewModel   = MainViewModel.Instance;
     Load();
 }
Пример #2
0
 public AlbumViewModel(TripStore tripStore, PhotoStore photoStore, HighliteService highliteService, AlbumService albumService,
                       LocationService locationService, DebugInfoViewModel debugInfo) : base("Highlite")
 {
     _tripStore               = tripStore;
     _photoStore              = photoStore;
     _albumService            = albumService;
     _highliteService         = highliteService;
     _locationService         = locationService;
     _debugInfoVModel         = debugInfo;
     _mainViewModel           = MainViewModel.Instance;
     _mainViewModel.OnRemove += _mainViewModel_OnRemove;
     Load();
 }
Пример #3
0
        public TripSmartBuilderTests()
        {
            _googleClient = new GoogleClient();
            _locationRepo = new LocationRepo(TripLineConfig.LocationRepoPath);
            _placeRepo    = new PlaceRepo(TripLineConfig.PlaceRepoPath);

            _locationService = new LocationService(_googleClient, _locationRepo, _placeRepo);

            _pictureExifReader = new PictureExifInformationReader();
            _localFileFolder   = new LocalFileFolders(_pictureExifReader);
            _photoStore        = new PhotoStore(new PhotoRepo(forceNew: _forceNew), _localFileFolder, _locationService);

            _tripSmartBuilder = new TripSmartBuilder(_locationService, _photoStore, new DestinationBuilder(_locationService));
            _tripStore        = new TripStore(_photoStore, _locationService, _tripSmartBuilder, new TripsRepo(forceNew: _forceNew));
            _highliteService  = new HighliteService(_photoStore, _tripStore, _locationService);
        }
Пример #4
0
        public HighliteTests()
        {
            ServiceBootStrapper.Configure();

            _googleClient      = new GoogleClient();
            _locationRepo      = new LocationRepo(TripLineConfig.LocationRepoPath);
            _placeRepo         = new PlaceRepo(TripLineConfig.PlaceRepoPath);
            _locationService   = new LocationService(_googleClient, _locationRepo, _placeRepo);
            _pictureExifReader = new PictureExifInformationReader();
            _localFileFolder   = new LocalFileFolders(_pictureExifReader);
            _photoStore        = new PhotoStore(new PhotoRepo(forceNew: false), _localFileFolder, _locationService);
            _tripSmartBuilder  = new TripSmartBuilder(_locationService, _photoStore, new DestinationBuilder(_locationService));
            _tripStore         = new TripStore(_photoStore, _locationService, _tripSmartBuilder, new TripsRepo(forceNew: false));
            _highliteService   = new HighliteService(_photoStore, _tripStore, _locationService);

            var tripCreationService = new TripCreationService(_tripStore, _photoStore, _locationService);

            var result = tripCreationService.Build();

            if (result.NumNewTrips > 0)
            {
                tripCreationService.AddAll();
            }
        }