winformsfeature-tracking

Feature tracking WinForms


I would like to extend my WinForms app, which a feature that allows me to monitor which functions are used by the users.

The idea is to count how many times e.g. a button has been clicked, or a popup was opened. I want to know which features are used more or less often by the users.

Any ideas how this can be done? (Or even if somebody solved this problem already)

tia, Martin


Solution

  • The only mechanism I can think on to do what your looking for is to use a logger like log4net / Log4PostSharp to log details to a log file on the machine, this would give you details on usage for that particular client. You would have to create a custom attribute that you could decorate your methods with that would result in something being written out to the log file, otherwise your code would end up littered with code to implement the logging!

    Have a look at this article too, it uses Log4PostSharp with AOP (Aspect Oriented Programming) which would make the implementation of the logging much more cleaner (uses attributes).

    http://www.codeproject.com/KB/dotnet/log4postsharp-intro.aspx