Пример #1
0
        //获取自定义数据
        private void btnGetCustomData_Click(object sender, EventArgs e)
        {
            int selindex = this.cmbObjList.SelectedIndex;

            if (selindex == -1)
            {
                return;
            }
            else if (selindex == 0)
            {
                CSharpInterface.HS_FreeStrokeList(m_listCustom);
            }
            else if (selindex == 1)
            {
                CSharpInterface.HS_FreeStrokeList(m_listCustom);
                int nRet = CSharpInterface.HS_GetStrokeList(null, m_listCustom);
                if (nRet == 0)
                {
                    tbNote.Text = "Get cutstom data success!";
                    Preview();
                }
                else
                {
                    ShowLastError();
                }
                return;
            }
            else
            {
                CSharpInterface.HS_FreeStrokeList(m_listCustom);
                string strObj;
                strObj = cmbObjList.Items[selindex].ToString();
                int nRet = CSharpInterface.HS_GetStrokeList(strObj, m_listCustom);
                if (nRet == 0)
                {
                    tbNote.Text = "获取自定义数据成功!";
                    Preview();
                }
                else
                {
                    ShowLastError();
                }
            }
        }
Пример #2
0
        //释放打标系统
        private void btnRelease_Click(object sender, EventArgs e)
        {
            CSharpInterface.HS_FreeStrokeList(m_listCustom);
            int nRet = CSharpInterface.HS_CloseMachine();

            if (0 == nRet)
            {
                tbNote.Text           = "Release ok!";
                tsslabCardStatus.Text = "Card Status: Not Init!!!";

                m_bInitOk = false;

                tsslabMarkRange.Text = "打标范围:";
                Refresh();
            }
            else
            {
                ShowLastError();
                tsslabCardStatus.Text = "Card Status: Init OK!!!";
            }
            UpdateView();
        }
Пример #3
0
 //关闭窗体时,关闭机器
 private void MainForm_FormClosing(object sender, FormClosingEventArgs e)
 {
     CSharpInterface.HS_CloseMachine();
     CSharpInterface.HS_FreeStrokeList(m_listCustom);
 }