コード例 #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();
                }
            }
        }