150 views
in GUI Development by
Hi Team,

I have multiple screens with different priorities. i just want to switching between different screens based on priority.

i need a common template / property to do the switching between screens without hardcode anything in code.

Can you please help me on this?

1 Answer

0 votes
by
Hi,

This use-case seems to be very specific for your application. Let me recommend to implement your own code within the application class that evaluates the priority settings of your screens. Based on these priorities you have to present the requested screen.

Best regards,

Manfred.
by
Hi Manfred,

You are telling to check the screen priority in one class component, right?

I just want to compare the priority of the one classA with priority of the classB

before that I need to check classB is active or not.
1)How to create common priority property for ClassA & ClassB

2)How to handle below logic in generic way? I don't want to directly check ClassB to check the case. [E.g., we can expect different classes (class C, Class D) in run time]
ClassA:

if(ClassB is active)

{

      if (ClassA Priority > ClassB priority)

     {

        present ClassA;

    }

 else

  {

Switch to ClassB;

   }

}
by

Hello Gayathri,

your question is not clear for us and thus it is difficult to give you a concrete advice. I have understood, you want a mechanism to present dialogs depending on already existing dialogs. If this is true, I would recommend to implement the corresponding code directly in the Application component. There you can evaluate which dialog is actually presented and decide how to proceed.

You will also need to create a common base class for all of your dialogs and add to this class some DialogPriority property. All dialog components should then descend from this BaseDialog component.

See also the property ActiveDialog and ActiveDialogClass described in the section Simplified approach to handle top-level dialogs (switching screens). It provides a convenient way to present and test the actually active dialog - as long as your application don't nest the dialogs.

I hope it helps you further.

Best regards

Paul Banach

Embedded Wizard Website | Privacy Policy | Imprint

...