public PebbleViewModel( Flint.Core.Pebble pebble ) { if ( pebble == null ) throw new ArgumentNullException( "pebble" ); _pebble = pebble; _toggleConnectionCommand = new RelayCommand( OnToggleConnect ); }
protected virtual void OnPebbleDisconnected(PebbleDisconnected pebbleDisconnected) { if (pebbleDisconnected.Pebble == _pebble) { _pebble = null; } }
public PebbleDisconnected(Flint.Core.Pebble pebble) { if (pebble == null) { throw new ArgumentNullException("pebble"); } _pebble = pebble; }
public async Task ScanForPairedDevicesAsync() { _pebbles.Clear(); _pebbles.Clear(); foreach (var pebble in await PebbleScanner.DetectPebbles()) _pebbles.Add(pebble); if (_pebbles.Count == 1) SelectedPebble = _pebbles[0]; }
public PebbleViewModel(Flint.Core.Pebble pebble) { if (pebble == null) { throw new ArgumentNullException("pebble"); } _pebble = pebble; _toggleConnectionCommand = new RelayCommand(OnToggleConnect); }
public async Task ScanForPairedDevicesAsync() { _pebbles.Clear(); _pebbles.Clear(); foreach (var pebble in await PebbleScanner.DetectPebbles()) { _pebbles.Add(pebble); } if (_pebbles.Count == 1) { SelectedPebble = _pebbles[0]; } }
public async Task SetPebbleAsync(Flint.Core.Pebble pebble) { if (pebble == null) { throw new ArgumentNullException("pebble"); } if (pebble.IsAlive == false) { await pebble.ConnectAsync(); } Info.Pebble = Apps.Pebble = pebble; await Info.RefreshAsync(); await Apps.RefreshAsync(); }
protected virtual void OnPebbleConnected(PebbleConnected pebbleConnected) { _pebble = pebbleConnected.Pebble; }
public PebbleDisconnected( Flint.Core.Pebble pebble ) { if (pebble == null) throw new ArgumentNullException("pebble"); _pebble = pebble; }