Logic Controllers in Application

Logic Controllers samples are implemented in the LogicControllerSample solution. When the associated event occures, Logic Controllers send the following text in the output window.

The text in the Trace when activating List View:

  • example

12.02.15 16:05:04.923 EmployeeLogicController: OnActivated
 12.02.15 16:05:04.924 EmployeeTwoLogicController: OnActivated
 12.02.15 16:05:04.988 EmployeeLogicController: OnViewControlsCreated
 12.02.15 16:05:04.989 EmployeeTwoLogicController: OnViewControlsCreated

The text when opening-closing the Detail View:

  • example

12.02.15 16:10:11.618 Window closing: Ivan - Employee
 12.02.15 16:10:11.622 EmployeeLogicController: OnDeactivated
 12.02.15 16:10:11.623 EmployeeTwoLogicController: OnDeactivated
 12.02.15 16:10:11.624 Window closed: Ivan Employee

CallStack content:

  • example

LogicControllersSample.Module.dll!LogicControllersSample.Module.LogicControllers.EmployeeTwoLogicController.OnDeactivated(Xafari.LogicController.LogicControllerViewController controller)

I.e. the call of all methods is provided by the Controller in Xafari.

Thus, it is possible to control the behavior of the business object, event-based, using only one View Controller and several Logic Controllers, divided by their purpose.