Adding iCloud support to a Xamarin app

One of the facilities in my Mobile DMX app allows the user to back up all of their workspaces (light shows) into a zip file, which can later be restored. In the currently released Android version the backup can be written to a folder on the tablet, or saved on a PC by using the Windows Companion app. Continue reading “Adding iCloud support to a Xamarin app”

Dropbox support for Xamarin.Forms

The new Dropbox v2 API makes it quite straightforward to add support for Dropbox into an app running on a phone or tablet. When I decided to add Dropbox support to Mobile DMX it quickly became obvious, looking at the “SimpleTest” sample app, that the awkward part is logging in, but uploading and downloading small files would then be very easy. Continue reading “Dropbox support for Xamarin.Forms”

Fun with Sockets

Actually, not fun at all. This problem has been driving me nuts for hours.

There are some things I like about .net socket programming, but one thing that always causes horrible problems is shutting sockets down when I’ve finished with them. One way or another, I always end up having to trap some exceptions. Continue reading “Fun with Sockets”

When is a char not a char? When it’s an int.

Just discovered a curious quirk in C#’s handling of the char type. Most of the time you can just think of it as being a character type, like a single character within a string, but actually it isn’t. It has an implicit coversion to int, but not to string, so

Console.WriteLine('A' + 'B');

would produce 131. Continue reading “When is a char not a char? When it’s an int.”

Sorting a grid bound to a BindingList

I’ve just been trying to implement move up/down buttons on the rows of a C1Flexgrid bound to a BindingList. I can’t believe how hard going it was. You would think that telling the grid to sort itself on the column containing the sort order would do it, but it doesn’t. Despite the implications in the documentation, if you read it very carefully you realise that it always uses the sort order of the underlying BindingList, regardless of what else it has been told to do. The only way to make it resort its rows is to clear out the binding list and rebuild it in the desired order.

I finally found an explanation of how to do it on StackOverflow.