예제 #1
0
        private void Button_CAPTURE_FOV_SET_Click(object sender, EventArgs e)
        {
            int nColStart = 0;
            int nRowStart = 0;
            int nColSize  = 0;
            int nRowSize  = 0;

            KSJApiBase.KSJ_ADDRESSMODE ColAddressMode = KSJApiBase.KSJ_ADDRESSMODE.KSJ_SKIPNONE;
            KSJApiBase.KSJ_ADDRESSMODE RowAddressMode = KSJApiBase.KSJ_ADDRESSMODE.KSJ_SKIPNONE;

            nColStart = Convert.ToInt32(TextBox_CAPTURE_COL_START.Text);
            nRowStart = Convert.ToInt32(TextBox_CAPTURE_ROW_START.Text);
            nColSize  = Convert.ToInt32(TextBox_CAPTURE_COL_SIZE.Text);
            nRowSize  = Convert.ToInt32(TextBox_CAPTURE_ROW_SIZE.Text);

            KSJApiBase.KSJ_CaptureSetFieldOfView(m_nDeviceCurSel, nColStart, nRowStart, nColSize, nRowSize, ColAddressMode, RowAddressMode);

            // User may not set FOV correctly, ksjapi will correct it!
            KSJApiBase.KSJ_CaptureGetFieldOfView(m_nDeviceCurSel, ref nColStart, ref nRowStart, ref nColSize, ref nRowSize, ref ColAddressMode, ref RowAddressMode);
            TextBox_PREVIEW_COL_START.Text = nColStart.ToString();
            TextBox_PREIVEW_ROW_START.Text = nRowStart.ToString();
            TextBox_PREIVEW_COL_SIZE.Text  = nColSize.ToString();
            TextBox_PREIVEW_ROW_SIZE.Text  = nRowSize.ToString();
        }