posts - 218, comments - 222, trackbacks - 68

My Links

News




I am a Microsoft Certified Application Developer MCAD Chartered Member (C# .Net) and born in Bangladesh.
I work for Ocean Informatics Pty Ltd as a Senior Developer - Analyst.
I am also co-founder and core developer of Pageflakes (acquired by LiveUniverse) www.pageflakes.com
and most recently created SmartCodeGenerator

My Articles
Flexible and Plugin based .Net Application..
Mass Emailing Functionality with C#, .NET 2.0, and Microsoft® SQL Server 2005 Service Broker'
Write your own Code Generator or Template Engine in .NET
Smart Code Generator .NET: Usage Overview
Smart Code Generator .NET: Architectural Overview
Smart Code Generator .NET: using with NAnt and Cassini

Archives

Free Programming Language Training

Sick and tired of writing diagnostic event handlers to see when a control is firing events? You need EventSpy!

The idea is very cool. Just attach your control to the the EventSpy's Listener and there you go you can start monitoring the events that are firing. It will be very handy when you are confused of the time of event firing.

http://www.codeproject.com/useritems/eventspy.asp#xx1248901xx

Here is the code snippet that author pulished in his article. Very Simple.

public class Dummy
    {
        public delegate void DummyEventHandler(string something);
        public event DummyEventHandler DummyEvent;

        public void RaiseEvent()
        {
            if (DummyEvent != null)
                DummyEvent("Hello World!");
        }
    }

EventSpy.EventListener listener = new EventSpy.EventListener();
Dummy dummy = new Dummy();

listener.AttachTo(dummy); // This is the line to attach any componets to monitor.

dummy.RaiseEvent();

Enjoy!

Print | posted on Sunday, October 09, 2005 10:26 PM |

Feedback

No comments posted yet.

Post Comment

Title  
Name  
Email
Url
Comment   
Please add 2 and 4 and type the answer here:

Powered by: