private async Task ToDeviceComponentAsync() { await _injectionControl.NavigateAsync <DeviceComponentViewModel>(vm => { vm.DeviceLabel = DeviceLabel; vm.DeviceComponents = PastDeviceComponents; vm.DeviceId = DeviceId; }); }
public DeviceCapabilitiesViewModel(IInjectionControl injectionControl, RaspberryClient raspberryClient) { ToDevices = new Command(async() => await injectionControl.NavigateAsync <DevicesPage>()); ToDeviceComponent = new Command(async() => await ToDeviceComponentAsync()); OnTest = new Command <DeviceCapability>(async c => await TestExecuteAsync(c, "on")); OffTest = new Command <DeviceCapability>(async c => await TestExecuteAsync(c, "off")); _injectionControl = injectionControl; _raspberryClient = raspberryClient; }
private async Task SelectedComponentAsync(DeviceComponent component) { await _injectionControl.NavigateAsync <DeviceCapabilitiesViewModel>(vm => { vm.DeviceLabel = DeviceLabel; vm.ComponentLabel = component.Id; vm.PastDeviceComponents = DeviceComponents; vm.DeviceCapabilities = component.Capabilities; vm.DeviceId = DeviceId; }); }
public DeviceComponentViewModel(IInjectionControl injectionControl) { ToDevices = new Command(async() => await injectionControl.NavigateAsync <DevicesPage>()); SelectedComponent = new Command <DeviceComponent>(async c => await SelectedComponentAsync(c)); _injectionControl = injectionControl; }