Exemplo n.º 1
0
        /// <summary>Event ReplyBoxDetection(114)</summary>
        /// <param name="reply">回覆的訊息(執行結果)</param>
        /// <remarks>
        /// <para>除非規格書有異動, 否則</para>
        /// <para>1. 函式名稱不得修改</para>
        /// <para>2. 函式不得刪除</para>
        /// </remarks>
        public void ReplyBoxDetection(ReplyMessage reply)
        {
            var hasBox = false;

            if (reply.Value.HasValue && (int)reply.Value == 1)
            {
                hasBox = true;
            }
            if (OnReplyBoxDetection != null)
            {
                var args = new OnReplyBoxDetectionEventArgs(hasBox);
                OnReplyBoxDetection.Invoke(this, args);
            }
            if (BoxDetectionResult != null)
            {
                BoxDetectionResult.Invoke(this, hasBox);
            }

            if (OnDetectedHasBoxHandler != null && hasBox)
            {
                OnDetectedHasBoxHandler.Invoke(this, EventArgs.Empty);
            }
            if (OnDetectedEmptyBoxHandler != null && !hasBox)
            {
                OnDetectedEmptyBoxHandler.Invoke(this, EventArgs.Empty);
            }
        }
Exemplo n.º 2
0
 /// <summary>OnDetectedHasBoxHandler</summary>
 /// <param name="sender"></param>
 /// <param name="e"></param>
 private void OnDetectedHasBox(object sender, EventArgs e)
 {
     SetDrawerWorkState(DrawerWorkState.BoxExist);
     if (OnDetectedHasBoxHandler != null)
     {
         OnDetectedHasBoxHandler.Invoke(this, e);
     }
 }
Exemplo n.º 3
0
 /// <summary>OnDetectedHasBoxHandler</summary>
 /// <param name="sender"></param>
 /// <param name="e"></param>
 private void OnDetectedHasBox(object sender, EventArgs e)
 {
     Debug.WriteLine("Drawer IP=" + this.DeviceIP + ", Event=" + "OnDetectedHasBox");
     SetDrawerWorkState(DrawerWorkState.BoxExist);
     if (OnDetectedHasBoxHandler != null)
     {
         OnDetectedHasBoxHandler.Invoke(this, e);
     }
 }