www.pudn.com > sharewindows.rar > INblh_Link_Base_Object.cs, change:2016-01-07,size:1122b


using NBLH_LINK.Args; 
using System; 
using System.Collections.Generic; 
using System.Linq; 
using System.Text; 
using System.Threading.Tasks; 
 
namespace NBLH_LINK 
{ 
    public delegate void MessageHandle(object sender, Nblh_Link_Args_Message message); 
    public class INblh_Link_Base_Object 
    { 
        // 消息事件 
        public event MessageHandle MessageEvent; 
        // 发送消息 
        public virtual void SendMessage(string message) 
        { 
            if (MessageEvent != null) 
            { 
                MessageEvent(this, new Nblh_Link_Args_Message(message)); 
            } 
        } 
        ~INblh_Link_Base_Object() 
        { 
            MessageEvent = null; 
        } 
        /// <summary> 
        /// 接收消息 
        /// </summary> 
        /// <param name="sender"></param> 
        /// <param name="message"></param> 
        public void ReceiveMessage(object sender, Nblh_Link_Args_Message message) 
        { 
            SendMessage(message.Message); 
        } 
        // 初始化 
        public virtual void Init() 
        { 
 
        } 
    } 
}