Exemplo n.º 1
0
        /// <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()
                {
                });
            }
        }
Exemplo n.º 2
0
 /// <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();
     }
 }