Esempio n. 1
0
 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;
     }
 }
Esempio n. 3
0
 public PebbleDisconnected(Flint.Core.Pebble pebble)
 {
     if (pebble == null)
     {
         throw new ArgumentNullException("pebble");
     }
     _pebble = pebble;
 }
Esempio n. 4
0
        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];
        }
Esempio n. 5
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];
            }
        }
Esempio n. 7
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;
 }
Esempio n. 9
0
 public PebbleDisconnected( Flint.Core.Pebble pebble )
 {
     if (pebble == null) throw new ArgumentNullException("pebble");
     _pebble = pebble;
 }