Navigate diff to editor on key press

Navigate diff to editor on key press

Simple proof of concept!

--- src/GitHub.VisualStudio/Views/GitHubPane/PullRequestDetailView.xaml.cs
+++ src/GitHub.VisualStudio/Views/GitHubPane/PullRequestDetailView.xaml.cs
@@ -166,6 +166,7 @@
                 if (!workingDirectory)
                 {
                     AddBufferTag(diffViewer.RightView.TextBuffer, session, rightPath, DiffSide.Right);
+                    EnableNavigateToEditor(diffViewer.RightView, file);
                 }

                 if (workingDirectory)
@@ -194,6 +195,15 @@
                     AddBufferTag(source, session, path, side);
                 }
             }
+        }
+
+        void EnableNavigateToEditor(IWpfTextView textView, IPullRequestFileNode file)
+        {
+            textView.VisualElement.PreviewKeyDown += async (s, e) =>
+            {
+                await DoOpenFile(file, true);
+                e.Handled = true;
+            };
         }

         void ShowErrorInStatusBar(string message, Exception e)


Don't inherit [DefaultDataSourceAttribute]. It must be explicit on each data source implementation.

--- src/IntelliTect.Coalesce/Api/DataSources/DefaultDataSourceAttribute.cs
+++ src/IntelliTect.Coalesce/Api/DataSources/DefaultDataSourceAttribute.cs
@@ -9,7 +9,7 @@
     /// This DataSource will displace the standard implementation for its served type.
     /// Any references to "Default", and any requests with no specified DataSource, will use this type.
     /// </summary>
-    [AttributeUsage(AttributeTargets.Class, AllowMultiple = false)]
+    [AttributeUsage(AttributeTargets.Class, AllowMultiple = false, Inherited = false)]
     public sealed class DefaultDataSourceAttribute : Attribute
     {
     }


Small acceptance test fix... or whatever it is....

--- src/NUnit.TestAdapter.Tests.Acceptance/SinglePassingTestResultTests.cs
+++ src/NUnit.TestAdapter.Tests.Acceptance/SinglePassingTestResultTests.cs
@@ -156,8 +156,9 @@
         [Test]
         public static void Legacy_csproj_with_PackageReference()
         {
-            var workspace = CreateWorkspace()
-                .AddProject("Test.csproj", $@"
+            var workspace = CreateWorkspace();
+            var nuvers = NuGetPackageVersion;
+            workspace.AddProject("Test.csproj", $@"
                     <?xml version='1.0' encoding='utf-8'?>
                     <Project ToolsVersion='15.0' xmlns='http://schemas.microsoft.com/developer/msbuild/2003'>
                       <Import Project='$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props' Condition=""Exists('$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props')"" />
@@ -209,7 +210,7 @@
                           <Version>3.11.0</Version>
                         </PackageReference>
                         <PackageReference Include='NUnit3TestAdapter'>
-                          <Version>{NuGetPackageVersion}</Version>
+                          <Version>{nuvers}</Version>
                         </PackageReference>
                       </ItemGroup>
                       <Import Project='$(MSBuildToolsPath)\Microsoft.CSharp.targets' />


Fixing NRE on upgrade

Fixing NRE on upgrade

--- src/Orchard.Web/Modules/Orchard.Autoroute/Services/HomeAliasService.cs
+++ src/Orchard.Web/Modules/Orchard.Autoroute/Services/HomeAliasService.cs
@@ -91,7 +91,7 @@
                 return false;
             }

-            return a.Keys.All(x => String.Equals(a[x], b[x].ToString(), StringComparison.OrdinalIgnoreCase));
+            return a.Keys.All(x => String.Equals(a[x], Convert.ToString(b[x]), StringComparison.OrdinalIgnoreCase));
         }
     }
 }


Rendering title on BagPart elements

Rendering title on BagPart elements

--- src/OrchardCore.Modules/OrchardCore.Flows/Views/Widget-Bag.Edit.cshtml
+++ src/OrchardCore.Modules/OrchardCore.Flows/Views/Widget-Bag.Edit.cshtml
@@ -1,16 +1,16 @@
-@using OrchardCore.Flows.Models;
-
 @inject OrchardCore.ContentManagement.Metadata.IContentDefinitionManager ContentDefinitionManager
+@inject IContentManager ContentManager

 @{
-    var contentType = ContentDefinitionManager.GetTypeDefinition((string)Model.ContentItem.ContentType).DisplayName;
+    ContentItem contentItem = Model.ContentItem;
+    var contentType = ContentDefinitionManager.GetTypeDefinition(contentItem.ContentType).DisplayName;
 }

         <button type="button" class="btn btn-outline-secondary btn-sm widget-editor-btn-toggle widget-editor-btn-collapse"></button>
         <button type="button" class="btn btn-outline-secondary btn-sm widget-editor-btn-toggle widget-editor-btn-expand"></button>
-        @contentType
+        @T["{0} — {1}", ContentManager.PopulateAspect<ContentItemMetadata>(contentItem).DisplayText, contentType]

             @* We don't render an Insert button as the container type is not known here *@
             <button type="button" class="btn btn-secondary widget-delete" itemprop="RemoveUrl"></button>


Fixed issue with ignored files and merges (again)

