Beispiel #1
0
        /// <summary>Event TrayArrive (115)</summary>
        /// <param name="reply">回覆的訊息(執行結果)</param>
        /// <remarks>
        /// <para>除非規格書有異動, 否則</para>
        /// <para>1. 函式名稱不得修改</para>
        /// <para>2. 函式不得刪除</para>
        /// </remarks>
        public void TrayArrive(ReplyMessage reply)
        {
            TrayArriveType trayArriveType = (TrayArriveType)((int)reply.Value);

            if (OnTrayArriveHandler != null)
            {
                var args = new OnTrayArriveEventArgs(trayArriveType);
                OnTrayArriveHandler.Invoke(this, args);
            }

            if (this.TrayArriveResult != null)
            {
                this.TrayArriveResult.Invoke(this, (int)trayArriveType);
            }
            if (OnTrayArriveHomeHandler != null && trayArriveType == TrayArriveType.ArriveHome)
            {
                OnTrayArriveHomeHandler.Invoke(this, EventArgs.Empty);
            }
            if (OnTrayArriveInHandler != null && trayArriveType == TrayArriveType.ArriveIn)
            {
                OnTrayArriveInHandler.Invoke(this, EventArgs.Empty);
            }
            if (OnTrayArriveOutHandler != null && trayArriveType == TrayArriveType.ArriveOut)
            {
                OnTrayArriveOutHandler.Invoke(this, EventArgs.Empty);
            }
            //   OnTrayArriveHomeHandler.Invoke(this, EventArgs.Empty);
        }
Beispiel #2
0
 /// <summary>OnTrayArriveInHandler</summary>
 /// <param name="sender"></param>
 /// <param name="e"></param>
 private void OnTrayArriveIn(object sender, EventArgs e)
 {
     //Sleep100msecs();
     this.SetDrawerWorkState(DrawerWorkState.TrayArriveAtPositionIn);
     if (OnTrayArriveInHandler != null)
     {
         OnTrayArriveInHandler.Invoke(this, e);
     }
 }
Beispiel #3
0
 /// <summary>OnTrayArriveInHandler</summary>
 /// <param name="sender"></param>
 /// <param name="e"></param>
 private void OnTrayArriveIn(object sender, EventArgs e)
 {
     //Sleep100msecs();
     this.SetDrawerWorkState(DrawerWorkState.TrayArriveAtPositionIn);
     Debug.WriteLine("Drawer IP=" + this.DeviceIP + ", Event=" + "OnTrayArriveIn");
     if (OnTrayArriveInHandler != null)
     {
         OnTrayArriveInHandler.Invoke(this, e);
     }
 }