Exemple #1
0
		internal static UIDialogResult ShowDialog(UIMode uiMode, SerializableException exception, Report report)
		{
			if (Settings.CustomUIHandle != null)
			{
				var e = new CustomUIEventArgs(uiMode, exception, report);
				Settings.CustomUIHandle.DynamicInvoke(null, e);
				return e.Result;
			}
			else
			{
				throw NBugConfigurationException.Create(() => Settings.UIMode, "Parameter supplied for settings property is invalid.");
			}
		}
Exemple #2
0
 private void Settings_CustomUIEvent(object sender, CustomUIEventArgs e)
 {
     var Form = new Normal();
     e.Result = Form.ShowDialog(e.Report);
 }
 /// <summary>
 /// Handles CustomUIEvent to show custom dialog when bug has occured
 /// </summary>
 /// <param name="sender"></param>
 /// <param name="e"></param>
 private void Settings_CustomUIEvent(object sender, CustomUIEventArgs e)
 {
     MessageBox.Show(e.Exception.Message, "Custom Dialog", MessageBoxButton.OK, MessageBoxImage.Error);
 }