public async Task InitAsync() { ShellPage.SetSpinner(LoadingState.Loading); Templates = await faultReportAccess.GetFaultReportTemplates(); var triggers = await triggerAccess.GetSensorTriggersFor(Sensor.Id); Triggers = new ObservableCollection <SensorTriggerViewModel>( triggers.Select(t => new SensorTriggerViewModel(Sensor, t))); SelectedTrigger = Triggers.FirstOrDefault(); ShellPage.SetSpinner(LoadingState.Finished); }
public async Task InitAsync(Sensor sensor) { Sensor = sensor; Bias = sensorAccess.GetSensorBias(sensor.Id); Triggers = await triggerAccess.GetSensorTriggersFor(sensor.Id); }