Example #1
0
        // update LUT condition
        private void update_lut(bool bUpdatePicture)
        {
            if (mydcam != null)
            {
                MyDcamProp prop = new MyDcamProp(mydcam, DCAMIDPROP.BITSPERCHANNEL);

                double v = 0;
                prop.getvalue(ref v);
                m_lut.camerabpp = (int)v;
                m_lut.cameramax = (1 << m_lut.camerabpp) - 1;

                m_lut.inmax = HScrollLutMax.Value;
                m_lut.inmin = HScrollLutMin.Value;

                HScrollLutMax.Maximum = m_lut.cameramax;
                HScrollLutMin.Maximum = m_lut.cameramax;

                if (m_lut.inmax > m_lut.cameramax)
                {
                    m_lut.inmax         = m_lut.cameramax;
                    HScrollLutMax.Value = m_lut.inmax;
                    bUpdatePicture      = true;
                }
                if (m_lut.inmin > m_lut.cameramax)
                {
                    m_lut.inmin         = m_lut.cameramax;
                    HScrollLutMin.Value = m_lut.inmin;
                    bUpdatePicture      = true;
                }
                if (bUpdatePicture)
                {
                    MyUpdatePicture();
                }
            }
        }
Example #2
0
        public MyDcamProp Clone()
        {
            MyDcamProp ret = new MyDcamProp(m_hdcam, m_idProp);

            ret.m_attr = m_attr;
            return(ret);
        }
        public void set_mydcam(ref MyDcam mydcam)
        {
            // update DataSource of DataGridView
            List <dataprop> listprop = new List <dataprop>();

            MyDcamProp myprop = new MyDcamProp(mydcam, DCAMIDPROP.ZERO);

            while (myprop.nextid())
            {
                listprop.Add(new dataprop(myprop.Clone()));
            }
            DataGridViewProp.DataSource = listprop;
        }
 public dataprop(MyDcamProp myprop)
 {
     _dcamprop = myprop;
     _propname = _dcamprop.getname();
     _dcamprop.getvalue(ref _propvalue);
 }