コード例 #1
0
 public static void ErrorToLog(string header, Exception occuredException)
 {
     try
     {
         LogFileWriter tempLogFileWriter = new LogFileWriter();
         Task          writelog          = new Task(() => tempLogFileWriter.writeToLogFile(header, occuredException));
         writelog.Start();
     }
     catch
     {
         throw;
     }
 }
コード例 #2
0
 public static void ErrorToLog(string header, Exception occuredException)
 {
     try
     {
         LogFileWriter tempLogFileWriter = new LogFileWriter();
         Task writelog = new Task(() => tempLogFileWriter.writeToLogFile(header, occuredException));
         writelog.Start();
     }
     catch
     {
         throw;
     }
 }
コード例 #3
0
 void webCam_ImageCaptured(object source, WebcamEventArgs e)
 {
     try
     {
         ip = ((System.Drawing.Bitmap)e.WebCamImage).GetHbitmap();
         bs = System.Windows.Interop.Imaging.CreateBitmapSourceFromHBitmap(ip, IntPtr.Zero, Int32Rect.Empty, BitmapSizeOptions.FromEmptyOptions());
         DeleteObject(ip);
         _FrameImage.Source = bs;
     }
     catch (Exception ErrorException)
     {
         LogFileWriter.ErrorToLog("webCam_ImageCaptured", ErrorException);
         DXMessageBox.Show(ErrorException.Message, CvVariables.SOFTWARE_NAME, MessageBoxButton.OK, MessageBoxImage.Error);
     }
 }