summaryrefslogtreecommitdiff
path: root/reference/csharp/snippets/Efl.Ui.AlertPopup.cs
blob: 0621eccdb5c4d7c86647e26f1d978df2bea36c33 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
Efl.Ui.AlertPopup alertPopup = new Efl.Ui.AlertPopup(parent);

alertPopup.SetButton(Efl.Ui.AlertPopupButton.Positive, "Accept", null);
alertPopup.SetButton(Efl.Ui.AlertPopupButton.Negative, "Reject", null);

alertPopup.ButtonClickedEvent += (sender, args) =>
{
    if (args.arg.Button_type.Equals(Efl.Ui.AlertPopupButton.Positive))
        Console.WriteLine("Positive action invoked");
    else if (args.arg.Button_type.Equals(Efl.Ui.AlertPopupButton.Negative))
        Console.WriteLine("Negative action invoked");
};

alertPopup.BackwallClickedEvent += (s, e) =>
{
    Console.WriteLine("Backwall clicked");
};