コード例 #1
0
ファイル: Settings.xaml.cs プロジェクト: jmcfet/pixelLink
        void setFeature(PixeLINK.Feature feature, Slider slider, TextBox box)
        {
            CameraFeature features = new CameraFeature();

            if (!features.IsSupported)
            {
                return;
            }
            slider.Minimum = features.parameters[0].MinimumValue;
            slider.Maximum = features.parameters[0].MaximumValue;
            ReturnCode rc = cam.GetFeatureByParms(feature, ref flags, ref parms);

            box.Text = parms[0].ToString();
        }
コード例 #2
0
ファイル: Settings.xaml.cs プロジェクト: jmcfet/pixelLink
        void SetSlidersandInitialValue(PixeLINK.Feature feature, Slider slider, TextBox box, float multiplier)
        {
            CameraFeature features = cam.GetFeature(feature);

            if (!features.IsSupported)
            {
                slider.IsEnabled = false;
                return;
            }
            slider.Minimum = features.parameters[0].MinimumValue * multiplier;
            slider.Maximum = features.parameters[0].MaximumValue * multiplier;
            ReturnCode rc = cam.GetFeatureByParms(feature, ref flags, ref parms);

            box.Text = (parms[0] * multiplier).ToString();
        }
コード例 #3
0
        public CameraFeature SetFeatureandWait(PixeLINK.Feature feature, float[] parms, FeatureFlags flag = FeatureFlags.Manual)
        {
            CameraFeature features = new CameraFeature();
            ReturnCode    rc       = Api.SetFeature(m_hCamera, feature, flag, parms.Count(), parms);

            if (rc != ReturnCode.Success)
            {
                MessageBox.Show("bad parm");
            }
            ((App)Application.Current).logger.MyLogFile("SetFeature ", "Stop /start camera ");
            //     rc = Api.SetStreamState(m_hCamera, StreamState.Start);

            //          Api.SetStreamState(m_hCamera, StreamState.Start);
            return(features);
        }
コード例 #4
0
        public ReturnCode SetFeature(PixeLINK.Feature feature, float[] parms, FeatureFlags flag = FeatureFlags.Manual)
        {
            if (!FeatureSupportsManual((int)feature))
            {
                return(ReturnCode.NotSupportedError);
            }

            ReturnCode rc = Api.SetFeature(m_hCamera, feature, flag, parms.Count(), parms);

            if (rc != ReturnCode.Success)
            {
                MessageBox.Show("bad parm");
            }
            ((App)Application.Current).logger.MyLogFile("SetFeature ", string.Format("Feature : {0} ", feature));


            return(ReturnCode.Success);
        }
コード例 #5
0
        public ReturnCode GetFeatureByParms(PixeLINK.Feature feature, ref FeatureFlags flags, ref float[] parms)
        {
            int numParms = 4;

            return(Api.GetFeature(m_hCamera, feature, ref flags, ref numParms, parms));
        }
コード例 #6
0
 public CameraFeature GetFeature(PixeLINK.Feature featureId)
 {
     return(camfeatures[(int)featureId]);
 }