コード例 #1
0
ファイル: Chat.xaml.cs プロジェクト: brianteper/Taller-4
        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);
                }
            }));
        }
コード例 #2
0
 public virtual void OnSignalRSomeoneIsTyping(SignalRTypingArgs e)
 {
     if (this.SignalRSomeoneIsTyping != null)
     {
         this.SignalRSomeoneIsTyping(this, e);
     }
 }
コード例 #3
0
ファイル: Chat.xaml.cs プロジェクト: brianteper/Taller-4
 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));
     }));
 }