public StepsPage(int a, int b, bool isRoutine, TaskItemModel _taskItemModel, GRItemModel _GRItemModel) { InitializeComponent(); this.a = a; this.b = b; taskItemModel = _taskItemModel; GRItemModel = _GRItemModel; this.isRoutine = isRoutine; pageModel = new StepsPageViewModel(this, a, b, isRoutine); BindingContext = pageModel; itemcount = pageModel.count; StepListView.HeightRequest = GetListViewHeight(); }
public static void BuildGlobals(IHeartrateRepository heartrateRepository, ISleepRepository sleepRepository, IStepsRepository stepsRepository, Database database) { StepsRepository = stepsRepository; SleepRepository = sleepRepository; HeartrateRepository = heartrateRepository; Database = database; HeartratePageViewModel = new HeartRatePageViewModel(HeartrateRepository); SamplesService = new SamplesService(HeartrateRepository, StepsRepository, SleepRepository); StepsPageViewModel = new StepsPageViewModel(); SettingsPageViewModel = new SettingsPageViewModel(); SleepPageViewModel = new SleepPageViewModel(); DevicePageViewModel = new DevicePageViewModel(); HomePageViewModel = new HomePageViewModel(); LanguageDictionary = new Dictionary <string, string> { { "Nederlands", "nl-NL" }, { "English", "en-EN" }, { "Deutsch", "de-DE" } }; }