From dae633e6b6259be11b10b768fa2320369b11ec05 Mon Sep 17 00:00:00 2001 From: Stef569 Date: Sat, 13 Jul 2013 13:45:10 +0200 Subject: [PATCH 1/3] Update Settings.cs comments. Change red to read, defered to deferred and other small changes. Remove the todo line in ToDo.txt. Update the tooltip in the configurator. --- NBug.Configurator/MainForm.resx | 10 +++---- NBug/Settings.cs | 50 ++++++++++++++++----------------- ToDo.txt | 1 - 3 files changed, 30 insertions(+), 31 deletions(-) diff --git a/NBug.Configurator/MainForm.resx b/NBug.Configurator/MainForm.resx index f216eb9..66cc4de 100644 --- a/NBug.Configurator/MainForm.resx +++ b/NBug.Configurator/MainForm.resx @@ -152,7 +152,7 @@ Use other settings in combination with proper UI provider, which also enables th Selects one of the available UI providers in combination with the proper UI mode. Don’t forget to preview your selection if you change this. -Note that the Auto mode decides the best UI provider on the run for you so it is preferable to set both UIMode & UIProvider to Auto +Note that the Auto mode decides the best UI provider on the run for you so it is preferable to set both & UIProvider to Auto if you want to get best result automatically. @@ -161,11 +161,11 @@ if you want to get best result automatically. generating bug reports for a corrupted process may not be successful, so use with caution. - Indicates whether to exit application after handling an unhandled exception or sending error report. + Indicates whether the application will exit after handling and logging an unhandled exception. This value is disregarded for anything but UIMode.None. For UIMode.None, you can choose not to exit -application which will result in 'Windows Error Reporting' (aka Dr. Watson) window to kick in. -This may also be helpful in using NBug library as a simple unhandled exception logger facility, just -to log and submit exceptions but does not interfere with the application execution flow. +the application which will result in 'Windows Error Reporting' (aka Dr. Watson) window to kick in. +This may also be helpful in using the NBug library as a simple unhandled exception logger facility, +just to log and submit exceptions but not interfering with the application execution flow. Warning: Do not change the below default values before fully reading and comprehending the documentation (Help Menu > Online Documentation) as the supplied defaults are good for most configurations. Hover your mouse over each item to get a quick tooltip explaining the item's functionality. diff --git a/NBug/Settings.cs b/NBug/Settings.cs index 7ed68b8..9ece3e2 100644 --- a/NBug/Settings.cs +++ b/NBug/Settings.cs @@ -195,13 +195,13 @@ public static ICollection Destinations } /// - /// Gets or sets the UI mode. You should only change this if you red the documentation and understood it. Otherwise leave it to auto. + /// 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. /// public static UIMode UIMode { get; set; } /// - /// Gets or sets the UI provider. You should only change this if you red the documentation and understood it. Otherwise leave it to auto. + /// Gets or sets the UI provider. You should only change this if you read the documentation and understood it. Otherwise leave it to auto. /// Default value is Auto. /// public static UIProvider UIProvider { get; set; } @@ -214,7 +214,7 @@ public static ICollection Destinations public static int SleepBeforeSend { get; set; } /// - /// Gets or sets the number of bug reports that can be queued for submission. Each time an unhandled occurs, the bug report is prepared to + /// Gets or sets the number of bug reports that can be queued for submission. Each time an unhandled exception occurs, the bug report is prepared to /// be send at the next application startup. If submission fails (i.e. there is no Internet connection), the queue grows with each additional /// unhandled exception and resulting bug reports. This limits the max no of queued reports to limit the disk space usage. /// Default value is 5. @@ -255,35 +255,35 @@ public static ICollection Destinations public static bool WriteLogToDisk { get; set; } /// - /// Gets or sets a value indicating whether to to exit application after handling an unhandled exception or sending error report. This value - /// is disregarded for anything but UIMode.None. For UIMode.None, you can choose not to exit application which will result in + /// Gets or sets a value indicating whether the application will exit after handling and logging an unhandled exception. + /// This value is disregarded for anything but UIMode.None. For UIMode.None, you can choose not to exit the application which will result in /// 'Windows Error Reporting' (aka Dr. Watson) window to kick in. One reason to do so would be to keep in line with Windows 7 Logo requirements, - /// which is a corner case. This may also be helpful in using NBug library as a simple unhandled exception logger facility, just to log and submit - /// exceptions but does not interfere with the application execution flow. Default value is true. + /// which is a corner case. This may also be helpful in using the NBug library as a simple unhandled exception logger facility, just to log and submit + /// exceptions but not interfering with the application execution flow. Default value is true. /// public static bool ExitApplicationImmediately { get; set; } /// - /// Gets or sets a value indicating whether to handled exceptions even in a corrupted process thought the 'HandleProcessCorruptedStateExceptions' + /// Gets or sets a value indicating whether to handle exceptions even in a corrupted process thought the 'HandleProcessCorruptedStateExceptions' /// flag. The default value for this is false since generating bug reports for a corrupted process may not be successful so use with caution. /// public static bool HandleProcessCorruptedStateExceptions { get; set; } /// - /// Gets or sets a value indicating whether to use 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. /// Default value is true. /// - private static bool DeferredReporting { get; set; } // ToDo: Complete the implementation for non-defered report sending + private static bool DeferredReporting { get; set; } // ToDo: Complete the implementation for non-deferred report sending private static bool releaseMode; // False by default /// - /// Gets or sets a value indicating whether to enable release mode for NBug library. In release mode, internal developer UI is not displayed and + /// Gets or sets a value indicating whether to enable release mode for the NBug library. In release mode the internal developer UI is not displayed and /// unhandled exceptions are only handled if there is no debugger attached to the process. Once properly configured and verified to be working - /// as intended, NBug release mode should be enabled to be able properly to use Visual Studio debugger, without NBug trying to handle exceptions + /// as intended, NBug release mode should be enabled to be able to properly use the Visual Studio debugger, without NBug trying to handle exceptions. /// before Visual Studio does. Default value is false. /// public static bool ReleaseMode @@ -328,11 +328,11 @@ public static bool ReleaseMode /// /// Gets or sets a list of additional files to be added to the report zip. The files can use * or ? in the same way as DOS modifiers. - /// + /// public static List AdditionalReportFiles { get; set; } /// - /// Gets or sets a evento for CustomUI. + /// Gets or sets an event for a CustomUI. /// internal static Delegate CustomUIHandle; public static event EventHandler CustomUIEvent @@ -398,7 +398,7 @@ public static event EventHandler CustomUIEvent internal static bool HandleExceptions { get; set; } /// - /// Gets or sets a value indicating whether the dispatcher, the class deals with sending of reports to their destinations like mail + /// Gets or sets a value indicating whether the dispatcher the class deals with sending of reports to their destinations like mail /// address or an issue tracker, runs asynchronously (in a background worker thread as a ). /// By default dispatcher runs on a background thread except for debug builds, where it blocks the UI and runs in a synchronous manner. /// This is made so to prevent any exceptions thrown by the dispatcher from being swallowed by the CLR since background thread exceptions @@ -412,10 +412,10 @@ public static event EventHandler CustomUIEvent internal static bool SkipDispatching { get; set; } /// - /// Gets or sets a value indicating whether to remove the all the statements from - /// the thread executions. Some thread sleep statements are place around 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 host application initialize properly. + /// seconds to let the host application initialize properly. /// internal static bool RemoveThreadSleep { get; set; } @@ -424,7 +424,7 @@ public static event EventHandler CustomUIEvent #region Load Save Settings Methods /// - /// This should not be used directly. Rather, should be prefered. + /// This should not be used directly. Rather, should be preferred. /// internal static void LoadCustomSettings(XElement config) { @@ -515,7 +515,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 red from the file '" + property + "' is undefined. This is probably a refactoring problem, or malformed config file."); + 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."); } } @@ -549,7 +549,7 @@ where element.Attribute("name") != null && element.Attribute("connectionString") } else { - Logger.Error("There is a problem with the 'connectionStrings' section of the configuration file. The property red from the file '" + property + "' is undefined. This is probably a refactoring problem, or malformed config file."); + Logger.Error("There is a problem with the 'connectionStrings' section of the configuration file. The property read from the file '" + property + "' is undefined. This is probably a refactoring problem, or malformed config file."); } } @@ -557,7 +557,7 @@ where element.Attribute("name") != null && element.Attribute("connectionString") } /// - /// This should not be used directly. Rather, should be prefered. + /// This should not be used directly. Rather should be preferred. /// internal static void SaveCustomSettings(Stream settingsFile, bool encryptConnectionStrings) { @@ -715,7 +715,7 @@ where appSetting.Attribute("name") != null && settingsFile.Flush(); config.Save(settingsFile); settingsFile.Flush(); - } + } #endregion @@ -758,7 +758,7 @@ private static void LoadAppconfigSettings() AddDestinationFromConnectionString(Decrypt(Properties.Settings.Default.Destination3)); AddDestinationFromConnectionString(Decrypt(Properties.Settings.Default.Destination4)); AddDestinationFromConnectionString(Decrypt(Properties.Settings.Default.Destination5)); - } + } private static string Decrypt(string connectionString) { @@ -867,7 +867,7 @@ private static T GetDefaultEnumValue() private static string GetPropertyName(Expression> propertyExpression) { return ((MemberExpression)propertyExpression.Body).Member.Name; - } + } #endregion } diff --git a/ToDo.txt b/ToDo.txt index 302f31f..999779c 100644 --- a/ToDo.txt +++ b/ToDo.txt @@ -16,7 +16,6 @@ Add F1 help to configurator via .chm documentation file Update DbgHelp library to detect x64/x86 platform changes Unit tests for: Can use Settings.StopReportingAfter <= 0 and Settings.MaxQueuedReports <= 0 for infinite reports Refactor the code for NBug.Settings.AdditionalReportFiles.Add(Environment.CurrentDirectory + "\\Log.txt"); (the report generation part) -The property red from the file '***' is undefined. (it should be 'read' not 'red'). static void Main(string[] args) { AppDomain.CurrentDomain.UnhandledException += NBug.Handler.UnhandledException; From f5b35a98fd1b08c2f108c7e96a08af43ae4fbdb5 Mon Sep 17 00:00:00 2001 From: Stef569 Date: Sat, 13 Jul 2013 13:54:33 +0200 Subject: [PATCH 2/3] Increase the display time of the tooltip in the configurator. --- NBug.Configurator/MainForm.Designer.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/NBug.Configurator/MainForm.Designer.cs b/NBug.Configurator/MainForm.Designer.cs index 4162398..1de070d 100644 --- a/NBug.Configurator/MainForm.Designer.cs +++ b/NBug.Configurator/MainForm.Designer.cs @@ -809,7 +809,7 @@ private void InitializeComponent() // // mainToolTips // - this.mainToolTips.AutoPopDelay = 120000; + this.mainToolTips.AutoPopDelay = 20000; this.mainToolTips.InitialDelay = 500; this.mainToolTips.ReshowDelay = 100; // From 293653d01820650dd4b84f1bf236b22989d5d8ab Mon Sep 17 00:00:00 2001 From: Stefan Date: Sat, 13 Jul 2013 14:00:18 +0200 Subject: [PATCH 3/3] Update MainForm.resx --- NBug.Configurator/MainForm.resx | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/NBug.Configurator/MainForm.resx b/NBug.Configurator/MainForm.resx index 66cc4de..1db187b 100644 --- a/NBug.Configurator/MainForm.resx +++ b/NBug.Configurator/MainForm.resx @@ -152,7 +152,7 @@ Use other settings in combination with proper UI provider, which also enables th Selects one of the available UI providers in combination with the proper UI mode. Don’t forget to preview your selection if you change this. -Note that the Auto mode decides the best UI provider on the run for you so it is preferable to set both & UIProvider to Auto +Note that the Auto mode decides the best UI provider on the run for you so it is preferable to set both UIMode & UIProvider to Auto if you want to get best result automatically. @@ -253,4 +253,4 @@ just to log and submit exceptions but not interfering with the application execu AADwDwAA8A8AAA== - \ No newline at end of file +