w.bloggar vs. Qumana

During the last few weeks, I traveled a lot. Eventually, I was looking for a way to blog offline. Today, I decided to reinstall w.bloggar at least on my desktop machine. As far as I remember, there have been some issues before. Also, I tried to install Qumana, another free desktop blog interface. Unfortunately, I was not able to set up a connection with my blog. So the tool only reported error #11004, which has no meaning to me.

Threading in .NET

If you have some trouble in updating GUI elements in .NET because they are not created by the thread just running, try the following:

delegate void onSensorChangeParameterDelegate(int index, int sensorValue);
void kit_OnSensorChange(int index, int sensorValue)
{
    if (InvokeRequired)
    {
        BeginInvoke(new onSensorChangeParameterDelegate(kit_OnSensorChange), new object[] { index, sensorValue });
        return;
    }
    txtInfo.Text = String.Format("Index={0}, Value={1}", index, sensorValue);
}

 

So the method is handed over to the GUI thread, where txtInfo is a TextField, and processed there. Jon has written a great article about threading in .NET and how it can be done.