/// <summary>
        /// determine whether the network printer is in pause.
        /// </summary>
        /// <param name="ip"></param>
        /// <param name="port"></param>
        /// <param name="strOutMsg"></param>
        /// <returns></returns>
        private bool IsPause(string ip, int port)
        {
            string strOutMsg = null;
            string zebraCommand = "^XA~HS^XZ";
            PrinterCommunicate printerCommunicate = new PrinterCommunicate();
            if (printerCommunicate.SendZPL_ViaNetwork(ip, port, zebraCommand, out strOutMsg))
            {
                //split retMsg with "\r\n"
                string[] retMsgs = strOutMsg.Split(new string[] { "\r\n" }, StringSplitOptions.RemoveEmptyEntries);
                if (retMsgs != null)
                {
                   string retFirstMsgItem = retMsgs[0];
                   string[] retFirstMsgItems = retFirstMsgItem.Split(new string[] { "," }, StringSplitOptions.RemoveEmptyEntries);
                   return "1".Equals(retFirstMsgItems[2]);
                }
            }
            return false;
        }

 

相关文章:

  • 2021-09-19
  • 2021-11-23
  • 2022-12-23
  • 2022-01-20
  • 2022-03-06
  • 2022-02-04
  • 2021-09-03
  • 2022-12-23
猜你喜欢
  • 2021-10-08
  • 2021-12-27
  • 2021-08-16
  • 2022-12-23
  • 2022-12-23
  • 2021-09-08
  • 2022-03-06
相关资源
相似解决方案