--- VersionrCore/Area.cs
+++ VersionrCore/Area.cs
@@ -7241,12 +7241,15 @@
                                     case StatusCode.Ignored:
                                         if (stagedOps != null && stagedOps.Count > 0 && stagedOps.Any(so => so.Type == StageOperationType.Remove))
                                         {
-                                            Printer.PrintMessage("Removed (ignored): #b#{0}##", x.VersionControlRecord.CanonicalName);
-                                            Printer.PrintDiagnostics("Recorded removal: {0}, old record: {1}", x.VersionControlRecord.CanonicalName, x.VersionControlRecord.Id);
-                                            Objects.Alteration alteration = new Alteration();
-                                            alteration.PriorRecord = x.VersionControlRecord.Id;
-                                            alteration.Type = AlterationType.Delete;
-                                            alterations.Add(alteration);
+                                            if (x.VersionControlRecord != null)
+                                            {
+                                                Printer.PrintMessage("Removed (ignored): #b#{0}##", x.VersionControlRecord.CanonicalName);
+                                                Printer.PrintDiagnostics("Recorded removal: {0}, old record: {1}", x.VersionControlRecord.CanonicalName, x.VersionControlRecord.Id);
+                                                Objects.Alteration alteration = new Alteration();
+                                                alteration.PriorRecord = x.VersionControlRecord.Id;
+                                                alteration.Type = AlterationType.Delete;
+                                                alterations.Add(alteration);
+                                            }
                                         }
                                         else if (stagedOps != null && stagedOps.Count > 0 && stagedOps.Any(so => so.Type == StageOperationType.MergeRecord))
                                         {
@@ -7309,7 +7312,7 @@
                                                             else
                                                             {
                                                                 Objects.Record mergedRecord = GetRecord(op.ReferenceObject);
-                                                                if (x.Code == StatusCode.Ignored || (mergedRecord.Size == x.FilesystemEntry.Length && mergedRecord.Fingerprint == x.FilesystemEntry.Hash))
+                                                                if (mergedRecord != null && (x.Code == StatusCode.Ignored || (mergedRecord.Size == x.FilesystemEntry.Length && mergedRecord.Fingerprint == x.FilesystemEntry.Hash)))
                                                                 {
                                                                     record = mergedRecord;
                                                                     recordIsMerged = true;


Add documentation for extension methods

Add documentation for extension methods

--- src/Sharpy.Builder/Implementation/ExtensionMethods/RandomExtensions.cs
+++ src/Sharpy.Builder/Implementation/ExtensionMethods/RandomExtensions.cs
@@ -3,8 +3,32 @@

 namespace Sharpy.Builder.Implementation.ExtensionMethods
 {
+    /// <summary>
+    ///   Contains a set of static extension method on System.Random.
+    /// </summary>
     internal static class RandomExtensions
     {
+        /// <summary>
+        ///   Randomizes a System.Decimal within <paramref name="min"/> and <paramref name="max"/>.
+        /// </summary>
+        /// <param name="random">
+        ///   The System.Random to randomize with.
+        /// </param>
+        /// <param name="min">
+        ///   The minimum inclusive value.
+        /// </param>
+        /// <param name="max">
+        ///   The maximum exclusive value.
+        /// </param>
+        /// <exception cref="ArgumentNullException">
+        ///   When <paramref name="random"/> is null.
+        /// </exception>
+        /// <exception cref="ArgumentOutOfRangeException">
+        ///   When <paramref name="min"/> is greater than <paramref name="max"/>.
+        /// </exception>
+        /// <returns>
+        ///   A randomized System.Decimal within <paramref name="min"/> and <paramref name="max"/>.
+        /// </returns>
         public static decimal Decimal(this Random random, decimal min, decimal max)
         {
             static decimal NextDecimal(Random random)
@@ -39,6 +63,27 @@
             };
         }

+        /// <summary>
+        ///   Randomizes a System.Double within <paramref name="min"/> and <paramref name="max"/>.
+        /// </summary>
+        /// <param name="random">
+        ///   The System.Random to randomize with.
+        /// </param>
+        /// <param name="min">
+        ///   The minimum inclusive value.
+        /// </param>
+        /// <param name="max">
+        ///   The maximum exclusive value.
+        /// </param>
+        /// <exception cref="ArgumentNullException">
+        ///   When <paramref name="random"/> is null.
+        /// </exception>
+        /// <exception cref="ArgumentOutOfRangeException">
+        ///   When <paramref name="min"/> is greater than <paramref name="max"/>.
+        /// </exception>
+        /// <returns>
+        ///   A randomized System.Double within <paramref name="min"/> and <paramref name="max"/>.
+        /// </returns>
         public static double Double(this Random random, double min, double max)
         {
             return random switch
@@ -50,11 +95,48 @@
             };
         }

+        /// <summary>
+        ///   Randomizes a System.Boolean.
+        /// </summary>
+        /// <param name="random">
+        ///   The System.Random to randomize with.
+        /// </param>
+        /// <exception cref="ArgumentNullException">
+        ///   When <paramref name="random"/> is null.
+        /// </exception>
+        /// <returns>
+        ///   A randomized System.Boolean.
+        /// </returns>
         public static bool Bool(this Random random)
         {
-            return random.Next(2) != 0;
-        }
-
+            return random switch
+            {
+                null => throw new ArgumentNullException(nameof(random)),
+                _ => random.Next(2) != 0
+            };
+        }
+
+        /// <summary>
+        ///   Returns a random element from the System.Collections.Generic.IReadonlyList<out T>.
+        /// </summary>
+        /// <param name="random">
+        ///   The System.Random to randomize with.
+        /// </param>
+        /// <param name="list">
+        ///   The list to randomize from.
+        /// </param>
+        /// <typeparam name="T">
+        ///   The type of the elements of <paramref name="list"/>.
+        /// </typeparam>
+        /// <exception cref="ArgumentNullException">
+        ///   When <paramref name="random"/> or <paramref name="list"/> is null.
+        /// </exception>
+        /// <exception cref="ArgumentException">
+        ///   When <paramref name="list"/> is empty.
+        /// </exception>
+        /// <returns>
+        ///   A randomized <typeparamref name="T"/> from the <paramref name="list"/>.
+        /// </returns>
         public static T ListElement<T>(this Random random, IReadOnlyList<T> list)
         {
             return (random, list) switch
@@ -67,6 +149,30 @@
             };
         }

+        /// <summary>
+        ///   Returns a randomized argument.
+        /// </summary>
+        /// <param name="random">
+        ///   The System.Random to randomize with.
+        /// </param>
+        /// <param name="first">
+        ///   The first argument.
+        /// </param>
+        /// <param name="second">
+        ///   The second argument.
+        /// </param>
+        /// <param name="additional">
+        ///   The optional remaining arguments.
+        /// </param>
+        /// <typeparam name="T">
+        ///   The type provided in the arguments.
+        /// </typeparam>
+        /// <exception cref="ArgumentNullException">
+        ///   When <paramref name="random"/> is null.
+        /// </exception>
+        /// <returns>
+        ///   A randomized argument.
+        /// </returns>
         public static T Argument<T>(this Random random, T first, T second, params T[] additional)
         {
             return random switch
@@ -81,6 +187,27 @@
             };
         }

+        /// <summary>
+        ///   Randomizes a System.Long within <paramref name="min"/> and <paramref name="max"/>.
+        /// </summary>
+        /// <param name="random">
+        ///   The System.Random to randomize with.
+        /// </param>
+        /// <param name="min">
+        ///   The minimum inclusive value.
+        /// </param>
+        /// <param name="max">
+        ///   The maximum exclusive value.
+        /// </param>
+        /// <exception cref="ArgumentNullException">
+        ///   When <paramref name="random"/> is null.
+        /// </exception>
+        /// <exception cref="ArgumentOutOfRangeException">
+        ///   When <paramref name="min"/> is greater than <paramref name="max"/>.
+        /// </exception>
+        /// <returns>
+        ///   A randomized System.Long within <paramref name="min"/> and <paramref name="max"/>.
+        /// </returns>
         public static long Long(this Random random, long min, long max)
         {
             static long NextLong(Random random, long min, long max)
@@ -112,6 +239,27 @@
             };
         }

+        /// <summary>
+        ///   Randomizes a System.TimeSpan within <paramref name="min"/> and <paramref name="max"/>.
+        /// </summary>
+        /// <param name="random">
+        ///   The System.Random to randomize with.
+        /// </param>
+        /// <param name="min">
+        ///   The minimum inclusive value.
+        /// </param>
+        /// <param name="max">
+        ///   The maximum exclusive value.
+        /// </param>
+        /// <exception cref="ArgumentNullException">
+        ///   When <paramref name="random"/> is null.
+        /// </exception>
+        /// <exception cref="ArgumentOutOfRangeException">
+        ///   When <paramref name="min"/> is greater than <paramref name="max"/>.
+        /// </exception>
+        /// <returns>
+        ///   A randomized System.TimeSpan within <paramref name="min"/> and <paramref name="max"/>.
+        /// </returns>
         public static TimeSpan TimeSpan(this Random random, TimeSpan min, TimeSpan max)
         {
             return random switch
@@ -129,36 +277,159 @@
             };
         }

