void System.Windows.Markup.IComponentConnector.Connect(int connectionId, object target) {
     switch (connectionId)
     {
     case 1:
     this.ExceptionWindow = ((TraceLab.UI.WPF.Views.ExceptionDisplay)(target));
     return;
     }
     this._contentLoaded = true;
 }
Ejemplo n.º 2
0
 void System.Windows.Markup.IComponentConnector.Connect(int connectionId, object target)
 {
     switch (connectionId)
     {
     case 1:
         this.ExceptionWindow = ((TraceLab.UI.WPF.Views.ExceptionDisplay)(target));
         return;
     }
     this._contentLoaded = true;
 }
Ejemplo n.º 3
0
        void newWrapper_UnhandledException(object sender, UnhandledExceptionEventArgs e)
        {
            Action show = () =>
            {
                Exception exception = (Exception)e.ExceptionObject;
                //exception = exception.GetBaseException();

                ExceptionDisplay display = new ExceptionDisplay();
                display.ShowInTaskbar         = false;
                display.ShowActivated         = true;
                display.Owner                 = this;
                display.WindowStartupLocation = WindowStartupLocation.CenterOwner;
                display.DataContext           = exception;
                display.SizeToContent         = System.Windows.SizeToContent.WidthAndHeight;
                display.Title                 = "An unhandled exception occurred";

                display.ShowDialog();
            };

            Dispatcher.Invoke(show);
        }
        void newWrapper_UnhandledException(object sender, UnhandledExceptionEventArgs e)
        {
            Action show = () =>
            {
                Exception exception = (Exception)e.ExceptionObject;
                //exception = exception.GetBaseException();

                ExceptionDisplay display = new ExceptionDisplay();
                display.ShowInTaskbar = false;
                display.ShowActivated = true;
                display.Owner = this;
                display.WindowStartupLocation = WindowStartupLocation.CenterOwner;
                display.DataContext = exception;
                display.SizeToContent = System.Windows.SizeToContent.WidthAndHeight;
                display.Title = "An unhandled exception occurred";

                display.ShowDialog();
            };

            Dispatcher.Invoke(show);
        }