zoukankan      html  css  js  c++  java
  • Zebra

            /// <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 "
    "
                    string[] retMsgs = strOutMsg.Split(new string[] { "
    " }, StringSplitOptions.RemoveEmptyEntries);
                    if (retMsgs != null)
                    {
                       string retFirstMsgItem = retMsgs[0];
                       string[] retFirstMsgItems = retFirstMsgItem.Split(new string[] { "," }, StringSplitOptions.RemoveEmptyEntries);
                       return "1".Equals(retFirstMsgItems[2]);
                    }
                }
                return false;
            }
    
  • 相关阅读:
    LOJ1036
    LOJ10132
    LOJ10131暗的连锁
    LOJ10128. 花神游历各国
    spoj 694(后缀数组)
    hdu 2459 (后缀数组+RMQ)
    hdu 3948(后缀数组+RMQ)
    ural 1297(后缀数组+RMQ)
    RMQ(dp)
    hdu 3518(后缀数组)
  • 原文地址:https://www.cnblogs.com/JustYong/p/4057254.html
Copyright © 2011-2022 走看看