+        /// <summary>
+        ///  Randomizes a day relative to the <paramref name="year"/> and  <paramref name="month"/>..
+        /// </summary>
+        /// <param name="random">
+        ///   The System.Random to randomize with.
+        /// </param>
+        /// <param name="year">
+        ///   The year.
+        /// </param>
+        /// <param name="month">
+        ///   The month relative to <paramref name="year"/>.
+        /// </param>
+        /// <exception cref="ArgumentNullException">
+        ///   When <paramref name="random"/> is null.
+        /// </exception>
+        /// <returns>
+        ///   A valid day relative to the <paramref name="year"/> and  <paramref name="month"/>.
+        /// </returns>
         public static int Day(this Random random, int year, int month)
         {
-            return random.Next(1, System.DateTime.DaysInMonth(year, month) + 1);
-        }
-
+            return random switch
+            {
+                null => throw new ArgumentNullException(nameof(random)),
+                _ => random.Next(1, System.DateTime.DaysInMonth(year, month) + 1)
+            };
+        }
+
+        /// <summary>
+        ///  Randomizes a month.
+        /// </summary>
+        /// <param name="random">
+        ///   The System.Random to randomize with.
+        /// </param>
+        /// <exception cref="ArgumentNullException">
+        ///   When <paramref name="random"/> is null.
+        /// </exception>
+        /// <returns>
+        ///   A randomized month.
+        /// </returns>
         public static int Month(this Random random)
         {
-            return random.Next(1, 13);
-        }
-
+            return random switch
+            {
+                null => throw new ArgumentNullException(nameof(random)),
+                _ => random.Next(1, 13)
+            };
+        }
+
+        /// <summary>
+        ///  Randomizes an hour.
+        /// </summary>
+        /// <param name="random">
+        ///   The System.Random to randomize with.
+        /// </param>
+        /// <exception cref="ArgumentNullException">
+        ///   When <paramref name="random"/> is null.
+        /// </exception>
+        /// <returns>
+        ///   A randomized hour.
+        /// </returns>
         public static int Hour(this Random random)
         {
-            return random.Next(0, 24);
-        }
-
+            return random switch
+            {
+                null => throw new ArgumentNullException(nameof(random)),
+                _ => random.Next(0, 24)
+            };
+        }
+
+        /// <summary>
+        ///  Randomizes a minute.
+        /// </summary>
+        /// <param name="random">
+        ///   The System.Random to randomize with.
+        /// </param>
+        /// <exception cref="ArgumentNullException">
+        ///   When <paramref name="random"/> is null.
+        /// </exception>
+        /// <returns>
+        ///   A randomized minute.
+        /// </returns>
         public static int Minute(this Random random)
         {
-            return random.Next(0, 60);
-        }
-
+            return random switch
+            {
+                null => throw new ArgumentNullException(nameof(random)),
+                _ => random.Next(0, 60)
+            };
+        }
+
+        /// <summary>
+        ///  Randomizes a second.
+        /// </summary>
+        /// <param name="random">
+        ///   The System.Random to randomize with.
+        /// </param>
+        /// <exception cref="ArgumentNullException">
+        ///   When <paramref name="random"/> is null.
+        /// </exception>
+        /// <returns>
+        ///   A randomized second.
+        /// </returns>
         public static int Second(this Random random)
         {
-            return random.Next(0, 60);
-        }
-
+            return random switch
+            {
+                null => throw new ArgumentNullException(nameof(random)),
+                _ => random.Next(0, 60)
+            };
+        }
+
+        /// <summary>
+        ///  Randomizes a millisecond.
+        /// </summary>
+        /// <param name="random">
+        ///   The System.Random to randomize with.
+        /// </param>
+        /// <exception cref="ArgumentNullException">
+        ///   When <paramref name="random"/> is null.
+        /// </exception>
+        /// <returns>
+        ///   A randomized millisecond.
+        /// </returns>
         public static int MilliSecond(this Random random)
         {
-            return random.Next(0, 1000);
-        }
-
+            return random switch
+            {
+                null => throw new ArgumentNullException(nameof(random)),
+                _ => random.Next(0, 1000)
+            };
+        }
+
+        /// <summary>
+        ///   Randomizes a System.DateTime within <paramref name="min"/> and <paramref name="max"/>.
+        /// </summary>
+        /// <param name="random">
+        ///   The System.Random to randomize with.
+        /// </param>
+        /// <param name="min">
+        ///   The minimum inclusive value.
+        /// </param>
+        /// <param name="max">
+        ///   The maximum exclusive value.
+        /// </param>
+        /// <exception cref="ArgumentNullException">
+        ///   When <paramref name="random"/> is null.
+        /// </exception>
+        /// <exception cref="ArgumentOutOfRangeException">
+        ///   When <paramref name="min"/> is greater than <paramref name="max"/>.
+        /// </exception>
+        /// <returns>
+        ///   A randomized System.DateTime within <paramref name="min"/> and <paramref name="max"/>.
+        /// </returns>
         public static DateTime DateTime(this Random random, DateTime min, DateTime max)
         {
             static DateTime NextDateTime(Random random, DateTime min, DateTime max)


spacing

spacing

--- src/Tests/Nest.Tests.Integration/Aggregations/TermsAggregationTests.cs
+++ src/Tests/Nest.Tests.Integration/Aggregations/TermsAggregationTests.cs
@@ -66,8 +66,8 @@
 				)
 			);
 	        results.IsValid.Should().BeTrue();
-	        var termBucket = results.Aggs.Terms("countries");
-	        termBucket.Should().NotBeNull();
+			var termBucket = results.Aggs.Terms("countries");
+			termBucket.Should().NotBeNull();
 			termBucket.Items.Should().NotBeEmpty()
 				.And.OnlyContain(i => !i.Key.IsNullOrEmpty())
 				.And.OnlyContain(i => i.DocCount > 0);


Add YacqServices.DefaultReader property

Add YacqServices.DefaultReader property

Add DefaultReader static property in YacqServices class to be able to select
default reader (and grammar).

--- Yacq/YacqServices.cs
+++ Yacq/YacqServices.cs
@@ -49,10 +49,12 @@
     /// </summary>
     public static class YacqServices
     {
+        private static Reader _defaultReader = new Reader();
+
         /// <summary>
         /// Gets the version of this YACQ library.
         /// </summary>
-        /// <returns>The version of this YACQ library.</returns>
+        /// <value>The version of this YACQ library.</value>
         public static Version Version
         {
             get
@@ -70,6 +72,22 @@
             }
         }

+        /// <summary>
+        /// Gets or sets the default reader to read and parse code strings.
+        /// </summary>
+        /// <returns>The default reader to read and parse code strings.</returns>
+        public static Reader DefaultReader
+        {
+            get
+            {
+                return _defaultReader;
+            }
+            set
+            {
+                _defaultReader = value;
+            }
+        }
+
         #region ReadAll

         /// <summary>
@@ -80,7 +98,7 @@
         /// <returns>All expressions without reducing, generated from the code.</returns>
         public static YacqExpression[] ReadAll(Reader reader, IEnumerable<Char> code)
         {
-            return (reader ?? new Reader()).Read(code);
+            return (reader ?? DefaultReader).Read(code);
         }

         /// <summary>
