コード例 #1
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;
 }
コード例 #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;
 }
コード例 #3
0
ファイル: MainWindow.xaml.cs プロジェクト: thbin/TraceLab
        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);
        }
コード例 #4
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);
        }