Ejemplo n.º 1
0
        private void Application_Idle(object sender, EventArgs e)
        {
            //Console.WriteLine($"[Owner:{this.m_Owner.GetType().Name}]MessageProcess Start.Queueing Message Count = {this.m_MessageQueue.Count}");
            while (this.m_MessageQueue.Count != 0)
            {
                ApplicationMessage msg = this.m_MessageQueue.Dequeue();

                msg.Action();

                if (msg.SuspendMessageProcess)
                {
                    //Console.WriteLine($"{this.GetType().FullName}:SuspendMessageProcess");
                    break;
                }
            }
            //Console.WriteLine("MessageProcess End");
        }
Ejemplo n.º 2
0
 /// <summary>
 /// キューにメッセージを追加します。
 /// </summary>
 /// <param name="message"></param>
 public void AddMessage(ApplicationMessage message)
 {
     this.m_MessageQueue.Enqueue(message);
 }