Beispiel #1
0
        public void ClientShowCLS()
        {
            m_PortUtil.Open();

            byte[] data = new byte[] { 0x1b, 0x40 };
            m_PortUtil.Write(data);

            m_PortUtil.Close();
        }
Beispiel #2
0
        public void ClientShowCLS()
        {
            m_PortUtil.Open();

            byte[] data = new byte[] { 0x1b, 0x40 };
            string buf  = "Welcome !";

            m_PortUtil.Write(data);
            m_PortUtil.Write(buf);

            m_PortUtil.Close();
        }
Beispiel #3
0
        /// <summary>
        /// 清屏
        /// </summary>
        public void ClientShowCLS()
        {
            m_PortUtil.Open();

            //初始化
            byte[] initial = new byte[] { 0x1b, 0x40 };
            //清屏
            byte[] cls = new byte[] { 0x0C };
            m_PortUtil.Write(initial);
            m_PortUtil.Write(cls);

            m_PortUtil.Close();
        }
Beispiel #4
0
        /// <summary>
        /// 数据信息展现
        /// </summary>
        /// <param name="data">发送的数据(清屏可以为null或者空)</param>
        private void DisplayData(CustomerDispiayType dispiayType, string data)
        {
            m_PortUtil.Open();

            //先清屏
            m_PortUtil.Write(((char)12).ToString());
            //指示灯
            string status = ((char)27).ToString() + ((char)115).ToString() + ((char)(int)dispiayType).ToString();

            m_PortUtil.Write(status);
            //发送数据
            if (!string.IsNullOrEmpty(data))
            {
                m_PortUtil.Write(((char)27).ToString() + ((char)81).ToString() + ((char)65).ToString() + data + ((char)13).ToString());
            }

            m_PortUtil.Close();
        }
Beispiel #5
0
 public void Close()
 {
     _portUtil.Close();
 }