예제 #1
0
        public CapModel(NikonBase obj, NkMAIDCapInfo cap)
        {
            _object = obj;
            _cap = cap;

            NikonDevice device = _object as NikonDevice;

            if (device != null)
            {
                device.CapabilityValueChanged += new CapabilityChangedDelegate(device_CapabilityValueChanged);
            }
        }
예제 #2
0
        public ObjectModel(NikonBase obj)
        {
            _caps = new ObservableCollection<CapModel>();
            _object = obj;
            _doThumbnail = false;
            _doPreview = false;
            _doLowResPreview = false;
            _videoFile = null;

            _timer = new DispatcherTimer();
            _timer.Interval = TimeSpan.FromMilliseconds(33.0);
            _timer.Tick += new EventHandler(_timer_Tick);

            NikonDevice device = _object as NikonDevice;

            if (device != null)
            {
                device.CapabilityChanged += new CapabilityChangedDelegate(device_CapabilityChanged);

                device.CaptureComplete += new CaptureCompleteDelegate(device_CaptureComplete);
                device.ImageReady += new ImageReadyDelegate(device_ImageReady);

                // Note: Disable thumbnails and previews by default

                //device.PreviewReady += device_PreviewReady;
                //device.LowResolutionPreviewReady += device_LowResolutionPreviewReady;
                //device.ThumbnailReady += device_ThumbnailReady;
                //_doPreview = true;
                //_doLowResPreview = true;
                //_doThumbnail = true;

                device.VideoFragmentReady += new VideoFragmentReadyDelegate(device_VideoFragmentReady);
                device.VideoRecordingInterrupted += new VideoRecordingInterruptedDelegate(device_VideoRecordingInterrupted);
            }

            RefreshCaps();
        }