private void ButtonUpdateHandler(UpdateButtons update)
 {
     if (update.Body.Pressed[0])
         SpawnIterator(TurnOnSpotLight);
     if (update.Body.Pressed[1])
         SpawnIterator(GetBatteryPower);
 }
 void HandlePacket(GuitarPacket packet)
 {
     UpdateTopFrets?.Invoke(packet.TopFrets);
     UpdateBottomFrets?.Invoke(packet.BottomFrets);
     UpdateStrum?.Invoke(packet.Strum);
     UpdateButtons?.Invoke(packet.Buttons);
     UpdateMotion?.Invoke(packet.Motion);
     UpdateSlider?.Invoke(packet.Slider);
 }
Beispiel #3
0
 private async void SetupHub()
 {
     _updateDelegate = new UpdateBid(UpdateBidMethod);
     _updateButtonsDelegate = new UpdateButtons(UpdateButtonsMethod);
     _hubConnection = new Microsoft.AspNet.SignalR.Client.HubConnection("http://localhost:1331/");
     _auctionProxy = _hubConnection.CreateHubProxy("AuctionHub");
     _auctionProxy.Subscribe("UpdateBid").Received += UpdateBid_auctionProxy;
     _auctionProxy.Subscribe("CloseBid").Received += CloseBid_auctionProxy;
     _auctionProxy.Subscribe("CloseBidWin").Received += CloseBidWin_auctionProxy;
     await _hubConnection.Start();
 }
Beispiel #4
0
 private async void SetupHub()
 {
     _updateDelegate = new UpdateBid(UpdateBidMethod);
     _updateButtonsDelegate = new UpdateButtons(UpdateButtonsMethod);
     _hubConnection = new HubConnection("http://192.168.1.148:1331/");
     _auctionProxy = _hubConnection.CreateHubProxy("AuctionHub");
     _auctionProxy.Subscribe("UpdateBid").Received += UpdateBid_auctionProxy;
     _auctionProxy.Subscribe("CloseBid").Received += CloseBid_auctionProxy;
     _auctionProxy.Subscribe("CloseBidWin").Received += CloseBidWin_auctionProxy;
     await _hubConnection.Start();
 }
Beispiel #5
0
        private async void SetupHub()
        {
            _updateDelegate        = UpdateBidMethod;
            _updateButtonsDelegate = UpdateButtonsMethod;
            _hubConnection         = new HubConnection("http://localhost:4558");
            _auctionProxy          = _hubConnection.CreateHubProxy("AuctionHub");
            _auctionProxy.Subscribe("updateBid").Received   += OnUpdateBid;
            _auctionProxy.Subscribe("CloseBid").Received    += OnCloseBid;
            _auctionProxy.Subscribe("CloseBidWin").Received += OnCloseBidWin;

            await _hubConnection.Start().ConfigureAwait(false);
        }
Beispiel #6
0
 public virtual IEnumerator <ITask> UpdateButtonsHandler(UpdateButtons update)
 {
     ActionNotSupported(update.ResponsePort);
     yield break;
 }
Beispiel #7
0
 public virtual IEnumerator<ITask> UpdateButtonsHandler(UpdateButtons update)
 {
     ActionNotSupported(update.ResponsePort);
     yield break;
 }