示例#1
0
 public AlertInfo(string title, string message, string[] options, AlertListener listener)
 {
     this.title    = title;
     this.message  = message;
     this.options  = options;
     this.listener = listener;
 }
示例#2
0
    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);
    }
示例#3
0
    // 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;
        }
    }