dotnetmagic concepts
-
i'm using the dotnetmagic.com docking component. i want to develop the content of each dock in a library of its own. ( not using the dotnetmagic component ) the idea is to be able to re-use the same objects if i end up changing things to the application later. for example, i have a search ( in a group box ) and a datagrid. i want to be able to call them from their own class. should i attach the search and datagrid each to their own panels in their own library? i know i'm not doing a very good job explaining this .. espeically if you haven't used the dotnetmagic component. any advice would be appreciated.
-
i'm using the dotnetmagic.com docking component. i want to develop the content of each dock in a library of its own. ( not using the dotnetmagic component ) the idea is to be able to re-use the same objects if i end up changing things to the application later. for example, i have a search ( in a group box ) and a datagrid. i want to be able to call them from their own class. should i attach the search and datagrid each to their own panels in their own library? i know i'm not doing a very good job explaining this .. espeically if you haven't used the dotnetmagic component. any advice would be appreciated.
I guess I don't see what the problem is. .NET Magic doesn't care about where the content comes from. They are simply forms and can be in any assembly. When creating your docking manager and the content, instantiate the control from whatever library (either through Reflection or using assembly dependencies) and add it to the content. If you want to be able to refer to these controls directly instead of enumerating the content in a docking manager, then as you instantiate these various controls in any number of libraries, keep a collection (either local to the form that contains the docking manager, or some static collection that is globally accessible) or hashtable (same advice as for collections). We do something very similar in our application with no problem. It's no different than creating a basic form with a default
Button
orDataGrid
(for example). They are defined in the System.Windows.Forms assembly and your form isn't. The same is true for almost any language runtime in existence, for that matter.-----BEGIN GEEK CODE BLOCK----- Version: 3.21 GCS/G/MU d- s: a- C++++ UL@ P++(+++) L+(--) E--- W+++ N++ o+ K? w++++ O- M(+) V? PS-- PE Y++ PGP++ t++@ 5 X+++ R+@ tv+ b(-)>b++ DI++++ D+ G e++>+++ h---* r+++ y+++ -----END GEEK CODE BLOCK-----