Inheritance: System.Windows.Forms.Form
コード例 #1
0
ファイル: WinFormsUI.cs プロジェクト: dakahler/alloclave
		internal static UIDialogResult ShowDialog(UIMode uiMode, SerializableException exception, Report report)
		{
			if (uiMode == UIMode.Minimal)
			{
				return new Minimal().ShowDialog(report);
			}
			else if (uiMode == UIMode.Normal)
			{
				using (var ui = new Normal())
				{
					return ui.ShowDialog(report);
				}
			}
			else if (uiMode == UIMode.Full)
			{
				using (var ui = new Full())
				{
					return ui.ShowDialog(exception, report);
				}
			}
			else
			{
				throw NBugConfigurationException.Create(() => Settings.UIMode, "Parameter supplied for settings property is invalid.");
			}
		}
コード例 #2
0
 internal static UIDialogResult ShowDialog(UIMode uiMode, SerializableException exception, Report report)
 {
     if (uiMode == UIMode.Minimal)
     {
         return(new Minimal().ShowDialog(report));
     }
     if (uiMode == UIMode.Normal)
     {
         using (var ui = new Normal())
         {
             return(ui.ShowDialog(report));
         }
     }
     if (uiMode == UIMode.Full)
     {
         using (var ui = new Full())
         {
             return(ui.ShowDialog(exception, report));
         }
     }
     throw NBugConfigurationException.Create(() => Settings.UIMode,
                                             "Parameter supplied for settings property is invalid.");
 }