I have the following problem, I'm making a popup to display information on the screen, almost the same way as a ShowDialog()
, being this way:
GeneralPopUp popupErro = new GeneralPopUp("Titulo", "Mensagem");
GeneralPopUp.ACTION_TYPE at = popupErro.ShowPopUp(parent);
And my intention is to wait for his action inside the popup that is a Form
to then validate what was done as follows:
switch (at)
{
case GeneralPopUp.ACTION_TYPE.NULO:
break;
case GeneralPopUp.ACTION_TYPE.OK:
break;
case GeneralPopUp.ACTION_TYPE.FECHAR:
break;
case GeneralPopUp.ACTION_TYPE.EXTRA1:
break;
case GeneralPopUp.ACTION_TYPE.EXTRA2:
break;
default:
break;
}
But the way I'm doing, it does not wait for the actions to take place inside that form and then to get on my switch, I'll probably have to do a handler for that situation.
What's the best way to do this handler ? If not, what is another solution?