public void Position(clsPelotitas pos) { if (conn.State == Microsoft.AspNet.SignalR.Client.ConnectionState.Connected) { MyHubProxy.Invoke("enviarPosi", pos); } }
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); }