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;
            }
    
  • 相关阅读:
    3288 积木大赛
    3284 疯狂的黄大神
    1531 山峰
    1018 单词接龙
    1432 总数统计
    1507 酒厂选址
    1063 合并果子
    几个sort不能过的题目
    poj 2245 Lotto
    求两圆相交面积模板
  • 原文地址:https://www.cnblogs.com/JustYong/p/4057254.html
Copyright © 2011-2022 走看看