示例#1
0
 public void OnBarcode_ID(object sender, EventArgs e)
 {
     if (OnBarcode_IDHandler != null)
     {
         OnBarcode_IDHandler.Invoke(this, e);
     }
 }
示例#2
0
        /// <summary>Event Barcode ID (005)</summary>
        /// <param name="rtnFromServer"></param>
        /// <remarks>
        /// <para>1. Load貨完成讀取Barcode後</para>
        /// <para>2. 收到AskBarcodeStatus</para>
        /// </remarks>
        public void Barcode_ID(ReturnFromServer rtnFromServer)
        {
            // rtnCode: 讀取成功或失敗
            var rtnCode = (EventBarcodeIDCode)(Convert.ToInt32(rtnFromServer.ReturnCode));
            // barcodeID: 讀取成功時的 barcode ID
            var barcodeID = rtnFromServer.ReturnValue;

            if (OnBarcode_IDHandler != null)
            {
                var eventArgs = new OnBarcode_IDEventArgs(rtnCode, barcodeID);
                OnBarcode_IDHandler.Invoke(this, eventArgs);
            }
        }