Example #1
0
 private void receivedReport_NewReport(object sender, ReportConnectionEventArgs e)
 {
     if (ConnectionEventCallback != null)
     {
         if (e.Report.Images.Count > 0)
         {
             ConnectionEventCallback.Invoke(Enum_ConnectionEvent.RECEIVED_IMAGE, e.Report);
         }
         ConnectionEventCallback.Invoke(Enum_ConnectionEvent.RECEIVED_REPORT, e.Report);
     }
     GC.Collect();
 }
Example #2
0
        void m_RepCon1_NewReport(object sender, ReportConnectionEventArgs e)
        {
            // Get the Inspection report
            report = e.Report;
            // Get Number of Blobs
            bool status;
            long numBlobs;

            status        = report.Results[0].AsBool;
            textBox1.Text = status.ToString();
            numBlobs      = report.Results[1].AsInt;
            textBox2.Text = numBlobs.ToString();

            //does our report contain any images, if so display it?
            if (report.Images.Count > 0)
            {
                //extract the image as a BufferDm,
                //and set it into the Buffer View
                BufferView1.Buffer = (BufferDm)report.Images[0];
            }

            // This is a good place to collect unused memory
            GC.Collect();
        }