Hello Paul,
thank you for support.
I decided to create a "global" event handler on the main application page (i.e. the Class Core::Root) to handle page present/switch and dismiss.
But I have a problem when I try to dismiss the dialog from the slot method called by the "global" event handler. The prototyper stops and got the exception "The dialog component is actually not presented"

To make you better understand the problem, I'm going to explain the situation in details.
I have decided to handle dialog switch and presentation from the main application page as done in the examples regarding "Managing dialogs (multiple screens)" online guide.
My application, at the moment, is quite simple and consists of two pages (for parameters setting) that can be switched, and a workingcycle page that can appear either via an external signals or by pressing buttons on the screen.
I have created a slot property on each page to display the other page and associate the relevant slot method with it.
So, at the beginning, I present FirstPage on the Init()method of main application page:
var Application::FirstPage FirstPageDialog = new Application::FirstPage;
//Associate slot method to switch to second page
FirstPageDialog.OnDisplaySecondPage = DisplaySecondPage;
//Present First page
rootthis.PresentDialog( FirstPageDialog, null, null, null, null, null, null, null, null, false );
to switch from first to second page, the DisplaySecondPage slot method is:
var Application::SecondPage SecondPageDialog = new Application::SecondPage;
//Associate slot method to swicth to second page
SecondPageDialog.OnDisplayFirstPage = DisplayFirstPage;
//Switch to second page
rootthis.SwitchToDialog( SecondPageDialog, null, null, null, null, null, null, null, null, null, false );
The same, to switch form second to first page the DisplayFirstPage slot method is:
var Application::FirstPage FirstPageDialog = new Application::FirstPage;
//Associate slot method to swicth to second page again
FirstPageDialog.OnDisplaySecondPage = DisplaySecondPage;
//Switch to first page
rootthis.SwitchToDialog( FirstPageDialog, null, null, null, null, null, null, null, null, null, false );
To present the CyclePage, all "triggers" (both from button and property change observer linked to a digital input) pass through the following slot method:
var Application::CyclePage CycleDialog = new Application::CyclePage;
//Present Cycle Page
rootthis.PresentDialog(CycleDialog, null, null, null, null, null, null, null, null, null);
The "global" event handler is triggered from the change of the propery Status from 5 (working) to 4 (ready).
To dismiss the page, the slot method linked to the OnEvent of the EventHandler is:
rootthis.DismissDialog( this, null, null, null, EnableObservers, null, false );
This handling should ensure that the slot method to dismiss the working page dialog is always executed regardless of the page displayed. But I don't understand why I'm getting this error, and I also don't understand how to set up checks to see if the currently displayed page is the cycle page.
I saw the IsCurrentDialog command, but how can I use it outside of the cycle page to determine if the displayed page is the cycle page?
What I think is "missing" is how, once the CyclePage has been created, I can access it outside of the method that presents it.
I'm attaching a screenshot of the mail page, with the following methods called:

- Start slot present the cycle page and every StartXSlot,StartXExtSlot and StartXBtnSlot postsignal this method (described above);
- NotWorkingEventHandler has slot CloseWorkPage linked OnEvent, and CloseWorkPage has the dismiss command (descrived above);
- DisplayFirstPage / DisplaySecondPage slot methods are described above.
Sorry if I insist on this, but I have to admit that closing a page due to an external event is creating me several problems that I can't understand and solve!
Thank you again for support.