0
My idea is to separate the application into three distinct files, in the file MinhaAppBackend.dll
, will be, as the name suggests, all classes and other elements that are part of the back end of the application (Model, Viewmodel, Daos, etc).
In the archive MinhaAppFrontend.dll
will be all related to the GUI (WPF) part of the application (main window, dialogues, daughter windows, etc).
The archive MinhaApp.exe
will only be the starting point of the application, it will only be responsible for calling the main window that is in the library MinhaAppFrontend.dll
. Contrary to what most do it is to leave the front end in the file .exe
with the method main
generated at compile time. In my case it will be "donkey", it will have the only function to be the start of the application.
For the front-end, my idea is a project of the kind WPF User Control Library
, compiling GUI (WPF) elements for a dll
.
The project that will generate the file .exe
refers to dll
containing the front-end and "calls" the main window. I have not yet implemented this "solution model", just idealized.
What I want?
To know the opinion of the class about my idea of "solution design", that is, if it can bring me some problem or some extra difficulty or if it can be incompatible with the MVVM (analyzing without putting a hand in the dough I think not).
I also want to know what the main method for loading and displaying the main window is on dll
.
I’m posting the link for a demo project, in case someone needs to see in practice what I want.
The solution has two designs one Design is one Console Application
that generates one executable the other is one WPF User Control Library
which generates a window in a dll.
Hold on, I don’t get it. I put this line where (
Process.Start("caminho do .exe");
) ?– Matheus Saraiva
if you put it inside Mainwindow.xaml.Cs it will run the file . exe
– JcSaint
I had understood your question differently. Take a look at the correction.. forgive me
– JcSaint
You still don’t understand, there is no other window, this is the only and main window of the application. The difference is that it is in a Class Library (DLL) project.
Main
. In the projectMain
there is nothing, no GUI, no business rule, access to data, nothing.Main
will only be responsible for "starta" the application. Ie, call the main window of the program which in case isMainWindows
and is in a DLL.– Matheus Saraiva
Sorry for the huge delay in making a return, I really had to stop this project for a while. I realized that this question was not very well understood, so I edited the whole question and still shared a demo project.
– Matheus Saraiva