示例#1
0
 public ChatBufferItem(DateTime timestamp, string text, ChatBufferTextStyle style, string fromname)
 {
     this.timestamp = timestamp;
     this.text      = text;
     this.style     = style;
     this.fromname  = fromname;
 }
示例#2
0
        public static OpenTK.Graphics.Color4 GetColorForStyle(ChatBufferTextStyle style)
        {
            switch (style)
            {
            case ChatBufferTextStyle.StatusBlue:
                return(new OpenTK.Graphics.Color4(0.2f, 0.2f, 1f, 1f));

            case ChatBufferTextStyle.StatusDarkBlue:
                return(new OpenTK.Graphics.Color4(0f, 0f, 1f, 1f));

            case ChatBufferTextStyle.ObjectChat:
                return(new OpenTK.Graphics.Color4(0.7f, 0.9f, 0.7f, 1f));

            case ChatBufferTextStyle.OwnerSay:
                return(new OpenTK.Graphics.Color4(0.99f, 0.99f, 0.69f, 1f));

            case ChatBufferTextStyle.Alert:
                return(new OpenTK.Graphics.Color4(0.8f, 1f, 1f, 1f));

            case ChatBufferTextStyle.Error:
                return(new OpenTK.Graphics.Color4(0.82f, 0.27f, 0.27f, 1f));

            default:
                return(new OpenTK.Graphics.Color4(1f, 1f, 1f, 1f));
            }
        }
示例#3
0
 public ChatBufferItem(DateTime timestamp, string from, UUID id, string text, ChatBufferTextStyle style)
 {
     this.timestamp = timestamp;
     this.from = from;
     this.id = id;
     this.text = text;
     this.style = style;
 }
示例#4
0
 public ChatBufferItem(DateTime timestamp, string from, UUID id, string text, ChatBufferTextStyle style)
 {
     Timestamp = timestamp;
     From      = from;
     ID        = id;
     Text      = text;
     Style     = style;
 }
示例#5
0
 public ChatBufferItem(DateTime timestamp, string from, UUID id, string text, ChatBufferTextStyle style)
 {
     this.timestamp = timestamp;
     this.from      = from;
     this.id        = id;
     this.text      = text;
     this.style     = style;
 }
示例#6
0
 /// <summary>
 /// Constructor for an item in the ChatBuffer
 /// </summary>
 /// <param name="timestamp"></param>
 /// <param name="text"></param>
 /// <param name="style"></param>
 /// <param name="fromname"></param>
 /// <param name="fromuuid">UUID of the agent sending the message</param>
 public ChatBufferItem(DateTime timestamp, string text, ChatBufferTextStyle style, string name, UUID uuid)
 {
     this.timestamp = timestamp;
     this.text      = text;
     this.style     = style;
     this.fromname  = name;
     this.fromuuid  = uuid;
 }
示例#7
0
        /// <summary>
        /// Displays notification in the main chat tab
        /// </summary>
        /// <param name="msg">Message to be printed in the chat tab</param>
        /// <param name="style">Style of the message to be printed, normal, object, etc.</param>
        /// <param name="highlightChatTab">Highligt (and flash in taskbar) chat tab if not selected</param>
        public void DisplayNotificationInChat(string msg, ChatBufferTextStyle style, bool highlightChatTab)
        {
            if (InvokeRequired)
            {
                if (!instance.MonoRuntime || IsHandleCreated)
                {
                    BeginInvoke(new MethodInvoker(() => DisplayNotificationInChat(msg, style, highlightChatTab)));
                }
                return;
            }

            if (style != ChatBufferTextStyle.Invisible)
            {
                ChatBufferItem line = new ChatBufferItem(
                    DateTime.Now,
                    string.Empty,
                    UUID.Zero,
                    msg,
                    style
                    );

                try
                {
                    mainChatManger.ProcessBufferItem(line, true);
                    if (highlightChatTab)
                    {
                        tabs["chat"].Highlight();
                    }
                }
                catch (Exception) { }
            }

            if (OnChatNotification != null)
            {
                try { OnChatNotification(this, new ChatNotificationEventArgs(msg, style)); }
                catch { }
            }
        }
