How can I change resource files for a c# winform app, without changing the culture? -


We have a Wi-fi app that has been in development for some time. It has many images and control colors that create branded experience. We have a second customer who would like the same product, but with different branding.

So we have lines of code in the control designer.cs files:

  this .BackgroundImage = global :: MyNameSpace.Properties.Resources.background;  

It seems that resource files are the way to go, because I can only change the culture and file a different resource with different images.

Want to change T culture (I do not want to show the dates, currency etc.) to change it and it just smells.

Can I manually change the resource file over time or compile at the time without changing the culture?

Is there a better way to achieve this result?

In addition, how you can use resource files to set control colors (such as all backgrounds to black to red)

You can read in resources from a different file which was just a resource (but not dependent on globalized satellite assembly system) You can get the default transmission form with your main assembly Can also be compiled in the form of a decline in the form.

Use the .resx file, and then ResourceManager to read it from the .resources file, like this:

  // Note that the resource filename includes ".resources" extension var rm = ResourceManager.CreateFileBasedResourceManager not included (resourcefile name, resourcedear, blank); this. Background image = (image) rm.GetObject ("background");  

Comments

Popular posts from this blog

Eclipse CDT variable colors in editor -

AJAX doesn't send POST query -

wpf - Custom Message Box Advice -