diff --git a/.gitignore b/.gitignore
new file mode 100644
index 0000000..21fee68
--- /dev/null
+++ b/.gitignore
@@ -0,0 +1,108 @@
+## Ignore Visual Studio temporary files, build results, and
+## files generated by popular Visual Studio add-ons.
+
+# User-specific files
+*.suo
+*.user
+*.sln.docstates
+
+# Build results
+
+[Dd]ebug*/
+[Rr]elease/
+
+build/
+
+
+[Tt]est[Rr]esult
+[Bb]uild[Ll]og.*
+
+*_i.c
+*_p.c
+*.ilk
+*.meta
+*.obj
+*.pch
+*.pdb
+*.pgc
+*.pgd
+*.rsp
+*.sbr
+*.tlb
+*.tli
+*.tlh
+*.tmp
+*.vspscc
+*.vssscc
+.builds
+
+*.pidb
+
+*.log
+*.scc
+# Visual C++ cache files
+ipch/
+*.aps
+*.ncb
+*.opensdf
+*.sdf
+
+# Visual Studio profiler
+*.psess
+*.vsp
+
+# Guidance Automation Toolkit
+*.gpState
+
+# ReSharper is a .NET coding add-in
+_ReSharper*/
+
+*.[Rr]e[Ss]harper
+
+# NCrunch
+*.ncrunch*
+.*crunch*.local.xml
+
+# Installshield output folder
+[Ee]xpress
+
+# DocProject is a documentation generator add-in
+DocProject/buildhelp/
+DocProject/Help/*.HxT
+DocProject/Help/*.HxC
+DocProject/Help/*.hhc
+DocProject/Help/*.hhk
+DocProject/Help/*.hhp
+DocProject/Help/Html2
+DocProject/Help/html
+
+# Click-Once directory
+publish
+
+# Publish Web Output
+*.Publish.xml
+
+# Others
+[Bb]in
+[Oo]bj
+sql
+TestResults
+[Tt]est[Rr]esult*
+*.Cache
+ClientBin
+[Ss]tyle[Cc]op.*
+~$*
+*.dbmdl
+
+*.[Pp]ublish.xml
+
+Generated_Code #added for RIA/Silverlight projects
+
+# Backup & report files from converting an old project file to a newer
+# Visual Studio version. Backup files are not needed, because we have git ;-)
+_UpgradeReport_Files/
+Backup*/
+UpgradeLog*.XML
+
+# NuGet
+packages/
diff --git a/Documentation/Documentation.csproj b/Documentation/Documentation.csproj
new file mode 100644
index 0000000..9ce56ab
--- /dev/null
+++ b/Documentation/Documentation.csproj
@@ -0,0 +1,75 @@
+
+
+
+ Debug
+ x86
+ 8.0.30703
+ 2.0
+ {975E1EA6-EDA8-4E5D-AC56-7A741022C89A}
+ Exe
+ Properties
+ Documentation
+ Documentation
+ v4.0
+ Client
+ 512
+
+
+
+
+
+
+
+
+
+
+ true
+ bin\Debug\
+ DEBUG;TRACE
+ full
+ AnyCPU
+ bin\Debug\Documentation.exe.CodeAnalysisLog.xml
+ true
+ GlobalSuppressions.cs
+ prompt
+ MinimumRecommendedRules.ruleset
+ ;C:\Program Files (x86)\Microsoft Visual Studio 10.0\Team Tools\Static Analysis Tools\\Rule Sets
+ true
+ ;C:\Program Files (x86)\Microsoft Visual Studio 10.0\Team Tools\Static Analysis Tools\FxCop\\Rules
+ true
+
+
+ bin\Release\
+ TRACE
+ true
+ pdbonly
+ AnyCPU
+ bin\Release\Documentation.exe.CodeAnalysisLog.xml
+ true
+ GlobalSuppressions.cs
+ prompt
+ MinimumRecommendedRules.ruleset
+ ;C:\Program Files (x86)\Microsoft Visual Studio 10.0\Team Tools\Static Analysis Tools\\Rule Sets
+ true
+ ;C:\Program Files (x86)\Microsoft Visual Studio 10.0\Team Tools\Static Analysis Tools\FxCop\\Rules
+ true
+
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/Documentation/html/content/blank.html b/Documentation/html/content/blank.html
new file mode 100644
index 0000000..522a642
--- /dev/null
+++ b/Documentation/html/content/blank.html
@@ -0,0 +1 @@
+
\ No newline at end of file
diff --git a/Documentation/html/content/getting_started.html b/Documentation/html/content/getting_started.html
new file mode 100644
index 0000000..522a642
--- /dev/null
+++ b/Documentation/html/content/getting_started.html
@@ -0,0 +1 @@
+
\ No newline at end of file
diff --git a/Documentation/html/index.html b/Documentation/html/index.html
new file mode 100644
index 0000000..c0666d0
--- /dev/null
+++ b/Documentation/html/index.html
@@ -0,0 +1,9 @@
+
+
+
+ NBug Documentation
+
+
+
+
+
diff --git a/Documentation/html/toc.html b/Documentation/html/toc.html
new file mode 100644
index 0000000..2b4ec2c
--- /dev/null
+++ b/Documentation/html/toc.html
@@ -0,0 +1,9 @@
+
+
+
+ Untitled Page
+
+
+
+
+
diff --git a/Examples/NBug.Examples.Console/NBug.Examples.Console.csproj b/Examples/NBug.Examples.Console/NBug.Examples.Console.csproj
new file mode 100644
index 0000000..f0fc671
--- /dev/null
+++ b/Examples/NBug.Examples.Console/NBug.Examples.Console.csproj
@@ -0,0 +1,138 @@
+
+
+
+ Debug
+ x86
+ 8.0.30703
+ 2.0
+ {37281C42-C5CC-456D-B817-D81E6D866121}
+ Exe
+ Properties
+ NBug.Examples.Console
+ NBug.Examples.Console
+ v4.0
+ Client
+ 512
+
+
+
+
+
+
+
+
+ http://localhost/NBug.Examples.Console/
+ true
+ Web
+ true
+ Foreground
+ 7
+ Days
+ false
+ false
+ true
+ 0
+ 1.0.0.%2a
+ true
+ false
+ true
+
+
+ true
+
+
+ ..\..\Signing.snk
+
+
+ ..\..\NBug\resources\icon.ico
+
+
+ true
+ bin\Debug\
+ DEBUG;TRACE
+ true
+ full
+ AnyCPU
+ bin\Debug\NBug.Examples.Console.exe.CodeAnalysisLog.xml
+ true
+ GlobalSuppressions.cs
+ prompt
+ AllRules.ruleset
+ ;C:\Program Files\Microsoft Visual Studio 10.0\Team Tools\Static Analysis Tools\\Rule Sets
+ true
+ ;C:\Program Files\Microsoft Visual Studio 10.0\Team Tools\Static Analysis Tools\FxCop\\Rules
+ true
+
+
+ bin\Release\
+ TRACE
+ bin\Release\NBug.Examples.Console.XML
+ true
+ pdbonly
+ AnyCPU
+ bin\Release\NBug.Examples.Console.exe.CodeAnalysisLog.xml
+ true
+ GlobalSuppressions.cs
+ prompt
+ MinimumRecommendedRules.ruleset
+ ;C:\Program Files\Microsoft Visual Studio 10.0\Team Tools\Static Analysis Tools\\Rule Sets
+ false
+ ;C:\Program Files\Microsoft Visual Studio 10.0\Team Tools\Static Analysis Tools\FxCop\\Rules
+ false
+
+
+
+
+
+
+
+
+
+
+
+
+ Properties\GlobalAssemblyInfo.cs
+
+
+
+
+
+
+
+
+
+ False
+ Microsoft .NET Framework 4 %28x86 and x64%29
+ true
+
+
+ False
+ .NET Framework 3.5 SP1 Client Profile
+ false
+
+
+ False
+ .NET Framework 3.5 SP1
+ false
+
+
+ False
+ Windows Installer 3.1
+ true
+
+
+
+
+ {62CED1D5-F603-40DE-8BF5-3E49D3A392F4}
+ NBug
+
+
+
+
+
\ No newline at end of file
diff --git a/Examples/NBug.Examples.Console/Program.cs b/Examples/NBug.Examples.Console/Program.cs
new file mode 100644
index 0000000..4a5e856
--- /dev/null
+++ b/Examples/NBug.Examples.Console/Program.cs
@@ -0,0 +1,32 @@
+namespace NBug.Examples.Console
+{
+ using System;
+ using System.IO;
+
+ public class Program
+ {
+ public static void Main(string[] args)
+ {
+ // Check to see if test application is initialized by the configurator tool
+ if (args.Length > 0)
+ {
+ FileStream stream = new FileStream(args[0], FileMode.Open, FileAccess.Read, FileShare.ReadWrite);
+ NBug.Properties.SettingsOverride.LoadCustomSettings(stream);
+ }
+
+ // Sample NBug configuration for console applications
+ AppDomain.CurrentDomain.UnhandledException += NBug.Handler.UnhandledException;
+ System.Threading.Tasks.TaskScheduler.UnobservedTaskException += NBug.Handler.UnobservedTaskException;
+
+ Console.WriteLine("NBug now auto-handles: AppDomain.CurrentDomain.UnhandledException");
+ Console.WriteLine("NBug now auto-handles: Threading.Tasks.TaskScheduler.UnobservedTaskException");
+ Console.WriteLine(Environment.NewLine);
+ Console.Write("Generate a System.Exception (y/n): ");
+
+ if (Console.ReadKey().Key == ConsoleKey.Y)
+ {
+ throw new Exception("This is an exception thrown from NBug console sample application.");
+ }
+ }
+ }
+}
diff --git a/Examples/NBug.Examples.Console/Properties/AssemblyInfo.cs b/Examples/NBug.Examples.Console/Properties/AssemblyInfo.cs
new file mode 100644
index 0000000..14ae91a
--- /dev/null
+++ b/Examples/NBug.Examples.Console/Properties/AssemblyInfo.cs
@@ -0,0 +1,29 @@
+using System.Reflection;
+using System.Runtime.CompilerServices;
+using System.Runtime.InteropServices;
+
+// General Information about an assembly is controlled through the following
+// set of attributes. Change these attribute values to modify the information
+// associated with an assembly.
+[assembly: AssemblyTitle("NBug.Examples.Console")]
+[assembly: AssemblyDescription("NBug Console Sample Application created by Teoman Soygul.")]
+[assembly: AssemblyCulture("")]
+
+// Setting ComVisible to false makes the types in this assembly not visible
+// to COM components. If you need to access a type in this assembly from
+// COM, set the ComVisible attribute to true on that type.
+[assembly: ComVisible(false)]
+
+// The following GUID is for the ID of the typelib if this project is exposed to COM
+[assembly: Guid("9e72b2e3-590a-4ffe-8de5-ffa37efc9dd6")]
+
+// Version information for an assembly consists of the following four values:
+//
+// Major Version
+// Minor Version
+// Build Number
+// Revision
+//
+// You can specify all the values or you can default the Build and Revision Numbers
+// by using the '*' as shown below:
+// [assembly: AssemblyVersion("1.0.*")]
\ No newline at end of file
diff --git a/Examples/NBug.Examples.Console/app.config b/Examples/NBug.Examples.Console/app.config
new file mode 100644
index 0000000..f76deb9
--- /dev/null
+++ b/Examples/NBug.Examples.Console/app.config
@@ -0,0 +1,3 @@
+
+
+
diff --git a/Examples/NBug.Examples.WPF/App.xaml b/Examples/NBug.Examples.WPF/App.xaml
new file mode 100644
index 0000000..0793102
--- /dev/null
+++ b/Examples/NBug.Examples.WPF/App.xaml
@@ -0,0 +1,8 @@
+
+
+
+
+
diff --git a/Examples/NBug.Examples.WPF/App.xaml.cs b/Examples/NBug.Examples.WPF/App.xaml.cs
new file mode 100644
index 0000000..f32bde0
--- /dev/null
+++ b/Examples/NBug.Examples.WPF/App.xaml.cs
@@ -0,0 +1,31 @@
+namespace NBug.Examples.WPF
+{
+ using System;
+ using System.IO;
+ using System.Linq;
+ using System.Windows;
+
+ ///
+ /// Interaction logic for App.xaml
+ ///
+ public partial class App : Application
+ {
+ public App()
+ {
+ // Check to see if test application is initialized by the configurator tool
+ if (Environment.GetCommandLineArgs().Count() > 1)
+ {
+ FileStream stream = new FileStream(Environment.GetCommandLineArgs()[1], FileMode.Open, FileAccess.Read, FileShare.ReadWrite);
+ NBug.Properties.SettingsOverride.LoadCustomSettings(stream);
+ }
+
+ // For demonstrational purposes only, normally this should be left with it's default value as false!
+ NBug.Settings.HandleProcessCorruptedStateExceptions = true;
+
+ // Sample NBug configuration for WPF applications
+ AppDomain.CurrentDomain.UnhandledException += NBug.Handler.UnhandledException;
+ Application.Current.DispatcherUnhandledException += NBug.Handler.DispatcherUnhandledException;
+ System.Threading.Tasks.TaskScheduler.UnobservedTaskException += NBug.Handler.UnobservedTaskException;
+ }
+ }
+}
diff --git a/Examples/NBug.Examples.WPF/MainWindow.xaml b/Examples/NBug.Examples.WPF/MainWindow.xaml
new file mode 100644
index 0000000..653bf1b
--- /dev/null
+++ b/Examples/NBug.Examples.WPF/MainWindow.xaml
@@ -0,0 +1,15 @@
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/Examples/NBug.Examples.WPF/MainWindow.xaml.cs b/Examples/NBug.Examples.WPF/MainWindow.xaml.cs
new file mode 100644
index 0000000..1846daf
--- /dev/null
+++ b/Examples/NBug.Examples.WPF/MainWindow.xaml.cs
@@ -0,0 +1,54 @@
+namespace NBug.Examples.WPF
+{
+ using System;
+ using System.Threading.Tasks;
+ using System.Windows;
+
+ ///
+ /// Interaction logic for MainWindow.xaml
+ ///
+ public partial class MainWindow : Window
+ {
+ public MainWindow()
+ {
+ InitializeComponent();
+
+ this.crashTypeComboBox.SelectedIndex = 0;
+ }
+
+ private void CrashButton_Click(object sender, RoutedEventArgs e)
+ {
+ switch (this.crashTypeComboBox.Text)
+ {
+ case "UI Thread: System.Exception":
+ throw new System.Exception("Selected exception: '" + this.crashTypeComboBox.Text + "' was thrown.");
+ case "UI Thread: System.ArgumentException":
+ throw new ArgumentException("Selected exception: '" + this.crashTypeComboBox.Text + "' was thrown.", "MyInvalidParameter");
+ case "Background Thread (Task): System.Exception":
+ Task.Factory.StartNew(() => { throw new Exception(); });
+ // Below code makes sure that exception is thrown as only after finalization, the aggregateexception is thrown.
+ // As a side affect, unlike the normal behavior, the applicaiton will note continue its execution but will shut
+ // down just like any main thread exceptions, even if there is no handle to UnobservedTaskException!
+ // So remove below 3 lines to observe the normal continuation behavior.
+ System.Threading.Thread.Sleep(200);
+ GC.Collect();
+ GC.WaitForPendingFinalizers();
+ break;
+ case "Process Corrupted State Exception: Access Violation":
+ NBug.Settings.HandleProcessCorruptedStateExceptions = true;
+ this.AccessViolation();
+ break;
+ }
+ }
+
+ private unsafe void AccessViolation()
+ {
+ byte b = *(byte*)(8762765876);
+ }
+
+ private void CloseButton_Click(object sender, RoutedEventArgs e)
+ {
+ this.Close();
+ }
+ }
+}
diff --git a/Examples/NBug.Examples.WPF/NBug.Examples.WPF.csproj b/Examples/NBug.Examples.WPF/NBug.Examples.WPF.csproj
new file mode 100644
index 0000000..e4567bf
--- /dev/null
+++ b/Examples/NBug.Examples.WPF/NBug.Examples.WPF.csproj
@@ -0,0 +1,188 @@
+
+
+
+ Debug
+ x86
+ 8.0.30703
+ 2.0
+ {33B22A3A-8188-42BE-BAD6-40046019EA73}
+ WinExe
+ Properties
+ NBug.Examples.WPF
+ NBug.Examples.WPF
+ v4.0
+ Client
+ 512
+ {60dc8134-eba5-43b8-bcc9-bb4bc16c2548};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}
+ 4
+
+
+
+
+
+
+
+
+ true
+ http://localhost/NBug.WPF.TestApp/
+ true
+ Web
+ true
+ Foreground
+ 7
+ Days
+ false
+ false
+ true
+ 0
+ 1.0.0.%2a
+ false
+ true
+
+
+ ..\..\NBug\resources\icon.ico
+
+
+ true
+ bin\Debug\
+ TRACE;DEBUG
+ full
+ AnyCPU
+ bin\Debug\NBug.WPF.TestApp.exe.CodeAnalysisLog.xml
+ true
+ GlobalSuppressions.cs
+ prompt
+ AllRules.ruleset
+ ;C:\Program Files\Microsoft Visual Studio 10.0\Team Tools\Static Analysis Tools\\Rule Sets
+ true
+ ;C:\Program Files\Microsoft Visual Studio 10.0\Team Tools\Static Analysis Tools\FxCop\\Rules
+ true
+ false
+ true
+ true
+
+
+ bin\Release\
+ TRACE
+ true
+ pdbonly
+ AnyCPU
+ bin\Release\NBug.WPF.TestApp.exe.CodeAnalysisLog.xml
+ true
+ GlobalSuppressions.cs
+ prompt
+ MinimumRecommendedRules.ruleset
+ ;C:\Program Files\Microsoft Visual Studio 10.0\Team Tools\Static Analysis Tools\\Rule Sets
+ true
+ ;C:\Program Files\Microsoft Visual Studio 10.0\Team Tools\Static Analysis Tools\FxCop\\Rules
+ true
+ true
+
+
+ true
+
+
+ ..\..\Signing.snk
+
+
+
+
+
+
+
+
+
+
+ 4.0
+
+
+
+
+
+
+
+ MSBuild:Compile
+ Designer
+
+
+ MSBuild:Compile
+ Designer
+
+
+ Properties\GlobalAssemblyInfo.cs
+
+
+ App.xaml
+ Code
+
+
+ MainWindow.xaml
+ Code
+
+
+
+
+ Code
+
+
+ True
+ True
+ Resources.resx
+
+
+ True
+ Settings.settings
+ True
+
+
+ ResXFileCodeGenerator
+ Resources.Designer.cs
+
+
+
+ SettingsSingleFileGenerator
+ Settings.Designer.cs
+
+
+
+
+
+ False
+ Microsoft .NET Framework 4 %28x86 and x64%29
+ true
+
+
+ False
+ .NET Framework 3.5 SP1 Client Profile
+ false
+
+
+ False
+ .NET Framework 3.5 SP1
+ false
+
+
+ False
+ Windows Installer 3.1
+ true
+
+
+
+
+ {62CED1D5-F603-40DE-8BF5-3E49D3A392F4}
+ NBug
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/Examples/NBug.Examples.WPF/Properties/AssemblyInfo.cs b/Examples/NBug.Examples.WPF/Properties/AssemblyInfo.cs
new file mode 100644
index 0000000..bd4b0b5
--- /dev/null
+++ b/Examples/NBug.Examples.WPF/Properties/AssemblyInfo.cs
@@ -0,0 +1,36 @@
+using System.Reflection;
+using System.Resources;
+using System.Runtime.CompilerServices;
+using System.Runtime.InteropServices;
+using System.Windows;
+
+// General Information about an assembly is controlled through the following
+// set of attributes. Change these attribute values to modify the information
+// associated with an assembly.
+[assembly: AssemblyTitle("NBug.Examples.WPF")]
+[assembly: AssemblyDescription("NBug WPF Sample Application created by Teoman Soygul.")]
+[assembly: AssemblyCulture("")]
+
+// Setting ComVisible to false makes the types in this assembly not visible
+// to COM components. If you need to access a type in this assembly from
+// COM, set the ComVisible attribute to true on that type.
+[assembly: ComVisible(false)]
+
+//In order to begin building localizable applications, set
+//CultureYouAreCodingWith in your .csproj file
+//inside a . For example, if you are using US english
+//in your source files, set the to en-US. Then uncomment
+//the NeutralResourceLanguage attribute below. Update the "en-US" in
+//the line below to match the UICulture setting in the project file.
+
+//[assembly: NeutralResourcesLanguage("en-US", UltimateResourceFallbackLocation.Satellite)]
+
+
+[assembly: ThemeInfo(
+ ResourceDictionaryLocation.None, //where theme specific resource dictionaries are located
+ //(used if a resource is not found in the page,
+ // or application resource dictionaries)
+ ResourceDictionaryLocation.SourceAssembly //where the generic resource dictionary is located
+ //(used if a resource is not found in the page,
+ // app, or any theme specific resource dictionaries)
+)]
diff --git a/Examples/NBug.Examples.WPF/Properties/Resources.Designer.cs b/Examples/NBug.Examples.WPF/Properties/Resources.Designer.cs
new file mode 100644
index 0000000..b2b3dcb
--- /dev/null
+++ b/Examples/NBug.Examples.WPF/Properties/Resources.Designer.cs
@@ -0,0 +1,63 @@
+//------------------------------------------------------------------------------
+//
+// This code was generated by a tool.
+// Runtime Version:4.0.30319.225
+//
+// Changes to this file may cause incorrect behavior and will be lost if
+// the code is regenerated.
+//
+//------------------------------------------------------------------------------
+
+namespace NBug.Examples.WPF.Properties {
+ using System;
+
+
+ ///
+ /// A strongly-typed resource class, for looking up localized strings, etc.
+ ///
+ // This class was auto-generated by the StronglyTypedResourceBuilder
+ // class via a tool like ResGen or Visual Studio.
+ // To add or remove a member, edit your .ResX file then rerun ResGen
+ // with the /str option, or rebuild your VS project.
+ [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Resources.Tools.StronglyTypedResourceBuilder", "4.0.0.0")]
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
+ [global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()]
+ internal class Resources {
+
+ private static global::System.Resources.ResourceManager resourceMan;
+
+ private static global::System.Globalization.CultureInfo resourceCulture;
+
+ [global::System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Performance", "CA1811:AvoidUncalledPrivateCode")]
+ internal Resources() {
+ }
+
+ ///
+ /// Returns the cached ResourceManager instance used by this class.
+ ///
+ [global::System.ComponentModel.EditorBrowsableAttribute(global::System.ComponentModel.EditorBrowsableState.Advanced)]
+ internal static global::System.Resources.ResourceManager ResourceManager {
+ get {
+ if (object.ReferenceEquals(resourceMan, null)) {
+ global::System.Resources.ResourceManager temp = new global::System.Resources.ResourceManager("NBug.Examples.WPF.Properties.Resources", typeof(Resources).Assembly);
+ resourceMan = temp;
+ }
+ return resourceMan;
+ }
+ }
+
+ ///
+ /// Overrides the current thread's CurrentUICulture property for all
+ /// resource lookups using this strongly typed resource class.
+ ///
+ [global::System.ComponentModel.EditorBrowsableAttribute(global::System.ComponentModel.EditorBrowsableState.Advanced)]
+ internal static global::System.Globalization.CultureInfo Culture {
+ get {
+ return resourceCulture;
+ }
+ set {
+ resourceCulture = value;
+ }
+ }
+ }
+}
diff --git a/Examples/NBug.Examples.WPF/Properties/Resources.resx b/Examples/NBug.Examples.WPF/Properties/Resources.resx
new file mode 100644
index 0000000..ffecec8
--- /dev/null
+++ b/Examples/NBug.Examples.WPF/Properties/Resources.resx
@@ -0,0 +1,117 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ text/microsoft-resx
+
+
+ 2.0
+
+
+ System.Resources.ResXResourceReader, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089
+
+
+ System.Resources.ResXResourceWriter, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089
+
+
\ No newline at end of file
diff --git a/Examples/NBug.Examples.WPF/Properties/Settings.Designer.cs b/Examples/NBug.Examples.WPF/Properties/Settings.Designer.cs
new file mode 100644
index 0000000..3e60edf
--- /dev/null
+++ b/Examples/NBug.Examples.WPF/Properties/Settings.Designer.cs
@@ -0,0 +1,26 @@
+//------------------------------------------------------------------------------
+//
+// This code was generated by a tool.
+// Runtime Version:4.0.30319.225
+//
+// Changes to this file may cause incorrect behavior and will be lost if
+// the code is regenerated.
+//
+//------------------------------------------------------------------------------
+
+namespace NBug.Examples.WPF.Properties {
+
+
+ [global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()]
+ [global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.VisualStudio.Editors.SettingsDesigner.SettingsSingleFileGenerator", "10.0.0.0")]
+ internal sealed partial class Settings : global::System.Configuration.ApplicationSettingsBase {
+
+ private static Settings defaultInstance = ((Settings)(global::System.Configuration.ApplicationSettingsBase.Synchronized(new Settings())));
+
+ public static Settings Default {
+ get {
+ return defaultInstance;
+ }
+ }
+ }
+}
diff --git a/Examples/NBug.Examples.WPF/Properties/Settings.settings b/Examples/NBug.Examples.WPF/Properties/Settings.settings
new file mode 100644
index 0000000..8f2fd95
--- /dev/null
+++ b/Examples/NBug.Examples.WPF/Properties/Settings.settings
@@ -0,0 +1,7 @@
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/Examples/NBug.Examples.WPF/app.config b/Examples/NBug.Examples.WPF/app.config
new file mode 100644
index 0000000..97f932f
--- /dev/null
+++ b/Examples/NBug.Examples.WPF/app.config
@@ -0,0 +1,6 @@
+
+
+
+
+
+
diff --git a/Examples/NBug.Examples.WinForms/MainForm.Designer.cs b/Examples/NBug.Examples.WinForms/MainForm.Designer.cs
new file mode 100644
index 0000000..2022867
--- /dev/null
+++ b/Examples/NBug.Examples.WinForms/MainForm.Designer.cs
@@ -0,0 +1,100 @@
+namespace NBug.Examples.WinForms
+{
+ partial class MainForm
+ {
+ ///
+ /// Required designer variable.
+ ///
+ private System.ComponentModel.IContainer components = null;
+
+ ///
+ /// Clean up any resources being used.
+ ///
+ /// true if managed resources should be disposed; otherwise, false.
+ protected override void Dispose(bool disposing)
+ {
+ if (disposing && (components != null))
+ {
+ components.Dispose();
+ }
+ base.Dispose(disposing);
+ }
+
+ #region Windows Form Designer generated code
+
+ ///
+ /// Required method for Designer support - do not modify
+ /// the contents of this method with the code editor.
+ ///
+ private void InitializeComponent()
+ {
+ System.ComponentModel.ComponentResourceManager resources = new System.ComponentModel.ComponentResourceManager(typeof(MainForm));
+ this.crashButton = new System.Windows.Forms.Button();
+ this.crashTypeComboBox = new System.Windows.Forms.ComboBox();
+ this.closeButton = new System.Windows.Forms.Button();
+ this.SuspendLayout();
+ //
+ // crashButton
+ //
+ this.crashButton.Image = ((System.Drawing.Image)(resources.GetObject("crashButton.Image")));
+ this.crashButton.ImageAlign = System.Drawing.ContentAlignment.MiddleLeft;
+ this.crashButton.Location = new System.Drawing.Point(52, 68);
+ this.crashButton.Name = "crashButton";
+ this.crashButton.Size = new System.Drawing.Size(127, 23);
+ this.crashButton.TabIndex = 0;
+ this.crashButton.Text = "Generate Exception";
+ this.crashButton.TextAlign = System.Drawing.ContentAlignment.MiddleRight;
+ this.crashButton.UseVisualStyleBackColor = true;
+ this.crashButton.Click += new System.EventHandler(this.CrashButton_Click);
+ //
+ // crashTypeComboBox
+ //
+ this.crashTypeComboBox.DropDownStyle = System.Windows.Forms.ComboBoxStyle.DropDownList;
+ this.crashTypeComboBox.FormattingEnabled = true;
+ this.crashTypeComboBox.Items.AddRange(new object[] {
+ "UI Thread: System.Exception",
+ "UI Thread: System.ArgumentException",
+ "Background Thread (Task): System.Exception",
+ "Process Corrupted State Exception: Access Violation"});
+ this.crashTypeComboBox.Location = new System.Drawing.Point(12, 27);
+ this.crashTypeComboBox.Name = "crashTypeComboBox";
+ this.crashTypeComboBox.Size = new System.Drawing.Size(317, 21);
+ this.crashTypeComboBox.TabIndex = 1;
+ //
+ // closeButton
+ //
+ this.closeButton.DialogResult = System.Windows.Forms.DialogResult.Cancel;
+ this.closeButton.Location = new System.Drawing.Point(198, 68);
+ this.closeButton.Name = "closeButton";
+ this.closeButton.Size = new System.Drawing.Size(75, 23);
+ this.closeButton.TabIndex = 2;
+ this.closeButton.Text = "Close";
+ this.closeButton.UseVisualStyleBackColor = true;
+ this.closeButton.Click += new System.EventHandler(this.CloseButton_Click);
+ //
+ // MainForm
+ //
+ this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F);
+ this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
+ this.CancelButton = this.closeButton;
+ this.ClientSize = new System.Drawing.Size(341, 115);
+ this.Controls.Add(this.closeButton);
+ this.Controls.Add(this.crashTypeComboBox);
+ this.Controls.Add(this.crashButton);
+ this.Icon = ((System.Drawing.Icon)(resources.GetObject("$this.Icon")));
+ this.MaximizeBox = false;
+ this.Name = "MainForm";
+ this.StartPosition = System.Windows.Forms.FormStartPosition.CenterScreen;
+ this.Text = "NBug - Test Application";
+ this.ResumeLayout(false);
+
+ }
+
+ #endregion
+
+ private System.Windows.Forms.Button crashButton;
+ private System.Windows.Forms.ComboBox crashTypeComboBox;
+ private System.Windows.Forms.Button closeButton;
+ }
+}
+
diff --git a/Examples/NBug.Examples.WinForms/MainForm.cs b/Examples/NBug.Examples.WinForms/MainForm.cs
new file mode 100644
index 0000000..2eb6597
--- /dev/null
+++ b/Examples/NBug.Examples.WinForms/MainForm.cs
@@ -0,0 +1,50 @@
+namespace NBug.Examples.WinForms
+{
+ using System;
+ using System.Threading.Tasks;
+ using System.Windows.Forms;
+
+ public partial class MainForm : Form
+ {
+ public MainForm()
+ {
+ InitializeComponent();
+
+ this.crashTypeComboBox.SelectedIndex = 0;
+ }
+
+ private unsafe void CrashButton_Click(object sender, EventArgs e)
+ {
+ switch (this.crashTypeComboBox.Text)
+ {
+ case "UI Thread: System.Exception":
+ throw new Exception("Selected exception: '" + this.crashTypeComboBox.Text + "' was thrown.");
+ case "UI Thread: System.ArgumentException":
+ throw new ArgumentException("Selected exception: '" + this.crashTypeComboBox.Text + "' was thrown.", "MyInvalidParameter", new Exception("Test inner exception for argument exception."));
+ case "Background Thread (Task): System.Exception":
+ Task.Factory.StartNew(() => { throw new Exception(); });
+ // Below code makes sure that exception is thrown as only after finalization, the aggregateexception is thrown.
+ // As a side affect, unlike the normal behavior, the applicaiton will note continue its execution but will shut
+ // down just like any main thread exceptions, even if there is no handle to UnobservedTaskException!
+ // So remove below 3 lines to observe the normal continuation behavior.
+ System.Threading.Thread.Sleep(200);
+ GC.Collect();
+ GC.WaitForPendingFinalizers();
+ break;
+ case "Process Corrupted State Exception: Access Violation":
+ this.AccessViolation();
+ break;
+ }
+ }
+
+ private unsafe void AccessViolation()
+ {
+ byte b = *(byte*)(8762765876);
+ }
+
+ private void CloseButton_Click(object sender, EventArgs e)
+ {
+ this.Close();
+ }
+ }
+}
diff --git a/Examples/NBug.Examples.WinForms/MainForm.resx b/Examples/NBug.Examples.WinForms/MainForm.resx
new file mode 100644
index 0000000..e155829
--- /dev/null
+++ b/Examples/NBug.Examples.WinForms/MainForm.resx
@@ -0,0 +1,163 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ text/microsoft-resx
+
+
+ 2.0
+
+
+ System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089
+
+
+ System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089
+
+
+
+
+ iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8
+ YQUAAA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AAAAAAAAAA
+ AADMzMz/zMzM/8zMzP/MzMz/zs3N/7Bvdf9+Fh3/gRkj/4EZI/9+Fh7/qWFp/87Mzf/MzMz/zMzM/8zM
+ zP/MzMz/zMzM/////////////////+XQ0/9yAAr/dQMO/3UDDv91Aw7/dQMO/3IACv/fxsj/////////
+ ////////zMzM/8zMzP/////////////////hycv/dQQP/3UED/91BA//dQQP/3UED/91BA//2r2/////
+ /////////////8zMzP/MzMz/////////////////59PV/3UED/91BA//dQQP/3UED/91BA//dQQP/9u+
+ wf/////////////////MzMz/zcvL/+DGyP/bvcD/277B/8aXm/91BA//dQQP/3UED/91BRD/cgAK/3IA
+ Cf/dwMP/7d/h//Hm5//v4uP/zMzM/7Fxd/9xAQj/dQQP/3UED/91BA//dQQP/3UED/9zAQv/nExU/8ic
+ oP99FRz/1LC0/7qBh//JnKH/xZWa/9y/wv97Dxn/dQMO/3UED/91BA//dQQP/3UED/91BA//cwEM/6JX
+ Xv//////9Orr//Dl5v+9hov/yJqf/8qfo/+9hov/gRkk/3UDDv91BA//dQQP/3UED/91BA//dQQP/3MB
+ DP+hU1r/////////////////+/f4/9q8v//Npan/wIuR/4EZJP91Aw7/dQQP/3UED/91BA//dQQP/3UE
+ D/9zAQz/oFNa//////////////////nz9P/Zur3/zaWp/7+LkP96Dhj/dQIO/3UED/91BA//dQQP/3UE
+ D/91BA//cwEM/6JVXf//////8OPl/+vb3P+6gof/yJug/8qeov+9hov/uYCG/3ECCf91BA//dQQP/3UE
+ D/91BA//dQQP/3QBDf+XQkv/vIeM/3kMFf/VsrX/uoGG/8iboP/ElJn/4MjK/8zLzP/n1NX/4cnL/+LK
+ zP/LoKT/dQQP/3UED/91BA//dQQP/3IACf9wAAb/38XH//jz8//59fb/+PLz/8zMzP/MzMz/////////
+ ////////5tLU/3UED/91BA//dQQP/3UED/91BA//dQMO/9u/wf/////////////////MzMz/zMzM////
+ /////////////+DIyv91BA//dQQP/3UED/91BA//dQQP/3UED//avL7/////////////////zMzM/8zM
+ zP/////////////////m0tT/cwAL/3QDDv91Aw7/dQMO/3UDDv9yAAr/4MbJ/////////////////8zM
+ zP/MzMz/zMzM/8zMzP/MzMz/zs3N/7d9gv9+GSD/gRkk/4EZJP9+GB//r291/87Nzf/MzMz/zMzM/8zM
+ zP/MzMz/8A8AAPAPAADwDwAA8A8AAAAAAAAAAAAAAEAAAABwAAAAcAAAAEAAAAAAAAAAAQAA8A8AAPAP
+ AADwDwAA8A8AAA==
+
+
+
\ No newline at end of file
diff --git a/Examples/NBug.Examples.WinForms/NBug.Examples.WinForms.csproj b/Examples/NBug.Examples.WinForms/NBug.Examples.WinForms.csproj
new file mode 100644
index 0000000..5d97bf9
--- /dev/null
+++ b/Examples/NBug.Examples.WinForms/NBug.Examples.WinForms.csproj
@@ -0,0 +1,171 @@
+
+
+
+ Debug
+ x86
+ 8.0.30703
+ 2.0
+ {1A387F18-8DEA-4EF8-8399-B808F1B1F3AD}
+ WinExe
+ Properties
+ NBug.Examples.WinForms
+ NBug.Examples.WinForms
+ v4.0
+ Client
+ 512
+
+
+
+
+
+
+
+
+ http://localhost/NBug.Examples.WinForms/
+ true
+ Web
+ true
+ Foreground
+ 7
+ Days
+ false
+ false
+ true
+ 0
+ 1.0.0.%2a
+ true
+ false
+ true
+
+
+ ..\..\NBug\resources\icon.ico
+
+
+ true
+
+
+ ..\..\Signing.snk
+
+
+ true
+ bin\Debug\
+ TRACE;DEBUG
+ full
+ AnyCPU
+ bin\Debug\NBug.Examples.WinForms.exe.CodeAnalysisLog.xml
+ true
+ GlobalSuppressions.cs
+ prompt
+ AllRules.ruleset
+ ;C:\Program Files\Microsoft Visual Studio 10.0\Team Tools\Static Analysis Tools\\Rule Sets
+ true
+ ;C:\Program Files\Microsoft Visual Studio 10.0\Team Tools\Static Analysis Tools\FxCop\\Rules
+ false
+ false
+ true
+
+
+ bin\Release\
+ TRACE
+ true
+ pdbonly
+ AnyCPU
+ bin\Release\NBug.Examples.WinForms.exe.CodeAnalysisLog.xml
+ true
+ GlobalSuppressions.cs
+ prompt
+ MinimumRecommendedRules.ruleset
+ ;C:\Program Files\Microsoft Visual Studio 10.0\Team Tools\Static Analysis Tools\\Rule Sets
+ ;C:\Program Files\Microsoft Visual Studio 10.0\Team Tools\Static Analysis Tools\FxCop\\Rules
+ true
+ true
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Properties\GlobalAssemblyInfo.cs
+
+
+ Form
+
+
+ MainForm.cs
+
+
+
+
+ MainForm.cs
+
+
+ ResXFileCodeGenerator
+ Resources.Designer.cs
+ Designer
+
+
+ True
+ Resources.resx
+ True
+
+
+
+ SettingsSingleFileGenerator
+ Settings.Designer.cs
+
+
+ True
+ Settings.settings
+ True
+
+
+
+
+ {62CED1D5-F603-40DE-8BF5-3E49D3A392F4}
+ NBug
+
+
+
+
+ False
+ Microsoft .NET Framework 4 %28x86 and x64%29
+ true
+
+
+ False
+ .NET Framework 3.5 SP1 Client Profile
+ false
+
+
+ False
+ .NET Framework 3.5 SP1
+ false
+
+
+ False
+ Windows Installer 3.1
+ true
+
+
+
+
+ if $(ConfigurationName)==Release copy "$(TargetPath)" "$(SolutionDir)packages\NBug\tools" /Y
+if $(ConfigurationName)==Release copy "$(TargetDir)$(TargetName).pdb" "$(SolutionDir)packages\NBug\tools" /Y
+
+
+
\ No newline at end of file
diff --git a/Examples/NBug.Examples.WinForms/Program.cs b/Examples/NBug.Examples.WinForms/Program.cs
new file mode 100644
index 0000000..ff960d5
--- /dev/null
+++ b/Examples/NBug.Examples.WinForms/Program.cs
@@ -0,0 +1,42 @@
+// --------------------------------------------------------------------------------------------------------------------
+//
+// Copyright (c) 2010 - 2011 Teoman Soygul. Licensed under LGPLv3 (http://www.gnu.org/licenses/lgpl.html).
+//
+// --------------------------------------------------------------------------------------------------------------------
+
+namespace NBug.Examples.WinForms
+{
+ using System;
+ using System.IO;
+ using System.Linq;
+ using System.Windows.Forms;
+
+ public static class Program
+ {
+ ///
+ /// The main entry point for the application.
+ ///
+ [STAThread]
+ public static void Main()
+ {
+ // Check to see if test application is initialized by the configurator tool
+ if (Environment.GetCommandLineArgs().Count() > 1)
+ {
+ var stream = new FileStream(Environment.GetCommandLineArgs()[1], FileMode.Open, FileAccess.Read, FileShare.ReadWrite);
+ NBug.Properties.SettingsOverride.LoadCustomSettings(stream);
+ }
+
+ // For demonstrational purposes only, normally this should be left with it's default value as false!
+ NBug.Settings.HandleProcessCorruptedStateExceptions = true;
+
+ // Sample NBug configuration for WinForms applications
+ AppDomain.CurrentDomain.UnhandledException += NBug.Handler.UnhandledException;
+ Application.ThreadException += NBug.Handler.ThreadException;
+ System.Threading.Tasks.TaskScheduler.UnobservedTaskException += NBug.Handler.UnobservedTaskException;
+
+ Application.EnableVisualStyles();
+ Application.SetCompatibleTextRenderingDefault(false);
+ Application.Run(new MainForm());
+ }
+ }
+}
diff --git a/Examples/NBug.Examples.WinForms/Properties/AssemblyInfo.cs b/Examples/NBug.Examples.WinForms/Properties/AssemblyInfo.cs
new file mode 100644
index 0000000..c592c54
--- /dev/null
+++ b/Examples/NBug.Examples.WinForms/Properties/AssemblyInfo.cs
@@ -0,0 +1,29 @@
+using System.Reflection;
+using System.Runtime.CompilerServices;
+using System.Runtime.InteropServices;
+
+// General Information about an assembly is controlled through the following
+// set of attributes. Change these attribute values to modify the information
+// associated with an assembly.
+[assembly: AssemblyTitle("NBug.Examples.WinForms")]
+[assembly: AssemblyDescription("NBug Test Application created by Teoman Soygul.")]
+[assembly: AssemblyCulture("")]
+
+// Setting ComVisible to false makes the types in this assembly not visible
+// to COM components. If you need to access a type in this assembly from
+// COM, set the ComVisible attribute to true on that type.
+[assembly: ComVisible(false)]
+
+// The following GUID is for the ID of the typelib if this project is exposed to COM
+[assembly: Guid("a253ce3b-ee68-4aec-958d-c285a61c8fc3")]
+
+// Version information for an assembly consists of the following four values:
+//
+// Major Version
+// Minor Version
+// Build Number
+// Revision
+//
+// You can specify all the values or you can default the Build and Revision Numbers
+// by using the '*' as shown below:
+// [assembly: AssemblyVersion("1.0.*")]
\ No newline at end of file
diff --git a/Examples/NBug.Examples.WinForms/Properties/Resources.Designer.cs b/Examples/NBug.Examples.WinForms/Properties/Resources.Designer.cs
new file mode 100644
index 0000000..66c999b
--- /dev/null
+++ b/Examples/NBug.Examples.WinForms/Properties/Resources.Designer.cs
@@ -0,0 +1,63 @@
+//------------------------------------------------------------------------------
+//
+// This code was generated by a tool.
+// Runtime Version:4.0.30319.225
+//
+// Changes to this file may cause incorrect behavior and will be lost if
+// the code is regenerated.
+//
+//------------------------------------------------------------------------------
+
+namespace NBug.Examples.WinForms.Properties {
+ using System;
+
+
+ ///
+ /// A strongly-typed resource class, for looking up localized strings, etc.
+ ///
+ // This class was auto-generated by the StronglyTypedResourceBuilder
+ // class via a tool like ResGen or Visual Studio.
+ // To add or remove a member, edit your .ResX file then rerun ResGen
+ // with the /str option, or rebuild your VS project.
+ [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Resources.Tools.StronglyTypedResourceBuilder", "4.0.0.0")]
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
+ [global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()]
+ internal class Resources {
+
+ private static global::System.Resources.ResourceManager resourceMan;
+
+ private static global::System.Globalization.CultureInfo resourceCulture;
+
+ [global::System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Performance", "CA1811:AvoidUncalledPrivateCode")]
+ internal Resources() {
+ }
+
+ ///
+ /// Returns the cached ResourceManager instance used by this class.
+ ///
+ [global::System.ComponentModel.EditorBrowsableAttribute(global::System.ComponentModel.EditorBrowsableState.Advanced)]
+ internal static global::System.Resources.ResourceManager ResourceManager {
+ get {
+ if (object.ReferenceEquals(resourceMan, null)) {
+ global::System.Resources.ResourceManager temp = new global::System.Resources.ResourceManager("NBug.Examples.WinForms.Properties.Resources", typeof(Resources).Assembly);
+ resourceMan = temp;
+ }
+ return resourceMan;
+ }
+ }
+
+ ///
+ /// Overrides the current thread's CurrentUICulture property for all
+ /// resource lookups using this strongly typed resource class.
+ ///
+ [global::System.ComponentModel.EditorBrowsableAttribute(global::System.ComponentModel.EditorBrowsableState.Advanced)]
+ internal static global::System.Globalization.CultureInfo Culture {
+ get {
+ return resourceCulture;
+ }
+ set {
+ resourceCulture = value;
+ }
+ }
+ }
+}
diff --git a/Examples/NBug.Examples.WinForms/Properties/Resources.resx b/Examples/NBug.Examples.WinForms/Properties/Resources.resx
new file mode 100644
index 0000000..ffecec8
--- /dev/null
+++ b/Examples/NBug.Examples.WinForms/Properties/Resources.resx
@@ -0,0 +1,117 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ text/microsoft-resx
+
+
+ 2.0
+
+
+ System.Resources.ResXResourceReader, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089
+
+
+ System.Resources.ResXResourceWriter, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089
+
+
\ No newline at end of file
diff --git a/Examples/NBug.Examples.WinForms/Properties/Settings.Designer.cs b/Examples/NBug.Examples.WinForms/Properties/Settings.Designer.cs
new file mode 100644
index 0000000..39b708d
--- /dev/null
+++ b/Examples/NBug.Examples.WinForms/Properties/Settings.Designer.cs
@@ -0,0 +1,26 @@
+//------------------------------------------------------------------------------
+//
+// This code was generated by a tool.
+// Runtime Version:4.0.30319.225
+//
+// Changes to this file may cause incorrect behavior and will be lost if
+// the code is regenerated.
+//
+//------------------------------------------------------------------------------
+
+namespace NBug.Examples.WinForms.Properties {
+
+
+ [global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()]
+ [global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.VisualStudio.Editors.SettingsDesigner.SettingsSingleFileGenerator", "10.0.0.0")]
+ internal sealed partial class Settings : global::System.Configuration.ApplicationSettingsBase {
+
+ private static Settings defaultInstance = ((Settings)(global::System.Configuration.ApplicationSettingsBase.Synchronized(new Settings())));
+
+ public static Settings Default {
+ get {
+ return defaultInstance;
+ }
+ }
+ }
+}
diff --git a/Examples/NBug.Examples.WinForms/Properties/Settings.settings b/Examples/NBug.Examples.WinForms/Properties/Settings.settings
new file mode 100644
index 0000000..2bd17f0
--- /dev/null
+++ b/Examples/NBug.Examples.WinForms/Properties/Settings.settings
@@ -0,0 +1,5 @@
+
+
+
+
+
\ No newline at end of file
diff --git a/Examples/NBug.Examples.WinForms/app.config b/Examples/NBug.Examples.WinForms/app.config
new file mode 100644
index 0000000..97f932f
--- /dev/null
+++ b/Examples/NBug.Examples.WinForms/app.config
@@ -0,0 +1,6 @@
+
+
+
+
+
+
diff --git a/GlobalAssemblyInfo.cs b/GlobalAssemblyInfo.cs
new file mode 100644
index 0000000..ff4bffc
--- /dev/null
+++ b/GlobalAssemblyInfo.cs
@@ -0,0 +1,61 @@
+// --------------------------------------------------------------------------------------------------------------------
+//
+// Copyright (c) 2010 - 2011 Teoman Soygul. Licensed under LGPLv3 (http://www.gnu.org/licenses/lgpl.html).
+//
+// --------------------------------------------------------------------------------------------------------------------
+
+
+using System;
+using System.Reflection;
+
+// General Information about an assembly is controlled through the following
+// set of attributes. Change these attribute values to modify the information
+// associated with an assembly.
+[assembly: AssemblyCompany("")]
+[assembly: AssemblyProduct("NBug")]
+[assembly: AssemblyCopyright("Copyright © 2011 Teoman Soygul")]
+[assembly: AssemblyTrademark("")]
+#if DEBUG
+[assembly: AssemblyConfiguration("Debug")]
+#else
+[assembly: AssemblyConfiguration("Release")]
+#endif
+
+/*
+ * Basic rules to become CLS compilant is below:
+ * 1. Unsigned types should not be part of the public interface of the class. What this means is public fields should not
+ * have unsigned types like uint or ulong, public methods should not return unsigned types, parameters passed to public
+ * function should not have unsigned types. However unsigned types can be part of private members.
+ * 2. Unsafe types like pointers should not be used with public members. However they can be used with private members.
+ * 3. Class names and member names should not differ only based on their case. For example we cannot have two methods
+ * named MyMethod and MYMETHOD.
+ * 4. Only properties and methods may be overloaded, Operators should not be overloaded.
+*/
+[assembly: CLSCompliant(true)]
+
+// Version information for an assembly consists of the following four values:
+// Major Version
+// Minor Version
+// Build Number
+// Revision
+// You can specify all the values or you can default the Build and Revision Numbers
+// by using the '*' as shown below:
+// [assembly: AssemblyVersion("1.0.*")]
+[assembly: AssemblyVersion("1.1")]
+
+// This is also assigned to 'AssemblyInformationalVersion' which is the product version
+// Standard Way: [major].[minor].[bugfix].[build]
+// .NET Convention: Third digit is the auto-incremented build version. Fourth digit is revision, which is service pack no
+[assembly: AssemblyFileVersion("1.1.2.0")]
+
+/*
+ * AssemblyVersion should only be changed for major changes or breaking changes since any change to the
+ * AssemblyVersion would force every .NET application referencing the assembly to re-compile against the
+ * new version!
+ *
+ * Do not change the AssemblyVersion for a servicing release which is intended to be backwards compatible.
+ * Do change the AssemblyVersion for a release that you know has breaking changes.
+ *
+ * Remember that it’s the AssemblyFileVersion that contains all the interesting servicing information
+ * (it’s the Revision part of this version that tells you what Service Pack you’re on)
+*/
\ No newline at end of file
diff --git a/NBug.1.2.dotCover b/NBug.1.2.dotCover
new file mode 100644
index 0000000..86db32f
--- /dev/null
+++ b/NBug.1.2.dotCover
@@ -0,0 +1,11 @@
+
+
+ C:\Users\teoman.soygul\Desktop\Work\NBug
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/NBug.Configurator/AboutBox.Designer.cs b/NBug.Configurator/AboutBox.Designer.cs
new file mode 100644
index 0000000..f617182
--- /dev/null
+++ b/NBug.Configurator/AboutBox.Designer.cs
@@ -0,0 +1,267 @@
+namespace NBug.Configurator
+{
+ partial class AboutBox
+ {
+ ///
+ /// Required designer variable.
+ ///
+ private System.ComponentModel.IContainer components = null;
+
+ ///
+ /// Clean up any resources being used.
+ ///
+ /// true if managed resources should be disposed; otherwise, false.
+ protected override void Dispose(bool disposing)
+ {
+ if (disposing && (components != null))
+ {
+ components.Dispose();
+ }
+ base.Dispose(disposing);
+ }
+
+ #region Windows Form Designer generated code
+
+ ///
+ /// Required method for Designer support - do not modify
+ /// the contents of this method with the code editor.
+ ///
+ private void InitializeComponent()
+ {
+ this.components = new System.ComponentModel.Container();
+ System.ComponentModel.ComponentResourceManager resources = new System.ComponentModel.ComponentResourceManager(typeof(AboutBox));
+ this.okButton = new System.Windows.Forms.Button();
+ this.copyrightLabel = new System.Windows.Forms.Label();
+ this.productNameLabel = new System.Windows.Forms.Label();
+ this.versionLabel = new System.Windows.Forms.Label();
+ this.panelDevelopers = new System.Windows.Forms.Panel();
+ this.productHomePageLinkLabel = new System.Windows.Forms.LinkLabel();
+ this.projectHomeLabel = new System.Windows.Forms.Label();
+ this.leadDeveloperLinkLabel = new System.Windows.Forms.LinkLabel();
+ this.developmentTeamLabel = new System.Windows.Forms.Label();
+ this.panelDescription = new System.Windows.Forms.Panel();
+ this.descriptionLabel = new System.Windows.Forms.Label();
+ this.descriptionTitleLabel = new System.Windows.Forms.Label();
+ this.copyrightRichTextBox = new System.Windows.Forms.RichTextBox();
+ this.pictureBoxIcon = new System.Windows.Forms.PictureBox();
+ this.imageListMain = new System.Windows.Forms.ImageList(this.components);
+ this.panelDevelopers.SuspendLayout();
+ this.panelDescription.SuspendLayout();
+ ((System.ComponentModel.ISupportInitialize)(this.pictureBoxIcon)).BeginInit();
+ this.SuspendLayout();
+ //
+ // okButton
+ //
+ this.okButton.DialogResult = System.Windows.Forms.DialogResult.Cancel;
+ this.okButton.Font = new System.Drawing.Font("Microsoft Sans Serif", 8.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(162)));
+ this.okButton.ForeColor = System.Drawing.SystemColors.ControlText;
+ this.okButton.Location = new System.Drawing.Point(363, 255);
+ this.okButton.Name = "okButton";
+ this.okButton.Size = new System.Drawing.Size(75, 23);
+ this.okButton.TabIndex = 0;
+ this.okButton.Text = "&OK";
+ this.okButton.UseVisualStyleBackColor = true;
+ this.okButton.Click += new System.EventHandler(this.OkButton_Click);
+ //
+ // copyrightLabel
+ //
+ this.copyrightLabel.AutoSize = true;
+ this.copyrightLabel.BackColor = System.Drawing.Color.Transparent;
+ this.copyrightLabel.Font = new System.Drawing.Font("Microsoft Sans Serif", 8.25F);
+ this.copyrightLabel.ForeColor = System.Drawing.Color.FromArgb(((int)(((byte)(249)))), ((int)(((byte)(249)))), ((int)(((byte)(249)))));
+ this.copyrightLabel.Location = new System.Drawing.Point(144, 111);
+ this.copyrightLabel.Name = "copyrightLabel";
+ this.copyrightLabel.Size = new System.Drawing.Size(167, 13);
+ this.copyrightLabel.TabIndex = 2;
+ this.copyrightLabel.Text = "Copyright © 2011 Teoman Soygul";
+ //
+ // productNameLabel
+ //
+ this.productNameLabel.AutoSize = true;
+ this.productNameLabel.BackColor = System.Drawing.Color.Transparent;
+ this.productNameLabel.Font = new System.Drawing.Font("Microsoft Sans Serif", 8.25F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(162)));
+ this.productNameLabel.ForeColor = System.Drawing.Color.FromArgb(((int)(((byte)(249)))), ((int)(((byte)(249)))), ((int)(((byte)(249)))));
+ this.productNameLabel.Location = new System.Drawing.Point(145, 93);
+ this.productNameLabel.Name = "productNameLabel";
+ this.productNameLabel.Size = new System.Drawing.Size(38, 13);
+ this.productNameLabel.TabIndex = 5;
+ this.productNameLabel.Text = "NBug";
+ //
+ // versionLabel
+ //
+ this.versionLabel.AutoSize = true;
+ this.versionLabel.BackColor = System.Drawing.Color.Transparent;
+ this.versionLabel.Font = new System.Drawing.Font("Microsoft Sans Serif", 8.25F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(162)));
+ this.versionLabel.ForeColor = System.Drawing.Color.White;
+ this.versionLabel.Location = new System.Drawing.Point(189, 93);
+ this.versionLabel.Name = "versionLabel";
+ this.versionLabel.Size = new System.Drawing.Size(109, 13);
+ this.versionLabel.TabIndex = 6;
+ this.versionLabel.Text = "- Version 1.0.0.0";
+ //
+ // panelDevelopers
+ //
+ this.panelDevelopers.BackColor = System.Drawing.Color.Transparent;
+ this.panelDevelopers.Controls.Add(this.productHomePageLinkLabel);
+ this.panelDevelopers.Controls.Add(this.projectHomeLabel);
+ this.panelDevelopers.Controls.Add(this.leadDeveloperLinkLabel);
+ this.panelDevelopers.Controls.Add(this.developmentTeamLabel);
+ this.panelDevelopers.Location = new System.Drawing.Point(12, 146);
+ this.panelDevelopers.Name = "panelDevelopers";
+ this.panelDevelopers.Size = new System.Drawing.Size(196, 73);
+ this.panelDevelopers.TabIndex = 10;
+ //
+ // productHomePageLinkLabel
+ //
+ this.productHomePageLinkLabel.AutoSize = true;
+ this.productHomePageLinkLabel.BackColor = System.Drawing.Color.Transparent;
+ this.productHomePageLinkLabel.Location = new System.Drawing.Point(5, 52);
+ this.productHomePageLinkLabel.Name = "productHomePageLinkLabel";
+ this.productHomePageLinkLabel.Size = new System.Drawing.Size(187, 13);
+ this.productHomePageLinkLabel.TabIndex = 5;
+ this.productHomePageLinkLabel.TabStop = true;
+ this.productHomePageLinkLabel.Text = "http://www.nbusy.com/projects/nbug";
+ //
+ // projectHomeLabel
+ //
+ this.projectHomeLabel.AutoSize = true;
+ this.projectHomeLabel.Font = new System.Drawing.Font("Microsoft Sans Serif", 8.25F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(162)));
+ this.projectHomeLabel.Location = new System.Drawing.Point(4, 37);
+ this.projectHomeLabel.Name = "projectHomeLabel";
+ this.projectHomeLabel.Size = new System.Drawing.Size(83, 13);
+ this.projectHomeLabel.TabIndex = 5;
+ this.projectHomeLabel.Text = "Project Home";
+ //
+ // leadDeveloperLinkLabel
+ //
+ this.leadDeveloperLinkLabel.AutoSize = true;
+ this.leadDeveloperLinkLabel.Location = new System.Drawing.Point(5, 19);
+ this.leadDeveloperLinkLabel.Name = "leadDeveloperLinkLabel";
+ this.leadDeveloperLinkLabel.Size = new System.Drawing.Size(81, 13);
+ this.leadDeveloperLinkLabel.TabIndex = 4;
+ this.leadDeveloperLinkLabel.TabStop = true;
+ this.leadDeveloperLinkLabel.Text = "Teoman Soygul";
+ this.leadDeveloperLinkLabel.LinkClicked += new System.Windows.Forms.LinkLabelLinkClickedEventHandler(this.LeadDeveloperLinkLabel_LinkClicked);
+ //
+ // developmentTeamLabel
+ //
+ this.developmentTeamLabel.AutoSize = true;
+ this.developmentTeamLabel.Font = new System.Drawing.Font("Microsoft Sans Serif", 8.25F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(162)));
+ this.developmentTeamLabel.Location = new System.Drawing.Point(4, 4);
+ this.developmentTeamLabel.Name = "developmentTeamLabel";
+ this.developmentTeamLabel.Size = new System.Drawing.Size(65, 13);
+ this.developmentTeamLabel.TabIndex = 0;
+ this.developmentTeamLabel.Text = "Developer";
+ //
+ // panelDescription
+ //
+ this.panelDescription.BackColor = System.Drawing.Color.Transparent;
+ this.panelDescription.Controls.Add(this.descriptionLabel);
+ this.panelDescription.Controls.Add(this.descriptionTitleLabel);
+ this.panelDescription.Location = new System.Drawing.Point(214, 146);
+ this.panelDescription.Name = "panelDescription";
+ this.panelDescription.Size = new System.Drawing.Size(224, 73);
+ this.panelDescription.TabIndex = 11;
+ //
+ // descriptionLabel
+ //
+ this.descriptionLabel.AutoEllipsis = true;
+ this.descriptionLabel.AutoSize = true;
+ this.descriptionLabel.Location = new System.Drawing.Point(4, 19);
+ this.descriptionLabel.MaximumSize = new System.Drawing.Size(215, 0);
+ this.descriptionLabel.Name = "descriptionLabel";
+ this.descriptionLabel.Size = new System.Drawing.Size(188, 39);
+ this.descriptionLabel.TabIndex = 1;
+ this.descriptionLabel.Text = "NBug is an open-source .NET library created to automate the bug reporting process" +
+ ".";
+ //
+ // descriptionTitleLabel
+ //
+ this.descriptionTitleLabel.AutoSize = true;
+ this.descriptionTitleLabel.Font = new System.Drawing.Font("Microsoft Sans Serif", 8.25F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(162)));
+ this.descriptionTitleLabel.Location = new System.Drawing.Point(4, 4);
+ this.descriptionTitleLabel.Name = "descriptionTitleLabel";
+ this.descriptionTitleLabel.Size = new System.Drawing.Size(71, 13);
+ this.descriptionTitleLabel.TabIndex = 0;
+ this.descriptionTitleLabel.Text = "Description";
+ //
+ // copyrightRichTextBox
+ //
+ this.copyrightRichTextBox.Font = new System.Drawing.Font("Microsoft Sans Serif", 8.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(162)));
+ this.copyrightRichTextBox.Location = new System.Drawing.Point(19, 233);
+ this.copyrightRichTextBox.Name = "copyrightRichTextBox";
+ this.copyrightRichTextBox.Size = new System.Drawing.Size(315, 45);
+ this.copyrightRichTextBox.TabIndex = 9;
+ this.copyrightRichTextBox.Text = resources.GetString("copyrightRichTextBox.Text");
+ //
+ // pictureBoxIcon
+ //
+ this.pictureBoxIcon.BackColor = System.Drawing.Color.Transparent;
+ this.pictureBoxIcon.Image = ((System.Drawing.Image)(resources.GetObject("pictureBoxIcon.Image")));
+ this.pictureBoxIcon.Location = new System.Drawing.Point(102, 91);
+ this.pictureBoxIcon.Name = "pictureBoxIcon";
+ this.pictureBoxIcon.Size = new System.Drawing.Size(38, 38);
+ this.pictureBoxIcon.TabIndex = 7;
+ this.pictureBoxIcon.TabStop = false;
+ //
+ // imageListMain
+ //
+ this.imageListMain.ImageStream = ((System.Windows.Forms.ImageListStreamer)(resources.GetObject("imageListMain.ImageStream")));
+ this.imageListMain.TransparentColor = System.Drawing.Color.Transparent;
+ this.imageListMain.Images.SetKeyName(0, "Connected.png");
+ //
+ // AboutBox
+ //
+ this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F);
+ this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
+ this.BackgroundImage = ((System.Drawing.Image)(resources.GetObject("$this.BackgroundImage")));
+ this.BackgroundImageLayout = System.Windows.Forms.ImageLayout.None;
+ this.ClientSize = new System.Drawing.Size(450, 290);
+ this.Controls.Add(this.panelDescription);
+ this.Controls.Add(this.panelDevelopers);
+ this.Controls.Add(this.copyrightRichTextBox);
+ this.Controls.Add(this.pictureBoxIcon);
+ this.Controls.Add(this.versionLabel);
+ this.Controls.Add(this.productNameLabel);
+ this.Controls.Add(this.copyrightLabel);
+ this.Controls.Add(this.okButton);
+ this.FormBorderStyle = System.Windows.Forms.FormBorderStyle.FixedDialog;
+ this.MaximizeBox = false;
+ this.MinimizeBox = false;
+ this.Name = "AboutBox";
+ this.Padding = new System.Windows.Forms.Padding(9);
+ this.ShowIcon = false;
+ this.ShowInTaskbar = false;
+ this.StartPosition = System.Windows.Forms.FormStartPosition.CenterParent;
+ this.Text = "About NBug";
+ this.TopMost = true;
+ this.panelDevelopers.ResumeLayout(false);
+ this.panelDevelopers.PerformLayout();
+ this.panelDescription.ResumeLayout(false);
+ this.panelDescription.PerformLayout();
+ ((System.ComponentModel.ISupportInitialize)(this.pictureBoxIcon)).EndInit();
+ this.ResumeLayout(false);
+ this.PerformLayout();
+
+ }
+
+ #endregion
+
+ private System.Windows.Forms.Button okButton;
+ private System.Windows.Forms.Label copyrightLabel;
+ private System.Windows.Forms.Label productNameLabel;
+ private System.Windows.Forms.Label versionLabel;
+ private System.Windows.Forms.Panel panelDevelopers;
+ private System.Windows.Forms.Label developmentTeamLabel;
+ private System.Windows.Forms.LinkLabel leadDeveloperLinkLabel;
+ private System.Windows.Forms.Panel panelDescription;
+ private System.Windows.Forms.Label descriptionTitleLabel;
+ private System.Windows.Forms.Label descriptionLabel;
+ private System.Windows.Forms.RichTextBox copyrightRichTextBox;
+ private System.Windows.Forms.PictureBox pictureBoxIcon;
+ private System.Windows.Forms.ImageList imageListMain;
+ private System.Windows.Forms.LinkLabel productHomePageLinkLabel;
+ private System.Windows.Forms.Label projectHomeLabel;
+
+ }
+}
diff --git a/NBug.Configurator/AboutBox.cs b/NBug.Configurator/AboutBox.cs
new file mode 100644
index 0000000..62b99de
--- /dev/null
+++ b/NBug.Configurator/AboutBox.cs
@@ -0,0 +1,148 @@
+namespace NBug.Configurator
+{
+ using System;
+ using System.Diagnostics;
+ using System.IO;
+ using System.Reflection;
+ using System.Windows.Forms;
+
+ ///
+ /// The about box.
+ ///
+ internal partial class AboutBox : Form
+ {
+ ///
+ /// Initializes a new instance of the class.
+ ///
+ internal AboutBox()
+ {
+ this.InitializeComponent();
+
+ // Initialize the AboutBox to display the product information from the assembly information.
+ // Change assembly information settings for your application through either:
+ // - Project->Properties->Application->Assembly Information
+ // - AssemblyInfo.cs
+ // this.Text = string.Format("About {0}", this.AssemblyTitle);
+ this.Text = string.Format("About {0}", this.AssemblyProduct);
+ this.productNameLabel.Text = this.AssemblyProduct;
+ this.versionLabel.Text = string.Format("Version {0}", this.AssemblyFileVersion);
+ this.copyrightLabel.Text = this.AssemblyCopyright;
+ }
+
+ internal string AssemblyCompany
+ {
+ get
+ {
+ // Get all Company attributes on this assembly
+ object[] attributes = Assembly.GetExecutingAssembly().GetCustomAttributes(typeof(AssemblyCompanyAttribute), false);
+
+ // If there aren't any Company attributes, return an empty string
+ if (attributes.Length == 0)
+ {
+ return string.Empty;
+ }
+
+ // If there is a Company attribute, return its value
+ return ((AssemblyCompanyAttribute)attributes[0]).Company;
+ }
+ }
+
+ internal string AssemblyCopyright
+ {
+ get
+ {
+ // Get all Copyright attributes on this assembly
+ object[] attributes = Assembly.GetExecutingAssembly().GetCustomAttributes(typeof(AssemblyCopyrightAttribute), false);
+
+ // If there aren't any Copyright attributes, return an empty string
+ if (attributes.Length == 0)
+ {
+ return string.Empty;
+ }
+
+ // If there is a Copyright attribute, return its value
+ return ((AssemblyCopyrightAttribute)attributes[0]).Copyright;
+ }
+ }
+
+ internal string AssemblyDescription
+ {
+ get
+ {
+ // Get all Description attributes on this assembly
+ object[] attributes = Assembly.GetExecutingAssembly().GetCustomAttributes(
+ typeof(AssemblyDescriptionAttribute), false);
+
+ // If there aren't any Description attributes, return an empty string
+ if (attributes.Length == 0)
+ {
+ return string.Empty;
+ }
+
+ // If there is a Description attribute, return its value
+ return ((AssemblyDescriptionAttribute)attributes[0]).Description;
+ }
+ }
+
+ internal string AssemblyProduct
+ {
+ get
+ {
+ // Get all Product attributes on this assembly
+ object[] attributes = Assembly.GetExecutingAssembly().GetCustomAttributes(typeof(AssemblyProductAttribute), false);
+
+ // If there aren't any Product attributes, return an empty string
+ if (attributes.Length == 0)
+ {
+ return string.Empty;
+ }
+
+ // If there is a Product attribute, return its value
+ return ((AssemblyProductAttribute)attributes[0]).Product;
+ }
+ }
+
+ internal string AssemblyTitle
+ {
+ get
+ {
+ // Get all Title attributes on this assembly
+ object[] attributes = Assembly.GetExecutingAssembly().GetCustomAttributes(typeof(AssemblyTitleAttribute), false);
+
+ // If there is at least one Title attribute
+ if (attributes.Length > 0)
+ {
+ // Select the first one
+ var titleAttribute = (AssemblyTitleAttribute)attributes[0];
+
+ // If it is not an empty string, return it
+ if (titleAttribute.Title != string.Empty)
+ {
+ return titleAttribute.Title;
+ }
+ }
+
+ // If there was no Title attribute, or if the Title attribute was the empty string, return the .exe name
+ return Path.GetFileNameWithoutExtension(Assembly.GetExecutingAssembly().CodeBase);
+ }
+ }
+
+ internal string AssemblyFileVersion
+ {
+ get
+ {
+ return FileVersionInfo.GetVersionInfo(Assembly.GetExecutingAssembly().Location).ProductVersion;
+ }
+ }
+
+ private void OkButton_Click(object sender, EventArgs e)
+ {
+ this.Close();
+ }
+
+ private void LeadDeveloperLinkLabel_LinkClicked(object sender, LinkLabelLinkClickedEventArgs e)
+ {
+ Process.Start("http://www.soygul.com/");
+ }
+ }
+}
\ No newline at end of file
diff --git a/NBug.Configurator/AboutBox.resx b/NBug.Configurator/AboutBox.resx
new file mode 100644
index 0000000..dae0ef8
--- /dev/null
+++ b/NBug.Configurator/AboutBox.resx
@@ -0,0 +1,567 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ text/microsoft-resx
+
+
+ 2.0
+
+
+ System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089
+
+
+ System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089
+
+
+ NBug is a freeware application. You are allowed to use and distribute it freely under GNU Lesser General Public License given the full copyright notice.
+
+Copyright © 2011 Teoman Soygul - Istanbul, Turkey.
+
+Microsoft®, Windows®, .NET™ are registered trademarks of Microsoft Corporation. Other product names mentioned in this 'software' may be trademarks or registered trademarks of their respective companies.
+
+
+
+
+ iVBORw0KGgoAAAANSUhEUgAAACQAAAAkCAYAAADhAJiYAAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8
+ YQUAAAAgY0hSTQAAeiYAAICEAAD6AAAAgOgAAHUwAADqYAAAOpgAABdwnLpRPAAAB2pJREFUWEfFWAtU
+ VFUU3TODCIKgwkLzQ2aIJibLvpp9XWkaqAlEWPYRaxkK8hv+iQgKfrECFcFCmAFhUhCDEiYVJEsgELJc
+ pCkqwiCIfBRmpqzp3MeMCgwDEQZrnQW8d9+5++5z7j7nXl7bbSX4Aj5UKhV0/ejrCyCraR0W6JsV8HN5
+ rcvtW0rzO3f+Bo/HAzSfsj/Jj4DPh7HJ0JZxE0yyomMcI6dOG92gVN7R6R/0rVL+J9Dc1I7fLzTgZmMb
+ mpvlaNFirS1ytLf9IfD3PpzMg4fKED4qY54vmVD9m/2tsY5nbAwb6/pOyre3bikMW1sVWn2z+RgGWW0L
+ GupvMUByiPcXISY6HwfTziBdXNrNDqWfQVxM4dSR+v5/MxCmen59MhOBkAO2daP0lUxJeWe/KaVIE/2E
+ L+J+gDixGPnHLuB6XSs41GniEni5HcRT07ZipIE/LIyCupm5YeAcE0HfgNwPmIEyMwhw7urTzDAQowwC
+ sOJdMS32FE6fqkKdrOUeIKFHBp58bAuGwhvDecJORqxgOF84u6/MdB1H3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AAhAYmAAa5SoCAQhAoBWB4tHjJ2m+e/yEQAACEIBAHwIVbRbAggAEIACB
+ NgSK7x8/IRCAAAQgMDAB0egvBAIQgAAEBiZQPP7xFwIBCEAAAgMTKB7/9AuBAAQgAIGBCYhGfyUQgAAE
+ IDAwgeLxz78SCEAAAhAYmEDx48+/EghAAAIQGJhA8dOTXwkEIAABCAxMQDT6G4EABCAAgYEJFD8/+Y1A
+ AAIQgMDABNAoVxEIQAACrQgUT375jUAAAhCAwMAE0ChXEQhAAAKtCIhGnxIIQAACEBiYQPHk16cEAhCA
+ AAQGJlD88utTAgEIQAACAxMofvntKYEABCAAgYEJFL/+9pRAAAIQgMDABIrfnj4lEIAABCAwMAE0ylUE
+ AhCAQCsCaLQVvoEvXzwRAhBYMASKp09/JxCAAAQgMDABNMpVBAIQgEArAsXT338nEIAABCAwMAE0ylUE
+ AhCAQCsCxe/8BwEIQAACLQgUv//xB4EABCAAgYEJoFGuIhCAAARaESj+4D8IQAACEGhBAI22gMdTIQAB
+ CPzxBxrluwACEIBAKwJotBU+ngwBCEAAjfI9AAEIQKAVATTaCh9PhgAEIIBG+R6AAAQg0IoAGm2FjydD
+ AAIQQKN8D0AAAhBoRQCNtsLHkyEAAQj8f70D8eRseB1vAAAAAElFTkSuQmCC
+
+
+
\ No newline at end of file
diff --git a/NBug.Configurator/MainForm.Designer.cs b/NBug.Configurator/MainForm.Designer.cs
new file mode 100644
index 0000000..33f9ce9
--- /dev/null
+++ b/NBug.Configurator/MainForm.Designer.cs
@@ -0,0 +1,1132 @@
+namespace NBug.Configurator
+{
+ partial class MainForm
+ {
+ ///
+ /// Required designer variable.
+ ///
+ private System.ComponentModel.IContainer components = null;
+
+ ///
+ /// Clean up any resources being used.
+ ///
+ /// true if managed resources should be disposed; otherwise, false.
+ protected override void Dispose(bool disposing)
+ {
+ if (disposing && (components != null))
+ {
+ components.Dispose();
+ }
+ base.Dispose(disposing);
+ }
+
+ #region Windows Form Designer generated code
+
+ ///
+ /// Required method for Designer support - do not modify
+ /// the contents of this method with the code editor.
+ ///
+ private void InitializeComponent()
+ {
+ this.components = new System.ComponentModel.Container();
+ System.ComponentModel.ComponentResourceManager resources = new System.ComponentModel.ComponentResourceManager(typeof(MainForm));
+ this.mainStatusStrip = new System.Windows.Forms.StatusStrip();
+ this.status = new System.Windows.Forms.ToolStripStatusLabel();
+ this.mainTabs = new System.Windows.Forms.TabControl();
+ this.generalTabPage = new System.Windows.Forms.TabPage();
+ this.nbugConfigurationGroupBox = new System.Windows.Forms.GroupBox();
+ this.releaseModeCheckBox = new System.Windows.Forms.CheckBox();
+ this.internalLoggerGroupBox = new System.Windows.Forms.GroupBox();
+ this.networkTraceWarningLabel = new System.Windows.Forms.Label();
+ this.writeNetworkTraceToFileCheckBox = new System.Windows.Forms.CheckBox();
+ this.writeLogToDiskCheckBox = new System.Windows.Forms.CheckBox();
+ this.reportSubmitterGroupBox = new System.Windows.Forms.GroupBox();
+ this.encryptConnectionStringsCheckBox = new System.Windows.Forms.CheckBox();
+ this.reportQueueGroupBox = new System.Windows.Forms.GroupBox();
+ this.storagePathLabel = new System.Windows.Forms.Label();
+ this.storagePathComboBox = new System.Windows.Forms.ComboBox();
+ this.customPathLabel = new System.Windows.Forms.Label();
+ this.customStoragePathTextBox = new System.Windows.Forms.TextBox();
+ this.customPathTipLabel = new System.Windows.Forms.Label();
+ this.reportingGroupBox = new System.Windows.Forms.GroupBox();
+ this.miniDumpTypeLabel = new System.Windows.Forms.Label();
+ this.miniDumpTypeComboBox = new System.Windows.Forms.ComboBox();
+ this.sleepBeforeSendLabel = new System.Windows.Forms.Label();
+ this.sleepBeforeSendNumericUpDown = new System.Windows.Forms.NumericUpDown();
+ this.maxQueuedReportsLabel = new System.Windows.Forms.Label();
+ this.maxQueuedReportsNumericUpDown = new System.Windows.Forms.NumericUpDown();
+ this.sleepBeforeSendUnitLabel = new System.Windows.Forms.Label();
+ this.stopReportingAfterLabel = new System.Windows.Forms.Label();
+ this.stopReportingAfterUnitLabel = new System.Windows.Forms.Label();
+ this.stopReportingAfterNumericUpDown = new System.Windows.Forms.NumericUpDown();
+ this.userInterfaceGroupBox = new System.Windows.Forms.GroupBox();
+ this.previewButton = new System.Windows.Forms.Button();
+ this.uiModeLabel = new System.Windows.Forms.Label();
+ this.uiModeComboBox = new System.Windows.Forms.ComboBox();
+ this.uiProviderLabel = new System.Windows.Forms.Label();
+ this.uiProviderComboBox = new System.Windows.Forms.ComboBox();
+ this.advancedTabPage = new System.Windows.Forms.TabPage();
+ this.exceptionHandlingGroupBox = new System.Windows.Forms.GroupBox();
+ this.exitApplicationImmediatelyWarningLabel = new System.Windows.Forms.Label();
+ this.handleProcessCorruptedStateExceptionsCheckBox = new System.Windows.Forms.CheckBox();
+ this.exitApplicationImmediatelyCheckBox = new System.Windows.Forms.CheckBox();
+ this.warningLabel = new System.Windows.Forms.Label();
+ this.submit1TabPage = new System.Windows.Forms.TabPage();
+ this.panelLoader1 = new NBug.Configurator.SubmitPanels.PanelLoader();
+ this.submit2TabPage = new System.Windows.Forms.TabPage();
+ this.panelLoader2 = new NBug.Configurator.SubmitPanels.PanelLoader();
+ this.submit3TabPage = new System.Windows.Forms.TabPage();
+ this.panelLoader3 = new NBug.Configurator.SubmitPanels.PanelLoader();
+ this.submit4TabPage = new System.Windows.Forms.TabPage();
+ this.panelLoader4 = new NBug.Configurator.SubmitPanels.PanelLoader();
+ this.submit5TabPage = new System.Windows.Forms.TabPage();
+ this.panelLoader5 = new NBug.Configurator.SubmitPanels.PanelLoader();
+ this.fileToolStripMenuItem1 = new System.Windows.Forms.ToolStripMenuItem();
+ this.newToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
+ this.externalToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
+ this.embeddedToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
+ this.openToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
+ this.toolStripSeparator = new System.Windows.Forms.ToolStripSeparator();
+ this.saveToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
+ this.saveAsToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
+ this.toolStripSeparator1 = new System.Windows.Forms.ToolStripSeparator();
+ this.importToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
+ this.toolStripSeparator2 = new System.Windows.Forms.ToolStripSeparator();
+ this.exitToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
+ this.toolsToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
+ this.testAppToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
+ this.helpToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
+ this.projectHomeToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
+ this.onlineDocumentationToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
+ this.discussionForumToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
+ this.bugTrackerToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
+ this.toolStripSeparator5 = new System.Windows.Forms.ToolStripSeparator();
+ this.aboutToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
+ this.mainMenuStrip = new System.Windows.Forms.MenuStrip();
+ this.saveButton = new System.Windows.Forms.Button();
+ this.closeButton = new System.Windows.Forms.Button();
+ this.mainToolTips = new System.Windows.Forms.ToolTip(this.components);
+ this.mainHelpProvider = new System.Windows.Forms.HelpProvider();
+ this.runTestAppButton = new System.Windows.Forms.Button();
+ this.settingsFileGroupBox = new System.Windows.Forms.GroupBox();
+ this.fileTextBox = new System.Windows.Forms.TextBox();
+ this.pathLabel = new System.Windows.Forms.Label();
+ this.createButton = new System.Windows.Forms.Button();
+ this.openButton = new System.Windows.Forms.Button();
+ this.createFileDialog = new System.Windows.Forms.SaveFileDialog();
+ this.openFileDialog = new System.Windows.Forms.OpenFileDialog();
+ this.mainStatusStrip.SuspendLayout();
+ this.mainTabs.SuspendLayout();
+ this.generalTabPage.SuspendLayout();
+ this.nbugConfigurationGroupBox.SuspendLayout();
+ this.internalLoggerGroupBox.SuspendLayout();
+ this.reportSubmitterGroupBox.SuspendLayout();
+ this.reportQueueGroupBox.SuspendLayout();
+ this.reportingGroupBox.SuspendLayout();
+ ((System.ComponentModel.ISupportInitialize)(this.sleepBeforeSendNumericUpDown)).BeginInit();
+ ((System.ComponentModel.ISupportInitialize)(this.maxQueuedReportsNumericUpDown)).BeginInit();
+ ((System.ComponentModel.ISupportInitialize)(this.stopReportingAfterNumericUpDown)).BeginInit();
+ this.userInterfaceGroupBox.SuspendLayout();
+ this.advancedTabPage.SuspendLayout();
+ this.exceptionHandlingGroupBox.SuspendLayout();
+ this.submit1TabPage.SuspendLayout();
+ this.submit2TabPage.SuspendLayout();
+ this.submit3TabPage.SuspendLayout();
+ this.submit4TabPage.SuspendLayout();
+ this.submit5TabPage.SuspendLayout();
+ this.mainMenuStrip.SuspendLayout();
+ this.settingsFileGroupBox.SuspendLayout();
+ this.SuspendLayout();
+ //
+ // mainStatusStrip
+ //
+ this.mainStatusStrip.Items.AddRange(new System.Windows.Forms.ToolStripItem[] {
+ this.status});
+ this.mainStatusStrip.Location = new System.Drawing.Point(0, 472);
+ this.mainStatusStrip.Name = "mainStatusStrip";
+ this.mainStatusStrip.Size = new System.Drawing.Size(703, 22);
+ this.mainStatusStrip.TabIndex = 1;
+ //
+ // status
+ //
+ this.status.Font = new System.Drawing.Font("Tahoma", 8.25F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
+ this.status.Name = "status";
+ this.status.Size = new System.Drawing.Size(0, 17);
+ //
+ // mainTabs
+ //
+ this.mainTabs.Controls.Add(this.generalTabPage);
+ this.mainTabs.Controls.Add(this.advancedTabPage);
+ this.mainTabs.Controls.Add(this.submit1TabPage);
+ this.mainTabs.Controls.Add(this.submit2TabPage);
+ this.mainTabs.Controls.Add(this.submit3TabPage);
+ this.mainTabs.Controls.Add(this.submit4TabPage);
+ this.mainTabs.Controls.Add(this.submit5TabPage);
+ this.mainTabs.Enabled = false;
+ this.mainTabs.Location = new System.Drawing.Point(12, 105);
+ this.mainTabs.Name = "mainTabs";
+ this.mainTabs.SelectedIndex = 0;
+ this.mainTabs.Size = new System.Drawing.Size(679, 326);
+ this.mainTabs.TabIndex = 2;
+ //
+ // generalTabPage
+ //
+ this.generalTabPage.Controls.Add(this.nbugConfigurationGroupBox);
+ this.generalTabPage.Controls.Add(this.internalLoggerGroupBox);
+ this.generalTabPage.Controls.Add(this.reportSubmitterGroupBox);
+ this.generalTabPage.Controls.Add(this.reportQueueGroupBox);
+ this.generalTabPage.Controls.Add(this.reportingGroupBox);
+ this.generalTabPage.Controls.Add(this.userInterfaceGroupBox);
+ this.generalTabPage.Location = new System.Drawing.Point(4, 22);
+ this.generalTabPage.Name = "generalTabPage";
+ this.generalTabPage.Padding = new System.Windows.Forms.Padding(3);
+ this.generalTabPage.Size = new System.Drawing.Size(671, 300);
+ this.generalTabPage.TabIndex = 0;
+ this.generalTabPage.Text = "General";
+ this.generalTabPage.UseVisualStyleBackColor = true;
+ //
+ // nbugConfigurationGroupBox
+ //
+ this.nbugConfigurationGroupBox.Controls.Add(this.releaseModeCheckBox);
+ this.nbugConfigurationGroupBox.Location = new System.Drawing.Point(473, 224);
+ this.nbugConfigurationGroupBox.Name = "nbugConfigurationGroupBox";
+ this.nbugConfigurationGroupBox.Size = new System.Drawing.Size(140, 48);
+ this.nbugConfigurationGroupBox.TabIndex = 26;
+ this.nbugConfigurationGroupBox.TabStop = false;
+ this.nbugConfigurationGroupBox.Text = "NBug Configuration";
+ //
+ // releaseModeCheckBox
+ //
+ this.releaseModeCheckBox.AutoSize = true;
+ this.releaseModeCheckBox.Location = new System.Drawing.Point(12, 19);
+ this.releaseModeCheckBox.Name = "releaseModeCheckBox";
+ this.releaseModeCheckBox.Size = new System.Drawing.Size(95, 17);
+ this.releaseModeCheckBox.TabIndex = 21;
+ this.releaseModeCheckBox.Text = "Release Mode";
+ this.mainToolTips.SetToolTip(this.releaseModeCheckBox, resources.GetString("releaseModeCheckBox.ToolTip"));
+ this.releaseModeCheckBox.UseVisualStyleBackColor = true;
+ //
+ // internalLoggerGroupBox
+ //
+ this.internalLoggerGroupBox.Controls.Add(this.networkTraceWarningLabel);
+ this.internalLoggerGroupBox.Controls.Add(this.writeNetworkTraceToFileCheckBox);
+ this.internalLoggerGroupBox.Controls.Add(this.writeLogToDiskCheckBox);
+ this.internalLoggerGroupBox.Location = new System.Drawing.Point(297, 131);
+ this.internalLoggerGroupBox.Name = "internalLoggerGroupBox";
+ this.internalLoggerGroupBox.Size = new System.Drawing.Size(316, 85);
+ this.internalLoggerGroupBox.TabIndex = 26;
+ this.internalLoggerGroupBox.TabStop = false;
+ this.internalLoggerGroupBox.Text = "Internal Logger";
+ //
+ // networkTraceWarningLabel
+ //
+ this.networkTraceWarningLabel.AutoSize = true;
+ this.networkTraceWarningLabel.Enabled = false;
+ this.networkTraceWarningLabel.Font = new System.Drawing.Font("Microsoft Sans Serif", 6.75F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
+ this.networkTraceWarningLabel.Location = new System.Drawing.Point(30, 62);
+ this.networkTraceWarningLabel.Name = "networkTraceWarningLabel";
+ this.networkTraceWarningLabel.Size = new System.Drawing.Size(236, 12);
+ this.networkTraceWarningLabel.TabIndex = 23;
+ this.networkTraceWarningLabel.Text = "(Warning: This overrides element)";
+ //
+ // writeNetworkTraceToFileCheckBox
+ //
+ this.writeNetworkTraceToFileCheckBox.AutoSize = true;
+ this.writeNetworkTraceToFileCheckBox.Enabled = false;
+ this.writeNetworkTraceToFileCheckBox.Location = new System.Drawing.Point(11, 42);
+ this.writeNetworkTraceToFileCheckBox.Name = "writeNetworkTraceToFileCheckBox";
+ this.writeNetworkTraceToFileCheckBox.Size = new System.Drawing.Size(277, 17);
+ this.writeNetworkTraceToFileCheckBox.TabIndex = 22;
+ this.writeNetworkTraceToFileCheckBox.Text = "Write Network Trace Info to \"NBug.Network.log\" File";
+ this.mainToolTips.SetToolTip(this.writeNetworkTraceToFileCheckBox, "Indicates whether to enable network tracing and write the network trace log to \"N" +
+ "Bug.Network.log\" file.\r\nThis can only be enabled if appending settings to applic" +
+ "ation \"app.config\" file.");
+ this.writeNetworkTraceToFileCheckBox.UseVisualStyleBackColor = true;
+ //
+ // writeLogToDiskCheckBox
+ //
+ this.writeLogToDiskCheckBox.AutoSize = true;
+ this.writeLogToDiskCheckBox.Location = new System.Drawing.Point(11, 19);
+ this.writeLogToDiskCheckBox.Name = "writeLogToDiskCheckBox";
+ this.writeLogToDiskCheckBox.Size = new System.Drawing.Size(163, 17);
+ this.writeLogToDiskCheckBox.TabIndex = 21;
+ this.writeLogToDiskCheckBox.Text = "Write \"NBug.log\" File to Disk";
+ this.mainToolTips.SetToolTip(this.writeLogToDiskCheckBox, resources.GetString("writeLogToDiskCheckBox.ToolTip"));
+ this.writeLogToDiskCheckBox.UseVisualStyleBackColor = true;
+ //
+ // reportSubmitterGroupBox
+ //
+ this.reportSubmitterGroupBox.Controls.Add(this.encryptConnectionStringsCheckBox);
+ this.reportSubmitterGroupBox.Location = new System.Drawing.Point(297, 224);
+ this.reportSubmitterGroupBox.Name = "reportSubmitterGroupBox";
+ this.reportSubmitterGroupBox.Size = new System.Drawing.Size(170, 48);
+ this.reportSubmitterGroupBox.TabIndex = 25;
+ this.reportSubmitterGroupBox.TabStop = false;
+ this.reportSubmitterGroupBox.Text = "Report Submitter";
+ //
+ // encryptConnectionStringsCheckBox
+ //
+ this.encryptConnectionStringsCheckBox.AutoSize = true;
+ this.encryptConnectionStringsCheckBox.Location = new System.Drawing.Point(11, 19);
+ this.encryptConnectionStringsCheckBox.Name = "encryptConnectionStringsCheckBox";
+ this.encryptConnectionStringsCheckBox.Size = new System.Drawing.Size(154, 17);
+ this.encryptConnectionStringsCheckBox.TabIndex = 21;
+ this.encryptConnectionStringsCheckBox.Text = "Encrypt Connection Strings";
+ this.mainToolTips.SetToolTip(this.encryptConnectionStringsCheckBox, resources.GetString("encryptConnectionStringsCheckBox.ToolTip"));
+ this.encryptConnectionStringsCheckBox.UseVisualStyleBackColor = true;
+ //
+ // reportQueueGroupBox
+ //
+ this.reportQueueGroupBox.Controls.Add(this.storagePathLabel);
+ this.reportQueueGroupBox.Controls.Add(this.storagePathComboBox);
+ this.reportQueueGroupBox.Controls.Add(this.customPathLabel);
+ this.reportQueueGroupBox.Controls.Add(this.customStoragePathTextBox);
+ this.reportQueueGroupBox.Controls.Add(this.customPathTipLabel);
+ this.reportQueueGroupBox.Location = new System.Drawing.Point(297, 13);
+ this.reportQueueGroupBox.Name = "reportQueueGroupBox";
+ this.reportQueueGroupBox.Size = new System.Drawing.Size(316, 112);
+ this.reportQueueGroupBox.TabIndex = 24;
+ this.reportQueueGroupBox.TabStop = false;
+ this.reportQueueGroupBox.Text = "Report Queue";
+ //
+ // storagePathLabel
+ //
+ this.storagePathLabel.AutoSize = true;
+ this.storagePathLabel.Location = new System.Drawing.Point(6, 25);
+ this.storagePathLabel.Name = "storagePathLabel";
+ this.storagePathLabel.Size = new System.Drawing.Size(131, 13);
+ this.storagePathLabel.TabIndex = 12;
+ this.storagePathLabel.Text = "Report Files Storage Path:";
+ //
+ // storagePathComboBox
+ //
+ this.storagePathComboBox.DropDownStyle = System.Windows.Forms.ComboBoxStyle.DropDownList;
+ this.storagePathComboBox.FormattingEnabled = true;
+ this.storagePathComboBox.Location = new System.Drawing.Point(143, 22);
+ this.storagePathComboBox.Name = "storagePathComboBox";
+ this.storagePathComboBox.Size = new System.Drawing.Size(153, 21);
+ this.storagePathComboBox.TabIndex = 13;
+ this.mainToolTips.SetToolTip(this.storagePathComboBox, "Gets or sets the bug report items storage path. After and unhandled exception occ" +
+ "urs, the bug reports");
+ this.storagePathComboBox.SelectedValueChanged += new System.EventHandler(this.StoragePathComboBox_SelectedValueChanged);
+ //
+ // customPathLabel
+ //
+ this.customPathLabel.AutoSize = true;
+ this.customPathLabel.Location = new System.Drawing.Point(6, 63);
+ this.customPathLabel.Name = "customPathLabel";
+ this.customPathLabel.Size = new System.Drawing.Size(70, 13);
+ this.customPathLabel.TabIndex = 18;
+ this.customPathLabel.Text = "Custom Path:";
+ //
+ // customStoragePathTextBox
+ //
+ this.customStoragePathTextBox.Enabled = false;
+ this.customStoragePathTextBox.Location = new System.Drawing.Point(82, 60);
+ this.customStoragePathTextBox.Name = "customStoragePathTextBox";
+ this.customStoragePathTextBox.Size = new System.Drawing.Size(214, 20);
+ this.customStoragePathTextBox.TabIndex = 19;
+ this.mainToolTips.SetToolTip(this.customStoragePathTextBox, "Custom storage path. This maybe a full path or a relative one to the application\'" +
+ "s CWD.");
+ //
+ // customPathTipLabel
+ //
+ this.customPathTipLabel.AutoSize = true;
+ this.customPathTipLabel.Font = new System.Drawing.Font("Microsoft Sans Serif", 6.75F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
+ this.customPathTipLabel.Location = new System.Drawing.Point(95, 83);
+ this.customPathTipLabel.Name = "customPathTipLabel";
+ this.customPathTipLabel.Size = new System.Drawing.Size(191, 12);
+ this.customPathTipLabel.TabIndex = 20;
+ this.customPathTipLabel.Text = "(uses System.IO.Path.GetFullPath() method)";
+ //
+ // reportingGroupBox
+ //
+ this.reportingGroupBox.Controls.Add(this.miniDumpTypeLabel);
+ this.reportingGroupBox.Controls.Add(this.miniDumpTypeComboBox);
+ this.reportingGroupBox.Controls.Add(this.sleepBeforeSendLabel);
+ this.reportingGroupBox.Controls.Add(this.sleepBeforeSendNumericUpDown);
+ this.reportingGroupBox.Controls.Add(this.maxQueuedReportsLabel);
+ this.reportingGroupBox.Controls.Add(this.maxQueuedReportsNumericUpDown);
+ this.reportingGroupBox.Controls.Add(this.sleepBeforeSendUnitLabel);
+ this.reportingGroupBox.Controls.Add(this.stopReportingAfterLabel);
+ this.reportingGroupBox.Controls.Add(this.stopReportingAfterUnitLabel);
+ this.reportingGroupBox.Controls.Add(this.stopReportingAfterNumericUpDown);
+ this.reportingGroupBox.Location = new System.Drawing.Point(19, 108);
+ this.reportingGroupBox.Name = "reportingGroupBox";
+ this.reportingGroupBox.Size = new System.Drawing.Size(246, 164);
+ this.reportingGroupBox.TabIndex = 23;
+ this.reportingGroupBox.TabStop = false;
+ this.reportingGroupBox.Text = "Reporting";
+ //
+ // miniDumpTypeLabel
+ //
+ this.miniDumpTypeLabel.AutoSize = true;
+ this.miniDumpTypeLabel.Location = new System.Drawing.Point(6, 25);
+ this.miniDumpTypeLabel.Name = "miniDumpTypeLabel";
+ this.miniDumpTypeLabel.Size = new System.Drawing.Size(84, 13);
+ this.miniDumpTypeLabel.TabIndex = 2;
+ this.miniDumpTypeLabel.Text = "MiniDump Type:";
+ //
+ // miniDumpTypeComboBox
+ //
+ this.miniDumpTypeComboBox.DropDownStyle = System.Windows.Forms.ComboBoxStyle.DropDownList;
+ this.miniDumpTypeComboBox.FormattingEnabled = true;
+ this.miniDumpTypeComboBox.Location = new System.Drawing.Point(123, 22);
+ this.miniDumpTypeComboBox.Name = "miniDumpTypeComboBox";
+ this.miniDumpTypeComboBox.Size = new System.Drawing.Size(109, 21);
+ this.miniDumpTypeComboBox.TabIndex = 3;
+ this.mainToolTips.SetToolTip(this.miniDumpTypeComboBox, "Defines memory dump type with a specific detail level.\r\nNone: No memory dump is g" +
+ "enerated.\r\nTiny: Dump size ~200KB compressed.\r\nNormal: Dump size ~20MB compresse" +
+ "d.\r\nFull: Dump size ~100MB compressed.");
+ //
+ // sleepBeforeSendLabel
+ //
+ this.sleepBeforeSendLabel.AutoSize = true;
+ this.sleepBeforeSendLabel.Location = new System.Drawing.Point(6, 58);
+ this.sleepBeforeSendLabel.Name = "sleepBeforeSendLabel";
+ this.sleepBeforeSendLabel.Size = new System.Drawing.Size(99, 13);
+ this.sleepBeforeSendLabel.TabIndex = 4;
+ this.sleepBeforeSendLabel.Text = "Sleep Before Send:";
+ //
+ // sleepBeforeSendNumericUpDown
+ //
+ this.sleepBeforeSendNumericUpDown.Location = new System.Drawing.Point(123, 56);
+ this.sleepBeforeSendNumericUpDown.Name = "sleepBeforeSendNumericUpDown";
+ this.sleepBeforeSendNumericUpDown.Size = new System.Drawing.Size(61, 20);
+ this.sleepBeforeSendNumericUpDown.TabIndex = 5;
+ this.mainToolTips.SetToolTip(this.sleepBeforeSendNumericUpDown, resources.GetString("sleepBeforeSendNumericUpDown.ToolTip"));
+ //
+ // maxQueuedReportsLabel
+ //
+ this.maxQueuedReportsLabel.AutoSize = true;
+ this.maxQueuedReportsLabel.Location = new System.Drawing.Point(6, 95);
+ this.maxQueuedReportsLabel.Name = "maxQueuedReportsLabel";
+ this.maxQueuedReportsLabel.Size = new System.Drawing.Size(111, 13);
+ this.maxQueuedReportsLabel.TabIndex = 6;
+ this.maxQueuedReportsLabel.Text = "Max Queued Reports:";
+ //
+ // maxQueuedReportsNumericUpDown
+ //
+ this.maxQueuedReportsNumericUpDown.Location = new System.Drawing.Point(123, 93);
+ this.maxQueuedReportsNumericUpDown.Name = "maxQueuedReportsNumericUpDown";
+ this.maxQueuedReportsNumericUpDown.Size = new System.Drawing.Size(61, 20);
+ this.maxQueuedReportsNumericUpDown.TabIndex = 7;
+ this.mainToolTips.SetToolTip(this.maxQueuedReportsNumericUpDown, "The number of bug reports that can be queued for submission.\r\nAfter an exception " +
+ "occurs, a bug report is queued to be send at the next application restart.");
+ //
+ // sleepBeforeSendUnitLabel
+ //
+ this.sleepBeforeSendUnitLabel.AutoSize = true;
+ this.sleepBeforeSendUnitLabel.Font = new System.Drawing.Font("Microsoft Sans Serif", 6.75F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
+ this.sleepBeforeSendUnitLabel.Location = new System.Drawing.Point(188, 59);
+ this.sleepBeforeSendUnitLabel.Name = "sleepBeforeSendUnitLabel";
+ this.sleepBeforeSendUnitLabel.Size = new System.Drawing.Size(46, 12);
+ this.sleepBeforeSendUnitLabel.TabIndex = 8;
+ this.sleepBeforeSendUnitLabel.Text = "(seconds)";
+ //
+ // stopReportingAfterLabel
+ //
+ this.stopReportingAfterLabel.AutoSize = true;
+ this.stopReportingAfterLabel.Location = new System.Drawing.Point(6, 132);
+ this.stopReportingAfterLabel.Name = "stopReportingAfterLabel";
+ this.stopReportingAfterLabel.Size = new System.Drawing.Size(106, 13);
+ this.stopReportingAfterLabel.TabIndex = 9;
+ this.stopReportingAfterLabel.Text = "Stop Reporting After:";
+ //
+ // stopReportingAfterUnitLabel
+ //
+ this.stopReportingAfterUnitLabel.AutoSize = true;
+ this.stopReportingAfterUnitLabel.Font = new System.Drawing.Font("Microsoft Sans Serif", 6.75F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
+ this.stopReportingAfterUnitLabel.Location = new System.Drawing.Point(188, 133);
+ this.stopReportingAfterUnitLabel.Name = "stopReportingAfterUnitLabel";
+ this.stopReportingAfterUnitLabel.Size = new System.Drawing.Size(31, 12);
+ this.stopReportingAfterUnitLabel.TabIndex = 11;
+ this.stopReportingAfterUnitLabel.Text = "(days)";
+ //
+ // stopReportingAfterNumericUpDown
+ //
+ this.stopReportingAfterNumericUpDown.Location = new System.Drawing.Point(123, 130);
+ this.stopReportingAfterNumericUpDown.Name = "stopReportingAfterNumericUpDown";
+ this.stopReportingAfterNumericUpDown.Size = new System.Drawing.Size(61, 20);
+ this.stopReportingAfterNumericUpDown.TabIndex = 10;
+ this.mainToolTips.SetToolTip(this.stopReportingAfterNumericUpDown, "The number of days that NBug will be collecting bug reports for the application.\r" +
+ "\nThis prevents generating bug reports for obselete versions of applications afte" +
+ "r given number of days.");
+ //
+ // userInterfaceGroupBox
+ //
+ this.userInterfaceGroupBox.Controls.Add(this.previewButton);
+ this.userInterfaceGroupBox.Controls.Add(this.uiModeLabel);
+ this.userInterfaceGroupBox.Controls.Add(this.uiModeComboBox);
+ this.userInterfaceGroupBox.Controls.Add(this.uiProviderLabel);
+ this.userInterfaceGroupBox.Controls.Add(this.uiProviderComboBox);
+ this.userInterfaceGroupBox.Location = new System.Drawing.Point(19, 13);
+ this.userInterfaceGroupBox.Name = "userInterfaceGroupBox";
+ this.userInterfaceGroupBox.Size = new System.Drawing.Size(246, 89);
+ this.userInterfaceGroupBox.TabIndex = 22;
+ this.userInterfaceGroupBox.TabStop = false;
+ this.userInterfaceGroupBox.Text = "User Interface";
+ //
+ // previewButton
+ //
+ this.previewButton.Enabled = false;
+ this.previewButton.Location = new System.Drawing.Point(179, 54);
+ this.previewButton.Name = "previewButton";
+ this.previewButton.Size = new System.Drawing.Size(53, 21);
+ this.previewButton.TabIndex = 4;
+ this.previewButton.Text = "Preview";
+ this.previewButton.UseVisualStyleBackColor = true;
+ this.previewButton.Click += new System.EventHandler(this.PreviewButton_Click);
+ //
+ // uiModeLabel
+ //
+ this.uiModeLabel.AutoSize = true;
+ this.uiModeLabel.Location = new System.Drawing.Point(6, 24);
+ this.uiModeLabel.Name = "uiModeLabel";
+ this.uiModeLabel.Size = new System.Drawing.Size(48, 13);
+ this.uiModeLabel.TabIndex = 0;
+ this.uiModeLabel.Text = "UIMode:";
+ //
+ // uiModeComboBox
+ //
+ this.uiModeComboBox.DropDownStyle = System.Windows.Forms.ComboBoxStyle.DropDownList;
+ this.uiModeComboBox.FormattingEnabled = true;
+ this.uiModeComboBox.Location = new System.Drawing.Point(81, 21);
+ this.uiModeComboBox.Name = "uiModeComboBox";
+ this.uiModeComboBox.Size = new System.Drawing.Size(151, 21);
+ this.uiModeComboBox.TabIndex = 1;
+ this.mainToolTips.SetToolTip(this.uiModeComboBox, resources.GetString("uiModeComboBox.ToolTip"));
+ this.uiModeComboBox.SelectedIndexChanged += new System.EventHandler(this.UIModeComboBox_SelectedIndexChanged);
+ //
+ // uiProviderLabel
+ //
+ this.uiProviderLabel.AutoSize = true;
+ this.uiProviderLabel.Location = new System.Drawing.Point(6, 57);
+ this.uiProviderLabel.Name = "uiProviderLabel";
+ this.uiProviderLabel.Size = new System.Drawing.Size(63, 13);
+ this.uiProviderLabel.TabIndex = 2;
+ this.uiProviderLabel.Text = "UI Provider:";
+ //
+ // uiProviderComboBox
+ //
+ this.uiProviderComboBox.DropDownStyle = System.Windows.Forms.ComboBoxStyle.DropDownList;
+ this.uiProviderComboBox.FormattingEnabled = true;
+ this.uiProviderComboBox.Location = new System.Drawing.Point(81, 54);
+ this.uiProviderComboBox.Name = "uiProviderComboBox";
+ this.uiProviderComboBox.Size = new System.Drawing.Size(92, 21);
+ this.uiProviderComboBox.TabIndex = 3;
+ this.mainToolTips.SetToolTip(this.uiProviderComboBox, resources.GetString("uiProviderComboBox.ToolTip"));
+ this.uiProviderComboBox.SelectedIndexChanged += new System.EventHandler(this.UIProviderComboBox_SelectedIndexChanged);
+ //
+ // advancedTabPage
+ //
+ this.advancedTabPage.Controls.Add(this.exceptionHandlingGroupBox);
+ this.advancedTabPage.Controls.Add(this.warningLabel);
+ this.advancedTabPage.Location = new System.Drawing.Point(4, 22);
+ this.advancedTabPage.Name = "advancedTabPage";
+ this.advancedTabPage.Padding = new System.Windows.Forms.Padding(3);
+ this.advancedTabPage.Size = new System.Drawing.Size(671, 300);
+ this.advancedTabPage.TabIndex = 6;
+ this.advancedTabPage.Text = "Advanced";
+ this.advancedTabPage.UseVisualStyleBackColor = true;
+ //
+ // exceptionHandlingGroupBox
+ //
+ this.exceptionHandlingGroupBox.Controls.Add(this.exitApplicationImmediatelyWarningLabel);
+ this.exceptionHandlingGroupBox.Controls.Add(this.handleProcessCorruptedStateExceptionsCheckBox);
+ this.exceptionHandlingGroupBox.Controls.Add(this.exitApplicationImmediatelyCheckBox);
+ this.exceptionHandlingGroupBox.Location = new System.Drawing.Point(19, 70);
+ this.exceptionHandlingGroupBox.Name = "exceptionHandlingGroupBox";
+ this.exceptionHandlingGroupBox.Size = new System.Drawing.Size(255, 90);
+ this.exceptionHandlingGroupBox.TabIndex = 27;
+ this.exceptionHandlingGroupBox.TabStop = false;
+ this.exceptionHandlingGroupBox.Text = "Exception Handling";
+ //
+ // exitApplicationImmediatelyWarningLabel
+ //
+ this.exitApplicationImmediatelyWarningLabel.AutoSize = true;
+ this.exitApplicationImmediatelyWarningLabel.Enabled = false;
+ this.exitApplicationImmediatelyWarningLabel.Font = new System.Drawing.Font("Microsoft Sans Serif", 6.75F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
+ this.exitApplicationImmediatelyWarningLabel.Location = new System.Drawing.Point(29, 37);
+ this.exitApplicationImmediatelyWarningLabel.Name = "exitApplicationImmediatelyWarningLabel";
+ this.exitApplicationImmediatelyWarningLabel.Size = new System.Drawing.Size(171, 12);
+ this.exitApplicationImmediatelyWarningLabel.TabIndex = 23;
+ this.exitApplicationImmediatelyWarningLabel.Text = "(this is only valid when UIMode = None;)";
+ //
+ // handleProcessCorruptedStateExceptionsCheckBox
+ //
+ this.handleProcessCorruptedStateExceptionsCheckBox.AutoSize = true;
+ this.handleProcessCorruptedStateExceptionsCheckBox.Location = new System.Drawing.Point(11, 59);
+ this.handleProcessCorruptedStateExceptionsCheckBox.Name = "handleProcessCorruptedStateExceptionsCheckBox";
+ this.handleProcessCorruptedStateExceptionsCheckBox.Size = new System.Drawing.Size(233, 17);
+ this.handleProcessCorruptedStateExceptionsCheckBox.TabIndex = 22;
+ this.handleProcessCorruptedStateExceptionsCheckBox.Text = "Handle Process Corrupted State Exceptions";
+ this.mainToolTips.SetToolTip(this.handleProcessCorruptedStateExceptionsCheckBox, resources.GetString("handleProcessCorruptedStateExceptionsCheckBox.ToolTip"));
+ this.handleProcessCorruptedStateExceptionsCheckBox.UseVisualStyleBackColor = true;
+ //
+ // exitApplicationImmediatelyCheckBox
+ //
+ this.exitApplicationImmediatelyCheckBox.AutoSize = true;
+ this.exitApplicationImmediatelyCheckBox.Enabled = false;
+ this.exitApplicationImmediatelyCheckBox.Location = new System.Drawing.Point(11, 19);
+ this.exitApplicationImmediatelyCheckBox.Name = "exitApplicationImmediatelyCheckBox";
+ this.exitApplicationImmediatelyCheckBox.Size = new System.Drawing.Size(156, 17);
+ this.exitApplicationImmediatelyCheckBox.TabIndex = 21;
+ this.exitApplicationImmediatelyCheckBox.Text = "Exit Application Immediately";
+ this.mainToolTips.SetToolTip(this.exitApplicationImmediatelyCheckBox, resources.GetString("exitApplicationImmediatelyCheckBox.ToolTip"));
+ this.exitApplicationImmediatelyCheckBox.UseVisualStyleBackColor = true;
+ //
+ // warningLabel
+ //
+ this.warningLabel.Location = new System.Drawing.Point(19, 17);
+ this.warningLabel.Name = "warningLabel";
+ this.warningLabel.Size = new System.Drawing.Size(630, 41);
+ this.warningLabel.TabIndex = 0;
+ this.warningLabel.Text = resources.GetString("warningLabel.Text");
+ //
+ // submit1TabPage
+ //
+ this.submit1TabPage.Controls.Add(this.panelLoader1);
+ this.submit1TabPage.Location = new System.Drawing.Point(4, 22);
+ this.submit1TabPage.Name = "submit1TabPage";
+ this.submit1TabPage.Padding = new System.Windows.Forms.Padding(3);
+ this.submit1TabPage.Size = new System.Drawing.Size(671, 300);
+ this.submit1TabPage.TabIndex = 1;
+ this.submit1TabPage.Text = "Submit #1";
+ this.submit1TabPage.UseVisualStyleBackColor = true;
+ //
+ // panelLoader1
+ //
+ this.panelLoader1.AutoScroll = true;
+ this.panelLoader1.AutoValidate = System.Windows.Forms.AutoValidate.EnablePreventFocusChange;
+ this.panelLoader1.Dock = System.Windows.Forms.DockStyle.Fill;
+ this.panelLoader1.Location = new System.Drawing.Point(3, 3);
+ this.panelLoader1.Name = "panelLoader1";
+ this.panelLoader1.Padding = new System.Windows.Forms.Padding(10, 0, 0, 0);
+ this.panelLoader1.Size = new System.Drawing.Size(665, 294);
+ this.panelLoader1.TabIndex = 0;
+ //
+ // submit2TabPage
+ //
+ this.submit2TabPage.Controls.Add(this.panelLoader2);
+ this.submit2TabPage.Location = new System.Drawing.Point(4, 22);
+ this.submit2TabPage.Name = "submit2TabPage";
+ this.submit2TabPage.Padding = new System.Windows.Forms.Padding(3);
+ this.submit2TabPage.Size = new System.Drawing.Size(671, 300);
+ this.submit2TabPage.TabIndex = 2;
+ this.submit2TabPage.Text = "Submit #2";
+ this.submit2TabPage.UseVisualStyleBackColor = true;
+ //
+ // panelLoader2
+ //
+ this.panelLoader2.AutoScroll = true;
+ this.panelLoader2.AutoValidate = System.Windows.Forms.AutoValidate.EnablePreventFocusChange;
+ this.panelLoader2.Dock = System.Windows.Forms.DockStyle.Fill;
+ this.panelLoader2.Location = new System.Drawing.Point(3, 3);
+ this.panelLoader2.Name = "panelLoader2";
+ this.panelLoader2.Padding = new System.Windows.Forms.Padding(10, 0, 0, 0);
+ this.panelLoader2.Size = new System.Drawing.Size(665, 294);
+ this.panelLoader2.TabIndex = 1;
+ //
+ // submit3TabPage
+ //
+ this.submit3TabPage.Controls.Add(this.panelLoader3);
+ this.submit3TabPage.Location = new System.Drawing.Point(4, 22);
+ this.submit3TabPage.Name = "submit3TabPage";
+ this.submit3TabPage.Padding = new System.Windows.Forms.Padding(3);
+ this.submit3TabPage.Size = new System.Drawing.Size(671, 300);
+ this.submit3TabPage.TabIndex = 3;
+ this.submit3TabPage.Text = "Submit #3";
+ this.submit3TabPage.UseVisualStyleBackColor = true;
+ //
+ // panelLoader3
+ //
+ this.panelLoader3.AutoScroll = true;
+ this.panelLoader3.AutoValidate = System.Windows.Forms.AutoValidate.EnablePreventFocusChange;
+ this.panelLoader3.Dock = System.Windows.Forms.DockStyle.Fill;
+ this.panelLoader3.Location = new System.Drawing.Point(3, 3);
+ this.panelLoader3.Name = "panelLoader3";
+ this.panelLoader3.Padding = new System.Windows.Forms.Padding(10, 0, 0, 0);
+ this.panelLoader3.Size = new System.Drawing.Size(665, 294);
+ this.panelLoader3.TabIndex = 1;
+ //
+ // submit4TabPage
+ //
+ this.submit4TabPage.Controls.Add(this.panelLoader4);
+ this.submit4TabPage.Location = new System.Drawing.Point(4, 22);
+ this.submit4TabPage.Name = "submit4TabPage";
+ this.submit4TabPage.Padding = new System.Windows.Forms.Padding(3);
+ this.submit4TabPage.Size = new System.Drawing.Size(671, 300);
+ this.submit4TabPage.TabIndex = 4;
+ this.submit4TabPage.Text = "Submit #4";
+ this.submit4TabPage.UseVisualStyleBackColor = true;
+ //
+ // panelLoader4
+ //
+ this.panelLoader4.AutoScroll = true;
+ this.panelLoader4.AutoValidate = System.Windows.Forms.AutoValidate.EnablePreventFocusChange;
+ this.panelLoader4.Dock = System.Windows.Forms.DockStyle.Fill;
+ this.panelLoader4.Location = new System.Drawing.Point(3, 3);
+ this.panelLoader4.Name = "panelLoader4";
+ this.panelLoader4.Padding = new System.Windows.Forms.Padding(10, 0, 0, 0);
+ this.panelLoader4.Size = new System.Drawing.Size(665, 294);
+ this.panelLoader4.TabIndex = 1;
+ //
+ // submit5TabPage
+ //
+ this.submit5TabPage.Controls.Add(this.panelLoader5);
+ this.submit5TabPage.Location = new System.Drawing.Point(4, 22);
+ this.submit5TabPage.Name = "submit5TabPage";
+ this.submit5TabPage.Padding = new System.Windows.Forms.Padding(3);
+ this.submit5TabPage.Size = new System.Drawing.Size(671, 300);
+ this.submit5TabPage.TabIndex = 5;
+ this.submit5TabPage.Text = "Submit #5";
+ this.submit5TabPage.UseVisualStyleBackColor = true;
+ //
+ // panelLoader5
+ //
+ this.panelLoader5.AutoScroll = true;
+ this.panelLoader5.AutoValidate = System.Windows.Forms.AutoValidate.EnablePreventFocusChange;
+ this.panelLoader5.Dock = System.Windows.Forms.DockStyle.Fill;
+ this.panelLoader5.Location = new System.Drawing.Point(3, 3);
+ this.panelLoader5.Name = "panelLoader5";
+ this.panelLoader5.Padding = new System.Windows.Forms.Padding(10, 0, 0, 0);
+ this.panelLoader5.Size = new System.Drawing.Size(665, 294);
+ this.panelLoader5.TabIndex = 1;
+ //
+ // fileToolStripMenuItem1
+ //
+ this.fileToolStripMenuItem1.DropDownItems.AddRange(new System.Windows.Forms.ToolStripItem[] {
+ this.newToolStripMenuItem,
+ this.openToolStripMenuItem,
+ this.toolStripSeparator,
+ this.saveToolStripMenuItem,
+ this.saveAsToolStripMenuItem,
+ this.toolStripSeparator1,
+ this.importToolStripMenuItem,
+ this.toolStripSeparator2,
+ this.exitToolStripMenuItem});
+ this.fileToolStripMenuItem1.Name = "fileToolStripMenuItem1";
+ this.fileToolStripMenuItem1.Size = new System.Drawing.Size(35, 20);
+ this.fileToolStripMenuItem1.Text = "&File";
+ //
+ // newToolStripMenuItem
+ //
+ this.newToolStripMenuItem.DropDownItems.AddRange(new System.Windows.Forms.ToolStripItem[] {
+ this.externalToolStripMenuItem,
+ this.embeddedToolStripMenuItem});
+ this.newToolStripMenuItem.Image = ((System.Drawing.Image)(resources.GetObject("newToolStripMenuItem.Image")));
+ this.newToolStripMenuItem.ImageTransparentColor = System.Drawing.Color.Magenta;
+ this.newToolStripMenuItem.Name = "newToolStripMenuItem";
+ this.newToolStripMenuItem.ShortcutKeys = ((System.Windows.Forms.Keys)((System.Windows.Forms.Keys.Control | System.Windows.Forms.Keys.N)));
+ this.newToolStripMenuItem.Size = new System.Drawing.Size(151, 22);
+ this.newToolStripMenuItem.Text = "&New";
+ //
+ // externalToolStripMenuItem
+ //
+ this.externalToolStripMenuItem.Name = "externalToolStripMenuItem";
+ this.externalToolStripMenuItem.Size = new System.Drawing.Size(197, 22);
+ this.externalToolStripMenuItem.Text = "External (NBug.config)";
+ this.externalToolStripMenuItem.Click += new System.EventHandler(this.ExternalToolStripMenuItem_Click);
+ //
+ // embeddedToolStripMenuItem
+ //
+ this.embeddedToolStripMenuItem.Name = "embeddedToolStripMenuItem";
+ this.embeddedToolStripMenuItem.Size = new System.Drawing.Size(197, 22);
+ this.embeddedToolStripMenuItem.Text = "Embedded (app.config)";
+ this.embeddedToolStripMenuItem.Click += new System.EventHandler(this.EmbeddedToolStripMenuItem_Click);
+ //
+ // openToolStripMenuItem
+ //
+ this.openToolStripMenuItem.Image = ((System.Drawing.Image)(resources.GetObject("openToolStripMenuItem.Image")));
+ this.openToolStripMenuItem.ImageTransparentColor = System.Drawing.Color.Magenta;
+ this.openToolStripMenuItem.Name = "openToolStripMenuItem";
+ this.openToolStripMenuItem.ShortcutKeys = ((System.Windows.Forms.Keys)((System.Windows.Forms.Keys.Control | System.Windows.Forms.Keys.O)));
+ this.openToolStripMenuItem.Size = new System.Drawing.Size(151, 22);
+ this.openToolStripMenuItem.Text = "&Open";
+ this.openToolStripMenuItem.Click += new System.EventHandler(this.OpenButton_Click);
+ //
+ // toolStripSeparator
+ //
+ this.toolStripSeparator.Name = "toolStripSeparator";
+ this.toolStripSeparator.Size = new System.Drawing.Size(148, 6);
+ //
+ // saveToolStripMenuItem
+ //
+ this.saveToolStripMenuItem.Image = ((System.Drawing.Image)(resources.GetObject("saveToolStripMenuItem.Image")));
+ this.saveToolStripMenuItem.ImageTransparentColor = System.Drawing.Color.Magenta;
+ this.saveToolStripMenuItem.Name = "saveToolStripMenuItem";
+ this.saveToolStripMenuItem.ShortcutKeys = ((System.Windows.Forms.Keys)((System.Windows.Forms.Keys.Control | System.Windows.Forms.Keys.S)));
+ this.saveToolStripMenuItem.Size = new System.Drawing.Size(151, 22);
+ this.saveToolStripMenuItem.Text = "&Save";
+ this.saveToolStripMenuItem.Click += new System.EventHandler(this.SaveButton_Click);
+ //
+ // saveAsToolStripMenuItem
+ //
+ this.saveAsToolStripMenuItem.Name = "saveAsToolStripMenuItem";
+ this.saveAsToolStripMenuItem.Size = new System.Drawing.Size(151, 22);
+ this.saveAsToolStripMenuItem.Text = "Save &As";
+ this.saveAsToolStripMenuItem.Visible = false;
+ //
+ // toolStripSeparator1
+ //
+ this.toolStripSeparator1.Name = "toolStripSeparator1";
+ this.toolStripSeparator1.Size = new System.Drawing.Size(148, 6);
+ this.toolStripSeparator1.Visible = false;
+ //
+ // importToolStripMenuItem
+ //
+ this.importToolStripMenuItem.Name = "importToolStripMenuItem";
+ this.importToolStripMenuItem.Size = new System.Drawing.Size(151, 22);
+ this.importToolStripMenuItem.Text = "&Import";
+ this.importToolStripMenuItem.Visible = false;
+ //
+ // toolStripSeparator2
+ //
+ this.toolStripSeparator2.Name = "toolStripSeparator2";
+ this.toolStripSeparator2.Size = new System.Drawing.Size(148, 6);
+ //
+ // exitToolStripMenuItem
+ //
+ this.exitToolStripMenuItem.Name = "exitToolStripMenuItem";
+ this.exitToolStripMenuItem.Size = new System.Drawing.Size(151, 22);
+ this.exitToolStripMenuItem.Text = "E&xit";
+ this.exitToolStripMenuItem.Click += new System.EventHandler(this.CloseButton_Click);
+ //
+ // toolsToolStripMenuItem
+ //
+ this.toolsToolStripMenuItem.DropDownItems.AddRange(new System.Windows.Forms.ToolStripItem[] {
+ this.testAppToolStripMenuItem});
+ this.toolsToolStripMenuItem.Name = "toolsToolStripMenuItem";
+ this.toolsToolStripMenuItem.Size = new System.Drawing.Size(44, 20);
+ this.toolsToolStripMenuItem.Text = "&Tools";
+ //
+ // testAppToolStripMenuItem
+ //
+ this.testAppToolStripMenuItem.Image = global::NBug.Configurator.Properties.Resources.run;
+ this.testAppToolStripMenuItem.Name = "testAppToolStripMenuItem";
+ this.testAppToolStripMenuItem.Size = new System.Drawing.Size(187, 22);
+ this.testAppToolStripMenuItem.Text = "Save && Run &Test App";
+ this.testAppToolStripMenuItem.Click += new System.EventHandler(this.RunTestAppButton_Click);
+ //
+ // helpToolStripMenuItem
+ //
+ this.helpToolStripMenuItem.DropDownItems.AddRange(new System.Windows.Forms.ToolStripItem[] {
+ this.projectHomeToolStripMenuItem,
+ this.onlineDocumentationToolStripMenuItem,
+ this.discussionForumToolStripMenuItem,
+ this.bugTrackerToolStripMenuItem,
+ this.toolStripSeparator5,
+ this.aboutToolStripMenuItem});
+ this.helpToolStripMenuItem.Name = "helpToolStripMenuItem";
+ this.helpToolStripMenuItem.Size = new System.Drawing.Size(40, 20);
+ this.helpToolStripMenuItem.Text = "&Help";
+ //
+ // projectHomeToolStripMenuItem
+ //
+ this.projectHomeToolStripMenuItem.Name = "projectHomeToolStripMenuItem";
+ this.projectHomeToolStripMenuItem.Size = new System.Drawing.Size(190, 22);
+ this.projectHomeToolStripMenuItem.Tag = "http://www.nbusy.com/projects/nbug";
+ this.projectHomeToolStripMenuItem.Text = "Project &Home";
+ this.projectHomeToolStripMenuItem.Click += new System.EventHandler(this.ProjectHomeToolStripMenuItem_Click);
+ //
+ // onlineDocumentationToolStripMenuItem
+ //
+ this.onlineDocumentationToolStripMenuItem.Image = global::NBug.Configurator.Properties.Resources.help;
+ this.onlineDocumentationToolStripMenuItem.Name = "onlineDocumentationToolStripMenuItem";
+ this.onlineDocumentationToolStripMenuItem.Size = new System.Drawing.Size(190, 22);
+ this.onlineDocumentationToolStripMenuItem.Tag = "http://www.nbusy.com/projects/nbug/documentation";
+ this.onlineDocumentationToolStripMenuItem.Text = "Online &Documentation";
+ this.onlineDocumentationToolStripMenuItem.Click += new System.EventHandler(this.OnlineDocumentationToolStripMenuItem_Click);
+ //
+ // discussionForumToolStripMenuItem
+ //
+ this.discussionForumToolStripMenuItem.Name = "discussionForumToolStripMenuItem";
+ this.discussionForumToolStripMenuItem.Size = new System.Drawing.Size(190, 22);
+ this.discussionForumToolStripMenuItem.Tag = "http://www.nbusy.com/forum/f11/";
+ this.discussionForumToolStripMenuItem.Text = "Discussion &Forum";
+ this.discussionForumToolStripMenuItem.Click += new System.EventHandler(this.DiscussionForumToolStripMenuItem_Click);
+ //
+ // bugTrackerToolStripMenuItem
+ //
+ this.bugTrackerToolStripMenuItem.Name = "bugTrackerToolStripMenuItem";
+ this.bugTrackerToolStripMenuItem.Size = new System.Drawing.Size(190, 22);
+ this.bugTrackerToolStripMenuItem.Tag = "http://www.nbusy.com/tracker/projects/nbug";
+ this.bugTrackerToolStripMenuItem.Text = "&Bug Tracker";
+ this.bugTrackerToolStripMenuItem.Click += new System.EventHandler(this.BugTrackerToolStripMenuItem_Click);
+ //
+ // toolStripSeparator5
+ //
+ this.toolStripSeparator5.Name = "toolStripSeparator5";
+ this.toolStripSeparator5.Size = new System.Drawing.Size(187, 6);
+ //
+ // aboutToolStripMenuItem
+ //
+ this.aboutToolStripMenuItem.Image = global::NBug.Configurator.Properties.Resources.Icon_16;
+ this.aboutToolStripMenuItem.Name = "aboutToolStripMenuItem";
+ this.aboutToolStripMenuItem.Size = new System.Drawing.Size(190, 22);
+ this.aboutToolStripMenuItem.Text = "&About NBug";
+ this.aboutToolStripMenuItem.Click += new System.EventHandler(this.AboutToolStripMenuItem_Click);
+ //
+ // mainMenuStrip
+ //
+ this.mainMenuStrip.Items.AddRange(new System.Windows.Forms.ToolStripItem[] {
+ this.fileToolStripMenuItem1,
+ this.toolsToolStripMenuItem,
+ this.helpToolStripMenuItem});
+ this.mainMenuStrip.Location = new System.Drawing.Point(0, 0);
+ this.mainMenuStrip.Name = "mainMenuStrip";
+ this.mainMenuStrip.Size = new System.Drawing.Size(703, 24);
+ this.mainMenuStrip.TabIndex = 0;
+ //
+ // saveButton
+ //
+ this.saveButton.Enabled = false;
+ this.saveButton.Image = global::NBug.Configurator.Properties.Resources.save;
+ this.saveButton.ImageAlign = System.Drawing.ContentAlignment.MiddleLeft;
+ this.saveButton.Location = new System.Drawing.Point(517, 439);
+ this.saveButton.Name = "saveButton";
+ this.saveButton.Size = new System.Drawing.Size(89, 23);
+ this.saveButton.TabIndex = 3;
+ this.saveButton.Text = "&Save";
+ this.saveButton.UseVisualStyleBackColor = true;
+ this.saveButton.Click += new System.EventHandler(this.SaveButton_Click);
+ //
+ // closeButton
+ //
+ this.closeButton.DialogResult = System.Windows.Forms.DialogResult.Cancel;
+ this.closeButton.Location = new System.Drawing.Point(616, 439);
+ this.closeButton.Name = "closeButton";
+ this.closeButton.Size = new System.Drawing.Size(75, 23);
+ this.closeButton.TabIndex = 5;
+ this.closeButton.Text = "&Close";
+ this.closeButton.UseVisualStyleBackColor = true;
+ this.closeButton.Click += new System.EventHandler(this.CloseButton_Click);
+ //
+ // mainToolTips
+ //
+ this.mainToolTips.AutoPopDelay = 120000;
+ this.mainToolTips.InitialDelay = 500;
+ this.mainToolTips.ReshowDelay = 100;
+ //
+ // runTestAppButton
+ //
+ this.runTestAppButton.Enabled = false;
+ this.runTestAppButton.Image = global::NBug.Configurator.Properties.Resources.run;
+ this.runTestAppButton.ImageAlign = System.Drawing.ContentAlignment.BottomLeft;
+ this.runTestAppButton.Location = new System.Drawing.Point(360, 439);
+ this.runTestAppButton.Name = "runTestAppButton";
+ this.runTestAppButton.Size = new System.Drawing.Size(136, 23);
+ this.runTestAppButton.TabIndex = 6;
+ this.runTestAppButton.Text = "Save && Run &Test App";
+ this.runTestAppButton.TextAlign = System.Drawing.ContentAlignment.MiddleRight;
+ this.runTestAppButton.UseVisualStyleBackColor = true;
+ this.runTestAppButton.Click += new System.EventHandler(this.RunTestAppButton_Click);
+ //
+ // settingsFileGroupBox
+ //
+ this.settingsFileGroupBox.Controls.Add(this.fileTextBox);
+ this.settingsFileGroupBox.Controls.Add(this.pathLabel);
+ this.settingsFileGroupBox.Controls.Add(this.createButton);
+ this.settingsFileGroupBox.Controls.Add(this.openButton);
+ this.settingsFileGroupBox.Location = new System.Drawing.Point(12, 33);
+ this.settingsFileGroupBox.Name = "settingsFileGroupBox";
+ this.settingsFileGroupBox.Size = new System.Drawing.Size(679, 57);
+ this.settingsFileGroupBox.TabIndex = 22;
+ this.settingsFileGroupBox.TabStop = false;
+ this.settingsFileGroupBox.Text = "Settings File";
+ //
+ // fileTextBox
+ //
+ this.fileTextBox.Location = new System.Drawing.Point(39, 21);
+ this.fileTextBox.Name = "fileTextBox";
+ this.fileTextBox.ReadOnly = true;
+ this.fileTextBox.Size = new System.Drawing.Size(494, 20);
+ this.fileTextBox.TabIndex = 3;
+ //
+ // pathLabel
+ //
+ this.pathLabel.AutoSize = true;
+ this.pathLabel.Location = new System.Drawing.Point(6, 24);
+ this.pathLabel.Name = "pathLabel";
+ this.pathLabel.Size = new System.Drawing.Size(32, 13);
+ this.pathLabel.TabIndex = 2;
+ this.pathLabel.Text = "Path:";
+ //
+ // createButton
+ //
+ this.createButton.Location = new System.Drawing.Point(608, 20);
+ this.createButton.Name = "createButton";
+ this.createButton.Size = new System.Drawing.Size(65, 23);
+ this.createButton.TabIndex = 1;
+ this.createButton.Text = "Create";
+ this.createButton.UseVisualStyleBackColor = true;
+ this.createButton.Click += new System.EventHandler(this.CreateButton_Click);
+ //
+ // openButton
+ //
+ this.openButton.Location = new System.Drawing.Point(542, 20);
+ this.openButton.Name = "openButton";
+ this.openButton.Size = new System.Drawing.Size(60, 23);
+ this.openButton.TabIndex = 0;
+ this.openButton.Text = "Open";
+ this.openButton.UseVisualStyleBackColor = true;
+ this.openButton.Click += new System.EventHandler(this.OpenButton_Click);
+ //
+ // createFileDialog
+ //
+ this.createFileDialog.FileName = "NBug";
+ this.createFileDialog.Filter = "Configuration File (.config)|*.config";
+ this.createFileDialog.Title = "Create New Configuration File";
+ //
+ // openFileDialog
+ //
+ this.openFileDialog.FileName = "NBug";
+ this.openFileDialog.Filter = "Configuration File (.config)|*.config";
+ //
+ // MainForm
+ //
+ this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F);
+ this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
+ this.ClientSize = new System.Drawing.Size(703, 494);
+ this.Controls.Add(this.settingsFileGroupBox);
+ this.Controls.Add(this.runTestAppButton);
+ this.Controls.Add(this.closeButton);
+ this.Controls.Add(this.saveButton);
+ this.Controls.Add(this.mainTabs);
+ this.Controls.Add(this.mainStatusStrip);
+ this.Controls.Add(this.mainMenuStrip);
+ this.FormBorderStyle = System.Windows.Forms.FormBorderStyle.FixedSingle;
+ this.Icon = ((System.Drawing.Icon)(resources.GetObject("$this.Icon")));
+ this.MaximizeBox = false;
+ this.Name = "MainForm";
+ this.StartPosition = System.Windows.Forms.FormStartPosition.CenterScreen;
+ this.Text = "NBug - Configurator";
+ this.FormClosing += new System.Windows.Forms.FormClosingEventHandler(this.MainForm_FormClosing);
+ this.mainStatusStrip.ResumeLayout(false);
+ this.mainStatusStrip.PerformLayout();
+ this.mainTabs.ResumeLayout(false);
+ this.generalTabPage.ResumeLayout(false);
+ this.nbugConfigurationGroupBox.ResumeLayout(false);
+ this.nbugConfigurationGroupBox.PerformLayout();
+ this.internalLoggerGroupBox.ResumeLayout(false);
+ this.internalLoggerGroupBox.PerformLayout();
+ this.reportSubmitterGroupBox.ResumeLayout(false);
+ this.reportSubmitterGroupBox.PerformLayout();
+ this.reportQueueGroupBox.ResumeLayout(false);
+ this.reportQueueGroupBox.PerformLayout();
+ this.reportingGroupBox.ResumeLayout(false);
+ this.reportingGroupBox.PerformLayout();
+ ((System.ComponentModel.ISupportInitialize)(this.sleepBeforeSendNumericUpDown)).EndInit();
+ ((System.ComponentModel.ISupportInitialize)(this.maxQueuedReportsNumericUpDown)).EndInit();
+ ((System.ComponentModel.ISupportInitialize)(this.stopReportingAfterNumericUpDown)).EndInit();
+ this.userInterfaceGroupBox.ResumeLayout(false);
+ this.userInterfaceGroupBox.PerformLayout();
+ this.advancedTabPage.ResumeLayout(false);
+ this.exceptionHandlingGroupBox.ResumeLayout(false);
+ this.exceptionHandlingGroupBox.PerformLayout();
+ this.submit1TabPage.ResumeLayout(false);
+ this.submit2TabPage.ResumeLayout(false);
+ this.submit3TabPage.ResumeLayout(false);
+ this.submit4TabPage.ResumeLayout(false);
+ this.submit5TabPage.ResumeLayout(false);
+ this.mainMenuStrip.ResumeLayout(false);
+ this.mainMenuStrip.PerformLayout();
+ this.settingsFileGroupBox.ResumeLayout(false);
+ this.settingsFileGroupBox.PerformLayout();
+ this.ResumeLayout(false);
+ this.PerformLayout();
+
+ }
+
+ #endregion
+
+ private System.Windows.Forms.StatusStrip mainStatusStrip;
+ private System.Windows.Forms.TabControl mainTabs;
+ private System.Windows.Forms.TabPage generalTabPage;
+ private System.Windows.Forms.TabPage submit1TabPage;
+ private System.Windows.Forms.ToolStripMenuItem fileToolStripMenuItem1;
+ private System.Windows.Forms.ToolStripMenuItem newToolStripMenuItem;
+ private System.Windows.Forms.ToolStripMenuItem openToolStripMenuItem;
+ private System.Windows.Forms.ToolStripSeparator toolStripSeparator;
+ private System.Windows.Forms.ToolStripMenuItem saveToolStripMenuItem;
+ private System.Windows.Forms.ToolStripMenuItem saveAsToolStripMenuItem;
+ private System.Windows.Forms.ToolStripSeparator toolStripSeparator1;
+ private System.Windows.Forms.ToolStripSeparator toolStripSeparator2;
+ private System.Windows.Forms.ToolStripMenuItem exitToolStripMenuItem;
+ private System.Windows.Forms.ToolStripMenuItem toolsToolStripMenuItem;
+ private System.Windows.Forms.ToolStripMenuItem helpToolStripMenuItem;
+ private System.Windows.Forms.ToolStripMenuItem onlineDocumentationToolStripMenuItem;
+ private System.Windows.Forms.ToolStripSeparator toolStripSeparator5;
+ private System.Windows.Forms.ToolStripMenuItem aboutToolStripMenuItem;
+ private System.Windows.Forms.MenuStrip mainMenuStrip;
+ private System.Windows.Forms.Button saveButton;
+ private System.Windows.Forms.ComboBox uiModeComboBox;
+ private System.Windows.Forms.Label uiModeLabel;
+ private System.Windows.Forms.ComboBox uiProviderComboBox;
+ private System.Windows.Forms.Label uiProviderLabel;
+ private System.Windows.Forms.NumericUpDown sleepBeforeSendNumericUpDown;
+ private System.Windows.Forms.Label sleepBeforeSendLabel;
+ private System.Windows.Forms.NumericUpDown maxQueuedReportsNumericUpDown;
+ private System.Windows.Forms.Label maxQueuedReportsLabel;
+ private System.Windows.Forms.Label sleepBeforeSendUnitLabel;
+ private System.Windows.Forms.NumericUpDown stopReportingAfterNumericUpDown;
+ private System.Windows.Forms.Label stopReportingAfterLabel;
+ private System.Windows.Forms.Label stopReportingAfterUnitLabel;
+ private System.Windows.Forms.ComboBox storagePathComboBox;
+ private System.Windows.Forms.Label storagePathLabel;
+ private System.Windows.Forms.Button closeButton;
+ private System.Windows.Forms.TextBox customStoragePathTextBox;
+ private System.Windows.Forms.Label customPathLabel;
+ private System.Windows.Forms.Label customPathTipLabel;
+ private System.Windows.Forms.ToolTip mainToolTips;
+ private System.Windows.Forms.HelpProvider mainHelpProvider;
+ private System.Windows.Forms.Button runTestAppButton;
+ private System.Windows.Forms.GroupBox settingsFileGroupBox;
+ private System.Windows.Forms.TextBox fileTextBox;
+ private System.Windows.Forms.Label pathLabel;
+ private System.Windows.Forms.Button createButton;
+ private System.Windows.Forms.Button openButton;
+ private System.Windows.Forms.ToolStripMenuItem externalToolStripMenuItem;
+ private System.Windows.Forms.ToolStripMenuItem discussionForumToolStripMenuItem;
+ private System.Windows.Forms.ToolStripMenuItem projectHomeToolStripMenuItem;
+ private System.Windows.Forms.ToolStripMenuItem bugTrackerToolStripMenuItem;
+ private System.Windows.Forms.ToolStripMenuItem testAppToolStripMenuItem;
+ private System.Windows.Forms.ToolStripMenuItem embeddedToolStripMenuItem;
+ private System.Windows.Forms.ToolStripMenuItem importToolStripMenuItem;
+ private System.Windows.Forms.SaveFileDialog createFileDialog;
+ private System.Windows.Forms.OpenFileDialog openFileDialog;
+ private SubmitPanels.PanelLoader panelLoader1;
+ private System.Windows.Forms.TabPage submit2TabPage;
+ private System.Windows.Forms.TabPage submit3TabPage;
+ private System.Windows.Forms.TabPage submit4TabPage;
+ private System.Windows.Forms.TabPage submit5TabPage;
+ private SubmitPanels.PanelLoader panelLoader2;
+ private SubmitPanels.PanelLoader panelLoader3;
+ private SubmitPanels.PanelLoader panelLoader4;
+ private SubmitPanels.PanelLoader panelLoader5;
+ private System.Windows.Forms.ToolStripStatusLabel status;
+ private System.Windows.Forms.CheckBox encryptConnectionStringsCheckBox;
+ private System.Windows.Forms.GroupBox reportingGroupBox;
+ private System.Windows.Forms.Label miniDumpTypeLabel;
+ private System.Windows.Forms.ComboBox miniDumpTypeComboBox;
+ private System.Windows.Forms.GroupBox userInterfaceGroupBox;
+ private System.Windows.Forms.GroupBox internalLoggerGroupBox;
+ private System.Windows.Forms.CheckBox writeLogToDiskCheckBox;
+ private System.Windows.Forms.GroupBox reportSubmitterGroupBox;
+ private System.Windows.Forms.GroupBox reportQueueGroupBox;
+ private System.Windows.Forms.CheckBox writeNetworkTraceToFileCheckBox;
+ private System.Windows.Forms.Label networkTraceWarningLabel;
+ private System.Windows.Forms.Button previewButton;
+ private System.Windows.Forms.TabPage advancedTabPage;
+ private System.Windows.Forms.Label warningLabel;
+ private System.Windows.Forms.GroupBox exceptionHandlingGroupBox;
+ private System.Windows.Forms.Label exitApplicationImmediatelyWarningLabel;
+ private System.Windows.Forms.CheckBox handleProcessCorruptedStateExceptionsCheckBox;
+ private System.Windows.Forms.CheckBox exitApplicationImmediatelyCheckBox;
+ private System.Windows.Forms.GroupBox nbugConfigurationGroupBox;
+ private System.Windows.Forms.CheckBox releaseModeCheckBox;
+
+ }
+}
+
diff --git a/NBug.Configurator/MainForm.cs b/NBug.Configurator/MainForm.cs
new file mode 100644
index 0000000..87faca3
--- /dev/null
+++ b/NBug.Configurator/MainForm.cs
@@ -0,0 +1,461 @@
+// --------------------------------------------------------------------------------------------------------------------
+//
+// Copyright © 2010 - 2011 Teoman Soygul. Licensed under LGPLv3 (http://www.gnu.org/licenses/lgpl.html).
+//
+// --------------------------------------------------------------------------------------------------------------------
+
+namespace NBug.Configurator
+{
+ /* Dear maintainer:
+ *
+ * Once you are done trying to 'optimize' this file, and have realized what a terrible mistake that was,
+ * please increment the following counter as a warning to the next guy:
+ *
+ * total_hours_wasted_here = 20
+ */
+
+ using System;
+ using System.Diagnostics;
+ using System.IO;
+ using System.Windows.Forms;
+
+ using NBug.Configurator.SubmitPanels;
+ using NBug.Enums;
+
+ public partial class MainForm : Form
+ {
+ private FileStream settingsFile;
+
+ public MainForm()
+ {
+ InitializeComponent();
+
+ this.openFileDialog.InitialDirectory = Environment.CurrentDirectory;
+ this.createFileDialog.InitialDirectory = Environment.CurrentDirectory;
+ }
+
+ ///
+ /// Enables disabled controls and fills in combo boxes using related enumerations. Resets all values to defaults.
+ ///
+ private void InitializeControls()
+ {
+ this.uiModeComboBox.Items.Clear();
+ foreach (UIMode value in Enum.GetValues(typeof(UIMode)))
+ {
+ this.uiModeComboBox.Items.Add(value);
+ }
+
+ this.uiProviderComboBox.Items.Clear();
+ foreach (UIProvider value in Enum.GetValues(typeof(UIProvider)))
+ {
+ this.uiProviderComboBox.Items.Add(value);
+ }
+
+ this.miniDumpTypeComboBox.Items.Clear();
+ foreach (MiniDumpType value in Enum.GetValues(typeof(MiniDumpType)))
+ {
+ this.miniDumpTypeComboBox.Items.Add(value);
+ }
+
+ this.storagePathComboBox.Items.Clear();
+ foreach (StoragePath value in Enum.GetValues(typeof(StoragePath)))
+ {
+ this.storagePathComboBox.Items.Add(value);
+ }
+
+ this.panelLoader1.UnloadPanel();
+ this.panelLoader2.UnloadPanel();
+ this.panelLoader3.UnloadPanel();
+ this.panelLoader4.UnloadPanel();
+ this.panelLoader5.UnloadPanel();
+
+ this.sleepBeforeSendNumericUpDown.Maximum = decimal.MaxValue;
+ this.maxQueuedReportsNumericUpDown.Maximum = decimal.MaxValue;
+ this.stopReportingAfterNumericUpDown.Maximum = decimal.MaxValue;
+
+ this.mainTabs.Enabled = true;
+ this.mainTabs.SelectedIndex = 0;
+ this.runTestAppButton.Enabled = true;
+ this.saveButton.Enabled = true;
+ }
+
+ ///
+ /// Loads the settings file or loads defaults is settings file is empty or invalid.
+ ///
+ /// Force creating of new file. Overrides existing file by default.
+ private void LoadSettingsFile(bool createNew)
+ {
+ this.settingsFile.Position = 0;
+ NBug.Properties.SettingsOverride.LoadCustomSettings(this.settingsFile);
+ this.InitializeControls();
+
+ this.fileTextBox.Text = createNew == false ? this.openFileDialog.FileName : this.createFileDialog.FileName;
+
+ // Read application settings
+ this.uiProviderComboBox.SelectedItem = Settings.UIProvider;
+ this.uiModeComboBox.SelectedItem = Settings.UIMode; // Should come after uiProviderComboBox = ...
+ this.miniDumpTypeComboBox.SelectedItem = Settings.MiniDumpType;
+ this.sleepBeforeSendNumericUpDown.Value = Settings.SleepBeforeSend;
+ this.maxQueuedReportsNumericUpDown.Value = Settings.MaxQueuedReports;
+ this.stopReportingAfterNumericUpDown.Value = Settings.StopReportingAfter;
+ this.writeLogToDiskCheckBox.Checked = Settings.WriteLogToDisk;
+ this.exitApplicationImmediatelyCheckBox.Checked = Settings.ExitApplicationImmediately;
+ this.handleProcessCorruptedStateExceptionsCheckBox.Checked = Settings.HandleProcessCorruptedStateExceptions;
+ this.releaseModeCheckBox.Checked = Settings.ReleaseMode;
+
+ if (Settings.StoragePath == StoragePath.Custom)
+ {
+ this.storagePathComboBox.SelectedItem = StoragePath.Custom;
+ this.customStoragePathTextBox.Text = Settings.StoragePath;
+ }
+ else
+ {
+ // Make sure that we're getting the enum value
+ this.storagePathComboBox.SelectedItem = (StoragePath)Settings.StoragePath;
+ }
+
+ if (Settings.Cipher != null && Settings.Cipher.Length != 0)
+ {
+ this.encryptConnectionStringsCheckBox.Checked = true;
+ }
+
+ if (this.settingsFile.Name.EndsWith("app.config"))
+ {
+ this.writeNetworkTraceToFileCheckBox.Enabled = true;
+ this.networkTraceWarningLabel.Enabled = true;
+
+ if (Settings.EnableNetworkTrace.HasValue)
+ {
+ this.writeNetworkTraceToFileCheckBox.Checked = Settings.EnableNetworkTrace.Value;
+ }
+ }
+
+ // Read connection strings)
+ if (!string.IsNullOrEmpty(Settings.Destination1))
+ {
+ this.panelLoader1.LoadPanel(Settings.Destination1);
+ }
+
+ if (!string.IsNullOrEmpty(Settings.Destination2))
+ {
+ this.panelLoader2.LoadPanel(Settings.Destination2);
+ }
+
+ if (!string.IsNullOrEmpty(Settings.Destination3))
+ {
+ this.panelLoader3.LoadPanel(Settings.Destination3);
+ }
+
+ if (!string.IsNullOrEmpty(Settings.Destination4))
+ {
+ this.panelLoader4.LoadPanel(Settings.Destination4);
+ }
+
+ if (!string.IsNullOrEmpty(Settings.Destination5))
+ {
+ this.panelLoader5.LoadPanel(Settings.Destination5);
+ }
+ }
+
+ private void SaveButton_Click(object sender, EventArgs e)
+ {
+ // Validate user provide settings
+ if (string.IsNullOrEmpty(this.uiProviderComboBox.Text))
+ {
+ MessageBox.Show(
+ "The 'User Interface > UI Provider' selection should not be left blank. Please select a value for the provider or set the UI Mode to Auto.",
+ "User Interface Provider is Left Blank",
+ MessageBoxButtons.OK,
+ MessageBoxIcon.Warning);
+ this.uiProviderComboBox.Focus();
+ return;
+ }
+
+ Settings.EnableNetworkTrace = this.writeNetworkTraceToFileCheckBox.Checked; // This should come before settings app config
+
+ // Save application settings
+ Settings.UIMode = (UIMode)this.uiModeComboBox.SelectedItem;
+ Settings.UIProvider = (UIProvider)this.uiProviderComboBox.SelectedItem;
+ Settings.MiniDumpType = (MiniDumpType)this.miniDumpTypeComboBox.SelectedItem;
+ Settings.SleepBeforeSend = Convert.ToInt32(this.sleepBeforeSendNumericUpDown.Value);
+ Settings.MaxQueuedReports = Convert.ToInt32(this.maxQueuedReportsNumericUpDown.Value);
+ Settings.StopReportingAfter = Convert.ToInt32(this.stopReportingAfterNumericUpDown.Value);
+ Settings.WriteLogToDisk = this.writeLogToDiskCheckBox.Checked;
+ Settings.HandleProcessCorruptedStateExceptions = this.handleProcessCorruptedStateExceptionsCheckBox.Checked;
+ Settings.ReleaseMode = this.releaseModeCheckBox.Checked;
+
+ if ((UIMode)this.uiModeComboBox.SelectedItem == UIMode.None)
+ {
+ Settings.ExitApplicationImmediately = this.exitApplicationImmediatelyCheckBox.Checked;
+ }
+
+ Settings.StoragePath = this.storagePathComboBox.Text == "Custom" ? this.customStoragePathTextBox.Text : this.storagePathComboBox.Text;
+
+ // Save connection strings)
+ if (this.panelLoader1.Controls.Count == 2)
+ {
+ var str = ((ISubmitPanel)this.panelLoader1.Controls[0]).ConnectionString;
+ if (string.IsNullOrEmpty(str))
+ {
+ return;
+ }
+ else
+ {
+ Settings.Destination1 = str;
+ }
+ }
+
+ if (this.panelLoader2.Controls.Count == 2)
+ {
+ var str = ((ISubmitPanel)this.panelLoader2.Controls[0]).ConnectionString;
+ if (string.IsNullOrEmpty(str))
+ {
+ return;
+ }
+ else
+ {
+ Settings.Destination2 = str;
+ }
+ }
+
+ if (this.panelLoader3.Controls.Count == 2)
+ {
+ var str = ((ISubmitPanel)this.panelLoader3.Controls[0]).ConnectionString;
+ if (string.IsNullOrEmpty(str))
+ {
+ return;
+ }
+ else
+ {
+ Settings.Destination3 = str;
+ }
+ }
+
+ if (this.panelLoader4.Controls.Count == 2)
+ {
+ var str = ((ISubmitPanel)this.panelLoader4.Controls[0]).ConnectionString;
+ if (string.IsNullOrEmpty(str))
+ {
+ return;
+ }
+ else
+ {
+ Settings.Destination4 = str;
+ }
+ }
+
+ if (this.panelLoader5.Controls.Count == 2)
+ {
+ var str = ((ISubmitPanel)this.panelLoader5.Controls[0]).ConnectionString;
+ if (string.IsNullOrEmpty(str))
+ {
+ return;
+ }
+ else
+ {
+ Settings.Destination5 = str;
+ }
+ }
+
+ this.settingsFile.Position = 0;
+ NBug.Properties.SettingsOverride.SaveCustomSettings(this.settingsFile, this.encryptConnectionStringsCheckBox.Checked);
+ this.status.Text = "Configuration file successfully saved. Please test your configuration.";
+ }
+
+ private void SaveChangesWarning()
+ {
+ if (this.settingsFile != null)
+ {
+ // ToDo: display some sort of a warning for user to save the changes or roll back
+ this.settingsFile.Close();
+ }
+ }
+
+ private void MainForm_FormClosing(object sender, FormClosingEventArgs e)
+ {
+ this.SaveChangesWarning();
+ }
+
+ private void CloseButton_Click(object sender, EventArgs e)
+ {
+ this.Close();
+ }
+
+ private void StoragePathComboBox_SelectedValueChanged(object sender, EventArgs e)
+ {
+ if ((StoragePath)this.storagePathComboBox.SelectedItem == StoragePath.Custom)
+ {
+ this.customStoragePathTextBox.Enabled = true;
+ }
+ else
+ {
+ this.customStoragePathTextBox.Enabled = false;
+ this.customStoragePathTextBox.Text = string.Empty;
+ }
+ }
+
+ private void CreateButton_Click(object sender, EventArgs e)
+ {
+ if (this.createFileDialog.ShowDialog() == DialogResult.OK)
+ {
+ this.SaveChangesWarning();
+ this.settingsFile = new FileStream(this.createFileDialog.FileName, FileMode.Create, FileAccess.ReadWrite, FileShare.ReadWrite);
+ this.LoadSettingsFile(true);
+ }
+ }
+
+ private void OpenButton_Click(object sender, EventArgs e)
+ {
+ if (this.openFileDialog.ShowDialog() == DialogResult.OK)
+ {
+ this.SaveChangesWarning();
+ File.SetAttributes(this.openFileDialog.FileName, FileAttributes.Normal);
+ this.settingsFile = new FileStream(this.openFileDialog.FileName, FileMode.Open, FileAccess.ReadWrite, FileShare.ReadWrite);
+ this.LoadSettingsFile(false);
+ }
+ }
+
+ private void RunTestAppButton_Click(object sender, EventArgs e)
+ {
+ this.SaveButton_Click(this, null);
+
+ string testApp;
+
+ if ((UIProvider)this.uiProviderComboBox.SelectedItem == UIProvider.Console)
+ {
+ testApp = "NBug.Examples.Console.exe";
+ }
+ else if ((UIProvider)this.uiProviderComboBox.SelectedItem == UIProvider.WinForms)
+ {
+ testApp = "NBug.Examples.WinForms.exe";
+ }
+ else if ((UIProvider)this.uiProviderComboBox.SelectedItem == UIProvider.WPF)
+ {
+ testApp = "NBug.Examples.WPF.exe";
+ }
+ else
+ {
+ testApp = "NBug.Examples.WinForms.exe";
+ }
+
+ string path = Path.Combine(Path.GetDirectoryName(System.Reflection.Assembly.GetExecutingAssembly().Location), testApp);
+
+ if (!File.Exists(path))
+ {
+ path = Path.Combine(Path.GetDirectoryName(System.Reflection.Assembly.GetExecutingAssembly().Location), "NBug.Examples.WinForms.exe");
+ }
+
+ if (!File.Exists(path))
+ {
+ MessageBox.Show("Test application cannot be found at location: " + path);
+ }
+ else
+ {
+ Process.Start(path, "\"" + this.settingsFile.Name + "\"");
+ }
+ }
+
+ private void ProjectHomeToolStripMenuItem_Click(object sender, EventArgs e)
+ {
+ Process.Start(this.projectHomeToolStripMenuItem.Tag.ToString());
+ }
+
+ private void OnlineDocumentationToolStripMenuItem_Click(object sender, EventArgs e)
+ {
+ Process.Start(this.onlineDocumentationToolStripMenuItem.Tag.ToString());
+ }
+
+ private void DiscussionForumToolStripMenuItem_Click(object sender, EventArgs e)
+ {
+ Process.Start(this.discussionForumToolStripMenuItem.Tag.ToString());
+ }
+
+ private void BugTrackerToolStripMenuItem_Click(object sender, EventArgs e)
+ {
+ Process.Start(this.bugTrackerToolStripMenuItem.Tag.ToString());
+ }
+
+ private void AboutToolStripMenuItem_Click(object sender, EventArgs e)
+ {
+ using (var about = new AboutBox())
+ {
+ about.ShowDialog();
+ }
+ }
+
+ private void ExternalToolStripMenuItem_Click(object sender, EventArgs e)
+ {
+ this.createFileDialog.FileName = "NBug.config";
+ this.CreateButton_Click(this, null);
+ }
+
+ private void EmbeddedToolStripMenuItem_Click(object sender, EventArgs e)
+ {
+ this.createFileDialog.FileName = "app.config";
+ this.CreateButton_Click(this, null);
+ }
+
+ private void UIModeComboBox_SelectedIndexChanged(object sender, EventArgs e)
+ {
+ if ((UIMode)this.uiModeComboBox.SelectedItem == UIMode.Auto)
+ {
+ this.uiProviderComboBox.Enabled = false;
+
+ if (!this.uiProviderComboBox.Items.Contains(UIProvider.Auto))
+ {
+ this.uiProviderComboBox.Items.Add(UIProvider.Auto);
+ }
+
+ this.uiProviderComboBox.SelectedItem = UIProvider.Auto;
+
+ // Revert back the settings for the "Handle Exceptions" check box
+ this.exitApplicationImmediatelyCheckBox.Checked = Settings.ExitApplicationImmediately;
+ this.exitApplicationImmediatelyCheckBox.Enabled = false;
+ this.exitApplicationImmediatelyWarningLabel.Enabled = false;
+ }
+ else if ((UIMode)this.uiModeComboBox.SelectedItem == UIMode.None)
+ {
+ this.uiProviderComboBox.SelectedItem = null;
+ this.previewButton.Enabled = false;
+
+ // Enable the "Handle Exceptions" check box as it is valid for UIMode.None
+ this.exitApplicationImmediatelyCheckBox.Enabled = true;
+ this.exitApplicationImmediatelyWarningLabel.Enabled = true;
+ }
+ else
+ {
+ this.uiProviderComboBox.Enabled = true;
+ this.uiProviderComboBox.Items.Remove(UIProvider.Auto);
+
+ // Revert back the settings for the "Handle Exceptions" check box
+ this.exitApplicationImmediatelyCheckBox.Checked = Settings.ExitApplicationImmediately;
+ this.exitApplicationImmediatelyCheckBox.Enabled = false;
+ this.exitApplicationImmediatelyWarningLabel.Enabled = false;
+ }
+ }
+
+ private void PreviewButton_Click(object sender, EventArgs e)
+ {
+ using (var preview = new PreviewForm())
+ {
+ preview.ShowDialog((UIMode)this.uiModeComboBox.SelectedItem, (UIProvider)this.uiProviderComboBox.SelectedItem);
+ }
+ }
+
+ private void UIProviderComboBox_SelectedIndexChanged(object sender, EventArgs e)
+ {
+ if (this.uiProviderComboBox.SelectedItem == null)
+ {
+ this.previewButton.Enabled = false;
+ }
+ else if ((UIProvider)this.uiProviderComboBox.SelectedItem == UIProvider.Auto)
+ {
+ this.previewButton.Enabled = false;
+ }
+ else
+ {
+ this.previewButton.Enabled = true;
+ }
+ }
+ }
+}
diff --git a/NBug.Configurator/MainForm.resx b/NBug.Configurator/MainForm.resx
new file mode 100644
index 0000000..b177f1e
--- /dev/null
+++ b/NBug.Configurator/MainForm.resx
@@ -0,0 +1,257 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ text/microsoft-resx
+
+
+ 2.0
+
+
+ System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089
+
+
+ System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089
+
+
+ 143, 17
+
+
+ 273, 17
+
+
+ Indicates whether to handled exceptions even in a corrupted process via the
+'HandleProcessCorruptedStateExceptions' flag. The default value for this is false since
+generating bug reports for a corrupted process may not be successful, so use with caution.
+
+
+ Indicates whether to exit application after handling an unhandled exception or sending error report.
+This value is disregarded for anything but UIMode.None. For UIMode.None, you can choose not to exit
+application which will result in 'Windows Error Reporting' (aka Dr. Watson) window to kick in.
+This may also be helpful in using NBug library as a simple unhandled exception logger facility, just
+to log and submit exceptions but does not interfere with the application execution flow.
+
+
+ Warning: Do not change the below default values before fully reading and comprehending the documentation (Help Menu > Online Documentation) as the supplied defaults are good for most configurations. Hover your mouse over each item to get a quick tooltip explaining the item's functionality.
+
+
+ Gets or sets a value indicating whether to enable release mode for NBug library. In release mode, internal developer UI is not displayed and
+unhandled exceptions are only handled if there is no debugger attached to the process. Once properly configured and verified to be working
+as intended, NBug release mode should be enabled to be able properly to use Visual Studio debugger, without NBug trying to handle exceptions
+before Visual Studio does.
+
+
+ Indicates whether to write "NLog.log" file to disk which contains internal log entries.
+The file will be place in the same directory that NBug.dll file resides (most probably
+right next to your application's executable file).
+
+
+ Encrypts the connections strings defined via the ‘Submitter #x’ panels. This helps protect sensitive
+info like SMTP server connection details, bug tracker API key, etc.
+Note: Anybody with proficiency in .NET crypto classes can easily decrypt the connection strings so
+use this to hide the information from plain sight only.
+
+
+ Time in seconds that report dispatcher waits before starting to submit queued bug reports.
+Dispatcher initializes as soon as the application is run but waits for given number of
+seconds so that it won't slow down the application startup.
+
+
+ The UI mode to be displayed when an exception is caught. ‘Auto’ mode determines the best settings for you on the run and it suits most of the scenarios.
+Selecting ‘None’ will display no UI at all to the user and it will enable you to also turn off ‘Advanced > Handled Exceptions’ selection.
+Use other settings in combination with proper UI provider, which also enables the UI preview.
+
+
+ Selects one of the available UI providers in combination with the proper UI mode. Don’t forget to preview your selection if you change this.
+Note that the Auto mode decides the best UI provider on the run for you so it is preferable to set both UIMode & UIProvider to Auto
+if you want to get best result automatically.
+
+
+
+
+ iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8
+ YQUAAAAgY0hSTQAAeiYAAICEAAD6AAAAgOgAAHUwAADqYAAAOpgAABdwnLpRPAAAAQ9JREFUOE+t09lq
+ wkAUBmBfyr5DfY32jaReSOmFCyKCgkKLFrVUBZeKiEbshqRuaNw1xiXmLxMJBJ0Zc+GBw9zMfDPnHMZm
+ u1ZE35s4zXCqjmC8Al+sgHLjD9y7yGFWPIbecOO45yORtMAEHnxxJHL1IyKI9JeEXqtMwOl50Q8bSS0l
+ 8PzBBPbqAQQxICrgjeapgKZpkJUdBmNZB+y3d/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UE
+ D/91BA//dQQP/3QBDf9/FiHPkTpCm3cJEvyKKTNclDxEpYAYI26HJS59tnuBa9i5vQiHJi8zcQAKNnUE
+ DzZ1BA9hdQQP/3UED/91BA//dQQP/3IACf9wAAb/jC03R9WztinMpakcx5ugIAAAAAAAAAAAAAAAAAAA
+ AAAAAAAAdQQPLnUED/91BA//dQQP/3UED/91BA//dQMO/3ICCkEAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
+ AAAAAAAAAAAAAHEACTd1BA//dQQP/3UED/91BA//dQQP/3UED/9xAAhDAAAAAAAAAAAAAAAAAAAAAAAA
+ AAAAAAAAAAAAAAAAAACHJi81cwAL/3QDDv91Aw7/dQMO/3UDDv9yAAr/hiQtQgAAAAAAAAAAAAAAAAAA
+ AAAAAAAAAAAAAAAAAAAAAAAA7d7gDJdDS7F0Bg7sdwgT7XcIE+10BQ3skjpCuurZ2xEAAAAAAAAAAAAA
+ AAAAAAAA8A8AAPAPAADwDwAA8A8AAAAAAAAAAAAAAEAAAABwAAAAcAAAAEAAAAAAAAAAAQAA8A8AAPAP
+ AADwDwAA8A8AAA==
+
+
+
\ No newline at end of file
diff --git a/NBug.Configurator/NBug.Configurator.csproj b/NBug.Configurator/NBug.Configurator.csproj
new file mode 100644
index 0000000..ff33844
--- /dev/null
+++ b/NBug.Configurator/NBug.Configurator.csproj
@@ -0,0 +1,241 @@
+
+
+
+ Debug
+ x86
+ 8.0.30703
+ 2.0
+ {84D5B54B-7546-44C5-95F7-CDDBFB3F31B3}
+ WinExe
+ Properties
+ NBug.Configurator
+ NBug.Configurator
+ v4.0
+ Client
+ 512
+
+
+
+
+
+
+
+
+ http://localhost/NBug.Configurator/
+ true
+ Web
+ true
+ Foreground
+ 7
+ Days
+ false
+ false
+ true
+ 0
+ 1.0.0.%2a
+ true
+ false
+ true
+
+
+ true
+
+
+ ..\Signing.snk
+
+
+ ..\NBug\resources\icon.ico
+
+
+ true
+ bin\Debug\
+ DEBUG;TRACE
+ true
+ full
+ AnyCPU
+ bin\Debug\NBug.Configurator.exe.CodeAnalysisLog.xml
+ true
+ GlobalSuppressions.cs
+ prompt
+ AllRules.ruleset
+ ;C:\Program Files\Microsoft Visual Studio 10.0\Team Tools\Static Analysis Tools\\Rule Sets
+ true
+ ;C:\Program Files\Microsoft Visual Studio 10.0\Team Tools\Static Analysis Tools\FxCop\\Rules
+ true
+
+
+ bin\Release\
+ TRACE
+ true
+ pdbonly
+ AnyCPU
+ bin\Release\NBug.Configurator.exe.CodeAnalysisLog.xml
+ true
+ GlobalSuppressions.cs
+ prompt
+ MinimumRecommendedRules.ruleset
+ ;C:\Program Files\Microsoft Visual Studio 10.0\Team Tools\Static Analysis Tools\\Rule Sets
+ ;C:\Program Files\Microsoft Visual Studio 10.0\Team Tools\Static Analysis Tools\FxCop\\Rules
+ false
+ false
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Properties\GlobalAssemblyInfo.cs
+
+
+ Form
+
+
+ AboutBox.cs
+
+
+ Form
+
+
+ MainForm.cs
+
+
+ Form
+
+
+ PreviewForm.cs
+
+
+
+
+
+ UserControl
+
+
+ Ftp.cs
+
+
+ UserControl
+
+
+ Http.cs
+
+
+ UserControl
+
+
+ Mail.cs
+
+
+ UserControl
+
+
+ PanelLoader.cs
+
+
+ UserControl
+
+
+ Redmine.cs
+
+
+ AboutBox.cs
+
+
+ MainForm.cs
+
+
+ PreviewForm.cs
+
+
+ ResXFileCodeGenerator
+ Resources.Designer.cs
+ Designer
+
+
+ True
+ Resources.resx
+ True
+
+
+ Ftp.cs
+
+
+ Http.cs
+
+
+ Mail.cs
+
+
+ PanelLoader.cs
+
+
+ Redmine.cs
+
+
+
+ SettingsSingleFileGenerator
+ Settings.Designer.cs
+
+
+ True
+ Settings.settings
+ True
+
+
+
+
+ False
+ Microsoft .NET Framework 4 Client Profile %28x86 and x64%29
+ true
+
+
+ False
+ .NET Framework 3.5 SP1 Client Profile
+ false
+
+
+ False
+ .NET Framework 3.5 SP1
+ false
+
+
+ False
+ Windows Installer 3.1
+ true
+
+
+
+
+ {62CED1D5-F603-40DE-8BF5-3E49D3A392F4}
+ NBug
+
+
+
+
+
+
+
+
+
+
+
+ if $(ConfigurationName)==Release copy "$(TargetPath)" "$(SolutionDir)packages\NBug\tools" /Y
+if $(ConfigurationName)==Release copy "$(TargetDir)$(TargetName).pdb" "$(SolutionDir)packages\NBug\tools" /Y
+
+
+
\ No newline at end of file
diff --git a/NBug.Configurator/PreviewForm.Designer.cs b/NBug.Configurator/PreviewForm.Designer.cs
new file mode 100644
index 0000000..d896f4a
--- /dev/null
+++ b/NBug.Configurator/PreviewForm.Designer.cs
@@ -0,0 +1,91 @@
+namespace NBug.Configurator
+{
+ partial class PreviewForm
+ {
+ ///
+ /// Required designer variable.
+ ///
+ private System.ComponentModel.IContainer components = null;
+
+ ///
+ /// Clean up any resources being used.
+ ///
+ /// true if managed resources should be disposed; otherwise, false.
+ protected override void Dispose(bool disposing)
+ {
+ if (disposing && (components != null))
+ {
+ components.Dispose();
+ }
+ base.Dispose(disposing);
+ }
+
+ #region Windows Form Designer generated code
+
+ ///
+ /// Required method for Designer support - do not modify
+ /// the contents of this method with the code editor.
+ ///
+ private void InitializeComponent()
+ {
+ this.closeButton = new System.Windows.Forms.Button();
+ this.consoleOutputTextBox = new System.Windows.Forms.TextBox();
+ this.consoleOutputLabel = new System.Windows.Forms.Label();
+ this.SuspendLayout();
+ //
+ // closeButton
+ //
+ this.closeButton.Location = new System.Drawing.Point(321, 153);
+ this.closeButton.Name = "closeButton";
+ this.closeButton.Size = new System.Drawing.Size(58, 22);
+ this.closeButton.TabIndex = 0;
+ this.closeButton.Text = "&Close";
+ this.closeButton.UseVisualStyleBackColor = true;
+ this.closeButton.Click += new System.EventHandler(this.CloseButton_Click);
+ //
+ // consoleOutputTextBox
+ //
+ this.consoleOutputTextBox.BackColor = System.Drawing.Color.Black;
+ this.consoleOutputTextBox.Font = new System.Drawing.Font("Microsoft Sans Serif", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
+ this.consoleOutputTextBox.ForeColor = System.Drawing.Color.White;
+ this.consoleOutputTextBox.Location = new System.Drawing.Point(12, 25);
+ this.consoleOutputTextBox.Multiline = true;
+ this.consoleOutputTextBox.Name = "consoleOutputTextBox";
+ this.consoleOutputTextBox.ReadOnly = true;
+ this.consoleOutputTextBox.Size = new System.Drawing.Size(367, 122);
+ this.consoleOutputTextBox.TabIndex = 1;
+ //
+ // consoleOutputLabel
+ //
+ this.consoleOutputLabel.AutoSize = true;
+ this.consoleOutputLabel.Location = new System.Drawing.Point(12, 9);
+ this.consoleOutputLabel.Name = "consoleOutputLabel";
+ this.consoleOutputLabel.Size = new System.Drawing.Size(83, 13);
+ this.consoleOutputLabel.TabIndex = 2;
+ this.consoleOutputLabel.Text = "Console Output:";
+ //
+ // PreviewForm
+ //
+ this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F);
+ this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
+ this.ClientSize = new System.Drawing.Size(391, 181);
+ this.Controls.Add(this.consoleOutputLabel);
+ this.Controls.Add(this.consoleOutputTextBox);
+ this.Controls.Add(this.closeButton);
+ this.FormBorderStyle = System.Windows.Forms.FormBorderStyle.FixedToolWindow;
+ this.Name = "PreviewForm";
+ this.ShowIcon = false;
+ this.StartPosition = System.Windows.Forms.FormStartPosition.CenterParent;
+ this.Text = "Preview";
+ this.ResumeLayout(false);
+ this.PerformLayout();
+
+ }
+
+ #endregion
+
+ private System.Windows.Forms.Button closeButton;
+ private System.Windows.Forms.TextBox consoleOutputTextBox;
+ private System.Windows.Forms.Label consoleOutputLabel;
+ }
+}
\ No newline at end of file
diff --git a/NBug.Configurator/PreviewForm.cs b/NBug.Configurator/PreviewForm.cs
new file mode 100644
index 0000000..e582440
--- /dev/null
+++ b/NBug.Configurator/PreviewForm.cs
@@ -0,0 +1,62 @@
+// --------------------------------------------------------------------------------------------------------------------
+//
+// Copyright © 2010 - 2011 Teoman Soygul. Licensed under LGPLv3 (http://www.gnu.org/licenses/lgpl.html).
+//
+// --------------------------------------------------------------------------------------------------------------------
+
+namespace NBug.Configurator
+{
+ using System;
+ using System.IO;
+ using System.Windows.Forms;
+
+ using NBug.Core.Reporting.Info;
+ using NBug.Core.UI.Console;
+ using NBug.Core.UI.WinForms;
+ using NBug.Core.UI.WPF;
+ using NBug.Core.Util.Serialization;
+ using NBug.Enums;
+
+ internal partial class PreviewForm : Form
+ {
+ public PreviewForm()
+ {
+ InitializeComponent();
+ }
+
+ internal void ShowDialog(UIMode uiMode, UIProvider uiProvider)
+ {
+ var exception = new SerializableException(new ArgumentException("Argument exception preview.", new Exception("Inner exception for argument exception.")));
+ var report = new Report(exception);
+
+ var consoleOut = new StringWriter();
+ Console.SetOut(consoleOut);
+
+ if (uiProvider == UIProvider.Console)
+ {
+ ConsoleUI.ShowDialog(uiMode, exception, report);
+ this.consoleOutputTextBox.Text = consoleOut.ToString();
+ this.ShowDialog();
+ }
+ else if (uiProvider == UIProvider.WinForms)
+ {
+ WinFormsUI.ShowDialog(uiMode, exception, report);
+ this.Close();
+ }
+ else if (uiProvider == UIProvider.WPF)
+ {
+ WPFUI.ShowDialog(uiMode, exception, report);
+ this.Close();
+ }
+ else
+ {
+ throw new ArgumentException("Parameter supplied for UIProvider argument is invalid.");
+ }
+ }
+
+ private void CloseButton_Click(object sender, EventArgs e)
+ {
+ this.Close();
+ }
+ }
+}
diff --git a/NBug.Configurator/PreviewForm.resx b/NBug.Configurator/PreviewForm.resx
new file mode 100644
index 0000000..29dcb1b
--- /dev/null
+++ b/NBug.Configurator/PreviewForm.resx
@@ -0,0 +1,120 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ text/microsoft-resx
+
+
+ 2.0
+
+
+ System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089
+
+
+ System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089
+
+
\ No newline at end of file
diff --git a/NBug.Configurator/Program.cs b/NBug.Configurator/Program.cs
new file mode 100644
index 0000000..0592a48
--- /dev/null
+++ b/NBug.Configurator/Program.cs
@@ -0,0 +1,25 @@
+// --------------------------------------------------------------------------------------------------------------------
+//
+// Copyright © 2010 - 2011 Teoman Soygul. Licensed under LGPLv3 (http://www.gnu.org/licenses/lgpl.html).
+//
+// --------------------------------------------------------------------------------------------------------------------
+
+namespace NBug.Configurator
+{
+ using System;
+ using System.Windows.Forms;
+
+ public static class Program
+ {
+ ///
+ /// The main entry point for the application.
+ ///
+ [STAThread]
+ public static void Main()
+ {
+ Application.EnableVisualStyles();
+ Application.SetCompatibleTextRenderingDefault(false);
+ Application.Run(new MainForm());
+ }
+ }
+}
diff --git a/NBug.Configurator/Properties/AssemblyInfo.cs b/NBug.Configurator/Properties/AssemblyInfo.cs
new file mode 100644
index 0000000..885f3ae
--- /dev/null
+++ b/NBug.Configurator/Properties/AssemblyInfo.cs
@@ -0,0 +1,29 @@
+using System.Reflection;
+using System.Runtime.CompilerServices;
+using System.Runtime.InteropServices;
+
+// General Information about an assembly is controlled through the following
+// set of attributes. Change these attribute values to modify the information
+// associated with an assembly.
+[assembly: AssemblyTitle("NBug.Configurator")]
+[assembly: AssemblyDescription("NBug Configurator Application created by Teoman Soygul.")]
+[assembly: AssemblyCulture("")]
+
+// Setting ComVisible to false makes the types in this assembly not visible
+// to COM components. If you need to access a type in this assembly from
+// COM, set the ComVisible attribute to true on that type.
+[assembly: ComVisible(false)]
+
+// The following GUID is for the ID of the typelib if this project is exposed to COM
+[assembly: Guid("ee735b48-b461-4d60-b02d-08434a21c447")]
+
+// Version information for an assembly consists of the following four values:
+//
+// Major Version
+// Minor Version
+// Build Number
+// Revision
+//
+// You can specify all the values or you can default the Build and Revision Numbers
+// by using the '*' as shown below:
+// [assembly: AssemblyVersion("1.0.*")]
\ No newline at end of file
diff --git a/NBug.Configurator/Properties/Resources.Designer.cs b/NBug.Configurator/Properties/Resources.Designer.cs
new file mode 100644
index 0000000..23c3574
--- /dev/null
+++ b/NBug.Configurator/Properties/Resources.Designer.cs
@@ -0,0 +1,91 @@
+//------------------------------------------------------------------------------
+//
+// This code was generated by a tool.
+// Runtime Version:4.0.30319.225
+//
+// Changes to this file may cause incorrect behavior and will be lost if
+// the code is regenerated.
+//
+//------------------------------------------------------------------------------
+
+namespace NBug.Configurator.Properties {
+ using System;
+
+
+ ///
+ /// A strongly-typed resource class, for looking up localized strings, etc.
+ ///
+ // This class was auto-generated by the StronglyTypedResourceBuilder
+ // class via a tool like ResGen or Visual Studio.
+ // To add or remove a member, edit your .ResX file then rerun ResGen
+ // with the /str option, or rebuild your VS project.
+ [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Resources.Tools.StronglyTypedResourceBuilder", "4.0.0.0")]
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
+ [global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()]
+ internal class Resources {
+
+ private static global::System.Resources.ResourceManager resourceMan;
+
+ private static global::System.Globalization.CultureInfo resourceCulture;
+
+ [global::System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Performance", "CA1811:AvoidUncalledPrivateCode")]
+ internal Resources() {
+ }
+
+ ///
+ /// Returns the cached ResourceManager instance used by this class.
+ ///
+ [global::System.ComponentModel.EditorBrowsableAttribute(global::System.ComponentModel.EditorBrowsableState.Advanced)]
+ internal static global::System.Resources.ResourceManager ResourceManager {
+ get {
+ if (object.ReferenceEquals(resourceMan, null)) {
+ global::System.Resources.ResourceManager temp = new global::System.Resources.ResourceManager("NBug.Configurator.Properties.Resources", typeof(Resources).Assembly);
+ resourceMan = temp;
+ }
+ return resourceMan;
+ }
+ }
+
+ ///
+ /// Overrides the current thread's CurrentUICulture property for all
+ /// resource lookups using this strongly typed resource class.
+ ///
+ [global::System.ComponentModel.EditorBrowsableAttribute(global::System.ComponentModel.EditorBrowsableState.Advanced)]
+ internal static global::System.Globalization.CultureInfo Culture {
+ get {
+ return resourceCulture;
+ }
+ set {
+ resourceCulture = value;
+ }
+ }
+
+ internal static System.Drawing.Bitmap help {
+ get {
+ object obj = ResourceManager.GetObject("help", resourceCulture);
+ return ((System.Drawing.Bitmap)(obj));
+ }
+ }
+
+ internal static System.Drawing.Bitmap Icon_16 {
+ get {
+ object obj = ResourceManager.GetObject("Icon_16", resourceCulture);
+ return ((System.Drawing.Bitmap)(obj));
+ }
+ }
+
+ internal static System.Drawing.Bitmap run {
+ get {
+ object obj = ResourceManager.GetObject("run", resourceCulture);
+ return ((System.Drawing.Bitmap)(obj));
+ }
+ }
+
+ internal static System.Drawing.Bitmap save {
+ get {
+ object obj = ResourceManager.GetObject("save", resourceCulture);
+ return ((System.Drawing.Bitmap)(obj));
+ }
+ }
+ }
+}
diff --git a/NBug.Configurator/Properties/Resources.resx b/NBug.Configurator/Properties/Resources.resx
new file mode 100644
index 0000000..3330aa5
--- /dev/null
+++ b/NBug.Configurator/Properties/Resources.resx
@@ -0,0 +1,198 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ text/microsoft-resx
+
+
+ 2.0
+
+
+ System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089
+
+
+ System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089
+
+
+
+
+ iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8
+ YQUAAAAgY0hSTQAAeiYAAICEAAD6AAAAgOgAAHUwAADqYAAAOpgAABdw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glypoQM6CJ1+N7brDdiZdwDa
+ 7CJkbitAetYu5OYfQMHuEqSk6SCURJoIN0z4YSVHhFh1IhoaLkOsUIMnVOBQSSkOHymDYU8xjMYqnDhp
+ wpnqWmh1ueDwpUhMyQB9uYn5sKoo4PLCHaVl5dPhESrwBAr09fXhaHkF1m9Ix9cvAxj49BEO2xCqa+qw
+ mi/HuoRUCIR0BhqNhtCbYfk08HkfIaEIWSVEW2srsnMKEC5Sore3Bw+7OvHq1UuUlh9HKCcCsXEbmP/C
+ TJRK5ZLAyVOndUw1DPUX65GZpcPqMCmam2/T+dxCR0cHiuhNMXFmn641SwJML9R4FA/FaTAU2cyV5omK
+ 4xUTZrN50mg0Tp47V+PJyMjy0vhvRoTD4ZaR6OgotoJFGxkZWaqI7ksoCZR0SiYlhRJD4S+2/Qfa32wa
+ WlUKlgAAAABJRU5ErkJggg==
+
+
+
\ No newline at end of file
diff --git a/NBug.Configurator/Properties/Settings.Designer.cs b/NBug.Configurator/Properties/Settings.Designer.cs
new file mode 100644
index 0000000..e83187b
--- /dev/null
+++ b/NBug.Configurator/Properties/Settings.Designer.cs
@@ -0,0 +1,26 @@
+//------------------------------------------------------------------------------
+//
+// This code was generated by a tool.
+// Runtime Version:4.0.30319.225
+//
+// Changes to this file may cause incorrect behavior and will be lost if
+// the code is regenerated.
+//
+//------------------------------------------------------------------------------
+
+namespace NBug.Configurator.Properties {
+
+
+ [global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()]
+ [global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.VisualStudio.Editors.SettingsDesigner.SettingsSingleFileGenerator", "10.0.0.0")]
+ internal sealed partial class Settings : global::System.Configuration.ApplicationSettingsBase {
+
+ private static Settings defaultInstance = ((Settings)(global::System.Configuration.ApplicationSettingsBase.Synchronized(new Settings())));
+
+ public static Settings Default {
+ get {
+ return defaultInstance;
+ }
+ }
+ }
+}
diff --git a/NBug.Configurator/Properties/Settings.settings b/NBug.Configurator/Properties/Settings.settings
new file mode 100644
index 0000000..abf36c5
--- /dev/null
+++ b/NBug.Configurator/Properties/Settings.settings
@@ -0,0 +1,7 @@
+
+
+
+
+
+
+
diff --git a/NBug.Configurator/SubmitPanels/ISubmitPanel.cs b/NBug.Configurator/SubmitPanels/ISubmitPanel.cs
new file mode 100644
index 0000000..0affaa9
--- /dev/null
+++ b/NBug.Configurator/SubmitPanels/ISubmitPanel.cs
@@ -0,0 +1,13 @@
+// --------------------------------------------------------------------------------------------------------------------
+//
+// Copyright © 2010 - 2011 Teoman Soygul. Licensed under LGPLv3 (http://www.gnu.org/licenses/lgpl.html).
+//
+// --------------------------------------------------------------------------------------------------------------------
+
+namespace NBug.Configurator.SubmitPanels
+{
+ internal interface ISubmitPanel
+ {
+ string ConnectionString { get; set; }
+ }
+}
diff --git a/NBug.Configurator/SubmitPanels/PanelLoader.Designer.cs b/NBug.Configurator/SubmitPanels/PanelLoader.Designer.cs
new file mode 100644
index 0000000..8da7ee4
--- /dev/null
+++ b/NBug.Configurator/SubmitPanels/PanelLoader.Designer.cs
@@ -0,0 +1,98 @@
+namespace NBug.Configurator.SubmitPanels
+{
+ partial class PanelLoader
+ {
+ ///
+ /// Required designer variable.
+ ///
+ private System.ComponentModel.IContainer components = null;
+
+ ///
+ /// Clean up any resources being used.
+ ///
+ /// true if managed resources should be disposed; otherwise, false.
+ protected override void Dispose(bool disposing)
+ {
+ if (disposing && (components != null))
+ {
+ components.Dispose();
+ }
+ base.Dispose(disposing);
+ }
+
+ #region Component Designer generated code
+
+ ///
+ /// Required method for Designer support - do not modify
+ /// the contents of this method with the code editor.
+ ///
+ private void InitializeComponent()
+ {
+ this.selectorPanel = new System.Windows.Forms.Panel();
+ this.submitComboBox = new System.Windows.Forms.ComboBox();
+ this.submitLabel = new System.Windows.Forms.Label();
+ this.selectorPanel.SuspendLayout();
+ this.SuspendLayout();
+ //
+ // selectorPanel
+ //
+ this.selectorPanel.Controls.Add(this.submitComboBox);
+ this.selectorPanel.Controls.Add(this.submitLabel);
+ this.selectorPanel.Dock = System.Windows.Forms.DockStyle.Top;
+ this.selectorPanel.Location = new System.Drawing.Point(10, 0);
+ this.selectorPanel.Name = "selectorPanel";
+ this.selectorPanel.Size = new System.Drawing.Size(650, 45);
+ this.selectorPanel.TabIndex = 2;
+ //
+ // submitComboBox
+ //
+ this.submitComboBox.DropDownStyle = System.Windows.Forms.ComboBoxStyle.DropDownList;
+ this.submitComboBox.FormattingEnabled = true;
+ this.submitComboBox.Items.AddRange(new object[] {
+ "None",
+ "E-Mail",
+ "Redmine Issue Tracker",
+ "FTP",
+ "HTTP"});
+ this.submitComboBox.Location = new System.Drawing.Point(72, 9);
+ this.submitComboBox.Name = "submitComboBox";
+ this.submitComboBox.Size = new System.Drawing.Size(166, 21);
+ this.submitComboBox.TabIndex = 3;
+ this.submitComboBox.SelectedIndexChanged += new System.EventHandler(this.SubmitComboBox_SelectedIndexChanged);
+ //
+ // submitLabel
+ //
+ this.submitLabel.AutoSize = true;
+ this.submitLabel.Font = new System.Drawing.Font("Microsoft Sans Serif", 8.25F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
+ this.submitLabel.Location = new System.Drawing.Point(-2, 12);
+ this.submitLabel.Name = "submitLabel";
+ this.submitLabel.Size = new System.Drawing.Size(68, 13);
+ this.submitLabel.TabIndex = 2;
+ this.submitLabel.Text = "Submit To:";
+ //
+ // PanelLoader
+ //
+ this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F);
+ this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
+ this.AutoScroll = true;
+ this.AutoValidate = System.Windows.Forms.AutoValidate.EnablePreventFocusChange;
+ this.Controls.Add(this.selectorPanel);
+ this.Name = "PanelLoader";
+ this.Padding = new System.Windows.Forms.Padding(10, 0, 0, 0);
+ this.Size = new System.Drawing.Size(660, 294);
+ this.selectorPanel.ResumeLayout(false);
+ this.selectorPanel.PerformLayout();
+ this.ResumeLayout(false);
+
+ }
+
+ #endregion
+
+ private System.Windows.Forms.Panel selectorPanel;
+ private System.Windows.Forms.ComboBox submitComboBox;
+ private System.Windows.Forms.Label submitLabel;
+
+
+
+ }
+}
diff --git a/NBug.Configurator/SubmitPanels/PanelLoader.cs b/NBug.Configurator/SubmitPanels/PanelLoader.cs
new file mode 100644
index 0000000..02180d8
--- /dev/null
+++ b/NBug.Configurator/SubmitPanels/PanelLoader.cs
@@ -0,0 +1,99 @@
+// --------------------------------------------------------------------------------------------------------------------
+//
+// Copyright © 2010 - 2011 Teoman Soygul. Licensed under LGPLv3 (http://www.gnu.org/licenses/lgpl.html).
+//
+// --------------------------------------------------------------------------------------------------------------------
+
+namespace NBug.Configurator.SubmitPanels
+{
+ using System;
+ using System.Windows.Forms;
+
+ using NBug.Core.Submission;
+
+ public partial class PanelLoader : UserControl
+ {
+ private string connString;
+ private string settingsLoadedProtocolType;
+
+ public PanelLoader()
+ {
+ InitializeComponent();
+ this.submitComboBox.SelectedIndex = 0;
+ }
+
+ public void LoadPanel(string connectionString)
+ {
+ this.connString = connectionString;
+ var protocol = (Protocols)Enum.Parse(typeof(Protocols), Protocol.Parse(connectionString)["Type"], true);
+
+ if (protocol == Protocols.Mail || protocol.ToString().ToLower() == "email" || protocol.ToString().ToLower() == "e-mail")
+ {
+ this.submitComboBox.SelectedItem = "E-Mail";
+ }
+ else if (protocol == Protocols.Redmine)
+ {
+ this.submitComboBox.SelectedItem = "Redmine Issue Tracker";
+ }
+ else if (protocol == Protocols.FTP)
+ {
+ this.submitComboBox.SelectedItem = "FTP";
+ }
+ else if (protocol == Protocols.HTTP)
+ {
+ this.submitComboBox.SelectedItem = "HTTP";
+ }
+ else
+ {
+ MessageBox.Show("Undefined protocol type was selected. This is an internal error, please notify the developers.");
+ }
+
+ this.settingsLoadedProtocolType = this.submitComboBox.Text;
+
+ if (this.Controls.Count == 2)
+ {
+ ((ISubmitPanel)this.Controls[0]).ConnectionString = connectionString;
+ }
+ }
+
+ public void UnloadPanel()
+ {
+ this.submitComboBox.SelectedItem = "None";
+ }
+
+ private void SubmitComboBox_SelectedIndexChanged(object sender, EventArgs e)
+ {
+ if (this.Controls.Count == 2)
+ {
+ this.Controls.RemoveAt(0);
+ }
+
+ switch (this.submitComboBox.SelectedItem.ToString())
+ {
+ case "E-Mail":
+ this.Controls.Add(new Web.Mail());
+ break;
+ case "Redmine Issue Tracker":
+ this.Controls.Add(new Tracker.Redmine());
+ break;
+ case "FTP":
+ this.Controls.Add(new Web.Ftp());
+ break;
+ case "HTTP":
+ this.Controls.Add(new Web.Http());
+ break;
+ }
+
+ if (this.Controls.Count == 2)
+ {
+ this.Controls[1].Dock = DockStyle.Top;
+ this.Controls[1].BringToFront(); // Note that this swaps Controls[1] -> Controls[0] so submit panel is 0 now!
+
+ if (this.submitComboBox.SelectedItem.ToString() == this.settingsLoadedProtocolType)
+ {
+ ((ISubmitPanel)this.Controls[0]).ConnectionString = this.connString;
+ }
+ }
+ }
+ }
+}
diff --git a/NBug.Configurator/SubmitPanels/PanelLoader.resx b/NBug.Configurator/SubmitPanels/PanelLoader.resx
new file mode 100644
index 0000000..29dcb1b
--- /dev/null
+++ b/NBug.Configurator/SubmitPanels/PanelLoader.resx
@@ -0,0 +1,120 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ text/microsoft-resx
+
+
+ 2.0
+
+
+ System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089
+
+
+ System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089
+
+
\ No newline at end of file
diff --git a/NBug.Configurator/SubmitPanels/Tracker/Redmine.Designer.cs b/NBug.Configurator/SubmitPanels/Tracker/Redmine.Designer.cs
new file mode 100644
index 0000000..5e1894c
--- /dev/null
+++ b/NBug.Configurator/SubmitPanels/Tracker/Redmine.Designer.cs
@@ -0,0 +1,403 @@
+namespace NBug.Configurator.SubmitPanels.Tracker
+{
+ partial class Redmine
+ {
+ ///
+ /// Required designer variable.
+ ///
+ private System.ComponentModel.IContainer components = null;
+
+ ///
+ /// Clean up any resources being used.
+ ///
+ /// true if managed resources should be disposed; otherwise, false.
+ protected override void Dispose(bool disposing)
+ {
+ if (disposing && (components != null))
+ {
+ components.Dispose();
+ }
+ base.Dispose(disposing);
+ }
+
+ #region Component Designer generated code
+
+ ///
+ /// Required method for Designer support - do not modify
+ /// the contents of this method with the code editor.
+ ///
+ private void InitializeComponent()
+ {
+ this.trackerIDLabel = new System.Windows.Forms.Label();
+ this.trackerIDTextBox = new System.Windows.Forms.TextBox();
+ this.authorIDTextBox = new System.Windows.Forms.TextBox();
+ this.authorIDLabel = new System.Windows.Forms.Label();
+ this.statusIDTextBox = new System.Windows.Forms.TextBox();
+ this.statusIDLabel = new System.Windows.Forms.Label();
+ this.parentIDTextBox = new System.Windows.Forms.TextBox();
+ this.parentIDLabel = new System.Windows.Forms.Label();
+ this.assignedToIDTextBox = new System.Windows.Forms.TextBox();
+ this.assignedToIDLabel = new System.Windows.Forms.Label();
+ this.fixedVersionIDTextBox = new System.Windows.Forms.TextBox();
+ this.fixedVersionIDLabel = new System.Windows.Forms.Label();
+ this.categoryIDTextBox = new System.Windows.Forms.TextBox();
+ this.categoryIDLabel = new System.Windows.Forms.Label();
+ this.priorityIDTextBox = new System.Windows.Forms.TextBox();
+ this.priorityIDLabel = new System.Windows.Forms.Label();
+ this.customSubjectLabel = new System.Windows.Forms.Label();
+ this.customSubjectTextBox = new System.Windows.Forms.TextBox();
+ this.authenticationGroupBox = new System.Windows.Forms.GroupBox();
+ this.apiKeyTextBox = new System.Windows.Forms.TextBox();
+ this.apiKeyLabel = new System.Windows.Forms.Label();
+ this.apiKeyRadioButton = new System.Windows.Forms.RadioButton();
+ this.anonymousRadioButton = new System.Windows.Forms.RadioButton();
+ this.noteLabel = new System.Windows.Forms.Label();
+ this.optionalPropertiesGroupBox = new System.Windows.Forms.GroupBox();
+ this.projectTrackerGroupBox = new System.Windows.Forms.GroupBox();
+ this.trackerURLTextBox = new System.Windows.Forms.TextBox();
+ this.trackerURLLabel = new System.Windows.Forms.Label();
+ this.projectIDTextBox = new System.Windows.Forms.TextBox();
+ this.projectIDLabel = new System.Windows.Forms.Label();
+ this.authenticationGroupBox.SuspendLayout();
+ this.optionalPropertiesGroupBox.SuspendLayout();
+ this.projectTrackerGroupBox.SuspendLayout();
+ this.SuspendLayout();
+ //
+ // trackerIDLabel
+ //
+ this.trackerIDLabel.AutoSize = true;
+ this.trackerIDLabel.Location = new System.Drawing.Point(6, 23);
+ this.trackerIDLabel.Name = "trackerIDLabel";
+ this.trackerIDLabel.Size = new System.Drawing.Size(61, 13);
+ this.trackerIDLabel.TabIndex = 10;
+ this.trackerIDLabel.Text = "Tracker ID:";
+ //
+ // trackerIDTextBox
+ //
+ this.trackerIDTextBox.Location = new System.Drawing.Point(99, 20);
+ this.trackerIDTextBox.Name = "trackerIDTextBox";
+ this.trackerIDTextBox.Size = new System.Drawing.Size(100, 20);
+ this.trackerIDTextBox.TabIndex = 11;
+ //
+ // authorIDTextBox
+ //
+ this.authorIDTextBox.Location = new System.Drawing.Point(99, 202);
+ this.authorIDTextBox.Name = "authorIDTextBox";
+ this.authorIDTextBox.Size = new System.Drawing.Size(100, 20);
+ this.authorIDTextBox.TabIndex = 13;
+ //
+ // authorIDLabel
+ //
+ this.authorIDLabel.AutoSize = true;
+ this.authorIDLabel.Location = new System.Drawing.Point(6, 205);
+ this.authorIDLabel.Name = "authorIDLabel";
+ this.authorIDLabel.Size = new System.Drawing.Size(55, 13);
+ this.authorIDLabel.TabIndex = 12;
+ this.authorIDLabel.Text = "Author ID:";
+ //
+ // statusIDTextBox
+ //
+ this.statusIDTextBox.Location = new System.Drawing.Point(99, 176);
+ this.statusIDTextBox.Name = "statusIDTextBox";
+ this.statusIDTextBox.Size = new System.Drawing.Size(100, 20);
+ this.statusIDTextBox.TabIndex = 15;
+ //
+ // statusIDLabel
+ //
+ this.statusIDLabel.AutoSize = true;
+ this.statusIDLabel.Location = new System.Drawing.Point(6, 179);
+ this.statusIDLabel.Name = "statusIDLabel";
+ this.statusIDLabel.Size = new System.Drawing.Size(54, 13);
+ this.statusIDLabel.TabIndex = 14;
+ this.statusIDLabel.Text = "Status ID:";
+ //
+ // parentIDTextBox
+ //
+ this.parentIDTextBox.Location = new System.Drawing.Point(99, 150);
+ this.parentIDTextBox.Name = "parentIDTextBox";
+ this.parentIDTextBox.Size = new System.Drawing.Size(100, 20);
+ this.parentIDTextBox.TabIndex = 17;
+ //
+ // parentIDLabel
+ //
+ this.parentIDLabel.AutoSize = true;
+ this.parentIDLabel.Location = new System.Drawing.Point(6, 153);
+ this.parentIDLabel.Name = "parentIDLabel";
+ this.parentIDLabel.Size = new System.Drawing.Size(55, 13);
+ this.parentIDLabel.TabIndex = 16;
+ this.parentIDLabel.Text = "Parent ID:";
+ //
+ // assignedToIDTextBox
+ //
+ this.assignedToIDTextBox.Location = new System.Drawing.Point(99, 124);
+ this.assignedToIDTextBox.Name = "assignedToIDTextBox";
+ this.assignedToIDTextBox.Size = new System.Drawing.Size(100, 20);
+ this.assignedToIDTextBox.TabIndex = 19;
+ //
+ // assignedToIDLabel
+ //
+ this.assignedToIDLabel.AutoSize = true;
+ this.assignedToIDLabel.Location = new System.Drawing.Point(6, 127);
+ this.assignedToIDLabel.Name = "assignedToIDLabel";
+ this.assignedToIDLabel.Size = new System.Drawing.Size(83, 13);
+ this.assignedToIDLabel.TabIndex = 18;
+ this.assignedToIDLabel.Text = "Assigned To ID:";
+ //
+ // fixedVersionIDTextBox
+ //
+ this.fixedVersionIDTextBox.Location = new System.Drawing.Point(99, 98);
+ this.fixedVersionIDTextBox.Name = "fixedVersionIDTextBox";
+ this.fixedVersionIDTextBox.Size = new System.Drawing.Size(100, 20);
+ this.fixedVersionIDTextBox.TabIndex = 21;
+ //
+ // fixedVersionIDLabel
+ //
+ this.fixedVersionIDLabel.AutoSize = true;
+ this.fixedVersionIDLabel.Location = new System.Drawing.Point(6, 101);
+ this.fixedVersionIDLabel.Name = "fixedVersionIDLabel";
+ this.fixedVersionIDLabel.Size = new System.Drawing.Size(87, 13);
+ this.fixedVersionIDLabel.TabIndex = 20;
+ this.fixedVersionIDLabel.Text = "Fixed Version ID:";
+ //
+ // categoryIDTextBox
+ //
+ this.categoryIDTextBox.Location = new System.Drawing.Point(99, 72);
+ this.categoryIDTextBox.Name = "categoryIDTextBox";
+ this.categoryIDTextBox.Size = new System.Drawing.Size(100, 20);
+ this.categoryIDTextBox.TabIndex = 23;
+ //
+ // categoryIDLabel
+ //
+ this.categoryIDLabel.AutoSize = true;
+ this.categoryIDLabel.Location = new System.Drawing.Point(6, 75);
+ this.categoryIDLabel.Name = "categoryIDLabel";
+ this.categoryIDLabel.Size = new System.Drawing.Size(66, 13);
+ this.categoryIDLabel.TabIndex = 22;
+ this.categoryIDLabel.Text = "Category ID:";
+ //
+ // priorityIDTextBox
+ //
+ this.priorityIDTextBox.Location = new System.Drawing.Point(99, 46);
+ this.priorityIDTextBox.Name = "priorityIDTextBox";
+ this.priorityIDTextBox.Size = new System.Drawing.Size(100, 20);
+ this.priorityIDTextBox.TabIndex = 25;
+ //
+ // priorityIDLabel
+ //
+ this.priorityIDLabel.AutoSize = true;
+ this.priorityIDLabel.Location = new System.Drawing.Point(6, 49);
+ this.priorityIDLabel.Name = "priorityIDLabel";
+ this.priorityIDLabel.Size = new System.Drawing.Size(55, 13);
+ this.priorityIDLabel.TabIndex = 24;
+ this.priorityIDLabel.Text = "Priority ID:";
+ //
+ // customSubjectLabel
+ //
+ this.customSubjectLabel.AutoSize = true;
+ this.customSubjectLabel.Location = new System.Drawing.Point(3, 170);
+ this.customSubjectLabel.Name = "customSubjectLabel";
+ this.customSubjectLabel.Size = new System.Drawing.Size(81, 13);
+ this.customSubjectLabel.TabIndex = 26;
+ this.customSubjectLabel.Text = "Custom Subject";
+ //
+ // customSubjectTextBox
+ //
+ this.customSubjectTextBox.Location = new System.Drawing.Point(3, 186);
+ this.customSubjectTextBox.Multiline = true;
+ this.customSubjectTextBox.Name = "customSubjectTextBox";
+ this.customSubjectTextBox.Size = new System.Drawing.Size(351, 55);
+ this.customSubjectTextBox.TabIndex = 27;
+ //
+ // authenticationGroupBox
+ //
+ this.authenticationGroupBox.Controls.Add(this.apiKeyTextBox);
+ this.authenticationGroupBox.Controls.Add(this.apiKeyLabel);
+ this.authenticationGroupBox.Controls.Add(this.apiKeyRadioButton);
+ this.authenticationGroupBox.Controls.Add(this.anonymousRadioButton);
+ this.authenticationGroupBox.Location = new System.Drawing.Point(3, 86);
+ this.authenticationGroupBox.Name = "authenticationGroupBox";
+ this.authenticationGroupBox.Size = new System.Drawing.Size(373, 75);
+ this.authenticationGroupBox.TabIndex = 29;
+ this.authenticationGroupBox.TabStop = false;
+ this.authenticationGroupBox.Text = "Authentication";
+ //
+ // apiKeyTextBox
+ //
+ this.apiKeyTextBox.Enabled = false;
+ this.apiKeyTextBox.Location = new System.Drawing.Point(82, 42);
+ this.apiKeyTextBox.Name = "apiKeyTextBox";
+ this.apiKeyTextBox.Size = new System.Drawing.Size(266, 20);
+ this.apiKeyTextBox.TabIndex = 11;
+ //
+ // apiKeyLabel
+ //
+ this.apiKeyLabel.AutoSize = true;
+ this.apiKeyLabel.Location = new System.Drawing.Point(6, 45);
+ this.apiKeyLabel.Name = "apiKeyLabel";
+ this.apiKeyLabel.Size = new System.Drawing.Size(48, 13);
+ this.apiKeyLabel.TabIndex = 10;
+ this.apiKeyLabel.Text = "API Key:";
+ //
+ // apiKeyRadioButton
+ //
+ this.apiKeyRadioButton.AutoSize = true;
+ this.apiKeyRadioButton.Location = new System.Drawing.Point(92, 19);
+ this.apiKeyRadioButton.Name = "apiKeyRadioButton";
+ this.apiKeyRadioButton.Size = new System.Drawing.Size(63, 17);
+ this.apiKeyRadioButton.TabIndex = 1;
+ this.apiKeyRadioButton.Text = "API Key";
+ this.apiKeyRadioButton.UseVisualStyleBackColor = true;
+ this.apiKeyRadioButton.CheckedChanged += new System.EventHandler(this.ApiKeyRadioButton_CheckedChanged);
+ //
+ // anonymousRadioButton
+ //
+ this.anonymousRadioButton.AutoSize = true;
+ this.anonymousRadioButton.Checked = true;
+ this.anonymousRadioButton.Location = new System.Drawing.Point(6, 19);
+ this.anonymousRadioButton.Name = "anonymousRadioButton";
+ this.anonymousRadioButton.Size = new System.Drawing.Size(80, 17);
+ this.anonymousRadioButton.TabIndex = 0;
+ this.anonymousRadioButton.TabStop = true;
+ this.anonymousRadioButton.Text = "Anonymous";
+ this.anonymousRadioButton.UseVisualStyleBackColor = true;
+ this.anonymousRadioButton.CheckedChanged += new System.EventHandler(this.AnonymousRadioButton_CheckedChanged);
+ //
+ // noteLabel
+ //
+ this.noteLabel.AutoSize = true;
+ this.noteLabel.Location = new System.Drawing.Point(3, 254);
+ this.noteLabel.Name = "noteLabel";
+ this.noteLabel.Size = new System.Drawing.Size(162, 13);
+ this.noteLabel.TabIndex = 41;
+ this.noteLabel.Text = "Note: * Denotes mendatory fields";
+ //
+ // optionalPropertiesGroupBox
+ //
+ this.optionalPropertiesGroupBox.Controls.Add(this.trackerIDLabel);
+ this.optionalPropertiesGroupBox.Controls.Add(this.trackerIDTextBox);
+ this.optionalPropertiesGroupBox.Controls.Add(this.authorIDLabel);
+ this.optionalPropertiesGroupBox.Controls.Add(this.authorIDTextBox);
+ this.optionalPropertiesGroupBox.Controls.Add(this.statusIDLabel);
+ this.optionalPropertiesGroupBox.Controls.Add(this.statusIDTextBox);
+ this.optionalPropertiesGroupBox.Controls.Add(this.priorityIDTextBox);
+ this.optionalPropertiesGroupBox.Controls.Add(this.parentIDLabel);
+ this.optionalPropertiesGroupBox.Controls.Add(this.priorityIDLabel);
+ this.optionalPropertiesGroupBox.Controls.Add(this.parentIDTextBox);
+ this.optionalPropertiesGroupBox.Controls.Add(this.categoryIDTextBox);
+ this.optionalPropertiesGroupBox.Controls.Add(this.assignedToIDLabel);
+ this.optionalPropertiesGroupBox.Controls.Add(this.categoryIDLabel);
+ this.optionalPropertiesGroupBox.Controls.Add(this.assignedToIDTextBox);
+ this.optionalPropertiesGroupBox.Controls.Add(this.fixedVersionIDTextBox);
+ this.optionalPropertiesGroupBox.Controls.Add(this.fixedVersionIDLabel);
+ this.optionalPropertiesGroupBox.Location = new System.Drawing.Point(397, 3);
+ this.optionalPropertiesGroupBox.Name = "optionalPropertiesGroupBox";
+ this.optionalPropertiesGroupBox.Size = new System.Drawing.Size(223, 238);
+ this.optionalPropertiesGroupBox.TabIndex = 42;
+ this.optionalPropertiesGroupBox.TabStop = false;
+ this.optionalPropertiesGroupBox.Text = "Optional Properties";
+ //
+ // projectTrackerGroupBox
+ //
+ this.projectTrackerGroupBox.Controls.Add(this.trackerURLTextBox);
+ this.projectTrackerGroupBox.Controls.Add(this.trackerURLLabel);
+ this.projectTrackerGroupBox.Controls.Add(this.projectIDTextBox);
+ this.projectTrackerGroupBox.Controls.Add(this.projectIDLabel);
+ this.projectTrackerGroupBox.Location = new System.Drawing.Point(3, 3);
+ this.projectTrackerGroupBox.Name = "projectTrackerGroupBox";
+ this.projectTrackerGroupBox.Size = new System.Drawing.Size(373, 78);
+ this.projectTrackerGroupBox.TabIndex = 43;
+ this.projectTrackerGroupBox.TabStop = false;
+ this.projectTrackerGroupBox.Text = "Project Tracker";
+ //
+ // trackerURLTextBox
+ //
+ this.trackerURLTextBox.Location = new System.Drawing.Point(88, 19);
+ this.trackerURLTextBox.Name = "trackerURLTextBox";
+ this.trackerURLTextBox.Size = new System.Drawing.Size(272, 20);
+ this.trackerURLTextBox.TabIndex = 7;
+ this.trackerURLTextBox.Text = "http://tracker.mydomain.com/";
+ //
+ // trackerURLLabel
+ //
+ this.trackerURLLabel.AutoSize = true;
+ this.trackerURLLabel.Location = new System.Drawing.Point(6, 22);
+ this.trackerURLLabel.Name = "trackerURLLabel";
+ this.trackerURLLabel.Size = new System.Drawing.Size(76, 13);
+ this.trackerURLLabel.TabIndex = 6;
+ this.trackerURLLabel.Text = "Tracker URL*:";
+ //
+ // projectIDTextBox
+ //
+ this.projectIDTextBox.Location = new System.Drawing.Point(88, 45);
+ this.projectIDTextBox.Name = "projectIDTextBox";
+ this.projectIDTextBox.Size = new System.Drawing.Size(155, 20);
+ this.projectIDTextBox.TabIndex = 5;
+ this.projectIDTextBox.Text = "myproject";
+ //
+ // projectIDLabel
+ //
+ this.projectIDLabel.AutoSize = true;
+ this.projectIDLabel.Location = new System.Drawing.Point(6, 48);
+ this.projectIDLabel.Name = "projectIDLabel";
+ this.projectIDLabel.Size = new System.Drawing.Size(61, 13);
+ this.projectIDLabel.TabIndex = 4;
+ this.projectIDLabel.Text = "Project ID*:";
+ //
+ // Redmine
+ //
+ this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F);
+ this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
+ this.Controls.Add(this.projectTrackerGroupBox);
+ this.Controls.Add(this.optionalPropertiesGroupBox);
+ this.Controls.Add(this.noteLabel);
+ this.Controls.Add(this.authenticationGroupBox);
+ this.Controls.Add(this.customSubjectTextBox);
+ this.Controls.Add(this.customSubjectLabel);
+ this.Name = "Redmine";
+ this.Size = new System.Drawing.Size(660, 308);
+ this.authenticationGroupBox.ResumeLayout(false);
+ this.authenticationGroupBox.PerformLayout();
+ this.optionalPropertiesGroupBox.ResumeLayout(false);
+ this.optionalPropertiesGroupBox.PerformLayout();
+ this.projectTrackerGroupBox.ResumeLayout(false);
+ this.projectTrackerGroupBox.PerformLayout();
+ this.ResumeLayout(false);
+ this.PerformLayout();
+
+ }
+
+ #endregion
+
+ private System.Windows.Forms.Label trackerIDLabel;
+ private System.Windows.Forms.TextBox trackerIDTextBox;
+ private System.Windows.Forms.TextBox authorIDTextBox;
+ private System.Windows.Forms.Label authorIDLabel;
+ private System.Windows.Forms.TextBox statusIDTextBox;
+ private System.Windows.Forms.Label statusIDLabel;
+ private System.Windows.Forms.TextBox parentIDTextBox;
+ private System.Windows.Forms.Label parentIDLabel;
+ private System.Windows.Forms.TextBox assignedToIDTextBox;
+ private System.Windows.Forms.Label assignedToIDLabel;
+ private System.Windows.Forms.TextBox fixedVersionIDTextBox;
+ private System.Windows.Forms.Label fixedVersionIDLabel;
+ private System.Windows.Forms.TextBox categoryIDTextBox;
+ private System.Windows.Forms.Label categoryIDLabel;
+ private System.Windows.Forms.TextBox priorityIDTextBox;
+ private System.Windows.Forms.Label priorityIDLabel;
+ private System.Windows.Forms.Label customSubjectLabel;
+ private System.Windows.Forms.TextBox customSubjectTextBox;
+ private System.Windows.Forms.GroupBox authenticationGroupBox;
+ private System.Windows.Forms.RadioButton apiKeyRadioButton;
+ private System.Windows.Forms.RadioButton anonymousRadioButton;
+ private System.Windows.Forms.TextBox apiKeyTextBox;
+ private System.Windows.Forms.Label apiKeyLabel;
+ private System.Windows.Forms.Label noteLabel;
+ private System.Windows.Forms.GroupBox optionalPropertiesGroupBox;
+ private System.Windows.Forms.GroupBox projectTrackerGroupBox;
+ private System.Windows.Forms.TextBox trackerURLTextBox;
+ private System.Windows.Forms.Label trackerURLLabel;
+ private System.Windows.Forms.TextBox projectIDTextBox;
+ private System.Windows.Forms.Label projectIDLabel;
+
+ }
+}
diff --git a/NBug.Configurator/SubmitPanels/Tracker/Redmine.cs b/NBug.Configurator/SubmitPanels/Tracker/Redmine.cs
new file mode 100644
index 0000000..4c28a9d
--- /dev/null
+++ b/NBug.Configurator/SubmitPanels/Tracker/Redmine.cs
@@ -0,0 +1,108 @@
+// --------------------------------------------------------------------------------------------------------------------
+//
+// Copyright © 2010 - 2011 Teoman Soygul. Licensed under LGPLv3 (http://www.gnu.org/licenses/lgpl.html).
+//
+// --------------------------------------------------------------------------------------------------------------------
+
+namespace NBug.Configurator.SubmitPanels.Tracker
+{
+ using System;
+ using System.Windows.Forms;
+
+ public partial class Redmine : UserControl, ISubmitPanel
+ {
+ public Redmine()
+ {
+ InitializeComponent();
+ }
+
+ public string ConnectionString
+ {
+ get
+ {
+ // Check the mendatory fields
+ if (string.IsNullOrEmpty(this.trackerURLTextBox.Text))
+ {
+ MessageBox.Show("Mandatory field \"" + trackerURLLabel.Name + "\" cannot be left blank.", "Warning", MessageBoxButtons.OK, MessageBoxIcon.Warning);
+ return null;
+ }
+ else if (string.IsNullOrEmpty(this.projectIDTextBox.Text))
+ {
+ MessageBox.Show("Mandatory field \"" + projectIDLabel.Name + "\" cannot be left blank.", "Warning", MessageBoxButtons.OK, MessageBoxIcon.Warning);
+ return null;
+ }
+
+ // Do fixes
+ if (!this.trackerURLTextBox.Text.EndsWith("/"))
+ {
+ this.trackerURLTextBox.Text += "/";
+ }
+
+ var redmine = new Core.Submission.Tracker.Redmine
+ {
+ Url = this.trackerURLTextBox.Text,
+ ProjectId = this.projectIDTextBox.Text,
+ TrackerId = this.trackerIDTextBox.Text,
+ PriorityId = this.priorityIDTextBox.Text,
+ CategoryId = this.categoryIDTextBox.Text,
+ CustomSubject = this.customSubjectTextBox.Text,
+ FixedVersionId = this.fixedVersionIDTextBox.Text,
+ AssignedToId = this.assignedToIDTextBox.Text,
+ ParentId = this.parentIDTextBox.Text,
+ StatusId = this.statusIDTextBox.Text,
+ AuthorId = this.authorIDTextBox.Text
+ };
+
+ if (this.apiKeyRadioButton.Checked)
+ {
+ redmine.ApiKey = this.apiKeyTextBox.Text;
+ }
+
+ return redmine.ConnectionString;
+ }
+
+ set
+ {
+ var redmine = new Core.Submission.Tracker.Redmine(value);
+
+ this.trackerURLTextBox.Text = redmine.Url;
+ this.projectIDTextBox.Text = redmine.ProjectId;
+ this.trackerIDTextBox.Text = redmine.TrackerId;
+ this.priorityIDTextBox.Text = redmine.PriorityId;
+ this.categoryIDTextBox.Text = redmine.CategoryId;
+ this.customSubjectTextBox.Text = redmine.CustomSubject;
+ this.fixedVersionIDTextBox.Text = redmine.FixedVersionId;
+ this.assignedToIDTextBox.Text = redmine.AssignedToId;
+ this.parentIDTextBox.Text = redmine.ParentId;
+ this.statusIDTextBox.Text = redmine.StatusId;
+ this.authorIDTextBox.Text = redmine.AuthorId;
+
+ if (!string.IsNullOrEmpty(redmine.ApiKey))
+ {
+ this.apiKeyRadioButton.Checked = true;
+ this.apiKeyTextBox.Text = redmine.ApiKey;
+ }
+ else
+ {
+ this.anonymousRadioButton.Checked = true;
+ }
+ }
+ }
+
+ private void AnonymousRadioButton_CheckedChanged(object sender, EventArgs e)
+ {
+ if (this.anonymousRadioButton.Checked)
+ {
+ this.apiKeyTextBox.Enabled = false;
+ }
+ }
+
+ private void ApiKeyRadioButton_CheckedChanged(object sender, EventArgs e)
+ {
+ if (this.apiKeyRadioButton.Checked)
+ {
+ this.apiKeyTextBox.Enabled = true;
+ }
+ }
+ }
+}
diff --git a/NBug.Configurator/SubmitPanels/Tracker/Redmine.resx b/NBug.Configurator/SubmitPanels/Tracker/Redmine.resx
new file mode 100644
index 0000000..29dcb1b
--- /dev/null
+++ b/NBug.Configurator/SubmitPanels/Tracker/Redmine.resx
@@ -0,0 +1,120 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ text/microsoft-resx
+
+
+ 2.0
+
+
+ System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089
+
+
+ System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089
+
+
\ No newline at end of file
diff --git a/NBug.Configurator/SubmitPanels/Web/Ftp.Designer.cs b/NBug.Configurator/SubmitPanels/Web/Ftp.Designer.cs
new file mode 100644
index 0000000..5788d9e
--- /dev/null
+++ b/NBug.Configurator/SubmitPanels/Web/Ftp.Designer.cs
@@ -0,0 +1,199 @@
+namespace NBug.Configurator.SubmitPanels.Web
+{
+ partial class Ftp
+ {
+ ///
+ /// Required designer variable.
+ ///
+ private System.ComponentModel.IContainer components = null;
+
+ ///
+ /// Clean up any resources being used.
+ ///
+ /// true if managed resources should be disposed; otherwise, false.
+ protected override void Dispose(bool disposing)
+ {
+ if (disposing && (components != null))
+ {
+ components.Dispose();
+ }
+ base.Dispose(disposing);
+ }
+
+ #region Component Designer generated code
+
+ ///
+ /// Required method for Designer support - do not modify
+ /// the contents of this method with the code editor.
+ ///
+ private void InitializeComponent()
+ {
+ this.urlLabel = new System.Windows.Forms.Label();
+ this.urlTextBox = new System.Windows.Forms.TextBox();
+ this.useSslCheckBox = new System.Windows.Forms.CheckBox();
+ this.authenticationGroupBox = new System.Windows.Forms.GroupBox();
+ this.passwordTextBox = new System.Windows.Forms.TextBox();
+ this.usernameTextBox = new System.Windows.Forms.TextBox();
+ this.passwordLabel = new System.Windows.Forms.Label();
+ this.usernameLabel = new System.Windows.Forms.Label();
+ this.usernamePasswordRadioButton = new System.Windows.Forms.RadioButton();
+ this.RadioButton = new System.Windows.Forms.RadioButton();
+ this.noteLabel = new System.Windows.Forms.Label();
+ this.ftpServerGroupBox = new System.Windows.Forms.GroupBox();
+ this.authenticationGroupBox.SuspendLayout();
+ this.ftpServerGroupBox.SuspendLayout();
+ this.SuspendLayout();
+ //
+ // urlLabel
+ //
+ this.urlLabel.AutoSize = true;
+ this.urlLabel.Location = new System.Drawing.Point(6, 23);
+ this.urlLabel.Name = "urlLabel";
+ this.urlLabel.Size = new System.Drawing.Size(27, 13);
+ this.urlLabel.TabIndex = 0;
+ this.urlLabel.Text = "Url*:";
+ //
+ // urlTextBox
+ //
+ this.urlTextBox.Location = new System.Drawing.Point(39, 20);
+ this.urlTextBox.Name = "urlTextBox";
+ this.urlTextBox.Size = new System.Drawing.Size(262, 20);
+ this.urlTextBox.TabIndex = 1;
+ //
+ // useSslCheckBox
+ //
+ this.useSslCheckBox.AutoSize = true;
+ this.useSslCheckBox.Location = new System.Drawing.Point(39, 48);
+ this.useSslCheckBox.Name = "useSslCheckBox";
+ this.useSslCheckBox.Size = new System.Drawing.Size(68, 17);
+ this.useSslCheckBox.TabIndex = 2;
+ this.useSslCheckBox.Text = "Use SSL";
+ this.useSslCheckBox.UseVisualStyleBackColor = true;
+ //
+ // authenticationGroupBox
+ //
+ this.authenticationGroupBox.Controls.Add(this.passwordTextBox);
+ this.authenticationGroupBox.Controls.Add(this.usernameTextBox);
+ this.authenticationGroupBox.Controls.Add(this.passwordLabel);
+ this.authenticationGroupBox.Controls.Add(this.usernameLabel);
+ this.authenticationGroupBox.Controls.Add(this.usernamePasswordRadioButton);
+ this.authenticationGroupBox.Controls.Add(this.RadioButton);
+ this.authenticationGroupBox.Location = new System.Drawing.Point(343, 3);
+ this.authenticationGroupBox.Name = "authenticationGroupBox";
+ this.authenticationGroupBox.Size = new System.Drawing.Size(235, 110);
+ this.authenticationGroupBox.TabIndex = 3;
+ this.authenticationGroupBox.TabStop = false;
+ this.authenticationGroupBox.Text = "Authentication";
+ //
+ // passwordTextBox
+ //
+ this.passwordTextBox.Enabled = false;
+ this.passwordTextBox.Location = new System.Drawing.Point(70, 72);
+ this.passwordTextBox.Name = "passwordTextBox";
+ this.passwordTextBox.Size = new System.Drawing.Size(146, 20);
+ this.passwordTextBox.TabIndex = 5;
+ //
+ // usernameTextBox
+ //
+ this.usernameTextBox.Enabled = false;
+ this.usernameTextBox.Location = new System.Drawing.Point(70, 46);
+ this.usernameTextBox.Name = "usernameTextBox";
+ this.usernameTextBox.Size = new System.Drawing.Size(146, 20);
+ this.usernameTextBox.TabIndex = 4;
+ //
+ // passwordLabel
+ //
+ this.passwordLabel.AutoSize = true;
+ this.passwordLabel.Location = new System.Drawing.Point(6, 75);
+ this.passwordLabel.Name = "passwordLabel";
+ this.passwordLabel.Size = new System.Drawing.Size(56, 13);
+ this.passwordLabel.TabIndex = 3;
+ this.passwordLabel.Text = "Password:";
+ //
+ // usernameLabel
+ //
+ this.usernameLabel.AutoSize = true;
+ this.usernameLabel.Location = new System.Drawing.Point(6, 49);
+ this.usernameLabel.Name = "usernameLabel";
+ this.usernameLabel.Size = new System.Drawing.Size(58, 13);
+ this.usernameLabel.TabIndex = 2;
+ this.usernameLabel.Text = "Username:";
+ //
+ // usernamePasswordRadioButton
+ //
+ this.usernamePasswordRadioButton.AutoSize = true;
+ this.usernamePasswordRadioButton.Location = new System.Drawing.Point(92, 19);
+ this.usernamePasswordRadioButton.Name = "usernamePasswordRadioButton";
+ this.usernamePasswordRadioButton.Size = new System.Drawing.Size(124, 17);
+ this.usernamePasswordRadioButton.TabIndex = 1;
+ this.usernamePasswordRadioButton.Text = "Username/Password";
+ this.usernamePasswordRadioButton.UseVisualStyleBackColor = true;
+ this.usernamePasswordRadioButton.CheckedChanged += new System.EventHandler(this.UsernamePasswordRadioButton_CheckedChanged);
+ //
+ // RadioButton
+ //
+ this.RadioButton.AutoSize = true;
+ this.RadioButton.Checked = true;
+ this.RadioButton.Location = new System.Drawing.Point(6, 19);
+ this.RadioButton.Name = "RadioButton";
+ this.RadioButton.Size = new System.Drawing.Size(80, 17);
+ this.RadioButton.TabIndex = 0;
+ this.RadioButton.TabStop = true;
+ this.RadioButton.Text = "Anonymous";
+ this.RadioButton.UseVisualStyleBackColor = true;
+ //
+ // noteLabel
+ //
+ this.noteLabel.AutoSize = true;
+ this.noteLabel.Location = new System.Drawing.Point(9, 100);
+ this.noteLabel.Name = "noteLabel";
+ this.noteLabel.Size = new System.Drawing.Size(162, 13);
+ this.noteLabel.TabIndex = 42;
+ this.noteLabel.Text = "Note: * Denotes mendatory fields";
+ //
+ // ftpServerGroupBox
+ //
+ this.ftpServerGroupBox.Controls.Add(this.urlLabel);
+ this.ftpServerGroupBox.Controls.Add(this.urlTextBox);
+ this.ftpServerGroupBox.Controls.Add(this.useSslCheckBox);
+ this.ftpServerGroupBox.Location = new System.Drawing.Point(3, 3);
+ this.ftpServerGroupBox.Name = "ftpServerGroupBox";
+ this.ftpServerGroupBox.Size = new System.Drawing.Size(316, 72);
+ this.ftpServerGroupBox.TabIndex = 43;
+ this.ftpServerGroupBox.TabStop = false;
+ this.ftpServerGroupBox.Text = "FTP Server";
+ //
+ // Ftp
+ //
+ this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F);
+ this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
+ this.Controls.Add(this.ftpServerGroupBox);
+ this.Controls.Add(this.noteLabel);
+ this.Controls.Add(this.authenticationGroupBox);
+ this.Name = "Ftp";
+ this.Size = new System.Drawing.Size(660, 158);
+ this.authenticationGroupBox.ResumeLayout(false);
+ this.authenticationGroupBox.PerformLayout();
+ this.ftpServerGroupBox.ResumeLayout(false);
+ this.ftpServerGroupBox.PerformLayout();
+ this.ResumeLayout(false);
+ this.PerformLayout();
+
+ }
+
+ #endregion
+
+ private System.Windows.Forms.Label urlLabel;
+ private System.Windows.Forms.TextBox urlTextBox;
+ private System.Windows.Forms.CheckBox useSslCheckBox;
+ private System.Windows.Forms.GroupBox authenticationGroupBox;
+ private System.Windows.Forms.TextBox passwordTextBox;
+ private System.Windows.Forms.TextBox usernameTextBox;
+ private System.Windows.Forms.Label passwordLabel;
+ private System.Windows.Forms.Label usernameLabel;
+ private System.Windows.Forms.RadioButton usernamePasswordRadioButton;
+ private System.Windows.Forms.RadioButton RadioButton;
+ private System.Windows.Forms.Label noteLabel;
+ private System.Windows.Forms.GroupBox ftpServerGroupBox;
+ }
+}
diff --git a/NBug.Configurator/SubmitPanels/Web/Ftp.cs b/NBug.Configurator/SubmitPanels/Web/Ftp.cs
new file mode 100644
index 0000000..9effa7c
--- /dev/null
+++ b/NBug.Configurator/SubmitPanels/Web/Ftp.cs
@@ -0,0 +1,89 @@
+// --------------------------------------------------------------------------------------------------------------------
+//
+// Copyright © 2010 - 2011 Teoman Soygul. Licensed under LGPLv3 (http://www.gnu.org/licenses/lgpl.html).
+//
+// --------------------------------------------------------------------------------------------------------------------
+
+namespace NBug.Configurator.SubmitPanels.Web
+{
+ using System;
+ using System.Windows.Forms;
+
+ public partial class Ftp : UserControl, ISubmitPanel
+ {
+ public Ftp()
+ {
+ InitializeComponent();
+ }
+
+ public string ConnectionString
+ {
+ get
+ {
+ // Check the mendatory fields
+ if (string.IsNullOrEmpty(this.urlTextBox.Text))
+ {
+ MessageBox.Show("Mandatory field \"" + urlTextBox.Name + "\" cannot be left blank.", "Warning", MessageBoxButtons.OK, MessageBoxIcon.Warning);
+ return null;
+ }
+
+ // Do fixes
+ if (!this.urlTextBox.Text.EndsWith("/"))
+ {
+ this.urlTextBox.Text += "/";
+ }
+
+ var ftp = new Core.Submission.Web.Ftp
+ {
+ Url = this.urlTextBox.Text
+ };
+
+ if (this.useSslCheckBox.Checked)
+ {
+ ftp.Usessl = "true";
+ }
+
+ if (this.usernamePasswordRadioButton.Checked)
+ {
+ ftp.Username = this.usernameTextBox.Text;
+ ftp.Password = this.passwordTextBox.Text;
+ }
+
+ return ftp.ConnectionString;
+ }
+
+ set
+ {
+ var ftp = new Core.Submission.Web.Ftp(value);
+
+ this.urlTextBox.Text = ftp.Url;
+
+ if (!string.IsNullOrEmpty(ftp.Usessl))
+ {
+ this.useSslCheckBox.Checked = Convert.ToBoolean(ftp.Usessl);
+ }
+
+ if (!string.IsNullOrEmpty(ftp.Username))
+ {
+ this.usernameTextBox.Text = ftp.Username;
+ this.passwordTextBox.Text = ftp.Password;
+ this.usernamePasswordRadioButton.Checked = true;
+ }
+ }
+ }
+
+ private void UsernamePasswordRadioButton_CheckedChanged(object sender, EventArgs e)
+ {
+ if (this.usernamePasswordRadioButton.Checked)
+ {
+ this.usernameTextBox.Enabled = true;
+ this.passwordTextBox.Enabled = true;
+ }
+ else
+ {
+ this.usernameTextBox.Enabled = false;
+ this.passwordTextBox.Enabled = false;
+ }
+ }
+ }
+}
diff --git a/NBug.Configurator/SubmitPanels/Web/Ftp.resx b/NBug.Configurator/SubmitPanels/Web/Ftp.resx
new file mode 100644
index 0000000..29dcb1b
--- /dev/null
+++ b/NBug.Configurator/SubmitPanels/Web/Ftp.resx
@@ -0,0 +1,120 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ text/microsoft-resx
+
+
+ 2.0
+
+
+ System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089
+
+
+ System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089
+
+
\ No newline at end of file
diff --git a/NBug.Configurator/SubmitPanels/Web/Http.Designer.cs b/NBug.Configurator/SubmitPanels/Web/Http.Designer.cs
new file mode 100644
index 0000000..80c046b
--- /dev/null
+++ b/NBug.Configurator/SubmitPanels/Web/Http.Designer.cs
@@ -0,0 +1,110 @@
+namespace NBug.Configurator.SubmitPanels.Web
+{
+ partial class Http
+ {
+ ///
+ /// Required designer variable.
+ ///
+ private System.ComponentModel.IContainer components = null;
+
+ ///
+ /// Clean up any resources being used.
+ ///
+ /// true if managed resources should be disposed; otherwise, false.
+ protected override void Dispose(bool disposing)
+ {
+ if (disposing && (components != null))
+ {
+ components.Dispose();
+ }
+ base.Dispose(disposing);
+ }
+
+ #region Component Designer generated code
+
+ ///
+ /// Required method for Designer support - do not modify
+ /// the contents of this method with the code editor.
+ ///
+ private void InitializeComponent()
+ {
+ System.ComponentModel.ComponentResourceManager resources = new System.ComponentModel.ComponentResourceManager(typeof(Http));
+ this.urlTextBox = new System.Windows.Forms.TextBox();
+ this.urlLabel = new System.Windows.Forms.Label();
+ this.label1 = new System.Windows.Forms.Label();
+ this.noteLabel = new System.Windows.Forms.Label();
+ this.webServerGroupBox = new System.Windows.Forms.GroupBox();
+ this.webServerGroupBox.SuspendLayout();
+ this.SuspendLayout();
+ //
+ // urlTextBox
+ //
+ this.urlTextBox.Location = new System.Drawing.Point(39, 18);
+ this.urlTextBox.Name = "urlTextBox";
+ this.urlTextBox.Size = new System.Drawing.Size(262, 20);
+ this.urlTextBox.TabIndex = 3;
+ //
+ // urlLabel
+ //
+ this.urlLabel.AutoSize = true;
+ this.urlLabel.Location = new System.Drawing.Point(6, 21);
+ this.urlLabel.Name = "urlLabel";
+ this.urlLabel.Size = new System.Drawing.Size(27, 13);
+ this.urlLabel.TabIndex = 2;
+ this.urlLabel.Text = "Url*:";
+ //
+ // label1
+ //
+ this.label1.AutoSize = true;
+ this.label1.ForeColor = System.Drawing.SystemColors.AppWorkspace;
+ this.label1.Location = new System.Drawing.Point(39, 109);
+ this.label1.Name = "label1";
+ this.label1.Size = new System.Drawing.Size(429, 273);
+ this.label1.TabIndex = 4;
+ this.label1.Text = resources.GetString("label1.Text");
+ //
+ // noteLabel
+ //
+ this.noteLabel.AutoSize = true;
+ this.noteLabel.Location = new System.Drawing.Point(9, 69);
+ this.noteLabel.Name = "noteLabel";
+ this.noteLabel.Size = new System.Drawing.Size(162, 13);
+ this.noteLabel.TabIndex = 42;
+ this.noteLabel.Text = "Note: * Denotes mendatory fields";
+ //
+ // webServerGroupBox
+ //
+ this.webServerGroupBox.Controls.Add(this.urlLabel);
+ this.webServerGroupBox.Controls.Add(this.urlTextBox);
+ this.webServerGroupBox.Location = new System.Drawing.Point(3, 3);
+ this.webServerGroupBox.Name = "webServerGroupBox";
+ this.webServerGroupBox.Size = new System.Drawing.Size(319, 50);
+ this.webServerGroupBox.TabIndex = 43;
+ this.webServerGroupBox.TabStop = false;
+ this.webServerGroupBox.Text = "Web Server";
+ //
+ // Http
+ //
+ this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F);
+ this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
+ this.Controls.Add(this.webServerGroupBox);
+ this.Controls.Add(this.noteLabel);
+ this.Controls.Add(this.label1);
+ this.Name = "Http";
+ this.Size = new System.Drawing.Size(660, 423);
+ this.webServerGroupBox.ResumeLayout(false);
+ this.webServerGroupBox.PerformLayout();
+ this.ResumeLayout(false);
+ this.PerformLayout();
+
+ }
+
+ #endregion
+
+ private System.Windows.Forms.TextBox urlTextBox;
+ private System.Windows.Forms.Label urlLabel;
+ private System.Windows.Forms.Label label1;
+ private System.Windows.Forms.Label noteLabel;
+ private System.Windows.Forms.GroupBox webServerGroupBox;
+ }
+}
diff --git a/NBug.Configurator/SubmitPanels/Web/Http.cs b/NBug.Configurator/SubmitPanels/Web/Http.cs
new file mode 100644
index 0000000..fe776b1
--- /dev/null
+++ b/NBug.Configurator/SubmitPanels/Web/Http.cs
@@ -0,0 +1,47 @@
+// --------------------------------------------------------------------------------------------------------------------
+//
+// Copyright © 2010 - 2011 Teoman Soygul. Licensed under LGPLv3 (http://www.gnu.org/licenses/lgpl.html).
+//
+// --------------------------------------------------------------------------------------------------------------------
+
+namespace NBug.Configurator.SubmitPanels.Web
+{
+ using System.Windows.Forms;
+
+ public partial class Http : UserControl, ISubmitPanel
+ {
+ public Http()
+ {
+ InitializeComponent();
+ }
+
+ public string ConnectionString
+ {
+ get
+ {
+ // Check the mendatory fields
+ if (string.IsNullOrEmpty(this.urlTextBox.Text))
+ {
+ MessageBox.Show("Mandatory field \"" + urlTextBox.Name + "\" cannot be left blank.", "Warning", MessageBoxButtons.OK, MessageBoxIcon.Warning);
+ return null;
+ }
+
+ // Do fixes
+ if (!this.urlTextBox.Text.EndsWith("/"))
+ {
+ this.urlTextBox.Text += "/";
+ }
+
+ var http = new Core.Submission.Web.Http { Url = this.urlTextBox.Text };
+
+ return http.ConnectionString;
+ }
+
+ set
+ {
+ var http = new Core.Submission.Web.Http(value);
+ this.urlTextBox.Text = http.Url;
+ }
+ }
+ }
+}
diff --git a/NBug.Configurator/SubmitPanels/Web/Http.resx b/NBug.Configurator/SubmitPanels/Web/Http.resx
new file mode 100644
index 0000000..765aecc
--- /dev/null
+++ b/NBug.Configurator/SubmitPanels/Web/Http.resx
@@ -0,0 +1,143 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ text/microsoft-resx
+
+
+ 2.0
+
+
+ System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089
+
+
+ System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089
+
+
+ upload.php file my look like the one below
+(note that uploaded files are not statically named in this case script may need modification)
+
+<?php
+$uploadDir = 'Upload/';
+$uploadFile = $uploadDir . basename($_FILES['file']['name']);
+if (is_uploaded_file($_FILES['file']['tmp_name']))
+{
+ echo "File ". $_FILES['file']['name'] ." is successfully uploaded!\r\n";
+ if (move_uploaded_file($_FILES['file']['tmp_name'], $uploadFile))
+ {
+ echo "File is successfully stored! ";
+ }
+ else print_r($_FILES);
+}
+else
+{
+ echo "Upload Failed!";
+ print_r($_FILES);
+}
+?>
+
+
\ No newline at end of file
diff --git a/NBug.Configurator/SubmitPanels/Web/Mail.Designer.cs b/NBug.Configurator/SubmitPanels/Web/Mail.Designer.cs
new file mode 100644
index 0000000..6307576
--- /dev/null
+++ b/NBug.Configurator/SubmitPanels/Web/Mail.Designer.cs
@@ -0,0 +1,637 @@
+namespace NBug.Configurator.SubmitPanels.Web
+{
+ partial class Mail
+ {
+ ///
+ /// Required designer variable.
+ ///
+ private System.ComponentModel.IContainer components = null;
+
+ ///
+ /// Clean up any resources being used.
+ ///
+ /// true if managed resources should be disposed; otherwise, false.
+ protected override void Dispose(bool disposing)
+ {
+ if (disposing && (components != null))
+ {
+ components.Dispose();
+ }
+ base.Dispose(disposing);
+ }
+
+ #region Component Designer generated code
+
+ ///
+ /// Required method for Designer support - do not modify
+ /// the contents of this method with the code editor.
+ ///
+ private void InitializeComponent()
+ {
+ this.fromLabel = new System.Windows.Forms.Label();
+ this.fromNameTextBox = new System.Windows.Forms.TextBox();
+ this.fromNameLabel = new System.Windows.Forms.Label();
+ this.toLabel = new System.Windows.Forms.Label();
+ this.toListBox = new System.Windows.Forms.ListBox();
+ this.toAddButton = new System.Windows.Forms.Button();
+ this.toRemoveButton = new System.Windows.Forms.Button();
+ this.fromTextBox = new System.Windows.Forms.TextBox();
+ this.toTextBox = new System.Windows.Forms.TextBox();
+ this.smtpServerLabel = new System.Windows.Forms.Label();
+ this.smtpServerTextBox = new System.Windows.Forms.TextBox();
+ this.useSslCheckBox = new System.Windows.Forms.CheckBox();
+ this.portLabel = new System.Windows.Forms.Label();
+ this.portNumericUpDown = new System.Windows.Forms.NumericUpDown();
+ this.priorityLabel = new System.Windows.Forms.Label();
+ this.priorityComboBox = new System.Windows.Forms.ComboBox();
+ this.useAuthenticationCheckBox = new System.Windows.Forms.CheckBox();
+ this.usernameTextBox = new System.Windows.Forms.TextBox();
+ this.usernameLabel = new System.Windows.Forms.Label();
+ this.passwordTextBox = new System.Windows.Forms.TextBox();
+ this.passwordLabel = new System.Windows.Forms.Label();
+ this.ccTextBox = new System.Windows.Forms.TextBox();
+ this.ccRemoveButton = new System.Windows.Forms.Button();
+ this.ccAddButton = new System.Windows.Forms.Button();
+ this.ccListBox = new System.Windows.Forms.ListBox();
+ this.ccLabel = new System.Windows.Forms.Label();
+ this.bccTextBox = new System.Windows.Forms.TextBox();
+ this.bccRemoveButton = new System.Windows.Forms.Button();
+ this.bccAddButton = new System.Windows.Forms.Button();
+ this.bccListBox = new System.Windows.Forms.ListBox();
+ this.bccLabel = new System.Windows.Forms.Label();
+ this.customSubjectTextBox = new System.Windows.Forms.TextBox();
+ this.customSubjectLabel = new System.Windows.Forms.Label();
+ this.customBodyTextBox = new System.Windows.Forms.TextBox();
+ this.customBodyLabel = new System.Windows.Forms.Label();
+ this.replyToTextBox = new System.Windows.Forms.TextBox();
+ this.replyToLabel = new System.Windows.Forms.Label();
+ this.useAttachmentCheckBox = new System.Windows.Forms.CheckBox();
+ this.noteLabel = new System.Windows.Forms.Label();
+ this.fromGroupBox = new System.Windows.Forms.GroupBox();
+ this.smtpServerGroupBox = new System.Windows.Forms.GroupBox();
+ this.mailGroupBox = new System.Windows.Forms.GroupBox();
+ this.authenticationGroupBox = new System.Windows.Forms.GroupBox();
+ this.recepientsGroupBox = new System.Windows.Forms.GroupBox();
+ this.attachmentsGroupBox = new System.Windows.Forms.GroupBox();
+ this.defaultPortCheckBox = new System.Windows.Forms.CheckBox();
+ this.securityLabel = new System.Windows.Forms.Label();
+ ((System.ComponentModel.ISupportInitialize)(this.portNumericUpDown)).BeginInit();
+ this.fromGroupBox.SuspendLayout();
+ this.smtpServerGroupBox.SuspendLayout();
+ this.mailGroupBox.SuspendLayout();
+ this.authenticationGroupBox.SuspendLayout();
+ this.recepientsGroupBox.SuspendLayout();
+ this.attachmentsGroupBox.SuspendLayout();
+ this.SuspendLayout();
+ //
+ // fromLabel
+ //
+ this.fromLabel.AutoSize = true;
+ this.fromLabel.Location = new System.Drawing.Point(6, 21);
+ this.fromLabel.Name = "fromLabel";
+ this.fromLabel.Size = new System.Drawing.Size(33, 13);
+ this.fromLabel.TabIndex = 0;
+ this.fromLabel.Text = "From:";
+ //
+ // fromNameTextBox
+ //
+ this.fromNameTextBox.Location = new System.Drawing.Point(76, 44);
+ this.fromNameTextBox.Name = "fromNameTextBox";
+ this.fromNameTextBox.Size = new System.Drawing.Size(159, 20);
+ this.fromNameTextBox.TabIndex = 3;
+ this.fromNameTextBox.Text = "NBug Error Reporter";
+ //
+ // fromNameLabel
+ //
+ this.fromNameLabel.AutoSize = true;
+ this.fromNameLabel.Location = new System.Drawing.Point(6, 47);
+ this.fromNameLabel.Name = "fromNameLabel";
+ this.fromNameLabel.Size = new System.Drawing.Size(64, 13);
+ this.fromNameLabel.TabIndex = 2;
+ this.fromNameLabel.Text = "From Name:";
+ //
+ // toLabel
+ //
+ this.toLabel.AutoSize = true;
+ this.toLabel.Location = new System.Drawing.Point(6, 24);
+ this.toLabel.Name = "toLabel";
+ this.toLabel.Size = new System.Drawing.Size(27, 13);
+ this.toLabel.TabIndex = 4;
+ this.toLabel.Text = "To*:";
+ //
+ // toListBox
+ //
+ this.toListBox.FormattingEnabled = true;
+ this.toListBox.Location = new System.Drawing.Point(39, 47);
+ this.toListBox.Name = "toListBox";
+ this.toListBox.Size = new System.Drawing.Size(171, 95);
+ this.toListBox.TabIndex = 5;
+ //
+ // toAddButton
+ //
+ this.toAddButton.Location = new System.Drawing.Point(216, 21);
+ this.toAddButton.Name = "toAddButton";
+ this.toAddButton.Size = new System.Drawing.Size(61, 20);
+ this.toAddButton.TabIndex = 7;
+ this.toAddButton.Text = "Add";
+ this.toAddButton.UseVisualStyleBackColor = true;
+ this.toAddButton.Click += new System.EventHandler(this.ToAddButton_Click);
+ //
+ // toRemoveButton
+ //
+ this.toRemoveButton.Location = new System.Drawing.Point(216, 84);
+ this.toRemoveButton.Name = "toRemoveButton";
+ this.toRemoveButton.Size = new System.Drawing.Size(61, 20);
+ this.toRemoveButton.TabIndex = 8;
+ this.toRemoveButton.Text = "Remove";
+ this.toRemoveButton.UseVisualStyleBackColor = true;
+ this.toRemoveButton.Click += new System.EventHandler(this.ToRemoveButton_Click);
+ //
+ // fromTextBox
+ //
+ this.fromTextBox.Location = new System.Drawing.Point(76, 18);
+ this.fromTextBox.Name = "fromTextBox";
+ this.fromTextBox.Size = new System.Drawing.Size(159, 20);
+ this.fromTextBox.TabIndex = 1;
+ this.fromTextBox.Text = "me@domain.com";
+ //
+ // toTextBox
+ //
+ this.toTextBox.Location = new System.Drawing.Point(39, 21);
+ this.toTextBox.Name = "toTextBox";
+ this.toTextBox.Size = new System.Drawing.Size(171, 20);
+ this.toTextBox.TabIndex = 9;
+ //
+ // smtpServerLabel
+ //
+ this.smtpServerLabel.AutoSize = true;
+ this.smtpServerLabel.Location = new System.Drawing.Point(6, 21);
+ this.smtpServerLabel.Name = "smtpServerLabel";
+ this.smtpServerLabel.Size = new System.Drawing.Size(74, 13);
+ this.smtpServerLabel.TabIndex = 10;
+ this.smtpServerLabel.Text = "SMTP Server:";
+ //
+ // smtpServerTextBox
+ //
+ this.smtpServerTextBox.Location = new System.Drawing.Point(86, 18);
+ this.smtpServerTextBox.Name = "smtpServerTextBox";
+ this.smtpServerTextBox.Size = new System.Drawing.Size(149, 20);
+ this.smtpServerTextBox.TabIndex = 11;
+ //
+ // useSslCheckBox
+ //
+ this.useSslCheckBox.AutoSize = true;
+ this.useSslCheckBox.Location = new System.Drawing.Point(86, 99);
+ this.useSslCheckBox.Name = "useSslCheckBox";
+ this.useSslCheckBox.Size = new System.Drawing.Size(68, 17);
+ this.useSslCheckBox.TabIndex = 13;
+ this.useSslCheckBox.Text = "Use SSL";
+ this.useSslCheckBox.UseVisualStyleBackColor = true;
+ this.useSslCheckBox.CheckedChanged += new System.EventHandler(this.UseSslCheckBox_CheckedChanged);
+ //
+ // portLabel
+ //
+ this.portLabel.AutoSize = true;
+ this.portLabel.Location = new System.Drawing.Point(6, 75);
+ this.portLabel.Name = "portLabel";
+ this.portLabel.Size = new System.Drawing.Size(29, 13);
+ this.portLabel.TabIndex = 14;
+ this.portLabel.Text = "Port:";
+ //
+ // portNumericUpDown
+ //
+ this.portNumericUpDown.Enabled = false;
+ this.portNumericUpDown.Location = new System.Drawing.Point(86, 73);
+ this.portNumericUpDown.Name = "portNumericUpDown";
+ this.portNumericUpDown.Size = new System.Drawing.Size(44, 20);
+ this.portNumericUpDown.TabIndex = 15;
+ this.portNumericUpDown.Value = new decimal(new int[] {
+ 25,
+ 0,
+ 0,
+ 0});
+ //
+ // priorityLabel
+ //
+ this.priorityLabel.AutoSize = true;
+ this.priorityLabel.Location = new System.Drawing.Point(6, 47);
+ this.priorityLabel.Name = "priorityLabel";
+ this.priorityLabel.Size = new System.Drawing.Size(41, 13);
+ this.priorityLabel.TabIndex = 16;
+ this.priorityLabel.Text = "Priority:";
+ //
+ // priorityComboBox
+ //
+ this.priorityComboBox.DropDownStyle = System.Windows.Forms.ComboBoxStyle.DropDownList;
+ this.priorityComboBox.FormattingEnabled = true;
+ this.priorityComboBox.Items.AddRange(new object[] {
+ "High",
+ "Normal",
+ "Low"});
+ this.priorityComboBox.Location = new System.Drawing.Point(86, 44);
+ this.priorityComboBox.Name = "priorityComboBox";
+ this.priorityComboBox.Size = new System.Drawing.Size(98, 21);
+ this.priorityComboBox.TabIndex = 17;
+ //
+ // useAuthenticationCheckBox
+ //
+ this.useAuthenticationCheckBox.AutoSize = true;
+ this.useAuthenticationCheckBox.Location = new System.Drawing.Point(86, 15);
+ this.useAuthenticationCheckBox.Name = "useAuthenticationCheckBox";
+ this.useAuthenticationCheckBox.Size = new System.Drawing.Size(116, 17);
+ this.useAuthenticationCheckBox.TabIndex = 18;
+ this.useAuthenticationCheckBox.Text = "Use Authentication";
+ this.useAuthenticationCheckBox.UseVisualStyleBackColor = true;
+ this.useAuthenticationCheckBox.CheckedChanged += new System.EventHandler(this.UseAuthenticationCheckBox_CheckedChanged);
+ //
+ // usernameTextBox
+ //
+ this.usernameTextBox.Enabled = false;
+ this.usernameTextBox.Location = new System.Drawing.Point(86, 38);
+ this.usernameTextBox.Name = "usernameTextBox";
+ this.usernameTextBox.Size = new System.Drawing.Size(149, 20);
+ this.usernameTextBox.TabIndex = 20;
+ //
+ // usernameLabel
+ //
+ this.usernameLabel.AutoSize = true;
+ this.usernameLabel.Location = new System.Drawing.Point(6, 41);
+ this.usernameLabel.Name = "usernameLabel";
+ this.usernameLabel.Size = new System.Drawing.Size(58, 13);
+ this.usernameLabel.TabIndex = 19;
+ this.usernameLabel.Text = "Username:";
+ //
+ // passwordTextBox
+ //
+ this.passwordTextBox.Enabled = false;
+ this.passwordTextBox.Location = new System.Drawing.Point(86, 64);
+ this.passwordTextBox.Name = "passwordTextBox";
+ this.passwordTextBox.Size = new System.Drawing.Size(149, 20);
+ this.passwordTextBox.TabIndex = 22;
+ //
+ // passwordLabel
+ //
+ this.passwordLabel.AutoSize = true;
+ this.passwordLabel.Location = new System.Drawing.Point(6, 67);
+ this.passwordLabel.Name = "passwordLabel";
+ this.passwordLabel.Size = new System.Drawing.Size(56, 13);
+ this.passwordLabel.TabIndex = 21;
+ this.passwordLabel.Text = "Password:";
+ //
+ // ccTextBox
+ //
+ this.ccTextBox.Location = new System.Drawing.Point(39, 159);
+ this.ccTextBox.Name = "ccTextBox";
+ this.ccTextBox.Size = new System.Drawing.Size(171, 20);
+ this.ccTextBox.TabIndex = 27;
+ //
+ // ccRemoveButton
+ //
+ this.ccRemoveButton.Location = new System.Drawing.Point(216, 204);
+ this.ccRemoveButton.Name = "ccRemoveButton";
+ this.ccRemoveButton.Size = new System.Drawing.Size(61, 20);
+ this.ccRemoveButton.TabIndex = 26;
+ this.ccRemoveButton.Text = "Remove";
+ this.ccRemoveButton.UseVisualStyleBackColor = true;
+ this.ccRemoveButton.Click += new System.EventHandler(this.CcRemoveButton_Click);
+ //
+ // ccAddButton
+ //
+ this.ccAddButton.Location = new System.Drawing.Point(216, 159);
+ this.ccAddButton.Name = "ccAddButton";
+ this.ccAddButton.Size = new System.Drawing.Size(61, 20);
+ this.ccAddButton.TabIndex = 25;
+ this.ccAddButton.Text = "Add";
+ this.ccAddButton.UseVisualStyleBackColor = true;
+ this.ccAddButton.Click += new System.EventHandler(this.CcAddButton_Click);
+ //
+ // ccListBox
+ //
+ this.ccListBox.FormattingEnabled = true;
+ this.ccListBox.Location = new System.Drawing.Point(39, 185);
+ this.ccListBox.Name = "ccListBox";
+ this.ccListBox.Size = new System.Drawing.Size(171, 56);
+ this.ccListBox.TabIndex = 24;
+ //
+ // ccLabel
+ //
+ this.ccLabel.AutoSize = true;
+ this.ccLabel.Location = new System.Drawing.Point(10, 162);
+ this.ccLabel.Name = "ccLabel";
+ this.ccLabel.Size = new System.Drawing.Size(23, 13);
+ this.ccLabel.TabIndex = 23;
+ this.ccLabel.Text = "Cc:";
+ //
+ // bccTextBox
+ //
+ this.bccTextBox.Location = new System.Drawing.Point(39, 259);
+ this.bccTextBox.Name = "bccTextBox";
+ this.bccTextBox.Size = new System.Drawing.Size(171, 20);
+ this.bccTextBox.TabIndex = 32;
+ //
+ // bccRemoveButton
+ //
+ this.bccRemoveButton.Location = new System.Drawing.Point(216, 304);
+ this.bccRemoveButton.Name = "bccRemoveButton";
+ this.bccRemoveButton.Size = new System.Drawing.Size(61, 20);
+ this.bccRemoveButton.TabIndex = 31;
+ this.bccRemoveButton.Text = "Remove";
+ this.bccRemoveButton.UseVisualStyleBackColor = true;
+ this.bccRemoveButton.Click += new System.EventHandler(this.BccRemoveButton_Click);
+ //
+ // bccAddButton
+ //
+ this.bccAddButton.Location = new System.Drawing.Point(216, 259);
+ this.bccAddButton.Name = "bccAddButton";
+ this.bccAddButton.Size = new System.Drawing.Size(61, 20);
+ this.bccAddButton.TabIndex = 30;
+ this.bccAddButton.Text = "Add";
+ this.bccAddButton.UseVisualStyleBackColor = true;
+ this.bccAddButton.Click += new System.EventHandler(this.BccAddButton_Click);
+ //
+ // bccListBox
+ //
+ this.bccListBox.FormattingEnabled = true;
+ this.bccListBox.Location = new System.Drawing.Point(39, 285);
+ this.bccListBox.Name = "bccListBox";
+ this.bccListBox.Size = new System.Drawing.Size(171, 56);
+ this.bccListBox.TabIndex = 29;
+ //
+ // bccLabel
+ //
+ this.bccLabel.AutoSize = true;
+ this.bccLabel.Location = new System.Drawing.Point(6, 262);
+ this.bccLabel.Name = "bccLabel";
+ this.bccLabel.Size = new System.Drawing.Size(29, 13);
+ this.bccLabel.TabIndex = 28;
+ this.bccLabel.Text = "Bcc:";
+ //
+ // customSubjectTextBox
+ //
+ this.customSubjectTextBox.Location = new System.Drawing.Point(6, 36);
+ this.customSubjectTextBox.Name = "customSubjectTextBox";
+ this.customSubjectTextBox.Size = new System.Drawing.Size(229, 20);
+ this.customSubjectTextBox.TabIndex = 34;
+ //
+ // customSubjectLabel
+ //
+ this.customSubjectLabel.AutoSize = true;
+ this.customSubjectLabel.Location = new System.Drawing.Point(6, 19);
+ this.customSubjectLabel.Name = "customSubjectLabel";
+ this.customSubjectLabel.Size = new System.Drawing.Size(84, 13);
+ this.customSubjectLabel.TabIndex = 33;
+ this.customSubjectLabel.Text = "Custom Subject:";
+ //
+ // customBodyTextBox
+ //
+ this.customBodyTextBox.Location = new System.Drawing.Point(6, 76);
+ this.customBodyTextBox.Multiline = true;
+ this.customBodyTextBox.Name = "customBodyTextBox";
+ this.customBodyTextBox.Size = new System.Drawing.Size(229, 60);
+ this.customBodyTextBox.TabIndex = 36;
+ //
+ // customBodyLabel
+ //
+ this.customBodyLabel.AutoSize = true;
+ this.customBodyLabel.Location = new System.Drawing.Point(6, 59);
+ this.customBodyLabel.Name = "customBodyLabel";
+ this.customBodyLabel.Size = new System.Drawing.Size(72, 13);
+ this.customBodyLabel.TabIndex = 35;
+ this.customBodyLabel.Text = "Custom Body:";
+ //
+ // replyToTextBox
+ //
+ this.replyToTextBox.Location = new System.Drawing.Point(65, 357);
+ this.replyToTextBox.Name = "replyToTextBox";
+ this.replyToTextBox.Size = new System.Drawing.Size(145, 20);
+ this.replyToTextBox.TabIndex = 38;
+ //
+ // replyToLabel
+ //
+ this.replyToLabel.AutoSize = true;
+ this.replyToLabel.Location = new System.Drawing.Point(6, 360);
+ this.replyToLabel.Name = "replyToLabel";
+ this.replyToLabel.Size = new System.Drawing.Size(53, 13);
+ this.replyToLabel.TabIndex = 37;
+ this.replyToLabel.Text = "Reply To:";
+ //
+ // useAttachmentCheckBox
+ //
+ this.useAttachmentCheckBox.AutoSize = true;
+ this.useAttachmentCheckBox.Location = new System.Drawing.Point(10, 24);
+ this.useAttachmentCheckBox.Name = "useAttachmentCheckBox";
+ this.useAttachmentCheckBox.Size = new System.Drawing.Size(299, 17);
+ this.useAttachmentCheckBox.TabIndex = 39;
+ this.useAttachmentCheckBox.Text = "Send compressed report file (Exception.zip) as attachment";
+ this.useAttachmentCheckBox.UseVisualStyleBackColor = true;
+ //
+ // noteLabel
+ //
+ this.noteLabel.AutoSize = true;
+ this.noteLabel.Location = new System.Drawing.Point(9, 476);
+ this.noteLabel.Name = "noteLabel";
+ this.noteLabel.Size = new System.Drawing.Size(162, 13);
+ this.noteLabel.TabIndex = 40;
+ this.noteLabel.Text = "Note: * Denotes mendatory fields";
+ //
+ // fromGroupBox
+ //
+ this.fromGroupBox.Controls.Add(this.fromLabel);
+ this.fromGroupBox.Controls.Add(this.fromTextBox);
+ this.fromGroupBox.Controls.Add(this.fromNameLabel);
+ this.fromGroupBox.Controls.Add(this.fromNameTextBox);
+ this.fromGroupBox.Location = new System.Drawing.Point(3, 3);
+ this.fromGroupBox.Name = "fromGroupBox";
+ this.fromGroupBox.Padding = new System.Windows.Forms.Padding(3, 8, 3, 3);
+ this.fromGroupBox.Size = new System.Drawing.Size(249, 75);
+ this.fromGroupBox.TabIndex = 41;
+ this.fromGroupBox.TabStop = false;
+ this.fromGroupBox.Text = "From";
+ //
+ // smtpServerGroupBox
+ //
+ this.smtpServerGroupBox.Controls.Add(this.securityLabel);
+ this.smtpServerGroupBox.Controls.Add(this.defaultPortCheckBox);
+ this.smtpServerGroupBox.Controls.Add(this.smtpServerLabel);
+ this.smtpServerGroupBox.Controls.Add(this.smtpServerTextBox);
+ this.smtpServerGroupBox.Controls.Add(this.priorityLabel);
+ this.smtpServerGroupBox.Controls.Add(this.priorityComboBox);
+ this.smtpServerGroupBox.Controls.Add(this.portNumericUpDown);
+ this.smtpServerGroupBox.Controls.Add(this.portLabel);
+ this.smtpServerGroupBox.Controls.Add(this.useSslCheckBox);
+ this.smtpServerGroupBox.Location = new System.Drawing.Point(3, 84);
+ this.smtpServerGroupBox.Name = "smtpServerGroupBox";
+ this.smtpServerGroupBox.Padding = new System.Windows.Forms.Padding(3, 8, 3, 3);
+ this.smtpServerGroupBox.Size = new System.Drawing.Size(249, 125);
+ this.smtpServerGroupBox.TabIndex = 42;
+ this.smtpServerGroupBox.TabStop = false;
+ this.smtpServerGroupBox.Text = "SMTP Server";
+ //
+ // mailGroupBox
+ //
+ this.mailGroupBox.Controls.Add(this.customSubjectLabel);
+ this.mailGroupBox.Controls.Add(this.customSubjectTextBox);
+ this.mailGroupBox.Controls.Add(this.customBodyLabel);
+ this.mailGroupBox.Controls.Add(this.customBodyTextBox);
+ this.mailGroupBox.Location = new System.Drawing.Point(3, 315);
+ this.mailGroupBox.Name = "mailGroupBox";
+ this.mailGroupBox.Padding = new System.Windows.Forms.Padding(3, 6, 3, 3);
+ this.mailGroupBox.Size = new System.Drawing.Size(249, 146);
+ this.mailGroupBox.TabIndex = 42;
+ this.mailGroupBox.TabStop = false;
+ this.mailGroupBox.Text = "Mail";
+ //
+ // authenticationGroupBox
+ //
+ this.authenticationGroupBox.Controls.Add(this.useAuthenticationCheckBox);
+ this.authenticationGroupBox.Controls.Add(this.usernameLabel);
+ this.authenticationGroupBox.Controls.Add(this.usernameTextBox);
+ this.authenticationGroupBox.Controls.Add(this.passwordLabel);
+ this.authenticationGroupBox.Controls.Add(this.passwordTextBox);
+ this.authenticationGroupBox.Location = new System.Drawing.Point(3, 215);
+ this.authenticationGroupBox.Name = "authenticationGroupBox";
+ this.authenticationGroupBox.Size = new System.Drawing.Size(249, 94);
+ this.authenticationGroupBox.TabIndex = 42;
+ this.authenticationGroupBox.TabStop = false;
+ this.authenticationGroupBox.Text = "Authentication";
+ //
+ // recepientsGroupBox
+ //
+ this.recepientsGroupBox.Controls.Add(this.replyToLabel);
+ this.recepientsGroupBox.Controls.Add(this.replyToTextBox);
+ this.recepientsGroupBox.Controls.Add(this.toLabel);
+ this.recepientsGroupBox.Controls.Add(this.toListBox);
+ this.recepientsGroupBox.Controls.Add(this.toAddButton);
+ this.recepientsGroupBox.Controls.Add(this.toRemoveButton);
+ this.recepientsGroupBox.Controls.Add(this.toTextBox);
+ this.recepientsGroupBox.Controls.Add(this.ccLabel);
+ this.recepientsGroupBox.Controls.Add(this.ccListBox);
+ this.recepientsGroupBox.Controls.Add(this.ccAddButton);
+ this.recepientsGroupBox.Controls.Add(this.ccRemoveButton);
+ this.recepientsGroupBox.Controls.Add(this.bccTextBox);
+ this.recepientsGroupBox.Controls.Add(this.ccTextBox);
+ this.recepientsGroupBox.Controls.Add(this.bccRemoveButton);
+ this.recepientsGroupBox.Controls.Add(this.bccLabel);
+ this.recepientsGroupBox.Controls.Add(this.bccAddButton);
+ this.recepientsGroupBox.Controls.Add(this.bccListBox);
+ this.recepientsGroupBox.Location = new System.Drawing.Point(278, 3);
+ this.recepientsGroupBox.Name = "recepientsGroupBox";
+ this.recepientsGroupBox.Size = new System.Drawing.Size(311, 391);
+ this.recepientsGroupBox.TabIndex = 42;
+ this.recepientsGroupBox.TabStop = false;
+ this.recepientsGroupBox.Text = "Recepients";
+ //
+ // attachmentsGroupBox
+ //
+ this.attachmentsGroupBox.Controls.Add(this.useAttachmentCheckBox);
+ this.attachmentsGroupBox.Location = new System.Drawing.Point(278, 400);
+ this.attachmentsGroupBox.Name = "attachmentsGroupBox";
+ this.attachmentsGroupBox.Size = new System.Drawing.Size(311, 56);
+ this.attachmentsGroupBox.TabIndex = 43;
+ this.attachmentsGroupBox.TabStop = false;
+ this.attachmentsGroupBox.Text = "Attachments";
+ //
+ // defaultPortCheckBox
+ //
+ this.defaultPortCheckBox.AutoSize = true;
+ this.defaultPortCheckBox.Checked = true;
+ this.defaultPortCheckBox.CheckState = System.Windows.Forms.CheckState.Checked;
+ this.defaultPortCheckBox.Location = new System.Drawing.Point(140, 75);
+ this.defaultPortCheckBox.Name = "defaultPortCheckBox";
+ this.defaultPortCheckBox.Size = new System.Drawing.Size(60, 17);
+ this.defaultPortCheckBox.TabIndex = 18;
+ this.defaultPortCheckBox.Text = "Default";
+ this.defaultPortCheckBox.UseVisualStyleBackColor = true;
+ this.defaultPortCheckBox.CheckedChanged += new System.EventHandler(this.DefaultPortCheckBox_CheckedChanged);
+ //
+ // securityLabel
+ //
+ this.securityLabel.AutoSize = true;
+ this.securityLabel.Location = new System.Drawing.Point(6, 100);
+ this.securityLabel.Name = "securityLabel";
+ this.securityLabel.Size = new System.Drawing.Size(48, 13);
+ this.securityLabel.TabIndex = 19;
+ this.securityLabel.Text = "Security:";
+ //
+ // Mail
+ //
+ this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F);
+ this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
+ this.Controls.Add(this.attachmentsGroupBox);
+ this.Controls.Add(this.mailGroupBox);
+ this.Controls.Add(this.recepientsGroupBox);
+ this.Controls.Add(this.authenticationGroupBox);
+ this.Controls.Add(this.smtpServerGroupBox);
+ this.Controls.Add(this.fromGroupBox);
+ this.Controls.Add(this.noteLabel);
+ this.Name = "Mail";
+ this.Size = new System.Drawing.Size(660, 552);
+ ((System.ComponentModel.ISupportInitialize)(this.portNumericUpDown)).EndInit();
+ this.fromGroupBox.ResumeLayout(false);
+ this.fromGroupBox.PerformLayout();
+ this.smtpServerGroupBox.ResumeLayout(false);
+ this.smtpServerGroupBox.PerformLayout();
+ this.mailGroupBox.ResumeLayout(false);
+ this.mailGroupBox.PerformLayout();
+ this.authenticationGroupBox.ResumeLayout(false);
+ this.authenticationGroupBox.PerformLayout();
+ this.recepientsGroupBox.ResumeLayout(false);
+ this.recepientsGroupBox.PerformLayout();
+ this.attachmentsGroupBox.ResumeLayout(false);
+ this.attachmentsGroupBox.PerformLayout();
+ this.ResumeLayout(false);
+ this.PerformLayout();
+
+ }
+
+ #endregion
+
+ private System.Windows.Forms.Label fromLabel;
+ private System.Windows.Forms.TextBox fromNameTextBox;
+ private System.Windows.Forms.Label fromNameLabel;
+ private System.Windows.Forms.Label toLabel;
+ private System.Windows.Forms.ListBox toListBox;
+ private System.Windows.Forms.Button toAddButton;
+ private System.Windows.Forms.Button toRemoveButton;
+ private System.Windows.Forms.TextBox fromTextBox;
+ private System.Windows.Forms.TextBox toTextBox;
+ private System.Windows.Forms.Label smtpServerLabel;
+ private System.Windows.Forms.TextBox smtpServerTextBox;
+ private System.Windows.Forms.CheckBox useSslCheckBox;
+ private System.Windows.Forms.Label portLabel;
+ private System.Windows.Forms.NumericUpDown portNumericUpDown;
+ private System.Windows.Forms.Label priorityLabel;
+ private System.Windows.Forms.ComboBox priorityComboBox;
+ private System.Windows.Forms.CheckBox useAuthenticationCheckBox;
+ private System.Windows.Forms.TextBox usernameTextBox;
+ private System.Windows.Forms.Label usernameLabel;
+ private System.Windows.Forms.TextBox passwordTextBox;
+ private System.Windows.Forms.Label passwordLabel;
+ private System.Windows.Forms.TextBox ccTextBox;
+ private System.Windows.Forms.Button ccRemoveButton;
+ private System.Windows.Forms.Button ccAddButton;
+ private System.Windows.Forms.ListBox ccListBox;
+ private System.Windows.Forms.Label ccLabel;
+ private System.Windows.Forms.TextBox bccTextBox;
+ private System.Windows.Forms.Button bccRemoveButton;
+ private System.Windows.Forms.Button bccAddButton;
+ private System.Windows.Forms.ListBox bccListBox;
+ private System.Windows.Forms.Label bccLabel;
+ private System.Windows.Forms.TextBox customSubjectTextBox;
+ private System.Windows.Forms.Label customSubjectLabel;
+ private System.Windows.Forms.TextBox customBodyTextBox;
+ private System.Windows.Forms.Label customBodyLabel;
+ private System.Windows.Forms.TextBox replyToTextBox;
+ private System.Windows.Forms.Label replyToLabel;
+ private System.Windows.Forms.CheckBox useAttachmentCheckBox;
+ private System.Windows.Forms.Label noteLabel;
+ private System.Windows.Forms.GroupBox fromGroupBox;
+ private System.Windows.Forms.GroupBox smtpServerGroupBox;
+ private System.Windows.Forms.GroupBox mailGroupBox;
+ private System.Windows.Forms.GroupBox authenticationGroupBox;
+ private System.Windows.Forms.GroupBox recepientsGroupBox;
+ private System.Windows.Forms.GroupBox attachmentsGroupBox;
+ private System.Windows.Forms.Label securityLabel;
+ private System.Windows.Forms.CheckBox defaultPortCheckBox;
+ }
+}
diff --git a/NBug.Configurator/SubmitPanels/Web/Mail.cs b/NBug.Configurator/SubmitPanels/Web/Mail.cs
new file mode 100644
index 0000000..85cb827
--- /dev/null
+++ b/NBug.Configurator/SubmitPanels/Web/Mail.cs
@@ -0,0 +1,222 @@
+// --------------------------------------------------------------------------------------------------------------------
+//
+// Copyright © 2010 - 2011 Teoman Soygul. Licensed under LGPLv3 (http://www.gnu.org/licenses/lgpl.html).
+//
+// --------------------------------------------------------------------------------------------------------------------
+
+namespace NBug.Configurator.SubmitPanels.Web
+{
+ using System;
+ using System.Windows.Forms;
+
+ public partial class Mail : UserControl, ISubmitPanel
+ {
+ public Mail()
+ {
+ InitializeComponent();
+ this.portNumericUpDown.Maximum = decimal.MaxValue;
+ }
+
+ public string ConnectionString
+ {
+ get
+ {
+ // Check the mendatory fields
+ if (this.toListBox.Items.Count == 0)
+ {
+ MessageBox.Show("Mandatory field \"" + toLabel.Name + "\" cannot be left blank.", "Warning", MessageBoxButtons.OK, MessageBoxIcon.Warning);
+ return null;
+ }
+
+ var mail = new Core.Submission.Web.Mail
+ {
+ From = this.fromTextBox.Text,
+ FromName = this.fromNameTextBox.Text,
+ ReplyTo = this.replyToTextBox.Text,
+ CustomSubject = this.customSubjectTextBox.Text,
+ CustomBody = this.customBodyTextBox.Text,
+ SmtpServer = this.smtpServerTextBox.Text,
+ Priority = this.priorityComboBox.Text
+ };
+
+ foreach (var item in this.toListBox.Items)
+ {
+ mail.To += item + ",";
+ }
+
+ mail.To = mail.To.TrimEnd(new[] { ',' });
+
+ if (this.ccListBox.Items.Count != 0)
+ {
+ foreach (var item in this.ccListBox.Items)
+ {
+ mail.Cc += item + ",";
+ }
+
+ mail.Cc = mail.Cc.TrimEnd(new[] { ',' });
+ }
+
+ if (this.bccListBox.Items.Count != 0)
+ {
+ foreach (var item in this.bccListBox.Items)
+ {
+ mail.Bcc += item + ",";
+ }
+
+ mail.Bcc = mail.Bcc.TrimEnd(new[] { ',' });
+ }
+
+ if (!this.defaultPortCheckBox.Checked)
+ {
+ mail.Port = this.portNumericUpDown.Text;
+ }
+
+
+ if (this.useAuthenticationCheckBox.Checked)
+ {
+ // Make sure that we can use authentication even with emtpy username and password
+ if (string.IsNullOrEmpty(this.usernameTextBox.Text))
+ {
+ mail.UseAuthentication = "true";
+ }
+
+ mail.Username = this.usernameTextBox.Text;
+ mail.Password = this.passwordTextBox.Text;
+ }
+
+ if (this.useSslCheckBox.Checked)
+ {
+ mail.UseSsl = "true";
+ }
+
+ if (this.useAttachmentCheckBox.Checked)
+ {
+ mail.UseAttachment = "true";
+ }
+
+ return mail.ConnectionString;
+ }
+
+ set
+ {
+ var mail = new Core.Submission.Web.Mail(value);
+
+ this.fromTextBox.Text = mail.From;
+ this.fromNameTextBox.Text = mail.FromName;
+ this.smtpServerTextBox.Text = mail.SmtpServer;
+ this.useSslCheckBox.Checked = Convert.ToBoolean(mail.UseSsl);
+ this.priorityComboBox.SelectedItem = mail.Priority;
+ this.useAuthenticationCheckBox.Checked = Convert.ToBoolean(mail.UseAuthentication);
+ this.usernameTextBox.Text = mail.Username;
+ this.passwordTextBox.Text = mail.Password;
+ this.customSubjectTextBox.Text = mail.CustomSubject;
+ this.customBodyTextBox.Text = mail.CustomBody;
+ this.replyToTextBox.Text = mail.ReplyTo;
+ this.useAttachmentCheckBox.Checked = Convert.ToBoolean(mail.UseAttachment);
+
+ if (!string.IsNullOrEmpty(mail.Port))
+ {
+ this.portNumericUpDown.Value = Convert.ToInt32(mail.Port);
+ }
+
+ if (this.portNumericUpDown.Value == 25 || this.portNumericUpDown.Value == 465 || string.IsNullOrEmpty(mail.Port))
+ {
+ this.defaultPortCheckBox.Checked = true;
+ }
+ else
+ {
+ this.defaultPortCheckBox.Checked = false;
+ }
+
+ this.toListBox.Items.Clear();
+ if (!string.IsNullOrEmpty(mail.To))
+ {
+ foreach (var to in mail.To.Split(','))
+ {
+ this.toListBox.Items.Add(to);
+ }
+ }
+
+ this.ccListBox.Items.Clear();
+ if (!string.IsNullOrEmpty(mail.Cc))
+ {
+ foreach (var cc in mail.Cc.Split(','))
+ {
+ this.ccListBox.Items.Add(cc);
+ }
+ }
+
+ this.bccListBox.Items.Clear();
+ if (!string.IsNullOrEmpty(mail.Bcc))
+ {
+ foreach (var bcc in mail.Bcc.Split(','))
+ {
+ this.bccListBox.Items.Add(bcc);
+ }
+ }
+ }
+ }
+
+ private void ToAddButton_Click(object sender, EventArgs e)
+ {
+ this.toListBox.Items.Add(this.toTextBox.Text);
+ }
+
+ private void ToRemoveButton_Click(object sender, EventArgs e)
+ {
+ this.toListBox.Items.RemoveAt(this.toListBox.SelectedIndex);
+ }
+
+ private void CcAddButton_Click(object sender, EventArgs e)
+ {
+ this.ccListBox.Items.Add(this.ccTextBox.Text);
+ }
+
+ private void CcRemoveButton_Click(object sender, EventArgs e)
+ {
+ this.ccListBox.Items.RemoveAt(this.ccListBox.SelectedIndex);
+ }
+
+ private void BccAddButton_Click(object sender, EventArgs e)
+ {
+ this.bccListBox.Items.Add(this.bccTextBox.Text);
+ }
+
+ private void BccRemoveButton_Click(object sender, EventArgs e)
+ {
+ this.bccListBox.Items.RemoveAt(this.bccListBox.SelectedIndex);
+ }
+
+ private void UseSslCheckBox_CheckedChanged(object sender, EventArgs e)
+ {
+ this.portNumericUpDown.Value = this.useSslCheckBox.Checked ? 465 : 25;
+ }
+
+ private void UseAuthenticationCheckBox_CheckedChanged(object sender, EventArgs e)
+ {
+ if (this.useAuthenticationCheckBox.Checked)
+ {
+ this.usernameTextBox.Enabled = true;
+ this.passwordTextBox.Enabled = true;
+ }
+ else
+ {
+ this.usernameTextBox.Enabled = false;
+ this.passwordTextBox.Enabled = false;
+ }
+ }
+
+ private void DefaultPortCheckBox_CheckedChanged(object sender, EventArgs e)
+ {
+ if (this.defaultPortCheckBox.Checked)
+ {
+ this.portNumericUpDown.Enabled = false;
+ this.portNumericUpDown.Value = this.useSslCheckBox.Checked ? 465 : 25;
+ }
+ else
+ {
+ this.portNumericUpDown.Enabled = true;
+ }
+ }
+ }
+}
diff --git a/NBug.Configurator/SubmitPanels/Web/Mail.resx b/NBug.Configurator/SubmitPanels/Web/Mail.resx
new file mode 100644
index 0000000..29dcb1b
--- /dev/null
+++ b/NBug.Configurator/SubmitPanels/Web/Mail.resx
@@ -0,0 +1,120 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ text/microsoft-resx
+
+
+ 2.0
+
+
+ System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089
+
+
+ System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089
+
+
\ No newline at end of file
diff --git a/NBug.Configurator/app.config b/NBug.Configurator/app.config
new file mode 100644
index 0000000..f76deb9
--- /dev/null
+++ b/NBug.Configurator/app.config
@@ -0,0 +1,3 @@
+
+
+
diff --git a/NBug.Configurator/resources/AboutBox.png b/NBug.Configurator/resources/AboutBox.png
new file mode 100644
index 0000000..0157c49
Binary files /dev/null and b/NBug.Configurator/resources/AboutBox.png differ
diff --git a/NBug.Configurator/resources/Icon.png b/NBug.Configurator/resources/Icon.png
new file mode 100644
index 0000000..a4feec0
Binary files /dev/null and b/NBug.Configurator/resources/Icon.png differ
diff --git a/NBug.Configurator/resources/Icon_16.png b/NBug.Configurator/resources/Icon_16.png
new file mode 100644
index 0000000..2fb73a9
Binary files /dev/null and b/NBug.Configurator/resources/Icon_16.png differ
diff --git a/NBug.Configurator/resources/help.png b/NBug.Configurator/resources/help.png
new file mode 100644
index 0000000..5c87017
Binary files /dev/null and b/NBug.Configurator/resources/help.png differ
diff --git a/NBug.Configurator/resources/run.png b/NBug.Configurator/resources/run.png
new file mode 100644
index 0000000..8e146b4
Binary files /dev/null and b/NBug.Configurator/resources/run.png differ
diff --git a/NBug.Configurator/resources/save.png b/NBug.Configurator/resources/save.png
new file mode 100644
index 0000000..95f6464
Binary files /dev/null and b/NBug.Configurator/resources/save.png differ
diff --git a/NBug.Tests/Functional/DeveloperUITests.cs b/NBug.Tests/Functional/DeveloperUITests.cs
new file mode 100644
index 0000000..7f237bf
--- /dev/null
+++ b/NBug.Tests/Functional/DeveloperUITests.cs
@@ -0,0 +1,70 @@
+// --------------------------------------------------------------------------------------------------------------------
+//
+// Copyright (c) 2010 - 2011 Teoman Soygul. Licensed under LGPLv3 (http://www.gnu.org/licenses/lgpl.html).
+//
+// --------------------------------------------------------------------------------------------------------------------
+
+namespace NBug.Tests.Functional
+{
+ using System;
+
+ using NBug.Core.Reporting;
+ using NBug.Core.Submission;
+ using NBug.Core.UI;
+ using NBug.Core.Util;
+ using NBug.Core.Util.Exceptions;
+ using NBug.Enums;
+ using NBug.Tests.Tools.Extensions;
+ using NBug.Tests.Tools.Fixtures;
+ using NBug.Tests.Tools.Stubs;
+
+ using Xunit;
+
+ public class DeveloperUITests : IUseFixture, IUseFixture
+ {
+ [Fact]
+ public void ConfigErrorWithInternalConfigurationExceptionViewer()
+ {
+ Settings.Destination1 = "Type=Mail;From=postmaster@localhost;FromName=NBug Internal Error Reporter;To=postmaster@localhost;SmtpServer=localhost;";
+ new BugReport().Report(new DummyArgumentException(), ExceptionThread.Main);
+ new Dispatcher(false);
+
+ Settings.UIMode = UIMode.Minimal;
+ Settings.UIProvider = UIProvider.Auto; // This is invalid!
+ Assert.Equal(new BugReport().Report(new Exception(), ExceptionThread.Main), ExecutionFlow.ContinueExecution);
+ }
+
+ [Fact, UI]
+ public void InternalConfigurationExceptionViewer()
+ {
+ NBugConfigurationException.Create(() => Settings.UIMode, "Testing invalid UIMode configuration exception.");
+ }
+
+ [Fact, UI]
+ public void InternalLogViewerWithTrace()
+ {
+ // ToDo: Run it in sync (blocking) mode for testing or otherwise the test runner process will be corrupted
+ // InternalLogViewer.LogEntry("Test log entry", LoggerCategory.NBugTrace);
+ }
+
+ [Fact, UI]
+ public void InternalRuntimeExceptionViewer()
+ {
+ new NBugRuntimeException("Testing runtime exception.", new DummyArgumentException());
+ }
+
+ [Fact, UI]
+ public void InternalRuntimeExceptionViewerWithoutInnerException()
+ {
+ new NBugRuntimeException("Testing runtime exception without inner exception.");
+ }
+
+ public void SetFixture(UIFixture data)
+ {
+ }
+
+ public void SetFixture(SettingsFixture data)
+ {
+ }
+ }
+}
diff --git a/NBug.Tests/Functional/SettingsUITests.cs b/NBug.Tests/Functional/SettingsUITests.cs
new file mode 100644
index 0000000..86782aa
--- /dev/null
+++ b/NBug.Tests/Functional/SettingsUITests.cs
@@ -0,0 +1,349 @@
+// --------------------------------------------------------------------------------------------------------------------
+//
+// Copyright (c) 2010 - 2011 Teoman Soygul. Licensed under LGPLv3 (http://www.gnu.org/licenses/lgpl.html).
+//
+// --------------------------------------------------------------------------------------------------------------------
+
+namespace NBug.Tests.Functional
+{
+ using System;
+ using System.IO;
+ using System.Windows.Forms;
+
+ using NBug.Core.Reporting.Info;
+ using NBug.Core.UI;
+ using NBug.Core.Util;
+ using NBug.Core.Util.Serialization;
+ using NBug.Enums;
+ using NBug.Tests.Tools.Extensions;
+ using NBug.Tests.Tools.Fixtures;
+
+ using Xunit;
+
+ public class SettingsUITests : IUseFixture, IUseFixture, IUseFixture
+ {
+ private Report report;
+
+ private SerializableException serializableException;
+
+ [Fact, UI]
+ public void ExceptionThread_Task()
+ {
+ // By default UI is not shown for task exceptions
+ Assert.Equal(
+ UISelector.DisplayBugReportUI(ExceptionThread.Task, this.serializableException, this.report),
+ new UIDialogResult(ExecutionFlow.ContinueExecution, SendReport.Send));
+
+ Assert.Equal(
+ MessageBox.Show(
+ "ExceptionThread: Task" + Environment.NewLine + Environment.NewLine +
+ "Did you see any UI on the screen?",
+ "Assert Question",
+ MessageBoxButtons.YesNo,
+ MessageBoxIcon.Question),
+ DialogResult.No);
+ }
+
+ public void SetFixture(SettingsFixture settings)
+ {
+ // Reset settings before each run
+ // settings.ReloadDefaults();
+ }
+
+ public void SetFixture(UIFixture ui)
+ {
+ }
+
+ public void SetFixture(ReportFixture reportFixture)
+ {
+ this.serializableException = reportFixture.SerializableException;
+ this.report = reportFixture.Report;
+ }
+
+ [Fact, UI]
+ public void UIMode_AutoExceptionThread_Main()
+ {
+ // Auto mode displays minimal UI by default
+ Settings.UIMode = UIMode.Auto;
+
+ // By default UIFixture loads System.Windows.Forms so this should not behave as console but WinForms UI
+ Assert.Equal(
+ UISelector.DisplayBugReportUI(ExceptionThread.Main, this.serializableException, this.report),
+ new UIDialogResult(ExecutionFlow.BreakExecution, SendReport.Send));
+
+ Assert.Equal(
+ MessageBox.Show(
+ "UIMode: Auto" + Environment.NewLine +
+ "ExceptionThread: Main" + Environment.NewLine +
+ "Loaded Assembly: System.Windows.Forms" + Environment.NewLine + Environment.NewLine +
+ "Did you see a Minimal WinForms message box?",
+ "Assert Question",
+ MessageBoxButtons.YesNo,
+ MessageBoxIcon.Question),
+ DialogResult.Yes);
+ }
+
+ [Fact, UI]
+ public void UIMode_AutoExceptionThread_WPF()
+ {
+ // Auto mode displays minimal UI by default
+ Settings.UIMode = UIMode.Auto;
+
+ // UIMode:Auto and exception on WPF thread
+ Assert.Equal(
+ UISelector.DisplayBugReportUI(ExceptionThread.UI_WPF, this.serializableException, this.report),
+ new UIDialogResult(ExecutionFlow.BreakExecution, SendReport.Send));
+
+ Assert.Equal(
+ MessageBox.Show(
+ "UIMode: Auto" + Environment.NewLine +
+ "ExceptionThread: WPF" + Environment.NewLine + Environment.NewLine +
+ "Did you see a Minimal WPF message box?",
+ "Assert Question",
+ MessageBoxButtons.YesNo,
+ MessageBoxIcon.Question),
+ DialogResult.Yes);
+ }
+
+ [Fact, UI]
+ public void UIMode_AutoExceptionThread_WinForms()
+ {
+ // Auto mode displays minimal UI by default
+ Settings.UIMode = UIMode.Auto;
+
+ // UIMode:Auto and exception on WinForms thread
+ Assert.Equal(
+ UISelector.DisplayBugReportUI(ExceptionThread.UI_WinForms, this.serializableException, this.report),
+ new UIDialogResult(ExecutionFlow.BreakExecution, SendReport.Send));
+
+ Assert.Equal(
+ MessageBox.Show(
+ "UIMode: Auto" + Environment.NewLine +
+ "ExceptionThread: WinForms" + Environment.NewLine + Environment.NewLine +
+ "Did you see a Minimal WinForms message box?",
+ "Assert Question",
+ MessageBoxButtons.YesNo,
+ MessageBoxIcon.Question),
+ DialogResult.Yes);
+ }
+
+ [Fact, UI]
+ public void UIMode_None()
+ {
+ Settings.UIMode = UIMode.None;
+
+ Assert.Equal(
+ UISelector.DisplayBugReportUI(ExceptionThread.UI_WinForms, this.serializableException, this.report),
+ new UIDialogResult(ExecutionFlow.BreakExecution, SendReport.Send));
+
+ Assert.Equal(
+ MessageBox.Show(
+ "ExceptionThread: Task" + Environment.NewLine + Environment.NewLine +
+ "Did you see any UI on the screen?",
+ "Assert Question",
+ MessageBoxButtons.YesNo,
+ MessageBoxIcon.Question),
+ DialogResult.No);
+ }
+
+ [Fact, UI]
+ public void UIProvider_AutoUIMode_Minimal()
+ {
+ Settings.UIProvider = UIProvider.Auto;
+ Settings.UIMode = UIMode.Minimal;
+
+ Assert.Equal(
+ UISelector.DisplayBugReportUI(ExceptionThread.UI_WinForms, this.serializableException, this.report),
+ new UIDialogResult(ExecutionFlow.BreakExecution, SendReport.Send));
+
+ // By default, Visual Studio loads some WinForms dlls so WinForms dialogs will be displayed via auto selection
+ Assert.Equal(
+ MessageBox.Show(
+ "UIProvider: Auto" + Environment.NewLine +
+ "UIMode: Minimal" + Environment.NewLine + Environment.NewLine +
+ "Did you see a Minimal WinForms message box?",
+ "Assert Question",
+ MessageBoxButtons.YesNo,
+ MessageBoxIcon.Question),
+ DialogResult.Yes);
+ }
+
+ [Fact, UI]
+ public void UIProvider_AutoUIMode_Normal()
+ {
+ Settings.UIProvider = UIProvider.Auto;
+ Settings.UIMode = UIMode.Normal;
+
+ MessageBox.Show("Now click 'Quit'", "User Input Required", MessageBoxButtons.OK, MessageBoxIcon.Information);
+ Assert.Equal(
+ UISelector.DisplayBugReportUI(ExceptionThread.Main, this.serializableException, this.report),
+ new UIDialogResult(ExecutionFlow.BreakExecution, SendReport.Send));
+
+ MessageBox.Show("Now click 'Continue'", "User Input Required", MessageBoxButtons.OK, MessageBoxIcon.Information);
+ Assert.Equal(
+ UISelector.DisplayBugReportUI(ExceptionThread.Main, this.serializableException, this.report),
+ new UIDialogResult(ExecutionFlow.ContinueExecution, SendReport.Send));
+
+ // By default, Visual Studio loads some WinForms dlls so WinForms dialogs will be displayed via auto selection
+ Assert.Equal(
+ MessageBox.Show(
+ "UIProvider: Auto" + Environment.NewLine +
+ "UIMode: Normal" + Environment.NewLine + Environment.NewLine +
+ "Did you see a Normal WinForms error dialog?",
+ "Assert Question",
+ MessageBoxButtons.YesNo,
+ MessageBoxIcon.Question),
+ DialogResult.Yes);
+ }
+
+ [Fact, UI]
+ public void UIProvider_ConsoleUIMode_Full()
+ {
+ Settings.UIProvider = UIProvider.Console;
+ Settings.UIMode = UIMode.Full;
+
+ var consoleOut = new StringWriter();
+ Console.SetOut(consoleOut);
+
+ Assert.Equal(
+ UISelector.DisplayBugReportUI(ExceptionThread.Main, this.serializableException, this.report),
+ new UIDialogResult(ExecutionFlow.BreakExecution, SendReport.Send));
+
+ Assert.Equal(
+ MessageBox.Show(
+ "UIProvider: Console" + Environment.NewLine +
+ "UIMode: Full" + Environment.NewLine + Environment.NewLine +
+ "Console Message: " + consoleOut + Environment.NewLine +
+ "Is the message written to the console right?",
+ "Assert Question",
+ MessageBoxButtons.YesNo,
+ MessageBoxIcon.Question),
+ DialogResult.Yes);
+ }
+
+ [Fact, UI]
+ public void UIProvider_ConsoleUIMode_Minimal()
+ {
+ Settings.UIProvider = UIProvider.Console;
+ Settings.UIMode = UIMode.Minimal;
+
+ var consoleOut = new StringWriter();
+ Console.SetOut(consoleOut);
+
+ Assert.Equal(
+ UISelector.DisplayBugReportUI(ExceptionThread.Main, this.serializableException, this.report),
+ new UIDialogResult(ExecutionFlow.BreakExecution, SendReport.Send));
+
+ Assert.Equal(
+ MessageBox.Show(
+ "UIProvider: Console" + Environment.NewLine +
+ "UIMode: Minimal" + Environment.NewLine + Environment.NewLine +
+ "Console Message: " + consoleOut + Environment.NewLine +
+ "Is the message written to the console right?",
+ "Assert Question",
+ MessageBoxButtons.YesNo,
+ MessageBoxIcon.Question),
+ DialogResult.Yes);
+ }
+
+ [Fact, UI]
+ public void UIProvider_ConsoleUIMode_Normal()
+ {
+ Settings.UIProvider = UIProvider.Console;
+ Settings.UIMode = UIMode.Normal;
+
+ var consoleOut = new StringWriter();
+ Console.SetOut(consoleOut);
+
+ Assert.Equal(
+ UISelector.DisplayBugReportUI(ExceptionThread.Main, this.serializableException, this.report),
+ new UIDialogResult(ExecutionFlow.BreakExecution, SendReport.Send));
+
+ Assert.Equal(
+ MessageBox.Show(
+ "UIProvider: Console" + Environment.NewLine +
+ "UIMode: Normal" + Environment.NewLine + Environment.NewLine +
+ "Console Message: " + consoleOut + Environment.NewLine +
+ "Is the message written to the console right?",
+ "Assert Question",
+ MessageBoxButtons.YesNo,
+ MessageBoxIcon.Question),
+ DialogResult.Yes);
+ }
+
+ [Fact, UI]
+ public void UIProvider_WinFormsUIMode_Full()
+ {
+ Settings.UIProvider = UIProvider.WinForms;
+ Settings.UIMode = UIMode.Full;
+
+ MessageBox.Show("Now click 'Send and Quit'", "User Input Required", MessageBoxButtons.OK, MessageBoxIcon.Information);
+ Assert.Equal(
+ UISelector.DisplayBugReportUI(ExceptionThread.Main, this.serializableException, this.report),
+ new UIDialogResult(ExecutionFlow.BreakExecution, SendReport.Send));
+
+ MessageBox.Show("Now click 'Quit'", "User Input Required", MessageBoxButtons.OK, MessageBoxIcon.Information);
+ Assert.Equal(
+ UISelector.DisplayBugReportUI(ExceptionThread.Main, this.serializableException, this.report),
+ new UIDialogResult(ExecutionFlow.BreakExecution, SendReport.DoNotSend));
+
+ Assert.Equal(
+ MessageBox.Show(
+ "UIProvider: WinForms" + Environment.NewLine +
+ "UIMode: Full" + Environment.NewLine + Environment.NewLine +
+ "Did you see a Full WinForms error dialog?",
+ "Assert Question",
+ MessageBoxButtons.YesNo,
+ MessageBoxIcon.Question),
+ DialogResult.Yes);
+ }
+
+ [Fact, UI]
+ public void UIProvider_WinFormsUIMode_Minimal()
+ {
+ Settings.UIProvider = UIProvider.WinForms;
+ Settings.UIMode = UIMode.Minimal;
+
+ Assert.Equal(
+ UISelector.DisplayBugReportUI(ExceptionThread.UI_WinForms, this.serializableException, this.report),
+ new UIDialogResult(ExecutionFlow.BreakExecution, SendReport.Send));
+
+ Assert.Equal(
+ MessageBox.Show(
+ "UIProvider: WinForms" + Environment.NewLine +
+ "UIMode: Minimal" + Environment.NewLine + Environment.NewLine +
+ "Did you see a Minimal WinForms message box?",
+ "Assert Question",
+ MessageBoxButtons.YesNo,
+ MessageBoxIcon.Question),
+ DialogResult.Yes);
+ }
+
+ [Fact, UI]
+ public void UIProvider_WinFormsUIMode_Normal()
+ {
+ Settings.UIProvider = UIProvider.WinForms;
+ Settings.UIMode = UIMode.Normal;
+
+ MessageBox.Show("Now click 'Quit'", "User Input Required", MessageBoxButtons.OK, MessageBoxIcon.Information);
+ Assert.Equal(
+ UISelector.DisplayBugReportUI(ExceptionThread.Main, this.serializableException, this.report),
+ new UIDialogResult(ExecutionFlow.BreakExecution, SendReport.Send));
+
+ MessageBox.Show("Now click 'Continue'", "User Input Required", MessageBoxButtons.OK, MessageBoxIcon.Information);
+ Assert.Equal(
+ UISelector.DisplayBugReportUI(ExceptionThread.Main, this.serializableException, this.report),
+ new UIDialogResult(ExecutionFlow.ContinueExecution, SendReport.Send));
+
+ Assert.Equal(
+ MessageBox.Show(
+ "UIProvider: WinForms" + Environment.NewLine +
+ "UIMode: Normal" + Environment.NewLine + Environment.NewLine +
+ "Did you see a Normal WinForms error dialog?",
+ "Assert Question",
+ MessageBoxButtons.YesNo,
+ MessageBoxIcon.Question),
+ DialogResult.Yes);
+ }
+ }
+}
diff --git a/NBug.Tests/Functional/WinFormsUITests.cs b/NBug.Tests/Functional/WinFormsUITests.cs
new file mode 100644
index 0000000..e47a36b
--- /dev/null
+++ b/NBug.Tests/Functional/WinFormsUITests.cs
@@ -0,0 +1,42 @@
+// --------------------------------------------------------------------------------------------------------------------
+//
+// Copyright (c) 2010 - 2011 Teoman Soygul. Licensed under LGPLv3 (http://www.gnu.org/licenses/lgpl.html).
+//
+// --------------------------------------------------------------------------------------------------------------------
+
+namespace NBug.Tests.Functional
+{
+ using NBug.Core.Reporting.Info;
+ using NBug.Core.UI.WinForms;
+ using NBug.Enums;
+ using NBug.Tests.Tools.Extensions;
+ using NBug.Tests.Tools.Fixtures;
+ using NBug.Tests.Tools.Stubs;
+
+ using Xunit;
+
+ public class WinFormsUITests : IUseFixture, IUseFixture
+ {
+ [Fact, UI]
+ public void Full()
+ {
+ var exception = new DummySerializableException();
+ WinFormsUI.ShowDialog(UIMode.Full, exception, new Report(exception));
+ }
+
+ [Fact, UI]
+ public void Minimal()
+ {
+ var exception = new DummySerializableException();
+ WinFormsUI.ShowDialog(UIMode.Minimal, exception, new Report(exception));
+ }
+
+ public void SetFixture(SettingsFixture settings)
+ {
+ }
+
+ public void SetFixture(UIFixture data)
+ {
+ }
+ }
+}
diff --git a/NBug.Tests/Integration/BugReportTests.cs b/NBug.Tests/Integration/BugReportTests.cs
new file mode 100644
index 0000000..f55579e
--- /dev/null
+++ b/NBug.Tests/Integration/BugReportTests.cs
@@ -0,0 +1,41 @@
+// --------------------------------------------------------------------------------------------------------------------
+//
+// Copyright (c) 2010 - 2011 Teoman Soygul. Licensed under LGPLv3 (http://www.gnu.org/licenses/lgpl.html).
+//
+// --------------------------------------------------------------------------------------------------------------------
+
+namespace NBug.Tests.Integration
+{
+ using NBug.Core.Reporting;
+ using NBug.Core.UI;
+ using NBug.Core.Util;
+ using NBug.Tests.Tools.Fixtures;
+ using NBug.Tests.Tools.Stubs;
+
+ using Xunit;
+
+ public class BugReportTests : IUseFixture, IUseFixture
+ {
+ private ReportFixture report;
+
+ [Fact]
+ public void GenerateBugReport()
+ {
+ Assert.Equal(
+ new BugReport().Report(new DummyArgumentException(), ExceptionThread.UI_WinForms),
+ ExecutionFlow.BreakExecution);
+
+ this.report.VerifyAndDeleteCompressedReportFile();
+ }
+
+ public void SetFixture(SettingsFixture settings)
+ {
+ settings.InitializeStandardSettings();
+ }
+
+ public void SetFixture(ReportFixture reportFixture)
+ {
+ this.report = reportFixture;
+ }
+ }
+}
diff --git a/NBug.Tests/Integration/DispatcherTests.cs b/NBug.Tests/Integration/DispatcherTests.cs
new file mode 100644
index 0000000..842ab48
--- /dev/null
+++ b/NBug.Tests/Integration/DispatcherTests.cs
@@ -0,0 +1,159 @@
+// --------------------------------------------------------------------------------------------------------------------
+//
+// Copyright (c) 2010 - 2011 Teoman Soygul. Licensed under LGPLv3 (http://www.gnu.org/licenses/lgpl.html).
+//
+// --------------------------------------------------------------------------------------------------------------------
+
+namespace NBug.Tests.Integration
+{
+ using System;
+ using System.Diagnostics;
+
+ using NBug.Core.Reporting;
+ using NBug.Core.Submission;
+ using NBug.Core.Util;
+ using NBug.Core.Util.Storage;
+ using NBug.Enums;
+ using NBug.Tests.Tools.Fixtures;
+ using NBug.Tests.Tools.Stubs;
+
+ using Xunit;
+
+ public class DispatcherTests : IUseFixture, IUseFixture
+ {
+ private SettingsFixture settings;
+
+ [Fact]
+ public void EmailDispatcher()
+ {
+ var destinations = this.settings.ReadCustomDispatcherDestinationSettings(Protocols.Mail);
+ foreach (var destination in destinations)
+ {
+ Settings.Destination1 = destination;
+ try
+ {
+ throw new DummyArgumentException();
+ }
+ catch (Exception exception)
+ {
+ Trace.WriteLine("Sending e-mail with connection string: " + destination);
+ new BugReport().Report(exception, ExceptionThread.Main);
+ Assert.Equal(1, Storer.GetReportCount());
+ new Dispatcher(false); // Dispatch async = false;
+ Assert.Equal(0, Storer.GetReportCount());
+ }
+ }
+
+ Trace.WriteLine("Emails sent: " + destinations.Count);
+ }
+
+ [Fact]
+ public void FtpDispatcher()
+ {
+ var destinations = this.settings.ReadCustomDispatcherDestinationSettings(Protocols.FTP);
+ foreach (var destination in destinations)
+ {
+ Settings.Destination1 = destination;
+ try
+ {
+ throw new DummyArgumentException();
+ }
+ catch (Exception exception)
+ {
+ Trace.WriteLine("Uploading report using FTP with connection string: " + destination);
+ new BugReport().Report(exception, ExceptionThread.Main);
+ Assert.Equal(1, Storer.GetReportCount());
+ new Dispatcher(false); // Dispatch async = false;
+ Assert.Equal(0, Storer.GetReportCount());
+ }
+ }
+
+ Trace.WriteLine("FTP uploads: " + destinations.Count);
+ }
+
+ [Fact]
+ public void HttpDispatcher()
+ {
+ var destinations = this.settings.ReadCustomDispatcherDestinationSettings(Protocols.HTTP);
+ foreach (var destination in destinations)
+ {
+ Settings.Destination1 = destination;
+ try
+ {
+ throw new DummyArgumentException();
+ }
+ catch (Exception exception)
+ {
+ Trace.WriteLine("Uploading report using HTTP with connection string: " + destination);
+ new BugReport().Report(exception, ExceptionThread.Main);
+ Assert.Equal(1, Storer.GetReportCount());
+ new Dispatcher(false); // Dispatch async = false;
+ Assert.Equal(0, Storer.GetReportCount());
+ }
+ }
+
+ Trace.WriteLine("HTTP uploads: " + destinations.Count);
+ }
+
+ [Fact]
+ public void MixedDestinations()
+ {
+ Settings.Destination1 = this.settings.ReadCustomDispatcherDestinationSettings(Protocols.Mail)[0];
+ Settings.Destination2 = this.settings.ReadCustomDispatcherDestinationSettings(Protocols.HTTP)[0];
+ Settings.Destination3 = this.settings.ReadCustomDispatcherDestinationSettings(Protocols.FTP)[0];
+ Settings.Destination4 = this.settings.ReadCustomDispatcherDestinationSettings(Protocols.Redmine)[0];
+
+ // ToDo: Settings.Destination5 = this.settings.ReadCustomDispatcherDestinationSettings(Protocols.Trac)[0];
+ try
+ {
+ throw new DummyArgumentException();
+ }
+ catch (Exception exception)
+ {
+ Trace.WriteLine("Submitting bug report to 5 different destinations at once: Mail, HTTP, FTP, Redmine, Trac");
+ new BugReport().Report(exception, ExceptionThread.Main);
+ Assert.Equal(1, Storer.GetReportCount());
+ new Dispatcher(false); // Dispatch async = false;
+ Assert.Equal(0, Storer.GetReportCount());
+ }
+ }
+
+ [Fact]
+ public void RedmineDispatcher()
+ {
+ var destinations = this.settings.ReadCustomDispatcherDestinationSettings(Protocols.Redmine);
+ foreach (var destination in destinations)
+ {
+ Settings.Destination1 = destination;
+ try
+ {
+ throw new DummyArgumentException();
+ }
+ catch (Exception exception)
+ {
+ Trace.WriteLine("Submitting bug report to Redmine issue tracker with connection string: " + destination);
+ new BugReport().Report(exception, ExceptionThread.Main);
+ Assert.Equal(1, Storer.GetReportCount());
+ new Dispatcher(false); // Dispatch async = false;
+ Assert.Equal(0, Storer.GetReportCount());
+ }
+ }
+
+ Trace.WriteLine("Redmine submissions: " + destinations.Count);
+ }
+
+ public void SetFixture(SettingsFixture settingsFixture)
+ {
+ // ToDo: This doesn't work all the time and log still gets written to disk!
+ Settings.WriteLogToDisk = false;
+ Settings.UIMode = UIMode.None;
+ Settings.MiniDumpType = MiniDumpType.None;
+ this.settings = settingsFixture;
+ }
+
+ public void SetFixture(ReportFixture report)
+ {
+ report.DeleteGarbageReportFile();
+ }
+ }
+}
diff --git a/NBug.Tests/Integration/HandlerTests.cs b/NBug.Tests/Integration/HandlerTests.cs
new file mode 100644
index 0000000..1a8f756
--- /dev/null
+++ b/NBug.Tests/Integration/HandlerTests.cs
@@ -0,0 +1,82 @@
+// --------------------------------------------------------------------------------------------------------------------
+//
+// Copyright (c) 2010 - 2011 Teoman Soygul. Licensed under LGPLv3 (http://www.gnu.org/licenses/lgpl.html).
+//
+// --------------------------------------------------------------------------------------------------------------------
+
+namespace NBug.Tests.Integration
+{
+ using System;
+ using System.Threading;
+ using System.Threading.Tasks;
+
+ using NBug.Tests.Tools.Fixtures;
+
+ using Xunit;
+
+ public class HandlerTests : IUseFixture, IUseFixture
+ {
+ private ReportFixture report;
+
+ [Fact]
+ public void CorruptThreadExceptionHandler()
+ {
+ Settings.HandleProcessCorruptedStateExceptions = true;
+ Handler.ThreadException(this, new ThreadExceptionEventArgs(new Exception("Testing a corrupt WinForms UI thread Exception.")));
+ this.report.VerifyAndDeleteCompressedReportFile();
+ }
+
+ [Fact]
+ public void CorruptUnhandledExceptionHandler()
+ {
+ Settings.HandleProcessCorruptedStateExceptions = true;
+
+ // Since there are no UI related assemblies loaded, this should behave as a console app exception
+ Handler.UnhandledException(this, new UnhandledExceptionEventArgs(new AccessViolationException("Testing a corrupt ConsoleApp main thread AccessViolationException."), true));
+ this.report.VerifyAndDeleteCompressedReportFile();
+ }
+
+ [Fact]
+ public void CorruptUnobservedTaskExceptionHandler()
+ {
+ Settings.HandleProcessCorruptedStateExceptions = true;
+ Handler.UnobservedTaskException(this, new UnobservedTaskExceptionEventArgs(new AggregateException("Testing a corrupt Task exception.", new Exception("Task exception inner exception as aggregated exception."))));
+ this.report.VerifyAndDeleteCompressedReportFile();
+ }
+
+ public void SetFixture(SettingsFixture settings)
+ {
+ settings.InitializeStandardSettings();
+
+ // This is requred otherwise the test runner will be forced to quit before test finishes
+ Settings.ExitApplicationImmediately = false;
+ }
+
+ public void SetFixture(ReportFixture reportFixture)
+ {
+ this.report = reportFixture;
+ }
+
+ [Fact]
+ public void ThreadExceptionHandler()
+ {
+ Handler.ThreadException(this, new ThreadExceptionEventArgs(new Exception("Testing a WinForms UI thread Exception.")));
+ this.report.VerifyAndDeleteCompressedReportFile();
+ }
+
+ [Fact] // Simulate System.AppDomain.UnhandledException event on the main thread in the default appdomain
+ public void UnhandledExceptionHandler()
+ {
+ // Since there are no UI related assemblies loaded, this should behave as a console app exception
+ Handler.UnhandledException(this, new UnhandledExceptionEventArgs(new Exception("Testing a ConsoleApp main thread Exception."), true));
+ this.report.VerifyAndDeleteCompressedReportFile();
+ }
+
+ [Fact]
+ public void UnobservedTaskExceptionHandler()
+ {
+ Handler.UnobservedTaskException(this, new UnobservedTaskExceptionEventArgs(new AggregateException("Testing a Task exception.", new Exception("Task exception inner exception as aggregated exception."))));
+ this.report.VerifyAndDeleteCompressedReportFile();
+ }
+ }
+}
diff --git a/NBug.Tests/Integration/SettingsTests.cs b/NBug.Tests/Integration/SettingsTests.cs
new file mode 100644
index 0000000..c0455f8
--- /dev/null
+++ b/NBug.Tests/Integration/SettingsTests.cs
@@ -0,0 +1,332 @@
+// --------------------------------------------------------------------------------------------------------------------
+//
+// Copyright (c) 2010 - 2011 Teoman Soygul. Licensed under LGPLv3 (http://www.gnu.org/licenses/lgpl.html).
+//
+// --------------------------------------------------------------------------------------------------------------------
+
+namespace NBug.Tests.Integration
+{
+ using System;
+ using System.Collections.Generic;
+ using System.IO;
+ using System.Reflection;
+
+ using NBug.Core.Reporting;
+ using NBug.Core.UI;
+ using NBug.Core.Util;
+ using NBug.Core.Util.Logging;
+ using NBug.Core.Util.Storage;
+ using NBug.Enums;
+ using NBug.Tests.Tools.Fixtures;
+ using NBug.Tests.Tools.Stubs;
+
+ using Xunit;
+
+ using StoragePath = NBug.Enums.StoragePath;
+
+ public class SettingsTests : IUseFixture, IUseFixture, IDisposable
+ {
+ private ReportFixture reportFixture;
+
+ public void Dispose()
+ {
+ this.reportFixture.DeleteGarbageReportFile();
+ }
+
+ public void SetFixture(SettingsFixture settings)
+ {
+ settings.ReloadDefaults();
+ settings.InitializeStandardSettings();
+ }
+
+ public void SetFixture(ReportFixture reportFix)
+ {
+ reportFix.DeleteGarbageReportFile();
+ this.reportFixture = reportFix;
+ }
+
+ [Fact]
+ public void ExitApplicationImmediatelyFalse()
+ {
+ // This is only valid with UIMode = none;
+ Settings.ExitApplicationImmediately = false;
+ Settings.UIMode = UIMode.None;
+ Assert.Equal(new BugReport().Report(new Exception(), ExceptionThread.Main), ExecutionFlow.ContinueExecution);
+ }
+
+ [Fact]
+ public void ExitApplicationImmediatelyTrue()
+ {
+ // This is only valid with UIMode = none;
+ Settings.ExitApplicationImmediately = true;
+ Settings.UIMode = UIMode.None;
+ Assert.Equal(new BugReport().Report(new Exception(), ExceptionThread.Main), ExecutionFlow.BreakExecution);
+ }
+
+ [Fact]
+ public void HandleProcessCorruptedStateExceptionsFalse()
+ {
+ // ToDo: Find a way to harmlessly simulate access violation exceptions
+ /*Settings.ExitApplicationImmediately = false;
+ Settings.HandleProcessCorruptedStateExceptions = false;
+ Handler.UnhandledException(this, new UnhandledExceptionEventArgs(new AccessViolationException("Testing a corrupt ConsoleApp main thread AccessViolationException."), true));
+ Assert.Equal(Storer.GetReportCount(), 0);*/
+ }
+
+ [Fact]
+ public void HandleProcessCorruptedStateExceptionsTrue()
+ {
+ Settings.ExitApplicationImmediately = false;
+ Settings.HandleProcessCorruptedStateExceptions = true;
+ Handler.UnhandledException(this, new UnhandledExceptionEventArgs(new AccessViolationException("Testing a corrupt ConsoleApp main thread AccessViolationException."), true));
+ this.reportFixture.VerifyAndDeleteCompressedReportFile();
+ }
+
+ [Fact]
+ public void InternalLogWritten()
+ {
+ var message = string.Empty;
+ var category = LoggerCategory.NBugTrace;
+ Settings.InternalLogWritten += (m, c) => { message = m; category = c; };
+ Logger.Info("Testing logger info message");
+ Assert.Equal(message, "Testing logger info message");
+ Assert.Equal(category, LoggerCategory.NBugInfo);
+ }
+
+ [Fact]
+ public void ProcessingException()
+ {
+ Settings.ProcessingException += (e, r) => { r.CustomInfo = "Some custom info string"; };
+ new BugReport().Report(new DummyArgumentException(), ExceptionThread.Main);
+ this.reportFixture.VerifyAndDeleteCompressedReportFile(true);
+
+ var list = new List { "Some custom info string", "Some more info" };
+ Settings.ProcessingException += (e, r) => { r.CustomInfo = list; };
+ new BugReport().Report(new DummyArgumentException(), ExceptionThread.Main);
+ this.reportFixture.VerifyAndDeleteCompressedReportFile(true);
+
+ Settings.ProcessingException += (e, r) => { r.CustomInfo = new DummySerializableException(); };
+ new BugReport().Report(new DummyArgumentException(), ExceptionThread.Main);
+ this.reportFixture.VerifyAndDeleteCompressedReportFile(true);
+ }
+
+ [Fact]
+ public void ProcessingExceptionNonSerializableCustomInfo()
+ {
+ Settings.ThrowExceptions = false;
+ Settings.DisplayDeveloperUI = false;
+
+ // Should not throw even if the custom info cannot be serialized
+ Settings.ProcessingException += (e, r) => { r.CustomInfo = new Exception("Just testing"); };
+ new BugReport().Report(new DummyArgumentException(), ExceptionThread.Main);
+ this.reportFixture.VerifyAndDeleteCompressedReportFile();
+ }
+
+ [Fact]
+ public void MaxQueuedReports()
+ {
+ Settings.MaxQueuedReports = 2;
+ new BugReport().Report(new Exception(), ExceptionThread.Main);
+ new BugReport().Report(new Exception(), ExceptionThread.Main);
+ new BugReport().Report(new Exception(), ExceptionThread.Main);
+
+ Assert.Equal(2, Storer.GetReportCount());
+ Storer.TruncateReportFiles(1);
+ Assert.Equal(1, Storer.GetReportCount());
+ Storer.TruncateReportFiles(0);
+ Assert.Equal(0, Storer.GetReportCount());
+ }
+
+ [Fact]
+ public void MiniDumpTypeFull()
+ {
+ Settings.MiniDumpType = MiniDumpType.Full;
+ new BugReport().Report(new Exception(), ExceptionThread.Main);
+ Assert.Equal(Storer.GetReportCount(), 1);
+
+ using (var storer = new Storer())
+ using (var stream = storer.GetFirstReportFile())
+ {
+ Assert.NotNull(stream);
+ Assert.InRange(stream.Length, 5 * 1024 * 1024, 150 * 1024 * 1024);
+ storer.DeleteCurrentReportFile();
+ }
+
+ Assert.Equal(Storer.GetReportCount(), 0);
+ }
+
+ [Fact]
+ public void MiniDumpTypeNone()
+ {
+ Settings.MiniDumpType = MiniDumpType.None;
+ new BugReport().Report(new Exception(), ExceptionThread.Main);
+ Assert.Equal(Storer.GetReportCount(), 1);
+
+ using (var storer = new Storer())
+ using (var stream = storer.GetFirstReportFile())
+ {
+ Assert.NotNull(stream);
+ Assert.InRange(stream.Length, 0.5 * 1024, 30 * 1024);
+ storer.DeleteCurrentReportFile();
+ }
+
+ Assert.Equal(Storer.GetReportCount(), 0);
+ }
+
+ [Fact]
+ public void MiniDumpTypeNormal()
+ {
+ Settings.MiniDumpType = MiniDumpType.Normal;
+ new BugReport().Report(new Exception(), ExceptionThread.Main);
+ Assert.Equal(Storer.GetReportCount(), 1);
+
+ using (var storer = new Storer())
+ using (var stream = storer.GetFirstReportFile())
+ {
+ Assert.NotNull(stream);
+ Assert.InRange(stream.Length, 100 * 1024, 25 * 1024 * 1024);
+ storer.DeleteCurrentReportFile();
+ }
+
+ Assert.Equal(Storer.GetReportCount(), 0);
+ }
+
+ [Fact]
+ public void MiniDumpTypeTiny()
+ {
+ Settings.MiniDumpType = MiniDumpType.Tiny;
+ new BugReport().Report(new Exception(), ExceptionThread.Main);
+ Assert.Equal(Storer.GetReportCount(), 1);
+
+ using (var storer = new Storer())
+ using (var stream = storer.GetFirstReportFile())
+ {
+ Assert.NotNull(stream);
+ Assert.InRange(stream.Length, 10 * 1024, 1 * 1024 * 1024);
+ storer.DeleteCurrentReportFile();
+ }
+
+ Assert.Equal(Storer.GetReportCount(), 0);
+ }
+
+ [Fact]
+ public void NBugDirectory()
+ {
+ Assert.Equal(Settings.NBugDirectory, Path.GetDirectoryName(Assembly.GetExecutingAssembly().Location));
+ }
+
+ [Fact]
+ public void StopReportingAfterDaysExpired()
+ {
+ Settings.StopReportingAfter = 0;
+ new BugReport().Report(new Exception(), ExceptionThread.Main);
+ Assert.Equal(0, Storer.GetReportCount());
+ }
+
+ [Fact]
+ public void StopReportingAfterDaysValid()
+ {
+ Settings.StopReportingAfter = 99;
+ new BugReport().Report(new Exception(), ExceptionThread.Main);
+ Assert.Equal(1, Storer.GetReportCount());
+ Storer.TruncateReportFiles(0);
+ }
+
+ [Fact]
+ public void StoragePathCurrentDirectory()
+ {
+ Settings.StoragePath = StoragePath.CurrentDirectory;
+ new BugReport().Report(new Exception(), ExceptionThread.Main);
+ Assert.Equal(Storer.GetReportCount(), 1);
+
+ using (var storer = new Storer())
+ using (var stream = storer.GetFirstReportFile())
+ {
+ Assert.NotNull(stream);
+ Assert.True(storer.FilePath.Contains(Path.GetDirectoryName(Settings.EntryAssembly.Location)));
+ storer.DeleteCurrentReportFile();
+ }
+
+ Assert.Equal(Storer.GetReportCount(), 0);
+ }
+
+ [Fact]
+ public void StoragePathCustom()
+ {
+ Settings.StoragePath = "C:\\";
+ new BugReport().Report(new Exception(), ExceptionThread.Main);
+ Assert.Equal(Storer.GetReportCount(), 1);
+
+ using (var storer = new Storer())
+ using (var stream = storer.GetFirstReportFile())
+ {
+ Assert.NotNull(stream);
+ Assert.True(storer.FilePath.Contains("C:\\"));
+ storer.DeleteCurrentReportFile();
+ }
+
+ Assert.Equal(Storer.GetReportCount(), 0);
+ }
+
+ [Fact]
+ public void StoragePathIsolatedStorage()
+ {
+ Settings.StoragePath = StoragePath.IsolatedStorage;
+ new BugReport().Report(new Exception(), ExceptionThread.Main);
+ Assert.Equal(Storer.GetReportCount(), 1);
+
+ using (var storer = new Storer())
+ using (var stream = storer.GetFirstReportFile())
+ {
+ Assert.NotNull(stream);
+ var filePath = stream.GetType().GetField("m_FullPath", BindingFlags.Instance | BindingFlags.NonPublic).GetValue(stream).ToString();
+ Assert.True(filePath.Contains("IsolatedStorage"));
+ storer.DeleteCurrentReportFile();
+ }
+
+ Assert.Equal(Storer.GetReportCount(), 0);
+ }
+
+ [Fact]
+ public void StoragePathWindowsTemp()
+ {
+ Settings.StoragePath = StoragePath.WindowsTemp;
+ new BugReport().Report(new Exception(), ExceptionThread.Main);
+ Assert.Equal(Storer.GetReportCount(), 1);
+
+ using (var storer = new Storer())
+ using (var stream = storer.GetFirstReportFile())
+ {
+ Assert.NotNull(stream);
+ Assert.True(storer.FilePath.Contains(Path.Combine(new[] { Path.GetTempPath(), Settings.EntryAssembly.GetName().Name })));
+ storer.DeleteCurrentReportFile();
+ }
+
+ Assert.Equal(Storer.GetReportCount(), 0);
+ }
+
+ [Fact]
+ public void WriteLogToDiskFalse()
+ {
+ Settings.WriteLogToDisk = false;
+ File.Delete(Path.Combine(Settings.NBugDirectory, "NBug.log"));
+ Logger.Info("Testing log file entry.");
+ Assert.False(File.Exists(Path.Combine(Settings.NBugDirectory, "NBug.log")));
+ File.Delete(Path.Combine(Settings.NBugDirectory, "NBug.log"));
+ }
+
+ [Fact]
+ public void WriteLogToDiskTrue()
+ {
+ if (!Settings.WriteLogToDisk)
+ {
+ // Bug: This is currently just a workaround
+ Settings.WriteLogToDisk = true;
+ File.Delete(Path.Combine(Settings.NBugDirectory, "NBug.log"));
+ Logger.Info("Testing log file entry.");
+ Assert.True(File.Exists(Path.Combine(Settings.NBugDirectory, "NBug.log")));
+ File.Delete(Path.Combine(Settings.NBugDirectory, "NBug.log"));
+ }
+ }
+ }
+}
diff --git a/NBug.Tests/NBug.Tests.csproj b/NBug.Tests/NBug.Tests.csproj
new file mode 100644
index 0000000..73ddaa5
--- /dev/null
+++ b/NBug.Tests/NBug.Tests.csproj
@@ -0,0 +1,112 @@
+
+
+
+ Debug
+ AnyCPU
+ 8.0.30703
+ 2.0
+ {3CE73395-EECA-465B-B77F-227F164E92EB}
+ Library
+ Properties
+ NBug.Tests
+ NBug.Tests
+ v4.0
+ 512
+
+
+
+
+
+
+
+
+
+
+ true
+ full
+ false
+ bin\Debug\
+ TRACE;DEBUG
+ prompt
+ 4
+ true
+ AllRules.ruleset
+
+
+ pdbonly
+ true
+ bin\Release\
+ TRACE
+ prompt
+ 4
+
+
+
+
+ true
+
+
+ ..\Signing.snk
+
+
+
+ ..\packages\Moq.4.0.10827\lib\NET40\Moq.dll
+
+
+
+
+
+
+
+
+
+
+ False
+ ..\packages\xunit.1.9.0.1566\lib\xunit.dll
+
+
+ False
+ ..\packages\xunit.extensions.1.9.0.1566\lib\xunit.extensions.dll
+
+
+
+
+ Properties\GlobalAssemblyInfo.cs
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ {62CED1D5-F603-40DE-8BF5-3E49D3A392F4}
+ NBug
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/NBug.Tests/Properties/AssemblyInfo.cs b/NBug.Tests/Properties/AssemblyInfo.cs
new file mode 100644
index 0000000..d7e315c
--- /dev/null
+++ b/NBug.Tests/Properties/AssemblyInfo.cs
@@ -0,0 +1,33 @@
+// --------------------------------------------------------------------------------------------------------------------
+//
+// Copyright (c) 2010 - 2011 Teoman Soygul. Licensed under LGPLv3 (http://www.gnu.org/licenses/lgpl.html).
+//
+// --------------------------------------------------------------------------------------------------------------------
+
+
+using System.Reflection;
+using System.Runtime.InteropServices;
+
+// General Information about an assembly is controlled through the following
+// set of attributes. Change these attribute values to modify the information
+// associated with an assembly.
+[assembly: AssemblyTitle("NBug.Tests")]
+[assembly: AssemblyDescription("NBug Unit Testing Library created by Teoman Soygul.")]
+[assembly: AssemblyCulture("")]
+
+// Setting ComVisible to false makes the types in this assembly not visible
+// to COM components. If you need to access a type in this assembly from
+// COM, set the ComVisible attribute to true on that type.
+[assembly: ComVisible(false)]
+
+// The following GUID is for the ID of the typelib if this project is exposed to COM
+[assembly: Guid("2063af3c-6402-4000-b41e-b0e14cc10ec0")]
+
+// Version information for an assembly consists of the following four values:
+// Major Version
+// Minor Version
+// Build Number
+// Revision
+// You can specify all the values or you can default the Build and Revision Numbers
+// by using the '*' as shown below:
+// [assembly: AssemblyVersion("1.0.*")]
\ No newline at end of file
diff --git a/NBug.Tests/Tools/Extensions/UIAttribute.cs b/NBug.Tests/Tools/Extensions/UIAttribute.cs
new file mode 100644
index 0000000..0dfa8b7
--- /dev/null
+++ b/NBug.Tests/Tools/Extensions/UIAttribute.cs
@@ -0,0 +1,17 @@
+// --------------------------------------------------------------------------------------------------------------------
+//
+// Copyright (c) 2010 - 2011 Teoman Soygul. Licensed under LGPLv3 (http://www.gnu.org/licenses/lgpl.html).
+//
+// --------------------------------------------------------------------------------------------------------------------
+
+namespace NBug.Tests.Tools.Extensions
+{
+ using Xunit;
+
+ public class UIAttribute : TraitAttribute
+ {
+ public UIAttribute() : base("Category", "UI")
+ {
+ }
+ }
+}
diff --git a/NBug.Tests/Tools/Fixtures/ReportFixture.cs b/NBug.Tests/Tools/Fixtures/ReportFixture.cs
new file mode 100644
index 0000000..01f993e
--- /dev/null
+++ b/NBug.Tests/Tools/Fixtures/ReportFixture.cs
@@ -0,0 +1,126 @@
+// --------------------------------------------------------------------------------------------------------------------
+//
+// Copyright (c) 2010 - 2011 Teoman Soygul. Licensed under LGPLv3 (http://www.gnu.org/licenses/lgpl.html).
+//
+// --------------------------------------------------------------------------------------------------------------------
+
+namespace NBug.Tests.Tools.Fixtures
+{
+ using System;
+ using System.Collections.Generic;
+ using System.IO;
+ using System.Xml.Linq;
+ using System.Xml.Serialization;
+
+ using NBug.Core.Reporting.Info;
+ using NBug.Core.Util.Serialization;
+ using NBug.Core.Util.Storage;
+ using NBug.Enums;
+ using NBug.Tests.Tools.Stubs;
+
+ using Xunit;
+
+ public class ReportFixture : IDisposable
+ {
+ public ReportFixture()
+ {
+ this.DeleteGarbageReportFile();
+ this.SerializableException = new SerializableException(new DummyArgumentException());
+ this.Report = new Report(this.SerializableException);
+ }
+
+ public Report Report { get; set; }
+
+ public SerializableException SerializableException { get; set; }
+
+ public void Dispose()
+ {
+ this.DeleteGarbageReportFile();
+ }
+
+ internal void DeleteGarbageReportFile()
+ {
+ using (var storer = new Storer())
+ using (var stream = storer.GetFirstReportFile())
+ {
+ if (stream != null)
+ {
+ storer.DeleteCurrentReportFile();
+ }
+ }
+ }
+
+ internal void VerifyAndDeleteCompressedReportFile(bool verifyCustomReport)
+ {
+ using (var storer = new Storer())
+ using (var stream = storer.GetFirstReportFile())
+ {
+ Assert.NotNull(stream);
+ this.VerifyIndividualReportItems(stream, verifyCustomReport);
+ storer.DeleteCurrentReportFile();
+ }
+ }
+
+ internal void VerifyAndDeleteCompressedReportFile()
+ {
+ this.VerifyAndDeleteCompressedReportFile(false);
+ }
+
+ // This is not static for future performance improvements (like totally eliminating calls to Storer object)
+ private void VerifyIndividualReportItems(Stream reportFile, bool verifyCustomReport)
+ {
+ var zipStorer = ZipStorer.Open(reportFile, FileAccess.Read);
+ using (var zipItemStream = new MemoryStream())
+ {
+ SerializableException serializableException = null;
+ Report report = null;
+ uint fileSize = 0;
+ var zipDirectory = zipStorer.ReadCentralDir();
+
+ foreach (var entry in zipDirectory)
+ {
+ if (Path.GetFileName(entry.FilenameInZip) == StoredItemFile.Exception)
+ {
+ zipItemStream.SetLength(0);
+ zipStorer.ExtractFile(entry, zipItemStream);
+ zipItemStream.Position = 0;
+ var deserializer = new XmlSerializer(typeof(SerializableException));
+ serializableException = (SerializableException)deserializer.Deserialize(zipItemStream);
+ zipItemStream.Position = 0;
+ Assert.NotNull(XElement.Load(zipItemStream));
+ }
+ else if (Path.GetFileName(entry.FilenameInZip) == StoredItemFile.Report)
+ {
+ zipItemStream.SetLength(0);
+ zipStorer.ExtractFile(entry, zipItemStream);
+ zipItemStream.Position = 0;
+ var deserializer = new XmlSerializer(typeof(Report));
+ report = (Report)deserializer.Deserialize(zipItemStream);
+ zipItemStream.Position = 0;
+ Assert.NotNull(XElement.Load(zipItemStream));
+ if (verifyCustomReport)
+ {
+ Assert.NotNull(report.CustomInfo);
+ }
+ }
+ else if (Path.GetFileName(entry.FilenameInZip) == StoredItemFile.MiniDump)
+ {
+ fileSize = entry.FileSize;
+ }
+ else
+ {
+ Assert.True(false, "A new file type has been added to the compressed report file. A new validation check for the file should be added.");
+ }
+ }
+
+ Assert.NotNull(serializableException);
+ Assert.NotNull(report);
+
+ if (Settings.MiniDumpType != MiniDumpType.None)
+ {
+ Assert.True(fileSize != 0);
+ }
+ }
+ }
+ }
+}
diff --git a/NBug.Tests/Tools/Fixtures/SettingsFixture.cs b/NBug.Tests/Tools/Fixtures/SettingsFixture.cs
new file mode 100644
index 0000000..52413db
--- /dev/null
+++ b/NBug.Tests/Tools/Fixtures/SettingsFixture.cs
@@ -0,0 +1,99 @@
+// --------------------------------------------------------------------------------------------------------------------
+//
+// Copyright (c) 2010 - 2011 Teoman Soygul. Licensed under LGPLv3 (http://www.gnu.org/licenses/lgpl.html).
+//
+// --------------------------------------------------------------------------------------------------------------------
+
+namespace NBug.Tests.Tools.Fixtures
+{
+ using System;
+ using System.Collections.Generic;
+ using System.IO;
+ using System.Linq;
+ using System.Reflection;
+ using System.Xml.Serialization;
+
+ using NBug.Core.Submission;
+ using NBug.Enums;
+ using NBug.Properties;
+
+ using Settings = NBug.Settings;
+
+ public class SettingsFixture : IDisposable
+ {
+ // This is static for performance reasons (also not disposed at the destructor due to the same reason)
+ private static Stream settings;
+ private List dispatcherDestinations;
+
+ public SettingsFixture()
+ {
+ if (settings == null)
+ {
+ // Assembly.GetEntryAssembly() is null for tests wihtout GUI runner so filling it in to prevent null object exceptions
+ Settings.EntryAssembly = Assembly.GetExecutingAssembly();
+
+ settings = new MemoryStream();
+ Settings.SaveCustomSettings(settings, false);
+ }
+ }
+
+ public void Dispose()
+ {
+ this.ReloadDefaults();
+ }
+
+ internal void InitializeStandardSettings()
+ {
+ Settings.SkipDispatching = true;
+ Settings.UIMode = UIMode.None;
+ Settings.WriteLogToDisk = false;
+ }
+
+
+ ///
+ /// Returns null if the custom settings file is not found so check for null object reference.
+ ///
+ internal List ReadCustomDispatcherDestinationSettings(Protocols protocol)
+ {
+ // This generates a sample settings file for future reference
+ /*this.dispatcherDestinations.Add("Just testing this stuff.");
+ var serializer = new XmlSerializer(typeof(List));
+ using (FileStream stream = new FileStream("DispatcherDestinations.xml", FileMode.Create))
+ {
+ serializer.Serialize(stream, this.dispatcherDestinations);
+ }*/
+
+ // Make sure that settings are red and cached only once during the object lifetime
+ if (this.dispatcherDestinations == null)
+ {
+ this.dispatcherDestinations = new List();
+ var path = Path.Combine(Settings.NBugDirectory, "DispatcherDestinations.xml");
+
+ if (!File.Exists(path))
+ {
+ path = Path.Combine(Environment.GetFolderPath(Environment.SpecialFolder.UserProfile), "Docs\\ASFT\\Dev\\_Tools\\Settings\\DispatcherDestinations.xml");
+
+ if (!File.Exists(path))
+ {
+ return null;
+ }
+ }
+
+ var serializer = new XmlSerializer(typeof(List));
+ using (var stream = new FileStream(path, FileMode.Open))
+ {
+ this.dispatcherDestinations = (List)serializer.Deserialize(stream);
+ }
+ }
+
+ return (from destination in this.dispatcherDestinations
+ where Enum.Parse(typeof(Protocols), Protocol.Parse(destination)["Type"], true).Equals(protocol)
+ select destination).ToList();
+ }
+
+ internal void ReloadDefaults()
+ {
+ SettingsOverride.LoadCustomSettings(settings);
+ }
+ }
+}
diff --git a/NBug.Tests/Tools/Fixtures/UIFixture.cs b/NBug.Tests/Tools/Fixtures/UIFixture.cs
new file mode 100644
index 0000000..419b59f
--- /dev/null
+++ b/NBug.Tests/Tools/Fixtures/UIFixture.cs
@@ -0,0 +1,19 @@
+// --------------------------------------------------------------------------------------------------------------------
+//
+// Copyright (c) 2010 - 2011 Teoman Soygul. Licensed under LGPLv3 (http://www.gnu.org/licenses/lgpl.html).
+//
+// --------------------------------------------------------------------------------------------------------------------
+
+namespace NBug.Tests.Tools.Fixtures
+{
+ using System.Windows.Forms;
+
+ public class UIFixture
+ {
+ public UIFixture()
+ {
+ Application.EnableVisualStyles();
+ Application.SetCompatibleTextRenderingDefault(false);
+ }
+ }
+}
diff --git a/NBug.Tests/Tools/Stubs/DummyArgumentException.cs b/NBug.Tests/Tools/Stubs/DummyArgumentException.cs
new file mode 100644
index 0000000..0ae4fc7
--- /dev/null
+++ b/NBug.Tests/Tools/Stubs/DummyArgumentException.cs
@@ -0,0 +1,31 @@
+// --------------------------------------------------------------------------------------------------------------------
+//
+// Copyright (c) 2010 - 2011 Teoman Soygul. Licensed under LGPLv3 (http://www.gnu.org/licenses/lgpl.html).
+//
+// --------------------------------------------------------------------------------------------------------------------
+
+namespace NBug.Tests.Tools.Stubs
+{
+ using System;
+ using System.Collections;
+ using System.Collections.Generic;
+
+ public class DummyArgumentException : ArgumentException
+ {
+ public DummyArgumentException()
+ : base(
+ "Testing MyArgumentException.",
+ "MyDummyParameter",
+ new Exception("Testing inner exception for MyArgumentException."))
+ {
+ }
+
+ public override IDictionary Data
+ {
+ get
+ {
+ return new Dictionary { { "StringDataProperty", "Just testing the data property with a set of strings as a dictionary." } };
+ }
+ }
+ }
+}
diff --git a/NBug.Tests/Tools/Stubs/DummySerializableException.cs b/NBug.Tests/Tools/Stubs/DummySerializableException.cs
new file mode 100644
index 0000000..686d16c
--- /dev/null
+++ b/NBug.Tests/Tools/Stubs/DummySerializableException.cs
@@ -0,0 +1,18 @@
+// --------------------------------------------------------------------------------------------------------------------
+//
+// Copyright (c) 2010 - 2011 Teoman Soygul. Licensed under LGPLv3 (http://www.gnu.org/licenses/lgpl.html).
+//
+// --------------------------------------------------------------------------------------------------------------------
+
+namespace NBug.Tests.Tools.Stubs
+{
+ using NBug.Core.Util.Serialization;
+
+ public class DummySerializableException : SerializableException
+ {
+ public DummySerializableException()
+ : base(new DummyArgumentException())
+ {
+ }
+ }
+}
diff --git a/NBug.Tests/Unit/BugReportTests.cs b/NBug.Tests/Unit/BugReportTests.cs
new file mode 100644
index 0000000..726edc0
--- /dev/null
+++ b/NBug.Tests/Unit/BugReportTests.cs
@@ -0,0 +1,21 @@
+// --------------------------------------------------------------------------------------------------------------------
+//
+// Copyright (c) 2010 - 2011 Teoman Soygul. Licensed under LGPLv3 (http://www.gnu.org/licenses/lgpl.html).
+//
+// --------------------------------------------------------------------------------------------------------------------
+
+namespace NBug.Tests.Unit
+{
+ public class BugReportTests
+ {
+ // "Setup", "Returns", "Verify", and "Assert.xxx"
+
+ /*[Fact]
+ public void Test()
+ {
+ var report = new Mock();
+ report.SetupProperty(x => x.General.UserDescription, "test");
+ Assert.True(report.Object.General.UserDescription == "test");
+ }*/
+ }
+}
diff --git a/NBug.Tests/packages.config b/NBug.Tests/packages.config
new file mode 100644
index 0000000..b183a88
--- /dev/null
+++ b/NBug.Tests/packages.config
@@ -0,0 +1,6 @@
+
+
+
+
+
+
\ No newline at end of file
diff --git a/NBug.sln b/NBug.sln
new file mode 100644
index 0000000..b23793e
--- /dev/null
+++ b/NBug.sln
@@ -0,0 +1,69 @@
+
+Microsoft Visual Studio Solution File, Format Version 11.00
+# Visual Studio 2010
+Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "NBug", "NBug\NBug.csproj", "{62CED1D5-F603-40DE-8BF5-3E49D3A392F4}"
+EndProject
+Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "NBug.Configurator", "NBug.Configurator\NBug.Configurator.csproj", "{84D5B54B-7546-44C5-95F7-CDDBFB3F31B3}"
+EndProject
+Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Examples", "Examples", "{06E05029-1FB3-4122-9524-E81DC884A94E}"
+EndProject
+Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "NBug.Examples.WPF", "Examples\NBug.Examples.WPF\NBug.Examples.WPF.csproj", "{33B22A3A-8188-42BE-BAD6-40046019EA73}"
+EndProject
+Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "NBug.Examples.Console", "Examples\NBug.Examples.Console\NBug.Examples.Console.csproj", "{37281C42-C5CC-456D-B817-D81E6D866121}"
+EndProject
+Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "NBug.Examples.WinForms", "Examples\NBug.Examples.WinForms\NBug.Examples.WinForms.csproj", "{1A387F18-8DEA-4EF8-8399-B808F1B1F3AD}"
+EndProject
+Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "NBug.Tests", "NBug.Tests\NBug.Tests.csproj", "{3CE73395-EECA-465B-B77F-227F164E92EB}"
+EndProject
+Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Solution Items", "Solution Items", "{26B9F5D5-286F-4C6E-AB2C-5B817053D8DC}"
+ ProjectSection(SolutionItems) = preProject
+ GlobalAssemblyInfo.cs = GlobalAssemblyInfo.cs
+ Settings.StyleCop = Settings.StyleCop
+ Signing.snk = Signing.snk
+ ToDo.txt = ToDo.txt
+ EndProjectSection
+EndProject
+Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Documentation", "Documentation\Documentation.csproj", "{975E1EA6-EDA8-4E5D-AC56-7A741022C89A}"
+EndProject
+Global
+ GlobalSection(SolutionConfigurationPlatforms) = preSolution
+ Debug|Any CPU = Debug|Any CPU
+ Release|Any CPU = Release|Any CPU
+ EndGlobalSection
+ GlobalSection(ProjectConfigurationPlatforms) = postSolution
+ {62CED1D5-F603-40DE-8BF5-3E49D3A392F4}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
+ {62CED1D5-F603-40DE-8BF5-3E49D3A392F4}.Debug|Any CPU.Build.0 = Debug|Any CPU
+ {62CED1D5-F603-40DE-8BF5-3E49D3A392F4}.Release|Any CPU.ActiveCfg = Release|Any CPU
+ {62CED1D5-F603-40DE-8BF5-3E49D3A392F4}.Release|Any CPU.Build.0 = Release|Any CPU
+ {84D5B54B-7546-44C5-95F7-CDDBFB3F31B3}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
+ {84D5B54B-7546-44C5-95F7-CDDBFB3F31B3}.Debug|Any CPU.Build.0 = Debug|Any CPU
+ {84D5B54B-7546-44C5-95F7-CDDBFB3F31B3}.Release|Any CPU.ActiveCfg = Release|Any CPU
+ {84D5B54B-7546-44C5-95F7-CDDBFB3F31B3}.Release|Any CPU.Build.0 = Release|Any CPU
+ {33B22A3A-8188-42BE-BAD6-40046019EA73}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
+ {33B22A3A-8188-42BE-BAD6-40046019EA73}.Debug|Any CPU.Build.0 = Debug|Any CPU
+ {33B22A3A-8188-42BE-BAD6-40046019EA73}.Release|Any CPU.ActiveCfg = Release|Any CPU
+ {33B22A3A-8188-42BE-BAD6-40046019EA73}.Release|Any CPU.Build.0 = Release|Any CPU
+ {37281C42-C5CC-456D-B817-D81E6D866121}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
+ {37281C42-C5CC-456D-B817-D81E6D866121}.Debug|Any CPU.Build.0 = Debug|Any CPU
+ {37281C42-C5CC-456D-B817-D81E6D866121}.Release|Any CPU.ActiveCfg = Release|Any CPU
+ {37281C42-C5CC-456D-B817-D81E6D866121}.Release|Any CPU.Build.0 = Release|Any CPU
+ {1A387F18-8DEA-4EF8-8399-B808F1B1F3AD}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
+ {1A387F18-8DEA-4EF8-8399-B808F1B1F3AD}.Debug|Any CPU.Build.0 = Debug|Any CPU
+ {1A387F18-8DEA-4EF8-8399-B808F1B1F3AD}.Release|Any CPU.ActiveCfg = Release|Any CPU
+ {1A387F18-8DEA-4EF8-8399-B808F1B1F3AD}.Release|Any CPU.Build.0 = Release|Any CPU
+ {3CE73395-EECA-465B-B77F-227F164E92EB}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
+ {3CE73395-EECA-465B-B77F-227F164E92EB}.Debug|Any CPU.Build.0 = Debug|Any CPU
+ {3CE73395-EECA-465B-B77F-227F164E92EB}.Release|Any CPU.ActiveCfg = Release|Any CPU
+ {3CE73395-EECA-465B-B77F-227F164E92EB}.Release|Any CPU.Build.0 = Release|Any CPU
+ {975E1EA6-EDA8-4E5D-AC56-7A741022C89A}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
+ {975E1EA6-EDA8-4E5D-AC56-7A741022C89A}.Release|Any CPU.ActiveCfg = Release|Any CPU
+ EndGlobalSection
+ GlobalSection(SolutionProperties) = preSolution
+ HideSolutionNode = FALSE
+ EndGlobalSection
+ GlobalSection(NestedProjects) = preSolution
+ {33B22A3A-8188-42BE-BAD6-40046019EA73} = {06E05029-1FB3-4122-9524-E81DC884A94E}
+ {37281C42-C5CC-456D-B817-D81E6D866121} = {06E05029-1FB3-4122-9524-E81DC884A94E}
+ {1A387F18-8DEA-4EF8-8399-B808F1B1F3AD} = {06E05029-1FB3-4122-9524-E81DC884A94E}
+ EndGlobalSection
+EndGlobal
diff --git a/NBug/Core/Reporting/BugReport.cs b/NBug/Core/Reporting/BugReport.cs
new file mode 100644
index 0000000..96cdd30
--- /dev/null
+++ b/NBug/Core/Reporting/BugReport.cs
@@ -0,0 +1,218 @@
+// --------------------------------------------------------------------------------------------------------------------
+//
+// Copyright (c) 2010 - 2011 Teoman Soygul. Licensed under LGPLv3 (http://www.gnu.org/licenses/lgpl.html).
+//
+// --------------------------------------------------------------------------------------------------------------------
+
+namespace NBug.Core.Reporting
+{
+ using System;
+ using System.IO;
+ using System.Xml.Serialization;
+
+ using NBug.Core.Reporting.Info;
+ using NBug.Core.Reporting.MiniDump;
+ using NBug.Core.UI;
+ using NBug.Core.Util;
+ using NBug.Core.Util.Logging;
+ using NBug.Core.Util.Serialization;
+ using NBug.Core.Util.Storage;
+
+ internal class BugReport
+ {
+ ///
+ /// First parameters is the serializable exception object that is about to be processed, second parameter is any custom data
+ /// object that the user wants to include in the report.
+ ///
+ internal static event Action ProcessingException;
+
+ internal ExecutionFlow Report(Exception exception, ExceptionThread exceptionThread)
+ {
+ try
+ {
+ Logger.Trace("Starting to generate a bug report for the exception.");
+ var serializableException = new SerializableException(exception);
+ var report = new Report(serializableException);
+
+ var handler = ProcessingException;
+ if (handler != null)
+ {
+ Logger.Trace("Notifying the user before handling the exception.");
+
+ // Allowing user to add any custom information to the report
+ handler(exception, report);
+ }
+
+ var uiDialogResult = UISelector.DisplayBugReportUI(exceptionThread, serializableException, report);
+ if (uiDialogResult.Report == SendReport.Send)
+ {
+ this.CreateReportZip(serializableException, report);
+ }
+
+ return uiDialogResult.Execution;
+ }
+ catch (Exception ex)
+ {
+ Logger.Error("An exception occurred during bug report generation process. See the inner exception for details.", ex);
+ return ExecutionFlow.BreakExecution; // Since an internal exception occured
+ }
+ }
+
+ private void WindowsScreenshot(Stream stream)
+ {
+ // Full
+ /*Rectangle bounds = Screen.GetBounds(Point.Empty);
+ using (Bitmap bitmap = new Bitmap(bounds.Width, bounds.Height))
+ {
+ using (Graphics g = Graphics.FromImage(bitmap))
+ {
+ g.CopyFromScreen(Point.Empty, Point.Empty, bounds.Size);
+ }
+ bitmap.Save("test.jpg", ImageFormat.Jpeg);
+ }*/
+
+ // Window
+ /*Rectangle bounds = this.Bounds;
+ using (Bitmap bitmap = new Bitmap(bounds.Width, bounds.Height))
+ {
+ using (Graphics g = Graphics.FromImage(bitmap))
+ {
+ g.CopyFromScreen(new Point(bounds.Left, bounds.Top), Point.Empty, bounds.Size);
+ }
+ bitmap.Save("C://test.jpg", ImageFormat.Jpeg);
+ }*/
+ }
+
+ private void CreateReportZip(SerializableException serializableException, Report report)
+ {
+ // Test if it has NOT been more than x many days since entry assembly was last modified)
+ if (Settings.StopReportingAfter < 0 || File.GetLastWriteTime(Settings.EntryAssembly.Location).AddDays(Settings.StopReportingAfter).CompareTo(DateTime.Now) > 0)
+ {
+ // Test if there is already more than enough queued report files
+ if (Settings.MaxQueuedReports < 0 || Storer.GetReportCount() < Settings.MaxQueuedReports)
+ {
+ var reportFileName = "Exception_" + DateTime.UtcNow.ToFileTime() + ".zip";
+ var minidumpFilePath = Path.Combine(Environment.GetFolderPath(Environment.SpecialFolder.CommonApplicationData), "Exception_MiniDump_" + DateTime.UtcNow.ToFileTime() + ".mdmp");
+
+ using (var storer = new Storer())
+ using (var zipStorer = ZipStorer.Create(storer.CreateReportFile(reportFileName), string.Empty))
+ using (var stream = new MemoryStream())
+ {
+ // Store the exception
+ var serializer = new XmlSerializer(typeof(SerializableException));
+ serializer.Serialize(stream, serializableException);
+ stream.Position = 0;
+ zipStorer.AddStream(ZipStorer.Compression.Deflate, StoredItemFile.Exception, stream, DateTime.UtcNow, string.Empty);
+
+ // Store the report
+ stream.SetLength(0);
+
+ try
+ {
+ serializer = report.CustomInfo != null ? new XmlSerializer(typeof(Report), new[] { report.CustomInfo.GetType() }) : new XmlSerializer(typeof(Report));
+
+ serializer.Serialize(stream, report);
+ }
+ catch (Exception exception)
+ {
+ Logger.Error(string.Format("The given custom info of type [{0}] cannot be serialized. Make sure that given type and inner types are XML serializable.", report.CustomInfo.GetType()), exception);
+ report.CustomInfo = null;
+ serializer = new XmlSerializer(typeof(Report));
+ serializer.Serialize(stream, report);
+ }
+
+ stream.Position = 0;
+ zipStorer.AddStream(ZipStorer.Compression.Deflate, StoredItemFile.Report, stream, DateTime.UtcNow, string.Empty);
+
+ // Add the memory minidump to the report file (only if configured so)
+ if (DumpWriter.Write(minidumpFilePath))
+ {
+ zipStorer.AddFile(ZipStorer.Compression.Deflate, minidumpFilePath, StoredItemFile.MiniDump, string.Empty);
+ File.Delete(minidumpFilePath);
+ }
+
+ // Add any user supplied files in the report (if any)
+ if (Settings.AdditionalReportFiles.Count != 0)
+ {
+ // ToDo: This needs a lot more work!
+ this.AddAdditionalFiles(zipStorer);
+ }
+ }
+
+ Logger.Trace("Created a new report file. Currently the number of report files queued to be send is: " + Storer.GetReportCount());
+ }
+ else
+ {
+ Logger.Trace("Current report count is at its limit as per 'Settings.MaxQueuedReports (" +
+ Settings.MaxQueuedReports + ")' setting: Skipping bug report generation.");
+ }
+ }
+ else
+ {
+ Logger.Trace("As per setting 'Settings.StopReportingAfter(" + Settings.StopReportingAfter +
+ ")', bug reporting feature was enabled for a certain amount of time which has now expired: Bug reporting is now disabled.");
+
+ // ToDo: Completely eliminate this with SettingsOverride.DisableReporting = true; since enumerating filesystem adds overhead);
+ if (Storer.GetReportCount() > 0)
+ {
+ Logger.Trace("As per setting 'Settings.StopReportingAfter(" + Settings.StopReportingAfter +
+ ")', bug reporting feature was enabled for a certain amount of time which has now expired: Truncating all expired bug reports.");
+ Storer.TruncateReportFiles(0);
+ }
+ }
+ }
+
+ // ToDo: PRIORITY TASK! This code needs more testing & condensation
+ private void AddAdditionalFiles(ZipStorer zipStorer)
+ {
+ foreach (var mask in Settings.AdditionalReportFiles)
+ {
+ // Join before spliting because the mask may have some folders inside it
+ var fullPath = Path.Combine(Settings.NBugDirectory, mask);
+ var dir = Path.GetDirectoryName(fullPath);
+ var file = Path.GetFileName(fullPath);
+
+ if (!Directory.Exists(dir))
+ continue;
+
+ if (file.Contains("*") || file.Contains("?"))
+ {
+
+ foreach (var item in Directory.GetFiles(dir, file))
+ AddToZip(zipStorer, Settings.NBugDirectory, item);
+ }
+ else
+ {
+ AddToZip(zipStorer, Settings.NBugDirectory, fullPath);
+ }
+ }
+ }
+
+ // ToDo: PRIORITY TASK! This code needs more testing & condensation
+ private void AddToZip(ZipStorer zipStorer, string basePath, string path)
+ {
+ path = Path.GetFullPath(path);
+
+ // If this is not inside basePath, lets change the basePath so at least some directories are kept
+ if (!path.StartsWith(basePath))
+ basePath = Path.GetDirectoryName(path);
+
+ if (Directory.Exists(path))
+ {
+ foreach (var file in Directory.GetFiles(path))
+ AddToZip(zipStorer, basePath, file);
+ foreach (var dir in Directory.GetDirectories(path))
+ AddToZip(zipStorer, basePath, dir);
+ }
+ else if (File.Exists(path))
+ {
+ var nameInZip = path.Substring(basePath.Length);
+ if (nameInZip.StartsWith("\\") || nameInZip.StartsWith("/"))
+ nameInZip = nameInZip.Substring(1);
+ nameInZip = Path.Combine("files", nameInZip);
+
+ zipStorer.AddFile(ZipStorer.Compression.Deflate, path, nameInZip, string.Empty);
+ }
+ }
+ }
+}
\ No newline at end of file
diff --git a/NBug/Core/Reporting/Feedback.cs b/NBug/Core/Reporting/Feedback.cs
new file mode 100644
index 0000000..a14b1be
--- /dev/null
+++ b/NBug/Core/Reporting/Feedback.cs
@@ -0,0 +1,31 @@
+// --------------------------------------------------------------------------------------------------------------------
+//
+// Copyright (c) 2010 - 2011 Teoman Soygul. Licensed under LGPLv3 (http://www.gnu.org/licenses/lgpl.html).
+//
+// --------------------------------------------------------------------------------------------------------------------
+
+namespace NBug.Core.Reporting
+{
+ using System;
+
+ using NBug.Core.Reporting.Info;
+ using NBug.Core.Util.Logging;
+
+ internal class Feedback
+ {
+ private Report report;
+
+ internal Feedback()
+ {
+ try
+ {
+ // ToDo: Wrap and submit the feedback using Submit.Dispatcher()
+ this.report = new Report(null);
+ }
+ catch (Exception exception)
+ {
+ Logger.Error("An exception occurred while sending a user feedback. See the inner exception for details.", exception);
+ }
+ }
+ }
+}
diff --git a/NBug/Core/Reporting/Info/AssemblyInfo.cs b/NBug/Core/Reporting/Info/AssemblyInfo.cs
new file mode 100644
index 0000000..e47fe4d
--- /dev/null
+++ b/NBug/Core/Reporting/Info/AssemblyInfo.cs
@@ -0,0 +1,12 @@
+// --------------------------------------------------------------------------------------------------------------------
+//
+// Copyright (c) 2010 - 2011 Teoman Soygul. Licensed under LGPLv3 (http://www.gnu.org/licenses/lgpl.html).
+//
+// --------------------------------------------------------------------------------------------------------------------
+
+namespace NBug.Core.Reporting.Info
+{
+ public class AssemblyInfo
+ {
+ }
+}
diff --git a/NBug/Core/Reporting/Info/ConfigurationInfo.cs b/NBug/Core/Reporting/Info/ConfigurationInfo.cs
new file mode 100644
index 0000000..738a673
--- /dev/null
+++ b/NBug/Core/Reporting/Info/ConfigurationInfo.cs
@@ -0,0 +1,12 @@
+// --------------------------------------------------------------------------------------------------------------------
+//
+// Copyright (c) 2010 - 2011 Teoman Soygul. Licensed under LGPLv3 (http://www.gnu.org/licenses/lgpl.html).
+//
+// --------------------------------------------------------------------------------------------------------------------
+
+namespace NBug.Core.Reporting.Info
+{
+ public class ConfigurationInfo
+ {
+ }
+}
diff --git a/NBug/Core/Reporting/Info/GeneralInfo.cs b/NBug/Core/Reporting/Info/GeneralInfo.cs
new file mode 100644
index 0000000..ddfd795
--- /dev/null
+++ b/NBug/Core/Reporting/Info/GeneralInfo.cs
@@ -0,0 +1,82 @@
+// --------------------------------------------------------------------------------------------------------------------
+//
+// Copyright (c) 2010 - 2011 Teoman Soygul. Licensed under LGPLv3 (http://www.gnu.org/licenses/lgpl.html).
+//
+// --------------------------------------------------------------------------------------------------------------------
+
+namespace NBug.Core.Reporting.Info
+{
+ using System;
+ using System.Diagnostics;
+ using System.Reflection;
+
+ using NBug.Core.Util.Serialization;
+
+ [Serializable]
+ public class GeneralInfo
+ {
+ ///
+ /// Initializes a new instance of the class. This is the default constructor provided for XML
+ /// serialization and de-serialization.
+ ///
+ public GeneralInfo()
+ {
+ }
+
+ internal GeneralInfo(SerializableException serializableException)
+ {
+ // this.HostApplication = Settings.EntryAssembly.GetName().Name; // Does not get the extensions of the file!
+ this.HostApplication = Settings.EntryAssembly.GetLoadedModules()[0].Name;
+
+ // this.HostApplicationVersion = Settings.EntryAssembly.GetName().Version.ToString(); // Gets AssemblyVersion not AssemblyFileVersion
+ this.HostApplicationVersion = this.NBugVersion = FileVersionInfo.GetVersionInfo(Settings.EntryAssembly.Location).ProductVersion;
+
+ // this.NBugVersion = System.Reflection.Assembly.GetCallingAssembly().GetName().Version.ToString(); // Gets AssemblyVersion not AssemblyFileVersion
+ this.NBugVersion = FileVersionInfo.GetVersionInfo(Assembly.GetCallingAssembly().Location).ProductVersion;
+
+ this.CLRVersion = Environment.Version.ToString();
+
+ this.DateTime = System.DateTime.UtcNow.ToString();
+
+ if (serializableException != null)
+ {
+ this.ExceptionType = serializableException.Type;
+
+ if (!string.IsNullOrEmpty(serializableException.TargetSite))
+ {
+ this.TargetSite = serializableException.TargetSite;
+ }
+ else if (serializableException.InnerException != null && !string.IsNullOrEmpty(serializableException.InnerException.TargetSite))
+ {
+ this.TargetSite = serializableException.InnerException.TargetSite;
+ }
+
+ this.ExceptionMessage = serializableException.Message;
+ }
+ }
+
+ public string CLRVersion { get; set; }
+
+ public string DateTime { get; set; }
+
+ public string ExceptionMessage { get; set; }
+
+ public string ExceptionType { get; set; }
+
+ public string HostApplication { get; set; }
+
+ ///
+ /// Gets or sets AssemblyFileVersion of host assembly.
+ ///
+ public string HostApplicationVersion { get; set; }
+
+ ///
+ /// Gets or sets AssemblyFileVersion of NBug.dll assembly.
+ ///
+ public string NBugVersion { get; set; }
+
+ public string TargetSite { get; set; }
+
+ public string UserDescription { get; set; }
+ }
+}
diff --git a/NBug/Core/Reporting/Info/Report.cs b/NBug/Core/Reporting/Info/Report.cs
new file mode 100644
index 0000000..30fcef7
--- /dev/null
+++ b/NBug/Core/Reporting/Info/Report.cs
@@ -0,0 +1,45 @@
+// --------------------------------------------------------------------------------------------------------------------
+//
+// Copyright (c) 2010 - 2011 Teoman Soygul. Licensed under LGPLv3 (http://www.gnu.org/licenses/lgpl.html).
+//
+// --------------------------------------------------------------------------------------------------------------------
+
+namespace NBug.Core.Reporting.Info
+{
+ using System;
+
+ using NBug.Core.Util.Serialization;
+
+ [Serializable]
+ public class Report
+ {
+ ///
+ /// Initializes a new instance of the class to be filled with information later on.
+ ///
+ public Report()
+ {
+ }
+
+ internal Report(SerializableException serializableException)
+ {
+ this.GeneralInfo = new GeneralInfo(serializableException);
+ }
+
+ ///
+ /// Gets or sets a custom object property to store user supplied information in the bug report. You need to handle
+ /// event to fill this property with required information.
+ ///
+ public object CustomInfo { get; set; }
+
+ ///
+ /// Gets or sets the general information about the exception and the system to be presented in the bug report.
+ ///
+ public GeneralInfo GeneralInfo { get; set; }
+
+ /*///
+ /// Gets or sets a custom object property to store user supplied information in the bug report. You need to handle
+ /// event to fill this property with required information.
+ ///
+ public object StaticInfo { get; set; }*/
+ }
+}
diff --git a/NBug/Core/Reporting/Info/SystemInfo.cs b/NBug/Core/Reporting/Info/SystemInfo.cs
new file mode 100644
index 0000000..5dd5b46
--- /dev/null
+++ b/NBug/Core/Reporting/Info/SystemInfo.cs
@@ -0,0 +1,12 @@
+// --------------------------------------------------------------------------------------------------------------------
+//
+// Copyright (c) 2010 - 2011 Teoman Soygul. Licensed under LGPLv3 (http://www.gnu.org/licenses/lgpl.html).
+//
+// --------------------------------------------------------------------------------------------------------------------
+
+namespace NBug.Core.Reporting.Info
+{
+ public class SystemInfo
+ {
+ }
+}
diff --git a/NBug/Core/Reporting/MiniDump/DumpTypeFlag.cs b/NBug/Core/Reporting/MiniDump/DumpTypeFlag.cs
new file mode 100644
index 0000000..9a7459d
--- /dev/null
+++ b/NBug/Core/Reporting/MiniDump/DumpTypeFlag.cs
@@ -0,0 +1,30 @@
+namespace NBug.Core.Reporting.MiniDump
+{
+ using System;
+
+ [Flags]
+ internal enum DumpTypeFlag : uint
+ {
+ // From dbghelp.h:
+ Normal = 0x00000000,
+ WithDataSegs = 0x00000001,
+ WithFullMemory = 0x00000002,
+ WithHandleData = 0x00000004,
+ FilterMemory = 0x00000008,
+ ScanMemory = 0x00000010,
+ WithUnloadedModules = 0x00000020,
+ WithIndirectlyReferencedMemory = 0x00000040,
+ FilterModulePaths = 0x00000080,
+ WithProcessThreadData = 0x00000100,
+ WithPrivateReadWriteMemory = 0x00000200,
+ WithoutOptionalData = 0x00000400,
+ WithFullMemoryInfo = 0x00000800,
+ WithThreadInfo = 0x00001000,
+ WithCodeSegs = 0x00002000,
+ WithoutAuxiliaryState = 0x00004000,
+ WithFullAuxiliaryState = 0x00008000,
+ WithPrivateWriteCopyMemory = 0x00010000,
+ IgnoreInaccessibleMemory = 0x00020000,
+ ValidTypeFlags = 0x0003ffff,
+ }
+}
diff --git a/NBug/Core/Reporting/MiniDump/DumpWriter.cs b/NBug/Core/Reporting/MiniDump/DumpWriter.cs
new file mode 100644
index 0000000..98635bb
--- /dev/null
+++ b/NBug/Core/Reporting/MiniDump/DumpWriter.cs
@@ -0,0 +1,168 @@
+namespace NBug.Core.Reporting.MiniDump
+{
+ using System;
+ using System.Diagnostics;
+ using System.IO;
+ using System.Runtime.InteropServices;
+
+ using NBug.Core.Util.Exceptions;
+ using NBug.Core.Util.Logging;
+ using NBug.Enums;
+
+ ///
+ /// Sample usage:
+ ///
+ /// using (FileStream fs = new FileStream("minidump.mdmp", FileMode.Create, FileAccess.ReadWrite, FileShare.Write))
+ /// {
+ /// DumpWriter.Write(fs.SafeFileHandle, DumpTypeFlag.WithDataSegs | DumpTypeFlag.WithHandleData);
+ /// }
+ ///
+ ///
+ /// Code snippet is from http://blogs.msdn.com/b/dondu/archive/2010/10/24/writing-minidumps-in-c.aspx
+ internal static class DumpWriter
+ {
+ ///
+ /// Creates a new memory dump and writes it to the specified file (only if Settings.MiniDumpType != MiniDumpType.None).
+ ///
+ /// The minidump file path. Overwritten if exists.
+ /// True if Settings.MiniDumpType settings is set to anything else then MiniDumpType.None.
+ internal static bool Write(string minidumpFilePath)
+ {
+ if (Settings.MiniDumpType != MiniDumpType.None)
+ {
+ bool created;
+
+ using (FileStream fileStream = new FileStream(minidumpFilePath, FileMode.Create, FileAccess.Write))
+ {
+ // ToDo: Create the minidump at a seperate process! Use this to deal with access errors: http://social.msdn.microsoft.com/Forums/en/csharpgeneral/thread/c314e6ca-4892-41e7-ae19-b3a36ad640e9
+ // Bug: In process minidumps causes all sorts of access problems (i.e. one of them is explained below, debugger prevents accessing private memory)
+ created = Write(fileStream.SafeFileHandle, Settings.MiniDumpType.ToString());
+ }
+
+ if (created)
+ {
+ return true;
+ }
+ else
+ {
+ File.Delete(minidumpFilePath);
+ return false;
+ }
+ }
+ else
+ {
+ return false;
+ }
+ }
+
+ private static bool Write(SafeHandle fileHandle, string dumpType)
+ {
+ if (dumpType.ToLower() == MiniDumpType.Tiny.ToString().ToLower())
+ {
+ return Write(fileHandle, DumpTypeFlag.WithIndirectlyReferencedMemory | DumpTypeFlag.ScanMemory);
+ }
+ else if (dumpType.ToLower() == MiniDumpType.Normal.ToString().ToLower())
+ {
+ // If the debugger is attached, it is not possible to access private read-write memory
+ if (Debugger.IsAttached)
+ {
+ return Write(fileHandle, DumpTypeFlag.WithDataSegs | DumpTypeFlag.WithHandleData | DumpTypeFlag.WithUnloadedModules);
+ }
+ else
+ {
+ // Bug: Combination of WithPrivateReadWriteMemory + WithDataSegs hangs Visual Studio 2010 SP1 on some cases while loading the minidump for debugging in mixed mode which was created in by a release build application
+ return Write(fileHandle, DumpTypeFlag.WithPrivateReadWriteMemory | DumpTypeFlag.WithDataSegs | DumpTypeFlag.WithHandleData | DumpTypeFlag.WithUnloadedModules);
+ }
+ }
+ else if (dumpType.ToLower() == MiniDumpType.Full.ToString().ToLower())
+ {
+ return Write(fileHandle, DumpTypeFlag.WithFullMemory);
+ }
+ else
+ {
+ throw NBugConfigurationException.Create(() => Settings.MiniDumpType, "Parameter supplied for settings property is invalid.");
+ }
+ }
+
+ private static bool Write(SafeHandle fileHandle, DumpTypeFlag dumpTypeFlag)
+ {
+ Process currentProcess = Process.GetCurrentProcess();
+ IntPtr currentProcessHandle = currentProcess.Handle;
+ uint currentProcessId = (uint)currentProcess.Id;
+ MiniDumpExceptionInformation exp;
+ exp.ThreadId = GetCurrentThreadId();
+ exp.ClientPointers = false;
+ exp.ExceptionPointers = IntPtr.Zero;
+ exp.ExceptionPointers = Marshal.GetExceptionPointers();
+
+ bool bRet = false;
+
+ try
+ {
+ if (exp.ExceptionPointers == IntPtr.Zero)
+ {
+ bRet = MiniDumpWriteDump(currentProcessHandle, currentProcessId, fileHandle, (uint)dumpTypeFlag, IntPtr.Zero, IntPtr.Zero, IntPtr.Zero);
+ }
+ else
+ {
+ bRet = MiniDumpWriteDump(currentProcessHandle, currentProcessId, fileHandle, (uint)dumpTypeFlag, ref exp, IntPtr.Zero, IntPtr.Zero);
+ }
+ }
+ catch (DllNotFoundException)
+ {
+ Logger.Warning("dbghelp.dll was not found inside the application folder, the system path or SDK folder. Minidump was not generated. If you are not planning on using the minidump feature, you can disable it with the Configurator tool.");
+ return false;
+ }
+
+ if (!bRet)
+ {
+ Logger.Error("Cannot write the minidump. MiniDumpWriteDump (dbghelp.dll) function returned error code: " + Marshal.GetLastWin32Error());
+ return false;
+ }
+ else
+ {
+ return true;
+ }
+ }
+
+ /* typedef struct _MINIDUMP_EXCEPTION_INFORMATION {
+ * DWORD ThreadId;
+ * PEXCEPTION_POINTERS ExceptionPointers;
+ * BOOL ClientPointers;
+ * } MINIDUMP_EXCEPTION_INFORMATION, *PMINIDUMP_EXCEPTION_INFORMATION;
+ */
+
+ [StructLayout(LayoutKind.Sequential, Pack = 4)] // Pack=4 is important! So it works also for x64!
+ private struct MiniDumpExceptionInformation
+ {
+ public uint ThreadId;
+ public IntPtr ExceptionPointers;
+ [MarshalAs(UnmanagedType.Bool)]
+ public bool ClientPointers;
+ }
+
+ /* BOOL
+ * WINAPI
+ * MiniDumpWriteDump(
+ * __in HANDLE hProcess,
+ * __in DWORD ProcessId,
+ * __in HANDLE hFile,
+ * __in MINIDUMP_TYPE DumpType,
+ * __in_opt PMINIDUMP_EXCEPTION_INFORMATION ExceptionParam,
+ * __in_opt PMINIDUMP_USER_STREAM_INFORMATION UserStreamParam,
+ * __in_opt PMINIDUMP_CALLBACK_INFORMATION CallbackParam
+ * );
+ */
+
+ // Overload requiring MiniDumpExceptionInformation
+ [DllImport("dbghelp.dll", EntryPoint = "MiniDumpWriteDump", CallingConvention = CallingConvention.StdCall, CharSet = CharSet.Unicode, ExactSpelling = true, SetLastError = true)]
+ private static extern bool MiniDumpWriteDump(IntPtr hProcess, uint processId, SafeHandle hFile, uint dumpType, ref MiniDumpExceptionInformation expParam, IntPtr userStreamParam, IntPtr callbackParam);
+
+ // Overload supporting MiniDumpExceptionInformation == NULL
+ [DllImport("dbghelp.dll", EntryPoint = "MiniDumpWriteDump", CallingConvention = CallingConvention.StdCall, CharSet = CharSet.Unicode, ExactSpelling = true, SetLastError = true)]
+ private static extern bool MiniDumpWriteDump(IntPtr hProcess, uint processId, SafeHandle hFile, uint dumpType, IntPtr expParam, IntPtr userStreamParam, IntPtr callbackParam);
+
+ [DllImport("kernel32.dll", EntryPoint = "GetCurrentThreadId", ExactSpelling = true, SetLastError = true)]
+ private static extern uint GetCurrentThreadId();
+ }
+}
diff --git a/NBug/Core/Reporting/MiniDump/ExceptionFilters.cs b/NBug/Core/Reporting/MiniDump/ExceptionFilters.cs
new file mode 100644
index 0000000..fceb561
--- /dev/null
+++ b/NBug/Core/Reporting/MiniDump/ExceptionFilters.cs
@@ -0,0 +1,348 @@
+namespace NBug.Core.Reporting.MiniDump
+{
+ using System;
+ using System.Diagnostics;
+ using System.Reflection;
+ using System.Reflection.Emit;
+ using System.Runtime.CompilerServices;
+
+ ///
+ /// This class provides some utilities for working with exceptions and exception filters. The assembly will
+ /// get generated (with automatic locking) on first use of this class with .
+ ///
+ ///
+ ///
+ /// Code inside of exception filters runs before the stack has been logically unwound, and so the throw point
+ /// is still visible in tools like debuggers, and backout code from finally blocks has not yet been run.
+ /// See http://blogs.msdn.com/rmbyers/archive/2008/12/22/getting-good-dumps-when-an-exception-is-thrown.aspx.
+ /// Filters can also be used to provide more fine-grained control over which exceptions are caught.
+ ///
+ /// Be aware, however, that filters run at a surprising time - after an exception has occurred but before
+ /// any finally clause has been run to restore broken invariants for things lexically in scope. This can lead to
+ /// confusion if you access or manipulate program state from your filter. See this blog entry for details
+ /// and more specific guidance: http://blogs.msdn.com/clrteam/archive/2009/08/25/the-good-and-the-bad-of-exception-filters.aspx.
+ ///
+ /// This class relies on Reflection.Emit to generate code which can use filters. If you are willing to add some
+ /// complexity to your build process, a static technique (like writing in VB and use ILMerge, or rewriting with CCI)
+ /// may be a better choice (eg. more performant and easier to specialize). Again see
+ /// http://blogs.msdn.com/rmbyers/archive/2008/12/22/getting-good-dumps-when-an-exception-is-thrown.aspx for details.
+ ///
+ ///
+ internal static class ExceptionFilters
+ {
+ ///
+ /// Execute the body with the specified filter with no handler ever being invoked
+ ///
+ ///
+ /// Body of code to be executed.
+ ///
+ ///
+ /// Body of filter code to be executed to do something with the filtered exception object.
+ ///
+ ///
+ /// Note that this allocates a delegate and closure class, a small amount of overhead but something that may not be appropriate
+ /// for inside of a tight inner loop. If you want to call this on a very hot path, you may want to consider a direct call
+ /// rather than using an anonymous method.
+ ///
+ ///
+ /// Example of a general-purpose exception filter:
+ ///
+ /// ExceptionFilters.Filter(() =>
+ /// {
+ /// // This is the body of the 'try'
+ /// MyCode();
+ /// }, (ex) =>
+ /// {
+ /// // This is the body of the filter
+ /// System.Environment.FailFast("Unexpected exception: " + ex.Message);
+ /// return false; // don't catch - this code isn't reached
+ /// }); // no catch block needed
+ ///
+ ///
+ internal static void Filter(Action body, Action filter)
+ {
+ Filter(
+ body,
+ e =>
+ {
+ filter(e);
+ return false;
+ },
+ null);
+ }
+
+ ///
+ /// Execute the body with the specified filter.
+ ///
+ ///
+ /// The code to run inside the "try" block
+ ///
+ ///
+ /// Called whenever an exception escapes body, passing the exeption object.
+ /// For exceptions that aren't derived from System.Exception, they'll show up as an instance of RuntimeWrappedException.
+ ///
+ ///
+ /// Invoked (with the exception) whenever the filter returns true, causes the exception to be swallowed
+ ///
+ ///
+ /// Example of a general-purpose exception filter:
+ ///
+ /// // General-purpose filter
+ /// ExceptionFilters.Filter(() => {
+ /// Console.WriteLine("In body");
+ /// throw new ApplicationException("test");
+ /// }, (e) => { // Filter block, good for minidumps
+ /// Console.WriteLine("In filter, exception type: {0}", e.GetType().FullName);
+ /// return true;
+ /// }, (e) => { // Catch block, just like a real catch(Exception e)
+ /// Console.WriteLine("In catch, exception type: {0}", e.GetType().FullName);
+ /// });
+ ///
+ ///
+ internal static void Filter(Action body, Func filter, Action handler)
+ {
+ ExceptionFilters.filter(body, filter, handler);
+ }
+
+ ///
+ /// Execute the body which is not expected to ever throw any exceptions.
+ /// If an exception does escape body, stop in the debugger if one is attached and then fail-fast.
+ ///
+ ///
+ /// Body of code to be executed.
+ ///
+ ///
+ /// To call code that you don’t expect to ever throw an exception you can just wrap it with ExecuteWithFailFast. If any exceptions
+ /// escape it’ll immediately fail fast with a watson report and minidump (at the point of throw), or if a debugger is attached break
+ /// at the throw point.
+ ///
+ /// // FailFast on throw
+ /// ExceptionFilters.FailFast(() =>
+ /// {
+ /// // Code you don't expect to throw exceptions
+ /// throw new ApplicationException("Test unexpected exception");
+ /// }); // A minidump will be generated here with good stack trace (not a reseted one like it would happen in a catch block)
+ ///
+ ///
+ internal static void FailFast(Action body)
+ {
+ Filter(
+ body,
+ e =>
+ {
+ Debugger.Log(10, "ExceptionFilter", "Saw unexpected exception: " + e.ToString());
+
+ // Terminate the process with this fatal error
+ if (Environment.Version.Major >= 4)
+ {
+ // .NET 4 adds a FailFast overload which takes the exception, usefull for getting good watson buckets
+ // This will also cause an attached debugger to stop at the throw point, just as if the exception went unhandled.
+ // Note that this code may be compiled against .NET 2.0 but running in CLR v4, so we want to take advantage of
+ // this API even if it's not available at compile time, so we use a late-bound call.
+ typeof(Environment).InvokeMember(
+ "FailFast",
+ BindingFlags.Static | BindingFlags.InvokeMethod,
+ null,
+ null,
+ new object[] { "Unexpected Exception", e });
+ }
+ else
+ {
+ // The experience isn't quite as nice in CLR v2 and before (no good watson buckets, debugger shows a
+ // 'FatalExecutionEngineErrorException' at this point), but still deubggable.
+ Environment.FailFast("Exception: " + e.GetType().FullName);
+ }
+
+ return false; // should never be reached
+ },
+ null);
+ }
+
+ ///
+ /// Like a normal C# Try/Catch but allows one catch block to catch multiple different types of exceptions.
+ ///
+ ///
+ /// The common base exception type to catch
+ ///
+ ///
+ /// Code to execute inside the try
+ ///
+ ///
+ /// All exception types to catch (each of which must be derived from or exactly TExceptionBase)
+ ///
+ ///
+ /// The catch block to execute when one of the specified exceptions is caught
+ ///
+ ///
+ /// Sometimes it’s useful to be able to catch multiple distinct exception types with the same catch block (without unwinding the
+ /// stack for other exceptions, so unexpected exceptions are easier to debug live or in a dump file).
+ ///
+ /// // Catching multiple exception types at once as System.Exception
+ /// ExceptionFilters.TryCatch{SystemException}(() =>
+ /// {
+ /// throw new ArgumentNullException();
+ /// },
+ /// new Type[] { typeof(InvalidCastException), typeof(ArgumentException), typeof(System.IO.FileNotFoundException) },
+ /// (e) =>
+ /// {
+ /// Console.WriteLine("Caught: " + e.Message);
+ /// });
+ ///
+ ///
+ internal static void TryCatch(Action body, Type[] typesToCatch, Action handler)
+ where TExceptionBase : Exception
+ {
+ // Verify that every type in typesToCatch is a sub-type of TExceptionBase
+ #if DEBUG
+ foreach (var tc in typesToCatch)
+ {
+ Debug.Assert(
+ typeof(TExceptionBase).IsAssignableFrom(tc),
+ String.Format("Error: {0} is not a sub-class of {1}", tc.FullName, typeof(TExceptionBase).FullName));
+ }
+ #endif
+
+ Filter(
+ body,
+ e =>
+ {
+ // If the thrown exception is a sub-type (including the same time) of at least one of the provided types then
+ // catch it.
+ foreach (var catchType in typesToCatch)
+ {
+ if (catchType.IsAssignableFrom(e.GetType()))
+ {
+ return true;
+ }
+ }
+
+ return false;
+ },
+ e => handler((TExceptionBase)e));
+ }
+
+ ///
+ /// A convenience method for when only the base type of 'Exception' is needed.
+ ///
+ ///
+ /// Body of code to be executed.
+ ///
+ ///
+ /// The types To Catch.
+ ///
+ ///
+ /// The handler.
+ ///
+ ///
+ ///
+ /// // Catching multiple exception types at once as System.Exception
+ /// ExceptionFilters.TryCatch(() =>
+ /// {
+ /// throw new ArgumentNullException();
+ /// },
+ /// new Type[] { typeof(InvalidCastException), typeof(ArgumentException), typeof(System.IO.FileNotFoundException) },
+ /// (e) =>
+ /// {
+ /// Console.WriteLine("Caught: " + e.Message);
+ /// });
+ ///
+ ///
+ internal static void TryCatch(Action body, Type[] typesToCatch, Action handler)
+ {
+ TryCatch(body, typesToCatch, handler);
+ }
+
+ ///
+ /// The filter.
+ ///
+ private static readonly Action, Action> filter = GenerateFilter();
+
+ ///
+ /// Set to true to write the generated assembly to disk for debugging purposes (eg. to run peverify
+ /// and ildasm on in the case of bad codegen).
+ ///
+ private static bool writeGeneratedAssemblyToDisk = false;
+
+ ///
+ /// Generate a function which has an EH filter
+ ///
+ ///
+ /// The new generated assembly with exception filtering capabilities.
+ ///
+ private static Action, Action> GenerateFilter()
+ {
+ // Create a dynamic assembly with reflection emit
+ var name = new AssemblyName("DynamicFilter");
+ AssemblyBuilder assembly = AppDomain.CurrentDomain.DefineDynamicAssembly(
+ name, writeGeneratedAssemblyToDisk ? AssemblyBuilderAccess.RunAndSave : AssemblyBuilderAccess.Run);
+ ModuleBuilder module;
+ if (writeGeneratedAssemblyToDisk)
+ {
+ module = assembly.DefineDynamicModule("DynamicFilter", "DynamicFilter.dll");
+ }
+ else
+ {
+ module = assembly.DefineDynamicModule("DynamicFilter");
+ }
+
+ // Add an assembly attribute that tells the CLR to wrap non-CLS-compliant exceptions in a RuntimeWrappedException object
+ // (so the cast to Exception in the code will always succeed). C# and VB always do this, C++/CLI doesn't.
+ assembly.SetCustomAttribute(
+ new CustomAttributeBuilder(
+ typeof(RuntimeCompatibilityAttribute).GetConstructor(new Type[] { }),
+ new object[] { },
+ new[] { typeof(RuntimeCompatibilityAttribute).GetProperty("WrapNonExceptionThrows") },
+ new object[] { true }));
+
+ // Add an assembly attribute that tells the CLR not to attempt to load PDBs when compiling this assembly
+ assembly.SetCustomAttribute(
+ new CustomAttributeBuilder(
+ typeof(DebuggableAttribute).GetConstructor(new[] { typeof(DebuggableAttribute.DebuggingModes) }),
+ new object[] { DebuggableAttribute.DebuggingModes.IgnoreSymbolStoreSequencePoints }));
+
+ // Create the type and method which will contain the filter
+ TypeBuilder type = module.DefineType("Filter", TypeAttributes.Class | TypeAttributes.Public);
+ var argTypes = new[] { typeof(Action), typeof(Func), typeof(Action) };
+ MethodBuilder meth = type.DefineMethod(
+ "InvokeWithFilter", MethodAttributes.Public | MethodAttributes.Static, typeof(void), argTypes);
+
+ var il = meth.GetILGenerator();
+ var exLoc = il.DeclareLocal(typeof(Exception));
+
+ // Invoke the body delegate inside the try
+ il.BeginExceptionBlock();
+ il.Emit(OpCodes.Ldarg_0);
+ il.EmitCall(OpCodes.Callvirt, typeof(Action).GetMethod("Invoke"), null);
+
+ // Invoke the filter delegate inside the filter block
+ il.BeginExceptFilterBlock();
+ il.Emit(OpCodes.Castclass, typeof(Exception));
+ il.Emit(OpCodes.Stloc_0);
+ il.Emit(OpCodes.Ldarg_1);
+ il.Emit(OpCodes.Ldloc_0);
+ il.EmitCall(OpCodes.Callvirt, typeof(Func).GetMethod("Invoke"), null);
+
+ // Invoke the handler delegate inside the catch block
+ il.BeginCatchBlock(null);
+ il.Emit(OpCodes.Castclass, typeof(Exception));
+ il.Emit(OpCodes.Stloc_0);
+ il.Emit(OpCodes.Ldarg_2);
+ il.Emit(OpCodes.Ldloc_0);
+ il.EmitCall(OpCodes.Callvirt, typeof(Action).GetMethod("Invoke"), null);
+
+ il.EndExceptionBlock();
+ il.Emit(OpCodes.Ret);
+
+ var bakedType = type.CreateType();
+ if (writeGeneratedAssemblyToDisk)
+ {
+ assembly.Save("DynamicFilter.dll");
+ }
+
+ // Construct a delegate to the filter function and return it
+ var bakedMeth = bakedType.GetMethod("InvokeWithFilter");
+ var del = Delegate.CreateDelegate(typeof(Action, Action>), bakedMeth);
+ return (Action, Action>)del;
+ }
+ }
+}
\ No newline at end of file
diff --git a/NBug/Core/Submission/Database/Ado.cs b/NBug/Core/Submission/Database/Ado.cs
new file mode 100644
index 0000000..182a7c7
--- /dev/null
+++ b/NBug/Core/Submission/Database/Ado.cs
@@ -0,0 +1,6 @@
+namespace NBug.Core.Submission.Database
+{
+ internal class Ado
+ {
+ }
+}
diff --git a/NBug/Core/Submission/Database/MsSql.cs b/NBug/Core/Submission/Database/MsSql.cs
new file mode 100644
index 0000000..ac2a558
--- /dev/null
+++ b/NBug/Core/Submission/Database/MsSql.cs
@@ -0,0 +1,6 @@
+namespace NBug.Core.Submission.Database
+{
+ internal class MsSql
+ {
+ }
+}
diff --git a/NBug/Core/Submission/Database/MySql.cs b/NBug/Core/Submission/Database/MySql.cs
new file mode 100644
index 0000000..cce6357
--- /dev/null
+++ b/NBug/Core/Submission/Database/MySql.cs
@@ -0,0 +1,6 @@
+namespace NBug.Core.Submission.Database
+{
+ internal class MySql
+ {
+ }
+}
diff --git a/NBug/Core/Submission/Dispatcher.cs b/NBug/Core/Submission/Dispatcher.cs
new file mode 100644
index 0000000..c314c44
--- /dev/null
+++ b/NBug/Core/Submission/Dispatcher.cs
@@ -0,0 +1,210 @@
+// --------------------------------------------------------------------------------------------------------------------
+//
+// Copyright (c) 2010 - 2011 Teoman Soygul. Licensed under LGPLv3 (http://www.gnu.org/licenses/lgpl.html).
+//
+// --------------------------------------------------------------------------------------------------------------------
+
+namespace NBug.Core.Submission
+{
+ using System;
+ using System.IO;
+ using System.Threading.Tasks;
+
+ using NBug.Core.Util.Logging;
+ using NBug.Core.Util.Storage;
+
+ internal class Dispatcher
+ {
+ ///
+ /// Initializes a new instance of the Dispatcher class to send queued reports.
+ ///
+ ///
+ /// Decides whether to start the dispatching process asynchronously on a background thread.
+ ///
+ internal Dispatcher(bool isAsynchronous)
+ {
+ // Test if it has NOT been more than x many days since entry assembly was last modified)
+ // This is the exact verifier code in the BugReport.cs of CreateReportZip() function
+ if (Settings.StopReportingAfter < 0 || File.GetLastWriteTime(Settings.EntryAssembly.Location).AddDays(Settings.StopReportingAfter).CompareTo(DateTime.Now) > 0)
+ {
+ if (isAsynchronous)
+ {
+ // Log and swallow NBug's internal exceptions by default
+ Task.Factory.StartNew(this.Dispatch).ContinueWith(
+ t => Logger.Error("An exception occurred while dispatching bug report. Check the inner exception for details", t.Exception),
+ TaskContinuationOptions.OnlyOnFaulted);
+ }
+ else
+ {
+ try
+ {
+ this.Dispatch();
+ }
+ catch (Exception exception)
+ {
+ Logger.Error("An exception occurred while dispatching bug report. Check the inner exception for details.", exception);
+ }
+ }
+ }
+ else
+ {
+ // ToDo: Cleanout all the remaining report files and disable NBug completely
+ }
+ }
+
+ private void Dispatch()
+ {
+ // Make sure that we are not interfering with the crucial startup work);
+ if (!Settings.RemoveThreadSleep)
+ {
+ System.Threading.Thread.Sleep(Settings.SleepBeforeSend * 1000);
+ }
+
+ // Turncate extra report files and try to send the first one in the queue
+ Storer.TruncateReportFiles();
+
+ // Now go through configured destinations and submit to all automatically
+ for (bool hasReport = true; hasReport;)
+ {
+ using (Storer storer = new Storer())
+ using (Stream stream = storer.GetFirstReportFile())
+ {
+ if (stream != null)
+ {
+ if (this.EnumerateDestinations(stream) == false)
+ {
+ break;
+ }
+
+ // Delete the file after it was sent
+ storer.DeleteCurrentReportFile();
+ }
+ else
+ {
+ hasReport = false;
+ }
+ }
+ }
+ }
+
+ ///
+ /// Enumerate all protocols to see if they are properly configured and send using the ones that are configured
+ /// as many times as necessary.
+ ///
+ /// The file to read the report from.
+ /// Returns if the sending was successful.
+ /// Returns if the report was submitted to at least one destination.
+ private bool EnumerateDestinations(Stream reportFile)
+ {
+ bool sentSuccessfullyAtLeastOnce = false;
+
+ if (!string.IsNullOrEmpty(Settings.Destination1))
+ {
+ if (this.EnumerateSubmitters(reportFile, this.GetDestinationType(Settings.Destination1), Settings.Destination1))
+ {
+ sentSuccessfullyAtLeastOnce = true;
+ }
+ }
+
+ if (!string.IsNullOrEmpty(Settings.Destination2))
+ {
+ if (this.EnumerateSubmitters(reportFile, this.GetDestinationType(Settings.Destination2), Settings.Destination2))
+ {
+ sentSuccessfullyAtLeastOnce = true;
+ }
+ }
+
+ if (!string.IsNullOrEmpty(Settings.Destination3))
+ {
+ if (this.EnumerateSubmitters(reportFile, this.GetDestinationType(Settings.Destination3), Settings.Destination3))
+ {
+ sentSuccessfullyAtLeastOnce = true;
+ }
+ }
+
+ if (!string.IsNullOrEmpty(Settings.Destination4))
+ {
+ if (this.EnumerateSubmitters(reportFile, this.GetDestinationType(Settings.Destination4), Settings.Destination4))
+ {
+ sentSuccessfullyAtLeastOnce = true;
+ }
+ }
+
+ if (!string.IsNullOrEmpty(Settings.Destination5))
+ {
+ if (this.EnumerateSubmitters(reportFile, this.GetDestinationType(Settings.Destination5), Settings.Destination5))
+ {
+ sentSuccessfullyAtLeastOnce = true;
+ }
+ }
+
+ return sentSuccessfullyAtLeastOnce;
+ }
+
+ private string GetDestinationType(string destination)
+ {
+ return Protocol.Parse(destination)["Type"];
+ }
+
+ // Individual submitter components should fail silently (mainly due to misconfiguration or outdated configuration)
+ private bool EnumerateSubmitters(Stream reportFile, string destination, string connectionString)
+ {
+ if (destination.ToLower() == Protocols.Mail.ToString().ToLower() || destination.ToLower() == "email" || destination.ToLower() == "e-mail")
+ {
+ try
+ {
+ Logger.Trace("Submitting bug report via email.");
+ return new Web.Mail(connectionString, reportFile).Send();
+ }
+ catch (Exception exception)
+ {
+ Logger.Error("An exception occurred while submitting bug report with E-mail. Check the inner exception for details.", exception);
+ return false;
+ }
+ }
+ else if (destination.ToLower() == Protocols.Redmine.ToString().ToLower())
+ {
+ try
+ {
+ Logger.Trace("Submitting bug report to Redmine bug tracker.");
+ return new Tracker.Redmine(connectionString, reportFile).Send();
+ }
+ catch (Exception exception)
+ {
+ Logger.Error("An exception occurred while submitting bug report to Redmine Issue Tracker. Check the inner exception for details.", exception);
+ return false;
+ }
+ }
+ else if (destination.ToLower() == Protocols.FTP.ToString().ToLower())
+ {
+ try
+ {
+ Logger.Trace("Submitting bug report to via FTP connection.");
+ return new Web.Ftp(connectionString, reportFile).Send();
+ }
+ catch (Exception exception)
+ {
+ Logger.Error("An exception occurred while submitting bug report to the FTP server. Check the inner exception for details.", exception);
+ return false;
+ }
+ }
+ else if (destination.ToLower() == Protocols.HTTP.ToString().ToLower())
+ {
+ try
+ {
+ Logger.Trace("Submitting bug report to via HTTP connection.");
+ return new Web.Http(connectionString, reportFile).Send();
+ }
+ catch (Exception exception)
+ {
+ Logger.Error("An exception occurred while submitting bug report to the web (HTTP) server. Check the inner exception for details.", exception);
+ return false;
+ }
+ }
+ else
+ {
+ return false;
+ }
+ }
+ }
+}
diff --git a/NBug/Core/Submission/Protocol.cs b/NBug/Core/Submission/Protocol.cs
new file mode 100644
index 0000000..13ac904
--- /dev/null
+++ b/NBug/Core/Submission/Protocol.cs
@@ -0,0 +1,166 @@
+// --------------------------------------------------------------------------------------------------------------------
+//
+// Copyright (c) 2010 - 2011 Teoman Soygul. Licensed under LGPLv3 (http://www.gnu.org/licenses/lgpl.html).
+//
+// --------------------------------------------------------------------------------------------------------------------
+
+namespace NBug.Core.Submission
+{
+ using System;
+ using System.Collections.Generic;
+ using System.IO;
+ using System.Linq;
+ using System.Reflection;
+ using System.Text.RegularExpressions;
+ using System.Xml.Linq;
+ using System.Xml.Serialization;
+
+ using NBug.Core.Reporting.Info;
+ using NBug.Core.Util.Exceptions;
+ using NBug.Core.Util.Serialization;
+ using NBug.Core.Util.Storage;
+
+ public class Protocol
+ {
+ private readonly Dictionary reportItems = new Dictionary();
+
+ ///
+ /// Initializes a new instance of the Protocol class to be extended by derived types.
+ ///
+ /// Connection string to be parsed.
+ /// Derived protocol type.
+ protected Protocol(string connectionString, Protocols protocol)
+ {
+ this.Type = protocol;
+ var fields = Parse(connectionString);
+ var properties = this.GetType().GetProperties(BindingFlags.Instance | BindingFlags.Public);
+
+ foreach (var property in properties.Where(property => property.Name != "Type" && fields.ContainsKey(property.Name)))
+ {
+ property.SetValue(this, fields[property.Name], null);
+ }
+ }
+
+ ///
+ /// Initializes a new instance of the Protocol class to be extended by derived types.
+ ///
+ /// Connection string to be parsed.
+ /// Report file in which the report details are contained.
+ /// Derived protocol type.
+ protected Protocol(string connectionString, Stream reportFile, Protocols protocol) : this(connectionString, protocol)
+ {
+ this.ReportFile = reportFile;
+
+ // ToDo: Optimize this so large dump files will not be loaded into the memory before sending but streamed from the disk
+ // Not inside using(...) block to prevent file stream from getting closed
+ var zipStorer = ZipStorer.Open(reportFile, FileAccess.Read);
+ using (Stream zipItemStream = new MemoryStream())
+ {
+ var zipDirectory = zipStorer.ReadCentralDir();
+
+ foreach (var entry in zipDirectory)
+ {
+ if (Path.GetFileName(entry.FilenameInZip) == StoredItemFile.Exception)
+ {
+ zipItemStream.SetLength(0);
+ zipStorer.ExtractFile(entry, zipItemStream);
+ zipItemStream.Position = 0;
+ var deserializer = new XmlSerializer(typeof(SerializableException));
+ this.SerializableException = (SerializableException)deserializer.Deserialize(zipItemStream);
+ zipItemStream.Position = 0;
+ this.reportItems.Add(StoredItemType.Exception, XElement.Load(zipItemStream));
+ }
+ else if (Path.GetFileName(entry.FilenameInZip) == StoredItemFile.Report)
+ {
+ zipItemStream.SetLength(0);
+ zipStorer.ExtractFile(entry, zipItemStream);
+ zipItemStream.Position = 0;
+ var deserializer = new XmlSerializer(typeof(Report));
+ this.Report = (Report)deserializer.Deserialize(zipItemStream);
+ zipItemStream.Position = 0;
+ this.reportItems.Add(StoredItemType.Report, XElement.Load(zipItemStream));
+ }
+ }
+ }
+
+ this.ReportFile.Position = 0;
+ }
+
+ protected Protocol(Protocols protocol)
+ {
+ this.Type = protocol;
+ }
+
+ ///
+ /// Gets serialized representation of the connection string.
+ ///
+ internal string ConnectionString
+ {
+ get
+ {
+ var connectionString = "Type=" + this.Type + ";";
+ var properties = this.GetType().GetProperties(BindingFlags.Instance | BindingFlags.Public);
+
+ foreach (var property in properties)
+ {
+ var prop = property.GetValue(this, null);
+ if (prop != null)
+ {
+ var val = prop.ToString();
+
+ if (!string.IsNullOrEmpty(val))
+ {
+ // Escape = and ; characters
+ connectionString += property.Name.Replace(";", @"\;").Replace("=", @"\=") + "=" + val.Replace(";", @"\;").Replace("=", @"\=") + ";";
+ }
+ }
+ }
+
+ return connectionString;
+ }
+ }
+
+ // ToDo: Actually not the report file but an instance of Storer.cs should be used here! It has all the methods for handling the files anyway.
+ protected Stream ReportFile { get; set; }
+
+ protected SerializableException SerializableException { get; set; }
+
+ protected Report Report { get; set; }
+
+ private Protocols Type { get; set; }
+
+ // Currently ; and = characters are illegal and needs preparsing and escaping
+ internal static Dictionary Parse(string connectionString)
+ {
+ try
+ {
+ // Pre-processing the connection string, detect escape sequence, trim trailing semicolon
+ var data = new Dictionary();
+ var fields = Regex.Split(connectionString.TrimEnd(new[] { ';' }), @"(?
+// Copyright (c) 2010 - 2011 Teoman Soygul. Licensed under LGPLv3 (http://www.gnu.org/licenses/lgpl.html).
+//
+// --------------------------------------------------------------------------------------------------------------------
+
+namespace NBug.Core.Submission
+{
+ // Actually enum names should be singular words!
+ public enum Protocols
+ {
+ Mail,
+ Redmine,
+ BugNET,
+ FTP,
+ HTTP
+ }
+}
diff --git a/NBug/Core/Submission/Tracker/BugNet.cs b/NBug/Core/Submission/Tracker/BugNet.cs
new file mode 100644
index 0000000..243fbb9
--- /dev/null
+++ b/NBug/Core/Submission/Tracker/BugNet.cs
@@ -0,0 +1,36 @@
+// --------------------------------------------------------------------------------------------------------------------
+//
+// Copyright (c) 2010 - 2011 Teoman Soygul. Licensed under LGPLv3 (http://www.gnu.org/licenses/lgpl.html).
+//
+// --------------------------------------------------------------------------------------------------------------------
+
+namespace NBug.Core.Submission.Tracker
+{
+ using System.IO;
+ using System.Net;
+
+ public class BugNet : Protocol
+ {
+ internal BugNet(string connectionString, Stream reportFile)
+ : base(connectionString, reportFile, Protocols.BugNET)
+ {
+ }
+
+ internal BugNet(string connectionString)
+ : base(connectionString, Protocols.BugNET)
+ {
+ }
+
+ internal BugNet()
+ : base(Protocols.BugNET)
+ {
+ }
+
+ internal bool Send()
+ {
+ HttpWebRequest request;
+
+ return true;
+ }
+ }
+}
\ No newline at end of file
diff --git a/NBug/Core/Submission/Tracker/Bugzilla.cs b/NBug/Core/Submission/Tracker/Bugzilla.cs
new file mode 100644
index 0000000..c416207
--- /dev/null
+++ b/NBug/Core/Submission/Tracker/Bugzilla.cs
@@ -0,0 +1,12 @@
+// --------------------------------------------------------------------------------------------------------------------
+//
+// Copyright (c) 2010 - 2011 Teoman Soygul. Licensed under LGPLv3 (http://www.gnu.org/licenses/lgpl.html).
+//
+// --------------------------------------------------------------------------------------------------------------------
+
+namespace NBug.Core.Submission.Tracker
+{
+ internal class Bugzilla
+ {
+ }
+}
diff --git a/NBug/Core/Submission/Tracker/GitHub.cs b/NBug/Core/Submission/Tracker/GitHub.cs
new file mode 100644
index 0000000..088d094
--- /dev/null
+++ b/NBug/Core/Submission/Tracker/GitHub.cs
@@ -0,0 +1,12 @@
+// --------------------------------------------------------------------------------------------------------------------
+//
+// Copyright (c) 2010 - 2011 Teoman Soygul. Licensed under LGPLv3 (http://www.gnu.org/licenses/lgpl.html).
+//
+// --------------------------------------------------------------------------------------------------------------------
+
+namespace NBug.Core.Submission.Tracker
+{
+ internal class GitHub
+ {
+ }
+}
diff --git a/NBug/Core/Submission/Tracker/GoogleCode.cs b/NBug/Core/Submission/Tracker/GoogleCode.cs
new file mode 100644
index 0000000..bd1f500
--- /dev/null
+++ b/NBug/Core/Submission/Tracker/GoogleCode.cs
@@ -0,0 +1,12 @@
+// --------------------------------------------------------------------------------------------------------------------
+//
+// Copyright (c) 2010 - 2011 Teoman Soygul. Licensed under LGPLv3 (http://www.gnu.org/licenses/lgpl.html).
+//
+// --------------------------------------------------------------------------------------------------------------------
+
+namespace NBug.Core.Submission.Tracker
+{
+ internal class GoogleCode
+ {
+ }
+}
diff --git a/NBug/Core/Submission/Tracker/Redmine.cs b/NBug/Core/Submission/Tracker/Redmine.cs
new file mode 100644
index 0000000..a5bad4f
--- /dev/null
+++ b/NBug/Core/Submission/Tracker/Redmine.cs
@@ -0,0 +1,207 @@
+// --------------------------------------------------------------------------------------------------------------------
+//
+// Copyright (c) 2010 - 2011 Teoman Soygul. Licensed under LGPLv3 (http://www.gnu.org/licenses/lgpl.html).
+//
+// --------------------------------------------------------------------------------------------------------------------
+
+namespace NBug.Core.Submission.Tracker
+{
+ using System;
+ using System.IO;
+ using System.Net;
+ using System.Text;
+ using System.Xml.Linq;
+
+ using NBug.Core.Util.Logging;
+ using NBug.Core.Util.Storage;
+
+ internal class Redmine : Protocol
+ {
+ internal Redmine(string connectionString, Stream reportFile)
+ : base(connectionString, reportFile, Protocols.Redmine)
+ {
+ }
+
+ internal Redmine(string connectionString)
+ : base(connectionString, Protocols.Redmine)
+ {
+ }
+
+ internal Redmine()
+ : base(Protocols.Redmine)
+ {
+ }
+
+ // Connection string format (single line)
+ // Warning: There should be no semicolon (;) or equals sign (=) used in any field except for password
+ // Note: Url should be a full url with a trailing slash (/), like: http://....../
+
+ /* Type=Redmine;
+ * Url=http://tracker.mydomain.com/;
+ * ProjectId=myproject;
+ * TrackerId=;
+ * PriorityId=;
+ * CategoryId=;
+ * CustomSubject=;
+ * FixedVersionId=;
+ * AssignedToId=;
+ * ParentId=;
+ * StatusId=;
+ * AuthorId=;
+ * ApiKey=myapikey;
+ */
+
+ public string Url { get; set; }
+
+ public string ProjectId { get; set; }
+
+ public string TrackerId { get; set; }
+
+ public string PriorityId { get; set; }
+
+ public string CategoryId { get; set; }
+
+ public string CustomSubject { get; set; }
+
+ public string FixedVersionId { get; set; }
+
+ public string AssignedToId { get; set; }
+
+ public string ParentId { get; set; }
+
+ public string StatusId { get; set; }
+
+ public string AuthorId { get; set; }
+
+ public string ApiKey { get; set; }
+
+ internal bool Send()
+ {
+ HttpWebRequest request;
+
+ if (string.IsNullOrEmpty(this.ApiKey))
+ {
+ request = (HttpWebRequest)WebRequest.Create(new Uri(this.Url + "issues.xml"));
+ }
+ else
+ {
+ request = (HttpWebRequest)WebRequest.Create(new Uri(this.Url + "issues.xml?key=" + this.ApiKey));
+ }
+
+ // Used POST as per http://www.redmine.org/projects/redmine/wiki/Rest_Issues#Creating-an-issue
+ request.Method = "POST";
+ request.ContentType = "application/xml";
+ request.Accept = "application/xml";
+ request.ServicePoint.Expect100Continue = false; // Patch #11593. Some servers seem to have problem accepting the Expect: 100-continue header
+
+ // Redmine v1.1.1 REST XML templates (* indicate required fields)
+ // Note: <*_id> fields always ask for numeric values
+
+ /*
+ *
+ * *Example
+ * *myproject
+ *
+ *
+ *
+ *
+ *
+ *
+ *
+ *
+ *
+ *
+ *
+ *
+ *
+ *
+ *
+ *
+ */
+
+ var subject = "NBug: " + this.Report.GeneralInfo.HostApplication + " (" +
+ this.Report.GeneralInfo.HostApplicationVersion + "): " +
+ this.Report.GeneralInfo.ExceptionType + " @ " +
+ this.Report.GeneralInfo.TargetSite;
+
+ var description = "" + this.GetReport(StoredItemType.Report) + Environment.NewLine + Environment.NewLine +
+ this.GetReport(StoredItemType.Exception) + "
";
+
+ var redmineRequestXml = new XElement("issue", new XElement("project_id", this.ProjectId));
+
+ if (!string.IsNullOrEmpty(this.TrackerId))
+ {
+ redmineRequestXml.Add(new XElement("tracker_id", this.TrackerId));
+ }
+
+ if (!string.IsNullOrEmpty(this.PriorityId))
+ {
+ redmineRequestXml.Add(new XElement("priority_id", this.PriorityId));
+ }
+
+ if (!string.IsNullOrEmpty(this.CategoryId))
+ {
+ redmineRequestXml.Add(new XElement("category_id", this.CategoryId));
+ }
+
+ // Add the subject and make sure that it is less than 255 characters or Redmine trows an HTTP error code 422 : Unprocessable Entity
+ if (!string.IsNullOrEmpty(this.CustomSubject))
+ {
+ var sbj = this.CustomSubject + " : " + subject;
+ redmineRequestXml.Add(sbj.Length > 254 ? new XElement("subject", sbj.Substring(0, 254)) : new XElement("subject", sbj));
+ }
+ else
+ {
+ redmineRequestXml.Add(subject.Length > 254 ? new XElement("subject", subject.Substring(0, 254)) : new XElement("subject", subject));
+ }
+
+ if (!string.IsNullOrEmpty(description))
+ {
+ redmineRequestXml.Add(new XElement("description", description));
+ }
+
+ if (!string.IsNullOrEmpty(this.FixedVersionId))
+ {
+ redmineRequestXml.Add(new XElement("fixed_version_id", this.FixedVersionId));
+ }
+
+ if (!string.IsNullOrEmpty(this.AssignedToId))
+ {
+ redmineRequestXml.Add(new XElement("assigned_to_id", this.AssignedToId));
+ }
+
+ if (!string.IsNullOrEmpty(this.ParentId))
+ {
+ redmineRequestXml.Add(new XElement("parent_id", this.ParentId));
+ }
+
+ if (!string.IsNullOrEmpty(this.StatusId))
+ {
+ redmineRequestXml.Add(new XElement("status_id", this.StatusId));
+ }
+
+ if (!string.IsNullOrEmpty(this.AuthorId))
+ {
+ redmineRequestXml.Add(new XElement("author_id", this.AuthorId));
+ }
+
+ var bytes = Encoding.UTF8.GetBytes(redmineRequestXml.ToString());
+
+ request.ContentLength = bytes.Length;
+
+ using (var putStream = request.GetRequestStream())
+ {
+ putStream.Write(bytes, 0, bytes.Length);
+ }
+
+ // Log the response from Redmine RESTful service
+ using (var response = (HttpWebResponse)request.GetResponse())
+ using (var reader = new StreamReader(response.GetResponseStream()))
+ {
+ Logger.Info("Response from Redmine Issue Tracker: " + reader.ReadToEnd());
+ }
+
+ return true;
+ }
+ }
+}
diff --git a/NBug/Core/Submission/Tracker/Trac.cs b/NBug/Core/Submission/Tracker/Trac.cs
new file mode 100644
index 0000000..b4ca6d5
--- /dev/null
+++ b/NBug/Core/Submission/Tracker/Trac.cs
@@ -0,0 +1,35 @@
+// --------------------------------------------------------------------------------------------------------------------
+//
+// Copyright (c) 2010 - 2011 Teoman Soygul. Licensed under LGPLv3 (http://www.gnu.org/licenses/lgpl.html).
+//
+// --------------------------------------------------------------------------------------------------------------------
+
+namespace NBug.Core.Submission.Tracker
+{
+ using System.IO;
+
+ internal class Trac : Protocol
+ {
+ protected Trac(string connectionString, Stream reportFile)
+ : base(connectionString, reportFile, Protocols.Mail)
+ {
+ }
+
+ // Connection string format (single line)
+ // Warning: There should be no semicolon (;) or equals sign (=) used in any field except for password
+ // Warning: No fild value value should contain the phrase 'password='
+ // Warning: XML-RPC.NET assembly should be referenced
+ // Note: Url should be a full url without a trailing slash (/), like: http://......
+ // Note: Anononymous URL is: http://trac-hacks.org/xmlrpc and authenticated URL is: http://trac-hacks.org/login/xmlrpc
+
+ /* Type=Trac;
+ * Url=http://tracker.mydomain.com/xmlrpc;
+ */
+
+ internal bool Send()
+ {
+ // ToDo: Check to see if XML-RPC.NET is referenced and if not, show a developer UI as a waning -or- even better, dynamically load the assembly and use that and not the referenced one!
+ return true;
+ }
+ }
+}
diff --git a/NBug/Core/Submission/Web/Ftp.cs b/NBug/Core/Submission/Web/Ftp.cs
new file mode 100644
index 0000000..6d63297
--- /dev/null
+++ b/NBug/Core/Submission/Web/Ftp.cs
@@ -0,0 +1,92 @@
+// --------------------------------------------------------------------------------------------------------------------
+//
+// Copyright (c) 2010 - 2011 Teoman Soygul. Licensed under LGPLv3 (http://www.gnu.org/licenses/lgpl.html).
+//
+// --------------------------------------------------------------------------------------------------------------------
+
+namespace NBug.Core.Submission.Web
+{
+ using System;
+ using System.IO;
+ using System.Net;
+ using System.Text;
+
+ using NBug.Core.Util.Logging;
+
+ internal class Ftp : Protocol
+ {
+ internal Ftp(string connectionString, Stream reportFile)
+ : base(connectionString, reportFile, Protocols.FTP)
+ {
+ }
+
+ internal Ftp(string connectionString)
+ : base(connectionString, Protocols.FTP)
+ {
+ }
+
+ internal Ftp()
+ : base(Protocols.FTP)
+ {
+ }
+
+ // Connection string format (single line)
+ // Warning: There should be no semicolon (;) or equals sign (=) used in any field except for password.
+ // Warning: No fild value value should contain the phrase 'password='
+ // Note: Url should be a full url with a trailing slash (/), like: ftp://....../
+
+ /* Type=FTP;
+ * Url=ftp://tracker.mydomain.com/myproject/;
+ * UseSSL=false;
+ * Username=;
+ * Password=;
+ */
+
+ public string Url { get; set; }
+
+ public string Usessl { get; set; }
+
+ public string Username { get; set; }
+
+ public string Password { get; set; }
+
+ internal bool Send()
+ {
+ var request = (FtpWebRequest)WebRequest.Create(new Uri(this.Url + Path.GetFileName(((FileStream)this.ReportFile).Name)));
+
+ if (!string.IsNullOrEmpty(this.Usessl))
+ {
+ request.EnableSsl = Convert.ToBoolean(this.Usessl.ToLower());
+ }
+
+ if (!string.IsNullOrEmpty(this.Username))
+ {
+ request.Credentials = new NetworkCredential(this.Username, this.Password);
+ }
+
+ request.Method = WebRequestMethods.Ftp.UploadFile;
+ request.Proxy = null; // Otherwise we'll get an exception: The requested FTP command is not supported when a HTTP proxy is used
+
+ using (var requestStream = request.GetRequestStream())
+ {
+ this.ReportFile.Position = 0;
+ this.ReportFile.CopyTo(requestStream);
+ this.ReportFile.Position = 0;
+ }
+
+ using (var response = (FtpWebResponse)request.GetResponse())
+ using (var reader = new StreamReader(response.GetResponseStream()))
+ {
+ var responseString = reader.ReadToEnd(); // Null on successful transfer
+ if (!string.IsNullOrEmpty(responseString))
+ {
+ Logger.Info("Response from FTP server: " + responseString);
+ }
+
+ Logger.Info("Response from FTP server: " + response.StatusDescription);
+ }
+
+ return true;
+ }
+ }
+}
diff --git a/NBug/Core/Submission/Web/Http.cs b/NBug/Core/Submission/Web/Http.cs
new file mode 100644
index 0000000..3d5bb12
--- /dev/null
+++ b/NBug/Core/Submission/Web/Http.cs
@@ -0,0 +1,86 @@
+// --------------------------------------------------------------------------------------------------------------------
+//
+// Copyright (c) 2010 - 2011 Teoman Soygul. Licensed under LGPLv3 (http://www.gnu.org/licenses/lgpl.html).
+//
+// --------------------------------------------------------------------------------------------------------------------
+
+namespace NBug.Core.Submission.Web
+{
+ using System.IO;
+ using System.Net;
+
+ using NBug.Core.Util.Logging;
+
+ internal class Http : Protocol
+ {
+ internal Http(string connectionString, Stream reportFile)
+ : base(connectionString, reportFile, Protocols.HTTP)
+ {
+ }
+
+ internal Http(string connectionString)
+ : base(connectionString, Protocols.HTTP)
+ {
+ }
+
+ internal Http()
+ : base(Protocols.HTTP)
+ {
+ }
+
+ // Connection string format (single line)
+ // Warning: There should be no semicolon (;) or equals sign (=) used in any field.
+ // Note: Url should be a full url with a trailing slash (/) or file extension (i.e. .php), like: http://....../ -or- http://....../upload.php
+
+ /* Type=HTTP;
+ * Url=http://tracker.mydomain.com/myproject/upload.php;
+ */
+
+ public string Url { get; set; }
+
+ internal bool Send()
+ {
+ // Advanced method with ability to post variables along with file (do not forget to urlencode the query parameters)
+ // http://www.codeproject.com/KB/cs/uploadfileex.aspx
+ // http://stackoverflow.com/questions/566462/upload-files-with-httpwebrequest-multipart-form-data
+ // http://stackoverflow.com/questions/767790/how-do-i-upload-an-image-file-using-a-post-request-in-c
+ // http://netomatix.com/HttpPostData.aspx
+
+ /* upload.php file my look like the one below (note that uploaded files are not statically named in this case script may need modification)
+ *
+ *
+ */
+
+ using (var webClient = new WebClient())
+ using (var data = new MemoryStream())
+ {
+ this.ReportFile.Position = 0;
+ this.ReportFile.CopyTo(data);
+ data.Position = 0;
+ var response = webClient.UploadData(this.Url, data.GetBuffer());
+ Logger.Info("Response from HTTP server: " + System.Text.Encoding.ASCII.GetString(response));
+ }
+
+ this.ReportFile.Position = 0;
+
+ return true;
+ }
+ }
+}
diff --git a/NBug/Core/Submission/Web/Mail.cs b/NBug/Core/Submission/Web/Mail.cs
new file mode 100644
index 0000000..b504a11
--- /dev/null
+++ b/NBug/Core/Submission/Web/Mail.cs
@@ -0,0 +1,224 @@
+// --------------------------------------------------------------------------------------------------------------------
+//
+// Copyright (c) 2010 - 2011 Teoman Soygul. Licensed under LGPLv3 (http://www.gnu.org/licenses/lgpl.html).
+//
+// --------------------------------------------------------------------------------------------------------------------
+
+namespace NBug.Core.Submission.Web
+{
+ using System;
+ using System.IO;
+ using System.Net;
+ using System.Net.Mail;
+
+ using NBug.Core.Util.Logging;
+ using NBug.Core.Util.Storage;
+
+ internal class Mail : Protocol
+ {
+ internal Mail(string connectionString, Stream reportFile)
+ : base(connectionString, reportFile, Protocols.Mail)
+ {
+ }
+
+ internal Mail(string connectionString)
+ : base(connectionString, Protocols.Mail)
+ {
+ }
+
+ internal Mail()
+ : base(Protocols.Mail)
+ {
+ }
+
+ // Connection string format (single line)
+ // Warning: There should be no semicolon (;) or equals sign (=) used in any field except for password.
+ // Warning: Password filed should be the last item.
+ // Warning: No fild value value should contain the phrase 'password='
+ // Note: Normal ports may be 25/26 depending on the host!
+ // Note: Priority can be High, Normal, Low (Normal by default).
+
+ /* Type=Mail;
+ * From=my_tracker@gmail.com;
+ * FromName=NBug Error Reporter;
+ * To=bugtracker@mycompany.com,someone@dummy.com,my_tracker@gmail.com;
+ * Cc=;
+ * Bcc=;
+ * ReplyTo=;
+ * UseAttachment=false;
+ * CustomSubject=;
+ * CustomBody=;
+ * SmtpServer=smtp.gmail.com;
+ * UseSSL=yes;
+ * Port=465;
+ * Priority=;
+ * UseAuthentication=yes;
+ * Username=my_tracker@gmail.com;
+ * Password=mypassword;
+ */
+
+ public string From { get; set; }
+
+ public string FromName { get; set; }
+
+ public string To { get; set; }
+
+ public string Cc { get; set; }
+
+ public string Bcc { get; set; }
+
+ public string ReplyTo { get; set; }
+
+ public string UseAttachment { get; set; }
+
+ public string CustomSubject { get; set; }
+
+ public string CustomBody { get; set; }
+
+ public string SmtpServer { get; set; }
+
+ public string UseSsl { get; set; }
+
+ public string Port { get; set; }
+
+ public string Priority { get; set; }
+
+ public string UseAuthentication { get; set; }
+
+ public string Username { get; set; }
+
+ public string Password { get; set; }
+
+ internal bool Send()
+ {
+ if (ReportFile == null)
+ {
+ return false;
+ }
+
+ if (string.IsNullOrEmpty(this.From) || string.IsNullOrEmpty(this.To))
+ {
+ return false;
+ }
+
+ if (string.IsNullOrEmpty(this.ReplyTo))
+ {
+ this.ReplyTo = this.From;
+ }
+
+ if (string.IsNullOrEmpty(this.UseSsl))
+ {
+ this.UseSsl = "false";
+ }
+
+ if (string.IsNullOrEmpty(this.Port))
+ {
+ this.Port = this.UseSsl == "true" ? "465" : "25";
+ }
+
+ if (string.IsNullOrEmpty(this.UseAttachment))
+ {
+ this.UseAttachment = "false";
+ }
+
+ // Make sure that we can use authentication even with emtpy username and password
+ if (!string.IsNullOrEmpty(this.Username))
+ {
+ this.UseAuthentication = "true";
+ }
+ else if (string.IsNullOrEmpty(this.UseAuthentication))
+ {
+ this.UseAuthentication = "false";
+ }
+
+ using (var smtpClient = new SmtpClient())
+ using (var message = new MailMessage())
+ {
+ if (!string.IsNullOrEmpty(this.SmtpServer))
+ {
+ smtpClient.Host = this.SmtpServer;
+ }
+
+ if (!string.IsNullOrEmpty(this.Port))
+ {
+ smtpClient.Port = Convert.ToInt32(this.Port);
+ }
+
+ if (this.UseAuthentication.ToLower() == "true")
+ {
+ smtpClient.Credentials = new NetworkCredential(this.Username, this.Password);
+ }
+
+ if (this.UseSsl == "true")
+ {
+ smtpClient.EnableSsl = true;
+ }
+
+ if (!string.IsNullOrEmpty(this.Cc))
+ {
+ message.CC.Add(this.Cc);
+ }
+
+ if (!string.IsNullOrEmpty(this.Bcc))
+ {
+ message.Bcc.Add(this.Bcc);
+ }
+
+ if (!string.IsNullOrEmpty(this.Priority))
+ {
+ switch (this.Priority.ToLower())
+ {
+ case "high":
+ message.Priority = MailPriority.High;
+ break;
+ case "normal":
+ message.Priority = MailPriority.Normal;
+ break;
+ case "low":
+ message.Priority = MailPriority.Low;
+ break;
+ }
+ }
+
+ message.To.Add(this.To);
+ message.ReplyToList.Add(this.ReplyTo);
+ message.From = !string.IsNullOrEmpty(this.FromName) ? new MailAddress(this.From, this.FromName) : new MailAddress(this.From);
+
+ if (this.UseAttachment.ToLower() == "true")
+ {
+ // ToDo: Report file name should be attached to the report file object itself, file shouldn't be accessed directly!
+ this.ReportFile.Position = 0;
+ message.Attachments.Add(new Attachment(this.ReportFile, Path.GetFileName(((FileStream)this.ReportFile).Name)));
+ }
+
+ if (!string.IsNullOrEmpty(this.CustomSubject))
+ {
+ message.Subject = this.CustomSubject;
+ }
+ else
+ {
+ message.Subject = "NBug: " + this.Report.GeneralInfo.HostApplication + " (" +
+ this.Report.GeneralInfo.HostApplicationVersion + "): " +
+ this.Report.GeneralInfo.ExceptionType + " @ " +
+ this.Report.GeneralInfo.TargetSite;
+ }
+
+ if (!string.IsNullOrEmpty(this.CustomBody))
+ {
+ message.Body = this.CustomBody + Environment.NewLine + Environment.NewLine + this.GetReport(StoredItemType.Report) +
+ Environment.NewLine + Environment.NewLine + this.GetReport(StoredItemType.Exception);
+ }
+ else
+ {
+ message.Body = this.GetReport(StoredItemType.Report) + Environment.NewLine + Environment.NewLine +
+ this.GetReport(StoredItemType.Exception);
+ }
+
+ smtpClient.Send(message);
+ Logger.Trace("Submitted bug report email to: " + this.To);
+
+ return true;
+ }
+ }
+ }
+}
diff --git a/NBug/Core/UI/Console/ConsoleUI.cs b/NBug/Core/UI/Console/ConsoleUI.cs
new file mode 100644
index 0000000..382440f
--- /dev/null
+++ b/NBug/Core/UI/Console/ConsoleUI.cs
@@ -0,0 +1,44 @@
+// --------------------------------------------------------------------------------------------------------------------
+//
+// Copyright (c) 2010 - 2011 Teoman Soygul. Licensed under LGPLv3 (http://www.gnu.org/licenses/lgpl.html).
+//
+// --------------------------------------------------------------------------------------------------------------------
+
+namespace NBug.Core.UI.Console
+{
+ using System;
+
+ using NBug.Core.Reporting.Info;
+ using NBug.Core.Util.Exceptions;
+ using NBug.Core.Util.Serialization;
+ using NBug.Enums;
+
+ internal static class ConsoleUI
+ {
+ internal static UIDialogResult ShowDialog(UIMode uiMode, SerializableException exception, Report report)
+ {
+ if (uiMode == UIMode.Minimal)
+ {
+ // Do not interact with the user
+ Console.WriteLine(Environment.NewLine + Settings.Resources.UI_Console_Minimal_Message);
+ return new UIDialogResult(ExecutionFlow.BreakExecution, SendReport.Send);
+ }
+ else if (uiMode == UIMode.Normal)
+ {
+ // ToDo: Create normal console UI
+ Console.WriteLine(Environment.NewLine + Settings.Resources.UI_Console_Normal_Message);
+ return new UIDialogResult(ExecutionFlow.BreakExecution, SendReport.Send);
+ }
+ else if (uiMode == UIMode.Full)
+ {
+ // ToDo: Create full console UI
+ Console.WriteLine(Environment.NewLine + Settings.Resources.UI_Console_Full_Message);
+ return new UIDialogResult(ExecutionFlow.BreakExecution, SendReport.Send);
+ }
+ else
+ {
+ throw NBugConfigurationException.Create(() => Settings.UIMode, "Parameter supplied for settings property is invalid.");
+ }
+ }
+ }
+}
diff --git a/NBug/Core/UI/Developer/InternalExceptionViewer.Designer.cs b/NBug/Core/UI/Developer/InternalExceptionViewer.Designer.cs
new file mode 100644
index 0000000..d31e90f
--- /dev/null
+++ b/NBug/Core/UI/Developer/InternalExceptionViewer.Designer.cs
@@ -0,0 +1,301 @@
+namespace NBug.Core.UI.Developer
+{
+ using NBug.Core.UI.WinForms.Panels;
+
+ partial class InternalExceptionViewer
+ {
+ ///
+ /// Required designer variable.
+ ///
+ private System.ComponentModel.IContainer components = null;
+
+ ///
+ /// Clean up any resources being used.
+ ///
+ /// true if managed resources should be disposed; otherwise, false.
+ protected override void Dispose(bool disposing)
+ {
+ if (disposing && (components != null))
+ {
+ components.Dispose();
+ }
+ base.Dispose(disposing);
+ }
+
+ #region Windows Form Designer generated code
+
+ ///
+ /// Required method for Designer support - do not modify
+ /// the contents of this method with the code editor.
+ ///
+ private void InitializeComponent()
+ {
+ this.quitButton = new System.Windows.Forms.Button();
+ this.debugButton = new System.Windows.Forms.Button();
+ this.bugReportButton = new System.Windows.Forms.Button();
+ this.messageLabel = new System.Windows.Forms.Label();
+ this.topToolStrip = new System.Windows.Forms.ToolStrip();
+ this.documentationToolStripButton = new System.Windows.Forms.ToolStripButton();
+ this.toolStripSeparator1 = new System.Windows.Forms.ToolStripSeparator();
+ this.forumToolStripLabel = new System.Windows.Forms.ToolStripLabel();
+ this.toolStripSeparator2 = new System.Windows.Forms.ToolStripSeparator();
+ this.trackerToolStripLabel = new System.Windows.Forms.ToolStripLabel();
+ this.exceptionLabel = new System.Windows.Forms.Label();
+ this.exceptionTextBox = new System.Windows.Forms.TextBox();
+ this.invalidSettingLabel = new System.Windows.Forms.Label();
+ this.invalidSettingTextBox = new System.Windows.Forms.TextBox();
+ this.targetSiteTextBox = new System.Windows.Forms.TextBox();
+ this.targetSiteLabel = new System.Windows.Forms.Label();
+ this.exceptionMessageTextBox = new System.Windows.Forms.TextBox();
+ this.exceptionStackGroupBox = new System.Windows.Forms.GroupBox();
+ this.exceptionDetails = new NBug.Core.UI.WinForms.Panels.ExceptionDetails();
+ this.warningPictureBox = new System.Windows.Forms.PictureBox();
+ this.topToolStrip.SuspendLayout();
+ this.exceptionStackGroupBox.SuspendLayout();
+ ((System.ComponentModel.ISupportInitialize)(this.warningPictureBox)).BeginInit();
+ this.SuspendLayout();
+ //
+ // quitButton
+ //
+ this.quitButton.Location = new System.Drawing.Point(455, 511);
+ this.quitButton.Name = "quitButton";
+ this.quitButton.Size = new System.Drawing.Size(75, 23);
+ this.quitButton.TabIndex = 0;
+ this.quitButton.Text = "&Quit";
+ this.quitButton.UseVisualStyleBackColor = true;
+ this.quitButton.Click += new System.EventHandler(this.QuitButton_Click);
+ //
+ // debugButton
+ //
+ this.debugButton.Image = global::NBug.Properties.Resources.VS2010_16;
+ this.debugButton.ImageAlign = System.Drawing.ContentAlignment.MiddleLeft;
+ this.debugButton.Location = new System.Drawing.Point(364, 511);
+ this.debugButton.Name = "debugButton";
+ this.debugButton.Size = new System.Drawing.Size(85, 23);
+ this.debugButton.TabIndex = 1;
+ this.debugButton.Text = " &Debug";
+ this.debugButton.UseVisualStyleBackColor = true;
+ this.debugButton.Click += new System.EventHandler(this.DebugButton_Click);
+ //
+ // bugReportButton
+ //
+ this.bugReportButton.Enabled = false;
+ this.bugReportButton.Image = global::NBug.Properties.Resources.Send;
+ this.bugReportButton.ImageAlign = System.Drawing.ContentAlignment.MiddleLeft;
+ this.bugReportButton.Location = new System.Drawing.Point(205, 511);
+ this.bugReportButton.Name = "bugReportButton";
+ this.bugReportButton.Size = new System.Drawing.Size(128, 23);
+ this.bugReportButton.TabIndex = 2;
+ this.bugReportButton.Text = " &Send Bug Report";
+ this.bugReportButton.UseVisualStyleBackColor = true;
+ this.bugReportButton.Click += new System.EventHandler(this.BugReportButton_Click);
+ //
+ // messageLabel
+ //
+ this.messageLabel.AutoSize = true;
+ this.messageLabel.Location = new System.Drawing.Point(56, 38);
+ this.messageLabel.MaximumSize = new System.Drawing.Size(465, 39);
+ this.messageLabel.MinimumSize = new System.Drawing.Size(465, 39);
+ this.messageLabel.Name = "messageLabel";
+ this.messageLabel.Size = new System.Drawing.Size(465, 39);
+ this.messageLabel.TabIndex = 3;
+ this.messageLabel.Text = "A configuration or runtime exception has occured.";
+ //
+ // topToolStrip
+ //
+ this.topToolStrip.GripStyle = System.Windows.Forms.ToolStripGripStyle.Hidden;
+ this.topToolStrip.Items.AddRange(new System.Windows.Forms.ToolStripItem[] {
+ this.documentationToolStripButton,
+ this.toolStripSeparator1,
+ this.forumToolStripLabel,
+ this.toolStripSeparator2,
+ this.trackerToolStripLabel});
+ this.topToolStrip.Location = new System.Drawing.Point(0, 0);
+ this.topToolStrip.Name = "topToolStrip";
+ this.topToolStrip.Size = new System.Drawing.Size(541, 25);
+ this.topToolStrip.TabIndex = 5;
+ //
+ // documentationToolStripButton
+ //
+ this.documentationToolStripButton.Image = global::NBug.Properties.Resources.Help_16;
+ this.documentationToolStripButton.ImageTransparentColor = System.Drawing.Color.Magenta;
+ this.documentationToolStripButton.Name = "documentationToolStripButton";
+ this.documentationToolStripButton.Size = new System.Drawing.Size(132, 22);
+ this.documentationToolStripButton.Tag = "http://www.nbusy.com/projects/nbug/documentation";
+ this.documentationToolStripButton.Text = "Online &Documentation";
+ this.documentationToolStripButton.Click += new System.EventHandler(this.DocumentationToolStripButton_Click);
+ //
+ // toolStripSeparator1
+ //
+ this.toolStripSeparator1.Name = "toolStripSeparator1";
+ this.toolStripSeparator1.Size = new System.Drawing.Size(6, 25);
+ //
+ // forumToolStripLabel
+ //
+ this.forumToolStripLabel.Image = global::NBug.Properties.Resources.Forum_16;
+ this.forumToolStripLabel.IsLink = true;
+ this.forumToolStripLabel.Name = "forumToolStripLabel";
+ this.forumToolStripLabel.Size = new System.Drawing.Size(105, 22);
+ this.forumToolStripLabel.Tag = "http://www.nbusy.com/forum/f11/";
+ this.forumToolStripLabel.Text = "Discussion Forum";
+ this.forumToolStripLabel.Click += new System.EventHandler(this.ForumToolStripLabel_Click);
+ //
+ // toolStripSeparator2
+ //
+ this.toolStripSeparator2.Name = "toolStripSeparator2";
+ this.toolStripSeparator2.Size = new System.Drawing.Size(6, 25);
+ //
+ // trackerToolStripLabel
+ //
+ this.trackerToolStripLabel.Image = global::NBug.Properties.Resources.Error_16;
+ this.trackerToolStripLabel.IsLink = true;
+ this.trackerToolStripLabel.Name = "trackerToolStripLabel";
+ this.trackerToolStripLabel.Size = new System.Drawing.Size(80, 22);
+ this.trackerToolStripLabel.Tag = "http://www.nbusy.com/tracker/projects/nbug";
+ this.trackerToolStripLabel.Text = "Bug Tracker";
+ this.trackerToolStripLabel.Click += new System.EventHandler(this.TrackerToolStripLabel_Click);
+ //
+ // exceptionLabel
+ //
+ this.exceptionLabel.AutoSize = true;
+ this.exceptionLabel.Location = new System.Drawing.Point(11, 96);
+ this.exceptionLabel.Name = "exceptionLabel";
+ this.exceptionLabel.Size = new System.Drawing.Size(57, 13);
+ this.exceptionLabel.TabIndex = 6;
+ this.exceptionLabel.Text = "Exception:";
+ //
+ // exceptionTextBox
+ //
+ this.exceptionTextBox.Location = new System.Drawing.Point(74, 93);
+ this.exceptionTextBox.Name = "exceptionTextBox";
+ this.exceptionTextBox.Size = new System.Drawing.Size(226, 20);
+ this.exceptionTextBox.TabIndex = 7;
+ //
+ // invalidSettingLabel
+ //
+ this.invalidSettingLabel.AutoSize = true;
+ this.invalidSettingLabel.Enabled = false;
+ this.invalidSettingLabel.Location = new System.Drawing.Point(320, 96);
+ this.invalidSettingLabel.Name = "invalidSettingLabel";
+ this.invalidSettingLabel.Size = new System.Drawing.Size(77, 13);
+ this.invalidSettingLabel.TabIndex = 8;
+ this.invalidSettingLabel.Text = "Invalid Setting:";
+ //
+ // invalidSettingTextBox
+ //
+ this.invalidSettingTextBox.Enabled = false;
+ this.invalidSettingTextBox.Location = new System.Drawing.Point(403, 93);
+ this.invalidSettingTextBox.Name = "invalidSettingTextBox";
+ this.invalidSettingTextBox.Size = new System.Drawing.Size(121, 20);
+ this.invalidSettingTextBox.TabIndex = 9;
+ //
+ // targetSiteTextBox
+ //
+ this.targetSiteTextBox.Location = new System.Drawing.Point(74, 122);
+ this.targetSiteTextBox.Name = "targetSiteTextBox";
+ this.targetSiteTextBox.Size = new System.Drawing.Size(450, 20);
+ this.targetSiteTextBox.TabIndex = 11;
+ //
+ // targetSiteLabel
+ //
+ this.targetSiteLabel.AutoSize = true;
+ this.targetSiteLabel.Location = new System.Drawing.Point(10, 125);
+ this.targetSiteLabel.Name = "targetSiteLabel";
+ this.targetSiteLabel.Size = new System.Drawing.Size(62, 13);
+ this.targetSiteLabel.TabIndex = 10;
+ this.targetSiteLabel.Text = "Target Site:";
+ //
+ // exceptionMessageTextBox
+ //
+ this.exceptionMessageTextBox.Location = new System.Drawing.Point(14, 151);
+ this.exceptionMessageTextBox.Multiline = true;
+ this.exceptionMessageTextBox.Name = "exceptionMessageTextBox";
+ this.exceptionMessageTextBox.ScrollBars = System.Windows.Forms.ScrollBars.Vertical;
+ this.exceptionMessageTextBox.Size = new System.Drawing.Size(510, 35);
+ this.exceptionMessageTextBox.TabIndex = 12;
+ //
+ // exceptionStackGroupBox
+ //
+ this.exceptionStackGroupBox.Controls.Add(this.exceptionDetails);
+ this.exceptionStackGroupBox.Location = new System.Drawing.Point(14, 198);
+ this.exceptionStackGroupBox.Name = "exceptionStackGroupBox";
+ this.exceptionStackGroupBox.Size = new System.Drawing.Size(516, 304);
+ this.exceptionStackGroupBox.TabIndex = 13;
+ this.exceptionStackGroupBox.TabStop = false;
+ this.exceptionStackGroupBox.Text = "Full Exception Stack";
+ //
+ // exceptionDetails
+ //
+ this.exceptionDetails.InformationColumnWidth = 350;
+ this.exceptionDetails.Location = new System.Drawing.Point(6, 16);
+ this.exceptionDetails.Name = "exceptionDetails";
+ this.exceptionDetails.PropertyColumnWidth = 144;
+ this.exceptionDetails.Size = new System.Drawing.Size(504, 282);
+ this.exceptionDetails.TabIndex = 0;
+ //
+ // warningPictureBox
+ //
+ this.warningPictureBox.Location = new System.Drawing.Point(13, 41);
+ this.warningPictureBox.Name = "warningPictureBox";
+ this.warningPictureBox.Size = new System.Drawing.Size(32, 32);
+ this.warningPictureBox.TabIndex = 14;
+ this.warningPictureBox.TabStop = false;
+ //
+ // InternalExceptionViewer
+ //
+ this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F);
+ this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
+ this.ClientSize = new System.Drawing.Size(541, 542);
+ this.Controls.Add(this.quitButton);
+ this.Controls.Add(this.bugReportButton);
+ this.Controls.Add(this.warningPictureBox);
+ this.Controls.Add(this.debugButton);
+ this.Controls.Add(this.exceptionStackGroupBox);
+ this.Controls.Add(this.exceptionMessageTextBox);
+ this.Controls.Add(this.targetSiteTextBox);
+ this.Controls.Add(this.messageLabel);
+ this.Controls.Add(this.topToolStrip);
+ this.Controls.Add(this.targetSiteLabel);
+ this.Controls.Add(this.invalidSettingLabel);
+ this.Controls.Add(this.exceptionLabel);
+ this.Controls.Add(this.exceptionTextBox);
+ this.Controls.Add(this.invalidSettingTextBox);
+ this.MaximizeBox = false;
+ this.MinimizeBox = false;
+ this.Name = "InternalExceptionViewer";
+ this.StartPosition = System.Windows.Forms.FormStartPosition.CenterScreen;
+ this.Text = "NBug Internal Exception Viewer";
+ this.TopMost = true;
+ this.topToolStrip.ResumeLayout(false);
+ this.topToolStrip.PerformLayout();
+ this.exceptionStackGroupBox.ResumeLayout(false);
+ ((System.ComponentModel.ISupportInitialize)(this.warningPictureBox)).EndInit();
+ this.ResumeLayout(false);
+ this.PerformLayout();
+
+ }
+
+ #endregion
+
+ private System.Windows.Forms.Button quitButton;
+ private System.Windows.Forms.Button debugButton;
+ private System.Windows.Forms.Button bugReportButton;
+ private System.Windows.Forms.Label messageLabel;
+ private System.Windows.Forms.ToolStrip topToolStrip;
+ private System.Windows.Forms.ToolStripButton documentationToolStripButton;
+ private System.Windows.Forms.ToolStripLabel forumToolStripLabel;
+ private System.Windows.Forms.ToolStripSeparator toolStripSeparator1;
+ private System.Windows.Forms.ToolStripSeparator toolStripSeparator2;
+ private System.Windows.Forms.ToolStripLabel trackerToolStripLabel;
+ private System.Windows.Forms.Label exceptionLabel;
+ private System.Windows.Forms.TextBox exceptionTextBox;
+ private System.Windows.Forms.Label invalidSettingLabel;
+ private System.Windows.Forms.TextBox invalidSettingTextBox;
+ private System.Windows.Forms.TextBox targetSiteTextBox;
+ private System.Windows.Forms.Label targetSiteLabel;
+ private System.Windows.Forms.TextBox exceptionMessageTextBox;
+ private System.Windows.Forms.GroupBox exceptionStackGroupBox;
+ private ExceptionDetails exceptionDetails;
+ private System.Windows.Forms.PictureBox warningPictureBox;
+ }
+}
\ No newline at end of file
diff --git a/NBug/Core/UI/Developer/InternalExceptionViewer.cs b/NBug/Core/UI/Developer/InternalExceptionViewer.cs
new file mode 100644
index 0000000..726e011
--- /dev/null
+++ b/NBug/Core/UI/Developer/InternalExceptionViewer.cs
@@ -0,0 +1,119 @@
+// --------------------------------------------------------------------------------------------------------------------
+//
+// Copyright (c) 2010 - 2011 Teoman Soygul. Licensed under LGPLv3 (http://www.gnu.org/licenses/lgpl.html).
+//
+// --------------------------------------------------------------------------------------------------------------------
+
+namespace NBug.Core.UI.Developer
+{
+ using System;
+ using System.Diagnostics;
+ using System.Drawing;
+ using System.Windows.Forms;
+
+ using NBug.Core.Util.Exceptions;
+ using NBug.Core.Util.Serialization;
+ using NBug.Properties;
+
+ internal partial class InternalExceptionViewer : Form
+ {
+ internal InternalExceptionViewer()
+ {
+ this.InitializeComponent();
+ this.Icon = Resources.NBug_icon_16;
+ this.warningPictureBox.Image = SystemIcons.Warning.ToBitmap();
+ }
+
+ internal void ShowDialog(Exception exception)
+ {
+ if (exception is NBugConfigurationException)
+ {
+ this.ShowDialog(exception as NBugConfigurationException);
+ }
+ else if (exception is NBugRuntimeException)
+ {
+ this.ShowDialog(exception as NBugRuntimeException);
+ }
+ else
+ {
+ this.messageLabel.Text = "An internal runtime exception has occurred. This maybe due to a configuration failure or an internal bug. You may choose to debug the exception or send a bug report to NBug developers. You may also use discussion forum to get help.";
+ this.bugReportButton.Enabled = true;
+ this.DisplayExceptionDetails(exception);
+ }
+ }
+
+ internal void ShowDialog(NBugConfigurationException configurationException)
+ {
+ this.messageLabel.Text = "An internal configuration exception has occurred. Please correct the invalid configuration regarding the information below. You may also use discussion forum to get help or read the online documentation's configuration section.";
+ this.invalidSettingLabel.Enabled = true;
+ this.invalidSettingTextBox.Enabled = true;
+ this.invalidSettingTextBox.Text = configurationException.MisconfiguredProperty;
+ this.DisplayExceptionDetails(configurationException);
+ }
+
+ internal void ShowDialog(NBugRuntimeException runtimeException)
+ {
+ this.messageLabel.Text = "An internal runtime exception has occurred. This maybe due to a configuration failure or an internal bug. You may choose to debug the exception or send a bug report to NBug developers. You may also use discussion forum to get help.";
+ this.bugReportButton.Enabled = true;
+ this.DisplayExceptionDetails(runtimeException);
+ }
+
+ private void BugReportButton_Click(object sender, EventArgs e)
+ {
+ // ToDo: Activate internal bug reporting feature (and add some integrations tests for it)
+ /*new BugReport();
+ new Dispatcher(false);
+ MessageBox.Show("Successfully sent bug report to NBug developer community.", "Success", MessageBoxButtons.OK, MessageBoxIcon.Information);*/
+ MessageBox.Show(
+ "Internal bug reporting feature is not implemented yet but you can still manually submit a bug report using the bug tracker.",
+ "Information",
+ MessageBoxButtons.OK,
+ MessageBoxIcon.Information);
+ this.bugReportButton.Enabled = false;
+ }
+
+ private void DebugButton_Click(object sender, EventArgs e)
+ {
+ // Let the exception propagate down to SEH
+ this.Close();
+ }
+
+ private void DisplayExceptionDetails(Exception exception)
+ {
+ this.exceptionTextBox.Text = exception.GetType().ToString();
+ this.exceptionMessageTextBox.Text = exception.Message;
+
+ if (exception.TargetSite != null)
+ {
+ this.targetSiteTextBox.Text = exception.TargetSite.ToString();
+ }
+ else if (exception.InnerException != null && exception.InnerException.TargetSite != null)
+ {
+ this.targetSiteTextBox.Text = exception.InnerException.TargetSite.ToString();
+ }
+
+ this.exceptionDetails.Initialize(new SerializableException(exception));
+ this.ShowDialog();
+ }
+
+ private void DocumentationToolStripButton_Click(object sender, EventArgs e)
+ {
+ Process.Start(this.documentationToolStripButton.Tag.ToString());
+ }
+
+ private void ForumToolStripLabel_Click(object sender, EventArgs e)
+ {
+ Process.Start(this.forumToolStripLabel.Tag.ToString());
+ }
+
+ private void QuitButton_Click(object sender, EventArgs e)
+ {
+ Environment.Exit(0);
+ }
+
+ private void TrackerToolStripLabel_Click(object sender, EventArgs e)
+ {
+ Process.Start(this.trackerToolStripLabel.Tag.ToString());
+ }
+ }
+}
diff --git a/NBug/Core/UI/Developer/InternalExceptionViewer.resx b/NBug/Core/UI/Developer/InternalExceptionViewer.resx
new file mode 100644
index 0000000..930a465
--- /dev/null
+++ b/NBug/Core/UI/Developer/InternalExceptionViewer.resx
@@ -0,0 +1,126 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ text/microsoft-resx
+
+
+ 2.0
+
+
+ System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089
+
+
+ System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089
+
+
+ 17, 11
+
+
+ 49
+
+
\ No newline at end of file
diff --git a/NBug/Core/UI/Developer/InternalLogViewer.Designer.cs b/NBug/Core/UI/Developer/InternalLogViewer.Designer.cs
new file mode 100644
index 0000000..92a52a1
--- /dev/null
+++ b/NBug/Core/UI/Developer/InternalLogViewer.Designer.cs
@@ -0,0 +1,164 @@
+namespace NBug.Core.UI.Developer
+{
+ partial class InternalLogViewer
+ {
+ ///
+ /// Required designer variable.
+ ///
+ private System.ComponentModel.IContainer components = null;
+
+ ///
+ /// Clean up any resources being used.
+ ///
+ /// true if managed resources should be disposed; otherwise, false.
+ protected override void Dispose(bool disposing)
+ {
+ if (disposing && (components != null))
+ {
+ components.Dispose();
+ }
+ base.Dispose(disposing);
+ }
+
+ #region Windows Form Designer generated code
+
+ ///
+ /// Required method for Designer support - do not modify
+ /// the contents of this method with the code editor.
+ ///
+ private void InitializeComponent()
+ {
+ this.components = new System.ComponentModel.Container();
+ this.detailsTextBox = new System.Windows.Forms.TextBox();
+ this.detailsLabel = new System.Windows.Forms.Label();
+ this.loggerListView = new System.Windows.Forms.ListView();
+ this.categoryColumnHeader = ((System.Windows.Forms.ColumnHeader)(new System.Windows.Forms.ColumnHeader()));
+ this.timeColumnHeader = ((System.Windows.Forms.ColumnHeader)(new System.Windows.Forms.ColumnHeader()));
+ this.messageColumnHeader = ((System.Windows.Forms.ColumnHeader)(new System.Windows.Forms.ColumnHeader()));
+ this.entriesLabel = new System.Windows.Forms.Label();
+ this.quitButton = new System.Windows.Forms.Button();
+ this.notifyIcon = new System.Windows.Forms.NotifyIcon(this.components);
+ this.hideButton = new System.Windows.Forms.Button();
+ this.SuspendLayout();
+ //
+ // detailsTextBox
+ //
+ this.detailsTextBox.Location = new System.Drawing.Point(5, 261);
+ this.detailsTextBox.Multiline = true;
+ this.detailsTextBox.Name = "detailsTextBox";
+ this.detailsTextBox.ScrollBars = System.Windows.Forms.ScrollBars.Vertical;
+ this.detailsTextBox.Size = new System.Drawing.Size(526, 80);
+ this.detailsTextBox.TabIndex = 7;
+ //
+ // detailsLabel
+ //
+ this.detailsLabel.AutoSize = true;
+ this.detailsLabel.Location = new System.Drawing.Point(5, 245);
+ this.detailsLabel.Name = "detailsLabel";
+ this.detailsLabel.Size = new System.Drawing.Size(42, 13);
+ this.detailsLabel.TabIndex = 6;
+ this.detailsLabel.Text = "Details:";
+ //
+ // loggerListView
+ //
+ this.loggerListView.Columns.AddRange(new System.Windows.Forms.ColumnHeader[] {
+ this.categoryColumnHeader,
+ this.timeColumnHeader,
+ this.messageColumnHeader});
+ this.loggerListView.FullRowSelect = true;
+ this.loggerListView.Location = new System.Drawing.Point(5, 21);
+ this.loggerListView.MultiSelect = false;
+ this.loggerListView.Name = "loggerListView";
+ this.loggerListView.ShowItemToolTips = true;
+ this.loggerListView.Size = new System.Drawing.Size(526, 217);
+ this.loggerListView.TabIndex = 4;
+ this.loggerListView.UseCompatibleStateImageBehavior = false;
+ this.loggerListView.View = System.Windows.Forms.View.Details;
+ this.loggerListView.Click += new System.EventHandler(this.LoggerListView_Click);
+ //
+ // categoryColumnHeader
+ //
+ this.categoryColumnHeader.Text = "Category";
+ //
+ // timeColumnHeader
+ //
+ this.timeColumnHeader.Text = "Time";
+ //
+ // messageColumnHeader
+ //
+ this.messageColumnHeader.Text = "Message";
+ this.messageColumnHeader.Width = 402;
+ //
+ // entriesLabel
+ //
+ this.entriesLabel.AutoSize = true;
+ this.entriesLabel.Location = new System.Drawing.Point(5, 5);
+ this.entriesLabel.Name = "entriesLabel";
+ this.entriesLabel.Size = new System.Drawing.Size(42, 13);
+ this.entriesLabel.TabIndex = 5;
+ this.entriesLabel.Text = "Entries:";
+ //
+ // quitButton
+ //
+ this.quitButton.Location = new System.Drawing.Point(366, 347);
+ this.quitButton.Name = "quitButton";
+ this.quitButton.Size = new System.Drawing.Size(75, 23);
+ this.quitButton.TabIndex = 8;
+ this.quitButton.Text = "&Quit";
+ this.quitButton.UseVisualStyleBackColor = true;
+ this.quitButton.Click += new System.EventHandler(this.QuitButton_Click);
+ //
+ // notifyIcon
+ //
+ this.notifyIcon.BalloonTipText = "NBug Developer Interface";
+ this.notifyIcon.BalloonTipTitle = "NBug (Debug Mode)";
+ this.notifyIcon.Text = "NBug Developer Interface";
+ this.notifyIcon.Visible = true;
+ this.notifyIcon.MouseDoubleClick += new System.Windows.Forms.MouseEventHandler(this.NotifyIcon_MouseDoubleClick);
+ //
+ // hideButton
+ //
+ this.hideButton.Location = new System.Drawing.Point(456, 347);
+ this.hideButton.Name = "hideButton";
+ this.hideButton.Size = new System.Drawing.Size(75, 23);
+ this.hideButton.TabIndex = 9;
+ this.hideButton.Text = "&Hide";
+ this.hideButton.UseVisualStyleBackColor = true;
+ this.hideButton.Click += new System.EventHandler(this.HideButton_Click);
+ //
+ // InternalLogViewer
+ //
+ this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F);
+ this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
+ this.ClientSize = new System.Drawing.Size(536, 373);
+ this.Controls.Add(this.hideButton);
+ this.Controls.Add(this.quitButton);
+ this.Controls.Add(this.detailsTextBox);
+ this.Controls.Add(this.detailsLabel);
+ this.Controls.Add(this.loggerListView);
+ this.Controls.Add(this.entriesLabel);
+ this.FormBorderStyle = System.Windows.Forms.FormBorderStyle.FixedSingle;
+ this.MaximizeBox = false;
+ this.Name = "InternalLogViewer";
+ this.StartPosition = System.Windows.Forms.FormStartPosition.CenterScreen;
+ this.Text = "NBug Internal Log Viewer";
+ this.Resize += new System.EventHandler(this.InternalLogViewer_Resize);
+ this.ResumeLayout(false);
+ this.PerformLayout();
+
+ }
+
+ #endregion
+
+ private System.Windows.Forms.TextBox detailsTextBox;
+ private System.Windows.Forms.Label detailsLabel;
+ private System.Windows.Forms.ListView loggerListView;
+ private System.Windows.Forms.ColumnHeader categoryColumnHeader;
+ private System.Windows.Forms.ColumnHeader timeColumnHeader;
+ private System.Windows.Forms.ColumnHeader messageColumnHeader;
+ private System.Windows.Forms.Label entriesLabel;
+ private System.Windows.Forms.Button quitButton;
+ private System.Windows.Forms.NotifyIcon notifyIcon;
+ private System.Windows.Forms.Button hideButton;
+ }
+}
\ No newline at end of file
diff --git a/NBug/Core/UI/Developer/InternalLogViewer.cs b/NBug/Core/UI/Developer/InternalLogViewer.cs
new file mode 100644
index 0000000..47976c4
--- /dev/null
+++ b/NBug/Core/UI/Developer/InternalLogViewer.cs
@@ -0,0 +1,97 @@
+// --------------------------------------------------------------------------------------------------------------------
+//
+// Copyright (c) 2010 - 2011 Teoman Soygul. Licensed under LGPLv3 (http://www.gnu.org/licenses/lgpl.html).
+//
+// --------------------------------------------------------------------------------------------------------------------
+
+namespace NBug.Core.UI.Developer
+{
+ using System;
+ using System.Threading;
+ using System.Threading.Tasks;
+ using System.Windows.Forms;
+
+ using NBug.Enums;
+ using NBug.Properties;
+
+ internal partial class InternalLogViewer : Form
+ {
+ private static bool initialized;
+ private static bool closed;
+ private static InternalLogViewer viewer;
+ private static ManualResetEvent handleCreated;
+
+ internal InternalLogViewer()
+ {
+ this.InitializeComponent();
+ this.Icon = Resources.NBug_icon_16;
+ this.notifyIcon.Icon = Resources.NBug_icon_16;
+ }
+
+ public static void InitializeInternalLogViewer()
+ {
+ if (!initialized)
+ {
+ initialized = true;
+ viewer = new InternalLogViewer();
+ handleCreated = new ManualResetEvent(false);
+ viewer.HandleCreated += (sender, e) => handleCreated.Set();
+ Task.Factory.StartNew(() => Application.Run(viewer));
+ handleCreated.WaitOne();
+ }
+ }
+
+ public static void LogEntry(string message, LoggerCategory category)
+ {
+ InitializeInternalLogViewer();
+
+ if (!closed)
+ {
+ viewer.Invoke((MethodInvoker)(() => viewer.InternalLogEntry(message, category)));
+ }
+ }
+
+ internal void InternalLogEntry(string message, LoggerCategory category)
+ {
+ this.loggerListView.Items.Add(new ListViewItem(new[] { category.ToString().Remove(0, 4), DateTime.Now.ToString("HH:mm:ss"), message }));
+ }
+
+ private void NotifyIcon_MouseDoubleClick(object sender, MouseEventArgs e)
+ {
+ if (this.WindowState == FormWindowState.Minimized)
+ {
+ this.WindowState = FormWindowState.Normal;
+ }
+
+ this.Show();
+ this.Activate();
+ }
+
+ private void LoggerListView_Click(object sender, EventArgs e)
+ {
+ this.detailsTextBox.Text = this.loggerListView.SelectedItems[0].SubItems[2].Text;
+ }
+
+ private void QuitButton_Click(object sender, EventArgs e)
+ {
+ this.notifyIcon.Visible = false;
+ this.notifyIcon.Dispose();
+ this.notifyIcon = null;
+ closed = true;
+ this.Close();
+ }
+
+ private void HideButton_Click(object sender, EventArgs e)
+ {
+ this.Hide();
+ }
+
+ private void InternalLogViewer_Resize(object sender, EventArgs e)
+ {
+ if (this.WindowState == FormWindowState.Minimized)
+ {
+ this.Hide();
+ }
+ }
+ }
+}
\ No newline at end of file
diff --git a/NBug/Core/UI/Developer/InternalLogViewer.resx b/NBug/Core/UI/Developer/InternalLogViewer.resx
new file mode 100644
index 0000000..c28675e
--- /dev/null
+++ b/NBug/Core/UI/Developer/InternalLogViewer.resx
@@ -0,0 +1,126 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ text/microsoft-resx
+
+
+ 2.0
+
+
+ System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089
+
+
+ System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089
+
+
+ 16, 14
+
+
+ 47
+
+
\ No newline at end of file
diff --git a/NBug/Core/UI/UIDialogResult.cs b/NBug/Core/UI/UIDialogResult.cs
new file mode 100644
index 0000000..b650791
--- /dev/null
+++ b/NBug/Core/UI/UIDialogResult.cs
@@ -0,0 +1,39 @@
+// --------------------------------------------------------------------------------------------------------------------
+//
+// Copyright (c) 2010 - 2011 Teoman Soygul. Licensed under LGPLv3 (http://www.gnu.org/licenses/lgpl.html).
+//
+// --------------------------------------------------------------------------------------------------------------------
+
+namespace NBug.Core.UI
+{
+ internal enum SendReport
+ {
+ Send,
+ DoNotSend
+ }
+
+ internal enum ExecutionFlow
+ {
+ ///
+ /// This will handle all unhandled exceptions to be able to continue execution.
+ ///
+ ContinueExecution,
+
+ ///
+ /// This will handle all unhandled exceptions and exit the application.
+ ///
+ BreakExecution,
+ }
+
+ internal struct UIDialogResult
+ {
+ internal ExecutionFlow Execution;
+ internal SendReport Report;
+
+ internal UIDialogResult(ExecutionFlow execution, SendReport report)
+ {
+ this.Execution = execution;
+ this.Report = report;
+ }
+ }
+}
diff --git a/NBug/Core/UI/UISelector.cs b/NBug/Core/UI/UISelector.cs
new file mode 100644
index 0000000..212473a
--- /dev/null
+++ b/NBug/Core/UI/UISelector.cs
@@ -0,0 +1,143 @@
+// --------------------------------------------------------------------------------------------------------------------
+//
+// Copyright (c) 2010 - 2011 Teoman Soygul. Licensed under LGPLv3 (http://www.gnu.org/licenses/lgpl.html).
+//
+// --------------------------------------------------------------------------------------------------------------------
+
+namespace NBug.Core.UI
+{
+ using System;
+
+ using NBug.Core.Reporting.Info;
+ using NBug.Core.UI.Console;
+ using NBug.Core.UI.WinForms;
+ using NBug.Core.UI.WPF;
+ using NBug.Core.Util;
+ using NBug.Core.Util.Exceptions;
+ using NBug.Core.Util.Serialization;
+ using NBug.Enums;
+
+ ///
+ /// Initializes a new instance of the UISelector class which displays the user an appropriate user interface in the event of unhandled exceptions.
+ ///
+ internal static class UISelector
+ {
+ internal static UIDialogResult DisplayBugReportUI(ExceptionThread exceptionThread, SerializableException serializableException, Report report)
+ {
+ if (exceptionThread == ExceptionThread.Task)
+ {
+ // Do not interfere with the default behaviour for continuation on background thread exceptions. Just log and send'em (no UI...)
+ return new UIDialogResult(ExecutionFlow.ContinueExecution, SendReport.Send);
+ }
+ else if (Settings.UIMode == UIMode.Auto)
+ {
+ // First of, test to see if the call is from an UI thread and if so, use the same UI type (WinForms, WPF, etc.)
+ if (exceptionThread == ExceptionThread.UI_WinForms)
+ {
+ return WinFormsUI.ShowDialog(UIMode.Minimal, serializableException, report);
+ }
+ else if (exceptionThread == ExceptionThread.UI_WPF)
+ {
+ return WPFUI.ShowDialog(UIMode.Minimal, serializableException, report);
+ }
+ else if (exceptionThread == ExceptionThread.Main)
+ {
+ // If the call is not from a non-UI thread like the main app thread, it may be from the current appdomain but
+ // the application may still be using an UI. Or it may be coming from an exception filter where UI type is undefined yet.
+ switch (DiscoverUI())
+ {
+ case UIProvider.WinForms:
+ return WinFormsUI.ShowDialog(UIMode.Minimal, serializableException, report);
+ case UIProvider.WPF:
+ return WPFUI.ShowDialog(UIMode.Minimal, serializableException, report);
+ case UIProvider.Console:
+ return ConsoleUI.ShowDialog(UIMode.Minimal, serializableException, report);
+ default:
+ throw new NBugRuntimeException("UISelector.DiscoverUI() returned an invalid UI type.");
+ }
+ }
+ else
+ {
+ throw new NBugRuntimeException("Parameter supplied for '" + typeof(ExceptionThread).Name + "' is not valid.");
+ }
+ }
+ else if (Settings.UIMode == UIMode.None)
+ {
+ // Do not display an UI for UIMode.None
+ if (Settings.ExitApplicationImmediately)
+ {
+ return new UIDialogResult(ExecutionFlow.BreakExecution, SendReport.Send);
+ }
+ else
+ {
+ return new UIDialogResult(ExecutionFlow.ContinueExecution, SendReport.Send);
+ }
+ }
+ else if (Settings.UIProvider == UIProvider.Console)
+ {
+ return ConsoleUI.ShowDialog(Settings.UIMode, serializableException, report);
+ }
+ else if (Settings.UIProvider == UIProvider.WinForms)
+ {
+ return WinFormsUI.ShowDialog(Settings.UIMode, serializableException, report);
+ }
+ else if (Settings.UIProvider == UIProvider.WPF)
+ {
+ return WPFUI.ShowDialog(Settings.UIMode, serializableException, report);
+ }
+ else if (Settings.UIProvider == UIProvider.Auto)
+ {
+ // In this case, UIProvider = Auto & UIMode != Auto so just discover the UI provider and use the selected UI mode
+ switch (DiscoverUI())
+ {
+ case UIProvider.WinForms:
+ return WinFormsUI.ShowDialog(Settings.UIMode, serializableException, report);
+ case UIProvider.WPF:
+ return WPFUI.ShowDialog(Settings.UIMode, serializableException, report);
+ case UIProvider.Console:
+ return ConsoleUI.ShowDialog(Settings.UIMode, serializableException, report);
+ default:
+ throw new NBugRuntimeException("UISelector.DiscoverUI() returned an invalid UI type.");
+ }
+ }
+ else
+ {
+ throw NBugConfigurationException.Create(() => Settings.UIProvider, "Parameter supplied for settings property is invalid.");
+ }
+ }
+
+ internal static void DisplayFeedbackUI()
+ {
+ }
+
+ private static UIProvider DiscoverUI()
+ {
+ // First of search for loaded assemblies in the current domain
+ foreach (var assembly in AppDomain.CurrentDomain.GetAssemblies())
+ {
+ switch (assembly.GetName().Name)
+ {
+ case "System.Windows.Forms":
+ return UIProvider.WinForms;
+ case "PresentationFramework":
+ return UIProvider.WPF;
+ }
+ }
+
+ // Eventhough UI assemblies may not be loaded, they may still be referenced. Search for them for a second time
+ foreach (var assembly in Settings.EntryAssembly.GetReferencedAssemblies())
+ {
+ switch (assembly.Name)
+ {
+ case "System.Windows.Forms":
+ return UIProvider.WinForms;
+ case "PresentationFramework":
+ return UIProvider.WPF;
+ }
+ }
+
+ // If there is no known UI assembly loaded or referenced, the application is probably a console app
+ return UIProvider.Console;
+ }
+ }
+}
diff --git a/NBug/Core/UI/WPF/WPFUI.cs b/NBug/Core/UI/WPF/WPFUI.cs
new file mode 100644
index 0000000..b274d02
--- /dev/null
+++ b/NBug/Core/UI/WPF/WPFUI.cs
@@ -0,0 +1,50 @@
+// --------------------------------------------------------------------------------------------------------------------
+//
+// Copyright (c) 2010 - 2011 Teoman Soygul. Licensed under LGPLv3 (http://www.gnu.org/licenses/lgpl.html).
+//
+// --------------------------------------------------------------------------------------------------------------------
+
+namespace NBug.Core.UI.WPF
+{
+ using NBug.Core.Reporting.Info;
+ using NBug.Core.UI.WinForms;
+ using NBug.Core.Util.Exceptions;
+ using NBug.Core.Util.Serialization;
+ using NBug.Enums;
+
+ ///
+ /// This class is used to prevent statically referencing any WPF dlls from the UISelector.cs thus prevents
+ /// any unnecessary assembly from getting loaded into the memory.
+ ///
+ internal static class WPFUI
+ {
+ internal static UIDialogResult ShowDialog(UIMode uiMode, SerializableException exception, Report report)
+ {
+ if (uiMode == UIMode.Minimal)
+ {
+ // ToDo: Create WPF dialogs
+ return new Minimal().ShowDialog(report);
+ }
+ else if (uiMode == UIMode.Normal)
+ {
+ // ToDo: Create WPF dialogs
+ using (var ui = new Normal())
+ {
+ return ui.ShowDialog(report);
+ }
+ }
+ else if (uiMode == UIMode.Full)
+ {
+ // ToDo: Create WPF dialogs
+ using (var ui = new Full())
+ {
+ return ui.ShowDialog(exception, report);
+ }
+ }
+ else
+ {
+ throw NBugConfigurationException.Create(() => Settings.UIMode, "Parameter supplied for settings property is invalid.");
+ }
+ }
+ }
+}
diff --git a/NBug/Core/UI/WinForms/Feedback.Designer.cs b/NBug/Core/UI/WinForms/Feedback.Designer.cs
new file mode 100644
index 0000000..56097e5
--- /dev/null
+++ b/NBug/Core/UI/WinForms/Feedback.Designer.cs
@@ -0,0 +1,222 @@
+namespace NBug.Core.UI.WinForms
+{
+ partial class Feedback
+ {
+ ///
+ /// Required designer variable.
+ ///
+ private System.ComponentModel.IContainer components = null;
+
+ ///
+ /// Clean up any resources being used.
+ ///
+ /// true if managed resources should be disposed; otherwise, false.
+ protected override void Dispose(bool disposing)
+ {
+ if (disposing && (components != null))
+ {
+ components.Dispose();
+ }
+ base.Dispose(disposing);
+ }
+
+ #region Windows Form Designer generated code
+
+ ///
+ /// Required method for Designer support - do not modify
+ /// the contents of this method with the code editor.
+ ///
+ private void InitializeComponent()
+ {
+ this.suggestionTypeGroupBox = new System.Windows.Forms.GroupBox();
+ this.featureRequestRadioButton = new System.Windows.Forms.RadioButton();
+ this.commentRadioButton = new System.Windows.Forms.RadioButton();
+ this.errorReportRadioButton = new System.Windows.Forms.RadioButton();
+ this.suggestionRadioButton = new System.Windows.Forms.RadioButton();
+ this.feedbackLabel = new System.Windows.Forms.Label();
+ this.feedbackPictureBox = new System.Windows.Forms.PictureBox();
+ this.emailLabel = new System.Windows.Forms.Label();
+ this.remarksLabel = new System.Windows.Forms.Label();
+ this.textBox1 = new System.Windows.Forms.TextBox();
+ this.textBox2 = new System.Windows.Forms.TextBox();
+ this.sendButton = new System.Windows.Forms.Button();
+ this.closeButton = new System.Windows.Forms.Button();
+ this.suggestionTypeGroupBox.SuspendLayout();
+ ((System.ComponentModel.ISupportInitialize)(this.feedbackPictureBox)).BeginInit();
+ this.SuspendLayout();
+ //
+ // suggestionTypeGroupBox
+ //
+ this.suggestionTypeGroupBox.Controls.Add(this.featureRequestRadioButton);
+ this.suggestionTypeGroupBox.Controls.Add(this.commentRadioButton);
+ this.suggestionTypeGroupBox.Controls.Add(this.errorReportRadioButton);
+ this.suggestionTypeGroupBox.Controls.Add(this.suggestionRadioButton);
+ this.suggestionTypeGroupBox.Location = new System.Drawing.Point(12, 61);
+ this.suggestionTypeGroupBox.Name = "suggestionTypeGroupBox";
+ this.suggestionTypeGroupBox.Size = new System.Drawing.Size(382, 42);
+ this.suggestionTypeGroupBox.TabIndex = 0;
+ this.suggestionTypeGroupBox.TabStop = false;
+ this.suggestionTypeGroupBox.Text = "Suggestion Type:";
+ //
+ // featureRequestRadioButton
+ //
+ this.featureRequestRadioButton.AutoSize = true;
+ this.featureRequestRadioButton.Location = new System.Drawing.Point(263, 17);
+ this.featureRequestRadioButton.Name = "featureRequestRadioButton";
+ this.featureRequestRadioButton.Size = new System.Drawing.Size(104, 17);
+ this.featureRequestRadioButton.TabIndex = 3;
+ this.featureRequestRadioButton.TabStop = true;
+ this.featureRequestRadioButton.Text = "Feature Request";
+ this.featureRequestRadioButton.UseVisualStyleBackColor = true;
+ //
+ // commentRadioButton
+ //
+ this.commentRadioButton.AutoSize = true;
+ this.commentRadioButton.Location = new System.Drawing.Point(100, 17);
+ this.commentRadioButton.Name = "commentRadioButton";
+ this.commentRadioButton.Size = new System.Drawing.Size(69, 17);
+ this.commentRadioButton.TabIndex = 2;
+ this.commentRadioButton.TabStop = true;
+ this.commentRadioButton.Text = "Comment";
+ this.commentRadioButton.UseVisualStyleBackColor = true;
+ //
+ // errorReportRadioButton
+ //
+ this.errorReportRadioButton.AutoSize = true;
+ this.errorReportRadioButton.Location = new System.Drawing.Point(175, 17);
+ this.errorReportRadioButton.Name = "errorReportRadioButton";
+ this.errorReportRadioButton.Size = new System.Drawing.Size(82, 17);
+ this.errorReportRadioButton.TabIndex = 1;
+ this.errorReportRadioButton.TabStop = true;
+ this.errorReportRadioButton.Text = "Error Report";
+ this.errorReportRadioButton.UseVisualStyleBackColor = true;
+ //
+ // suggestionRadioButton
+ //
+ this.suggestionRadioButton.AutoSize = true;
+ this.suggestionRadioButton.Location = new System.Drawing.Point(16, 17);
+ this.suggestionRadioButton.Name = "suggestionRadioButton";
+ this.suggestionRadioButton.Size = new System.Drawing.Size(78, 17);
+ this.suggestionRadioButton.TabIndex = 0;
+ this.suggestionRadioButton.TabStop = true;
+ this.suggestionRadioButton.Text = "Suggestion";
+ this.suggestionRadioButton.UseVisualStyleBackColor = true;
+ //
+ // feedbackLabel
+ //
+ this.feedbackLabel.Location = new System.Drawing.Point(50, 14);
+ this.feedbackLabel.Name = "feedbackLabel";
+ this.feedbackLabel.Size = new System.Drawing.Size(344, 28);
+ this.feedbackLabel.TabIndex = 1;
+ this.feedbackLabel.Text = "Please fill in the form below to submit your feedback. Selecting the proper feedb" +
+ "ack type will help us better understand your opinion.";
+ //
+ // feedbackPictureBox
+ //
+ this.feedbackPictureBox.Image = global::NBug.Properties.Resources.Feedback;
+ this.feedbackPictureBox.Location = new System.Drawing.Point(12, 12);
+ this.feedbackPictureBox.Name = "feedbackPictureBox";
+ this.feedbackPictureBox.Size = new System.Drawing.Size(32, 32);
+ this.feedbackPictureBox.SizeMode = System.Windows.Forms.PictureBoxSizeMode.AutoSize;
+ this.feedbackPictureBox.TabIndex = 2;
+ this.feedbackPictureBox.TabStop = false;
+ //
+ // emailLabel
+ //
+ this.emailLabel.AutoSize = true;
+ this.emailLabel.Location = new System.Drawing.Point(9, 122);
+ this.emailLabel.Name = "emailLabel";
+ this.emailLabel.Size = new System.Drawing.Size(127, 13);
+ this.emailLabel.TabIndex = 3;
+ this.emailLabel.Text = "E-mail Address (Optional):";
+ //
+ // remarksLabel
+ //
+ this.remarksLabel.AutoSize = true;
+ this.remarksLabel.Location = new System.Drawing.Point(9, 150);
+ this.remarksLabel.Name = "remarksLabel";
+ this.remarksLabel.Size = new System.Drawing.Size(52, 13);
+ this.remarksLabel.TabIndex = 4;
+ this.remarksLabel.Text = "Remarks:";
+ //
+ // textBox1
+ //
+ this.textBox1.Location = new System.Drawing.Point(142, 119);
+ this.textBox1.Name = "textBox1";
+ this.textBox1.Size = new System.Drawing.Size(146, 20);
+ this.textBox1.TabIndex = 5;
+ //
+ // textBox2
+ //
+ this.textBox2.Location = new System.Drawing.Point(12, 166);
+ this.textBox2.Multiline = true;
+ this.textBox2.Name = "textBox2";
+ this.textBox2.Size = new System.Drawing.Size(382, 110);
+ this.textBox2.TabIndex = 6;
+ //
+ // sendButton
+ //
+ this.sendButton.Image = global::NBug.Properties.Resources.Send;
+ this.sendButton.ImageAlign = System.Drawing.ContentAlignment.MiddleLeft;
+ this.sendButton.Location = new System.Drawing.Point(319, 284);
+ this.sendButton.Name = "sendButton";
+ this.sendButton.Size = new System.Drawing.Size(75, 23);
+ this.sendButton.TabIndex = 7;
+ this.sendButton.Text = " &Send";
+ this.sendButton.UseVisualStyleBackColor = true;
+ //
+ // closeButton
+ //
+ this.closeButton.Location = new System.Drawing.Point(233, 284);
+ this.closeButton.Name = "closeButton";
+ this.closeButton.Size = new System.Drawing.Size(75, 23);
+ this.closeButton.TabIndex = 8;
+ this.closeButton.Text = "&Close";
+ this.closeButton.UseVisualStyleBackColor = true;
+ //
+ // Feedback
+ //
+ this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F);
+ this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
+ this.ClientSize = new System.Drawing.Size(406, 314);
+ this.Controls.Add(this.closeButton);
+ this.Controls.Add(this.sendButton);
+ this.Controls.Add(this.textBox2);
+ this.Controls.Add(this.textBox1);
+ this.Controls.Add(this.remarksLabel);
+ this.Controls.Add(this.emailLabel);
+ this.Controls.Add(this.feedbackPictureBox);
+ this.Controls.Add(this.feedbackLabel);
+ this.Controls.Add(this.suggestionTypeGroupBox);
+ this.FormBorderStyle = System.Windows.Forms.FormBorderStyle.FixedSingle;
+ this.MaximizeBox = false;
+ this.MinimizeBox = false;
+ this.Name = "Feedback";
+ this.StartPosition = System.Windows.Forms.FormStartPosition.CenterParent;
+ this.Text = "Feedback";
+ this.suggestionTypeGroupBox.ResumeLayout(false);
+ this.suggestionTypeGroupBox.PerformLayout();
+ ((System.ComponentModel.ISupportInitialize)(this.feedbackPictureBox)).EndInit();
+ this.ResumeLayout(false);
+ this.PerformLayout();
+
+ }
+
+ #endregion
+
+ private System.Windows.Forms.GroupBox suggestionTypeGroupBox;
+ private System.Windows.Forms.RadioButton featureRequestRadioButton;
+ private System.Windows.Forms.RadioButton commentRadioButton;
+ private System.Windows.Forms.RadioButton errorReportRadioButton;
+ private System.Windows.Forms.RadioButton suggestionRadioButton;
+ private System.Windows.Forms.Label feedbackLabel;
+ private System.Windows.Forms.PictureBox feedbackPictureBox;
+ private System.Windows.Forms.Label emailLabel;
+ private System.Windows.Forms.Label remarksLabel;
+ private System.Windows.Forms.TextBox textBox1;
+ private System.Windows.Forms.TextBox textBox2;
+ private System.Windows.Forms.Button sendButton;
+ private System.Windows.Forms.Button closeButton;
+
+ }
+}
\ No newline at end of file
diff --git a/NBug/Core/UI/WinForms/Feedback.cs b/NBug/Core/UI/WinForms/Feedback.cs
new file mode 100644
index 0000000..138d497
--- /dev/null
+++ b/NBug/Core/UI/WinForms/Feedback.cs
@@ -0,0 +1,13 @@
+namespace NBug.Core.UI.WinForms
+{
+ using System.Windows.Forms;
+
+ internal partial class Feedback : Form
+ {
+ public Feedback()
+ {
+ InitializeComponent();
+ this.Icon = Properties.Resources.NBug_icon_16;
+ }
+ }
+}
diff --git a/NBug/Core/UI/WinForms/Feedback.resx b/NBug/Core/UI/WinForms/Feedback.resx
new file mode 100644
index 0000000..29dcb1b
--- /dev/null
+++ b/NBug/Core/UI/WinForms/Feedback.resx
@@ -0,0 +1,120 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ text/microsoft-resx
+
+
+ 2.0
+
+
+ System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089
+
+
+ System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089
+
+
\ No newline at end of file
diff --git a/NBug/Core/UI/WinForms/Full.Designer.cs b/NBug/Core/UI/WinForms/Full.Designer.cs
new file mode 100644
index 0000000..ea8048e
--- /dev/null
+++ b/NBug/Core/UI/WinForms/Full.Designer.cs
@@ -0,0 +1,435 @@
+namespace NBug.Core.UI.WinForms
+{
+ using NBug.Core.UI.WinForms.Panels;
+
+ partial class Full
+ {
+ ///
+ /// Required designer variable.
+ ///
+ private System.ComponentModel.IContainer components = null;
+
+ ///
+ /// Clean up any resources being used.
+ ///
+ /// true if managed resources should be disposed; otherwise, false.
+ protected override void Dispose(bool disposing)
+ {
+ if (disposing && (components != null))
+ {
+ components.Dispose();
+ }
+ base.Dispose(disposing);
+ }
+
+ #region Windows Form Designer generated code
+
+ ///
+ /// Required method for Designer support - do not modify
+ /// the contents of this method with the code editor.
+ ///
+ private void InitializeComponent()
+ {
+ this.components = new System.ComponentModel.Container();
+ System.ComponentModel.ComponentResourceManager resources = new System.ComponentModel.ComponentResourceManager(typeof(Full));
+ this.mainTabs = new System.Windows.Forms.TabControl();
+ this.generalTabPage = new System.Windows.Forms.TabPage();
+ this.warningLabel = new System.Windows.Forms.Label();
+ this.exceptionTypeLabel = new System.Windows.Forms.Label();
+ this.exceptionTextBox = new System.Windows.Forms.TextBox();
+ this.descriptionTextBox = new System.Windows.Forms.TextBox();
+ this.errorDescriptionLabel = new System.Windows.Forms.Label();
+ this.clrTextBox = new System.Windows.Forms.TextBox();
+ this.clrLabel = new System.Windows.Forms.Label();
+ this.dateTimeTextBox = new System.Windows.Forms.TextBox();
+ this.dateTimeLabel = new System.Windows.Forms.Label();
+ this.nbugTextBox = new System.Windows.Forms.TextBox();
+ this.nbugLabel = new System.Windows.Forms.Label();
+ this.applicationTextBox = new System.Windows.Forms.TextBox();
+ this.applicationLabel = new System.Windows.Forms.Label();
+ this.targetSiteTextBox = new System.Windows.Forms.TextBox();
+ this.targetSiteLabel = new System.Windows.Forms.Label();
+ this.exceptionMessageTextBox = new System.Windows.Forms.TextBox();
+ this.warningPictureBox = new System.Windows.Forms.PictureBox();
+ this.exceptionTabPage = new System.Windows.Forms.TabPage();
+ this.exceptionDetails = new NBug.Core.UI.WinForms.Panels.ExceptionDetails();
+ this.reportContentsTabPage = new System.Windows.Forms.TabPage();
+ this.reportPreviewTextBox = new System.Windows.Forms.TextBox();
+ this.previewLabel = new System.Windows.Forms.Label();
+ this.contentsLabel = new System.Windows.Forms.Label();
+ this.reportContentsListView = new System.Windows.Forms.ListView();
+ this.nameColumnHeader = ((System.Windows.Forms.ColumnHeader)(new System.Windows.Forms.ColumnHeader()));
+ this.descriptionColumnHeader = ((System.Windows.Forms.ColumnHeader)(new System.Windows.Forms.ColumnHeader()));
+ this.sizeColumnHeader = ((System.Windows.Forms.ColumnHeader)(new System.Windows.Forms.ColumnHeader()));
+ this.sendAndQuitButton = new System.Windows.Forms.Button();
+ this.quitButton = new System.Windows.Forms.Button();
+ this.toolTip = new System.Windows.Forms.ToolTip(this.components);
+ this.mainTabs.SuspendLayout();
+ this.generalTabPage.SuspendLayout();
+ ((System.ComponentModel.ISupportInitialize)(this.warningPictureBox)).BeginInit();
+ this.exceptionTabPage.SuspendLayout();
+ this.reportContentsTabPage.SuspendLayout();
+ this.SuspendLayout();
+ //
+ // mainTabs
+ //
+ this.mainTabs.Controls.Add(this.generalTabPage);
+ this.mainTabs.Controls.Add(this.exceptionTabPage);
+ this.mainTabs.Controls.Add(this.reportContentsTabPage);
+ this.mainTabs.Location = new System.Drawing.Point(9, 6);
+ this.mainTabs.Margin = new System.Windows.Forms.Padding(0);
+ this.mainTabs.Name = "mainTabs";
+ this.mainTabs.SelectedIndex = 0;
+ this.mainTabs.Size = new System.Drawing.Size(475, 361);
+ this.mainTabs.TabIndex = 0;
+ //
+ // generalTabPage
+ //
+ this.generalTabPage.Controls.Add(this.warningLabel);
+ this.generalTabPage.Controls.Add(this.exceptionTypeLabel);
+ this.generalTabPage.Controls.Add(this.exceptionTextBox);
+ this.generalTabPage.Controls.Add(this.descriptionTextBox);
+ this.generalTabPage.Controls.Add(this.errorDescriptionLabel);
+ this.generalTabPage.Controls.Add(this.clrTextBox);
+ this.generalTabPage.Controls.Add(this.clrLabel);
+ this.generalTabPage.Controls.Add(this.dateTimeTextBox);
+ this.generalTabPage.Controls.Add(this.dateTimeLabel);
+ this.generalTabPage.Controls.Add(this.nbugTextBox);
+ this.generalTabPage.Controls.Add(this.nbugLabel);
+ this.generalTabPage.Controls.Add(this.applicationTextBox);
+ this.generalTabPage.Controls.Add(this.applicationLabel);
+ this.generalTabPage.Controls.Add(this.targetSiteTextBox);
+ this.generalTabPage.Controls.Add(this.targetSiteLabel);
+ this.generalTabPage.Controls.Add(this.exceptionMessageTextBox);
+ this.generalTabPage.Controls.Add(this.warningPictureBox);
+ this.generalTabPage.Location = new System.Drawing.Point(4, 22);
+ this.generalTabPage.Name = "generalTabPage";
+ this.generalTabPage.Padding = new System.Windows.Forms.Padding(3);
+ this.generalTabPage.Size = new System.Drawing.Size(467, 335);
+ this.generalTabPage.TabIndex = 0;
+ this.generalTabPage.Text = "General";
+ this.generalTabPage.UseVisualStyleBackColor = true;
+ //
+ // warningLabel
+ //
+ this.warningLabel.Location = new System.Drawing.Point(64, 12);
+ this.warningLabel.Name = "warningLabel";
+ this.warningLabel.Size = new System.Drawing.Size(388, 43);
+ this.warningLabel.TabIndex = 18;
+ this.warningLabel.Text = resources.GetString("warningLabel.Text");
+ //
+ // exceptionTypeLabel
+ //
+ this.exceptionTypeLabel.Image = global::NBug.Properties.Resources.NBug_Icon_PNG_16;
+ this.exceptionTypeLabel.ImageAlign = System.Drawing.ContentAlignment.MiddleLeft;
+ this.exceptionTypeLabel.Location = new System.Drawing.Point(21, 69);
+ this.exceptionTypeLabel.Name = "exceptionTypeLabel";
+ this.exceptionTypeLabel.Size = new System.Drawing.Size(106, 16);
+ this.exceptionTypeLabel.TabIndex = 17;
+ this.exceptionTypeLabel.Text = "Exception Type:";
+ this.exceptionTypeLabel.TextAlign = System.Drawing.ContentAlignment.MiddleRight;
+ //
+ // exceptionTextBox
+ //
+ this.exceptionTextBox.Location = new System.Drawing.Point(135, 68);
+ this.exceptionTextBox.Name = "exceptionTextBox";
+ this.exceptionTextBox.Size = new System.Drawing.Size(317, 20);
+ this.exceptionTextBox.TabIndex = 2;
+ //
+ // descriptionTextBox
+ //
+ this.descriptionTextBox.Location = new System.Drawing.Point(13, 267);
+ this.descriptionTextBox.Multiline = true;
+ this.descriptionTextBox.Name = "descriptionTextBox";
+ this.descriptionTextBox.Size = new System.Drawing.Size(439, 60);
+ this.descriptionTextBox.TabIndex = 15;
+ //
+ // errorDescriptionLabel
+ //
+ this.errorDescriptionLabel.AutoSize = true;
+ this.errorDescriptionLabel.Location = new System.Drawing.Point(10, 251);
+ this.errorDescriptionLabel.Name = "errorDescriptionLabel";
+ this.errorDescriptionLabel.Size = new System.Drawing.Size(315, 13);
+ this.errorDescriptionLabel.TabIndex = 14;
+ this.errorDescriptionLabel.Text = "Please add a brief description of how we can reproduce the error:";
+ //
+ // clrTextBox
+ //
+ this.clrTextBox.Location = new System.Drawing.Point(307, 216);
+ this.clrTextBox.Name = "clrTextBox";
+ this.clrTextBox.Size = new System.Drawing.Size(145, 20);
+ this.clrTextBox.TabIndex = 13;
+ //
+ // clrLabel
+ //
+ this.clrLabel.AutoSize = true;
+ this.clrLabel.Location = new System.Drawing.Point(259, 219);
+ this.clrLabel.Name = "clrLabel";
+ this.clrLabel.Size = new System.Drawing.Size(31, 13);
+ this.clrLabel.TabIndex = 12;
+ this.clrLabel.Text = "CLR:";
+ //
+ // dateTimeTextBox
+ //
+ this.dateTimeTextBox.Location = new System.Drawing.Point(78, 216);
+ this.dateTimeTextBox.Name = "dateTimeTextBox";
+ this.dateTimeTextBox.Size = new System.Drawing.Size(145, 20);
+ this.dateTimeTextBox.TabIndex = 11;
+ //
+ // dateTimeLabel
+ //
+ this.dateTimeLabel.AutoSize = true;
+ this.dateTimeLabel.Location = new System.Drawing.Point(10, 219);
+ this.dateTimeLabel.Name = "dateTimeLabel";
+ this.dateTimeLabel.Size = new System.Drawing.Size(61, 13);
+ this.dateTimeLabel.TabIndex = 10;
+ this.dateTimeLabel.Text = "Date/Time:";
+ //
+ // nbugTextBox
+ //
+ this.nbugTextBox.Location = new System.Drawing.Point(307, 182);
+ this.nbugTextBox.Name = "nbugTextBox";
+ this.nbugTextBox.Size = new System.Drawing.Size(145, 20);
+ this.nbugTextBox.TabIndex = 9;
+ //
+ // nbugLabel
+ //
+ this.nbugLabel.AutoSize = true;
+ this.nbugLabel.Location = new System.Drawing.Point(259, 185);
+ this.nbugLabel.Name = "nbugLabel";
+ this.nbugLabel.Size = new System.Drawing.Size(37, 13);
+ this.nbugLabel.TabIndex = 8;
+ this.nbugLabel.Text = "NBug:";
+ //
+ // applicationTextBox
+ //
+ this.applicationTextBox.Location = new System.Drawing.Point(78, 182);
+ this.applicationTextBox.Name = "applicationTextBox";
+ this.applicationTextBox.Size = new System.Drawing.Size(145, 20);
+ this.applicationTextBox.TabIndex = 7;
+ //
+ // applicationLabel
+ //
+ this.applicationLabel.AutoSize = true;
+ this.applicationLabel.Location = new System.Drawing.Point(10, 185);
+ this.applicationLabel.Name = "applicationLabel";
+ this.applicationLabel.Size = new System.Drawing.Size(62, 13);
+ this.applicationLabel.TabIndex = 6;
+ this.applicationLabel.Text = "Application:";
+ //
+ // targetSiteTextBox
+ //
+ this.targetSiteTextBox.Location = new System.Drawing.Point(78, 148);
+ this.targetSiteTextBox.Name = "targetSiteTextBox";
+ this.targetSiteTextBox.Size = new System.Drawing.Size(374, 20);
+ this.targetSiteTextBox.TabIndex = 5;
+ //
+ // targetSiteLabel
+ //
+ this.targetSiteLabel.AutoSize = true;
+ this.targetSiteLabel.Location = new System.Drawing.Point(10, 151);
+ this.targetSiteLabel.Name = "targetSiteLabel";
+ this.targetSiteLabel.Size = new System.Drawing.Size(62, 13);
+ this.targetSiteLabel.TabIndex = 4;
+ this.targetSiteLabel.Text = "Target Site:";
+ //
+ // exceptionMessageTextBox
+ //
+ this.exceptionMessageTextBox.Location = new System.Drawing.Point(13, 98);
+ this.exceptionMessageTextBox.Multiline = true;
+ this.exceptionMessageTextBox.Name = "exceptionMessageTextBox";
+ this.exceptionMessageTextBox.ScrollBars = System.Windows.Forms.ScrollBars.Vertical;
+ this.exceptionMessageTextBox.Size = new System.Drawing.Size(439, 35);
+ this.exceptionMessageTextBox.TabIndex = 3;
+ //
+ // warningPictureBox
+ //
+ this.warningPictureBox.Location = new System.Drawing.Point(16, 15);
+ this.warningPictureBox.Name = "warningPictureBox";
+ this.warningPictureBox.Size = new System.Drawing.Size(32, 32);
+ this.warningPictureBox.TabIndex = 1;
+ this.warningPictureBox.TabStop = false;
+ //
+ // exceptionTabPage
+ //
+ this.exceptionTabPage.Controls.Add(this.exceptionDetails);
+ this.exceptionTabPage.Location = new System.Drawing.Point(4, 22);
+ this.exceptionTabPage.Name = "exceptionTabPage";
+ this.exceptionTabPage.Padding = new System.Windows.Forms.Padding(3);
+ this.exceptionTabPage.Size = new System.Drawing.Size(467, 335);
+ this.exceptionTabPage.TabIndex = 2;
+ this.exceptionTabPage.Text = "Exception";
+ this.exceptionTabPage.UseVisualStyleBackColor = true;
+ //
+ // exceptionDetails
+ //
+ this.exceptionDetails.InformationColumnWidth = 350;
+ this.exceptionDetails.Location = new System.Drawing.Point(3, 3);
+ this.exceptionDetails.Name = "exceptionDetails";
+ this.exceptionDetails.PropertyColumnWidth = 101;
+ this.exceptionDetails.Size = new System.Drawing.Size(461, 330);
+ this.exceptionDetails.TabIndex = 0;
+ //
+ // reportContentsTabPage
+ //
+ this.reportContentsTabPage.Controls.Add(this.reportPreviewTextBox);
+ this.reportContentsTabPage.Controls.Add(this.previewLabel);
+ this.reportContentsTabPage.Controls.Add(this.contentsLabel);
+ this.reportContentsTabPage.Controls.Add(this.reportContentsListView);
+ this.reportContentsTabPage.Location = new System.Drawing.Point(4, 22);
+ this.reportContentsTabPage.Name = "reportContentsTabPage";
+ this.reportContentsTabPage.Padding = new System.Windows.Forms.Padding(3);
+ this.reportContentsTabPage.Size = new System.Drawing.Size(467, 335);
+ this.reportContentsTabPage.TabIndex = 3;
+ this.reportContentsTabPage.Text = "Report Contents";
+ this.reportContentsTabPage.UseVisualStyleBackColor = true;
+ this.reportContentsTabPage.Enter += new System.EventHandler(this.ReportContentsTabPage_Enter);
+ //
+ // reportPreviewTextBox
+ //
+ this.reportPreviewTextBox.Location = new System.Drawing.Point(6, 148);
+ this.reportPreviewTextBox.Multiline = true;
+ this.reportPreviewTextBox.Name = "reportPreviewTextBox";
+ this.reportPreviewTextBox.Size = new System.Drawing.Size(455, 172);
+ this.reportPreviewTextBox.TabIndex = 5;
+ //
+ // previewLabel
+ //
+ this.previewLabel.AutoSize = true;
+ this.previewLabel.Location = new System.Drawing.Point(6, 131);
+ this.previewLabel.Name = "previewLabel";
+ this.previewLabel.Size = new System.Drawing.Size(48, 13);
+ this.previewLabel.TabIndex = 4;
+ this.previewLabel.Text = "Preview:";
+ //
+ // contentsLabel
+ //
+ this.contentsLabel.AutoSize = true;
+ this.contentsLabel.Location = new System.Drawing.Point(6, 7);
+ this.contentsLabel.Name = "contentsLabel";
+ this.contentsLabel.Size = new System.Drawing.Size(288, 13);
+ this.contentsLabel.TabIndex = 3;
+ this.contentsLabel.Text = "Double-click an item to open it with the associated program.";
+ //
+ // reportContentsListView
+ //
+ this.reportContentsListView.Columns.AddRange(new System.Windows.Forms.ColumnHeader[] {
+ this.nameColumnHeader,
+ this.descriptionColumnHeader,
+ this.sizeColumnHeader});
+ this.reportContentsListView.Location = new System.Drawing.Point(6, 24);
+ this.reportContentsListView.Name = "reportContentsListView";
+ this.reportContentsListView.Size = new System.Drawing.Size(455, 97);
+ this.reportContentsListView.TabIndex = 0;
+ this.reportContentsListView.UseCompatibleStateImageBehavior = false;
+ this.reportContentsListView.View = System.Windows.Forms.View.Details;
+ //
+ // nameColumnHeader
+ //
+ this.nameColumnHeader.Text = "Name";
+ this.nameColumnHeader.Width = 120;
+ //
+ // descriptionColumnHeader
+ //
+ this.descriptionColumnHeader.Text = "Description";
+ this.descriptionColumnHeader.Width = 240;
+ //
+ // sizeColumnHeader
+ //
+ this.sizeColumnHeader.Text = "Size";
+ this.sizeColumnHeader.Width = 80;
+ //
+ // sendAndQuitButton
+ //
+ this.sendAndQuitButton.Image = global::NBug.Properties.Resources.Send;
+ this.sendAndQuitButton.ImageAlign = System.Drawing.ContentAlignment.MiddleLeft;
+ this.sendAndQuitButton.Location = new System.Drawing.Point(382, 374);
+ this.sendAndQuitButton.Name = "sendAndQuitButton";
+ this.sendAndQuitButton.Size = new System.Drawing.Size(102, 23);
+ this.sendAndQuitButton.TabIndex = 1;
+ this.sendAndQuitButton.Text = "&Send and Quit";
+ this.sendAndQuitButton.TextAlign = System.Drawing.ContentAlignment.MiddleRight;
+ this.sendAndQuitButton.UseVisualStyleBackColor = true;
+ this.sendAndQuitButton.Click += new System.EventHandler(this.SendAndQuitButton_Click);
+ //
+ // quitButton
+ //
+ this.quitButton.DialogResult = System.Windows.Forms.DialogResult.Cancel;
+ this.quitButton.Location = new System.Drawing.Point(296, 374);
+ this.quitButton.Name = "quitButton";
+ this.quitButton.Size = new System.Drawing.Size(75, 23);
+ this.quitButton.TabIndex = 2;
+ this.quitButton.Text = "&Quit";
+ this.quitButton.UseVisualStyleBackColor = true;
+ this.quitButton.Click += new System.EventHandler(this.QuitButton_Click);
+ //
+ // toolTip
+ //
+ this.toolTip.AutomaticDelay = 100;
+ this.toolTip.UseAnimation = false;
+ this.toolTip.UseFading = false;
+ //
+ // Full
+ //
+ this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F);
+ this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
+ this.CancelButton = this.quitButton;
+ this.ClientSize = new System.Drawing.Size(494, 403);
+ this.Controls.Add(this.quitButton);
+ this.Controls.Add(this.sendAndQuitButton);
+ this.Controls.Add(this.mainTabs);
+ this.FormBorderStyle = System.Windows.Forms.FormBorderStyle.FixedSingle;
+ this.MaximizeBox = false;
+ this.MinimizeBox = false;
+ this.Name = "Full";
+ this.SizeGripStyle = System.Windows.Forms.SizeGripStyle.Hide;
+ this.StartPosition = System.Windows.Forms.FormStartPosition.CenterScreen;
+ this.Text = "{HostApplication} Error";
+ this.TopMost = true;
+ this.mainTabs.ResumeLayout(false);
+ this.generalTabPage.ResumeLayout(false);
+ this.generalTabPage.PerformLayout();
+ ((System.ComponentModel.ISupportInitialize)(this.warningPictureBox)).EndInit();
+ this.exceptionTabPage.ResumeLayout(false);
+ this.reportContentsTabPage.ResumeLayout(false);
+ this.reportContentsTabPage.PerformLayout();
+ this.ResumeLayout(false);
+
+ }
+
+ #endregion
+
+ private System.Windows.Forms.TabControl mainTabs;
+ private System.Windows.Forms.TabPage generalTabPage;
+ private System.Windows.Forms.Button sendAndQuitButton;
+ private System.Windows.Forms.Button quitButton;
+ private System.Windows.Forms.TabPage exceptionTabPage;
+ private System.Windows.Forms.PictureBox warningPictureBox;
+ private System.Windows.Forms.TextBox exceptionMessageTextBox;
+ private System.Windows.Forms.TextBox exceptionTextBox;
+ private System.Windows.Forms.TextBox targetSiteTextBox;
+ private System.Windows.Forms.Label targetSiteLabel;
+ private System.Windows.Forms.TextBox nbugTextBox;
+ private System.Windows.Forms.Label nbugLabel;
+ private System.Windows.Forms.TextBox applicationTextBox;
+ private System.Windows.Forms.Label applicationLabel;
+ private System.Windows.Forms.TextBox descriptionTextBox;
+ private System.Windows.Forms.Label errorDescriptionLabel;
+ private System.Windows.Forms.TextBox clrTextBox;
+ private System.Windows.Forms.Label clrLabel;
+ private System.Windows.Forms.TextBox dateTimeTextBox;
+ private System.Windows.Forms.Label dateTimeLabel;
+ private System.Windows.Forms.TabPage reportContentsTabPage;
+ private System.Windows.Forms.TextBox reportPreviewTextBox;
+ private System.Windows.Forms.Label previewLabel;
+ private System.Windows.Forms.Label contentsLabel;
+ private System.Windows.Forms.ListView reportContentsListView;
+ private System.Windows.Forms.ColumnHeader nameColumnHeader;
+ private System.Windows.Forms.ColumnHeader descriptionColumnHeader;
+ private System.Windows.Forms.ColumnHeader sizeColumnHeader;
+ private System.Windows.Forms.Label exceptionTypeLabel;
+ private System.Windows.Forms.ToolTip toolTip;
+ private System.Windows.Forms.Label warningLabel;
+ private ExceptionDetails exceptionDetails;
+ }
+}
\ No newline at end of file
diff --git a/NBug/Core/UI/WinForms/Full.cs b/NBug/Core/UI/WinForms/Full.cs
new file mode 100644
index 0000000..1276be4
--- /dev/null
+++ b/NBug/Core/UI/WinForms/Full.cs
@@ -0,0 +1,92 @@
+// --------------------------------------------------------------------------------------------------------------------
+//
+// Copyright (c) 2010 - 2011 Teoman Soygul. Licensed under LGPLv3 (http://www.gnu.org/licenses/lgpl.html).
+//
+// --------------------------------------------------------------------------------------------------------------------
+
+namespace NBug.Core.UI.WinForms
+{
+ using System;
+ using System.Drawing;
+ using System.Windows.Forms;
+
+ using NBug.Core.Reporting.Info;
+ using NBug.Core.Util.Serialization;
+
+ internal partial class Full : Form
+ {
+ private UIDialogResult uiDialogResult;
+
+ internal Full()
+ {
+ InitializeComponent();
+ this.Icon = Properties.Resources.NBug_icon_16;
+ this.warningLabel.Text = Settings.Resources.UI_Dialog_Full_Message;
+ this.generalTabPage.Text = Settings.Resources.UI_Dialog_Full_General_Tab;
+ this.exceptionTabPage.Text = Settings.Resources.UI_Dialog_Full_Exception_Tab;
+ this.reportContentsTabPage.Text = Settings.Resources.UI_Dialog_Full_Report_Contents_Tab;
+ this.errorDescriptionLabel.Text = Settings.Resources.UI_Dialog_Full_How_to_Reproduce_the_Error_Notification;
+ this.quitButton.Text = Settings.Resources.UI_Dialog_Full_Quit_Button;
+ this.sendAndQuitButton.Text = Settings.Resources.UI_Dialog_Full_Send_and_Quit_Button;
+
+ // ToDo: Displaying report contents properly requires some more work.
+ this.mainTabs.TabPages.Remove(this.mainTabs.TabPages["reportContentsTabPage"]);
+ }
+
+ internal UIDialogResult ShowDialog(SerializableException exception, Report report)
+ {
+ this.Text = string.Format("{0} {1}", report.GeneralInfo.HostApplication, Settings.Resources.UI_Dialog_Full_Title);
+
+ // Fill in the 'General' tab
+ warningPictureBox.Image = SystemIcons.Warning.ToBitmap();
+ this.exceptionTextBox.Text = exception.Type;
+ this.exceptionMessageTextBox.Text = exception.Message;
+ this.targetSiteTextBox.Text = exception.TargetSite;
+ this.applicationTextBox.Text = report.GeneralInfo.HostApplication + " [" + report.GeneralInfo.HostApplicationVersion + "]";
+ this.nbugTextBox.Text = report.GeneralInfo.NBugVersion;
+ this.dateTimeTextBox.Text = report.GeneralInfo.DateTime;
+ this.clrTextBox.Text = report.GeneralInfo.CLRVersion;
+
+ // Fill in the 'Exception' tab
+ this.exceptionDetails.Initialize(exception);
+
+ // ToDo: Fill in the 'Report Contents' tab);
+
+ this.ShowDialog();
+
+ // Write back the user description (as we passed 'report' as a reference since it is a refence object anyway)
+ report.GeneralInfo.UserDescription = this.descriptionTextBox.Text;
+ return this.uiDialogResult;
+ }
+
+ private void SendAndQuitButton_Click(object sender, EventArgs e)
+ {
+ this.uiDialogResult = new UIDialogResult(ExecutionFlow.BreakExecution, SendReport.Send);
+ this.Close();
+ }
+
+ private void QuitButton_Click(object sender, EventArgs e)
+ {
+ this.uiDialogResult = new UIDialogResult(ExecutionFlow.BreakExecution, SendReport.DoNotSend);
+ this.Close();
+ }
+
+ private void ReportContentsTabPage_Enter(object sender, EventArgs e)
+ {
+ /*using (Storer storer = new Storer())
+ using (ZipStorer zipStorer = ZipStorer.Open(storer.GetFirstReportFile(), FileAccess.Read))
+ using (Stream zipItemStream = new MemoryStream())
+ {
+ List zipDirectory = zipStorer.ReadCentralDir();
+
+ foreach (ZipStorer.ZipFileEntry entry in zipDirectory)
+ {
+ zipItemStream.SetLength(0);
+ zipStorer.ExtractFile(entry, zipItemStream);
+ zipItemStream.Position = 0;
+ this.reportContentsListView.Items.Add(entry.FilenameInZip);
+ }
+ }*/
+ }
+ }
+}
diff --git a/NBug/Core/UI/WinForms/Full.resx b/NBug/Core/UI/WinForms/Full.resx
new file mode 100644
index 0000000..1257ebf
--- /dev/null
+++ b/NBug/Core/UI/WinForms/Full.resx
@@ -0,0 +1,129 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ text/microsoft-resx
+
+
+ 2.0
+
+
+ System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089
+
+
+ System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089
+
+
+ The application has crashed and it will now be dismissed. If you click Quit, the application will close immediately. If you click Send and Quit, the application will close and a bug report will be send.
+
+
+ 18, 13
+
+
+ 45
+
+
\ No newline at end of file
diff --git a/NBug/Core/UI/WinForms/Minimal.cs b/NBug/Core/UI/WinForms/Minimal.cs
new file mode 100644
index 0000000..abfd837
--- /dev/null
+++ b/NBug/Core/UI/WinForms/Minimal.cs
@@ -0,0 +1,27 @@
+// --------------------------------------------------------------------------------------------------------------------
+//
+// Copyright (c) 2010 - 2011 Teoman Soygul. Licensed under LGPLv3 (http://www.gnu.org/licenses/lgpl.html).
+//
+// --------------------------------------------------------------------------------------------------------------------
+
+namespace NBug.Core.UI.WinForms
+{
+ using System.Windows.Forms;
+
+ using NBug.Core.Reporting.Info;
+
+ internal class Minimal
+ {
+ internal UIDialogResult ShowDialog(Report report)
+ {
+ MessageBox.Show(
+ new Form { TopMost = true },
+ Settings.Resources.UI_Dialog_Minimal_Message,
+ report.GeneralInfo.HostApplication + " Error",
+ MessageBoxButtons.OK,
+ MessageBoxIcon.Warning);
+
+ return new UIDialogResult(ExecutionFlow.BreakExecution, SendReport.Send);
+ }
+ }
+}
diff --git a/NBug/Core/UI/WinForms/Normal.Designer.cs b/NBug/Core/UI/WinForms/Normal.Designer.cs
new file mode 100644
index 0000000..8d0b7d2
--- /dev/null
+++ b/NBug/Core/UI/WinForms/Normal.Designer.cs
@@ -0,0 +1,117 @@
+namespace NBug.Core.UI.WinForms
+{
+ partial class Normal
+ {
+ ///
+ /// Required designer variable.
+ ///
+ private System.ComponentModel.IContainer components = null;
+
+ ///
+ /// Clean up any resources being used.
+ ///
+ /// true if managed resources should be disposed; otherwise, false.
+ protected override void Dispose(bool disposing)
+ {
+ if (disposing && (components != null))
+ {
+ components.Dispose();
+ }
+ base.Dispose(disposing);
+ }
+
+ #region Windows Form Designer generated code
+
+ ///
+ /// Required method for Designer support - do not modify
+ /// the contents of this method with the code editor.
+ ///
+ private void InitializeComponent()
+ {
+ this.warningPictureBox = new System.Windows.Forms.PictureBox();
+ this.warningLabel = new System.Windows.Forms.Label();
+ this.exceptionMessageLabel = new System.Windows.Forms.Label();
+ this.quitButton = new System.Windows.Forms.Button();
+ this.continueButton = new System.Windows.Forms.Button();
+ ((System.ComponentModel.ISupportInitialize)(this.warningPictureBox)).BeginInit();
+ this.SuspendLayout();
+ //
+ // warningPictureBox
+ //
+ this.warningPictureBox.Location = new System.Drawing.Point(12, 12);
+ this.warningPictureBox.Name = "warningPictureBox";
+ this.warningPictureBox.Size = new System.Drawing.Size(32, 32);
+ this.warningPictureBox.TabIndex = 0;
+ this.warningPictureBox.TabStop = false;
+ //
+ // warningLabel
+ //
+ this.warningLabel.Location = new System.Drawing.Point(77, 12);
+ this.warningLabel.Name = "warningLabel";
+ this.warningLabel.Size = new System.Drawing.Size(347, 47);
+ this.warningLabel.TabIndex = 4;
+ this.warningLabel.Text = "Unhandled exception has occurred in your application. If you click Continue, the " +
+ "application will ignore this error and attempt to continue. If you click quit, t" +
+ "he application will close immediately.";
+ //
+ // exceptionMessageLabel
+ //
+ this.exceptionMessageLabel.Location = new System.Drawing.Point(77, 64);
+ this.exceptionMessageLabel.Name = "exceptionMessageLabel";
+ this.exceptionMessageLabel.Size = new System.Drawing.Size(347, 47);
+ this.exceptionMessageLabel.TabIndex = 3;
+ //
+ // quitButton
+ //
+ this.quitButton.DialogResult = System.Windows.Forms.DialogResult.Cancel;
+ this.quitButton.Location = new System.Drawing.Point(329, 119);
+ this.quitButton.Name = "quitButton";
+ this.quitButton.Size = new System.Drawing.Size(100, 23);
+ this.quitButton.TabIndex = 1;
+ this.quitButton.Text = "Quit";
+ this.quitButton.UseVisualStyleBackColor = true;
+ this.quitButton.Click += new System.EventHandler(this.QuitButton_Click);
+ //
+ // continueButton
+ //
+ this.continueButton.Location = new System.Drawing.Point(223, 119);
+ this.continueButton.Name = "continueButton";
+ this.continueButton.Size = new System.Drawing.Size(100, 23);
+ this.continueButton.TabIndex = 2;
+ this.continueButton.Text = "Continue";
+ this.continueButton.UseVisualStyleBackColor = true;
+ this.continueButton.Click += new System.EventHandler(this.ContinueButton_Click);
+ //
+ // Normal
+ //
+ this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F);
+ this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
+ this.CancelButton = this.quitButton;
+ this.ClientSize = new System.Drawing.Size(436, 148);
+ this.Controls.Add(this.continueButton);
+ this.Controls.Add(this.quitButton);
+ this.Controls.Add(this.exceptionMessageLabel);
+ this.Controls.Add(this.warningLabel);
+ this.Controls.Add(this.warningPictureBox);
+ this.FormBorderStyle = System.Windows.Forms.FormBorderStyle.FixedSingle;
+ this.MaximizeBox = false;
+ this.MinimizeBox = false;
+ this.Name = "Normal";
+ this.SizeGripStyle = System.Windows.Forms.SizeGripStyle.Hide;
+ this.StartPosition = System.Windows.Forms.FormStartPosition.CenterScreen;
+ this.Text = "{HostApplication} Error";
+ this.TopMost = true;
+ ((System.ComponentModel.ISupportInitialize)(this.warningPictureBox)).EndInit();
+ this.ResumeLayout(false);
+
+ }
+
+ #endregion
+
+ private System.Windows.Forms.PictureBox warningPictureBox;
+ private System.Windows.Forms.Label warningLabel;
+ private System.Windows.Forms.Label exceptionMessageLabel;
+ private System.Windows.Forms.Button quitButton;
+ private System.Windows.Forms.Button continueButton;
+ }
+}
\ No newline at end of file
diff --git a/NBug/Core/UI/WinForms/Normal.cs b/NBug/Core/UI/WinForms/Normal.cs
new file mode 100644
index 0000000..bde102a
--- /dev/null
+++ b/NBug/Core/UI/WinForms/Normal.cs
@@ -0,0 +1,51 @@
+// --------------------------------------------------------------------------------------------------------------------
+//
+// Copyright (c) 2010 - 2011 Teoman Soygul. Licensed under LGPLv3 (http://www.gnu.org/licenses/lgpl.html).
+//
+// --------------------------------------------------------------------------------------------------------------------
+
+namespace NBug.Core.UI.WinForms
+{
+ using System;
+ using System.Drawing;
+ using System.Windows.Forms;
+
+ using NBug.Core.Reporting.Info;
+
+ internal partial class Normal : Form
+ {
+ private UIDialogResult uiDialogResult;
+
+ internal Normal()
+ {
+ InitializeComponent();
+ this.Icon = Properties.Resources.NBug_icon_16;
+ this.warningPictureBox.Image = SystemIcons.Warning.ToBitmap();
+ this.warningLabel.Text = Settings.Resources.UI_Dialog_Normal_Message;
+ this.continueButton.Text = Settings.Resources.UI_Dialog_Normal_Continue_Button;
+ this.quitButton.Text = Settings.Resources.UI_Dialog_Normal_Quit_Button;
+ }
+
+ internal UIDialogResult ShowDialog(Report report)
+ {
+ this.Text = string.Format("{0} {1}", report.GeneralInfo.HostApplication, Settings.Resources.UI_Dialog_Normal_Title);
+ this.exceptionMessageLabel.Text = report.GeneralInfo.ExceptionMessage;
+
+ this.ShowDialog();
+
+ return this.uiDialogResult;
+ }
+
+ private void ContinueButton_Click(object sender, EventArgs e)
+ {
+ this.uiDialogResult = new UIDialogResult(ExecutionFlow.ContinueExecution, SendReport.Send);
+ this.Close();
+ }
+
+ private void QuitButton_Click(object sender, EventArgs e)
+ {
+ this.uiDialogResult = new UIDialogResult(ExecutionFlow.BreakExecution, SendReport.Send);
+ this.Close();
+ }
+ }
+}
diff --git a/NBug/Core/UI/WinForms/Normal.resx b/NBug/Core/UI/WinForms/Normal.resx
new file mode 100644
index 0000000..29dcb1b
--- /dev/null
+++ b/NBug/Core/UI/WinForms/Normal.resx
@@ -0,0 +1,120 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ text/microsoft-resx
+
+
+ 2.0
+
+
+ System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089
+
+
+ System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089
+
+
\ No newline at end of file
diff --git a/NBug/Core/UI/WinForms/Panels/ExceptionDetailView.Designer.cs b/NBug/Core/UI/WinForms/Panels/ExceptionDetailView.Designer.cs
new file mode 100644
index 0000000..d880db5
--- /dev/null
+++ b/NBug/Core/UI/WinForms/Panels/ExceptionDetailView.Designer.cs
@@ -0,0 +1,126 @@
+namespace NBug.Core.UI.WinForms.Panels
+{
+ partial class ExceptionDetailView
+ {
+ ///
+ /// Required designer variable.
+ ///
+ private System.ComponentModel.IContainer components = null;
+
+ ///
+ /// Clean up any resources being used.
+ ///
+ /// true if managed resources should be disposed; otherwise, false.
+ protected override void Dispose(bool disposing)
+ {
+ if (disposing && (components != null))
+ {
+ components.Dispose();
+ }
+ base.Dispose(disposing);
+ }
+
+ #region Windows Form Designer generated code
+
+ ///
+ /// Required method for Designer support - do not modify
+ /// the contents of this method with the code editor.
+ ///
+ private void InitializeComponent()
+ {
+ this.propertyLabel = new System.Windows.Forms.Label();
+ this.propertyTextBox = new System.Windows.Forms.TextBox();
+ this.propertyInformationTextBox = new System.Windows.Forms.TextBox();
+ this.closeButton = new System.Windows.Forms.Button();
+ this.topPanel = new System.Windows.Forms.Panel();
+ this.statusStrip = new System.Windows.Forms.StatusStrip();
+ this.topPanel.SuspendLayout();
+ this.SuspendLayout();
+ //
+ // propertyLabel
+ //
+ this.propertyLabel.AutoSize = true;
+ this.propertyLabel.Location = new System.Drawing.Point(2, 8);
+ this.propertyLabel.Name = "propertyLabel";
+ this.propertyLabel.Size = new System.Drawing.Size(49, 13);
+ this.propertyLabel.TabIndex = 0;
+ this.propertyLabel.Text = "Property:";
+ //
+ // propertyTextBox
+ //
+ this.propertyTextBox.Location = new System.Drawing.Point(57, 5);
+ this.propertyTextBox.Name = "propertyTextBox";
+ this.propertyTextBox.Size = new System.Drawing.Size(441, 20);
+ this.propertyTextBox.TabIndex = 2;
+ //
+ // propertyInformationTextBox
+ //
+ this.propertyInformationTextBox.Dock = System.Windows.Forms.DockStyle.Fill;
+ this.propertyInformationTextBox.Location = new System.Drawing.Point(0, 32);
+ this.propertyInformationTextBox.Multiline = true;
+ this.propertyInformationTextBox.Name = "propertyInformationTextBox";
+ this.propertyInformationTextBox.ScrollBars = System.Windows.Forms.ScrollBars.Both;
+ this.propertyInformationTextBox.Size = new System.Drawing.Size(567, 169);
+ this.propertyInformationTextBox.TabIndex = 3;
+ this.propertyInformationTextBox.WordWrap = false;
+ //
+ // closeButton
+ //
+ this.closeButton.DialogResult = System.Windows.Forms.DialogResult.Cancel;
+ this.closeButton.Location = new System.Drawing.Point(504, 6);
+ this.closeButton.Name = "closeButton";
+ this.closeButton.Size = new System.Drawing.Size(60, 20);
+ this.closeButton.TabIndex = 1;
+ this.closeButton.Text = "&Close";
+ this.closeButton.UseVisualStyleBackColor = true;
+ this.closeButton.Click += new System.EventHandler(this.CloseButton_Click);
+ //
+ // topPanel
+ //
+ this.topPanel.Controls.Add(this.closeButton);
+ this.topPanel.Dock = System.Windows.Forms.DockStyle.Top;
+ this.topPanel.Location = new System.Drawing.Point(0, 0);
+ this.topPanel.Name = "topPanel";
+ this.topPanel.Size = new System.Drawing.Size(567, 32);
+ this.topPanel.TabIndex = 4;
+ //
+ // statusStrip
+ //
+ this.statusStrip.AutoSize = false;
+ this.statusStrip.Location = new System.Drawing.Point(0, 201);
+ this.statusStrip.Name = "statusStrip";
+ this.statusStrip.Size = new System.Drawing.Size(567, 17);
+ this.statusStrip.TabIndex = 5;
+ //
+ // ExceptionDetailView
+ //
+ this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F);
+ this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
+ this.CancelButton = this.closeButton;
+ this.ClientSize = new System.Drawing.Size(567, 218);
+ this.Controls.Add(this.propertyInformationTextBox);
+ this.Controls.Add(this.statusStrip);
+ this.Controls.Add(this.propertyTextBox);
+ this.Controls.Add(this.propertyLabel);
+ this.Controls.Add(this.topPanel);
+ this.FormBorderStyle = System.Windows.Forms.FormBorderStyle.SizableToolWindow;
+ this.Name = "ExceptionDetailView";
+ this.StartPosition = System.Windows.Forms.FormStartPosition.CenterParent;
+ this.Text = "Property Details";
+ this.TopMost = true;
+ this.topPanel.ResumeLayout(false);
+ this.ResumeLayout(false);
+ this.PerformLayout();
+
+ }
+
+ #endregion
+
+ private System.Windows.Forms.Label propertyLabel;
+ private System.Windows.Forms.TextBox propertyTextBox;
+ private System.Windows.Forms.TextBox propertyInformationTextBox;
+ private System.Windows.Forms.Button closeButton;
+ private System.Windows.Forms.Panel topPanel;
+ private System.Windows.Forms.StatusStrip statusStrip;
+ }
+}
\ No newline at end of file
diff --git a/NBug/Core/UI/WinForms/Panels/ExceptionDetailView.cs b/NBug/Core/UI/WinForms/Panels/ExceptionDetailView.cs
new file mode 100644
index 0000000..c7af360
--- /dev/null
+++ b/NBug/Core/UI/WinForms/Panels/ExceptionDetailView.cs
@@ -0,0 +1,31 @@
+// --------------------------------------------------------------------------------------------------------------------
+//
+// Copyright (c) 2010 - 2011 Teoman Soygul. Licensed under LGPLv3 (http://www.gnu.org/licenses/lgpl.html).
+//
+// --------------------------------------------------------------------------------------------------------------------
+
+namespace NBug.Core.UI.WinForms.Panels
+{
+ using System;
+ using System.Windows.Forms;
+
+ internal partial class ExceptionDetailView : Form
+ {
+ public ExceptionDetailView()
+ {
+ this.InitializeComponent();
+ }
+
+ internal void ShowDialog(string property, string info)
+ {
+ this.propertyTextBox.Text = property;
+ this.propertyInformationTextBox.Text = info;
+ this.ShowDialog();
+ }
+
+ private void CloseButton_Click(object sender, EventArgs e)
+ {
+ this.Close();
+ }
+ }
+}
diff --git a/NBug/Core/UI/WinForms/Panels/ExceptionDetailView.resx b/NBug/Core/UI/WinForms/Panels/ExceptionDetailView.resx
new file mode 100644
index 0000000..012fe52
--- /dev/null
+++ b/NBug/Core/UI/WinForms/Panels/ExceptionDetailView.resx
@@ -0,0 +1,123 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ text/microsoft-resx
+
+
+ 2.0
+
+
+ System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089
+
+
+ System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089
+
+
+ 17, 17
+
+
\ No newline at end of file
diff --git a/NBug/Core/UI/WinForms/Panels/ExceptionDetails.Designer.cs b/NBug/Core/UI/WinForms/Panels/ExceptionDetails.Designer.cs
new file mode 100644
index 0000000..684d0a4
--- /dev/null
+++ b/NBug/Core/UI/WinForms/Panels/ExceptionDetails.Designer.cs
@@ -0,0 +1,124 @@
+namespace NBug.Core.UI.WinForms.Panels
+{
+ partial class ExceptionDetails
+ {
+ ///
+ /// Required designer variable.
+ ///
+ private System.ComponentModel.IContainer components = null;
+
+ ///
+ /// Clean up any resources being used.
+ ///
+ /// true if managed resources should be disposed; otherwise, false.
+ protected override void Dispose(bool disposing)
+ {
+ if (disposing && (components != null))
+ {
+ components.Dispose();
+ }
+ base.Dispose(disposing);
+ }
+
+ #region Component Designer generated code
+
+ ///
+ /// Required method for Designer support - do not modify
+ /// the contents of this method with the code editor.
+ ///
+ private void InitializeComponent()
+ {
+ this.components = new System.ComponentModel.Container();
+ this.exceptionDetailsListView = new System.Windows.Forms.ListView();
+ this.propertyColumnHeader = ((System.Windows.Forms.ColumnHeader)(new System.Windows.Forms.ColumnHeader()));
+ this.informationColumnHeader = ((System.Windows.Forms.ColumnHeader)(new System.Windows.Forms.ColumnHeader()));
+ this.exceptionDetailsLabel = new System.Windows.Forms.Label();
+ this.exceptionLabel = new System.Windows.Forms.Label();
+ this.exceptionTreeView = new System.Windows.Forms.TreeView();
+ this.toolTip = new System.Windows.Forms.ToolTip(this.components);
+ this.SuspendLayout();
+ //
+ // exceptionDetailsListView
+ //
+ this.exceptionDetailsListView.Anchor = ((System.Windows.Forms.AnchorStyles)((((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom)
+ | System.Windows.Forms.AnchorStyles.Left)
+ | System.Windows.Forms.AnchorStyles.Right)));
+ this.exceptionDetailsListView.Columns.AddRange(new System.Windows.Forms.ColumnHeader[] {
+ this.propertyColumnHeader,
+ this.informationColumnHeader});
+ this.exceptionDetailsListView.FullRowSelect = true;
+ this.exceptionDetailsListView.GridLines = true;
+ this.exceptionDetailsListView.Location = new System.Drawing.Point(3, 110);
+ this.exceptionDetailsListView.MultiSelect = false;
+ this.exceptionDetailsListView.Name = "exceptionDetailsListView";
+ this.exceptionDetailsListView.Size = new System.Drawing.Size(455, 217);
+ this.exceptionDetailsListView.TabIndex = 5;
+ this.exceptionDetailsListView.UseCompatibleStateImageBehavior = false;
+ this.exceptionDetailsListView.View = System.Windows.Forms.View.Details;
+ this.exceptionDetailsListView.ItemMouseHover += new System.Windows.Forms.ListViewItemMouseHoverEventHandler(this.ExceptionDetailsListView_ItemMouseHover);
+ this.exceptionDetailsListView.DoubleClick += new System.EventHandler(this.ExceptionDetailsListView_DoubleClick);
+ //
+ // propertyColumnHeader
+ //
+ this.propertyColumnHeader.Text = "Property";
+ this.propertyColumnHeader.Width = 101;
+ //
+ // informationColumnHeader
+ //
+ this.informationColumnHeader.Text = "Information";
+ this.informationColumnHeader.Width = 350;
+ //
+ // exceptionDetailsLabel
+ //
+ this.exceptionDetailsLabel.AutoSize = true;
+ this.exceptionDetailsLabel.Location = new System.Drawing.Point(3, 92);
+ this.exceptionDetailsLabel.Name = "exceptionDetailsLabel";
+ this.exceptionDetailsLabel.Size = new System.Drawing.Size(265, 13);
+ this.exceptionDetailsLabel.TabIndex = 7;
+ this.exceptionDetailsLabel.Text = "Exception Details (double click on items to see details):";
+ //
+ // exceptionLabel
+ //
+ this.exceptionLabel.AutoSize = true;
+ this.exceptionLabel.Location = new System.Drawing.Point(3, 4);
+ this.exceptionLabel.Name = "exceptionLabel";
+ this.exceptionLabel.Size = new System.Drawing.Size(68, 13);
+ this.exceptionLabel.TabIndex = 6;
+ this.exceptionLabel.Text = "Exception(s):";
+ //
+ // exceptionTreeView
+ //
+ this.exceptionTreeView.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left)
+ | System.Windows.Forms.AnchorStyles.Right)));
+ this.exceptionTreeView.Location = new System.Drawing.Point(3, 22);
+ this.exceptionTreeView.Name = "exceptionTreeView";
+ this.exceptionTreeView.Size = new System.Drawing.Size(455, 60);
+ this.exceptionTreeView.TabIndex = 4;
+ this.exceptionTreeView.AfterSelect += new System.Windows.Forms.TreeViewEventHandler(this.ExceptionTreeView_AfterSelect);
+ //
+ // ExceptionDetails
+ //
+ this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F);
+ this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
+ this.Controls.Add(this.exceptionDetailsListView);
+ this.Controls.Add(this.exceptionDetailsLabel);
+ this.Controls.Add(this.exceptionLabel);
+ this.Controls.Add(this.exceptionTreeView);
+ this.Name = "ExceptionDetails";
+ this.Size = new System.Drawing.Size(461, 330);
+ this.ResumeLayout(false);
+ this.PerformLayout();
+
+ }
+
+ #endregion
+
+ private System.Windows.Forms.ListView exceptionDetailsListView;
+ private System.Windows.Forms.ColumnHeader propertyColumnHeader;
+ private System.Windows.Forms.ColumnHeader informationColumnHeader;
+ private System.Windows.Forms.Label exceptionDetailsLabel;
+ private System.Windows.Forms.Label exceptionLabel;
+ private System.Windows.Forms.TreeView exceptionTreeView;
+ private System.Windows.Forms.ToolTip toolTip;
+ }
+}
diff --git a/NBug/Core/UI/WinForms/Panels/ExceptionDetails.cs b/NBug/Core/UI/WinForms/Panels/ExceptionDetails.cs
new file mode 100644
index 0000000..1e86a60
--- /dev/null
+++ b/NBug/Core/UI/WinForms/Panels/ExceptionDetails.cs
@@ -0,0 +1,139 @@
+// --------------------------------------------------------------------------------------------------------------------
+//
+// Copyright (c) 2010 - 2011 Teoman Soygul. Licensed under LGPLv3 (http://www.gnu.org/licenses/lgpl.html).
+//
+// --------------------------------------------------------------------------------------------------------------------
+
+namespace NBug.Core.UI.WinForms.Panels
+{
+ using System;
+ using System.Collections.Generic;
+ using System.Drawing;
+ using System.Windows.Forms;
+
+ using NBug.Core.Util.Serialization;
+
+ internal partial class ExceptionDetails : UserControl
+ {
+ private readonly Dictionary exceptionDetailsList = new Dictionary();
+
+ public ExceptionDetails()
+ {
+ this.InitializeComponent();
+ }
+
+ public int InformationColumnWidth
+ {
+ get
+ {
+ return this.exceptionDetailsListView.Columns[1].Width;
+ }
+
+ set
+ {
+ this.exceptionDetailsListView.Columns[1].Width = value;
+ }
+ }
+
+ public int PropertyColumnWidth
+ {
+ get
+ {
+ return this.exceptionDetailsListView.Columns[0].Width;
+ }
+
+ set
+ {
+ this.exceptionDetailsListView.Columns[0].Width = value;
+ }
+ }
+
+ internal void Initialize(SerializableException exception)
+ {
+ this.exceptionDetailsList.Add(this.exceptionTreeView.Nodes.Add(exception.Type), exception);
+
+ if (exception.InnerException != null)
+ {
+ this.FillInnerExceptionTree(exception.InnerException, this.exceptionTreeView.Nodes[0]);
+ }
+
+ if (exception.InnerExceptions != null)
+ {
+ foreach (var innerException in exception.InnerExceptions)
+ {
+ this.FillInnerExceptionTree(innerException, this.exceptionTreeView.Nodes[0]);
+ }
+ }
+
+ this.exceptionTreeView.ExpandAll();
+ this.DisplayExceptionDetails(this.exceptionTreeView.Nodes[0]);
+ }
+
+ private void DisplayExceptionDetails(TreeNode node)
+ {
+ var exception = this.exceptionDetailsList[node];
+ this.exceptionDetailsListView.SuspendLayout();
+ this.exceptionDetailsListView.Items.Clear();
+
+ if (exception.Type != null) this.exceptionDetailsListView.Items.Add("Exception").SubItems.Add(exception.Type);
+ if (exception.Message != null) this.exceptionDetailsListView.Items.Add("Message").SubItems.Add(exception.Message);
+ if (exception.TargetSite != null) this.exceptionDetailsListView.Items.Add("Target Site").SubItems.Add(exception.TargetSite);
+ if (exception.InnerException != null) this.exceptionDetailsListView.Items.Add("Inner Exception").SubItems.Add(exception.InnerException.Type);
+ if (exception.Source != null) this.exceptionDetailsListView.Items.Add("Source").SubItems.Add(exception.Source);
+ if (exception.HelpLink != null) this.exceptionDetailsListView.Items.Add("Help Link").SubItems.Add(exception.HelpLink);
+ if (exception.StackTrace != null) this.exceptionDetailsListView.Items.Add("Stack Trace").SubItems.Add(exception.StackTrace);
+
+ if (exception.Data != null)
+ {
+ foreach (var pair in exception.Data)
+ {
+ this.exceptionDetailsListView.Items.Add(string.Format("Data[\"{0}\"]", pair.Key)).SubItems.Add(pair.Value.ToString());
+ }
+ }
+
+ if (exception.ExtendedInformation != null)
+ {
+ foreach (var info in exception.ExtendedInformation)
+ {
+ var item = this.exceptionDetailsListView.Items.Add(info.Key);
+ item.UseItemStyleForSubItems = false;
+ item.Font = new Font(this.Font, FontStyle.Bold);
+ item.SubItems.Add(info.Value.ToString());
+ }
+ }
+
+ this.exceptionDetailsListView.ResumeLayout();
+ }
+
+ private void ExceptionDetailsListView_DoubleClick(object sender, EventArgs e)
+ {
+ using (var detailView = new ExceptionDetailView())
+ {
+ detailView.ShowDialog(
+ this.exceptionDetailsListView.SelectedItems[0].Text,
+ this.exceptionDetailsListView.SelectedItems[0].SubItems[1].Text);
+ }
+ }
+
+ private void ExceptionDetailsListView_ItemMouseHover(object sender, ListViewItemMouseHoverEventArgs e)
+ {
+ this.toolTip.RemoveAll();
+ this.toolTip.Show(e.Item.SubItems[1].Text, this.exceptionDetailsListView);
+ }
+
+ private void ExceptionTreeView_AfterSelect(object sender, TreeViewEventArgs e)
+ {
+ this.DisplayExceptionDetails(e.Node);
+ }
+
+ private void FillInnerExceptionTree(SerializableException innerException, TreeNode innerNode)
+ {
+ this.exceptionDetailsList.Add(innerNode.Nodes.Add(innerException.Type), innerException);
+
+ if (innerException.InnerException != null)
+ {
+ this.FillInnerExceptionTree(innerException.InnerException, innerNode.Nodes[0]);
+ }
+ }
+ }
+}
diff --git a/NBug/Core/UI/WinForms/Panels/ExceptionDetails.resx b/NBug/Core/UI/WinForms/Panels/ExceptionDetails.resx
new file mode 100644
index 0000000..1ca1e9b
--- /dev/null
+++ b/NBug/Core/UI/WinForms/Panels/ExceptionDetails.resx
@@ -0,0 +1,123 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ text/microsoft-resx
+
+
+ 2.0
+
+
+ System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089
+
+
+ System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089
+
+
+ 17, 17
+
+
\ No newline at end of file
diff --git a/NBug/Core/UI/WinForms/WinFormsUI.cs b/NBug/Core/UI/WinForms/WinFormsUI.cs
new file mode 100644
index 0000000..d03e6ac
--- /dev/null
+++ b/NBug/Core/UI/WinForms/WinFormsUI.cs
@@ -0,0 +1,46 @@
+// --------------------------------------------------------------------------------------------------------------------
+//
+// Copyright (c) 2010 - 2011 Teoman Soygul. Licensed under LGPLv3 (http://www.gnu.org/licenses/lgpl.html).
+//
+// --------------------------------------------------------------------------------------------------------------------
+
+namespace NBug.Core.UI.WinForms
+{
+ using NBug.Core.Reporting.Info;
+ using NBug.Core.Util.Exceptions;
+ using NBug.Core.Util.Serialization;
+ using NBug.Enums;
+
+ ///
+ /// This class is used to prevent statically referencing any WinForms dll from the UISelector.cs thus prevents
+ /// any unnecessary assembly from getting loaded into the memory.
+ ///
+ internal static class WinFormsUI
+ {
+ 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.");
+ }
+ }
+ }
+}
diff --git a/NBug/Core/Util/ExceptionThread.cs b/NBug/Core/Util/ExceptionThread.cs
new file mode 100644
index 0000000..30f6360
--- /dev/null
+++ b/NBug/Core/Util/ExceptionThread.cs
@@ -0,0 +1,10 @@
+namespace NBug.Core.Util
+{
+ internal enum ExceptionThread
+ {
+ Main,
+ UI_WinForms,
+ UI_WPF,
+ Task
+ }
+}
diff --git a/NBug/Core/Util/Exceptions/NBugConfigurationException.cs b/NBug/Core/Util/Exceptions/NBugConfigurationException.cs
new file mode 100644
index 0000000..b79b94a
--- /dev/null
+++ b/NBug/Core/Util/Exceptions/NBugConfigurationException.cs
@@ -0,0 +1,32 @@
+// --------------------------------------------------------------------------------------------------------------------
+//
+// Copyright (c) 2010 - 2011 Teoman Soygul. Licensed under LGPLv3 (http://www.gnu.org/licenses/lgpl.html).
+//
+// --------------------------------------------------------------------------------------------------------------------
+
+namespace NBug.Core.Util.Exceptions
+{
+ using System;
+ using System.Linq.Expressions;
+
+ [Serializable]
+ public class NBugConfigurationException : NBugException
+ {
+ public NBugConfigurationException(string message, Exception inner) : base(message, inner)
+ {
+ this.MisconfiguredProperty = string.Empty;
+ }
+
+ private NBugConfigurationException(string propertyName, string message) : base(message)
+ {
+ this.MisconfiguredProperty = propertyName;
+ }
+
+ public string MisconfiguredProperty { get; set; }
+
+ public static NBugConfigurationException Create(Expression> propertyExpression, string message)
+ {
+ return new NBugConfigurationException(((MemberExpression)propertyExpression.Body).Member.Name, message);
+ }
+ }
+}
diff --git a/NBug/Core/Util/Exceptions/NBugException.cs b/NBug/Core/Util/Exceptions/NBugException.cs
new file mode 100644
index 0000000..bf783c6
--- /dev/null
+++ b/NBug/Core/Util/Exceptions/NBugException.cs
@@ -0,0 +1,31 @@
+// --------------------------------------------------------------------------------------------------------------------
+//
+// Copyright (c) 2010 - 2011 Teoman Soygul. Licensed under LGPLv3 (http://www.gnu.org/licenses/lgpl.html).
+//
+// --------------------------------------------------------------------------------------------------------------------
+
+namespace NBug.Core.Util.Exceptions
+{
+ using System;
+ using System.Runtime.Serialization;
+
+ [Serializable]
+ public class NBugException : Exception
+ {
+ public NBugException()
+ {
+ }
+
+ public NBugException(string message) : base(message)
+ {
+ }
+
+ public NBugException(string message, Exception inner) : base(message, inner)
+ {
+ }
+
+ protected NBugException(SerializationInfo info, StreamingContext context) : base(info, context)
+ {
+ }
+ }
+}
diff --git a/NBug/Core/Util/Exceptions/NBugRuntimeException.cs b/NBug/Core/Util/Exceptions/NBugRuntimeException.cs
new file mode 100644
index 0000000..7977787
--- /dev/null
+++ b/NBug/Core/Util/Exceptions/NBugRuntimeException.cs
@@ -0,0 +1,22 @@
+// --------------------------------------------------------------------------------------------------------------------
+//
+// Copyright (c) 2010 - 2011 Teoman Soygul. Licensed under LGPLv3 (http://www.gnu.org/licenses/lgpl.html).
+//
+// --------------------------------------------------------------------------------------------------------------------
+
+namespace NBug.Core.Util.Exceptions
+{
+ using System;
+
+ [Serializable]
+ public class NBugRuntimeException : NBugException
+ {
+ public NBugRuntimeException(string message, Exception inner) : base(message, inner)
+ {
+ }
+
+ public NBugRuntimeException(string message) : base(message)
+ {
+ }
+ }
+}
diff --git a/NBug/Core/Util/Logging/Logger.cs b/NBug/Core/Util/Logging/Logger.cs
new file mode 100644
index 0000000..2fdec0f
--- /dev/null
+++ b/NBug/Core/Util/Logging/Logger.cs
@@ -0,0 +1,138 @@
+// --------------------------------------------------------------------------------------------------------------------
+//
+// Copyright (c) 2010 - 2011 Teoman Soygul. Licensed under LGPLv3 (http://www.gnu.org/licenses/lgpl.html).
+//
+// --------------------------------------------------------------------------------------------------------------------
+
+namespace NBug.Core.Util.Logging
+{
+ using System;
+ using System.IO;
+ using System.Linq.Expressions;
+
+ using NBug.Core.UI.Developer;
+ using NBug.Core.Util.Exceptions;
+ using NBug.Enums;
+
+ ///
+ /// Uses method to log important messages. Also provides a
+ /// event. If is set to true, a default "NBug.log" file is written to disk.
+ ///
+ ///
+ /// A sample trace listener can easily be added to the current application with an app.config file looking as below:
+ ///
+ /// {?xml version="1.0"?}
+ /// {configuration}
+ /// {configSections}
+ /// {/configSections}
+ /// {system.diagnostics}
+ /// {trace autoflush="true" indentsize="2"}
+ /// {listeners}
+ /// {add name="testAppListener" type="System.Diagnostics.TextWriterTraceListener" initializeData="MyApplication.log" /}
+ /// {/listeners}
+ /// {/trace}
+ /// {/system.diagnostics}
+ /// {/configuration}
+ ///
+ ///
+ internal static class Logger
+ {
+ static Logger()
+ {
+ if (Settings.WriteLogToDisk)
+ {
+ LogWritten += (message, category) => File.AppendAllText(Path.Combine(Settings.NBugDirectory, "NBug.log"), category + ": " + message + Environment.NewLine);
+ }
+ }
+
+ ///
+ /// First parameters is message string, second one is the category.
+ ///
+ internal static event Action LogWritten;
+
+ internal static void Trace(string message)
+ {
+ Write(message, LoggerCategory.NBugTrace);
+ }
+
+ internal static void Info(string message)
+ {
+ Write(message, LoggerCategory.NBugInfo);
+ }
+
+ internal static void Warning(string message)
+ {
+ Write(message, LoggerCategory.NBugWarning);
+ }
+
+ internal static void Error(string message)
+ {
+ Write(message, LoggerCategory.NBugError);
+
+ if (Settings.DisplayDeveloperUI)
+ {
+ using (var viewer = new InternalExceptionViewer())
+ {
+ viewer.ShowDialog(new NBugRuntimeException(message));
+ }
+ }
+
+ if (Settings.ThrowExceptions)
+ {
+ throw new NBugRuntimeException(message);
+ }
+ }
+
+ internal static void Error(string message, Exception exception)
+ {
+ Write(message + Environment.NewLine + "Exception: " + exception, LoggerCategory.NBugError);
+
+ if (Settings.DisplayDeveloperUI)
+ {
+ using (var viewer = new InternalExceptionViewer())
+ {
+ viewer.ShowDialog(exception);
+ }
+ }
+
+ if (Settings.ThrowExceptions)
+ {
+ throw new NBugRuntimeException(message, exception);
+ }
+ }
+
+ internal static void Error(Expression> propertyExpression, string message)
+ {
+ Write(message + " Misconfigured Property: " + ((MemberExpression)propertyExpression.Body).Member.Name, LoggerCategory.NBugError);
+
+ if (Settings.DisplayDeveloperUI)
+ {
+ using (var viewer = new InternalExceptionViewer())
+ {
+ viewer.ShowDialog(NBugConfigurationException.Create(propertyExpression, message));
+ }
+ }
+
+ if (Settings.ThrowExceptions)
+ {
+ throw NBugConfigurationException.Create(propertyExpression, message);
+ }
+ }
+
+ private static void Write(string message, LoggerCategory category)
+ {
+ System.Diagnostics.Trace.Write(message + Environment.NewLine, category.ToString());
+
+ if (Settings.DisplayDeveloperUI)
+ {
+ // InternalLogViewer.LogEntry(message, category);
+ }
+
+ var handler = LogWritten;
+ if (handler != null)
+ {
+ handler(message, category);
+ }
+ }
+ }
+}
diff --git a/NBug/Core/Util/ProtectedConfiguration.cs b/NBug/Core/Util/ProtectedConfiguration.cs
new file mode 100644
index 0000000..c0d6dc9
--- /dev/null
+++ b/NBug/Core/Util/ProtectedConfiguration.cs
@@ -0,0 +1,89 @@
+namespace NBug.Core.Util
+{
+ internal class ProtectedConfiguration
+ {
+ /* Below is used to load custom app.config files:
+ * System.Configuration.ConfigurationManager.OpenExeConfiguration(string exePath)
+ */
+
+ /*internal static void ProtectConfiguration()
+ {
+ // Get the application configuration file.
+ Configuration config = ConfigurationManager.OpenExeConfiguration(ConfigurationUserLevel.None);
+
+ // Get the section to protect.
+ ConfigurationSection connStrings = config.ConnectionStrings;
+
+ if (connStrings != null)
+ {
+ if (!connStrings.SectionInformation.IsProtected)
+ {
+ if (!connStrings.ElementInformation.IsLocked)
+ {
+ // Protect the section.
+ connStrings.SectionInformation.ProtectSection("RsaProtectedConfigurationProvider");
+
+ connStrings.SectionInformation.ForceSave = true;
+ config.Save(ConfigurationSaveMode.Full);
+
+ Logger.Info(String.Format("Section {0} is now protected by {1}", connStrings.SectionInformation.Name, connStrings.SectionInformation.ProtectionProvider.Name));
+ }
+ else
+ {
+ Logger.Warning(String.Format("Can't protect, section {0} is locked", connStrings.SectionInformation.Name));
+ }
+ }
+ else
+ {
+ Logger.Info(String.Format("Section {0} is already protected by {1}", connStrings.SectionInformation.Name, connStrings.SectionInformation.ProtectionProvider.Name));
+ }
+ }
+ else
+ {
+ Logger.Error(String.Format("Can't get the section {0}", connStrings.SectionInformation.Name));
+ }
+ }
+
+ ///
+ /// Restores the unprotected state of the configuration file, connectionStrings section.
+ ///
+ /// There is no need to manually decrypt
+ internal static void UnProtectConfiguration()
+ {
+ // Get the application configuration file.
+ Configuration config = ConfigurationManager.OpenExeConfiguration(ConfigurationUserLevel.None);
+
+ // Get the section to unprotect.
+ ConfigurationSection connStrings = config.ConnectionStrings;
+
+ if (connStrings != null)
+ {
+ if (connStrings.SectionInformation.IsProtected)
+ {
+ if (!connStrings.ElementInformation.IsLocked)
+ {
+ // Unprotect the section.
+ connStrings.SectionInformation.UnprotectSection();
+
+ connStrings.SectionInformation.ForceSave = true;
+ config.Save(ConfigurationSaveMode.Full);
+
+ Logger.Info(String.Format("Section {0} is now unprotected.", connStrings.SectionInformation.Name));
+ }
+ else
+ {
+ Logger.Warning(String.Format("Can't unprotect, section {0} is locked", connStrings.SectionInformation.Name));
+ }
+ }
+ else
+ {
+ Logger.Info(String.Format("Section {0} is already unprotected.", connStrings.SectionInformation.Name));
+ }
+ }
+ else
+ {
+ Logger.Error(String.Format("Can't get the section {0}", connStrings.SectionInformation.Name));
+ }
+ }*/
+ }
+}
diff --git a/NBug/Core/Util/PublicResources.cs b/NBug/Core/Util/PublicResources.cs
new file mode 100644
index 0000000..aea60fd
--- /dev/null
+++ b/NBug/Core/Util/PublicResources.cs
@@ -0,0 +1,237 @@
+// --------------------------------------------------------------------------------------------------------------------
+//
+// Copyright (c) 2010 - 2011 Teoman Soygul. Licensed under LGPLv3 (http://www.gnu.org/licenses/lgpl.html).
+//
+// --------------------------------------------------------------------------------------------------------------------
+
+namespace NBug.Core.Util
+{
+ using NBug.Properties;
+
+ public class PublicResources
+ {
+ private string ui_Console_Full_Message;
+ public string UI_Console_Full_Message
+ {
+ get
+ {
+ return this.ui_Console_Full_Message ?? Localization.UI_Console_Full_Message;
+ }
+
+ set
+ {
+ this.ui_Console_Full_Message = value;
+ }
+ }
+
+ private string ui_Console_Minimal_Message;
+ public string UI_Console_Minimal_Message
+ {
+ get
+ {
+ return this.ui_Console_Minimal_Message ?? Localization.UI_Console_Minimal_Message;
+ }
+
+ set
+ {
+ this.ui_Console_Minimal_Message = value;
+ }
+ }
+
+ private string ui_Console_Normal_Message;
+ public string UI_Console_Normal_Message
+ {
+ get
+ {
+ return this.ui_Console_Normal_Message ?? Localization.UI_Console_Normal_Message;
+ }
+
+ set
+ {
+ this.ui_Console_Normal_Message = value;
+ }
+ }
+
+ private string ui_Dialog_Minimal_Message;
+ public string UI_Dialog_Minimal_Message
+ {
+ get
+ {
+ return this.ui_Dialog_Minimal_Message ?? Localization.UI_Dialog_Minimal_Message;
+ }
+
+ set
+ {
+ this.ui_Dialog_Minimal_Message = value;
+ }
+ }
+
+ private string ui_Dialog_Normal_Message;
+ public string UI_Dialog_Normal_Message
+ {
+ get
+ {
+ return this.ui_Dialog_Normal_Message ?? Localization.UI_Dialog_Normal_Message;
+ }
+
+ set
+ {
+ this.ui_Dialog_Normal_Message = value;
+ }
+ }
+
+ private string ui_Dialog_Normal_Title;
+ public string UI_Dialog_Normal_Title
+ {
+ get
+ {
+ return this.ui_Dialog_Normal_Title ?? Localization.UI_Dialog_Normal_Title;
+ }
+
+ set
+ {
+ this.ui_Dialog_Normal_Title = value;
+ }
+ }
+
+ private string ui_Dialog_Normal_Continue_Button;
+ public string UI_Dialog_Normal_Continue_Button
+ {
+ get
+ {
+ return this.ui_Dialog_Normal_Continue_Button ?? Localization.UI_Dialog_Normal_Continue_Button;
+ }
+
+ set
+ {
+ this.ui_Dialog_Normal_Continue_Button = value;
+ }
+ }
+
+ private string ui_Dialog_Normal_Quit_Button;
+ public string UI_Dialog_Normal_Quit_Button
+ {
+ get
+ {
+ return this.ui_Dialog_Normal_Quit_Button ?? Localization.UI_Dialog_Normal_Quit_Button;
+ }
+
+ set
+ {
+ this.ui_Dialog_Normal_Quit_Button = value;
+ }
+ }
+
+ private string ui_Dialog_Full_Message;
+ public string UI_Dialog_Full_Message
+ {
+ get
+ {
+ return this.ui_Dialog_Full_Message ?? Localization.UI_Dialog_Full_Message;
+ }
+
+ set
+ {
+ this.ui_Dialog_Full_Message = value;
+ }
+ }
+
+ private string ui_Dialog_Full_Title;
+ public string UI_Dialog_Full_Title
+ {
+ get
+ {
+ return this.ui_Dialog_Full_Title ?? Localization.UI_Dialog_Full_Title;
+ }
+
+ set
+ {
+ this.ui_Dialog_Full_Title = value;
+ }
+ }
+
+ private string ui_Dialog_Full_General_Tab;
+ public string UI_Dialog_Full_General_Tab
+ {
+ get
+ {
+ return this.ui_Dialog_Full_General_Tab ?? Localization.UI_Dialog_Full_General_Tab;
+ }
+
+ set
+ {
+ this.ui_Dialog_Full_General_Tab = value;
+ }
+ }
+
+ private string ui_Dialog_Full_Exception_Tab;
+ public string UI_Dialog_Full_Exception_Tab
+ {
+ get
+ {
+ return this.ui_Dialog_Full_Exception_Tab ?? Localization.UI_Dialog_Full_Exception_Tab;
+ }
+
+ set
+ {
+ this.ui_Dialog_Full_Exception_Tab = value;
+ }
+ }
+
+ private string ui_Dialog_Full_Report_Contents_Tab;
+ public string UI_Dialog_Full_Report_Contents_Tab
+ {
+ get
+ {
+ return this.ui_Dialog_Full_Report_Contents_Tab ?? Localization.UI_Dialog_Full_Report_Contents_Tab;
+ }
+
+ set
+ {
+ this.ui_Dialog_Full_Report_Contents_Tab = value;
+ }
+ }
+
+ private string ui_Dialog_Full_How_to_Reproduce_the_Error_Notification;
+ public string UI_Dialog_Full_How_to_Reproduce_the_Error_Notification
+ {
+ get
+ {
+ return this.ui_Dialog_Full_How_to_Reproduce_the_Error_Notification ?? Localization.UI_Dialog_Full_How_to_Reproduce_the_Error_Notification;
+ }
+
+ set
+ {
+ this.ui_Dialog_Full_How_to_Reproduce_the_Error_Notification = value;
+ }
+ }
+
+ private string ui_Dialog_Full_Quit_Button;
+ public string UI_Dialog_Full_Quit_Button
+ {
+ get
+ {
+ return this.ui_Dialog_Full_Quit_Button ?? Localization.UI_Dialog_Full_Quit_Button;
+ }
+
+ set
+ {
+ this.ui_Dialog_Full_Quit_Button = value;
+ }
+ }
+
+ private string ui_Dialog_Full_Send_and_Quit_Button;
+ public string UI_Dialog_Full_Send_and_Quit_Button
+ {
+ get
+ {
+ return this.ui_Dialog_Full_Send_and_Quit_Button ?? Localization.UI_Dialog_Full_Send_and_Quit_Button;
+ }
+
+ set
+ {
+ this.ui_Dialog_Full_Send_and_Quit_Button = value;
+ }
+ }
+ }
+}
diff --git a/NBug/Core/Util/Serialization/SerializableDictionary.cs b/NBug/Core/Util/Serialization/SerializableDictionary.cs
new file mode 100644
index 0000000..69580fd
--- /dev/null
+++ b/NBug/Core/Util/Serialization/SerializableDictionary.cs
@@ -0,0 +1,73 @@
+// --------------------------------------------------------------------------------------------------------------------
+//
+// Copyright (c) 2010 - 2011 Teoman Soygul. Licensed under LGPLv3 (http://www.gnu.org/licenses/lgpl.html).
+//
+// --------------------------------------------------------------------------------------------------------------------
+
+namespace NBug.Core.Util.Serialization
+{
+ using System;
+ using System.Collections.Generic;
+ using System.Xml;
+ using System.Xml.Linq;
+ using System.Xml.Schema;
+ using System.Xml.Serialization;
+
+ [Serializable]
+ [XmlRoot("dictionary")]
+ public class SerializableDictionary : Dictionary, IXmlSerializable
+ {
+ ///
+ /// Initializes a new instance of the class.
+ /// This is the default constructor provided for XML serializer.
+ ///
+ public SerializableDictionary()
+ {
+ }
+
+ public SerializableDictionary(IDictionary dictionary)
+ {
+ if (dictionary == null)
+ {
+ throw new ArgumentNullException();
+ }
+
+ foreach (var pair in dictionary)
+ {
+ this.Add(pair.Key, pair.Value);
+ }
+ }
+
+ public XmlSchema GetSchema()
+ {
+ return null;
+ }
+
+ public void ReadXml(XmlReader reader)
+ {
+ /*if (reader.IsEmptyElement)
+ {
+ return;
+ }*/
+
+ var xElement = XElement.Load(reader.ReadSubtree());
+ if (xElement.HasElements)
+ {
+ foreach (var element in xElement.Elements())
+ {
+ this.Add((TKey)Convert.ChangeType(element.Name.ToString(), typeof(TKey)), (TValue)Convert.ChangeType(element.Value, typeof(TValue)));
+ }
+ }
+ }
+
+ public void WriteXml(XmlWriter writer)
+ {
+ foreach (var key in this.Keys)
+ {
+ writer.WriteStartElement(key.ToString());
+ writer.WriteValue(this[key]);
+ writer.WriteEndElement();
+ }
+ }
+ }
+}
diff --git a/NBug/Core/Util/Serialization/SerializableException.cs b/NBug/Core/Util/Serialization/SerializableException.cs
new file mode 100644
index 0000000..ac6a4ba
--- /dev/null
+++ b/NBug/Core/Util/Serialization/SerializableException.cs
@@ -0,0 +1,141 @@
+// --------------------------------------------------------------------------------------------------------------------
+//
+// Copyright (c) 2010 - 2011 Teoman Soygul. Licensed under LGPLv3 (http://www.gnu.org/licenses/lgpl.html).
+//
+// --------------------------------------------------------------------------------------------------------------------
+
+namespace NBug.Core.Util.Serialization
+{
+ using System;
+ using System.Collections;
+ using System.Collections.Generic;
+ using System.Linq;
+
+ [Serializable]
+ public class SerializableException
+ {
+ ///
+ /// Initializes a new instance of the class.
+ /// Default constructor provided for XML serialization and de-serialization.
+ ///
+ public SerializableException()
+ {
+ }
+
+ public SerializableException(Exception exception)
+ {
+ if (exception == null)
+ {
+ throw new ArgumentNullException();
+ }
+
+ this.Type = exception.GetType().ToString();
+
+ if (exception.Data.Count != 0)
+ {
+ foreach (DictionaryEntry entry in exception.Data)
+ {
+ if (entry.Value != null)
+ {
+ // Assign 'Data' property only if there is at least one entry with non-null value
+ if (this.Data == null)
+ {
+ this.Data = new SerializableDictionary