Information générale
Catégorie:
The Mere Mortals .NET Framework
Titre:
Inheritance of MM.Net forms to Intermediate Classes
Versions des environnements
Goal: Replicate standard MM Forms in a custom project so that we can customize functionality w/o needing to recompile the MM.Net Framework
Problem: Data Binding stops functioning
Attempted:
Created a new C# Project in our solution. Copied the following files from the MM.Net install folders: mmBusinessBaseForm.cs, mmBusinessForm.cs, mmEntityBusinessForm.cs, mmMaintenanceForm.cs (plus associated .resx files).
Renamed each file to have a 3 letter prefix "MHR" to represent a custom class and modified the each source code file to use these new names. Example: The mmMaintenanceForm.cs now has filename MHRmmMaintenanceForm.cs and the class and constructor has been renamed MHRmmMaintenanceForm as well.
So we have a C# project with a MHRmmMaintenanceForm which inherits from a MHRmmBusinessForm which inherits from a MHRmmEntityBusinessForm which inherits from a MHRmmBusinessBaseForm which inherits from the 2 interfaces of ILBaseForm, ImmBusinessForm as before. The namespace was left as OakLeaf.MM.Main.Windows.Forms but changing it to a namespace within our solution's namespace made no difference.
No other changes were made to the MM source code files listed above.
When I do this and inherit my form from the MHRmmMaintenanceForm, MM data binding stops working. Simply changing the inheritance back to mmMaintenanceForm restores MM data-binding functionality.
Any idea on why this may be happening? Is there a best practice for how to customize the MM forms included in the framework? Should we take a different approach?
As usual, any help much appreciated.
-Frank
Suivant
Répondre
Voir le fil de ce thread
Voir le fil de ce thread à partir de ce message seulement
Voir tous les messages de ce thread
Voir tous les messages de ce thread à partir de ce message seulement