March 2004 - Posts

Watched “The Interview” last night on DVD - it's an Australian masterpiece starring Hugo Weaving (aka. Mr. Smith)
I highly recommend people like myself, that can live without most of the hollywood crap and enjoy quality movies, to watch this. Truly one of my all-time favorites. Those of you who enjoyed 'The Usual Suspects', will love this. I'll wager my right arm ;)

Ok, now I've been trying to work out this problem for hours and hours, and drawn upon support from a handful of knowledgeble people - none of us has been able to figure it out...

The problem is that Bitmap.RawFormat isn't working like it's supposed to - let me explain: I'm trying to store the images using their original encoding/imageformat, and of course assumed RawFormat (type ImageFormat) would do as we are “promised”. At least I assume it is supposed to return a value declared in ImageFormat, but it doesn't. It simply returns an encoded string (would be helpful to know what encoding):
[ImageFormat: b96b3cae-0728-11d3-9d7b-0000f81ef32e]

I expected to see something simple as: Jpeg

I haven't yet tested this with any other image format. - Well if anyone has any kind of input on this, please let me know, as it is driving me nuts. If this is an expected behavior, I suggest the documentation gets updated, or better yet change this to reflect the actual ImageFormat type. In the meantime, I'm gonna have to dig out all the image format specs and create a helper class to read in the format directly from the binary data - yay! not...

[UPDATE: Problem solved - it was not with RawFormat the problem was it seems :/   Rather is was with non-seekable streams :D]

I just discovered and fixed a bug related to code blocks.  Therefor I recommend you re-download the latest build:
http://highlight.aylarsolutions.com/downloads/AylarSolutions.Highlight-2.0.zip

As a result of this fix, all code parsed by the HTML engine, is now automatically encapsulated in <pre> tags.

Scott just posted a very interesting piece on how to integrate Highlight into .Text
I highly suggest reading it!
http://scottwater.com/blog/archive/2004/03/11/11537.aspx

Just wanted to share an idea with you; I'm currently pondering the possiblity of adding alises to the definitions.
Eg. C# = CSharp, VB.NET = VB, J# = JSharp and so on. The reason for wanting to add this sort of support is to cater for user 'preference' really. Because if you want to give users this flexiblity in the current 2.0 release, you will need to create duplicate definitions in the configuration file.

Well I'd love to get some feedback on this - do you think this is useful, or should I spend my time on other areas?

Just finished uploading a very simple demo of Highlight 2.0.  The sample takes advantage of the Extensions assembly - the CodeBlockHighlighter class

To see what Highlight can do, simply add some content to the textbox with some inline code. These sections of code needs to be encapsulated in [code language=“?“][/code] tags (Eg. [code language=”C#”]// a simple comment[/code] )

http://highlight.aylarsolutions.com/Samples/default.aspx

Enjoy! ;)

I finally got around to putting it together and getting it online! :)
Only took me 4 months to ZIP it down and uploading <g>

Well it's pretty much the same as 1.x, except we've added more support for different elements you might want to highlight. Some bugfixes and performance tweaking. Although the biggest addition are the two new engines - one for RTF output and one for XML output.
There is also a new assembly - an extension of the basic component. This assembly currently only holds one class: CodeBlockHighlighter
This class is very handy if you want to highlight inline code elements, eg. code blocks in your article. If you are typing your articles using a control such RichTextBox or FreeTextBox, please set the InputIsHtmlEncoded property to true. This will make sure the generated output is as expected.

I am hoping to finish up the initial version of the component's homepage in the coming days, so you'll have a place to track the progress on upcoming verions, submit bugs and so on. - For now, simply add comments to this post, or contact me through the contact form if you have any feedback, bug reports or similar.

http://highlight.aylarsolutions.com/downloads/AylarSolutions.Highlight-2.0.zip

More Posts