diff --git a/GlobalAssemblyInfo.cs b/GlobalAssemblyInfo.cs index ff4bffc..1c0c5aa 100644 --- a/GlobalAssemblyInfo.cs +++ b/GlobalAssemblyInfo.cs @@ -4,11 +4,10 @@ // // -------------------------------------------------------------------------------------------------------------------- - using System; using System.Reflection; -// General Information about an assembly is controlled through the following +// 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("")] @@ -23,11 +22,11 @@ /* * 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 + * 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 + * 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. */ @@ -35,10 +34,10 @@ // Version information for an assembly consists of the following four values: // Major Version -// Minor Version +// Minor Version // Build Number // Revision -// You can specify all the values or you can default the Build and Revision Numbers +// 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")] @@ -47,15 +46,14 @@ // 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 +/* + * 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 + * + * 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.Configurator/Normal.Designer.cs b/NBug.Configurator/CustomPreviewForm.Designer.cs similarity index 99% rename from NBug.Configurator/Normal.Designer.cs rename to NBug.Configurator/CustomPreviewForm.Designer.cs index 3a290cf..3c55f2e 100644 --- a/NBug.Configurator/Normal.Designer.cs +++ b/NBug.Configurator/CustomPreviewForm.Designer.cs @@ -1,6 +1,6 @@ namespace NBug.Configurator { - partial class Normal + partial class CustomPreviewForm { /// /// Required designer variable. diff --git a/NBug.Configurator/Normal.cs b/NBug.Configurator/CustomPreviewForm.cs similarity index 90% rename from NBug.Configurator/Normal.cs rename to NBug.Configurator/CustomPreviewForm.cs index b91551d..93f7585 100644 --- a/NBug.Configurator/Normal.cs +++ b/NBug.Configurator/CustomPreviewForm.cs @@ -6,19 +6,18 @@ namespace NBug.Configurator { + using NBug.Core.Reporting.Info; + using NBug.Core.UI; using System; - using System.Drawing; using System.Windows.Forms; - using NBug.Core.UI; - using NBug.Core.Reporting.Info; - internal partial class Normal : Form + internal partial class CustomPreviewForm : Form { private UIDialogResult uiDialogResult; - internal Normal() + internal CustomPreviewForm() { - InitializeComponent(); + InitializeComponent(); } internal UIDialogResult ShowDialog(Report report) @@ -43,4 +42,4 @@ private void QuitButton_Click(object sender, EventArgs e) this.Close(); } } -} +} \ No newline at end of file diff --git a/NBug.Configurator/Normal.resx b/NBug.Configurator/CustomPreviewForm.resx similarity index 100% rename from NBug.Configurator/Normal.resx rename to NBug.Configurator/CustomPreviewForm.resx diff --git a/NBug.Configurator/MainForm.Designer.cs b/NBug.Configurator/MainForm.Designer.cs index 1de070d..c6eeec4 100644 --- a/NBug.Configurator/MainForm.Designer.cs +++ b/NBug.Configurator/MainForm.Designer.cs @@ -28,563 +28,548 @@ protected override void Dispose(bool disposing) /// 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.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.destinationsToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem(); - this.addToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem(); - 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.addDestinationButton = new System.Windows.Forms.Button(); - this.panelLoader1 = new NBug.Configurator.SubmitPanels.PanelLoader(); - 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.mainMenuStrip.SuspendLayout(); - this.settingsFileGroupBox.SuspendLayout(); - this.SuspendLayout(); - // - // mainStatusStrip - // - this.mainStatusStrip.Items.AddRange(new System.Windows.Forms.ToolStripItem[] { + 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.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.destinationsToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem(); + this.addToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem(); + 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.addDestinationButton = new System.Windows.Forms.Button(); + 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.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.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" + + 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.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" + + 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\'" + + 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" + + // + // 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 " + + // + // 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" + + // + // 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; - // - // fileToolStripMenuItem1 - // - this.fileToolStripMenuItem1.DropDownItems.AddRange(new System.Windows.Forms.ToolStripItem[] { + // + // 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"); + // + // fileToolStripMenuItem1 + // + this.fileToolStripMenuItem1.DropDownItems.AddRange(new System.Windows.Forms.ToolStripItem[] { this.newToolStripMenuItem, this.openToolStripMenuItem, this.toolStripSeparator, @@ -594,371 +579,359 @@ private void InitializeComponent() this.importToolStripMenuItem, this.toolStripSeparator2, this.exitToolStripMenuItem}); - this.fileToolStripMenuItem1.Name = "fileToolStripMenuItem1"; - this.fileToolStripMenuItem1.Size = new System.Drawing.Size(37, 20); - this.fileToolStripMenuItem1.Text = "&File"; - // - // newToolStripMenuItem - // - this.newToolStripMenuItem.DropDownItems.AddRange(new System.Windows.Forms.ToolStripItem[] { + this.fileToolStripMenuItem1.Name = "fileToolStripMenuItem1"; + this.fileToolStripMenuItem1.Size = new System.Drawing.Size(37, 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(146, 22); - this.newToolStripMenuItem.Text = "&New"; - // - // externalToolStripMenuItem - // - this.externalToolStripMenuItem.Name = "externalToolStripMenuItem"; - this.externalToolStripMenuItem.Size = new System.Drawing.Size(199, 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(199, 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(146, 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(143, 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(146, 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(146, 22); - this.saveAsToolStripMenuItem.Text = "Save &As"; - this.saveAsToolStripMenuItem.Visible = false; - // - // toolStripSeparator1 - // - this.toolStripSeparator1.Name = "toolStripSeparator1"; - this.toolStripSeparator1.Size = new System.Drawing.Size(143, 6); - this.toolStripSeparator1.Visible = false; - // - // importToolStripMenuItem - // - this.importToolStripMenuItem.Name = "importToolStripMenuItem"; - this.importToolStripMenuItem.Size = new System.Drawing.Size(146, 22); - this.importToolStripMenuItem.Text = "&Import"; - this.importToolStripMenuItem.Visible = false; - // - // toolStripSeparator2 - // - this.toolStripSeparator2.Name = "toolStripSeparator2"; - this.toolStripSeparator2.Size = new System.Drawing.Size(143, 6); - // - // exitToolStripMenuItem - // - this.exitToolStripMenuItem.Name = "exitToolStripMenuItem"; - this.exitToolStripMenuItem.Size = new System.Drawing.Size(146, 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.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(152, 22); + this.newToolStripMenuItem.Text = "&New"; + // + // externalToolStripMenuItem + // + this.externalToolStripMenuItem.Name = "externalToolStripMenuItem"; + this.externalToolStripMenuItem.Size = new System.Drawing.Size(199, 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(199, 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(152, 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(149, 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(152, 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(152, 22); + this.saveAsToolStripMenuItem.Text = "Save &As"; + this.saveAsToolStripMenuItem.Visible = false; + // + // toolStripSeparator1 + // + this.toolStripSeparator1.Name = "toolStripSeparator1"; + this.toolStripSeparator1.Size = new System.Drawing.Size(149, 6); + this.toolStripSeparator1.Visible = false; + // + // importToolStripMenuItem + // + this.importToolStripMenuItem.Name = "importToolStripMenuItem"; + this.importToolStripMenuItem.Size = new System.Drawing.Size(152, 22); + this.importToolStripMenuItem.Text = "&Import"; + this.importToolStripMenuItem.Visible = false; + // + // toolStripSeparator2 + // + this.toolStripSeparator2.Name = "toolStripSeparator2"; + this.toolStripSeparator2.Size = new System.Drawing.Size(149, 6); + // + // exitToolStripMenuItem + // + this.exitToolStripMenuItem.Name = "exitToolStripMenuItem"; + this.exitToolStripMenuItem.Size = new System.Drawing.Size(152, 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(48, 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(185, 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.toolsToolStripMenuItem.Name = "toolsToolStripMenuItem"; + this.toolsToolStripMenuItem.Size = new System.Drawing.Size(48, 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(185, 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(44, 20); - this.helpToolStripMenuItem.Text = "&Help"; - // - // projectHomeToolStripMenuItem - // - this.projectHomeToolStripMenuItem.Name = "projectHomeToolStripMenuItem"; - this.projectHomeToolStripMenuItem.Size = new System.Drawing.Size(195, 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(195, 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(195, 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(195, 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(192, 6); - // - // aboutToolStripMenuItem - // - this.aboutToolStripMenuItem.Image = global::NBug.Configurator.Properties.Resources.Icon_16; - this.aboutToolStripMenuItem.Name = "aboutToolStripMenuItem"; - this.aboutToolStripMenuItem.Size = new System.Drawing.Size(195, 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.helpToolStripMenuItem.Name = "helpToolStripMenuItem"; + this.helpToolStripMenuItem.Size = new System.Drawing.Size(44, 20); + this.helpToolStripMenuItem.Text = "&Help"; + // + // projectHomeToolStripMenuItem + // + this.projectHomeToolStripMenuItem.Name = "projectHomeToolStripMenuItem"; + this.projectHomeToolStripMenuItem.Size = new System.Drawing.Size(195, 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(195, 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(195, 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(195, 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(192, 6); + // + // aboutToolStripMenuItem + // + this.aboutToolStripMenuItem.Image = global::NBug.Configurator.Properties.Resources.Icon_16; + this.aboutToolStripMenuItem.Name = "aboutToolStripMenuItem"; + this.aboutToolStripMenuItem.Size = new System.Drawing.Size(195, 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.destinationsToolStripMenuItem, 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; - // - // destinationsToolStripMenuItem - // - this.destinationsToolStripMenuItem.DropDownItems.AddRange(new System.Windows.Forms.ToolStripItem[] { + 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; + // + // destinationsToolStripMenuItem + // + this.destinationsToolStripMenuItem.DropDownItems.AddRange(new System.Windows.Forms.ToolStripItem[] { this.addToolStripMenuItem}); - this.destinationsToolStripMenuItem.Name = "destinationsToolStripMenuItem"; - this.destinationsToolStripMenuItem.Size = new System.Drawing.Size(84, 20); - this.destinationsToolStripMenuItem.Text = "&Destinations"; - // - // addToolStripMenuItem - // - this.addToolStripMenuItem.Name = "addToolStripMenuItem"; - this.addToolStripMenuItem.Size = new System.Drawing.Size(152, 22); - this.addToolStripMenuItem.Text = "&Add"; - this.addToolStripMenuItem.Click += new System.EventHandler(this.AddDestinationButton_Click); - // - // 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 = 20000; - 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"; - // - // addDestinationButton - // - this.addDestinationButton.Enabled = false; - this.addDestinationButton.Location = new System.Drawing.Point(12, 439); - this.addDestinationButton.Name = "addDestinationButton"; - this.addDestinationButton.Size = new System.Drawing.Size(98, 23); - this.addDestinationButton.TabIndex = 23; - this.addDestinationButton.Text = "Add destination"; - this.addDestinationButton.UseVisualStyleBackColor = true; - this.addDestinationButton.Click += new System.EventHandler(this.AddDestinationButton_Click); - // - // 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; - // - // 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.addDestinationButton); - 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.mainMenuStrip.ResumeLayout(false); - this.mainMenuStrip.PerformLayout(); - this.settingsFileGroupBox.ResumeLayout(false); - this.settingsFileGroupBox.PerformLayout(); - this.ResumeLayout(false); - this.PerformLayout(); + this.destinationsToolStripMenuItem.Name = "destinationsToolStripMenuItem"; + this.destinationsToolStripMenuItem.Size = new System.Drawing.Size(84, 20); + this.destinationsToolStripMenuItem.Text = "&Destinations"; + // + // addToolStripMenuItem + // + this.addToolStripMenuItem.Name = "addToolStripMenuItem"; + this.addToolStripMenuItem.Size = new System.Drawing.Size(96, 22); + this.addToolStripMenuItem.Text = "&Add"; + this.addToolStripMenuItem.Click += new System.EventHandler(this.AddDestinationButton_Click); + // + // 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 = 20000; + 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"; + // + // addDestinationButton + // + this.addDestinationButton.Enabled = false; + this.addDestinationButton.Location = new System.Drawing.Point(12, 439); + this.addDestinationButton.Name = "addDestinationButton"; + this.addDestinationButton.Size = new System.Drawing.Size(98, 23); + this.addDestinationButton.TabIndex = 23; + this.addDestinationButton.Text = "Add destination"; + this.addDestinationButton.UseVisualStyleBackColor = true; + this.addDestinationButton.Click += new System.EventHandler(this.AddDestinationButton_Click); + // + // 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.addDestinationButton); + 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.mainMenuStrip.ResumeLayout(false); + this.mainMenuStrip.PerformLayout(); + this.settingsFileGroupBox.ResumeLayout(false); + this.settingsFileGroupBox.PerformLayout(); + this.ResumeLayout(false); + this.PerformLayout(); } @@ -966,8 +939,7 @@ private void InitializeComponent() 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.TabPage generalTabPage; private System.Windows.Forms.ToolStripMenuItem fileToolStripMenuItem1; private System.Windows.Forms.ToolStripMenuItem newToolStripMenuItem; private System.Windows.Forms.ToolStripMenuItem openToolStripMenuItem; @@ -1018,8 +990,7 @@ private void InitializeComponent() 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.OpenFileDialog openFileDialog; private System.Windows.Forms.ToolStripStatusLabel status; private System.Windows.Forms.CheckBox encryptConnectionStringsCheckBox; private System.Windows.Forms.GroupBox reportingGroupBox; diff --git a/NBug.Configurator/MainForm.cs b/NBug.Configurator/MainForm.cs index f805e12..dd920b2 100644 --- a/NBug.Configurator/MainForm.cs +++ b/NBug.Configurator/MainForm.cs @@ -6,13 +6,18 @@ namespace NBug.Configurator { + using NBug.Configurator.SubmitPanels; + using NBug.Enums; + using NBug.Core.Util; + using NBug.Core.Submission; + /* 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 - */ + * + * 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.Collections.Generic; @@ -22,13 +27,9 @@ namespace NBug.Configurator using System.Linq; using System.Windows.Forms; - - using NBug.Configurator.SubmitPanels; - using NBug.Enums; - public partial class MainForm : Form { - private ICollection panelLoaders = new Collection(); + private readonly ICollection panelLoaders = new Collection(); private FileStream settingsFile; @@ -39,14 +40,15 @@ public MainForm() NBug.Settings.CustomUIEvent += Settings_CustomUIEvent; this.openFileDialog.InitialDirectory = Environment.CurrentDirectory; this.createFileDialog.InitialDirectory = Environment.CurrentDirectory; - panelLoaders.Add(this.panelLoader1); + NBug.Settings.Destinations.Clear(); } - void Settings_CustomUIEvent(object sender, CustomUIEventArgs e) + private void Settings_CustomUIEvent(object sender, CustomUIEventArgs e) { - var Form = new Normal(); + var Form = new CustomPreviewForm(); e.Result = Form.ShowDialog(e.Report); } + /// /// Enables disabled controls and fills in combo boxes using related enumerations. Resets all values to defaults. /// @@ -80,7 +82,7 @@ private void InitializeControls() { loader.UnloadPanel(); } - + this.sleepBeforeSendNumericUpDown.Maximum = decimal.MaxValue; this.maxQueuedReportsNumericUpDown.Maximum = decimal.MaxValue; this.stopReportingAfterNumericUpDown.Maximum = decimal.MaxValue; @@ -103,7 +105,7 @@ private void LoadSettingsFile(bool createNew) 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 = ... @@ -147,11 +149,14 @@ private void LoadSettingsFile(bool createNew) { mainTabs.TabPages.RemoveAt(2); } + panelLoaders.Clear(); + // Read connection strings - foreach (var destination in Settings.Destinations.Take(5)) + foreach (var destination in Settings.Destinations) { var loader = new PanelLoader(); + loader.RemoveDestination += loader_RemoveDestination; loader.LoadPanel(destination.ConnectionString); panelLoaders.Add(loader); var tabPage = new TabPage(string.Format("Submit #{0}", panelLoaders.Count)); @@ -195,12 +200,12 @@ private void SaveButton_Click(object sender, EventArgs e) Settings.StoragePath = this.storagePathComboBox.Text == "Custom" ? this.customStoragePathTextBox.Text : this.storagePathComboBox.Text; Settings.Destinations.Clear(); + // Save connection strings foreach (var connectionString in panelLoaders .Where(p => p.Controls.Count == 2) .Select(p => ((ISubmitPanel)p.Controls[0]).ConnectionString) .Where(s => !string.IsNullOrEmpty(s))) - { Settings.AddDestinationFromConnectionString(connectionString); } @@ -409,10 +414,48 @@ private void UIProviderComboBox_SelectedIndexChanged(object sender, EventArgs e) private void AddDestinationButton_Click(object sender, EventArgs e) { var loader = new PanelLoader(); + loader.RemoveDestination += loader_RemoveDestination; panelLoaders.Add(loader); var tabPage = new TabPage(string.Format("Submit #{0}", panelLoaders.Count)); tabPage.Controls.Add(loader); mainTabs.TabPages.Add(tabPage); } + + void loader_RemoveDestination(object sender, EventArgs e) + { + var loader = sender as PanelLoader; + var idx = 2; + idx += (panelLoaders.ToList()).IndexOf(loader); + + if (!string.IsNullOrEmpty(loader.connString)) + { + var protocol = ConnectionStringParser.Parse(loader.connString)["Type"]; + IProtocol dest = null; + + if (protocol == typeof(Core.Submission.Web.Mail).Name || protocol.ToLower() == "email" || protocol.ToLower() == "e-mail") + { + dest = new Core.Submission.Web.Mail(loader.connString); + } + else if (protocol == typeof(Core.Submission.Tracker.Redmine).Name) + { + dest = new Core.Submission.Tracker.Redmine(loader.connString); + } + else if (protocol == typeof(Core.Submission.Web.Ftp).Name) + { + dest = new Core.Submission.Tracker.Redmine(loader.connString); + } + else if (protocol == typeof(Core.Submission.Web.Http).Name) + { + dest = new Core.Submission.Tracker.Redmine(loader.connString); + } + + if (dest != null) + Settings.Destinations.Remove(dest); + } + + panelLoaders.Remove(loader); + mainTabs.TabPages.RemoveAt(idx); + return; + } } -} +} \ No newline at end of file diff --git a/NBug.Configurator/MainForm.resx b/NBug.Configurator/MainForm.resx index 1db187b..bcc6c2a 100644 --- a/NBug.Configurator/MainForm.resx +++ b/NBug.Configurator/MainForm.resx @@ -253,4 +253,4 @@ just to log and submit exceptions but not interfering with the application execu AADwDwAA8A8AAA== - + \ No newline at end of file diff --git a/NBug.Configurator/NBug.Configurator.csproj b/NBug.Configurator/NBug.Configurator.csproj index 02d46a8..ef1519d 100644 --- a/NBug.Configurator/NBug.Configurator.csproj +++ b/NBug.Configurator/NBug.Configurator.csproj @@ -107,11 +107,11 @@ MainForm.cs - + Form - - Normal.cs + + CustomPreviewForm.cs Form @@ -158,8 +158,8 @@ MainForm.cs - - Normal.cs + + CustomPreviewForm.cs PreviewForm.cs diff --git a/NBug.Configurator/PreviewForm.cs b/NBug.Configurator/PreviewForm.cs index be7b067..963db1c 100644 --- a/NBug.Configurator/PreviewForm.cs +++ b/NBug.Configurator/PreviewForm.cs @@ -6,16 +6,15 @@ 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; + using System; + using System.IO; + using System.Windows.Forms; internal partial class PreviewForm : Form { @@ -64,4 +63,4 @@ private void CloseButton_Click(object sender, EventArgs e) this.Close(); } } -} +} \ No newline at end of file diff --git a/NBug.Configurator/Program.cs b/NBug.Configurator/Program.cs index 0592a48..486c414 100644 --- a/NBug.Configurator/Program.cs +++ b/NBug.Configurator/Program.cs @@ -22,4 +22,4 @@ public static void Main() Application.Run(new MainForm()); } } -} +} \ No newline at end of file diff --git a/NBug.Configurator/Properties/AssemblyInfo.cs b/NBug.Configurator/Properties/AssemblyInfo.cs index 885f3ae..621757f 100644 --- a/NBug.Configurator/Properties/AssemblyInfo.cs +++ b/NBug.Configurator/Properties/AssemblyInfo.cs @@ -1,16 +1,15 @@ using System.Reflection; -using System.Runtime.CompilerServices; using System.Runtime.InteropServices; -// General Information about an assembly is controlled through the following +// 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 +// 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)] @@ -20,10 +19,10 @@ // Version information for an assembly consists of the following four values: // // Major Version -// Minor Version +// Minor Version // Build Number // Revision // -// You can specify all the values or you can default the Build and Revision Numbers +// 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/SubmitPanels/ISubmitPanel.cs b/NBug.Configurator/SubmitPanels/ISubmitPanel.cs index 0affaa9..43cb978 100644 --- a/NBug.Configurator/SubmitPanels/ISubmitPanel.cs +++ b/NBug.Configurator/SubmitPanels/ISubmitPanel.cs @@ -10,4 +10,4 @@ internal interface ISubmitPanel { string ConnectionString { get; set; } } -} +} \ No newline at end of file diff --git a/NBug.Configurator/SubmitPanels/PanelLoader.Designer.cs b/NBug.Configurator/SubmitPanels/PanelLoader.Designer.cs index 8da7ee4..f53e67a 100644 --- a/NBug.Configurator/SubmitPanels/PanelLoader.Designer.cs +++ b/NBug.Configurator/SubmitPanels/PanelLoader.Designer.cs @@ -28,61 +28,73 @@ protected override void Dispose(bool disposing) /// 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[] { + this.selectorPanel = new System.Windows.Forms.Panel(); + this.submitComboBox = new System.Windows.Forms.ComboBox(); + this.submitLabel = new System.Windows.Forms.Label(); + this.btnRemove = new System.Windows.Forms.Button(); + this.selectorPanel.SuspendLayout(); + this.SuspendLayout(); + // + // selectorPanel + // + this.selectorPanel.Controls.Add(this.btnRemove); + 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); + 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:"; + // + // btnRemove + // + this.btnRemove.Location = new System.Drawing.Point(244, 7); + this.btnRemove.Name = "btnRemove"; + this.btnRemove.Size = new System.Drawing.Size(75, 23); + this.btnRemove.TabIndex = 4; + this.btnRemove.Text = "Remove"; + this.btnRemove.UseVisualStyleBackColor = true; + this.btnRemove.Click += new System.EventHandler(this.btnRemove_Click); + // + // 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); } @@ -91,6 +103,7 @@ private void InitializeComponent() private System.Windows.Forms.Panel selectorPanel; private System.Windows.Forms.ComboBox submitComboBox; private System.Windows.Forms.Label submitLabel; + private System.Windows.Forms.Button btnRemove; diff --git a/NBug.Configurator/SubmitPanels/PanelLoader.cs b/NBug.Configurator/SubmitPanels/PanelLoader.cs index e85a8a9..ac08221 100644 --- a/NBug.Configurator/SubmitPanels/PanelLoader.cs +++ b/NBug.Configurator/SubmitPanels/PanelLoader.cs @@ -11,12 +11,11 @@ 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 string connString; + public event EventHandler RemoveDestination; public PanelLoader() { @@ -26,35 +25,35 @@ public PanelLoader() public void LoadPanel(string connectionString) { - this.connString = connectionString; + connString = connectionString; var protocol = ConnectionStringParser.Parse(connectionString)["Type"]; - if (protocol == typeof(Core.Submission.Web.Mail).Name || protocol.ToString().ToLower() == "email" || protocol.ToString().ToLower() == "e-mail") + if (protocol == typeof(Core.Submission.Web.Mail).Name || protocol.ToLower() == "email" || protocol.ToLower() == "e-mail") { - this.submitComboBox.SelectedItem = "E-Mail"; + submitComboBox.SelectedItem = "E-Mail"; } else if (protocol == typeof(Core.Submission.Tracker.Redmine).Name) { - this.submitComboBox.SelectedItem = "Redmine Issue Tracker"; + submitComboBox.SelectedItem = "Redmine Issue Tracker"; } else if (protocol == typeof(Core.Submission.Web.Ftp).Name) { - this.submitComboBox.SelectedItem = "FTP"; + submitComboBox.SelectedItem = "FTP"; } else if (protocol == typeof(Core.Submission.Web.Http).Name) { - this.submitComboBox.SelectedItem = "HTTP"; + 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; + settingsLoadedProtocolType = submitComboBox.Text; - if (this.Controls.Count == 2) + if (Controls.Count == 2) { - ((ISubmitPanel)this.Controls[0]).ConnectionString = connectionString; + ((ISubmitPanel)Controls[0]).ConnectionString = connectionString; } } @@ -75,12 +74,15 @@ private void SubmitComboBox_SelectedIndexChanged(object sender, EventArgs e) 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; @@ -97,5 +99,10 @@ private void SubmitComboBox_SelectedIndexChanged(object sender, EventArgs e) } } } + + private void btnRemove_Click(object sender, EventArgs e) + { + RemoveDestination.DynamicInvoke(this, new EventArgs()); + } } -} +} \ No newline at end of file diff --git a/NBug.Configurator/SubmitPanels/Tracker/Redmine.cs b/NBug.Configurator/SubmitPanels/Tracker/Redmine.cs index 4c28a9d..a2361fc 100644 --- a/NBug.Configurator/SubmitPanels/Tracker/Redmine.cs +++ b/NBug.Configurator/SubmitPanels/Tracker/Redmine.cs @@ -105,4 +105,4 @@ private void ApiKeyRadioButton_CheckedChanged(object sender, EventArgs e) } } } -} +} \ No newline at end of file diff --git a/NBug.Configurator/SubmitPanels/Web/Ftp.cs b/NBug.Configurator/SubmitPanels/Web/Ftp.cs index 9effa7c..d381e0d 100644 --- a/NBug.Configurator/SubmitPanels/Web/Ftp.cs +++ b/NBug.Configurator/SubmitPanels/Web/Ftp.cs @@ -86,4 +86,4 @@ private void UsernamePasswordRadioButton_CheckedChanged(object sender, EventArgs } } } -} +} \ No newline at end of file diff --git a/NBug.Configurator/SubmitPanels/Web/Http.cs b/NBug.Configurator/SubmitPanels/Web/Http.cs index fe776b1..72139c4 100644 --- a/NBug.Configurator/SubmitPanels/Web/Http.cs +++ b/NBug.Configurator/SubmitPanels/Web/Http.cs @@ -44,4 +44,4 @@ public string ConnectionString } } } -} +} \ No newline at end of file diff --git a/NBug.Configurator/SubmitPanels/Web/Mail.cs b/NBug.Configurator/SubmitPanels/Web/Mail.cs index 85cb827..b257bdf 100644 --- a/NBug.Configurator/SubmitPanels/Web/Mail.cs +++ b/NBug.Configurator/SubmitPanels/Web/Mail.cs @@ -7,6 +7,7 @@ namespace NBug.Configurator.SubmitPanels.Web { using System; + using System.Net.Mail; using System.Windows.Forms; public partial class Mail : UserControl, ISubmitPanel @@ -15,6 +16,7 @@ public Mail() { InitializeComponent(); this.portNumericUpDown.Maximum = decimal.MaxValue; + this.priorityComboBox.SelectedIndex = 1; } public string ConnectionString @@ -24,20 +26,20 @@ public string ConnectionString // 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); + MessageBox.Show(String.Format("Mandatory field \"{0}\" cannot be left blank.", toLabel.Name), "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 - }; + { + 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 = (MailPriority)Enum.Parse(typeof(MailPriority), this.priorityComboBox.SelectedItem.ToString()) + }; foreach (var item in this.toListBox.Items) { @@ -48,7 +50,7 @@ public string ConnectionString if (this.ccListBox.Items.Count != 0) { - foreach (var item in this.ccListBox.Items) + foreach (var item in ccListBox.Items) { mail.Cc += item + ","; } @@ -65,34 +67,26 @@ public string ConnectionString mail.Bcc = mail.Bcc.TrimEnd(new[] { ',' }); } - + if (!this.defaultPortCheckBox.Checked) { - mail.Port = this.portNumericUpDown.Text; + mail.Port = (int)this.portNumericUpDown.Value; } - 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.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"; - } + mail.UseSsl = this.useSslCheckBox.Checked; + mail.UseAttachment = this.useAttachmentCheckBox.Checked; return mail.ConnectionString; } @@ -104,22 +98,18 @@ public string ConnectionString this.fromTextBox.Text = mail.From; this.fromNameTextBox.Text = mail.FromName; this.smtpServerTextBox.Text = mail.SmtpServer; - this.useSslCheckBox.Checked = Convert.ToBoolean(mail.UseSsl); + this.useSslCheckBox.Checked = mail.UseSsl; this.priorityComboBox.SelectedItem = mail.Priority; - this.useAuthenticationCheckBox.Checked = Convert.ToBoolean(mail.UseAuthentication); + this.useAuthenticationCheckBox.Checked = 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); - } + this.useAttachmentCheckBox.Checked = mail.UseAttachment; + this.portNumericUpDown.Value = mail.Port; - if (this.portNumericUpDown.Value == 25 || this.portNumericUpDown.Value == 465 || string.IsNullOrEmpty(mail.Port)) + if (this.portNumericUpDown.Value == 25 || this.portNumericUpDown.Value == 465 || mail.Port > 0) { this.defaultPortCheckBox.Checked = true; } @@ -219,4 +209,4 @@ private void DefaultPortCheckBox_CheckedChanged(object sender, EventArgs e) } } } -} +} \ No newline at end of file diff --git a/NBug.Configurator/app.config b/NBug.Configurator/app.config index f76deb9..e4dd7f0 100644 --- a/NBug.Configurator/app.config +++ b/NBug.Configurator/app.config @@ -1,3 +1,6 @@ - + + + + \ No newline at end of file diff --git a/NBug/Core/Reporting/BugReport.cs b/NBug/Core/Reporting/BugReport.cs index 96cdd30..5b9ba86 100644 --- a/NBug/Core/Reporting/BugReport.cs +++ b/NBug/Core/Reporting/BugReport.cs @@ -6,10 +6,6 @@ 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; @@ -17,6 +13,9 @@ namespace NBug.Core.Reporting using NBug.Core.Util.Logging; using NBug.Core.Util.Serialization; using NBug.Core.Util.Storage; + using System; + using System.IO; + using System.Xml.Serialization; internal class BugReport { @@ -42,7 +41,7 @@ internal ExecutionFlow Report(Exception exception, ExceptionThread exceptionThre // 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) { @@ -57,7 +56,7 @@ internal ExecutionFlow Report(Exception exception, ExceptionThread exceptionThre return ExecutionFlow.BreakExecution; // Since an internal exception occured } } - + private void WindowsScreenshot(Stream stream) { // Full @@ -143,7 +142,7 @@ private void CreateReportZip(SerializableException serializableException, Report } else { - Logger.Trace("Current report count is at its limit as per 'Settings.MaxQueuedReports (" + + Logger.Trace("Current report count is at its limit as per 'Settings.MaxQueuedReports (" + Settings.MaxQueuedReports + ")' setting: Skipping bug report generation."); } } @@ -177,7 +176,6 @@ private void AddAdditionalFiles(ZipStorer zipStorer) if (file.Contains("*") || file.Contains("?")) { - foreach (var item in Directory.GetFiles(dir, file)) AddToZip(zipStorer, Settings.NBugDirectory, item); } diff --git a/NBug/Core/Reporting/Feedback.cs b/NBug/Core/Reporting/Feedback.cs index a14b1be..b207e1c 100644 --- a/NBug/Core/Reporting/Feedback.cs +++ b/NBug/Core/Reporting/Feedback.cs @@ -6,10 +6,9 @@ namespace NBug.Core.Reporting { - using System; - using NBug.Core.Reporting.Info; using NBug.Core.Util.Logging; + using System; internal class Feedback { @@ -28,4 +27,4 @@ internal Feedback() } } } -} +} \ No newline at end of file diff --git a/NBug/Core/Reporting/Info/AssemblyInfo.cs b/NBug/Core/Reporting/Info/AssemblyInfo.cs index e47fe4d..8f71728 100644 --- a/NBug/Core/Reporting/Info/AssemblyInfo.cs +++ b/NBug/Core/Reporting/Info/AssemblyInfo.cs @@ -9,4 +9,4 @@ namespace NBug.Core.Reporting.Info public class AssemblyInfo { } -} +} \ No newline at end of file diff --git a/NBug/Core/Reporting/Info/ConfigurationInfo.cs b/NBug/Core/Reporting/Info/ConfigurationInfo.cs index 738a673..72a6cab 100644 --- a/NBug/Core/Reporting/Info/ConfigurationInfo.cs +++ b/NBug/Core/Reporting/Info/ConfigurationInfo.cs @@ -9,4 +9,4 @@ namespace NBug.Core.Reporting.Info public class ConfigurationInfo { } -} +} \ No newline at end of file diff --git a/NBug/Core/Reporting/Info/GeneralInfo.cs b/NBug/Core/Reporting/Info/GeneralInfo.cs index ddfd795..c4bb04a 100644 --- a/NBug/Core/Reporting/Info/GeneralInfo.cs +++ b/NBug/Core/Reporting/Info/GeneralInfo.cs @@ -6,12 +6,11 @@ namespace NBug.Core.Reporting.Info { + using NBug.Core.Util.Serialization; using System; using System.Diagnostics; using System.Reflection; - using NBug.Core.Util.Serialization; - [Serializable] public class GeneralInfo { @@ -79,4 +78,4 @@ internal GeneralInfo(SerializableException serializableException) public string UserDescription { get; set; } } -} +} \ No newline at end of file diff --git a/NBug/Core/Reporting/Info/Report.cs b/NBug/Core/Reporting/Info/Report.cs index 9d5abe2..7511612 100644 --- a/NBug/Core/Reporting/Info/Report.cs +++ b/NBug/Core/Reporting/Info/Report.cs @@ -5,16 +5,14 @@ // -------------------------------------------------------------------------------------------------------------------- using System.IO; -using System.Xml; using System.Xml.Linq; namespace NBug.Core.Reporting.Info { + using NBug.Core.Util.Serialization; using System; using System.Xml.Serialization; - using NBug.Core.Util.Serialization; - [Serializable] public class Report { @@ -32,7 +30,7 @@ internal Report(SerializableException 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. + /// event to fill this property with required information. /// public object CustomInfo { get; set; } @@ -43,21 +41,21 @@ internal Report(SerializableException 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. + /// event to fill this property with required information. /// public object StaticInfo { get; set; }*/ public override string ToString() { - var serializer = CustomInfo != null ? new XmlSerializer(typeof(Report), new[] { CustomInfo.GetType() }) : new XmlSerializer(typeof(Report)); + var serializer = CustomInfo != null ? new XmlSerializer(typeof(Report), new[] { CustomInfo.GetType() }) : new XmlSerializer(typeof(Report)); using (var stream = new MemoryStream()) { - stream.SetLength(0); + stream.SetLength(0); serializer.Serialize(stream, this); - stream.Position = 0; + stream.Position = 0; var doc = XDocument.Load(stream); return doc.Root.ToString(); } } } -} +} \ No newline at end of file diff --git a/NBug/Core/Reporting/Info/SystemInfo.cs b/NBug/Core/Reporting/Info/SystemInfo.cs index 5dd5b46..eddd123 100644 --- a/NBug/Core/Reporting/Info/SystemInfo.cs +++ b/NBug/Core/Reporting/Info/SystemInfo.cs @@ -9,4 +9,4 @@ namespace NBug.Core.Reporting.Info public class SystemInfo { } -} +} \ No newline at end of file diff --git a/NBug/Core/Reporting/MiniDump/DumpTypeFlag.cs b/NBug/Core/Reporting/MiniDump/DumpTypeFlag.cs index 9a7459d..84946cf 100644 --- a/NBug/Core/Reporting/MiniDump/DumpTypeFlag.cs +++ b/NBug/Core/Reporting/MiniDump/DumpTypeFlag.cs @@ -7,6 +7,7 @@ internal enum DumpTypeFlag : uint { // From dbghelp.h: Normal = 0x00000000, + WithDataSegs = 0x00000001, WithFullMemory = 0x00000002, WithHandleData = 0x00000004, @@ -27,4 +28,4 @@ internal enum DumpTypeFlag : uint IgnoreInaccessibleMemory = 0x00020000, ValidTypeFlags = 0x0003ffff, } -} +} \ No newline at end of file diff --git a/NBug/Core/Reporting/MiniDump/DumpWriter.cs b/NBug/Core/Reporting/MiniDump/DumpWriter.cs index 98635bb..f410773 100644 --- a/NBug/Core/Reporting/MiniDump/DumpWriter.cs +++ b/NBug/Core/Reporting/MiniDump/DumpWriter.cs @@ -1,21 +1,20 @@ namespace NBug.Core.Reporting.MiniDump { + using NBug.Core.Util.Exceptions; + using NBug.Core.Util.Logging; + using NBug.Enums; 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); - /// } + /// 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 @@ -132,37 +131,38 @@ private static bool Write(SafeHandle fileHandle, DumpTypeFlag dumpTypeFlag) * } MINIDUMP_EXCEPTION_INFORMATION, *PMINIDUMP_EXCEPTION_INFORMATION; */ - [StructLayout(LayoutKind.Sequential, Pack = 4)] // Pack=4 is important! So it works also for x64! + [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 - * ); + /* 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 + // 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 + // 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(); } -} +} \ No newline at end of file diff --git a/NBug/Core/Reporting/MiniDump/ExceptionFilters.cs b/NBug/Core/Reporting/MiniDump/ExceptionFilters.cs index fceb561..560298a 100644 --- a/NBug/Core/Reporting/MiniDump/ExceptionFilters.cs +++ b/NBug/Core/Reporting/MiniDump/ExceptionFilters.cs @@ -7,7 +7,7 @@ using System.Runtime.CompilerServices; /// - /// This class provides some utilities for working with exceptions and exception filters. The assembly will + /// 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 . /// /// @@ -15,7 +15,7 @@ /// 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. + /// 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 @@ -62,12 +62,12 @@ internal static class ExceptionFilters internal static void Filter(Action body, Action filter) { Filter( - body, + body, e => - { - filter(e); - return false; - }, + { + filter(e); + return false; + }, null); } @@ -78,7 +78,7 @@ internal static void Filter(Action body, Action filter) /// The code to run inside the "try" block /// /// - /// Called whenever an exception escapes body, passing the exeption object. + /// 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. /// /// @@ -193,31 +193,31 @@ internal static void TryCatch(Action body, Type[] typesToCatch, where TExceptionBase : Exception { // Verify that every type in typesToCatch is a sub-type of TExceptionBase - #if DEBUG +#if DEBUG foreach (var tc in typesToCatch) { Debug.Assert( - typeof(TExceptionBase).IsAssignableFrom(tc), + typeof(TExceptionBase).IsAssignableFrom(tc), String.Format("Error: {0} is not a sub-class of {1}", tc.FullName, typeof(TExceptionBase).FullName)); } - #endif +#endif Filter( - body, + 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 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())) { - if (catchType.IsAssignableFrom(e.GetType())) - { - return true; - } + return true; } + } - return false; - }, + return false; + }, e => handler((TExceptionBase)e)); } @@ -289,15 +289,15 @@ private static Action, Action> Generate // (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") }, + 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) }), + typeof(DebuggableAttribute).GetConstructor(new[] { typeof(DebuggableAttribute.DebuggingModes) }), new object[] { DebuggableAttribute.DebuggingModes.IgnoreSymbolStoreSequencePoints })); // Create the type and method which will contain the filter diff --git a/NBug/Core/Submission/Custom/Custom.cs b/NBug/Core/Submission/Custom/Custom.cs new file mode 100644 index 0000000..1240cbc --- /dev/null +++ b/NBug/Core/Submission/Custom/Custom.cs @@ -0,0 +1,42 @@ +using NBug.Core.Reporting.Info; +using NBug.Core.Util.Serialization; + +namespace NBug.Core.Submission.Custom +{ + using System.IO; + + public class CustomFactory : IProtocolFactory + { + public IProtocol FromConnectionString(string connectionString) + { + return new Custom(connectionString); + } + + public string SupportedType + { + get { return "Custom"; } + } + } + + public class Custom : ProtocolBase + { + public Custom(string connectionString) + : base(connectionString) + { + } + + public Custom() + { + } + + public override bool Send(string fileName, Stream file, Report report, SerializableException exception) + { + if (Settings.CustomSubmissionHandle != null) + return false; + + var e = new CustomSubmissionEventArgs(fileName, file, report, exception); + Settings.CustomSubmissionHandle.DynamicInvoke(this, e); + return e.Result; + } + } +} \ No newline at end of file diff --git a/NBug/Core/Submission/Database/Ado.cs b/NBug/Core/Submission/Database/Ado.cs index 182a7c7..456e41c 100644 --- a/NBug/Core/Submission/Database/Ado.cs +++ b/NBug/Core/Submission/Database/Ado.cs @@ -3,4 +3,4 @@ internal class Ado { } -} +} \ No newline at end of file diff --git a/NBug/Core/Submission/Database/MsSql.cs b/NBug/Core/Submission/Database/MsSql.cs index ac2a558..e1ad8d1 100644 --- a/NBug/Core/Submission/Database/MsSql.cs +++ b/NBug/Core/Submission/Database/MsSql.cs @@ -3,4 +3,4 @@ internal class MsSql { } -} +} \ No newline at end of file diff --git a/NBug/Core/Submission/Database/MySql.cs b/NBug/Core/Submission/Database/MySql.cs index cce6357..ce25163 100644 --- a/NBug/Core/Submission/Database/MySql.cs +++ b/NBug/Core/Submission/Database/MySql.cs @@ -3,4 +3,4 @@ internal class MySql { } -} +} \ No newline at end of file diff --git a/NBug/Core/Submission/Dispatcher.cs b/NBug/Core/Submission/Dispatcher.cs index a20e4d8..86b425e 100644 --- a/NBug/Core/Submission/Dispatcher.cs +++ b/NBug/Core/Submission/Dispatcher.cs @@ -4,22 +4,18 @@ // // -------------------------------------------------------------------------------------------------------------------- -using System.Collections.Generic; -using System.Linq; -using System.Xml.Linq; -using System.Xml.Serialization; using NBug.Core.Reporting.Info; using NBug.Core.Util.Serialization; +using System.Xml.Serialization; namespace NBug.Core.Submission { + using NBug.Core.Util.Logging; + using NBug.Core.Util.Storage; using System; using System.IO; using System.Threading.Tasks; - using NBug.Core.Util.Logging; - using NBug.Core.Util.Storage; - internal class Dispatcher { /// @@ -71,7 +67,7 @@ private void Dispatch() Storer.TruncateReportFiles(); // Now go through configured destinations and submit to all automatically - for (bool hasReport = true; hasReport;) + for (bool hasReport = true; hasReport; ) { using (Storer storer = new Storer()) using (Stream stream = storer.GetFirstReportFile()) @@ -98,6 +94,7 @@ private void Dispatch() private class ExceptionData { public Report Report { get; set; } + public SerializableException Exception { get; set; } } @@ -135,16 +132,16 @@ private ExceptionData GetDataFromZip(Stream stream) } /// - /// Enumerate all protocols to see if they are properly configured and send using the ones that are configured + /// 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 sending was successful. /// Returns if the report was submitted to at least one destination. private bool EnumerateDestinations(Stream reportFile, ExceptionData exceptionData) { bool sentSuccessfullyAtLeastOnce = false; - string fileName = Path.GetFileName(((FileStream) reportFile).Name); + string fileName = Path.GetFileName(((FileStream)reportFile).Name); foreach (var destination in Settings.Destinations) { try @@ -163,4 +160,4 @@ private bool EnumerateDestinations(Stream reportFile, ExceptionData exceptionDat return sentSuccessfullyAtLeastOnce; } } -} +} \ No newline at end of file diff --git a/NBug/Core/Submission/IProtocol.cs b/NBug/Core/Submission/IProtocol.cs index 134876f..baf2ac1 100644 --- a/NBug/Core/Submission/IProtocol.cs +++ b/NBug/Core/Submission/IProtocol.cs @@ -1,12 +1,12 @@ namespace NBug.Core.Submission { - using System.IO; using NBug.Core.Reporting.Info; using NBug.Core.Util.Serialization; - + using System.IO; + /// /// Implement this to support sending data to a specific location. - /// + /// /// We recommend you base your implementation on ProtocolBase. /// public interface IProtocol diff --git a/NBug/Core/Submission/IProtocolFactory.cs b/NBug/Core/Submission/IProtocolFactory.cs index 7cb33b0..6aba9bd 100644 --- a/NBug/Core/Submission/IProtocolFactory.cs +++ b/NBug/Core/Submission/IProtocolFactory.cs @@ -2,15 +2,15 @@ { /// /// The protocol factory creates an IProtocol instance. - /// - /// This interface is to get around the fact that the IProtocol interface + /// + /// This interface is to get around the fact that the IProtocol interface /// cannot be guaranteed to contain a constructor that takes a connection /// string. At the same time, we allow the protocol implementation to supply /// the name of its connection string Type parameter. - /// + /// /// The protocol factory is only used for protocols that originate as connection /// strings in a configuration file. - /// + /// /// Note! Your implementation of this class MUST HAVE a parameterless constructor. /// public interface IProtocolFactory diff --git a/NBug/Core/Submission/ProtocolBase.cs b/NBug/Core/Submission/ProtocolBase.cs index 852a017..0cddebc 100644 --- a/NBug/Core/Submission/ProtocolBase.cs +++ b/NBug/Core/Submission/ProtocolBase.cs @@ -5,18 +5,15 @@ // -------------------------------------------------------------------------------------------------------------------- using NBug.Core.Util; +using System; namespace NBug.Core.Submission { + using NBug.Core.Reporting.Info; + using NBug.Core.Util.Serialization; using System.IO; using System.Linq; using System.Reflection; - using System.Xml.Linq; - using System.Xml.Serialization; - - using NBug.Core.Reporting.Info; - using NBug.Core.Util.Serialization; - using NBug.Core.Util.Storage; public abstract class ProtocolBase : IProtocol { @@ -27,17 +24,23 @@ public abstract class ProtocolBase : IProtocol protected ProtocolBase(string connectionString) { var fields = ConnectionStringParser.Parse(connectionString); - var properties = this.GetType().GetProperties(BindingFlags.Instance | BindingFlags.Public); + var properties = 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); + if (property.PropertyType == typeof(bool)) + property.SetValue(this, Convert.ToBoolean(fields[property.Name].Trim()), null); + else if (property.PropertyType == typeof(int)) + property.SetValue(this, Convert.ToInt32(fields[property.Name].Trim()), null); + else if (property.PropertyType.BaseType == typeof(Enum)) + property.SetValue(this, Enum.Parse(property.PropertyType, fields[property.Name]), null); + else + property.SetValue(this, fields[property.Name], null); } } protected ProtocolBase() { - } /// @@ -47,8 +50,8 @@ public string ConnectionString { get { - var connectionString = "Type=" + this.GetType().Name + ";"; - var properties = this.GetType().GetProperties(BindingFlags.Instance | BindingFlags.Public | BindingFlags.SetProperty | BindingFlags.GetProperty) + var connectionString = String.Format("Type={0};", GetType().Name); + var properties = GetType().GetProperties(BindingFlags.Instance | BindingFlags.Public | BindingFlags.SetProperty | BindingFlags.GetProperty) .Where(p => p.Name != "ConnectionString"); foreach (var property in properties) @@ -61,7 +64,7 @@ public string ConnectionString if (!string.IsNullOrEmpty(val)) { // Escape = and ; characters - connectionString += property.Name.Replace(";", @"\;").Replace("=", @"\=") + "=" + val.Replace(";", @"\;").Replace("=", @"\=") + ";"; + connectionString += String.Format("{0}={1};", property.Name.Replace(";", @"\;").Replace("=", @"\="), val.Replace(";", @"\;").Replace("=", @"\=")); } } } @@ -78,4 +81,4 @@ internal string GetSettingsPasswordField(string connectionString) public abstract bool Send(string fileName, Stream file, Report report, SerializableException exception); } -} +} \ No newline at end of file diff --git a/NBug/Core/Submission/Tracker/BugNet.cs b/NBug/Core/Submission/Tracker/BugNet.cs index 6922b85..e800afa 100644 --- a/NBug/Core/Submission/Tracker/BugNet.cs +++ b/NBug/Core/Submission/Tracker/BugNet.cs @@ -14,7 +14,6 @@ namespace NBug.Core.Submission.Tracker internal class BugNet : ProtocolBase { - internal BugNet(string connectionString) : base(connectionString) { diff --git a/NBug/Core/Submission/Tracker/Bugzilla.cs b/NBug/Core/Submission/Tracker/Bugzilla.cs index c416207..1cd985e 100644 --- a/NBug/Core/Submission/Tracker/Bugzilla.cs +++ b/NBug/Core/Submission/Tracker/Bugzilla.cs @@ -9,4 +9,4 @@ namespace NBug.Core.Submission.Tracker internal class Bugzilla { } -} +} \ No newline at end of file diff --git a/NBug/Core/Submission/Tracker/GitHub.cs b/NBug/Core/Submission/Tracker/GitHub.cs index 088d094..f29bca5 100644 --- a/NBug/Core/Submission/Tracker/GitHub.cs +++ b/NBug/Core/Submission/Tracker/GitHub.cs @@ -9,4 +9,4 @@ namespace NBug.Core.Submission.Tracker internal class GitHub { } -} +} \ No newline at end of file diff --git a/NBug/Core/Submission/Tracker/GoogleCode.cs b/NBug/Core/Submission/Tracker/GoogleCode.cs index bd1f500..ae4623f 100644 --- a/NBug/Core/Submission/Tracker/GoogleCode.cs +++ b/NBug/Core/Submission/Tracker/GoogleCode.cs @@ -9,4 +9,4 @@ namespace NBug.Core.Submission.Tracker internal class GoogleCode { } -} +} \ No newline at end of file diff --git a/NBug/Core/Submission/Tracker/Redmine.cs b/NBug/Core/Submission/Tracker/Redmine.cs index 0e0b8f8..f86eca9 100644 --- a/NBug/Core/Submission/Tracker/Redmine.cs +++ b/NBug/Core/Submission/Tracker/Redmine.cs @@ -9,15 +9,13 @@ namespace NBug.Core.Submission.Tracker { + using NBug.Core.Util.Logging; 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; - public class RedmineFactory : IProtocolFactory { public IProtocol FromConnectionString(string connectionString) @@ -135,7 +133,7 @@ public override bool Send(string fileName, Stream file, Report report, Serializa report.GeneralInfo.TargetSite; var description = "
" + report + Environment.NewLine + Environment.NewLine +
-			                  exception + "
"; + exception + ""; var redmineRequestXml = new XElement("issue", new XElement("project_id", this.ProjectId)); @@ -194,7 +192,7 @@ public override bool Send(string fileName, Stream file, Report report, Serializa { redmineRequestXml.Add(new XElement("author_id", this.AuthorId)); } - + var bytes = Encoding.UTF8.GetBytes(redmineRequestXml.ToString()); request.ContentLength = bytes.Length; @@ -214,4 +212,4 @@ public override bool Send(string fileName, Stream file, Report report, Serializa return true; } } -} +} \ No newline at end of file diff --git a/NBug/Core/Submission/Tracker/Trac.cs b/NBug/Core/Submission/Tracker/Trac.cs index 2008aa1..1c9868e 100644 --- a/NBug/Core/Submission/Tracker/Trac.cs +++ b/NBug/Core/Submission/Tracker/Trac.cs @@ -35,4 +35,4 @@ public override bool Send(string fileName, Stream file, Report report, Serializa return true; } } -} +} \ No newline at end of file diff --git a/NBug/Core/Submission/Web/Ftp.cs b/NBug/Core/Submission/Web/Ftp.cs index efb2122..d50a3b2 100644 --- a/NBug/Core/Submission/Web/Ftp.cs +++ b/NBug/Core/Submission/Web/Ftp.cs @@ -9,12 +9,10 @@ namespace NBug.Core.Submission.Web { + using NBug.Core.Util.Logging; using System; using System.IO; using System.Net; - using System.Text; - - using NBug.Core.Util.Logging; internal class FtpFactory : IProtocolFactory { @@ -62,7 +60,7 @@ public Ftp() public override bool Send(string fileName, Stream file, Report report, SerializableException exception) { - var request = (FtpWebRequest) WebRequest.Create(new Uri(this.Url + fileName)); + var request = (FtpWebRequest)WebRequest.Create(new Uri(this.Url + fileName)); if (!string.IsNullOrEmpty(this.Usessl)) { @@ -99,4 +97,4 @@ public override bool Send(string fileName, Stream file, Report report, Serializa return true; } } -} +} \ No newline at end of file diff --git a/NBug/Core/Submission/Web/Http.cs b/NBug/Core/Submission/Web/Http.cs index 392bc34..d4201c9 100644 --- a/NBug/Core/Submission/Web/Http.cs +++ b/NBug/Core/Submission/Web/Http.cs @@ -9,11 +9,9 @@ namespace NBug.Core.Submission.Web { - using System.IO; - using System.Net; - using NBug.Core.Util.Logging; using NBug.Core.Util.Web; + using System.IO; public class HttpFactory : IProtocolFactory { @@ -58,20 +56,20 @@ public override bool Send(string fileName, Stream file, Report report, Serializa // 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 System.Xml.Linq; -using System.Xml.Serialization; using NBug.Core.Reporting.Info; using NBug.Core.Util.Serialization; namespace NBug.Core.Submission.Web { + using NBug.Core.Util.Logging; using System; using System.IO; using System.Net; using System.Net.Mail; - using NBug.Core.Util.Logging; - using NBug.Core.Util.Storage; - public class MailFactory : IProtocolFactory { public IProtocol FromConnectionString(string connectionString) @@ -41,6 +37,7 @@ public Mail(string connectionString) public Mail() { + Port = 25; } // Connection string format (single line) @@ -81,7 +78,7 @@ public Mail() public string ReplyTo { get; set; } - public string UseAttachment { get; set; } + public bool UseAttachment { get; set; } public string CustomSubject { get; set; } @@ -89,13 +86,13 @@ public Mail() public string SmtpServer { get; set; } - public string UseSsl { get; set; } + public bool UseSsl { get; set; } - public string Port { get; set; } + public int Port { get; set; } - public string Priority { get; set; } + public MailPriority Priority { get; set; } - public string UseAuthentication { get; set; } + public bool UseAuthentication { get; set; } public string Username { get; set; } @@ -103,7 +100,6 @@ public Mail() public override bool Send(string fileName, Stream file, Report report, SerializableException exception) { - if (string.IsNullOrEmpty(this.From) || string.IsNullOrEmpty(this.To)) { return false; @@ -114,29 +110,20 @@ public override bool Send(string fileName, Stream file, Report report, Serializa this.ReplyTo = this.From; } - if (string.IsNullOrEmpty(this.UseSsl)) + if (this.Port <= 0) { - this.UseSsl = "false"; + this.Port = this.UseSsl ? 465 : 25; } - if (string.IsNullOrEmpty(this.Port)) + if (!this.UseAttachment) { - this.Port = this.UseSsl == "true" ? "465" : "25"; - } - - if (string.IsNullOrEmpty(this.UseAttachment)) - { - this.UseAttachment = "false"; + 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"; + this.UseAuthentication = true; } using (var smtpClient = new SmtpClient()) @@ -147,20 +134,14 @@ public override bool Send(string fileName, Stream file, Report report, Serializa smtpClient.Host = this.SmtpServer; } - if (!string.IsNullOrEmpty(this.Port)) - { - smtpClient.Port = Convert.ToInt32(this.Port); - } + smtpClient.Port = this.Port; - if (this.UseAuthentication.ToLower() == "true") + if (this.UseAuthentication) { smtpClient.Credentials = new NetworkCredential(this.Username, this.Password); } - if (this.UseSsl == "true") - { - smtpClient.EnableSsl = true; - } + smtpClient.EnableSsl = this.UseSsl; if (!string.IsNullOrEmpty(this.Cc)) { @@ -172,27 +153,13 @@ public override bool Send(string fileName, Stream file, Report report, Serializa 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.Priority = this.Priority; 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") + if (this.UseAttachment) { // ToDo: Report file name should be attached to the report file object itself, file shouldn't be accessed directly! file.Position = 0; @@ -214,11 +181,11 @@ public override bool Send(string fileName, Stream file, Report report, Serializa if (!string.IsNullOrEmpty(this.CustomBody)) { message.Body = this.CustomBody + Environment.NewLine + Environment.NewLine + report + - Environment.NewLine + Environment.NewLine + exception; + Environment.NewLine + Environment.NewLine + exception; } else { - message.Body = report + Environment.NewLine + Environment.NewLine + exception; + message.Body = report + Environment.NewLine + Environment.NewLine + exception; } smtpClient.Send(message); @@ -228,4 +195,4 @@ public override bool Send(string fileName, Stream file, Report report, Serializa } } } -} +} \ No newline at end of file diff --git a/NBug/Core/UI/Console/ConsoleUI.cs b/NBug/Core/UI/Console/ConsoleUI.cs index 382440f..2a20bac 100644 --- a/NBug/Core/UI/Console/ConsoleUI.cs +++ b/NBug/Core/UI/Console/ConsoleUI.cs @@ -6,12 +6,11 @@ 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; + using System; internal static class ConsoleUI { @@ -41,4 +40,4 @@ internal static UIDialogResult ShowDialog(UIMode uiMode, SerializableException e } } } -} +} \ No newline at end of file diff --git a/NBug/Core/UI/Custom/CustomUI.cs b/NBug/Core/UI/Custom/CustomUI.cs index d8b03c0..f7174ef 100644 --- a/NBug/Core/UI/Custom/CustomUI.cs +++ b/NBug/Core/UI/Custom/CustomUI.cs @@ -6,7 +6,6 @@ namespace NBug.Core.UI.WPF { - using System.ComponentModel; using NBug.Core.Reporting.Info; using NBug.Core.Util.Exceptions; using NBug.Core.Util.Serialization; @@ -20,16 +19,16 @@ internal static class CustomUI { internal static UIDialogResult ShowDialog(UIMode uiMode, SerializableException exception, Report report) { - if (Settings.CustomUIHandle != null) + if (Settings.CustomUIHandle != null) { - var e = new CustomUIEventArgs(uiMode, exception, report); - Settings.CustomUIHandle.DynamicInvoke(null, e); - return e.Result; - } + var e = new CustomUIEventArgs(uiMode, exception, report); + Settings.CustomUIHandle.DynamicInvoke(null, e); + return e.Result; + } else { throw NBugConfigurationException.Create(() => Settings.UIMode, "Parameter supplied for settings property is invalid."); } } } -} +} \ No newline at end of file diff --git a/NBug/Core/UI/Developer/InternalExceptionViewer.cs b/NBug/Core/UI/Developer/InternalExceptionViewer.cs index 726e011..97cbb21 100644 --- a/NBug/Core/UI/Developer/InternalExceptionViewer.cs +++ b/NBug/Core/UI/Developer/InternalExceptionViewer.cs @@ -6,15 +6,14 @@ namespace NBug.Core.UI.Developer { + using NBug.Core.Util.Exceptions; + using NBug.Core.Util.Serialization; + using NBug.Properties; 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() @@ -41,7 +40,7 @@ internal void ShowDialog(Exception exception) 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."; @@ -65,9 +64,9 @@ private void BugReportButton_Click(object sender, EventArgs e) 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, + "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; } @@ -116,4 +115,4 @@ private void TrackerToolStripLabel_Click(object sender, EventArgs e) Process.Start(this.trackerToolStripLabel.Tag.ToString()); } } -} +} \ No newline at end of file diff --git a/NBug/Core/UI/Developer/InternalLogViewer.cs b/NBug/Core/UI/Developer/InternalLogViewer.cs index 47976c4..d7259b6 100644 --- a/NBug/Core/UI/Developer/InternalLogViewer.cs +++ b/NBug/Core/UI/Developer/InternalLogViewer.cs @@ -6,14 +6,13 @@ namespace NBug.Core.UI.Developer { + using NBug.Enums; + using NBug.Properties; 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; diff --git a/NBug/Core/UI/UIDialogResult.cs b/NBug/Core/UI/UIDialogResult.cs index bf95db7..17e3670 100644 --- a/NBug/Core/UI/UIDialogResult.cs +++ b/NBug/Core/UI/UIDialogResult.cs @@ -8,7 +8,7 @@ namespace NBug.Core.UI { public enum SendReport { - Send, + Send, DoNotSend } @@ -17,12 +17,12 @@ public enum ExecutionFlow /// /// This will handle all unhandled exceptions to be able to continue execution. /// - ContinueExecution, + ContinueExecution, /// /// This will handle all unhandled exceptions and exit the application. /// - BreakExecution, + BreakExecution, } public struct UIDialogResult @@ -36,4 +36,4 @@ public UIDialogResult(ExecutionFlow execution, SendReport report) this.Report = report; } } -} +} \ No newline at end of file diff --git a/NBug/Core/UI/UISelector.cs b/NBug/Core/UI/UISelector.cs index d1fb8b4..537f8f5 100644 --- a/NBug/Core/UI/UISelector.cs +++ b/NBug/Core/UI/UISelector.cs @@ -6,8 +6,6 @@ namespace NBug.Core.UI { - using System; - using NBug.Core.Reporting.Info; using NBug.Core.UI.Console; using NBug.Core.UI.WinForms; @@ -16,6 +14,7 @@ namespace NBug.Core.UI using NBug.Core.Util.Exceptions; using NBug.Core.Util.Serialization; using NBug.Enums; + using System; /// /// Initializes a new instance of the UISelector class which displays the user an appropriate user interface in the event of unhandled exceptions. @@ -48,19 +47,23 @@ internal static UIDialogResult DisplayBugReportUI(ExceptionThread exceptionThrea { 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); - case UIProvider.Custom: - return CustomUI.ShowDialog(UIMode.Minimal, serializableException, report); + + case UIProvider.Custom: + return CustomUI.ShowDialog(UIMode.Minimal, serializableException, report); + default: throw new NBugRuntimeException("UISelector.DiscoverUI() returned an invalid UI type."); } } else { - throw new NBugRuntimeException(String.Format("Parameter supplied for '{0}' is not valid.", typeof(ExceptionThread).Name)); + throw new NBugRuntimeException(String.Format("Parameter supplied for '{0}' is not valid.", typeof(ExceptionThread).Name)); } } else if (Settings.UIMode == UIMode.None) @@ -87,10 +90,10 @@ internal static UIDialogResult DisplayBugReportUI(ExceptionThread exceptionThrea { return WPFUI.ShowDialog(Settings.UIMode, serializableException, report); } - else if (Settings.UIProvider == UIProvider.Custom) - { - return CustomUI.ShowDialog(UIMode.Minimal, serializableException, report); - } + else if (Settings.UIProvider == UIProvider.Custom) + { + return CustomUI.ShowDialog(UIMode.Minimal, 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 @@ -98,12 +101,16 @@ internal static UIDialogResult DisplayBugReportUI(ExceptionThread exceptionThrea { 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); - case UIProvider.Custom: - return CustomUI.ShowDialog(UIMode.Minimal, serializableException, report); + + case UIProvider.Custom: + return CustomUI.ShowDialog(UIMode.Minimal, serializableException, report); + default: throw new NBugRuntimeException("UISelector.DiscoverUI() returned an invalid UI type."); } @@ -127,6 +134,7 @@ private static UIProvider DiscoverUI() { case "System.Windows.Forms": return UIProvider.WinForms; + case "PresentationFramework": return UIProvider.WPF; } @@ -139,6 +147,7 @@ private static UIProvider DiscoverUI() { case "System.Windows.Forms": return UIProvider.WinForms; + case "PresentationFramework": return UIProvider.WPF; } @@ -148,4 +157,4 @@ private static UIProvider DiscoverUI() return UIProvider.Console; } } -} +} \ No newline at end of file diff --git a/NBug/Core/UI/WPF/WPFUI.cs b/NBug/Core/UI/WPF/WPFUI.cs index b274d02..c30aad1 100644 --- a/NBug/Core/UI/WPF/WPFUI.cs +++ b/NBug/Core/UI/WPF/WPFUI.cs @@ -47,4 +47,4 @@ internal static UIDialogResult ShowDialog(UIMode uiMode, SerializableException e } } } -} +} \ No newline at end of file diff --git a/NBug/Core/UI/WinForms/Feedback.cs b/NBug/Core/UI/WinForms/Feedback.cs index 138d497..5396f86 100644 --- a/NBug/Core/UI/WinForms/Feedback.cs +++ b/NBug/Core/UI/WinForms/Feedback.cs @@ -10,4 +10,4 @@ public Feedback() this.Icon = Properties.Resources.NBug_icon_16; } } -} +} \ No newline at end of file diff --git a/NBug/Core/UI/WinForms/Full.cs b/NBug/Core/UI/WinForms/Full.cs index 1276be4..1d73ee5 100644 --- a/NBug/Core/UI/WinForms/Full.cs +++ b/NBug/Core/UI/WinForms/Full.cs @@ -6,13 +6,12 @@ namespace NBug.Core.UI.WinForms { + using NBug.Core.Reporting.Info; + using NBug.Core.Util.Serialization; 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; @@ -36,7 +35,7 @@ internal Full() 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; @@ -46,10 +45,10 @@ internal UIDialogResult ShowDialog(SerializableException exception, Report repor 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(); @@ -89,4 +88,4 @@ private void ReportContentsTabPage_Enter(object sender, EventArgs e) }*/ } } -} +} \ No newline at end of file diff --git a/NBug/Core/UI/WinForms/Minimal.cs b/NBug/Core/UI/WinForms/Minimal.cs index abfd837..8afb018 100644 --- a/NBug/Core/UI/WinForms/Minimal.cs +++ b/NBug/Core/UI/WinForms/Minimal.cs @@ -6,10 +6,9 @@ namespace NBug.Core.UI.WinForms { + using NBug.Core.Reporting.Info; using System.Windows.Forms; - using NBug.Core.Reporting.Info; - internal class Minimal { internal UIDialogResult ShowDialog(Report report) @@ -24,4 +23,4 @@ internal UIDialogResult ShowDialog(Report report) return new UIDialogResult(ExecutionFlow.BreakExecution, SendReport.Send); } } -} +} \ No newline at end of file diff --git a/NBug/Core/UI/WinForms/Normal.cs b/NBug/Core/UI/WinForms/Normal.cs index bde102a..f6eeb72 100644 --- a/NBug/Core/UI/WinForms/Normal.cs +++ b/NBug/Core/UI/WinForms/Normal.cs @@ -6,12 +6,11 @@ namespace NBug.Core.UI.WinForms { + using NBug.Core.Reporting.Info; using System; using System.Drawing; using System.Windows.Forms; - using NBug.Core.Reporting.Info; - internal partial class Normal : Form { private UIDialogResult uiDialogResult; @@ -48,4 +47,4 @@ private void QuitButton_Click(object sender, EventArgs e) this.Close(); } } -} +} \ No newline at end of file diff --git a/NBug/Core/UI/WinForms/Panels/ExceptionDetailView.cs b/NBug/Core/UI/WinForms/Panels/ExceptionDetailView.cs index c7af360..42766a3 100644 --- a/NBug/Core/UI/WinForms/Panels/ExceptionDetailView.cs +++ b/NBug/Core/UI/WinForms/Panels/ExceptionDetailView.cs @@ -28,4 +28,4 @@ private void CloseButton_Click(object sender, EventArgs e) this.Close(); } } -} +} \ No newline at end of file diff --git a/NBug/Core/UI/WinForms/Panels/ExceptionDetails.cs b/NBug/Core/UI/WinForms/Panels/ExceptionDetails.cs index 1e86a60..4ef4ea6 100644 --- a/NBug/Core/UI/WinForms/Panels/ExceptionDetails.cs +++ b/NBug/Core/UI/WinForms/Panels/ExceptionDetails.cs @@ -6,13 +6,12 @@ namespace NBug.Core.UI.WinForms.Panels { + using NBug.Core.Util.Serialization; 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(); @@ -82,7 +81,7 @@ private void DisplayExceptionDetails(TreeNode node) 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) @@ -110,7 +109,7 @@ private void ExceptionDetailsListView_DoubleClick(object sender, EventArgs e) using (var detailView = new ExceptionDetailView()) { detailView.ShowDialog( - this.exceptionDetailsListView.SelectedItems[0].Text, + this.exceptionDetailsListView.SelectedItems[0].Text, this.exceptionDetailsListView.SelectedItems[0].SubItems[1].Text); } } @@ -136,4 +135,4 @@ private void FillInnerExceptionTree(SerializableException innerException, TreeNo } } } -} +} \ No newline at end of file diff --git a/NBug/Core/UI/WinForms/WinFormsUI.cs b/NBug/Core/UI/WinForms/WinFormsUI.cs index d03e6ac..977b65d 100644 --- a/NBug/Core/UI/WinForms/WinFormsUI.cs +++ b/NBug/Core/UI/WinForms/WinFormsUI.cs @@ -43,4 +43,4 @@ internal static UIDialogResult ShowDialog(UIMode uiMode, SerializableException e } } } -} +} \ No newline at end of file diff --git a/NBug/Core/Util/ConnectionStringParser.cs b/NBug/Core/Util/ConnectionStringParser.cs index a8f70fa..81f21d4 100644 --- a/NBug/Core/Util/ConnectionStringParser.cs +++ b/NBug/Core/Util/ConnectionStringParser.cs @@ -1,7 +1,7 @@ +using NBug.Core.Util.Exceptions; using System; using System.Collections.Generic; using System.Text.RegularExpressions; -using NBug.Core.Util.Exceptions; namespace NBug.Core.Util { diff --git a/NBug/Core/Util/ExceptionThread.cs b/NBug/Core/Util/ExceptionThread.cs index 30f6360..2b5ed89 100644 --- a/NBug/Core/Util/ExceptionThread.cs +++ b/NBug/Core/Util/ExceptionThread.cs @@ -7,4 +7,4 @@ internal enum ExceptionThread UI_WPF, Task } -} +} \ No newline at end of file diff --git a/NBug/Core/Util/Exceptions/NBugConfigurationException.cs b/NBug/Core/Util/Exceptions/NBugConfigurationException.cs index b79b94a..5726fc6 100644 --- a/NBug/Core/Util/Exceptions/NBugConfigurationException.cs +++ b/NBug/Core/Util/Exceptions/NBugConfigurationException.cs @@ -12,12 +12,14 @@ namespace NBug.Core.Util.Exceptions [Serializable] public class NBugConfigurationException : NBugException { - public NBugConfigurationException(string message, Exception inner) : base(message, inner) + public NBugConfigurationException(string message, Exception inner) + : base(message, inner) { this.MisconfiguredProperty = string.Empty; } - private NBugConfigurationException(string propertyName, string message) : base(message) + private NBugConfigurationException(string propertyName, string message) + : base(message) { this.MisconfiguredProperty = propertyName; } @@ -29,4 +31,4 @@ public static NBugConfigurationException Create(Expression> propertyE return new NBugConfigurationException(((MemberExpression)propertyExpression.Body).Member.Name, message); } } -} +} \ No newline at end of file diff --git a/NBug/Core/Util/Exceptions/NBugException.cs b/NBug/Core/Util/Exceptions/NBugException.cs index bf783c6..2f71d20 100644 --- a/NBug/Core/Util/Exceptions/NBugException.cs +++ b/NBug/Core/Util/Exceptions/NBugException.cs @@ -16,16 +16,19 @@ public NBugException() { } - public NBugException(string message) : base(message) + public NBugException(string message) + : base(message) { } - public NBugException(string message, Exception inner) : base(message, inner) + public NBugException(string message, Exception inner) + : base(message, inner) { } - protected NBugException(SerializationInfo info, StreamingContext context) : base(info, context) + protected NBugException(SerializationInfo info, StreamingContext context) + : base(info, context) { } } -} +} \ No newline at end of file diff --git a/NBug/Core/Util/Exceptions/NBugRuntimeException.cs b/NBug/Core/Util/Exceptions/NBugRuntimeException.cs index 7977787..55eda2e 100644 --- a/NBug/Core/Util/Exceptions/NBugRuntimeException.cs +++ b/NBug/Core/Util/Exceptions/NBugRuntimeException.cs @@ -11,12 +11,14 @@ namespace NBug.Core.Util.Exceptions [Serializable] public class NBugRuntimeException : NBugException { - public NBugRuntimeException(string message, Exception inner) : base(message, inner) + public NBugRuntimeException(string message, Exception inner) + : base(message, inner) { } - public NBugRuntimeException(string message) : base(message) + public NBugRuntimeException(string message) + : base(message) { } } -} +} \ No newline at end of file diff --git a/NBug/Core/Util/Logging/Logger.cs b/NBug/Core/Util/Logging/Logger.cs index 2fdec0f..bb213fc 100644 --- a/NBug/Core/Util/Logging/Logger.cs +++ b/NBug/Core/Util/Logging/Logger.cs @@ -6,13 +6,12 @@ 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; + using System; + using System.IO; + using System.Linq.Expressions; /// /// Uses method to log important messages. Also provides a @@ -49,12 +48,12 @@ static Logger() /// 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); @@ -135,4 +134,4 @@ private static void Write(string message, LoggerCategory category) } } } -} +} \ No newline at end of file diff --git a/NBug/Core/Util/ProtectedConfiguration.cs b/NBug/Core/Util/ProtectedConfiguration.cs index c0d6dc9..137fb1b 100644 --- a/NBug/Core/Util/ProtectedConfiguration.cs +++ b/NBug/Core/Util/ProtectedConfiguration.cs @@ -86,4 +86,4 @@ internal static void UnProtectConfiguration() } }*/ } -} +} \ No newline at end of file diff --git a/NBug/Core/Util/PublicResources.cs b/NBug/Core/Util/PublicResources.cs index aea60fd..0dca883 100644 --- a/NBug/Core/Util/PublicResources.cs +++ b/NBug/Core/Util/PublicResources.cs @@ -11,6 +11,7 @@ namespace NBug.Core.Util public class PublicResources { private string ui_Console_Full_Message; + public string UI_Console_Full_Message { get @@ -25,6 +26,7 @@ public string UI_Console_Full_Message } private string ui_Console_Minimal_Message; + public string UI_Console_Minimal_Message { get @@ -39,6 +41,7 @@ public string UI_Console_Minimal_Message } private string ui_Console_Normal_Message; + public string UI_Console_Normal_Message { get @@ -51,8 +54,9 @@ public string UI_Console_Normal_Message this.ui_Console_Normal_Message = value; } } - + private string ui_Dialog_Minimal_Message; + public string UI_Dialog_Minimal_Message { get @@ -67,6 +71,7 @@ public string UI_Dialog_Minimal_Message } private string ui_Dialog_Normal_Message; + public string UI_Dialog_Normal_Message { get @@ -81,6 +86,7 @@ public string UI_Dialog_Normal_Message } private string ui_Dialog_Normal_Title; + public string UI_Dialog_Normal_Title { get @@ -95,6 +101,7 @@ public string UI_Dialog_Normal_Title } private string ui_Dialog_Normal_Continue_Button; + public string UI_Dialog_Normal_Continue_Button { get @@ -109,6 +116,7 @@ public string UI_Dialog_Normal_Continue_Button } private string ui_Dialog_Normal_Quit_Button; + public string UI_Dialog_Normal_Quit_Button { get @@ -123,6 +131,7 @@ public string UI_Dialog_Normal_Quit_Button } private string ui_Dialog_Full_Message; + public string UI_Dialog_Full_Message { get @@ -137,6 +146,7 @@ public string UI_Dialog_Full_Message } private string ui_Dialog_Full_Title; + public string UI_Dialog_Full_Title { get @@ -151,6 +161,7 @@ public string UI_Dialog_Full_Title } private string ui_Dialog_Full_General_Tab; + public string UI_Dialog_Full_General_Tab { get @@ -165,6 +176,7 @@ public string UI_Dialog_Full_General_Tab } private string ui_Dialog_Full_Exception_Tab; + public string UI_Dialog_Full_Exception_Tab { get @@ -179,6 +191,7 @@ public string UI_Dialog_Full_Exception_Tab } private string ui_Dialog_Full_Report_Contents_Tab; + public string UI_Dialog_Full_Report_Contents_Tab { get @@ -193,6 +206,7 @@ public string UI_Dialog_Full_Report_Contents_Tab } private string ui_Dialog_Full_How_to_Reproduce_the_Error_Notification; + public string UI_Dialog_Full_How_to_Reproduce_the_Error_Notification { get @@ -207,6 +221,7 @@ public string UI_Dialog_Full_How_to_Reproduce_the_Error_Notification } private string ui_Dialog_Full_Quit_Button; + public string UI_Dialog_Full_Quit_Button { get @@ -221,6 +236,7 @@ public string UI_Dialog_Full_Quit_Button } private string ui_Dialog_Full_Send_and_Quit_Button; + public string UI_Dialog_Full_Send_and_Quit_Button { get @@ -234,4 +250,4 @@ public string UI_Dialog_Full_Send_and_Quit_Button } } } -} +} \ No newline at end of file diff --git a/NBug/Core/Util/Serialization/SerializableDictionary.cs b/NBug/Core/Util/Serialization/SerializableDictionary.cs index cc0c10a..5b0a77d 100644 --- a/NBug/Core/Util/Serialization/SerializableDictionary.cs +++ b/NBug/Core/Util/Serialization/SerializableDictionary.cs @@ -76,4 +76,4 @@ public void WriteXml(XmlWriter writer) } } } -} +} \ No newline at end of file diff --git a/NBug/Core/Util/Serialization/SerializableException.cs b/NBug/Core/Util/Serialization/SerializableException.cs index 0f8cdf2..a4837d7 100644 --- a/NBug/Core/Util/Serialization/SerializableException.cs +++ b/NBug/Core/Util/Serialization/SerializableException.cs @@ -7,7 +7,6 @@ using System.IO; using System.Xml.Linq; using System.Xml.Serialization; -using NBug.Core.Reporting.Info; namespace NBug.Core.Util.Serialization { @@ -20,7 +19,7 @@ namespace NBug.Core.Util.Serialization public class SerializableException { /// - /// Initializes a new instance of the class. + /// Initializes a new instance of the class. /// Default constructor provided for XML serialization and de-serialization. /// public SerializableException() @@ -89,7 +88,7 @@ public SerializableException(Exception exception) if (exception.TargetSite != null) { - this.TargetSite = String.Format("{0} @ {1}", exception.TargetSite, exception.TargetSite.DeclaringType); + this.TargetSite = String.Format("{0} @ {1}", exception.TargetSite, exception.TargetSite.DeclaringType); } this.ExtendedInformation = this.GetExtendedInformation(exception); @@ -104,7 +103,7 @@ public SerializableException(Exception exception) public SerializableException InnerException { get; set; } public List InnerExceptions { get; set; } - + public string Message { get; set; } public string Source { get; set; } @@ -113,18 +112,18 @@ public SerializableException(Exception exception) // This will make TargetSite property XML serializable but RuntimeMethodInfo class does not have a parameterless // constructor thus the serializer throws an exception if full info is used - public string TargetSite { get; set; } + public string TargetSite { get; set; } public string Type { get; set; } private SerializableDictionary GetExtendedInformation(Exception exception) { var extendedProperties = from property in exception.GetType().GetProperties() - where + where property.Name != "Data" && property.Name != "InnerExceptions" && property.Name != "InnerException" && - property.Name != "Message" && property.Name != "Source" && property.Name != "StackTrace" && + property.Name != "Message" && property.Name != "Source" && property.Name != "StackTrace" && property.Name != "TargetSite" && property.Name != "HelpLink" && property.CanRead - select property; + select property; if (extendedProperties.Count() != 0) { @@ -148,9 +147,9 @@ public override string ToString() var serializer = new XmlSerializer(typeof(SerializableException)); using (var stream = new MemoryStream()) { - stream.SetLength(0); + stream.SetLength(0); serializer.Serialize(stream, this); - stream.Position = 0; + stream.Position = 0; var doc = XDocument.Load(stream); return doc.Root.ToString(); } diff --git a/NBug/Core/Util/Storage/StoragePath.cs b/NBug/Core/Util/Storage/StoragePath.cs index 7200df7..8e6fee0 100644 --- a/NBug/Core/Util/Storage/StoragePath.cs +++ b/NBug/Core/Util/Storage/StoragePath.cs @@ -28,7 +28,7 @@ internal StoragePath(string storagePath) storagePathString = storagePath; storagePathEnum = Enums.StoragePath.Custom; } - + public static implicit operator StoragePath(Enums.StoragePath path) { return new StoragePath(path); @@ -57,4 +57,4 @@ public static implicit operator string(StoragePath path) return storagePathString; } } -} +} \ No newline at end of file diff --git a/NBug/Core/Util/Storage/Storer.cs b/NBug/Core/Util/Storage/Storer.cs index 38bac06..0474561 100644 --- a/NBug/Core/Util/Storage/Storer.cs +++ b/NBug/Core/Util/Storage/Storer.cs @@ -6,14 +6,13 @@ namespace NBug.Core.Util.Storage { + using NBug.Core.Util.Exceptions; + using NBug.Core.Util.Logging; using System; using System.IO; using System.IO.IsolatedStorage; using System.Linq; - using NBug.Core.Util.Exceptions; - using NBug.Core.Util.Logging; - /// /// Initializes a new instance of the Storage class. This class implements interface /// so it is better used with a using {...} statement. @@ -117,7 +116,7 @@ internal static void TruncateReportFiles(int maxQueuedReports) { Logger.Trace("Truncating extra " + extraCount + " report files from the isolates storage."); } - + foreach (var file in isoFile.GetFileNames("Exception_*.zip")) { extraCount--; @@ -193,7 +192,7 @@ internal Stream CreateReportFile(string reportFileName) internal void DeleteCurrentReportFile() { this.stream.Close(); - + if (this.stream is IsolatedStorageFileStream) { Logger.Trace("Deleting report file from isolated storage: " + this.FileName); @@ -270,7 +269,7 @@ internal Stream GetFirstReportFile() else if (Settings.StoragePath == Enums.StoragePath.IsolatedStorage) { this.isoStore = IsolatedStorageFile.GetStore(IsolatedStorageScope.User | IsolatedStorageScope.Assembly | IsolatedStorageScope.Domain, null, null); - + if (this.isoStore.GetFileNames("Exception_*.zip").Count() > 0) { try @@ -381,4 +380,4 @@ private void Dispose(bool disposing) this.disposed = true; } } -} +} \ No newline at end of file diff --git a/NBug/Core/Util/Storage/ZipStorer.cs b/NBug/Core/Util/Storage/ZipStorer.cs index 13ca9e2..46038cc 100644 --- a/NBug/Core/Util/Storage/ZipStorer.cs +++ b/NBug/Core/Util/Storage/ZipStorer.cs @@ -78,11 +78,12 @@ internal class ZipStorer : IDisposable /// private Stream ZipFileStream; - #endregion + #endregion Constants and Fields // File access for Open method // Static constructor. Just invoked once in order to create the CRC32 lookup table. + #region Constructors and Destructors /// @@ -111,7 +112,7 @@ static ZipStorer() } } - #endregion + #endregion Constructors and Destructors #region Enums @@ -123,7 +124,7 @@ public enum Compression : ushort /// /// Uncompressed storage /// - Store = 0, + Store = 0, /// /// Deflate compression method @@ -131,7 +132,7 @@ public enum Compression : ushort Deflate = 8 } - #endregion + #endregion Enums #region Public Methods @@ -563,7 +564,7 @@ public List ReadCentralDir() var result = new List(); - for (int pointer = 0; pointer < this.CentralDirImage.Length;) + for (int pointer = 0; pointer < this.CentralDirImage.Length; ) { uint signature = BitConverter.ToUInt32(this.CentralDirImage, pointer); if (signature != 0x02014b50) @@ -607,7 +608,7 @@ public List ReadCentralDir() return result; } - #endregion + #endregion Public Methods #region Implemented Interfaces @@ -621,20 +622,21 @@ public void Dispose() this.Close(); } - #endregion + #endregion IDisposable - #endregion + #endregion Implemented Interfaces /* DOS Date and time: - MS-DOS date. The date is a packed value with the following format. Bits Description - 0-4 Day of the month (1–31) - 5-8 Month (1 = January, 2 = February, and so on) - 9-15 Year offset from 1980 (add 1980 to get actual year) - MS-DOS time. The time is a packed value with the following format. Bits Description - 0-4 Second divided by 2 - 5-10 Minute (0–59) - 11-15 Hour (0–23 on a 24-hour clock) + MS-DOS date. The date is a packed value with the following format. Bits Description + 0-4 Day of the month (1–31) + 5-8 Month (1 = January, 2 = February, and so on) + 9-15 Year offset from 1980 (add 1980 to get actual year) + MS-DOS time. The time is a packed value with the following format. Bits Description + 0-4 Second divided by 2 + 5-10 Minute (0–59) + 11-15 Hour (0–23 on a 24-hour clock) */ + #region Methods /// @@ -665,11 +667,11 @@ private uint DateTimeToDosTime(DateTime _dt) private DateTime DosTimeToDateTime(uint _dt) { return new DateTime( - (int)(_dt >> 25) + 1980, - (int)(_dt >> 21) & 15, - (int)(_dt >> 16) & 31, - (int)(_dt >> 11) & 31, - (int)(_dt >> 5) & 63, + (int)(_dt >> 25) + 1980, + (int)(_dt >> 21) & 15, + (int)(_dt >> 16) & 31, + (int)(_dt >> 11) & 31, + (int)(_dt >> 5) & 63, (int)(_dt & 31) * 2); } @@ -696,7 +698,7 @@ private uint GetFileOffset(uint _headerOffset) } /* CRC32 algorithm - The 'magic number' for the CRC is 0xdebb20e3. + The 'magic number' for the CRC is 0xdebb20e3. The proper CRC pre and post conditioning is used, meaning that the CRC register is pre-conditioned with all ones (a starting value @@ -846,7 +848,7 @@ private void Store(ref ZipFileEntry _zfe, Stream _source) // Verify for real compression if (_zfe.Method == Compression.Deflate && !this.ForceDeflating && _source.CanSeek && - _zfe.CompressedSize > _zfe.FileSize) + _zfe.CompressedSize > _zfe.FileSize) { // Start operation again with Store algorithm _zfe.Method = Compression.Store; @@ -893,7 +895,7 @@ private void WriteCentralDirRecord(ZipFileEntry _zfe) this.ZipFileStream.Write(new byte[] { 80, 75, 1, 2, 23, 0xB, 20, 0 }, 0, 8); this.ZipFileStream.Write(BitConverter.GetBytes((ushort)(_zfe.EncodeUTF8 ? 0x0800 : 0)), 0, 2); - // filename and comment encoding + // filename and comment encoding this.ZipFileStream.Write(BitConverter.GetBytes((ushort)_zfe.Method), 0, 2); // zipping method this.ZipFileStream.Write(BitConverter.GetBytes(this.DateTimeToDosTime(_zfe.ModifyTime)), 0, 4); @@ -970,7 +972,7 @@ private void WriteLocalHeader(ref ZipFileEntry _zfe) this.ZipFileStream.Write(new byte[] { 80, 75, 3, 4, 20, 0 }, 0, 6); // No extra header this.ZipFileStream.Write(BitConverter.GetBytes((ushort)(_zfe.EncodeUTF8 ? 0x0800 : 0)), 0, 2); - // filename and comment encoding + // filename and comment encoding this.ZipFileStream.Write(BitConverter.GetBytes((ushort)_zfe.Method), 0, 2); // zipping method this.ZipFileStream.Write(BitConverter.GetBytes(this.DateTimeToDosTime(_zfe.ModifyTime)), 0, 4); @@ -985,7 +987,7 @@ private void WriteLocalHeader(ref ZipFileEntry _zfe) _zfe.HeaderSize = (uint)(this.ZipFileStream.Position - pos); } - #endregion + #endregion Methods /// /// Represents an entry in Zip file directory @@ -1049,7 +1051,7 @@ public struct ZipFileEntry /// public DateTime ModifyTime; - #endregion + #endregion Constants and Fields #region Public Methods @@ -1064,7 +1066,7 @@ public override string ToString() return this.FilenameInZip; } - #endregion + #endregion Public Methods } } } \ No newline at end of file diff --git a/NBug/Core/Util/Web/StreamUpload.cs b/NBug/Core/Util/Web/StreamUpload.cs index 2793a5a..150e5d7 100644 --- a/NBug/Core/Util/Web/StreamUpload.cs +++ b/NBug/Core/Util/Web/StreamUpload.cs @@ -6,13 +6,11 @@ // -------------------------------------------------------------------------------------------------------------------- using System; -using System.Collections.Generic; -using System.Linq; -using System.Text; -using System.IO; using System.Collections.Specialized; -using System.Net; using System.Globalization; +using System.IO; +using System.Net; +using System.Text; namespace NBug.Core.Util.Web { @@ -45,14 +43,13 @@ public StreamUpload Upload(string url) request.ContentType = string.Format("multipart/form-data; boundary={0}", boundary); request.Method = "POST"; - if(credentials != null) + if (credentials != null) { var user = credentials.GetCredential(request.RequestUri, "Basic"); string auth = string.Format("{0}:{1}", user.UserName, user.Password); request.Headers.Add("Authorization", "Basic " + Convert.ToBase64String(Encoding.ASCII.GetBytes(auth))); } - WriteToHttpStream(request, outputStream); response = request.GetResponse(); return this; @@ -68,10 +65,10 @@ public StreamUpload Add(string name, string value) public StreamUpload AddNameValues(NameValueCollection nameValues) { - foreach(string name in nameValues.Keys) + foreach (string name in nameValues.Keys) { Add(name, nameValues[name]); - } + } return this; } @@ -91,7 +88,7 @@ public StreamUpload Add(Stream inputStream, string formName, string fileName, st byte[] buffer = new byte[inputStream.Length]; int bytesRead = 0; - while((bytesRead = inputStream.Read(buffer, 0, buffer.Length)) != 0) + while ((bytesRead = inputStream.Read(buffer, 0, buffer.Length)) != 0) { outputStream.Write(buffer, 0, bytesRead); } @@ -122,7 +119,7 @@ private void WriteBoundaryToStream(MemoryStream stream, string endDeliminator) private void WriteNameValuesToStream(MemoryStream stream, NameValueCollection nameValues) { - foreach(string name in nameValues.Keys) + foreach (string name in nameValues.Keys) { WriteBoundaryToStream(stream, Environment.NewLine); @@ -135,7 +132,7 @@ private void WriteToHttpStream(HttpWebRequest request, MemoryStream outputStream { request.ContentLength = outputStream.Length; - using(Stream requestStream = request.GetRequestStream()) + using (Stream requestStream = request.GetRequestStream()) { outputStream.Position = 0; diff --git a/NBug/Enums/LoggerCategory.cs b/NBug/Enums/LoggerCategory.cs index 4627298..d2ba245 100644 --- a/NBug/Enums/LoggerCategory.cs +++ b/NBug/Enums/LoggerCategory.cs @@ -15,7 +15,7 @@ public enum LoggerCategory NBugTrace, /// - /// This category outputs results of substantial events like the server response after submitting a bug report to the a server. + /// This category outputs results of substantial events like the server response after submitting a bug report to the a server. /// NBugInfo, diff --git a/NBug/Enums/UIProvider.cs b/NBug/Enums/UIProvider.cs index 6705840..5d871c1 100644 --- a/NBug/Enums/UIProvider.cs +++ b/NBug/Enums/UIProvider.cs @@ -28,9 +28,9 @@ public enum UIProvider /// WPF, - /// - /// Custom UIProvider. - /// - Custom + /// + /// Custom UIProvider. + /// + Custom } } \ No newline at end of file diff --git a/NBug/Events/CustomSubmissionEventArgs.cs b/NBug/Events/CustomSubmissionEventArgs.cs new file mode 100644 index 0000000..7a0be10 --- /dev/null +++ b/NBug/Events/CustomSubmissionEventArgs.cs @@ -0,0 +1,29 @@ +namespace NBug +{ + using NBug.Core.Reporting.Info; + using NBug.Core.Util.Serialization; + using System; + using System.IO; + + public class CustomSubmissionEventArgs : EventArgs + { + internal CustomSubmissionEventArgs(string fileName, Stream file, Report report, SerializableException exception) + { + FileName = fileName; + File = file; + Report = report; + Exception = exception; + Result = false; + } + + public string FileName { get; private set; } + + public Stream File { get; private set; } + + public Report Report { get; private set; } + + public SerializableException Exception { get; private set; } + + public bool Result { get; set; } + } +} \ No newline at end of file diff --git a/NBug/Events/CustomUIEventArgs.cs b/NBug/Events/CustomUIEventArgs.cs index bab1a09..20f1b75 100644 --- a/NBug/Events/CustomUIEventArgs.cs +++ b/NBug/Events/CustomUIEventArgs.cs @@ -1,26 +1,27 @@ namespace NBug { - using System; - using System.Collections.Generic; - using System.Linq; - using NBug.Core.Reporting.Info; - using NBug.Core.Util.Serialization; - using NBug.Core.UI; - using NBug.Enums; + using NBug.Core.Reporting.Info; + using NBug.Core.UI; + using NBug.Core.Util.Serialization; + using NBug.Enums; + using System; - public class CustomUIEventArgs : EventArgs - { - internal CustomUIEventArgs(UIMode uiMode, SerializableException exception, Report report) - { - UIMode = uiMode; - Report = report; - Exception = exception; - Result = new UIDialogResult(ExecutionFlow.BreakExecution, SendReport.DoNotSend); - } + public class CustomUIEventArgs : EventArgs + { + internal CustomUIEventArgs(UIMode uiMode, SerializableException exception, Report report) + { + UIMode = uiMode; + Report = report; + Exception = exception; + Result = new UIDialogResult(ExecutionFlow.BreakExecution, SendReport.DoNotSend); + } - public UIMode UIMode { get; private set; } - public Report Report { get; private set; } - public SerializableException Exception { get; private set; } - public UIDialogResult Result { get; set; } - } -} + public UIMode UIMode { get; private set; } + + public Report Report { get; private set; } + + public SerializableException Exception { get; private set; } + + public UIDialogResult Result { get; set; } + } +} \ No newline at end of file diff --git a/NBug/Exceptions.cs b/NBug/Exceptions.cs index d089305..4039220 100644 --- a/NBug/Exceptions.cs +++ b/NBug/Exceptions.cs @@ -6,12 +6,10 @@ namespace NBug { - using System; - using NBug.Core.Reporting; using NBug.Core.Reporting.MiniDump; - using NBug.Core.Submission; using NBug.Core.Util; + using System; public static class Exceptions { @@ -19,12 +17,12 @@ public static class Exceptions /// This function acts as an exception filter for any exception that is raised from within the action body (you can see /// MSDN subject "Exception Filters" to get more info on the subject). As the name implies, exceptions raised from within /// the action block is simply filtered to be sent as an error report, and never actually caught or handled. Filters all - /// the exceptions inside the action body and queues an error report. Note that the exceptions are not actually handled, - /// but filtered, so if the exception is left unhandled in an upper block, it will crash the application. This is very + /// the exceptions inside the action body and queues an error report. Note that the exceptions are not actually handled, + /// but filtered, so if the exception is left unhandled in an upper block, it will crash the application. This is very /// useful for situations where you need to log exceptions inside a code block and get a good minidump of the exception. /// Use the method to actually handle the exception and show an exception dialog to the /// user and shut down the application gracefully (if set so). You can simply use Filter(() => { MyCodeHere(); }) - /// + /// /// Body of code to be executed. public static void Filter(Action body) { @@ -46,18 +44,18 @@ public static void Handle(bool continueExecution, Action body) ExceptionFilters.Filter( body, ex => - { - // Filtering the exception - new BugReport().Report(ex, ExceptionThread.Main); - return true; // Yes proceed to handling the exception - }, + { + // Filtering the exception + new BugReport().Report(ex, ExceptionThread.Main); + return true; // Yes proceed to handling the exception + }, ex => + { + if (!continueExecution) { - if (!continueExecution) - { - Environment.Exit(0); - } - }); + Environment.Exit(0); + } + }); } /// @@ -71,4 +69,4 @@ public static void Report(Exception exception) new BugReport().Report(exception, ExceptionThread.Main); } } -} +} \ No newline at end of file diff --git a/NBug/Handler.cs b/NBug/Handler.cs index 3488b45..ee63f18 100644 --- a/NBug/Handler.cs +++ b/NBug/Handler.cs @@ -6,6 +6,10 @@ namespace NBug { + using NBug.Core.Reporting; + using NBug.Core.UI; + using NBug.Core.Util; + using NBug.Core.Util.Logging; using System; using System.Runtime.ExceptionServices; using System.Threading; @@ -13,11 +17,6 @@ namespace NBug using System.Windows.Forms; using System.Windows.Threading; - using NBug.Core.Reporting; - using NBug.Core.UI; - using NBug.Core.Util; - using NBug.Core.Util.Logging; - public static class Handler { static Handler() @@ -122,7 +121,7 @@ private static void UnhandledExceptionHandler(object sender, UnhandledExceptionE if (executionFlow == ExecutionFlow.BreakExecution) { Environment.Exit(0); - } + } } } @@ -149,7 +148,7 @@ private static void ThreadExceptionHandler(object sender, ThreadExceptionEventAr if (executionFlow == ExecutionFlow.BreakExecution) { Environment.Exit(0); - } + } } } @@ -179,7 +178,7 @@ private static void DispatcherUnhandledExceptionHandler(object sender, Dispatche else if (executionFlow == ExecutionFlow.ContinueExecution) { e.Handled = true; - } + } } } @@ -209,7 +208,7 @@ private static void UnobservedTaskExceptionHandler(object sender, UnobservedTask else if (executionFlow == ExecutionFlow.ContinueExecution) { e.SetObserved(); - } + } } } @@ -219,4 +218,4 @@ private static void CorruptUnobservedTaskExceptionHandler(object sender, Unobser UnobservedTaskExceptionHandler(sender, e); } } -} +} \ No newline at end of file diff --git a/NBug/NBug.csproj b/NBug/NBug.csproj index ffe6db6..c40b685 100644 --- a/NBug/NBug.csproj +++ b/NBug/NBug.csproj @@ -70,6 +70,7 @@ Properties\GlobalAssemblyInfo.cs + @@ -95,6 +96,7 @@ + diff --git a/NBug/Properties/AssemblyInfo.cs b/NBug/Properties/AssemblyInfo.cs index 07c6fad..0fd1807 100644 --- a/NBug/Properties/AssemblyInfo.cs +++ b/NBug/Properties/AssemblyInfo.cs @@ -8,15 +8,15 @@ using System.Runtime.CompilerServices; using System.Runtime.InteropServices; -// General Information about an assembly is controlled through the following +// 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")] [assembly: AssemblyDescription("NBug bug reporting 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 +// 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)] @@ -30,10 +30,10 @@ // Version information for an assembly consists of the following four values: // // Major Version -// Minor Version +// Minor Version // Build Number // Revision // -// You can specify all the values or you can default the Build and Revision Numbers +// 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/Properties/SettingsOverride.cs b/NBug/Properties/SettingsOverride.cs index 5def70c..8f0a160 100644 --- a/NBug/Properties/SettingsOverride.cs +++ b/NBug/Properties/SettingsOverride.cs @@ -9,7 +9,7 @@ namespace NBug.Properties using System.IO; using System.Xml; using System.Xml.Linq; - + public static class SettingsOverride { /// @@ -69,4 +69,4 @@ public static void SaveCustomSettings(Stream settingsFile) NBug.Settings.SaveCustomSettings(settingsFile, false); } } -} +} \ No newline at end of file diff --git a/NBug/Settings.cs b/NBug/Settings.cs index 9ece3e2..5a44f70 100644 --- a/NBug/Settings.cs +++ b/NBug/Settings.cs @@ -6,6 +6,14 @@ namespace NBug { + using NBug.Core.Reporting; + using NBug.Core.Reporting.Info; + using NBug.Core.Submission; + using NBug.Core.Util; + using NBug.Core.Util.Exceptions; + using NBug.Core.Util.Logging; + using NBug.Enums; + using NBug.Properties; using System; using System.Collections.Generic; using System.Collections.ObjectModel; @@ -21,24 +29,15 @@ namespace NBug using System.Xml.Linq; using System.Xml.XPath; - using NBug.Core.Reporting; - using NBug.Core.Reporting.Info; - using NBug.Core.Submission; - using NBug.Core.Util; - using NBug.Core.Util.Exceptions; - using NBug.Core.Util.Logging; - using NBug.Enums; - using NBug.Properties; - public static class Settings { /// /// Lookup for quickly finding the type to instantiate for a given connection string type. - /// + /// /// By making this lazy we don't do the lookup until we know we have to, as /// reflection against all assemblies can be slow. /// - private static readonly Lazy> _availableProtocols + private static readonly Lazy> _availableProtocols = new Lazy>(() => { // find all concrete implementations of IProtocolFactory @@ -48,7 +47,7 @@ private static readonly Lazy> _availablePr .Where(type.IsAssignableFrom) .Where(t => t.IsClass) .Where(t => !t.IsAbstract) - .Select(t => (IProtocolFactory) Activator.CreateInstance(t)) + .Select(t => (IProtocolFactory)Activator.CreateInstance(t)) .ToDictionary(f => f.SupportedType); }); @@ -62,16 +61,16 @@ static Settings() // Default to developer mode settings. Settings this now so that any exception below will be handled with correct settings ReleaseMode = false; // ToDo: This results initial config loading always setup to ThrowExceptions = true; - + // Check to see if the settings are overriden manually. If so, don't load the settings file automatically. if (SettingsOverride.Overridden == false) { - /* - * Settings file search order: - * 1) NBug.config (inside the same folder with 'NBug.dll') - * 2) NBug.dll.config (fool proof!) (inside the same folder with 'NBug.dll') - * 3) app.config (i.e. MyProduct.exe.config inside the same folder with the main executable 'MyProduct.exe') - */ + /* + * Settings file search order: + * 1) NBug.config (inside the same folder with 'NBug.dll') + * 2) NBug.dll.config (fool proof!) (inside the same folder with 'NBug.dll') + * 3) app.config (i.e. MyProduct.exe.config inside the same folder with the main executable 'MyProduct.exe') + */ var path1 = Path.Combine(NBugDirectory, "NBug.config"); var path2 = Path.Combine(NBugDirectory, "NBug.dll.config"); @@ -113,6 +112,7 @@ static Settings() } #region Public methods + /// /// Adds a destination based on a connection string. /// @@ -133,7 +133,8 @@ public static IProtocol AddDestinationFromConnectionString(string connectionStri Destinations.Add(protocol); return protocol; } - #endregion + + #endregion Public methods #region Public Settings @@ -189,11 +190,12 @@ public static event Action ProcessingException } private static readonly ICollection destinations = new Collection(); + public static ICollection Destinations { get { return destinations; } } - + /// /// Gets or sets the UI mode. You should only change this if you read the documentation and understood it. Otherwise leave it to auto. /// Default value is Auto. @@ -248,7 +250,7 @@ public static ICollection Destinations public static MiniDumpType MiniDumpType { get; set; } /// - /// Gets or sets a value indicating whether to write "NLog.log" file to disk. Otherwise, you can subscribe to log events through the + /// Gets or sets a value indicating whether to write "NLog.log" file to disk. Otherwise, you can subscribe to log events through the /// event. All the logging is done through System.Diagnostics.Trace.Write() function so you can also get /// the log with any trace listener. Default value is true. /// @@ -270,7 +272,7 @@ public static ICollection Destinations public static bool HandleProcessCorruptedStateExceptions { get; set; } /// - /// Gets or sets a value indicating whether to use the deferred reporting feature. With this feature enabled, all bug reports are sent + /// Gets or sets a value indicating whether to use the deferred reporting feature. With this feature enabled, all bug reports are sent /// after the next application start and as a background task. This helps facilitate sending of bug reports with large memory dumps /// with them. When this feature is disabled, bug reports are sent as soon as an unhandled exception is caught. For the users, it is /// very uncomfortable to wait for bug reports to be sent after an application crash, so it is best to leave this feature on. @@ -331,23 +333,41 @@ public static bool ReleaseMode /// public static List AdditionalReportFiles { get; set; } - /// - /// Gets or sets an event for a CustomUI. - /// - internal static Delegate CustomUIHandle; - public static event EventHandler CustomUIEvent - { - add - { - CustomUIHandle = Delegate.Combine(CustomUIHandle, value); - } - remove - { - CustomUIHandle = Delegate.Remove(CustomUIHandle, value); - } - } - - #endregion + /// + /// Gets or sets an event for a CustomUI. + /// + internal static Delegate CustomUIHandle; + + public static event EventHandler CustomUIEvent + { + add + { + CustomUIHandle = Delegate.Combine(CustomUIHandle, value); + } + remove + { + CustomUIHandle = Delegate.Remove(CustomUIHandle, value); + } + } + + /// + /// Gets or sets an event for a CustomSubmission. + /// + internal static Delegate CustomSubmissionHandle; + + public static event EventHandler CustomSubmissionEvent + { + add + { + CustomSubmissionHandle = Delegate.Combine(CustomSubmissionHandle, value); + } + remove + { + CustomSubmissionHandle = Delegate.Remove(CustomSubmissionHandle, value); + } + } + + #endregion Public Settings #region Internal Settings @@ -359,7 +379,7 @@ public static event EventHandler CustomUIEvent internal static bool? EnableNetworkTrace { get; set; } /// - /// Gets the Cipher text used for encrypting connection strings before saving to disk. This is automatically generated when the + /// Gets the Cipher text used for encrypting connection strings before saving to disk. This is automatically generated when the /// method method is called with encryption set to true. /// internal static byte[] Cipher { get; private set; } @@ -412,14 +432,14 @@ public static event EventHandler CustomUIEvent internal static bool SkipDispatching { get; set; } /// - /// Gets or sets a value indicating whether to remove all the statements from - /// the thread executions. Some thread sleep statements are used to increase the host application performance i.e. the + /// Gets or sets a value indicating whether to remove all the statements from + /// the thread executions. Some thread sleep statements are used to increase the host application performance i.e. the /// halts the execution of for a given number of /// seconds to let the host application initialize properly. /// internal static bool RemoveThreadSleep { get; set; } - #endregion + #endregion Internal Settings #region Load Save Settings Methods @@ -445,8 +465,8 @@ internal static void LoadCustomSettings(XElement config) if (config.XPathSelectElement("system.diagnostics") != null && config.XPathSelectElement("system.diagnostics/sharedListeners") != null) { var traceLog = from networkTrace in config.XPathSelectElements("system.diagnostics/sharedListeners/add") - where networkTrace.Attribute("initializeData") != null && networkTrace.Attribute("initializeData").Value == "NBug.Network.log" - select networkTrace; + where networkTrace.Attribute("initializeData") != null && networkTrace.Attribute("initializeData").Value == "NBug.Network.log" + select networkTrace; if (traceLog.Count() != 0) { @@ -515,7 +535,7 @@ where element.Attribute("name") != null && element.Element("value") != null } else { - Logger.Error("There is a problem with the 'applicationSettings' section of the configuration file. The property read from the file '" + property + "' is undefined. This is probably a refactoring problem, or a malformed config file."); + Logger.Error(String.Format("There is a problem with the 'applicationSettings' section of the configuration file. The property read from the file '{0}' is undefined. This is probably a refactoring problem, or a malformed config file.", property)); } } @@ -587,8 +607,8 @@ internal static void SaveCustomSettings(Stream settingsFile, bool encryptConnect else { var sectionGroup = from setting in config.Root.Element("configSections").Elements() - where setting.Attribute("name") != null && setting.Attribute("name").Value == "applicationSettings" - select setting; + where setting.Attribute("name") != null && setting.Attribute("name").Value == "applicationSettings" + select setting; if (sectionGroup.Count() == 0) { @@ -597,8 +617,8 @@ where setting.Attribute("name") != null && setting.Attribute("name").Value == "a else { var nbugSection = from section in sectionGroup.Elements() - where section.Attribute("name") != null && section.Attribute("name").Value == "NBug.Properties.Settings" - select section; + where section.Attribute("name") != null && section.Attribute("name").Value == "NBug.Properties.Settings" + select section; if (nbugSection.Count() == 0) { @@ -645,9 +665,9 @@ where section.Attribute("name") != null && section.Attribute("name").Value == "N // Replace connection strings var prefix = "NBug.Properties.Settings."; var connectionStrings = from connString in config.Root.Element("connectionStrings").Elements() - where connString.Attribute("name") != null && - connString.Attribute("name").Value.StartsWith(prefix) - select connString; + where connString.Attribute("name") != null && + connString.Attribute("name").Value.StartsWith(prefix) + select connString; connectionStrings.Remove(); if (encryptConnectionStrings) @@ -674,20 +694,20 @@ where connString.Attribute("name") != null && // Replace application setting // ToDo: This can be simplified using a loop and reflection to get all the Settings.PublicProperties to do remove-add cycle var applicationSettings = from appSetting in config.Root.Element("applicationSettings").Element("NBug.Properties.Settings").Elements() - where appSetting.Attribute("name") != null && - (appSetting.Attribute("name").Value == GetPropertyName(() => UIMode) || - appSetting.Attribute("name").Value == GetPropertyName(() => UIProvider) || - appSetting.Attribute("name").Value == GetPropertyName(() => SleepBeforeSend) || - appSetting.Attribute("name").Value == GetPropertyName(() => MaxQueuedReports) || - appSetting.Attribute("name").Value == GetPropertyName(() => StopReportingAfter) || - appSetting.Attribute("name").Value == GetPropertyName(() => StoragePath) || - appSetting.Attribute("name").Value == GetPropertyName(() => MiniDumpType) || - appSetting.Attribute("name").Value == GetPropertyName(() => WriteLogToDisk) || - appSetting.Attribute("name").Value == GetPropertyName(() => ExitApplicationImmediately) || - appSetting.Attribute("name").Value == GetPropertyName(() => HandleProcessCorruptedStateExceptions) || - appSetting.Attribute("name").Value == GetPropertyName(() => ReleaseMode) || - appSetting.Attribute("name").Value == GetPropertyName(() => DeferredReporting)) - select appSetting; + where appSetting.Attribute("name") != null && + (appSetting.Attribute("name").Value == GetPropertyName(() => UIMode) || + appSetting.Attribute("name").Value == GetPropertyName(() => UIProvider) || + appSetting.Attribute("name").Value == GetPropertyName(() => SleepBeforeSend) || + appSetting.Attribute("name").Value == GetPropertyName(() => MaxQueuedReports) || + appSetting.Attribute("name").Value == GetPropertyName(() => StopReportingAfter) || + appSetting.Attribute("name").Value == GetPropertyName(() => StoragePath) || + appSetting.Attribute("name").Value == GetPropertyName(() => MiniDumpType) || + appSetting.Attribute("name").Value == GetPropertyName(() => WriteLogToDisk) || + appSetting.Attribute("name").Value == GetPropertyName(() => ExitApplicationImmediately) || + appSetting.Attribute("name").Value == GetPropertyName(() => HandleProcessCorruptedStateExceptions) || + appSetting.Attribute("name").Value == GetPropertyName(() => ReleaseMode) || + appSetting.Attribute("name").Value == GetPropertyName(() => DeferredReporting)) + select appSetting; applicationSettings.Remove(); AddApplicationSetting(config, UIMode, () => UIMode); @@ -717,9 +737,10 @@ where appSetting.Attribute("name") != null && settingsFile.Flush(); } - #endregion + #endregion Load Save Settings Methods #region Private Methods + private static void AddConnectionString(XDocument document, string content, int number) { if (!string.IsNullOrEmpty(content)) @@ -869,6 +890,6 @@ private static string GetPropertyName(Expression> propertyExpression) return ((MemberExpression)propertyExpression.Body).Member.Name; } - #endregion + #endregion Private Methods } } \ No newline at end of file diff --git a/NBug/app.config b/NBug/app.config index b06983b..c8d4922 100644 --- a/NBug/app.config +++ b/NBug/app.config @@ -1,52 +1,52 @@  - - -
- - - - - - - Auto - - - Auto - - - 10 - - - 5 - - - 30 - - - CurrentDirectory - - - Tiny - - - True - - - True - - - False - - - False - - - True - - - - - - - + + +
+ + + + + + + Auto + + + Auto + + + 10 + + + 5 + + + 30 + + + CurrentDirectory + + + Tiny + + + True + + + True + + + False + + + False + + + True + + + + + + + \ No newline at end of file