Exemple #1
0
 /// <summary>OnSetTimeOutFailedHandler</summary>
 /// <param name="sender"></param>
 /// <param name="e"></param>
 private void OnSetTimeOutFailed(Object sender, EventArgs e)
 {
     if (OnSetTimeOutFailedHandler != null)
     {
         OnSetTimeOutFailedHandler.Invoke(this, e);
     }
 }
Exemple #2
0
 /// <summary>OnSetTimeOutFailedHandler</summary>
 /// <param name="sender"></param>
 /// <param name="e"></param>
 private void OnSetTimeOutFailed(Object sender, EventArgs e)
 {
     Debug.WriteLine("Drawer IP=" + this.DeviceIP + ", Event=" + "OnSetTimeOutFailed");
     if (OnSetTimeOutFailedHandler != null)
     {
         OnSetTimeOutFailedHandler.Invoke(this, e);
     }
 }
Exemple #3
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);
            }
        }