public WorkoutHistoryPageViewModel() { GetWorkoutHistoryCommand = new Command(async() => await ExecuteGetWorkoutHistoryCommand()); StartNewWorkoutCommand = new Command(async() => await ExecuteStartWorkoutCommand()); TrainingSessions = new ObservableCollection <TrainingSession>(); cloudSvc = DependencyService.Get <IWebDataService>(); }
/// <summary> /// A konstruktor, ami létrehoz egy TimeTableController objektumot /// </summary> /// <param name="userManager">Az userManager</param> /// <param name="signInManager">A signInManager</param> /// <param name="webDataService">A webDataService</param> /// <param name="timeTableService">A timeTableService</param> public TimeTableController( UserManager <ApplicationUser> userManager, SignInManager <ApplicationUser> signInManager, IWebDataService webDataService, ITimeTableService timeTableService) { _webDataService = webDataService; _timeTableService = timeTableService; }
public ComicHoarderViewModel() { repository = new RepositoryService(); webDataService = new WebDataService(repository.GetSetting("ComicVineKey")); Publishers = new ObservableCollection <Publisher>(repository.GetPublishers()); if (Publishers.Count() > 0) { selectedPublisher = Publishers[0].id; //select first publisher } if (selectedPublisher != 0) //no publisher selected { Volumes = new ObservableCollection <Volume>(repository.GetVolumes(selectedPublisher)); //get volumes from selected publisher if (Volumes.Count() > 0) { selectedVolume = Volumes[0].id; //select first volume } } else { Volumes = new ObservableCollection <Volume>(); //empty volumes } if (selectedVolume != 0) { Issues = new ObservableCollection <Issue>(repository.GetIssues(selectedVolume)); if (Issues.Count() > 0) { selectedIssue = Issues[0].id; } } else { Issues = new ObservableCollection <Issue>(); } MissingIssues = new ObservableCollection <MissingIssue>(repository.GetMissingIssues(selectedPublisher)); PieChartRatios = ReloadPieChart(SelectedPublisher); BarChartRatios = new ObservableCollection <KeyValuePair <string, int> >(); List <int> publisherIds = (from p in Publishers where p.enabled == true select p.id).ToList(); BarChartMissingIssueCount barratios = repository.GetBarChartData(publisherIds); foreach (KeyValuePair <string, int> barratio in barratios.MissingIssueCountList) { BarChartRatios.Add(barratio); } //TODO move default path to config file Path = @"D:\Incoming\"; }
public static async Task <TimeTableDesignerEngine> CreateAsync(IWebDataService webDataService, IEnumerable <string> webCourseIds) { var webCourseDictionary = new Dictionary <string, IEnumerable <WebCourse> >(); foreach (var webCourseId in webCourseIds) { var webCourses = await webDataService.ListWebCoursesByIdAsync(webCourseId, "" /*@TODO: Create method for current semester*/); webCourseDictionary.Add(webCourseId, webCourses); } return(new TimeTableDesignerEngine(webCourseDictionary)); }
public WebDataServiceTest() { this._logger = new NLogLogger(null); this._webDataService = new WebDataService( new ScheduleRepository(new ScheduleContext( new WebHtmlReader(), new HtmlTableToListConverter(new NLogLogger(new TimeTableAppContextProvider())), new HtmlDropDownToListConverter(new NLogLogger(new TimeTableAppContextProvider())), Config.Create(ConfigurationManager.AppSettings) )), null, null); }
public void Setup() { if (testMode == "Live") { repository = new MSSQLDatabase(); connection = new ComicVineWebConnection(); } else { repository = new TestRepository(); connection = new TestWebConnection(); } key = repository.GetSetting("WebServiceKey"); format = "xml"; urlBuilder = new ComicVineURLBuilder(key, format); reader = new ComicVineXMLReader(); service = new WebDataService(connection, reader, urlBuilder); }
public WorkoutPageViewModel() { webSvc = DependencyService.Get <IWebDataService>(); workoutTimer = new Timer(100); workoutTimer.Elapsed += OnWorkoutTimedEvent; workoutTimer.AutoReset = true; stepTimer = new Timer(2000); stepTimer.Elapsed += OnStepTimedEvent; stepTimer.AutoReset = true; EndWorkoutCommand = new Command(async() => await ExecuteEndWorkoutCommand()); UserId = "Matt"; startTime = DateTime.Now; workoutTimer.Enabled = true; stepTimer.Enabled = true; }
public ComicHoarderViewModel() { repository = new RepositoryService(); webDataService = new WebDataService(repository.GetSetting("ComicVineKey")); Publishers = new ObservableCollection<Publisher>(repository.GetPublishers()); if (Publishers.Count() > 0) { selectedPublisher = Publishers[0].id; //select first publisher } if (selectedPublisher != 0) //no publisher selected { Volumes = new ObservableCollection<Volume>(repository.GetVolumes(selectedPublisher)); //get volumes from selected publisher if (Volumes.Count() > 0) { selectedVolume = Volumes[0].id; //select first volume } } else { Volumes = new ObservableCollection<Volume>(); //empty volumes } if (selectedVolume != 0) { Issues = new ObservableCollection<Issue>(repository.GetIssues(selectedVolume)); if (Issues.Count() > 0) { selectedIssue = Issues[0].id; } } else { Issues = new ObservableCollection<Issue>(); } MissingIssues = new ObservableCollection<MissingIssue>(repository.GetMissingIssues(selectedPublisher)); PieChartRatios = ReloadPieChart(SelectedPublisher); BarChartRatios = new ObservableCollection<KeyValuePair<string, int>>(); List<int> publisherIds = (from p in Publishers where p.enabled == true select p.id).ToList(); BarChartMissingIssueCount barratios = repository.GetBarChartData(publisherIds); foreach (KeyValuePair<string, int> barratio in barratios.MissingIssueCountList) { BarChartRatios.Add(barratio); } //TODO move default path to config file Path = @"D:\Incoming\"; }
public StarSystemService(ILocalDataService localDataService, IWebDataService webDataService) { localService = localDataService; webService = webDataService; }
/// <summary> /// A konstruktor, ami létrehoz egy HomeController objektumot /// </summary> /// <param name="webDataService">A WebDataService</param> public HomeController(IWebDataService webDataService) { _webDataService = webDataService; }
public PublisherSearchViewModel() { repository = new RepositoryService(); webDataService = new WebDataService(repository.GetSetting("ComicVineKey")); Publishers = new ObservableCollection<Publisher>(); }
public PublisherSearchViewModel() { repository = new RepositoryService(); webDataService = new WebDataService(repository.GetSetting("ComicVineKey")); Publishers = new ObservableCollection <Publisher>(); }
public TagCountManager(IWebDataService webDataService) { _webDataService = webDataService; }