/// <summary> /// Starts displaying all views in order of their insertion into the queue /// </summary> public async void Show() { if (mQueue.Count != 0) { mCurrent = mQueue.Dequeue(); mCurrentOriginalDismissListener = mCurrent.DismissListener; mCurrent.DismissListener = this; mCurrent.Show(); if (autoRunDelay != null) { await Task.Delay((TimeSpan)autoRunDelay); if (mQueue.Count > 0) { mCurrent.Hide(); } else if (mQueue.Count == 0 && autoRunClosesQueue) { mCurrent.Hide(); } } } else if (QueueCompleted != null) { QueueCompleted.Invoke(this, new EventArgs() { }); } }
/// <summary> /// Cancels the Queue /// </summary> /// <param name="hideCurrent"></param> public void Cancel(bool hideCurrent) { if (hideCurrent && mCurrent != null) { mCurrent.Hide(); } if (mQueue.Count != 0) { mQueue.Clear(); } }