/// <summary> /// Initializes a new instance of the MainViewModel class. /// </summary> public MainViewModel(IStationNameService stationService, IStationService favStationService, IMyTrajectService ts, IPlannerService 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(); // }); }
public DataSeeder() { _configuration = new ConfigurationBuilder() .SetBasePath(Directory.GetCurrentDirectory()) .AddJsonFile("appsettings.Development.json") .AddEnvironmentVariables() .Build(); var connectionString = _configuration.GetConnectionString("DefaultConnection"); var dbContextOptions = new DbContextOptionsBuilder <DataContext>() .UseSqlServer(connectionString) .Options; _context = new DataContext(dbContextOptions); var config = new MapperConfiguration(cfg => { cfg.AddMaps(new[] { Assembly.GetAssembly(typeof(DtoProfile)), }); }); _mapper = config.CreateMapper(); _plannerService = new PlannerService(_context); _userService = new UserService(_context, _plannerService); _guestService = new GuestService(_context, _mapper); _incomeService = new IncomeService(_context, _mapper); _expenseService = new ExpenseService(_context, _mapper); }
public TravelAdviceViewModel(INSApiService plannerService, IMyTrajectService trajectService, IPlannerService searchHistoryService) { _plannerService = plannerService; _trajectService = trajectService; _searchHistoryService = searchHistoryService; DataLoader = new DataLoader(); 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() { Date = DateTime.Now, Time = DateTime.Now, NaarStation = new Station() { Name = "Delft" }, VanStation = new Station() { Name = "Amsterdam" }, Type = "Vertrek" }; } AddCommand = new RelayCommand(AddCommandAction); DeleteCommand = new RelayCommand(DeleteCommandAction); }
public PlannerController(IPlannerService plannerService) { _plannerService = plannerService; }
public CachedNSApiService(INSApiService original, IPlannerService plannerService) { Original = original; PlannerService = plannerService; }
public HomeController() { service = new PlannerService(); }
public UserService(DataContext context, IPlannerService plannerService) { _context = context; _plannerService = plannerService; }
public PlannerController(IPlannerService service, UserManager <ApplicationUser> userManager, SignInManager <ApplicationUser> signInManager) { this.service = service; this.userManager = userManager; this.signInManager = signInManager; }
public PlannerController(IPlannerService plannerService) { _plannerService = plannerService; _logger = LogManager.GetCurrentClassLogger(); }