Beispiel #1
0
        /// <summary>
        /// Initializes a new instance of the MainViewModel class.
        /// </summary>
        public MainViewModel(IStationService stationService, IFavStationService favStationService, ITrajectService ts, ISearchHistoryService sh)
        {
            _stationService       = stationService;
            _favStationService    = favStationService;
            _trajectService       = ts;
            _searchHistoryService = sh;

            if (ViewModelBase.IsInDesignModeStatic)
            {
                List <Station> stationDesignList = new List <Station>();
                stationDesignList.Add(new Station()
                {
                    Name = "Amsterdam Centraal"
                });
                stationDesignList.Add(new Station()
                {
                    Name = "Delft"
                });

                //FavStations = stationDesignList;
            }

            //Messenger.Default.Register<string>(this, "FavChanged", FavChangedReceived);

            LoadFavStations();

            //Task.Run(() =>
            // {
            this.Gps.Initialize();
            // });
        }
Beispiel #2
0
 public CalculatorCostService(CalculatorContext context, ICityService cityService, IModuleService moduleService, ISearchHistoryService searchHistoryService)
 {
     this.context              = context;
     this.cityService          = cityService;
     this.moduleService        = moduleService;
     this.searchHistoryService = searchHistoryService;
 }
 public SearchHistoryController(
     ISearchHistoryService searchHistoryService,
     ISearchDataService dataService)
 {
     _searchHistoryService = searchHistoryService;
     _dataService          = dataService;
 }
Beispiel #4
0
        public void Setup()
        {
            _wordServiceMock   = Substitute.For <IWordService>();
            _cachedWordService = Substitute.For <ICachedWordService>();

            _historyService = new SearchHistoryService(_cachedWordService, _wordServiceMock);
        }
        public void Setup()
        {
            _userLogServiceMock       = Substitute.For <IUserLogService>();
            _searchHistoryServiceMock = Substitute.For <ISearchHistoryService>();

            _controller = new SearchHistoryController(
                _userLogServiceMock, _searchHistoryServiceMock);
        }
Beispiel #6
0
 public ShowResultService(
     ISearchHistoryService searchHistoryService,
     ICalculatorCostService calculatorCostService,
     ICityService cityService)
 {
     this.searchHistoryService  = searchHistoryService;
     this.calculatorCostService = calculatorCostService;
     this.cityService           = cityService;
 }
 public HomeController(IAnagramSolver anagramSolver, ICookiesHandlerService cookiesHandler,
                       IUserLogService logService, ISearchHistoryService searchHistoryService,
                       AnagramSolverCodeFirstContext context)
 {
     _anagramSolver        = anagramSolver;
     _cookiesHandler       = cookiesHandler;
     _userLogService       = logService;
     _searchHistoryService = searchHistoryService;
     _context = context;
 }
Beispiel #8
0
        public void Setup()
        {
            _anagramSolverMock         = Substitute.For <IAnagramSolver>();
            _cookiesHandlerServiceMock = Substitute.For <ICookiesHandlerService>();
            _userLogServiceMock        = Substitute.For <IUserLogService>();
            _searchHistoryServiceMock  = Substitute.For <ISearchHistoryService>();
            _contextMock = Substitute.For <AnagramSolverCodeFirstContext>();

            _controller = new HomeController(_anagramSolverMock, _cookiesHandlerServiceMock,
                                             _userLogServiceMock, _searchHistoryServiceMock, _contextMock);
        }
Beispiel #9
0
        //no static. :<
        //public static List<HistoryItem> StaticHistoryItems { get; set; }

        //ctor
        public SearchHistoryViewModel(ISearchHistoryService searchHistoryService, IMvxNavigationService navigationService, IMvxMessenger messenger)
        {
            _searchHistoryService = searchHistoryService;
            _navigationService    = navigationService;
            //Subscribe - Whenever a SearchFilterMessage is received, trigger the OnFIlterMessage method
            _token = messenger.Subscribe <SearchFilterMessage>((message => { OnFilterMessage(message.FilterName); })
                                                               );

            //Fill the table with data from the SearchHistory API
            FillHistory();
        }
