//实时发送文本内容
        private void button18_Click(object sender, EventArgs e)
        {
            int          iX       = Convert.ToInt32(ZoneX.Text);
            int          iY       = Convert.ToInt32(ZoneY.Text);
            int          iW       = Convert.ToInt32(ZoneW.Text);
            int          iH       = Convert.ToInt32(ZoneH.Text);
            string       strText  = "实时发送文本测试!";
            User_FontSet FontInfo = new User_FontSet();

            FontInfo.bFontBold      = false;
            FontInfo.bFontItaic     = false;
            FontInfo.bFontUnderline = false;
            FontInfo.colorFont      = 0xFFFF;
            FontInfo.iFontSize      = 12;
            FontInfo.strFontName    = "宋体";
            FontInfo.iAlignStyle    = 0;
            FontInfo.iVAlignerStyle = 0;
            FontInfo.iRowSpace      = 0;

            if (!User_RealtimeSendText(g_iCardNum, iX, iY, iW, iH, strText, ref FontInfo))
            {
                MessageBox.Show("发送实时文本失败!");
            }
            else
            {
                MessageBox.Show("发送实时文本成功!");
            }
        }
Beispiel #2
0
        /// <summary>
        /// 实时发送文本内容
        /// </summary>
        /// <param name="sender"></param>
        /// <param name="e"></param>
        private void RealtimeSendText(int g_iCardNum, string strText)
        {
            int          iX       = 0;
            int          iY       = 0;
            int          iW       = 128;
            int          iH       = 32;
            User_FontSet FontInfo = new User_FontSet();

            FontInfo.bFontBold      = false;
            FontInfo.bFontItaic     = false;
            FontInfo.bFontUnderline = false;
            FontInfo.colorFont      = 0xFFFF;
            FontInfo.iFontSize      = 12;
            FontInfo.strFontName    = "宋体";
            FontInfo.iAlignStyle    = 0;
            FontInfo.iVAlignerStyle = 0;
            FontInfo.iRowSpace      = 0;

            if (!User_RealtimeSendText(g_iCardNum, iX, iY, iW, iH, strText, ref FontInfo))
            {
                MessageBox.Show("发送实时文本失败!");
            }
            else
            {
                MessageBox.Show("发送实时文本成功!");
            }
        }
Beispiel #3
0
 public static extern Boolean User_RealtimeSendText(int CardNum, int x, int y, int iWidth, int iHeight, string strText, ref User_FontSet pFontInfo);