I’ve updated my shared application for download:
Click the image for larger version…
This code includes everything I published recently, since I really use this application for most of my prototyping code.
The screenshot is shown using my dark colour theme. I think it looks the best of my three themes.
The ReOpenFile managed wrapper that I wrote about this morning is there, in Romy.Core.StreamExtensions.
The utility to change the Windows logon startup background is there with the Glass Form. (Shown.) I also worked some more on my Photoshopped monitor image (It is much improved and has a screen with 16:9 aspect ratio.), which I am also using for the program’s icons.
After commenting that I have never needed to write editors in the 2nd part of my post on playing with the PropertyGrid, I have added a couple in the solution. That’s my options dialog displayed, which allows you to select a directory path for the cache directory, using the newer Windows common dialog (without using the Windows API Code-Pack), although I haven’t written about any of that. (I might still get around to it.) The same dialog also uses a custom UITypeEditor that shows a fully expanded ColorDialog when you edit the colour property.
But this code is not production code and it is not bug-free, as it is always a work in progress. And BTW, if you would like the video player to be useable you need to have decent DirectShow codecs installed, such as the K-Lite Codec Pack.
I think this application is a good example of code that uses async everywhere. There’s very little synchronous code in the solution. In that regard, I have learned some lessons along the way… Like most developers I thought that asynchronous code runs faster… Just throw more threads at your problems. That is a fallacy! Asynchronous code generally runs slower than synchronous code. But compute-heavy tasks can be parallelized; and the more processor cores you have, the better it performs.
Think of synchronous code like a single sprinter in some vast wasteland. He can run super-fast, but the asynchronous code he’s up against is a zombie horde. They might move really slowly, but there’s potentially millions of them surrounding him. Who do you think is going to win?