Exemple #1
0
 public void Position(clsPelotitas pos)
 {
     if (conn.State == Microsoft.AspNet.SignalR.Client.ConnectionState.Connected)
     {
         MyHubProxy.Invoke("enviarPosi", pos);
     }
 }
Exemple #2
0
        private async void onPosition(clsPelotitas pelotas)
        {
            await Windows.ApplicationModel.Core.CoreApplication.MainView.Dispatcher.RunAsync(CoreDispatcherPriority.Normal, () =>
            {
                Ellipse rectangle = (Ellipse)canvasBolita.Children[0];

                Canvas.SetTop(rectangle, pelotas.arriba);
                Canvas.SetLeft(rectangle, pelotas.izquierda);
            });
        }
 public void enviarPosi(clsPelotitas obj)
 {
     Clients.All.sendPosition(obj);
 }