Update() 공개 메소드

public Update ( System.DateTime now, Exception exception, StackTrace st, string message ) : void
now System.DateTime
exception System.Exception
st System.Diagnostics.StackTrace
message string
리턴 void
예제 #1
0
		private void _backgroundWindowOwnership() {
			while (_backgroundThreadRunning) {
				try {
					Thread.Sleep(700);

					if (!Configuration.EnableDebuggerTrace)
						continue;

					Application.Current.Dispatcher.Invoke(new Action(delegate {
						if (_enableClosing || Application.Current.MainWindow == null)
							return;

						foreach (Window window in Application.Current.MainWindow.OwnedWindows) {
							if (window is ErrorDialog) {
								if (((ErrorDialog)window).ErrorLevel == ErrorLevel.NotSpecified)
									return;

								_enableClosing = true;

								DebuggerDialog dialog = new DebuggerDialog(false);
								
								Visibility = Visibility.Hidden;
								dialog.Width = Width;
								dialog.Height = Height;
								dialog.Left = Left;
								dialog.Top = Top;

								window.Closed += delegate {
									Width = dialog.Width;
									Height = dialog.Height;
									Left = dialog.Left;
									Top = dialog.Top;
									dialog.Close();
									Visibility = Visibility.Visible;
									_enableClosing = false;

									Application.Current.Dispatcher.Invoke(new Action(delegate {
										Application.Current.MainWindow.Activate();
										Application.Current.MainWindow.Topmost = true;
										Application.Current.MainWindow.Topmost = false;
										Application.Current.MainWindow.Focus();
									}));
								};
								dialog.Update(_recentDebugInfo);
								dialog.Show();
							}
						}
					}));
				}
				catch (Exception err) {
					MessageBox.Show(err.Message);
				}
			}
		}
예제 #2
0
        private void _backgroundWindowOwnership()
        {
            while (_backgroundThreadRunning)
            {
                try {
                    Thread.Sleep(700);

                    if (!Configuration.EnableDebuggerTrace)
                    {
                        continue;
                    }

                    Application.Current.Dispatcher.Invoke(new Action(delegate {
                        if (_enableClosing || Application.Current.MainWindow == null)
                        {
                            return;
                        }

                        foreach (Window window in Application.Current.MainWindow.OwnedWindows)
                        {
                            if (window is ErrorDialog)
                            {
                                if (((ErrorDialog)window).ErrorLevel == ErrorLevel.NotSpecified)
                                {
                                    return;
                                }

                                _enableClosing = true;

                                DebuggerDialog dialog = new DebuggerDialog(false);

                                Visibility    = Visibility.Hidden;
                                dialog.Width  = Width;
                                dialog.Height = Height;
                                dialog.Left   = Left;
                                dialog.Top    = Top;

                                window.Closed += delegate {
                                    Width  = dialog.Width;
                                    Height = dialog.Height;
                                    Left   = dialog.Left;
                                    Top    = dialog.Top;
                                    dialog.Close();
                                    Visibility     = Visibility.Visible;
                                    _enableClosing = false;

                                    Application.Current.Dispatcher.Invoke(new Action(delegate {
                                        Application.Current.MainWindow.Activate();
                                        Application.Current.MainWindow.Topmost = true;
                                        Application.Current.MainWindow.Topmost = false;
                                        Application.Current.MainWindow.Focus();
                                    }));
                                };
                                dialog.Update(_recentDebugInfo);
                                dialog.Show();
                            }
                        }
                    }));
                }
                catch (Exception err) {
                    MessageBox.Show(err.Message);
                }
            }
        }