コード例 #1
0
        private async void relayNodeWatcher_Added(relaynodeWatcher sender, AllJoynServiceInfo args)
        {
            relaynodeJoinSessionResult joinResult = await relaynodeConsumer.JoinSessionAsync(args, sender);

            if (joinResult.Status == AllJoynStatus.Ok)
            {
                _relayNodeConsumer = joinResult.Consumer;
                _relayNodeConsumer.Signals.ButtonPressedReceived     += Signals_ButtonPressedReceived;
                _relayNodeConsumer.Signals.RelayStateChangedReceived += Signals_RelayStateChangedReceived;
                RetrieveCurrentState();
                _fReady = true;
            }
            else
            {
                Debug.WriteLine("Joining the session went wrong");
            }
        }
コード例 #2
0
        private async void relayNodeWatcher_Added(relaynodeWatcher sender, AllJoynServiceInfo args)
        {
            relaynodeJoinSessionResult joinResult = await relaynodeConsumer.JoinSessionAsync(args, sender);

            if (joinResult.Status == AllJoynStatus.Ok)
            {
                _relayNodeConsumer = joinResult.Consumer;
                _relayNodeConsumer.Signals.ButtonPressedReceived += Signals_ButtonPressedReceived;
                _relayNodeConsumer.Signals.RelayStateChangedReceived += Signals_RelayStateChangedReceived;
                RetrieveCurrentState();
                _fReady = true;
            }
            else
            {
                Debug.WriteLine("Joining the session went wrong");
            }
        }
コード例 #3
0
 public RelayNodeClient()
 {
     _relayNodeConsumer = null;
     _bus = new AllJoynBusAttachment();
     StartWatcher();
 }
コード例 #4
0
 public RelayNodeClient()
 {
     _relayNodeConsumer = null;
     _bus = new AllJoynBusAttachment();
     StartWatcher();
 }