Example #1
0
        public ClearShotParams(ClearShotDevice device, IUserInterface ui)
        {
            _device           = device;
            _device.Attached += OnDeviceAttached;
            _device.Detached += OnDeviceDetached;
            _ui = ui;

            // If device already connected then OnConnected should be fired immediately.
            if (_device.IsAttached)
            {
                OnDeviceAttached(this, EventArgs.Empty);
            }
        }
Example #2
0
        public ClearShotLasers(ClearShotDevice device)
        {
            _device           = device;
            _device.Attached += OnDeviceAttached;
            _device.Detached += OnDeviceDetached;
            //_device.LaserEnabled += OnDeviceLaserEnabled;
            //_device.LaserDisabled += OnDeviceLaserDisabled;

            // If device already connected then OnConnected should be fired immediately.
            if (_device.IsAttached)
            {
                OnDeviceAttached(this, EventArgs.Empty);
            }
        }
Example #3
0
        public ClearShotCamera(ClearShotDevice device)
        {
            _device = device;

            _name         = "ClearShotWinUsb";
            _modelNumber  = "Unknown";
            _serialNumber = "Unknown";
            // Set default image size.
            _imageHeight = 784;
            _imageWidth  = 520;
            // Attached
            _isAttached = false;

            //Register events.
            _device.Attached += OnAttached;
            _device.Detached += OnDetached;

            // If camera already connected them OnCameraConnected will not be fired.
            // We need to call it manually.
            if (_device.IsAttached)
            {
                QueueAsync(ProceedOnConnected(this, EventArgs.Empty));
            }
        }