예제 #1
0
        void ShowResult(ResultInspection result)
        {
            try
            {
                bool existed = System.IO.File.Exists(result.ImagePath);
                if (result.ImagePath == null)
                {
                    Log.L_I.WriteError("ResultDisplay", "Path null");
                    return;
                }
                if (!System.IO.File.Exists(result.ImagePath))
                {
                    Log.L_I.WriteError("ResultDisplay", "Not Exist:" + result.ImagePath);
                    return;
                }

                g_UCSingleResult.ClearShapeHalWin();
                g_UCSingleResult.LoadLocalImage(result.ImagePath);
                List <double[]> list = CreatRect1(result);
                foreach (double[] value in list)
                {
                    g_UCSingleResult.DispRectangle1(value, 1, "red", "margin");
                }
            }
            catch (Exception ex)
            {
                Log.L_I.WriteError(NameClass, ex);
            }
        }
예제 #2
0
 void ShowResult_Sample(ResultInspection result, BaseUCDisplayCamera baseUCDisplayCamera)
 {
     try
     {
         baseUCDisplayCamera.ClearShapeHalWin();
         baseUCDisplayCamera.LoadLocalImage(result.ImagePath);
         if (result.ImagePath != null && System.IO.File.Exists(result.ImagePath))
         {
             List <double[]> list = CreatRect1(result);
             foreach (double[] value in list)
             {
                 baseUCDisplayCamera.DispRectangle1(value, 1, "red", "margin");
             }
         }
     }
     catch (Exception ex)
     {
         Log.L_I.WriteError(NameClass, ex);
     }
 }