Пример #1
0
        /// <summary>Event ReplySetSpeed(100)</summary>
        /// <param name="reply">回覆的訊息(執行結果)</param>
        /// <remarks>
        /// <para>除非規格書有異動, 否則</para>
        /// <para>1. 函式名稱不得修改</para>
        /// <para>2. 函式不得刪除</para>
        /// </remarks>
        public void ReplySetSpeed(ReplyMessage reply)
        {
            ReplyResultCode replyResultCode = (ReplyResultCode)((int)(reply.Value));

            if (OnReplySetSpeedHandler != null)
            {
                var eventArgs = new OnReplySetSpeedEventArgs(replyResultCode);
                OnReplySetSpeedHandler.Invoke(this, eventArgs);
            }
            if (SetMotionSpeedResult != null)
            {
                SetMotionSpeedResult.Invoke(this, replyResultCode == ReplyResultCode.Set_Successfully ? true : false);
            }
            if (replyResultCode == ReplyResultCode.Set_Successfully)
            {
                if (OnSetMotionSpeedOKHandler != null)
                {
                    OnSetMotionSpeedOKHandler.Invoke(this, EventArgs.Empty);
                }
            }
            else
            {
                if (OnSetMotionSpeedFailedHandler != null)
                {
                    OnSetMotionSpeedFailedHandler.Invoke(this, EventArgs.Empty);
                }
            }
        }
Пример #2
0
        public void LCDCMsg(ReplyMessage reply)
        {
            ReplyResultCode replyResultCode = (ReplyResultCode)((int)(reply.Value));
            var             eventArgs       = new OnLCDCMsgEventArgs(replyResultCode);

            if (OnLCDCMsgHandler != null)
            {
                OnLCDCMsgHandler.Invoke(this, eventArgs);
            }
            if (OnLCDCMsgOKHandler != null && replyResultCode == ReplyResultCode.Set_Successfully)
            {
                OnLCDCMsgOKHandler.Invoke(this, EventArgs.Empty);
            }
            if (OnLCDCMsgFailedHandler != null && replyResultCode == ReplyResultCode.Failed)
            {
                OnLCDCMsgFailedHandler.Invoke(this, EventArgs.Empty);
            }
        }
Пример #3
0
        //@~112,ReplyBrightLED,1@
        /// <summary>Event ReplyBrightLED(112)</summary>
        /// <param name="reply">回覆的訊息(執行結果)</param>
        /// <remarks>
        /// <para>除非規格書有異動, 否則</para>
        /// <para>1. 函式名稱不得修改</para>
        /// <para>2. 函式不得刪除</para>
        /// </remarks>
        public void ReplyBrightLED(ReplyMessage reply)
        {
            ReplyResultCode replyResultCode = (ReplyResultCode)((int)(reply.Value));
            var             eventArgs       = new OnReplyBrightLEDEventArgs(replyResultCode);

            if (OnReplyBrightLEDHandler != null)
            {
                OnReplyBrightLEDHandler.Invoke(this, eventArgs);
            }
            if (this.BrightLEDResult != null)
            {
                this.BrightLEDResult.Invoke(this, replyResultCode == ReplyResultCode.Set_Successfully ? true : false);
            }
            if (OnBrightLEDOKHandler != null && replyResultCode == ReplyResultCode.Set_Successfully)
            {
                OnBrightLEDOKHandler.Invoke(this, EventArgs.Empty);
            }
            if (OnBrightLEDFailedHandler != null && replyResultCode == ReplyResultCode.Failed)
            {
                OnBrightLEDFailedHandler.Invoke(this, EventArgs.Empty);
            }
        }
Пример #4
0
        /// <summary>Event  ReplySetTimeOut(101)</summary>
        /// <param name="reply">回覆的訊息(執行結果)</param>
        /// <remarks>
        /// <para>除非規格書有異動, 否則</para>
        /// <para>1. 函式名稱不得修改</para>
        /// <para>2. 函式不得刪除</para>
        /// </remarks>
        public void ReplySetTimeOut(ReplyMessage reply)
        {
            ReplyResultCode replyResultCode = (ReplyResultCode)((int)(reply.Value));
            var             eventArgs       = new OnReplySetTimeOutEventArgs(replyResultCode);

            if (OnReplySetTimeOutHandler != null)
            {
                OnReplySetTimeOutHandler.Invoke(this, eventArgs);
            }
            if (SetTimeOutResult != null)
            {
                SetTimeOutResult.Invoke(this, replyResultCode == ReplyResultCode.Set_Successfully ? true : false);
            }
            if (OnSetTimeOutOKHandler != null && replyResultCode == ReplyResultCode.Set_Successfully)
            {
                OnSetTimeOutOKHandler.Invoke(this, EventArgs.Empty);
            }
            if (OnSetTimeOutFailedHandler != null && replyResultCode == ReplyResultCode.Failed)
            {
                OnSetTimeOutFailedHandler.Invoke(this, EventArgs.Empty);
            }
        }
Пример #5
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);
                }
            }
        }
 public OnReplySetTimeOutEventArgs(ReplyResultCode replyResultCode) : this()
 {
     ReplyResultCode = replyResultCode;
 }
Пример #7
0
 public OnLCDCMsgEventArgs(ReplyResultCode replyResultCode) : this()
 {
     ReplyResultCode = replyResultCode;
 }
Пример #8
0
 public OnReplySetSpeedEventArgs(ReplyResultCode replyResultCode) : this()
 {
     ReplyResultCode = replyResultCode;
 }
Пример #9
0
 public OnReplyTrayMotionEventArgs(ReplyResultCode replyResultCode) : this()
 {
     ReplyResultCode = replyResultCode;
 }
Пример #10
0
 public OnReplyBrightLEDEventArgs(ReplyResultCode replyResultCode) : this()
 {
     ReplyResultCode = replyResultCode;
 }