Пример #1
0
        void HandleSnapshot(object sender, Desko.Scan.SnapshotEventArgs args)
        {
            //   basicLog.ThreadSafeAppendLine("Handling snapshot " + args.Light.ToString() + " START.");

            Bitmap fullPane        = args.GetClippedBitmap(Desko.Scan.Clipping.None);
            Bitmap croppedDocument = args.GetClippedBitmap(Desko.Scan.Clipping.Document);
            Bitmap croppedFace     = args.GetClippedBitmap(Desko.Scan.Clipping.Face);
            //basicLog.ThreadSafeAppendLine("Scans available: Full(" + (fullPane != null ? "yes" : "no") + ") Doc(" + (croppedDocument != null ? "yes" : "no") + ") Face(" + (croppedFace != null ? "yes" : "no") + ").");

            ScanLightControl theControl = null;
            bool             isMoved    = false;

            switch (args.Light)
            {
            case Desko.Scan.Light.Infrared:
                theControl = controlIr;



                break;

            case Desko.Scan.Light.Visible:
                theControl = scanLightControl1;


                break;

            case Desko.Scan.Light.Ultraviolet:
                theControl = controlUv;



                break;
            }

            theControl.PaneImage     = fullPane;
            theControl.DocumentImage = croppedDocument;
            theControl.FaceImage     = croppedFace;
            theControl.Refresh();
        }
Пример #2
0
        private void doSnapshot()
        {
            device.Snapshot.Reset();

            ScanLightSettings settings = null;
            ScanLightControl  control  = null;

            settings = scanLightSettings1;
            control  = scanLightControl1;
            {
                Desko.Scan.ScanFlags flags = settings.ScanFlags;

                device.Snapshot.Infrared.Enabled            = settings.checkUse.Checked;
                device.Snapshot.Infrared.Flags              = flags;
                device.Snapshot.Infrared.ShutterWidthFactor = settings.ShutterWidthFactor;
                controlIr.Reset();
            }
            settings = scansettingsUv;
            control  = controlUv;
            {
                Desko.Scan.ScanFlags flags = settings.ScanFlags;

                device.Snapshot.Visible.Enabled            = settings.checkUse.Checked;
                device.Snapshot.Visible.Flags              = flags;
                device.Snapshot.Visible.ShutterWidthFactor = settings.ShutterWidthFactor;
                controlIr.Reset();
            }
            settings = scansettingsLight;
            control  = controlIr;
            {
                Desko.Scan.ScanFlags flags = settings.ScanFlags;


                device.Snapshot.Ultraviolet.Enabled            = settings.checkUse.Checked;
                device.Snapshot.Ultraviolet.Flags              = flags;
                device.Snapshot.Ultraviolet.ShutterWidthFactor = settings.ShutterWidthFactor;
                controlIr.Reset();
            }
        }