Wednesday, August 1, 2007

Posting code to a blog

Before making the site, I had a dilemma.

Any site that deals heavily with code should have a good system for showing such code. Solution: Squishy Syntax

Using this (and an extra div tag for dealing with overflow), I get this:

19 public MessageWindow(Window parent, String message, double duration)
20 {
21 InitializeComponent();
22
23 this.parent = parent;
24
25 Message.Content = message;
26
27 this.Topmost = true;
28
29 timer = new System.Timers.Timer(duration);
30
31 this.Loaded += new RoutedEventHandler(MessageWindow_Loaded);
32 timer.Elapsed += new System.Timers.ElapsedEventHandler(timer_Elapsed);
33 timer.Start();
34
35
36 }

In conclusion: I like.


Edit: Squishy Syntax appears to come in two forms upon download: A DLL and a console application. Since the entire concept of it seems pretty simple, I'll just make a GUI for this later on, and probably post a link to it on here. Post a comment requesting it and theres a good chance I'll get it done sooner.

0 comments: