public AlertInfo(string title, string message, string[] options, AlertListener listener) { this.title = title; this.message = message; this.options = options; this.listener = listener; }
public static void DisplayAlert(string title, string message, AlertListener listener, params string[] options) { if (showingAlert) { pendingAlerts.Add(new AlertInfo(title, message, options, listener)); return; } alertListener = listener; DisplayNativeAlert(title, message, options); }
// Callback issued from Native Muneris private void onAlertClosed(string option) { showingAlert = false; if ((alertListener != null) && (option != null)) { alertListener.OnAlertClosed(option); alertListener = null; } if (pendingAlerts.Count > 0) { AlertInfo info = pendingAlerts[0]; pendingAlerts.RemoveAt(0); DisplayNativeAlert(info.title, info.message, info.options); alertListener = info.listener; } }