private static void HandledException(Exception ex)
 {
     if (UserStatisticsFactory.UnHandledExceptionEvent != null)
     {
         UserStatisticsFactory.UnHandledExceptionEvent(new EventArgs());
     }
     LogConfig.Logger.Error((object)"Unhandled exception.", ex);
     foreach (IUserStatistics userStatistics in UserStatisticsFactory.ListTracker)
     {
         userStatistics.UnHandledException(ex);
     }
     MessageBox.Show(ex.Message, (Window)null, "Error", MessageBoxImage.Info);
     Environment.Exit(-1);
 }
 private static void HandleUnhandledException(UnhandledExceptionArgs args)
 {
     UserStatisticsFactory.HandledException(args.ExceptionObject as Exception);
 }
 private static void UserStatisticsFactory_Closed(object sender, EventArgs e)
 {
     UserStatisticsFactory.Exit();
 }
 private static void HandleDomainUnhandledException(object sender, UnhandledExceptionEventArgs e)
 {
     UserStatisticsFactory.HandledException(e.ExceptionObject as Exception);
 }
 static UserStatisticsFactory()
 {
     UserStatisticsFactory.ListTracker.Add((IUserStatistics) new UserStatisitcsGoogle());
     UserStatisticsFactory.ListTracker.Add((IUserStatistics) new UserStatisitcsCS());
     UserStatisticsFactory.InitUnhandledException();
 }