Example #1
0
 public BluetoothViewModel(IBluetoothHub hub)
 {
     this.hub  = hub;
     this.scan = new RelayCommand(async() => this.Devices = await this.hub.GetPairedDevices(), () => this.Enabled && !this.IsBusy);
     //this.findSerialPorts = new RelayCommand(async () => this.SerialPorts = await this.hub.FindService(BluetoothServiceType.StandardServices.First(a => a.Type == BluetoothServiceType.ServiceType.SerialPort).ServiceId), () => this.Enabled && !this.IsBusy);
     this.openSettings = new RelayCommand(async() => await this.hub.OpenSettings(), () => this.hub != null && !this.IsBusy);
 }
 public BluetoothViewModel(IBluetoothHub hub)
 {
     this.hub = hub;
     this.scan = new RelayCommand(async () => this.Devices = await this.hub.GetPairedDevices(), () => this.Enabled && !this.IsBusy);
     //this.findSerialPorts = new RelayCommand(async () => this.SerialPorts = await this.hub.FindService(BluetoothServiceType.StandardServices.First(a => a.Type == BluetoothServiceType.ServiceType.SerialPort).ServiceId), () => this.Enabled && !this.IsBusy);
     this.openSettings = new RelayCommand(async () => await this.hub.OpenSettings(), () => this.hub != null && !this.IsBusy);
 }
 public WindowsPhoneDevice()
 {
     this.phone        = new WindowsPhone();
     this.bluetoothHub = new BluetoothHub();
     this.screen       = new Screen();
 }
Example #4
0
 public WindowsPhoneDevice()
 {
     this.phone = new WindowsPhone();
     this.bluetoothHub = new BluetoothHub();
     this.screen = new Screen();
 }