Hello everybody
I have an application which is grouped in a MainApplication and several
Modules (DLL's)
The Main Application is basically a Form with a NavigationBar on the
Left Side (like in Outlook 2003) and an MDI-Parent. Also there is a
Simple Login Routine on this Form. I store the UserName after LoggingÎn
to a Property.
The DLL's holds functionality and Forms for various Section for example
there is a Employee.dll with a form to show all Employees.
On Loading of the Main Application I loop trough all dlls in a
"Module"-Folder and load NavigationItems from them which I add to the
MainForms NavigationPanel.
This works fine so far.
Access objects/propertys in an Application from another DLL
Hello everybody
I have an application which is grouped in a MainApplication and several
Modules (DLL's)
The Main Application is basically 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 DLL's holds functionality 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 dll's in a
"Module"-Folder and extract NavigationItems from them which I add to the
MainForms NavigationPanel.
I don't 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 instead of DLL of course.
This works fine so far.
What I want to accomplish 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 accomplished?
Thanks in advance
Olivier Salzgeber