Ejemplo n.º 1
0
        /// <summary>
        /// 添加消息
        /// </summary>
        /// <param name="message">消息内容</param>
        public virtual void AddMessage(string message)
        {
            if (string.IsNullOrWhiteSpace(message)) return;
            if (LimitCount > 0 && Messages.Count > LimitCount)
            {
                Messages.RemoveRange(0, Messages.Count - LimitCount);
            }
            var watchMessage = new WatchMessage()
            {
                CurrentWatchTab = this,
                Message = message,
                UpdateTime = DateTime.Now
            };
            Messages.Add(watchMessage);

            Magicodes.Web.Interfaces.GlobalApplicationObject.Current.WatchPanel.ExecuteMessageAddEvent(watchMessage);
        }
Ejemplo n.º 2
0
        /// <summary>
        /// 添加消息
        /// </summary>
        /// <param name="message">消息内容</param>
        public virtual void AddMessage(string message)
        {
            if (string.IsNullOrWhiteSpace(message))
            {
                return;
            }
            if (LimitCount > 0 && Messages.Count > LimitCount)
            {
                Messages.RemoveRange(0, Messages.Count - LimitCount);
            }
            var watchMessage = new WatchMessage()
            {
                CurrentWatchTab = this,
                Message         = message,
                UpdateTime      = DateTime.Now
            };

            Messages.Add(watchMessage);

            Magicodes.Web.Interfaces.GlobalApplicationObject.Current.WatchPanel.ExecuteMessageAddEvent(watchMessage);
        }
Ejemplo n.º 3
0
 /// <summary>
 /// 执行消息添加事件
 /// </summary>
 /// <param name="sender"></param>
 internal void ExecuteMessageAddEvent(WatchMessage sender)
 {
     OnMessageAdd(sender, new EventArgs());
 }
Ejemplo n.º 4
0
 /// <summary>
 /// 执行消息添加事件
 /// </summary>
 /// <param name="sender"></param>
 internal void ExecuteMessageAddEvent(WatchMessage sender)
 {
     OnMessageAdd(sender, new EventArgs());
 }