Best practices to support white-labeling in C# winforms application

1.4k Views Asked by At

I've developed an application that helps users to play casino games "better", based on statistical calculations.

It's an external application that sniffs network, understands certain casino room protocols(some web based, some native application) and gives real time advices to user.

Recently I was contacted by different casino room operators that want to license the software from me, customize the graphics/strings/feature set and give it to their users under their brand name.

So I'm going to have N different installs for N different casinos, with different graphics for each, different strings, different feature set enabled etc.

What are best practices to handle such requirements in c# winforms application, should I have different resource files for each vendor ? Is there something built in .net framework to handle such scenarios? Are there 3rd party software that can help me to manage this ?

Please be as verbose as possible, and thanks in advance!

2

There are 2 best solutions below

1
On

If this was an asp.net application I'd suggest using themes. They are not as well supported in form applications but there is good theme support in WPF. Check out http://wpfthemes.codeplex.com/

2
On

This should be straightforward because winforms is pretty "battleship grey" so once you've peeled off all decoration it'll be pretty plain and ready to start building up again.

Essentially:

  1. Remove any and all references in the code/forms to product name/company/customer.
  2. Start adding in specific "branding" items in the form of images and text etc.

Specifically:

  • Make sure the code has no reference to the product name/company/customer in namespaces etc.
  • Have all strings loaded from resource files (this'll help with localisation anyway).
  • If you want some "obvious branding" then have an image file loaded form disk or resources and displayed in a picturebox.

You can then have the same code built multiple times using a build tool, each time configuring the build with different resources.