Example #1
0
        //改变层时,显示相应层的参数
        private void numudLayerNo_ValueChanged(object sender, EventArgs e)
        {
            m_nLayerNo = Convert.ToInt32(numudLayerNo.Value);
            int nRet = CSharpInterface.HS_GetLayerPara(m_nLayerNo, ref m_layerPara);

            if (nRet != 0)
            {
                MessageBox.Show("读取层参数数据失败!\n返回值:" + nRet.ToString() + "\n错误信息:"
                                + CSharpInterface.GetError().ToString(), "错误", MessageBoxButtons.OK, MessageBoxIcon.Error);
                this.Close();
            }
            SetData(false);
        }
Example #2
0
        //窗口加载函数
        private void SetLayerParaForm_Load(object sender, EventArgs e)
        {
            numudLayerNo.Maximum = m_nLayerCount - 1;
            numudLayerNo.Minimum = 0;

            m_nLayerNo = 0;
            int nRet = CSharpInterface.HS_GetLayerPara(m_nLayerNo, ref m_layerPara);

            if (nRet != 0)
            {
                MessageBox.Show("读取层参数数据失败!\n返回值:" + nRet.ToString() + "\n错误信息:"
                                + CSharpInterface.GetError().ToString(), "错误", MessageBoxButtons.OK, MessageBoxIcon.Error);
                this.Close();
            }
            SetData(false);
        }