L
L
likilix2016-09-01 14:35:23
Delphi
likilix, 2016-09-01 14:35:23

MVC implementation, sort of. How to link two forms through an interface?

I am using C++ Builder.
There are two forms: FrmAuth - authorization form, FrmMain - main form.
It is necessary that they exchange "messages" with each other through the controller.
I want the controller to process the event from FrmAuth (onClick) when trying to authorize and pass the data (login, password) to the model, which in turn will attempt to connect to the UDB. If everything is successful, then it will return a message about this to the controller, which should close the authorization form and open the main form.
Also on the main form there is a button "Change user". When changing the user, messages go from the main form through the controller to the authorization form.
I do not understand the logic of linking everything together.
Something like that!

Answer the question

In order to leave comments, you need to log in

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question