Пример #1
0
 private void askForConfirmation(BaseObject item, Action<BaseObject> onAccept)
 {
     DialogHelper.ShowConfirmationDialog(
         "Veuillez confirmer",
         string.Format("Êtes-vous sûr de vouloir lancer la macro '{0}' ?", item.Name),
         item, this, onAccept
     );
 }
Пример #2
0
        public static void ShowConfirmationDialog(string title, string message, BaseObject item, Context context, Action<BaseObject> onAccept)
        {
            AlertDialog.Builder builder = new AlertDialog.Builder(context);

            builder.SetTitle(title);
            builder.SetMessage(message);
            builder.SetPositiveButton("Oui", (sender, e) => { onAccept(item); });
            builder.SetNegativeButton("Non", (sender, e) => { /* close popup */ });

            var alert = builder.Create();
            alert.Show();
        }