Exemple #1
0
        public int AddClientToWaitQueue(Client c, StoreQueue queue)
        {
            if (queue != null)
            {
                //waitQueue.Add(c);
                queue.AddClient(c);

                OnClientAddedToQueue(new ClientEventArgs(c, Timer.getTick(), c.currentQueue));

                //index = waitQueue.IndexOf(c);

                if (queue.PeekNext() == c)
                {
                    this.OnClientInFrontOfQueue(new ClientEventArgs(c, Timer.getTick(), c.currentQueue));
                }
                return queue.IndexOf(c);
                //Logger.Info("Added client " + c.getId().ToString() + " to the wait queue at " + DateTime.Now.ToString());
            }
            return -1;
        }
 public void MoveToQueue(StoreQueue queue)
 {
     this.RemoveFromCurrentQueue();
     queue.AddClient(this);
 }