Posts

Showing posts from October, 2011

SmartStepsUtil - A Utility Class for WinForms

Image
I’ve been using a utility class I wrote called “SmartStepsUtil” since 2007.  I’ve decided to share it with the world. It turns your WinForms app into a “Console” simply helping you to write colored text to a RichTextBox. I’ve used SmartStepsUtil on a few applications including SharePoint SUSHI . It makes it easy to quickly give feedback to the user about what is going on. It is thread safe, so you can call it from a background thread. Feel free to change it as needed. It just amazes me how many applications don’t give feedback to the user. Or they have complex UIs with textboxes all over the place. SmartSteps util brings the best of a Console application (simple UI, live feedback) into a Winforms app. To use SmartStepsUtil, copy into your application Methods: - AddtoRichTextBox() - ScrollToBottom() - ClearRichTextBox() Preset Styles to choose from to write to console: public enum StyleType {     bodyBlack,     bodyBlackBold,     bo