Beispiel #1
0
        private void SnapshotRetriever_CameraThumbnailProduced(object sender, CameraThumbnailProducedEventArgs e)
        {
            SnapshotRetriever retriever = sender as SnapshotRetriever;

            if (retriever == null)
            {
                return;
            }

            if (e.HadError || e.ImageDescriptor == ImageDescriptor.Invalid || e.Thumbnail == null)
            {
                string title   = CameraLang.FormHandshakeResult_Failure_Title;
                string message = CameraLang.FormHandshakeResult_Failure_Message;
                MessageBox.Show(message, title, MessageBoxButtons.OK, MessageBoxIcon.Warning);
            }
            else
            {
                FormHandshakeResult result = new FormHandshakeResult(e.Thumbnail);
                result.ShowDialog();
                result.Dispose();
                e.Thumbnail.Dispose();
            }

            AfterCameraTest(retriever);
        }
Beispiel #2
0
        private void SnapshotRetriever_CameraThumbnailProduced(object sender, CameraThumbnailProducedEventArgs e)
        {
            SnapshotRetriever retriever = sender as SnapshotRetriever;

            if (retriever == null)
            {
                return;
            }

            FormHandshakeResult result = new FormHandshakeResult(e.Thumbnail);

            result.ShowDialog();
            result.Dispose();

            e.Thumbnail.Dispose();
            AfterCameraTest(retriever);
        }