After using Markdown in StackOverflow for sometime, I grown fond of it and wanted to use it for any generic documents, an alternative for Microsoft Word for example. There wasn’t any app I found that uses it. Also Microsoft Word is bloated for my needs, plus, it isn’t good for code, no way I found to have syntax highlighting. So I started developing MarkdownEdit
The Vision
Word processing powered by Markdown
The Result
it can also generate HTML using Templates
Download
This project is release Free & Open Source under the MIT License. Source Code on GitHub
Suppose you have some time-consuming “very useful” function like below
for (var i = 1; i <= 10; i++)
{
Thread.Sleep(TimeSpan.FromMilliseconds(i * 200));
}
If it runs on the UI thread, you will get a “hanged” UI (you can’t click buttons, drag the window etc). To fix that, you can use a BackgroundWorker, its easy. There are 3 main events that you need to handle
This method first writes the length of the string as a UTF-7 encoded unsigned integer, and then writes that many characters to the stream by using the BinaryWriter instance’s current encoding
So the length of string is prefixed then the text. So to avoid the prefix, just encode your string into bytes
BinaryWriter memBW = new BinaryWriter(memStream, encoder);
memBW.Write(encoder.GetBytes("Hello World"));