コード例 #1
0
 private async Task ToDeviceComponentAsync()
 {
     await _injectionControl.NavigateAsync <DeviceComponentViewModel>(vm =>
     {
         vm.DeviceLabel      = DeviceLabel;
         vm.DeviceComponents = PastDeviceComponents;
         vm.DeviceId         = DeviceId;
     });
 }
コード例 #2
0
 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;
 }
コード例 #3
0
 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;
     });
 }
コード例 #4
0
 public DeviceComponentViewModel(IInjectionControl injectionControl)
 {
     ToDevices         = new Command(async() => await injectionControl.NavigateAsync <DevicesPage>());
     SelectedComponent = new Command <DeviceComponent>(async c => await SelectedComponentAsync(c));
     _injectionControl = injectionControl;
 }