Home - Forums-.NET - FlyGrid.Net (Windows Forms) - How to satisfy several customer with only one form

FlyGrid.Net (Windows Forms)

.NET Datagrid - Fast, highly customizable, industry standards .NET data grid control for WinForms

This forum related to following products: FlyGrid.Net

How to satisfy several customer with only one form
Link Posted: 20-Feb-2006 20:37
Hello!!

I'm using C#

Assume I have a form and two customers. From the very beginning the form is having the identical look for these two customer.

But now assume that one of these customer want to change the location for some controls(widget) and in addition want to add another control but the other customer don't want to see this new control.

One solution which is bad is to duplicate the form which also duplicate the code.

As you know the look for a form is located in method InitializeComponent.

If I had used MFC I would have used the resource files which store the look for a form in a named resource file. One customers look had been stored in one resource file and the other customer look would have been stored in another resource file but the code would only be in one place so no duplicate code would be nessecary.

Another solution which is also bad is to have two InitializeComponent
renamed to InitializeComponent_abc and InitializeComponent_xyz.

When I want to change the look for customer xyz I have to rename InitializeComponent_xyz to InitializeComponent. The constructor of the form would call the suitable InitializeComponent. This solution is bad.

The control could be any control for example a flyGrid.

Have you any good solution to my problem.


//Tony
Link Posted: 21-Feb-2006 01:25
You can use some of layout components - docking and bars.
These components existing in the .Net 2.0 Windows.Forms, or you can use SandBar/SandDock components from DivElements
We're using these components in our development and can recommend you to use.
These components will allow you to relayout form space, save and load individual layouts.
Link Posted: 21-Feb-2006 03:49
Hello!!

Your answer doesn't solve my problem having different look on the same form.

I think it might be a problem to find a solution to my problem.

The visually look for a form is located as you know in InitializeComponent.

So again is it possible to have several visually look at one form.

The main thing it to avoid duplicating the code.


//Tony
Link Posted: 21-Feb-2006 03:55
he visually look for a form is located as you know in InitializeComponent.
So again is it possible to have several visually look at one form.

Visual look can be loaded from external source - .ini file, resource of layout file. Search for layout components what can do it.
BTW: This board - FlyGrid.Net technical support related. You can send your question to microsoft.windows.forms forum, gotdotnet.com, codeproject.com to receive more detailed answer.