Archive

Posts Tagged ‘.net’

.netcat gui done in WPF

August 1st, 2010 Dennis Hedegaard No comments

I finally found some inspiration for doing the .netcat gui, the library and CLI was done a long time ago.

The gui has a focus on being small, fast and efficient. Escape closes all windows and enter sends data or goes to the next input. I decided to do it in WPF, which is a new gui toolkit in .net starting from .net 3.0, it is to replace the aging windows forms. In fact WPF is not exclusive to .net, since SWT (Standard Widget Toolkit) from eclipse has a WPF library that works quiet well. I used the WPF implementation in SWT back when I ported my XkcdReader project to SWT.

I’ve made a small site, where the binaries are hosted. They should work for anything .NET 3.5 and above, since mono doesn’t support WPF yet, you’re probably better off with the CLI (or just regular netcat, if you’re on unix).

The connection dialog:

The main window (HTTP example):

Get it while it’s hot, bug reports, pacthes and feature requests are welcome =]

Git repository: http://git.neo2k.dk/?p=cs/dotnetcat.git

Project site: http://pub.neo2k.dk/dotnetcat/

Categories: Languages Tags: , , ,

A little logging framework

January 27th, 2010 Dennis Hedegaard No comments

One of the great things about java was the logging framework under java.util.logging, it was simple, extendable and efficient. I’ve tried to take those properties and implement a logging framework for the .net platform in c#, for now it features a logger with some logging level, these determine if a log event should get filtered, there are the usual: fine, info, warning and severe. For the actually logging you implement something called a handler with a Write method, this method takes a log event with a time, level and message.

This is very similar to java’s implementation, but why change something that works well ?

I’ll be updating it with features (new ready-made handler implementations, info about the method that made the logging etc) and tweaks from time to time, for now it works.

The DEFAULT_LOGGER on the Logger class can be used to log to stderr, without having to create a logger and implement your own handler.

Feel free to try it, feedback is welcome.

git: http://git.neo2k.dk/?p=cs/logging.git;a=summary

dll: http://pub.neo2k.dk/logging/

Categories: Languages Tags: , ,