@@ -1352,7 +1370,7 @@
                     s => s.Add("$global", Expression.Constant(s))
                 )
                 .If(s => !s.ExistsKey("*reader*"),
-                    s => s.Add("*reader*", Expression.Constant(new Reader()))
+                    s => s.Add("*reader*", Expression.Constant(DefaultReader))
                 )
                 .If(s => !s.ExistsKey("*assembly*"),
                     s => s.Add("*assembly*", Expression.Constant(new YacqAssembly("YacqGeneratedTypes")))


Fixed nuget reference builder

Fixed nuget reference builder

--- src/dotnetplugins/Bari.Plugins.Nuget/cs/Build/NugetReferenceBuilder.cs
+++ src/dotnetplugins/Bari.Plugins.Nuget/cs/Build/NugetReferenceBuilder.cs
@@ -91,17 +91,23 @@
             if (project != null)
             {
                 var csharpParams = project.GetInheritableParameters<CsharpProjectParameters, CsharpProjectParametersDef>("csharp");
-
-                switch (csharpParams.TargetFrameworkVersion)
+                var frameworkVersion = csharpParams.IsTargetFrameworkVersionSpecified
+                    ? csharpParams.TargetFrameworkVersion
+                    : FrameworkVersion.v4;
+                var frameworkProfile = csharpParams.IsTargetFrameworkProfileSpecified
+                    ? csharpParams.TargetFrameworkProfile
+                    : FrameworkProfile.Default;
+
+                switch (frameworkVersion)
                 {
                     case FrameworkVersion.v20: return NugetLibraryProfile.Net2;
                     case FrameworkVersion.v30: return NugetLibraryProfile.Net3;
                     case FrameworkVersion.v35:
-                        return csharpParams.TargetFrameworkProfile == FrameworkProfile.Default
+                        return frameworkProfile == FrameworkProfile.Default
                             ? NugetLibraryProfile.Net35
                             : NugetLibraryProfile.Net35Client;
                     case FrameworkVersion.v4:
-                        return csharpParams.TargetFrameworkProfile == FrameworkProfile.Default
+                        return frameworkProfile == FrameworkProfile.Default
                             ? NugetLibraryProfile.Net4
                             : NugetLibraryProfile.Net4Client;
                     case FrameworkVersion.v45:


Improve LogAnalysis tests (#1696)

Improve LogAnalysis tests (#1696)

I noticed that a lot of the community solutions to the SubstringBetween where simply accidentally correct, doing

    s.Substring(s.IndexOf(first) + first.Length, s.IndexOf(last) - last.Length);

i.e. thinking that the length of the last delimiter is relevant, which looks symmetrical to the handling of the first Substring parameter, and just happens to be correct on the provided string.

--- exercises/concept/log-analysis/LogAnalysisTests.cs
+++ exercises/concept/log-analysis/LogAnalysisTests.cs
@@ -23,6 +23,12 @@
     }

     [Fact(Skip = "Remove this Skip property to run this test")]
+    public void SubstringBetweenLongerDelimiters()
+    {
+        Assert.Equal("SOMETHING", "FIND >>> SOMETHING <===< HERE".SubstringBetween(">>> ", " <===<"));
+    }
+
+    [Fact(Skip = "Remove this Skip property to run this test")]
     public void Message()
     {
         var log = "[WARNING]: Library is deprecated.";


Remove not implemented TAB message

Remove not implemented TAB message

--- src/docfx/SubCommands/InitCommand.cs
+++ src/docfx/SubCommands/InitCommand.cs
@@ -167,7 +167,6 @@
                 {
                     "You can define multiple templates in order, latter one will override former one if name collides",
                     "Predefined templates in docfx are now: default",
-                    Hints.Tab,
                     Hints.Enter,
                 }
             }


Close settings window after use

Close settings window after use

--- SOVND.Client/Views/MainWindow.xaml.cs
+++ SOVND.Client/Views/MainWindow.xaml.cs
@@ -52,6 +52,7 @@
                 var settingsViewModel = new SettingsViewModel(settings.GetAuthSettings());
                 w.DataContext = settingsViewModel;
                 w.ShowDialog();
+                Process.GetCurrentProcess().Kill(); // TODO clean this up
             }

             auth = _settings.GetAuthSettings();
@@ -94,7 +95,7 @@
             {
                 var candidates = new List<Track>();
                 var search = Spotify.GetSearch(text);
-                foreach (var trackPtr in search.TrackPtrs)
+                foreach (var trackPtr in search?.TrackPtrs)
                 {
                     var trackLink = Spotify.GetTrackLink(trackPtr);
                     var track = new Track(trackLink);


add Element_Attribute sample

add Element_Attribute sample

--- SerializableDictionaryTest/Program.cs
+++ SerializableDictionaryTest/Program.cs
@@ -5,6 +5,9 @@

 using ieAE = SerializableDictionaryTest.ImExPorter<int, SerializableDictionaryTest.MyData>;
 using kvpAE = System.Collections.Generic.KeyValuePair<int, SerializableDictionaryTest.MyData>;
+
+using ieEA = SerializableDictionaryTest.ImExPorter<SerializableDictionaryTest.MyData, int>;
+using kvpEA = System.Collections.Generic.KeyValuePair<SerializableDictionaryTest.MyData, int>;

 using ieEE = SerializableDictionaryTest.ImExPorter<SerializableDictionaryTest.MyData, SerializableDictionaryTest.MyData>;
 using kvpEE = System.Collections.Generic.KeyValuePair<SerializableDictionaryTest.MyData, SerializableDictionaryTest.MyData>;
@@ -30,6 +33,15 @@
             ieAE.export(dicAE1, filePathAE);
             var dicAE2 = ieAE.import(filePathAE);

+            string filePathEA = @"../Data/SampleEA.log";
+            var dicEA1 = ieEA.create(new kvpEA[]{
+                new kvpEA(new MyData(){ ID=0, Name="Zero", RegisteredDate=DateTime.Now, Height=170.0, }, 0),
+                new kvpEA(new MyData(){ ID=1, Name="One", RegisteredDate=DateTime.Now, Height=160.0, }, 1),
+                new kvpEA(new MyData(){ ID=2, Name="Two", RegisteredDate=DateTime.Now, Height=165.0, }, 2),
+            });
+            ieEA.export(dicEA1, filePathEA);
+            var dicEA2 = ieEA.import(filePathEA);
+
             string filePathEE = @"../Data/SampleEE.log";
             var dicEE1 = ieEE.create(new kvpEE[]{
                 new kvpEE(


Fixing locking issue - double checked locking (2nd check inside lock) added to GetConnection - Previous _channels dictionary seems that was for storing the Channels for each thread. Changed it to a thread static dictionary, which now does not need locking. - _channels list added for the Dispose method only

--- Shuttle.Esb.RabbitMQ/RabbitMQQueue.cs
+++ Shuttle.Esb.RabbitMQ/RabbitMQQueue.cs
@@ -16,7 +16,9 @@
         private static readonly object DisposeLock = new object();
         private readonly Dictionary<string, object> _arguments = new Dictionary<string, object>();

-        private readonly Dictionary<int, Channel> _channels = new Dictionary<int, Channel>();
+        [ThreadStatic]
+        private static Dictionary<RabbitMQQueue, Channel> _threadChannels;
+        private readonly HashSet<Channel> _channels = new HashSet<Channel>();
         private readonly IRabbitMQConfiguration _configuration;

         private readonly ConnectionFactory _factory;
@@ -71,7 +73,7 @@
         {
             lock (DisposeLock)
             {
-                foreach (var value in _channels.Values)
+                foreach (var value in _channels)
                 {
                     if (value.Model != null)
                     {
@@ -101,6 +103,7 @@
                 }

                 _channels.Clear();
+                _threadChannels?.Remove(this);

                 if (_connection != null)
                 {
@@ -267,6 +270,12 @@

             lock (ConnectionLock)
             {
+                // double checked locking
+                if (_connection != null && _connection.IsOpen)
+                {
+                    return _connection;
+                }
+
                 if (_connection != null && !_connection.IsOpen)
                 {
                     try
@@ -292,78 +301,71 @@

         private Channel GetChannel()
         {
-            var key = Thread.CurrentThread.ManagedThreadId;
-
-            var channel = FindChannel(key);
+            if (_threadChannels == null)
+            {
+                _threadChannels = new Dictionary<RabbitMQQueue, Channel>();
+            }
+
+            if (_threadChannels.TryGetValue(this, out var channel) && channel.Model.IsOpen)
+            {
+                return channel;
+            }

             if (channel != null)
             {
-                return channel;
-            }
+                // existing channel is not open
+                try
+                {
+                    channel.Dispose();
+                }
+                catch (Exception)
+                {
+                    // ignored
+                }
+
+                _threadChannels.Remove(this);
+                lock (QueueLock)
+                {
+                    _channels.Remove(channel);
+                }
+            }
+
+
+            var retry = 0;
+            IConnection connection = null;
+
+            while (connection == null && retry < _operationRetryCount)
+            {
+                try
+                {
+                    connection = GetConnection();
+                }
+                catch (Exception)
+                {
+                    retry++;
+                }
+            }
+
+            if (connection == null)
+            {
+                throw new ConnectionException(string.Format(Resources.ConnectionException, Uri.Secured()));
+            }
+
+            var model = connection.CreateModel();
+
+            model.BasicQos(0,
+                (ushort) (_parser.PrefetchCount == 0 ? _configuration.DefaultPrefetchCount : _parser.PrefetchCount),
+                false);
+
+            QueueDeclare(model);
+
+            channel = new Channel(model, _parser, _configuration);
+
+            _threadChannels.Add(this, channel);

             lock (QueueLock)
             {
-                channel = FindChannel(key);
-
-                if (channel != null)
-                {
-                    return channel;
-                }
-
-                var retry = 0;
-                IConnection connection = null;
-
-                while (connection == null && retry < _operationRetryCount)
-                {
-                    try
-                    {
-                        connection = GetConnection();
-                    }
-                    catch (Exception)
-                    {
-                        retry++;
-                    }
-                }
-
-                if (connection == null)
-                {
-                    throw new ConnectionException(string.Format(Resources.ConnectionException, Uri.Secured()));
-                }
-
-                var model = connection.CreateModel();
-
-                model.BasicQos(0,
-                    (ushort) (_parser.PrefetchCount == 0 ? _configuration.DefaultPrefetchCount : _parser.PrefetchCount),
-                    false);
-
-                QueueDeclare(model);
-
-                channel = new Channel(model, _parser, _configuration);
-
-                _channels.Add(key, channel);
-
-                return channel;
-            }
-        }
-
-        private Channel FindChannel(int key)
-        {
-            if (_channels.TryGetValue(key, out var channel))
-            {
-                if (!channel.Model.IsOpen)
-                {
-                    try
-                    {
-                        channel.Dispose();
-                    }
-                    catch (Exception)
-                    {
-                        // ignored
-                    }
-
-                    _channels.Remove(key);
-                    channel = null;
-                }
+                _channels.Add(channel);
             }

             return channel;


added ObjectDisposalFeature.RegisteringManyDisposableObjectsInASingleStepWithATimeout closes #135

--- src/test/Xbehave.Features.Net40/ObjectDisposalFeature.cs
+++ src/test/Xbehave.Features.Net40/ObjectDisposalFeature.cs
@@ -9,6 +9,7 @@
     using System.Collections.Concurrent;
     using System.Collections.Generic;
     using System.Linq;
+    using System.Threading;
     using System.Threading.Tasks;
     using FluentAssertions;
     using Xbehave.Test.Acceptance.Infrastructure;
@@ -49,6 +50,29 @@
         }

         [Scenario]
+        public static void RegisteringManyDisposableObjectsInASingleStepWithATimeout()
+        {
+            var feature = default(Type);
+            var results = default(MethodResult[]);
+
+            "Given a step which registers many disposable objects followed by a step which uses the objects"
+                .Given(() => feature = typeof(SingleStepWithATimeout));
+
+            "When running the scenario"
+                .When(() => results = TestRunner.Run(feature).ToArray())
+                .Teardown(Disposable.ClearRecordedEvents);
+
+            "Then there should be no failures"
+                .Then(() => results.Should().NotContain(result => result is FailedResult));
+
+            "And some disposable objects should have been created"
+                .And(() => SomeDisposableObjectsShouldHaveBeenCreated());
+
+            "And the disposable objects should each have been disposed once in reverse order"
+                .And(() => DisposableObjectsShouldEachHaveBeenDisposedOnceInReverseOrder());
+        }
+
+        [Scenario]
         public static void RegisteringDisposableObjectWhichThrowExceptionsWhenDisposed()
         {
             var feature = default(Type);
@@ -288,6 +312,34 @@
                     });
             }
         }
+
+        private static class SingleStepWithATimeout
+        {
+            [Scenario]
+            public static void Scenario()
+            {
+                var disposable0 = default(Disposable);
+                var disposable1 = default(Disposable);
+                var disposable2 = default(Disposable);
+
+                "Given some disposables"
+                    .Given(c =>
+                    {
+                        disposable0 = new Disposable().Using(c);
+                        disposable1 = new Disposable().Using(c);
+                        disposable2 = new Disposable().Using(c);
+                    })
+                    .WithTimeout(Timeout.Infinite);
+
+                "When using the disposables"
+                    .When(() =>
+                    {
+                        disposable0.Use();
+                        disposable1.Use();
+                        disposable2.Use();
+                    });
+            }
+        }

         private static class SingleStepWithBadDisposables
         {


subscribe request using the netmq extensions

--- src/res/Res.Client/Internal/Queues/Messages/SubscribeToQueueRequest.cs
+++ src/res/Res.Client/Internal/Queues/Messages/SubscribeToQueueRequest.cs
@@ -2,6 +2,7 @@
 using System.Globalization;
 using NetMQ;
 using Res.Client.Exceptions;
+using Res.Client.Internal.NetMQ;
 using Res.Protocol;

 namespace Res.Client.Internal.Queues.Messages
@@ -41,9 +42,9 @@
             msg.Append(_queueId);
             msg.Append(_subscriberId);
             msg.Append(_filter);
-            msg.Append(BitConverter.GetBytes(_utcStartTime.ToBinary()));
-            msg.Append(BitConverter.GetBytes(_allocationBatchSize));
-            msg.Append(BitConverter.GetBytes(_allocationTimeInMilliseconds));
+            msg.Append(_utcStartTime.ToNetMqFrame());
+            msg.Append(_allocationBatchSize.ToNetMqFrame());
+            msg.Append(_allocationTimeInMilliseconds.ToNetMqFrame());

             socket.SendMessage(msg);

@@ -65,16 +66,9 @@
                 var queuecontext = m.Pop().ConvertToString();
                 var queueId = m.Pop().ConvertToString();
                 var subscriberId = m.Pop().ConvertToString();
-                var time = DateTime.FromBinary(BitConverter.ToInt64(m.Pop().Buffer, 0));
-
-                var allocationFrame = m.Pop();
-
-                long? allocationId = null;
-
-                if (allocationFrame.BufferSize != 0)
-                    allocationId = BitConverter.ToInt64(allocationFrame.Buffer, 0);
-
-                var count = BitConverter.ToInt32(m.Pop().Buffer, 0);
+                var time = m.PopDateTime();
+                var allocationId = m.PopNullableInt64();
+                var count = m.PopInt32();

                 var events = new EventInStorage[count];

@@ -83,8 +77,8 @@
                     var id = new Guid(m.Pop().ToByteArray());
                     var streamId = m.Pop().ConvertToString();
                     var context = m.Pop().ConvertToString();
-                    var sequence = BitConverter.ToInt64(m.Pop().Buffer, 0);
-                    var timestamp = DateTime.FromBinary(BitConverter.ToInt64(m.Pop().Buffer, 0));
+                    var sequence = m.PopInt64();
+                    var timestamp = m.PopDateTime();
                     var type = m.Pop().ConvertToString();
                     var headers = m.Pop().ConvertToString();
                     var body = m.Pop().ConvertToString();


I removed WCF context storage

I removed WCF context storage


Remove manual garbage collection statement in debug

--- MatterControlLib/ApplicationView/ApplicationController.cs
+++ MatterControlLib/ApplicationView/ApplicationController.cs
@@ -297,10 +297,6 @@

 			popupMenu.CreateSeparator();

-#if DEBUG
-			GC.Collect();
-#endif
-
 			var selectedItemType = selectedItem.GetType();

 			var menuTheme = this.MenuTheme;


Calling the Hollidays Loader from iOS initialization

- Note: Still need to test it


Fixed consonant tweaks

Fixed consonant tweaks

--- OpenUtau.Plugin.Builtin/SpanishSyllableBasedPhonemizer.cs
+++ OpenUtau.Plugin.Builtin/SpanishSyllableBasedPhonemizer.cs
@@ -160,9 +160,9 @@
                         var vc2 = $"{prevV}{cc[0]}";
                         if (i == 0 && HasOto(vc1, syllable.tone)) {
                             phonemes.Add(vc1);
-                            if (!HasOto(vc1, syllable.tone) && HasOto(vc2, syllable.tone)) {
-                                phonemes.Add(vc2);
-                            }
+                            break;
+                        } else if (!HasOto(vc1, syllable.tone) && HasOto(vc2, syllable.tone)) {
+                            phonemes.Add(vc2);
                             break;
                         }
                         // try vcc


Added some more fixes

Added some more fixes

--- OpenUtau.Plugin.Builtin/SpanishSyllableBasedPhonemizer.cs
+++ OpenUtau.Plugin.Builtin/SpanishSyllableBasedPhonemizer.cs
@@ -18,6 +18,8 @@
         /// For now, typing ex. [n i n y o] (in the brackets) after the lyric "niño" should work.
         /// (This currently does work automatically with ValidateAlias, but only for CVVC, not VCV.)
         /// Same with typing [s] instead of [z] for voicebanks with "seseo" (Latin-American) accents.
+        /// I also want to add using "u" instead of "w" and "i" instead of "y" depending on the voicebank.
+        /// Ex. "kua" instead of "kwa".
         ///</summary>

         private readonly string[] vowels = "a,e,i,o,u".Split(',');
@@ -48,17 +50,12 @@
             var rcv = $"- {v}";
             if (syllable.IsStartingV) {
                 basePhoneme = rcv;
-                if (!HasOto(rcv, syllable.tone)) {
+                if (!HasOto(rcv, syllable.vowelTone)) {
                     basePhoneme = $"{v}";
                 }
             } else if (syllable.IsVV) {
-                var vv = $"{prevV} {v}";
-                if (!CanMakeAliasExtension(syllable)) {
-                    basePhoneme = vv;
-                    if (!HasOto(vv, syllable.tone)) {
-                        basePhoneme = $"{v}";
-                    }
-                } else {
+                basePhoneme = $"{prevV} {v}";
+                if (!HasOto(basePhoneme, syllable.vowelTone)) {
                     basePhoneme = $"{v}";
                 }
             } else if (syllable.IsStartingCVWithOneConsonant) {
@@ -79,15 +76,15 @@
                 } else {
                     basePhoneme = $"{cc.Last()}{v}";
                     // try RCC
-                    for (var i = cc.Length; i > 1; i--) {
-                        if (TryAddPhoneme(phonemes, syllable.tone, $"- {string.Join("", cc.Take(i))}")) {
-                            firstC = i;
-                            break;
-                        }
-                    }
-                    if (phonemes.Count == 0) {
-                        TryAddPhoneme(phonemes, syllable.tone, $"- {cc[0]}");
-                    }
+                    // for (var i = cc.Length; i > 1; i--) {
+                    // if (TryAddPhoneme(phonemes, syllable.tone, $"- {string.Join("", cc.Take(i))}")) {
+                    // firstC = i;
+                    // break;
+                    // }
+                    // }
+                    // if (phonemes.Count == 0) {
+                    // TryAddPhoneme(phonemes, syllable.tone, $"- {cc[0]}");
+                    // }
                     // try CCV
                     for (var i = firstC; i < cc.Length - 1; i++) {
                         var ccv = string.Join("", cc.Skip(i)) + v;
@@ -288,6 +285,13 @@
                 alias == "m nh") {
                 return alias.Replace("nh", "n");
             }
+            if (alias == "gwa" ||
+                alias == "gwe" ||
+                alias == "gwi" ||
+                alias == "gwo" )
+                {
+                return alias.Replace("w", "u");
+            }
             foreach (var consonant in new[] { "z" }) {
                 foreach (var vowel in vowels) {
                     alias = alias.Replace(consonant + vowel, "s" + vowel);


Remove unnecessary call to string.Format method

--- PacketCaptureAnalyser/Analysis/CommonAnalysisHistogram.cs
+++ PacketCaptureAnalyser/Analysis/CommonAnalysisHistogram.cs
@@ -151,12 +151,11 @@
                 if (TheBinBoundaries[i] >= TheBinBoundaries[i + 1])
                 {
                     string TheExceptionMessage =
-                        string.Format
-                        (
-                        "Bin boundary {0} is >= Bin boundary {1}!!!",
-                        TheBinBoundaries[i],
-                        TheBinBoundaries[i + 1]
-                        );
+                        "Bin boundary " +
+                        TheBinBoundaries[i].ToString() +
+                        " is >= Bin boundary " +
+                        TheBinBoundaries[i + 1].ToString() +
+                        "!!!";

                     System.Diagnostics.Trace.WriteLine
                         (


* set trustworthy flag on temporary localdb instances

--- PeanutButter/PeanutButter.TempDb.LocalDb/TempDBLocalDb.cs
+++ PeanutButter/PeanutButter.TempDb.LocalDb/TempDBLocalDb.cs
@@ -44,6 +44,7 @@
                     _dbName,
                     DatabaseFile);
                 cmd.ExecuteNonQuery();
+                cmd.CommandText = string.Format("ALTER DATABASE [{0}] SET TRUSTWORTHY ON", _dbName);
                 ConnectionString = string.Format(@"Data Source=(localdb)\{0};AttachDbFilename={1}; Initial Catalog={2};Integrated Security=True",
                     InstanceName, DatabaseFile, _dbName);
             }


MySQLLogger config UI tabstop and button alignment

--- Plugins/MySQLLogger/MySQLLogger/Configuration.Designer.cs
+++ Plugins/MySQLLogger/MySQLLogger/Configuration.Designer.cs
@@ -54,15 +54,15 @@
             this.logoffEvtCB = new System.Windows.Forms.CheckBox();
             this.logonEvtCB = new System.Windows.Forms.CheckBox();
             this.groupBox2 = new System.Windows.Forms.GroupBox();
+            this.sessionTableTB = new System.Windows.Forms.TextBox();
+            this.label3 = new System.Windows.Forms.Label();
             this.eventTableTB = new System.Windows.Forms.TextBox();
             this.label2 = new System.Windows.Forms.Label();
             this.optionsBox = new System.Windows.Forms.GroupBox();
             this.useModNameCB = new System.Windows.Forms.CheckBox();
             this.groupBox3 = new System.Windows.Forms.GroupBox();
+            this.sessionModeCB = new System.Windows.Forms.CheckBox();
             this.eventModeCB = new System.Windows.Forms.CheckBox();
-            this.sessionModeCB = new System.Windows.Forms.CheckBox();
-            this.label3 = new System.Windows.Forms.Label();
-            this.sessionTableTB = new System.Windows.Forms.TextBox();
             this.helpBtn = new System.Windows.Forms.Button();
             this.eventsBox.SuspendLayout();
             this.groupBox2.SuspendLayout();
@@ -84,14 +84,14 @@
             this.hostTB.Location = new System.Drawing.Point(92, 19);
             this.hostTB.Name = "hostTB";
             this.hostTB.Size = new System.Drawing.Size(307, 20);
-            this.hostTB.TabIndex = 0;
+            this.hostTB.TabIndex = 1;
             //
             // okBtn
             //
             this.okBtn.Location = new System.Drawing.Point(430, 394);
             this.okBtn.Name = "okBtn";
             this.okBtn.Size = new System.Drawing.Size(70, 28);
-            this.okBtn.TabIndex = 7;
+            this.okBtn.TabIndex = 8;
             this.okBtn.Text = "Save";
             this.okBtn.UseVisualStyleBackColor = true;
             this.okBtn.Click += new System.EventHandler(this.okBtn_Click);
@@ -101,7 +101,7 @@
             this.cancelBtn.Location = new System.Drawing.Point(354, 394);
             this.cancelBtn.Name = "cancelBtn";
             this.cancelBtn.Size = new System.Drawing.Size(70, 28);
-            this.cancelBtn.TabIndex = 6;
+            this.cancelBtn.TabIndex = 7;
             this.cancelBtn.Text = "Cancel";
             this.cancelBtn.UseVisualStyleBackColor = true;
             this.cancelBtn.Click += new System.EventHandler(this.cancelBtn_Click);
@@ -112,7 +112,7 @@
             this.portLabel.Location = new System.Drawing.Point(17, 48);
             this.portLabel.Name = "portLabel";
             this.portLabel.Size = new System.Drawing.Size(29, 13);
-            this.portLabel.TabIndex = 11;
+            this.portLabel.TabIndex = 2;
             this.portLabel.Text = "Port:";
             //
             // portTB
@@ -120,7 +120,7 @@
             this.portTB.Location = new System.Drawing.Point(92, 45);
             this.portTB.Name = "portTB";
             this.portTB.Size = new System.Drawing.Size(97, 20);
-            this.portTB.TabIndex = 1;
+            this.portTB.TabIndex = 3;
             //
             // dbLabel
             //
@@ -128,7 +128,7 @@
             this.dbLabel.Location = new System.Drawing.Point(17, 74);
             this.dbLabel.Name = "dbLabel";
             this.dbLabel.Size = new System.Drawing.Size(56, 13);
-            this.dbLabel.TabIndex = 12;
+            this.dbLabel.TabIndex = 4;
             this.dbLabel.Text = "Database:";
             //
             // dbTB
@@ -136,7 +136,7 @@
             this.dbTB.Location = new System.Drawing.Point(92, 71);
             this.dbTB.Name = "dbTB";
             this.dbTB.Size = new System.Drawing.Size(307, 20);
-            this.dbTB.TabIndex = 2;
+            this.dbTB.TabIndex = 5;
             //
             // userLabel
             //
@@ -144,7 +144,7 @@
             this.userLabel.Location = new System.Drawing.Point(17, 158);
             this.userLabel.Name = "userLabel";
             this.userLabel.Size = new System.Drawing.Size(32, 13);
-            this.userLabel.TabIndex = 13;
+            this.userLabel.TabIndex = 10;
             this.userLabel.Text = "User:";
             //
             // userTB
@@ -152,7 +152,7 @@
             this.userTB.Location = new System.Drawing.Point(92, 155);
             this.userTB.Name = "userTB";
             this.userTB.Size = new System.Drawing.Size(307, 20);
-            this.userTB.TabIndex = 5;
+            this.userTB.TabIndex = 11;
             //
             // passwdLabel
             //
@@ -160,7 +160,7 @@
             this.passwdLabel.Location = new System.Drawing.Point(17, 184);
             this.passwdLabel.Name = "passwdLabel";
             this.passwdLabel.Size = new System.Drawing.Size(56, 13);
-            this.passwdLabel.TabIndex = 14;
+            this.passwdLabel.TabIndex = 12;
             this.passwdLabel.Text = "Password:";
             //
             // passwdTB
@@ -168,7 +168,7 @@
             this.passwdTB.Location = new System.Drawing.Point(92, 181);
             this.passwdTB.Name = "passwdTB";
             this.passwdTB.Size = new System.Drawing.Size(307, 20);
-            this.passwdTB.TabIndex = 6;
+            this.passwdTB.TabIndex = 13;
             this.passwdTB.UseSystemPasswordChar = true;
             //
             // testButton
@@ -197,7 +197,7 @@
             this.showPassCB.Location = new System.Drawing.Point(411, 184);
             this.showPassCB.Name = "showPassCB";
             this.showPassCB.Size = new System.Drawing.Size(77, 17);
-            this.showPassCB.TabIndex = 7;
+            this.showPassCB.TabIndex = 14;
             this.showPassCB.Text = "Show Text";
             this.showPassCB.UseVisualStyleBackColor = true;
             this.showPassCB.CheckedChanged += new System.EventHandler(this.showPassCB_CheckedChanged);
@@ -226,7 +226,7 @@
             this.remoteDisconnectEvtCB.Location = new System.Drawing.Point(261, 42);
             this.remoteDisconnectEvtCB.Name = "remoteDisconnectEvtCB";
             this.remoteDisconnectEvtCB.Size = new System.Drawing.Size(120, 17);
-            this.remoteDisconnectEvtCB.TabIndex = 7;
+            this.remoteDisconnectEvtCB.TabIndex = 8;
             this.remoteDisconnectEvtCB.Text = "Remote Disconnect";
             this.remoteDisconnectEvtCB.UseVisualStyleBackColor = true;
             //
@@ -236,7 +236,7 @@
             this.remoteConnectEvtCB.Location = new System.Drawing.Point(261, 19);
             this.remoteConnectEvtCB.Name = "remoteConnectEvtCB";
             this.remoteConnectEvtCB.Size = new System.Drawing.Size(106, 17);
-            this.remoteConnectEvtCB.TabIndex = 6;
+            this.remoteConnectEvtCB.TabIndex = 3;
             this.remoteConnectEvtCB.Text = "Remote Connect";
             this.remoteConnectEvtCB.UseVisualStyleBackColor = true;
             //
@@ -246,7 +246,7 @@
             this.remoteControlEvtCB.Location = new System.Drawing.Point(383, 19);
             this.remoteControlEvtCB.Name = "remoteControlEvtCB";
             this.remoteControlEvtCB.Size = new System.Drawing.Size(99, 17);
-            this.remoteControlEvtCB.TabIndex = 8;
+            this.remoteControlEvtCB.TabIndex = 4;
             this.remoteControlEvtCB.Text = "Remote Control";
             this.remoteControlEvtCB.UseVisualStyleBackColor = true;
             //
@@ -256,7 +256,7 @@
             this.consoleDisconnectEvtCB.Location = new System.Drawing.Point(134, 42);
             this.consoleDisconnectEvtCB.Name = "consoleDisconnectEvtCB";
             this.consoleDisconnectEvtCB.Size = new System.Drawing.Size(121, 17);
-            this.consoleDisconnectEvtCB.TabIndex = 5;
+            this.consoleDisconnectEvtCB.TabIndex = 7;
             this.consoleDisconnectEvtCB.Text = "Console Disconnect";
             this.consoleDisconnectEvtCB.UseVisualStyleBackColor = true;
             //
@@ -266,7 +266,7 @@
             this.consoleConnectEvtCB.Location = new System.Drawing.Point(134, 19);
             this.consoleConnectEvtCB.Name = "consoleConnectEvtCB";
             this.consoleConnectEvtCB.Size = new System.Drawing.Size(107, 17);
-            this.consoleConnectEvtCB.TabIndex = 4;
+            this.consoleConnectEvtCB.TabIndex = 2;
             this.consoleConnectEvtCB.Text = "Console Connect";
             this.consoleConnectEvtCB.UseVisualStyleBackColor = true;
             //
@@ -276,7 +276,7 @@
             this.unlockEvtCB.Location = new System.Drawing.Point(68, 42);
             this.unlockEvtCB.Name = "unlockEvtCB";
             this.unlockEvtCB.Size = new System.Drawing.Size(60, 17);
-            this.unlockEvtCB.TabIndex = 3;
+            this.unlockEvtCB.TabIndex = 6;
             this.unlockEvtCB.Text = "Unlock";
             this.unlockEvtCB.UseVisualStyleBackColor = true;
             //
@@ -286,7 +286,7 @@
             this.lockEvtCB.Location = new System.Drawing.Point(68, 19);
             this.lockEvtCB.Name = "lockEvtCB";
             this.lockEvtCB.Size = new System.Drawing.Size(50, 17);
-            this.lockEvtCB.TabIndex = 2;
+            this.lockEvtCB.TabIndex = 1;
             this.lockEvtCB.Text = "Lock";
             this.lockEvtCB.UseVisualStyleBackColor = true;
             //
@@ -296,7 +296,7 @@
             this.logoffEvtCB.Location = new System.Drawing.Point(6, 42);
             this.logoffEvtCB.Name = "logoffEvtCB";
             this.logoffEvtCB.Size = new System.Drawing.Size(56, 17);
-            this.logoffEvtCB.TabIndex = 1;
+            this.logoffEvtCB.TabIndex = 5;
             this.logoffEvtCB.Text = "Logoff";
             this.logoffEvtCB.UseVisualStyleBackColor = true;
             //
@@ -334,12 +334,28 @@
             this.groupBox2.TabStop = false;
             this.groupBox2.Text = "Server";
             //
+            // sessionTableTB
+            //
+            this.sessionTableTB.Location = new System.Drawing.Point(92, 123);
+            this.sessionTableTB.Name = "sessionTableTB";
+            this.sessionTableTB.Size = new System.Drawing.Size(307, 20);
+            this.sessionTableTB.TabIndex = 9;
+            //
+            // label3
+            //
+            this.label3.AutoSize = true;
+            this.label3.Location = new System.Drawing.Point(17, 126);
+            this.label3.Name = "label3";
+            this.label3.Size = new System.Drawing.Size(77, 13);
+            this.label3.TabIndex = 8;
+            this.label3.Text = "Session Table:";
+            //
             // eventTableTB
             //
             this.eventTableTB.Location = new System.Drawing.Point(91, 96);
             this.eventTableTB.Name = "eventTableTB";
             this.eventTableTB.Size = new System.Drawing.Size(308, 20);
-            this.eventTableTB.TabIndex = 3;
+            this.eventTableTB.TabIndex = 7;
             //
             // label2
             //
@@ -347,7 +363,7 @@
             this.label2.Location = new System.Drawing.Point(17, 99);
             this.label2.Name = "label2";
             this.label2.Size = new System.Drawing.Size(68, 13);
-            this.label2.TabIndex = 16;
+            this.label2.TabIndex = 6;
             this.label2.Text = "Event Table:";
             //
             // optionsBox
@@ -381,6 +397,17 @@
             this.groupBox3.TabStop = false;
             this.groupBox3.Text = "Mode";
             //
+            // sessionModeCB
+            //
+            this.sessionModeCB.AutoSize = true;
+            this.sessionModeCB.Location = new System.Drawing.Point(318, 11);
+            this.sessionModeCB.Name = "sessionModeCB";
+            this.sessionModeCB.Size = new System.Drawing.Size(93, 17);
+            this.sessionModeCB.TabIndex = 1;
+            this.sessionModeCB.Text = "Session Mode";
+            this.sessionModeCB.UseVisualStyleBackColor = true;
+            this.sessionModeCB.CheckStateChanged += new System.EventHandler(this.ModeChange);
+            //
             // eventModeCB
             //
             this.eventModeCB.AutoSize = true;
@@ -392,39 +419,12 @@
             this.eventModeCB.UseVisualStyleBackColor = true;
             this.eventModeCB.CheckStateChanged += new System.EventHandler(this.ModeChange);
             //
-            // sessionModeCB
-            //
-            this.sessionModeCB.AutoSize = true;
-            this.sessionModeCB.Location = new System.Drawing.Point(318, 11);
-            this.sessionModeCB.Name = "sessionModeCB";
-            this.sessionModeCB.Size = new System.Drawing.Size(93, 17);
-            this.sessionModeCB.TabIndex = 1;
-            this.sessionModeCB.Text = "Session Mode";
-            this.sessionModeCB.UseVisualStyleBackColor = true;
-            this.sessionModeCB.CheckStateChanged += new System.EventHandler(this.ModeChange);
-            //
-            // label3
-            //
-            this.label3.AutoSize = true;
-            this.label3.Location = new System.Drawing.Point(17, 126);
-            this.label3.Name = "label3";
-            this.label3.Size = new System.Drawing.Size(77, 13);
-            this.label3.TabIndex = 18;
-            this.label3.Text = "Session Table:";
-            //
-            // sessionTableTB
-            //
-            this.sessionTableTB.Location = new System.Drawing.Point(92, 123);
-            this.sessionTableTB.Name = "sessionTableTB";
-            this.sessionTableTB.Size = new System.Drawing.Size(307, 20);
-            this.sessionTableTB.TabIndex = 4;
-            //
             // helpBtn
             //
             this.helpBtn.Location = new System.Drawing.Point(278, 394);
             this.helpBtn.Name = "helpBtn";
             this.helpBtn.Size = new System.Drawing.Size(70, 28);
-            this.helpBtn.TabIndex = 8;
+            this.helpBtn.TabIndex = 6;
             this.helpBtn.Text = "Help";
             this.helpBtn.UseVisualStyleBackColor = true;
             //
@@ -433,7 +433,6 @@
             this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F);
             this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
             this.ClientSize = new System.Drawing.Size(512, 437);
-            this.ControlBox = false;
             this.Controls.Add(this.helpBtn);
             this.Controls.Add(this.groupBox3);
             this.Controls.Add(this.optionsBox);
@@ -445,8 +444,6 @@
             this.Controls.Add(this.okBtn);
             this.FormBorderStyle = System.Windows.Forms.FormBorderStyle.FixedDialog;
             this.Name = "Configuration";
-            this.ShowIcon = false;
-            this.ShowInTaskbar = false;
             this.Text = "MySQL Logger Plugin Configuration";
             this.Click += new System.EventHandler(this.Btn_help);
             this.eventsBox.ResumeLayout(false);