After clicked button dialog event code needed - discuss

Hello.
How can i make a event that after you chose button from dialog

Thank you.