Esempio n. 1
0
        protected override void OnExit(ExitEventArgs e)
        {
            var messages = new ErrorMessages();

            if (Globals.CurrentExceptionsCollection.Count > 0)
            {
                messages.AddRange(
                    Globals.CurrentExceptionsCollection.Select(exception => new ErrorMessage
                        (exception, Assembly.GetExecutingAssembly())
                        {
                            CurrentUser = Globals.MainUser.UserName,
                            UsesWebservice = Globals.MainUser.WebserviceUsed
                        }));
                messages.WriteExceptions2File(null, true);
            }

            base.OnExit(e);
            Component.Dispose();
        }