示例#8
0
 /// <summary>
 /// Displays notification in the main chat tab
 /// </summary>
 /// <param name="msg">Message to be printed in the chat tab</param>
 /// <param name="style">Style of the message to be printed, normal, object, etc.</param>
 public void DisplayNotificationInChat(string msg, ChatBufferTextStyle style)
 {
     DisplayNotificationInChat(msg, style, true);
 }
示例#9
0
 public ChatNotificationEventArgs(string message, ChatBufferTextStyle style)
 {
     Message = message;
     Style   = style;
 }
示例#10
0
 public ChatBufferItem(DateTime timestamp, string text, ChatBufferTextStyle style)
 {
     this.timestamp = timestamp;
     this.text = text;
     this.style = style;
 }
示例#11
0
 public ChatNotificationEventArgs(string message, ChatBufferTextStyle style)
 {
     Message = message;
     Style = style;
 }
示例#12
0
        /// <summary>
        /// Displays notification in the main chat tab
        /// </summary>
        /// <param name="msg">Message to be printed in the chat tab</param>
        /// <param name="style">Style of the message to be printed, normal, object, etc.</param>
        /// <param name="highlightChatTab">Highligt (and flash in taskbar) chat tab if not selected</param>
        public void DisplayNotificationInChat(string msg, ChatBufferTextStyle style, bool highlightChatTab)
        {
            if (InvokeRequired)
            {
                if (!instance.MonoRuntime || IsHandleCreated)
                    BeginInvoke(new MethodInvoker(() => DisplayNotificationInChat(msg, style, highlightChatTab)));
                return;
            }

            if (style != ChatBufferTextStyle.Invisible)
            {
                ChatBufferItem line = new ChatBufferItem(
                    DateTime.Now,
                    string.Empty,
                    UUID.Zero,
                    msg,
                    style
                );

                try
                {
                    mainChatManger.ProcessBufferItem(line, true);
                    if (highlightChatTab)
                    {
                        tabs["chat"].Highlight();
                    }
                }
                catch (Exception) { }
            }

            if (OnChatNotification != null)
            {
                try { OnChatNotification(this, new ChatNotificationEventArgs(msg, style)); }
                catch { }
            }
        }
示例#13
0
 /// <summary>
 /// Displays notification in the main chat tab
 /// </summary>
 /// <param name="msg">Message to be printed in the chat tab</param>
 /// <param name="style">Style of the message to be printed, normal, object, etc.</param>
 public void DisplayNotificationInChat(string msg, ChatBufferTextStyle style)
 {
     DisplayNotificationInChat(msg, style, true);
 }
示例#14
0
        public static OpenTK.Graphics.Color4 GetColorForStyle(ChatBufferTextStyle style)
        {
            switch (style)
            {
                case ChatBufferTextStyle.StatusBlue:
                    return new OpenTK.Graphics.Color4(0.2f, 0.2f, 1f, 1f);
                case ChatBufferTextStyle.StatusDarkBlue:
                    return new OpenTK.Graphics.Color4(0f, 0f, 1f, 1f);
                case ChatBufferTextStyle.ObjectChat:
                    return new OpenTK.Graphics.Color4(0.7f, 0.9f, 0.7f, 1f);
                case ChatBufferTextStyle.OwnerSay:
                    return new OpenTK.Graphics.Color4(0.99f, 0.99f, 0.69f, 1f);
                case ChatBufferTextStyle.Alert:
                    return new OpenTK.Graphics.Color4(0.8f, 1f, 1f, 1f);
                case ChatBufferTextStyle.Error:
                    return new OpenTK.Graphics.Color4(0.82f, 0.27f, 0.27f, 1f);

                default:
                    return new OpenTK.Graphics.Color4(1f, 1f, 1f, 1f);

            }
        }