Ejemplo n.º 1
0
 /// <summary> OnTrayMotionFailedHandler</summary>
 /// <param name="sender"></param>
 /// <param name="e"></param>
 private void OnTrayMotionFailed(object sender, EventArgs e)
 {
     this.SetDrawerWorkState(DrawerWorkState.TrayMotionFailed);
     if (OnTrayMotionFailedHandler != null)
     {
         OnTrayMotionFailedHandler.Invoke(this, e);
     }
 }
Ejemplo n.º 2
0
 /// <summary> OnTrayMotionFailedHandler</summary>
 /// <param name="sender"></param>
 /// <param name="e"></param>
 private void OnTrayMotionFailed(object sender, EventArgs e)
 {
     Debug.WriteLine("Drawer IP=" + this.DeviceIP + ", Event=" + "OnTrayMotionFailed");
     this.SetDrawerWorkState(DrawerWorkState.TrayMotionFailed);
     if (OnTrayMotionFailedHandler != null)
     {
         OnTrayMotionFailedHandler.Invoke(this, e);
     }
 }
Ejemplo n.º 3
0
        /// <summary>Event ReplyTrayMotion(111)</summary>
        /// <param name="reply">回覆的訊息(執行結果)</param>
        /// <remarks>
        /// <para>除非規格書有異動, 否則</para>
        /// <para>1. 函式名稱不得修改</para>
        /// <para>2. 函式不得刪除</para>
        /// </remarks>
        public void ReplyTrayMotion(ReplyMessage reply)
        {
            ReplyResultCode replyResultCode = (ReplyResultCode)((int)(reply.Value));

            if (OnReplyTrayMotionHandler != null)
            {
                var eventArgs = new OnReplyTrayMotionEventArgs(replyResultCode);
                OnReplyTrayMotionHandler.Invoke(this, eventArgs);
            }
            if (replyResultCode == ReplyResultCode.Set_Successfully)
            {
                if (OnTrayMotionOKHandler != null)
                {
                    OnTrayMotionOKHandler.Invoke(this, EventArgs.Empty);
                }
            }
            else
            {
                if (OnTrayMotionFailedHandler != null)
                {
                    OnTrayMotionFailedHandler.Invoke(this, EventArgs.Empty);
                }
            }
        }