Exemplo n.º 1
0
 public ChatMessagesViewElement(RadChatElement chatElement)
 {
     this.chatElement = chatElement;
     this.ViewElement.FitElementsToSize = true;
     this.Scroller.ScrollMode           = ItemScrollerScrollModes.Smooth;
     this.Scroller.AllowHiddenScrolling = true;
     this.ItemSpacing = 5;
     this.Items       = (IList <BaseChatDataItem>) new ChatDataItemCollection(this);
 }
Exemplo n.º 2
0
        protected virtual void OnOkClicked()
        {
            RadChatElement  chatElement     = this.ChatElement;
            ChatTextMessage chatTextMessage = new ChatTextMessage(Convert.ToString(this.CurrentValue), chatElement.Author, DateTime.Now);

            if (chatElement.AutoAddUserMessages)
            {
                chatElement.AddMessage((ChatMessage)chatTextMessage);
            }
            chatElement.HideOverlay();
            chatElement.OnSendMessage(new SendMessageEventArgs((ChatMessage)chatTextMessage));
        }
Exemplo n.º 3
0
 public ChatToolbarElement(RadChatElement chatElement)
 {
     this.chatElement                   = chatElement;
     this.ScrollBar.ValueChanged       += new EventHandler(this.ScrollBar_ValueChanged);
     this.scrollLeftElement.MouseDown  += new MouseEventHandler(this.ScrollLeftElement_MouseDown);
     this.scrollLeftElement.MouseUp    += new MouseEventHandler(this.ScrollLeftElement_MouseUp);
     this.scrollRightElement.MouseDown += new MouseEventHandler(this.ScrollRightElement_MouseDown);
     this.scrollRightElement.MouseUp   += new MouseEventHandler(this.ScrollRightElement_MouseUp);
     this.scrollTimer                   = new Timer();
     this.scrollTimer.Interval          = 10;
     this.scrollTimer.Tick             += new EventHandler(this.ScrollTimer_Tick);
 }
Exemplo n.º 4
0
 protected override void CreateChildItems(RadElement parent)
 {
     base.CreateChildItems(parent);
     this.chatElement = this.CreateChatElement();
     parent.Children.Add((RadElement)this.chatElement);
 }
Exemplo n.º 5
0
 public ChatSuggestedActionsElement(RadChatElement chatElement)
 {
     this.chatElement = chatElement;
 }