Beispiel #10
0
        public TravelAdviceViewModel(IPlannerService plannerService, ITrajectService trajectService, ISearchHistoryService searchHistoryService)
        {
            _plannerService       = plannerService;
            _trajectService       = trajectService;
            _searchHistoryService = searchHistoryService;

            if (ViewModelBase.IsInDesignModeStatic)
            {
                ReisMogelijkheden = new List <ReisMogelijkheid>()
                {
                    new ReisMogelijkheid()
                    {
                        Optimaal             = true,
                        AantalOverstappen    = 2,
                        GeplandeAankomstTijd = DateTime.Now,
                        GeplandeVertrekTijd  = DateTime.Now,
                        GeplandeReisTijd     = "2:05"
                    },
                    new ReisMogelijkheid()
                    {
                        Optimaal             = true,
                        AantalOverstappen    = 1,
                        GeplandeAankomstTijd = DateTime.Now.AddHours(1),
                        GeplandeVertrekTijd  = DateTime.Now,
                        GeplandeReisTijd     = "7:05"
                    }
                };

                CurrentSearch = new PlannerSearch()
                {
                    DateTime    = DateTime.Now,
                    NaarStation = new Station()
                    {
                        Name = "Delft"
                    },
                    VanStation = new Station()
                    {
                        Name = "Amsterdam"
                    },
                    Type = "Vertrek"
                };
            }


            AddCommand    = new RelayCommand(AddCommandAction);
            DeleteCommand = new RelayCommand(DeleteCommandAction);
        }
        public SearchViewModel(ISearchService searchService, IUIVisualizerService uiVisualizerService, IViewModelFactory viewModelFactory,
            ISearchHistoryService searchHistoryService)
        {
            Argument.IsNotNull(() => searchService);
            Argument.IsNotNull(() => uiVisualizerService);
            Argument.IsNotNull(() => viewModelFactory);
            Argument.IsNotNull(() => searchHistoryService);

            _searchService = searchService;
            _uiVisualizerService = uiVisualizerService;
            _viewModelFactory = viewModelFactory;
            _searchHistoryService = searchHistoryService;

            _dispatcherTimer = new DispatcherTimer();
            _dispatcherTimer.Interval = TimeSpan.FromMilliseconds(500);

            FilterHistory = new FastObservableCollection<string>();

            BuildFilter = new Command(OnBuildFilterExecute);
        }
Beispiel #12
0
        public SearchViewModel(ISearchService searchService, IUIVisualizerService uiVisualizerService, IViewModelFactory viewModelFactory,
                               ISearchHistoryService searchHistoryService)
        {
            Argument.IsNotNull(() => searchService);
            Argument.IsNotNull(() => uiVisualizerService);
            Argument.IsNotNull(() => viewModelFactory);
            Argument.IsNotNull(() => searchHistoryService);

            _searchService        = searchService;
            _uiVisualizerService  = uiVisualizerService;
            _viewModelFactory     = viewModelFactory;
            _searchHistoryService = searchHistoryService;

            _dispatcherTimer          = new DispatcherTimer();
            _dispatcherTimer.Interval = TimeSpan.FromMilliseconds(500);

            FilterHistory = new FastObservableCollection <string>();

            BuildFilter = new TaskCommand(OnBuildFilterExecuteAsync);
        }
 /// <summary>
 /// Initializes a new instance of the <see cref="SearchHistoryController"/> class.
 /// </summary>
 /// <param name="service">The search history service.</param>
 public SearchHistoryController(ISearchHistoryService service)
 {
     _service = service;
 }
 public FlightCacheManager(ICacheManager cacheManager, ILoggerFactory loggerFactory, ISystemClock systemClock,
                           ICacheSettingService <CacheSetting> cacheSettingService, ISearchHistoryService <CacheSetting, LimitSetting> searchHistoryService)
     : base(cacheManager, loggerFactory, systemClock, cacheSettingService, searchHistoryService)
 {
 }
Beispiel #15
0
 public SearchTicketService(ITicketRepository ticketRepository, ISearchHistoryService historyService)
 {
     _ticketRepository = ticketRepository;
     _historyService   = historyService;
 }
 public PlannerService(ISearchHistoryService sh)
 {
     _searchHistoryService = sh;
 }
Beispiel #17
0
 public SearchUserService(IUserRepository userRepository, ISearchHistoryService historyService)
 {
     _userRepository = userRepository;
     _historyService = historyService;
 }
Beispiel #18
0
 public SearchHistoryController(
     IUserLogService userLogService, ISearchHistoryService searchHistoryService)
 {
     _userLogService       = userLogService;
     _searchHistoryService = searchHistoryService;
 }
 public SearchHistoryController(ISearchHistoryService historyService)
 {
     _historyService = historyService;
 }
 public SearchHistoriesController(ISearchHistoryService searchHistoryService)
 {
     this.searchHistoryService = searchHistoryService;
 }