EDN Admin
Well-known member
Hello everybody
I have an application which is grouped in a MainApplication and serveral Modules (DLLs)
The Main Application is basicly a Form with a NavigationBar on the Left Side (like in Outlook 2003) and an MDI-Parent. There is also a Simple Login Routine on this Form. I store the UserName after LoggingÎn to a Property.
The DLLs holds functionallity and Forms for various Sections for example there is a Employee.dll which holds functions and a form to show all Employees.
On Loading of the Main Application I loop trough all dlls in a "Module"-Folder and extract NavigationItems from them which I add to the MainForms NavigationPanel.
I dont have a reference to the Modules because I want to make it as flexible as possible so that it is possible to delete a Dll form the Module directory in order to remove the functionality from the MainApplication.
The Modules could work also without the MainApplication if they are Complied as an exe insted of DLL of course.
This works fine so far.
What I want to acomplish is to be able to access Propertys in the MainApplicatoin from within a Module.
For example: If a UserClicks on the DeleteEmployee Button the Module should check if the UserName Property (in the MainApplication) is like "admin" and then delete an Employee.
I should also be able to get a Reference of the MainForm to the Module(DLL) because I need to set the MDI-Parent Property for all Forms in within the Modules to the MainForm in order to display it in the MDI-Window form my MainApplication
Has somebody an Idea if and how this could be acomplished?
Thanks in advance
Olivier Salzgeber
View the full article
I have an application which is grouped in a MainApplication and serveral Modules (DLLs)
The Main Application is basicly a Form with a NavigationBar on the Left Side (like in Outlook 2003) and an MDI-Parent. There is also a Simple Login Routine on this Form. I store the UserName after LoggingÎn to a Property.
The DLLs holds functionallity and Forms for various Sections for example there is a Employee.dll which holds functions and a form to show all Employees.
On Loading of the Main Application I loop trough all dlls in a "Module"-Folder and extract NavigationItems from them which I add to the MainForms NavigationPanel.
I dont have a reference to the Modules because I want to make it as flexible as possible so that it is possible to delete a Dll form the Module directory in order to remove the functionality from the MainApplication.
The Modules could work also without the MainApplication if they are Complied as an exe insted of DLL of course.
This works fine so far.
What I want to acomplish is to be able to access Propertys in the MainApplicatoin from within a Module.
For example: If a UserClicks on the DeleteEmployee Button the Module should check if the UserName Property (in the MainApplication) is like "admin" and then delete an Employee.
I should also be able to get a Reference of the MainForm to the Module(DLL) because I need to set the MDI-Parent Property for all Forms in within the Modules to the MainForm in order to display it in the MDI-Window form my MainApplication
Has somebody an Idea if and how this could be acomplished?
Thanks in advance
Olivier Salzgeber
View the full article