public StatusWindow(GUIIrcConnection baseCon) : base(baseCon) { InitializeComponent(); AssociatedConnection.BaseConnection.PingReceived += new PingReceivedEventHandler(Client_OnPing); AssociatedConnection.BaseConnection.ModeReceived += new ModeReceivedEventHandler(Client_ModeReceived); MotdValue = new MotdListener(AssociatedConnection.BaseConnection); MotdValue.MotdEnd += new MotdEndEventHandler(MotdValue_MotdEnd); Input += new InputEventHandler(StatusWindow_Input); Disposed += new EventHandler(StatusWindow_Disposed); }
void StatusWindow_Disposed(Object sender, EventArgs e) { MotdValue.MotdEnd -= new MotdEndEventHandler(MotdValue_MotdEnd); MotdValue = null; }