控制佳能相机远程拍照,设置参数。
_actionListenerList.Add((ActionListener)_controller);
_actionListenerList.ForEach(actionListener => _actionSource.AddActionListener(ref actionListener));
CameraEvent ce;
//_observerList.Add((IObserver)downloadProgressBar1);
_observerList.Add((IObserver)pictureBox1);
System.Threading.Thread.Sleep(1000);
_observerList.ForEach(observer => _controller.GetModel().Add(ref observer));
ce = new CameraEvent(CameraEvent.Type.PROPERTY_CHANGED, (IntPtr)EDSDKLib.EDSDK.PropID_AEMode);
_controller.GetModel().NotifyObservers(ce);
pictureBox1.SetActionSource(ref _actionSource);
ce = new CameraEvent(CameraEvent.Type.PROPERTY_DESC_CHANGED, (IntPtr)EDSDKLib.EDSDK.PropID_Tv);
_controller.GetModel().NotifyObservers(ce);
评论