We use cookies to give you the best experience on our website. If you continue to browse, then you agree to our privacy policy and cookie policy.
Unfortunately, activation email could not send to your email. Please try again.

How to inherit a BarManager

Thread ID:

Created:

Updated:

Platform:

Replies:

251 May 14,2002 01:16 AM May 15,2002 10:07 PM Windows Forms 4
loading
Tags: Tools
Alex Brunner
Asked On May 14, 2002 01:16 AM

I tried to inherit the MainFrameBarManager to add my own logic to it. If I now try to add my of MainFrameBarManager to a form, it will automatically be removed from the forms components. Why is this happening? I would like to add my own resource handling directly into the MainFrameBarManager and into the ChildFrameBarManager to have access on all the existing commands to correctly being able to customize them for different languages.

Administrator [Syncfusion]
Replied On May 14, 2002 08:48 AM

I created a derived manager with these constructors: public class MyManager : MainFrameBarManager { public MyManager(IContainer components, Form form) : base(components, form) { } public MyManager(Form form) : base(form) { } public MyManager() { } } ...and it seemed to behave as expected during design-time. If you still have the problem you mention, please send a sample app that reproduces this issue to our Support Center, if you can. Just curious... how come you are not using the default localization support provided by VS.Net by turning on "localization" for your Forms and simply distributing add-on satellite resource dlls for specific locales? That way customization based on locale will be automatically handled by .Net (the menu command text as well). -Praveen Ramesh > I tried to inherit the MainFrameBarManager to add my own logic to it. > > If I now try to add my of MainFrameBarManager to a form, it will automatically be removed from the forms components. Why is this happening? > > I would like to add my own resource handling directly into the MainFrameBarManager and into the ChildFrameBarManager to have access on all the existing commands to correctly being able to customize them for different languages. >

Alex Brunner
Replied On May 15, 2002 12:16 AM

I will try to do that kind of inheritance. The reason why we are not using the default localization of VS.net is the following. If you do that you will get resx files for every form you are using. If you now would like to handle the translation of these files you will end up in a big problem. You must translate the resources by yourself because you will need the IDE to do so. If you are trying to outsource this task then you will have to send all your resx-files to the translation office which again needs the IDE to do the translation. Our approach is to implement an interface for the resource handling on every control. All our forms will be built in a way that should enable us to go ahead with translation without changing the forms layout. All our resource texts are located in special databases which can be used to do the translation process easily. When finished with the translation we only generate satellite assemblys wich are read by our resource handling mechanisms. We are also able to switch every resource handled control from satellite assembly to db based resource handling. Our way of doing localization enables us to use the same techniques in WinForms and WebForms and gives us the possibility of supporting ContentManagementSystems as well. Do you think we are wrong with this approach? kind regards, Alex

Administrator [Syncfusion]
Replied On May 15, 2002 11:32 AM

The Winres.exe tool that comes with .Net lets you localize neutral culture .resx files to other locales and helps create satellite resource assemblies without the use of VS.Net IDE. One advantage I see in using this tool (and the IDE) is that you can localize much more than the text. I like the idea of being able to adjust the size of the Controls in particular. I am not familiar with localization in WebForms, so there are probably more issues to consider when you design your localization scheme. -Praveen Ramesh

Alex Brunner
Replied On May 15, 2002 10:07 PM

Do you know a way to handle all resources in only one resx-file? As much as I know, Winres only lets you customize one resx-file of one specific form. So if you have 200 forms in an application, you will get 200 resx files to translate - not really an easy job. WebForms have not localization support at all (by MS-default). You have to build it by yourself.

CONFIRMATION

This post will be permanently deleted. Are you sure you want to continue?

Sorry, An error occured while processing your request. Please try again later.

You are using an outdated version of Internet Explorer that may not display all features of this and other websites. Upgrade to Internet Explorer 8 or newer for a better experience.

;