Example #1
0
        protected void SignalRHub_SignalRSomeoneIsTyping(object sender, SignalRTypingArgs e)
        {
            // Al comenzar un usuario a escribir, el servidor nos notifica y lo mostramos en pantalla
            Deployment.Current.Dispatcher.BeginInvoke(new Action(() =>
            {
                TextBox txtName = new TextBox();
                txtName.Name = e.ConnectionId;
                txtName.Text = e.Name + " is typing...";

                if (this.FindName(txtName.Name) == null)
                {
                    stackPanel.Children.Add(txtName);
                }
            }));
        }
 public virtual void OnSignalRSomeoneIsTyping(SignalRTypingArgs e)
 {
     if (this.SignalRSomeoneIsTyping != null)
     {
         this.SignalRSomeoneIsTyping(this, e);
     }
 }
Example #3
0
 protected void SignalRHub_SignalRHideIsTyping(object sender, SignalRTypingArgs e)
 {
     // Cuando un usuario deja de escribir, el servidor nos notifica y lo mostramos en pantalla
     Deployment.Current.Dispatcher.BeginInvoke(new Action(() =>
     {
         stackPanel.Children.Remove((UIElement)this.FindName(e.ConnectionId));
     }));
 }