PDA

View Full Version : سوال: مشکل این کد کجاست !؟ میگه شبیه متود استفاده شده ...



ghasem110deh
چهارشنبه 05 اسفند 1394, 07:35 صبح
سلام به همه :)
از AForge استفاده کردم ...


FilterInfoCollection videoDevices;


private void ComboBoxSources_SelectedIndexChanged(object sender, EventArgs e)
{
if (videoDevices.Count != 0)
{
videoDevice = new VideoCaptureDevice(videoDevices(ComboBoxSources.Se lectedIndex).MonikerString);
EnumerateVideoModes(videoDevice);
}
}


// this error : frmClientele.videoDevices' is a 'field' but is used like a 'method'


کجا رو و چطور باید تغییر داد !؟

به videoDevices بعد از VideoCaptureDevice گیر میده !

ژیار رحیمی
چهارشنبه 05 اسفند 1394, 09:21 صبح
[hafezan.Clientele.frmClientele.videoDevices' is a field but is used like a method']
videoDevices یک فیلد از کلاس میباشد شما بصورت یک تابع(Method) ازش استفاده کردی

VideoCaptureDevice videoSource = new VideoCaptureDevice( videoDevices[ComboBoxSources.SelectedIndex].MonikerString );

http://www.aforgenet.com/framework/docs/