Esempio n. 1
0
        void OnPublicChat(string content, User user)
        {
            Run r = new Run(user.Name + ": " + content + "\n");

            r.Foreground = Cartes.GetChatBrush(user.Name);
            if (Scroll.ScrollableHeight - Scroll.ExtentHeight < 5)
            {
                chat.Inlines.Add(r);
                Scroll.ScrollToEnd();
            }
            else
            {
                chat.Inlines.Add(r);
            }
        }
Esempio n. 2
0
 public void AddUserText(string text, User user)
 {
     controller.AddText(text.LineBreak(), Cartes.GetChatBrush(user.Name));
     AutoScroll();
 }