示例#1
0
 public virtual void HideOverlay()
 {
     if (this.IsOverlayShown)
     {
         BaseChatOverlay child = this.OverlayElement.Children[0] as BaseChatOverlay;
         if (child != null)
         {
             child.ChatElement = (RadChatElement)null;
         }
         this.OverlayElement.Children.Clear();
         this.OverlayElement.Visibility = ElementVisibility.Collapsed;
         this.InputTextBox.Visibility   = ElementVisibility.Visible;
         this.IsOverlayShown            = false;
     }
     else if (this.IsPopupOverlayShown)
     {
         BaseChatOverlay child = this.OverlayPopupElement.Children[0] as BaseChatOverlay;
         if (child != null)
         {
             child.ChatElement = (RadChatElement)null;
         }
         this.OverlayPopupElement.Children.Clear();
         this.OverlayPopupElement.Visibility = ElementVisibility.Collapsed;
         this.IsPopupOverlayShown            = false;
     }
     this.InputTextBox.Focus();
 }
示例#2
0
 public ChatOverlayMessage(
     BaseChatOverlay overlayElement,
     bool showAsPopup,
     Author author,
     DateTime timeStamp)
     : this(overlayElement, showAsPopup, author, timeStamp, (object)null)
 {
 }
示例#3
0
 public ChatOverlayMessage(
     BaseChatOverlay overlayElement,
     bool showAsPopup,
     Author author,
     DateTime timeStamp,
     object userData)
     : base(author, timeStamp, userData)
 {
     this.overlayElement = overlayElement;
     this.showAsPopup    = showAsPopup;
 }
示例#4
0
 public virtual void ShowOverlay(ChatOverlayMessage message)
 {
     if (this.IsOverlayShown || this.IsPopupOverlayShown)
     {
         if (this.IsOverlayShown)
         {
             BaseChatOverlay child = this.OverlayElement.Children[0] as BaseChatOverlay;
             if (child != null)
             {
                 child.ChatElement = (RadChatElement)null;
             }
             this.OverlayElement.Children.Clear();
             this.OverlayElement.Visibility = ElementVisibility.Collapsed;
             this.InputTextBox.Visibility   = ElementVisibility.Visible;
             this.IsOverlayShown            = false;
         }
         else if (this.IsPopupOverlayShown)
         {
             BaseChatOverlay child = this.OverlayPopupElement.Children[0] as BaseChatOverlay;
             if (child != null)
             {
                 child.ChatElement = (RadChatElement)null;
             }
             this.OverlayPopupElement.Children.Clear();
             this.OverlayPopupElement.Visibility = ElementVisibility.Collapsed;
             this.IsPopupOverlayShown            = false;
         }
     }
     message.OverlayElement.ChatElement = this;
     if (message.ShowAsPopup)
     {
         message.OverlayElement.PrepareForPopupDisplay();
         this.OverlayPopupElement.Children.Add((RadElement)message.OverlayElement);
         this.OverlayPopupElement.Visibility = ElementVisibility.Visible;
         this.IsPopupOverlayShown            = true;
     }
     else
     {
         message.OverlayElement.PrepareForOverlayDisplay();
         this.OverlayElement.Children.Add((RadElement)message.OverlayElement);
         this.OverlayElement.Visibility = ElementVisibility.Visible;
         this.InputTextBox.Visibility   = ElementVisibility.Collapsed;
         this.IsOverlayShown            = true;
     }
     message.OverlayElement.CurrentValue = message.OverlayElement.CurrentValue;
     foreach (RadHostItem descendant in message.OverlayElement.GetDescendants((Predicate <RadElement>)(x => x is RadHostItem), TreeTraversalMode.BreadthFirst))
     {
         if (!string.IsNullOrEmpty(ThemeResolutionService.ApplicationThemeName))
         {
             ThemeResolutionService.ApplyThemeToControlTree(descendant.HostedControl, ThemeResolutionService.ApplicationThemeName);
         }
         else
         {
             string themeName = this.ElementTree.ThemeName;
             if (string.IsNullOrEmpty(themeName))
             {
                 themeName = "ControlDefault";
             }
             ThemeResolutionService.ApplyThemeToControlTree(descendant.HostedControl, themeName);
         }
     }
 }
示例#5
0
 public ChatOverlayMessage(BaseChatOverlay overlayElement, Author author, DateTime timeStamp)
     : this(overlayElement, false, author, timeStamp, (object)null)
 {
 }