messagealert.cs

来自「这个版本(InteliIM Open Kernel Release 2)是目前最」· CS 代码 · 共 57 行

CS
57
字号
#region Using Directives

using System.Text;
using Org.InteliIM.Communications;

#endregion

namespace Org.InteliIM.Applications.Messenger.Alert
{
	/// <summary>
	/// The message representing an alert.
	/// </summary>
	public sealed class MessageAlert : InstantMessage
	{
		/// <summary>
		/// Initializes a new instance of the Alert class.
		/// </summary>
		public MessageAlert()
		{
		}

		private Alert alert;

		/// <summary>
		/// Gets or sets the alert.
		/// </summary>
		public Alert Alert
		{
			get
			{
				if (this.alert == null)
					this.alert = new Alert();

				return this.alert;
			}
			set 
            {
                this.alert = value; 
            }
		}

        /// <summary>
        /// Overridden. 
        /// Creates and returns a string representation of the current object.
        /// </summary>
        /// <returns></returns>
        public override string ToString()
		{
			StringBuilder sb = new StringBuilder();

			sb.Append("alert [sender: " + this.From);
			sb.Append(", receiver: " + this.To + "]");

			return sb.ToString();
		}
	}
}

⌨️ 快捷键说明

复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?