Android scaling fix

Android scaling fix

--- src/Android/Perspex.Android/Platform/Specific/Helpers/AndroidTouchEventsHelper.cs
+++ src/Android/Perspex.Android/Platform/Specific/Helpers/AndroidTouchEventsHelper.cs
@@ -98,12 +98,13 @@
                             double vectorY = _point.Y - _lastTouchMovePoint.Value.Y;
                             //based on test correction of 0.02 is working perfect
                             double correction = 0.02;
+                            var ps = AndroidPlatform.Instance.LayoutScalingFactor;
                             var mouseWheelEvent = new RawMouseWheelEventArgs(
                                         mouseDevice,
                                         (uint)eventTime.Ticks,
                                         inputRoot,
                                         _point,
-                                        new Vector(vectorX * correction, vectorY * correction), InputModifiers.LeftMouseButton);
+                                        new Vector(vectorX * correction / ps, vectorY * correction / ps), InputModifiers.LeftMouseButton);
                             _view.Input(mouseWheelEvent);
                         }
                         _lastTouchMovePoint = _point;


Honor "Initial Tree Display" setting

Honor "Initial Tree Display" setting

The "Initial Tree Display" setting is now honored. For 'Auto'
we mimick the behaviour of the nunit 2 gui and expand all
the nodes, if the the number of nodes are below the number
of visible nodes; otherwise we collapse to fixtures.

Fixes: #131

--- src/nunit-gui/Presenters/NUnitTreeDisplayStrategy.cs
+++ src/nunit-gui/Presenters/NUnitTreeDisplayStrategy.cs
@@ -22,15 +22,12 @@
 // ***********************************************************************

 using System;
-using System.Collections.Generic;
-using System.Text;
 using System.Windows.Forms;

 namespace NUnit.Gui.Presenters
 {
     using Views;
     using Model;
-    using Engine;

     /// <summary>
     /// NUnitTreeDisplayStrategy is used to display a the tests
@@ -55,6 +52,7 @@

         public override void OnTestLoaded(TestNode testNode)
         {
+            var displayStyle = _model.Settings.Gui.TestTree.InitialTreeDisplay;
             ClearTree();

             TreeNode topNode = null;
@@ -67,18 +65,34 @@

                 _view.Tree.Add(treeNode);

-                SetInitialExpansion(treeNode);
+                SetInitialExpansion(displayStyle, treeNode);
             }

             topNode?.EnsureVisible();
         }

-        private void SetInitialExpansion(TreeNode treeNode)
+        private void SetInitialExpansion(TreeDisplayStyle displayStyle, TreeNode treeNode)
         {
-            if (_view.Tree.VisibleCount >= treeNode.GetNodeCount(true))
-                treeNode.ExpandAll();
-            else
-                CollapseToFixtures(treeNode);
+            switch (displayStyle)
+            {
+                case TreeDisplayStyle.Auto:
+                    if (_view.Tree.VisibleCount >= treeNode.GetNodeCount(true))
+                        treeNode.ExpandAll();
+                    else
+                        CollapseToFixtures(treeNode);
+                    break;
+                case TreeDisplayStyle.Expand:
+                    treeNode.ExpandAll();
+                    break;
+                case TreeDisplayStyle.Collapse:
+                    treeNode.Collapse();
+                    break;
+                case TreeDisplayStyle.HideTests:
+                    CollapseToFixtures(treeNode);
+                    break;
+                default:
+                    throw new ArgumentOutOfRangeException(nameof(displayStyle), displayStyle, null);
+            }
         }
     }
 }


fix tests

fix tests

--- LiteNetLib.Tests/ConnectionTest.cs
+++ LiteNetLib.Tests/ConnectionTest.cs
@@ -110,8 +110,6 @@
             server.Stop();

             Assert.True(server.PeersCount == 0);
-            Assert.True(client.PeersCount == 1);
-
             while (client.PeersCount == 1)
             {
                 Thread.Sleep(15);


Add log of app settings change

Add log of app settings change

--- Locana/DataModel/AppSettingData.cs
+++ Locana/DataModel/AppSettingData.cs
@@ -57,6 +57,7 @@
             }
             set
             {
+                DebugUtil.Log(() => string.Format("{0} is changing from {1} to {2}", Title, CurrentSetting, value));
                 StateObserver?.Invoke(value);
                 NotifyChangedOnUI(nameof(CurrentSetting));
             }


Changed: projection root url returns projection statistics

--- src/EventStore/EventStore.Projections.Core/Services/Http/ProjectionsController.cs
+++ src/EventStore/EventStore.Projections.Core/Services/Http/ProjectionsController.cs
@@ -246,9 +246,13 @@
             if (_httpForwarder.ForwardRequest(http))
                 return;

-            http.ReplyStatus(
-                HttpStatusCode.NotImplemented, "Not Implemented",
-                e => Log.ErrorException(e, "Error while closing http connection (http service core)"));
+            var envelope =
+                new SendToHttpWithConversionEnvelope
+                    <ProjectionManagementMessage.Statistics, ProjectionStatisticsHttpFormatted>(
+                    _networkSendQueue, http, DefaultFormatter, OkNoCacheResponseConfigurator,
+                    status => new ProjectionStatisticsHttpFormatted(status.Projections[0], s => MakeUrl(match, s)),
+                    ErrorsEnvelope(http));
+            Publish(new ProjectionManagementMessage.GetStatistics(envelope, null, match.BoundVariables["name"], true));
         }

         private void OnProjectionDelete(HttpEntityManager http, UriTemplateMatch match)


Fix for issue #51

Fix for issue #51

--- LogicAppTemplate/ParamGenerator.cs
+++ LogicAppTemplate/ParamGenerator.cs
@@ -82,7 +82,7 @@
                     dynamic k = new ExpandoObject();
                     k.keyVault = new ExpandoObject();
                     k.keyVault.id = "/subscriptions/{subscriptionid}/resourceGroups/{resourcegroupname}/providers/Microsoft.KeyVault/vaults/{vault-name}";
-                    k.secretName = param.Name;
+                    k.secretName = param.Name.Replace("_","-"); //need replace the underscore since it is an eleigal character
                     obj["reference"] = JObject.FromObject(k);
                 }
                 else if (ClearParameterValues)


Removed unnecessary code

Removed unnecessary code

--- src/Features/Core/Portable/IntroduceVariable/AbstractIntroduceParameterService.cs
+++ src/Features/Core/Portable/IntroduceVariable/AbstractIntroduceParameterService.cs
@@ -459,6 +459,8 @@
                                 if (mappingDictionary.TryGetValue(variable, out var mappedParameter))
                                 {
                                     var parameterMapped = false;
+                                    var oldNode = newArgumentExpression.GetCurrentNode(variable);
+                                    RoslynDebug.AssertNotNull(oldNode);
                                     for (var i = 0; i < invocationArguments.ToArray().Length; i++)
                                     {
                                         var argumentParameter = semanticFacts.FindParameterForArgument(invocationSemanticModel, invocationArguments.ToArray()[i], cancellationToken);
@@ -467,8 +469,6 @@
                                             var updatedInvocationArgument = updatedInvocationArguments.ToArray()[i];
                                             var argumentExpression = syntaxFacts.GetExpressionOfArgument(updatedInvocationArgument);
                                             var parenthesizedArgumentExpression = generator.AddParentheses(argumentExpression, includeElasticTrivia: false);
-                                            var oldNode = newArgumentExpression.GetCurrentNode(variable);
-                                            RoslynDebug.AssertNotNull(oldNode);
                                             newArgumentExpression = newArgumentExpression.ReplaceNode(oldNode, parenthesizedArgumentExpression);
                                             parameterMapped = true;
                                             break;
@@ -480,8 +480,6 @@
                                         parameterIsNamed = true;
                                         var generatedExpression = GenerateExpressionFromOptionalParameter(mappedParameter);
                                         var parenthesizedGeneratedExpression = generator.AddParentheses(generatedExpression, includeElasticTrivia: false);
-                                        var oldNode = newArgumentExpression.GetCurrentNode(variable);
-                                        RoslynDebug.AssertNotNull(oldNode);
                                         newArgumentExpression = newArgumentExpression.ReplaceNode(oldNode, parenthesizedGeneratedExpression);
                                     }
                                 }


:lipstick: Fixed grammar.\n\nCommit migrated from https://github.com/dotnet/extensions/commit/7642beec82008e7d0e719220e1cb2c3f5277276c

--- src/HttpClientFactory/Http/src/DependencyInjection/HttpClientBuilderExtensions.cs
+++ src/HttpClientFactory/Http/src/DependencyInjection/HttpClientBuilderExtensions.cs
@@ -295,7 +295,7 @@
         /// associated with the <see cref="IHttpClientBuilder"/>.
         /// </summary>
         /// <typeparam name="TClient">
-        /// The type of the typed client. They type specified will be registered in the service collection as
+        /// The type of the typed client. The type specified will be registered in the service collection as
         /// a transient service. See <see cref="ITypedHttpClientFactory{TClient}" /> for more details about authoring typed clients.
         /// </typeparam>
         /// <param name="builder">The <see cref="IHttpClientBuilder"/>.</param>


Simplified if condition

Simplified if condition

--- src/Microsoft.AspNetCore.Razor.Evolution/CodeGeneration/CSharpRenderingContext.cs
+++ src/Microsoft.AspNetCore.Razor.Evolution/CodeGeneration/CSharpRenderingContext.cs
@@ -62,17 +62,11 @@
                 return;
             }

-            var imports = CodeDocument.GetImportSyntaxTrees();
-            if (imports != null)
+            if (SourceDocument.FileName != null &&
+                !string.Equals(SourceDocument.FileName, node.Source.Value.FilePath, StringComparison.OrdinalIgnoreCase))
             {
-                for (var i = 0; i < imports.Count; i++)
-                {
-                    if (string.Equals(imports[i].Source.FileName, node.Source.Value.FilePath, StringComparison.OrdinalIgnoreCase))
-                    {
-                        // We don't want to generate line mappings for imports.
-                        return;
-                    }
-                }
+                // We don't want to generate line mappings for imports.
+                return;
             }

             var source = node.Source.Value;


Fixing tenant-specific PO files (#1262)

Fixing tenant-specific PO files (#1262)

--- src/OrchardCore.Modules/OrchardCore.Localization/ModularPoFileLocationProvider.cs
+++ src/OrchardCore.Modules/OrchardCore.Localization/ModularPoFileLocationProvider.cs
@@ -15,8 +15,7 @@
         private readonly IExtensionManager _extensionsManager;
         private readonly string _root;
         private readonly string _resourcesContainer;
-        private readonly string _shellContainer;
-        private readonly string _shellName;
+        private readonly string _shellDataContainer;

         public ModularPoFileLocationProvider(
             IExtensionManager extensionsManager,
@@ -29,8 +28,7 @@

             _root = hostingEnvironment.ContentRootPath;
             _resourcesContainer = localizationOptions.Value.ResourcesPath; // Localization
-            _shellContainer = shellOptions.Value.ShellsContainerName;
-            _shellName = shellSettings.Name;
+            _shellDataContainer = Path.Combine(shellOptions.Value.ShellsApplicationDataPath, shellOptions.Value.ShellsContainerName, shellSettings.Name);
         }

         public IEnumerable<string> GetLocations(string cultureName)
@@ -45,7 +43,7 @@
             yield return Path.Combine(_root, _resourcesContainer, cultureName, PoFileName);

             // Finally load tenant-specific .po file
-            yield return Path.Combine(_root, _shellContainer, _shellName, _resourcesContainer, cultureName, PoFileName);
+            yield return Path.Combine(_shellDataContainer, _resourcesContainer, cultureName, PoFileName);
         }
     }
 }


GetUnsubscribesAsync returns not found exception (#72)

--- MailChimp.Net/Logic/ReportLogic.cs
+++ MailChimp.Net/Logic/ReportLogic.cs
@@ -664,7 +664,7 @@
         /// <exception cref="TypeLoadException">A custom attribute type cannot be loaded. </exception>
         public async Task<IEnumerable<Report>> GetSubReportAsync(string campaignId, BaseRequest request = null)
         {
-            using (var client = this.CreateMailClient("reports"))
+            using (var client = this.CreateMailClient("reports/"))
             {
                 var response = await client.GetAsync($"{campaignId}/sub-reports{request?.ToQueryString()}").ConfigureAwait(false);
                 await response.EnsureSuccessMailChimpAsync().ConfigureAwait(false);
@@ -714,7 +714,7 @@
         /// </exception>
         public async Task<Unsubscribe> GetUnsubscriberAsync(string campaignId, string emailAddress, BaseRequest request = null)
         {
-            using (var client = this.CreateMailClient("reports"))
+            using (var client = this.CreateMailClient("reports/"))
             {
                 var response =
                     await
@@ -751,7 +751,7 @@
             string campaignId,
             QueryableBaseRequest request = null)
         {
-            using (var client = this.CreateMailClient("reports"))
+            using (var client = this.CreateMailClient("reports/"))
             {
                 var response = await client.GetAsync($"{campaignId}/unsubscribed{request?.ToQueryString()}").ConfigureAwait(false);
                 await response.EnsureSuccessMailChimpAsync().ConfigureAwait(false);


Small typo

Small typo

--- src/AdsClient/Helpers/GenericHelper.cs
+++ src/AdsClient/Helpers/GenericHelper.cs
@@ -78,7 +78,7 @@
             var adsType = GetEnumFromType(type);
             if (adsType != AdsTypeEnum.Unknown)
             {
-                object v = ConvertBytesTotype(adsType, value);
+                object v = ConvertBytesToType(adsType, value);
                 if (v == null)
                     throw new AdsException("Function GetResultFromBytes doesn't support this type yet!");
                 return v;
@@ -97,7 +97,7 @@
                         Array.Copy(value, (int)pos, valarray, 0, (int)attr.ByteSize);
 						var proptype = attr.GetPropery().FieldType;
                         adsType = GetEnumFromType(proptype);
-                        object val = ConvertBytesTotype(adsType, valarray);
+                        object val = ConvertBytesToType(adsType, valarray);
                         attr.GetPropery().SetValue(adsObj, val);
                         pos += attr.ByteSize;
                     }
@@ -217,7 +217,7 @@
             return length;
         }

-        private static object ConvertBytesTotype(AdsTypeEnum adsType, byte[] value)
+        private static object ConvertBytesToType(AdsTypeEnum adsType, byte[] value)
         {
             object v = null;


Re-added client side validataion

Re-added client side validataion

--- src/SFA.DAS.EAS.Web/Views/EmployerAccountTransactions/TransactionsDownload.cshtml
+++ src/SFA.DAS.EAS.Web/Views/EmployerAccountTransactions/TransactionsDownload.cshtml
@@ -28,11 +28,11 @@
                         @Html.ValidationMessageFor(m => m.Message.StartDate.Year)

                              m.Message.StartDate.Month)">Month
-                            @Html.TextBoxFor(m => m.Message.StartDate.Month, new { @class = "form-control", type = "number" })
+                            @Html.TextBoxFor(m => m.Message.StartDate.Month, new { @class = "form-control", type = "number", maxlength = "2", min = "1", max = "12" })

                              m.Message.StartDate.Year)">Year
-                            @Html.TextBoxFor(m => m.Message.StartDate.Year, new { @class = "form-control", type = "number" })
+                            @Html.TextBoxFor(m => m.Message.StartDate.Year, new { @class = "form-control", type = "number", maxlength = "4", min = "1900", max = "9999" })

@@ -44,11 +44,11 @@
                         @Html.ValidationMessageFor(m => m.Message.EndDate.Year)

                              m.Message.EndDate.Month)">Month
-                            @Html.TextBoxFor(m => m.Message.EndDate.Month, new { @class = "form-control", type = "number" })
+                            @Html.TextBoxFor(m => m.Message.EndDate.Month, new { @class = "form-control", type = "number", maxlength = "2", min = "1", max = "12" })

                              m.Message.EndDate.Year)">Year
-                            @Html.TextBoxFor(m => m.Message.EndDate.Year, new { @class = "form-control", type = "number" })
+                            @Html.TextBoxFor(m => m.Message.EndDate.Year, new { @class = "form-control", type = "number", maxlength = "4", min = "1900", max = "9999" })


AML-2018 Added disabled client side validation and javascript for chrome

--- src/SFA.DAS.EAS.Web/Views/EmployerAccountTransactions/TransactionsDownload.cshtml
+++ src/SFA.DAS.EAS.Web/Views/EmployerAccountTransactions/TransactionsDownload.cshtml
@@ -18,7 +18,7 @@

Enter a start and end date to download transactions within a specific date range.

-                @using (Html.BeginForm())
+            @using (Html.BeginForm("TransactionsDownload", "EmployerAccountTransactions", FormMethod.Post, new { novalidate = "novalidate" }))
             {
                 @Html.AntiForgeryToken()
                 @Html.HiddenFor(m => m.Message.HashedAccountId)
@@ -30,11 +30,11 @@
                         @Html.ValidationMessageFor(m => m.Message.StartDate.Year)

                              m.Message.StartDate.Month)">Month
-                            @Html.TextBoxFor(m => m.Message.StartDate.Month, new { @class = "form-control", type = "number", maxlength = "2" })
+                            @Html.TextBoxFor(m => m.Message.StartDate.Month, new { @class = "form-control length-limit", type = "number", maxlength = "2", min = "1", max = "12" })

                              m.Message.StartDate.Year)">Year
-                            @Html.TextBoxFor(m => m.Message.StartDate.Year, new { @class = "form-control", type = "number", maxlength = "4" })
+                            @Html.TextBoxFor(m => m.Message.StartDate.Year, new { @class = "form-control length-limit", type = "number", maxlength = "4", min = "1900", max = "9999" })

@@ -46,11 +46,11 @@
                         @Html.ValidationMessageFor(m => m.Message.EndDate.Year)

                              m.Message.EndDate.Month)">Month
-                            @Html.TextBoxFor(m => m.Message.EndDate.Month, new { @class = "form-control", type = "number", maxlength = "2" })
+                            @Html.TextBoxFor(m => m.Message.EndDate.Month, new { @class = "form-control length-limit", type = "number", maxlength = "2", min = "1", max = "12" })

                              m.Message.EndDate.Year)">Year
-                            @Html.TextBoxFor(m => m.Message.EndDate.Year, new { @class = "form-control", type = "number", maxlength = "4" })
+                            @Html.TextBoxFor(m => m.Message.EndDate.Year, new { @class = "form-control length-limit", type = "number", maxlength = "4", min = "1900", max = "9999" })

@@ -59,10 +59,10 @@
                     @Html.DropDownListFor(m => m.Message.DownloadFormat, EnumHelper.GetSelectList(typeof(DownloadFormatType)), new { @class = "form-control" })

                 <button class="button" aria-label="Download">Download</button>
-        }
-

+            }

+

 @section breadcrumb {

@@ -72,4 +72,8 @@

@ViewBag.Title

-}+}
+
+@section pageSpecificJS {
+
+}


374: LionAlphaMask2

374: LionAlphaMask2

--- src/Tests/TestWinForm_MiniAgg_GLES_SKIA/3_Samples/05_AlphaMask2/LionAlphaMask2.cs
+++ src/Tests/TestWinForm_MiniAgg_GLES_SKIA/3_Samples/05_AlphaMask2/LionAlphaMask2.cs
@@ -14,7 +14,7 @@
 {
     [Info(OrderCode = "05")]
     [Info(DemoCategory.Bitmap, "Clipping to multiple rectangle regions")]
-    public class alpha_mask2_application : DemoBase
+    public class LionAlphaMask2 : DemoBase
     {
         int maskAlphaSliderValue = 100;
         ActualImage alphaBitmap;
@@ -27,8 +27,17 @@
         SubBitmapBlender alphaMaskImageBuffer;
         //IAlphaMask alphaMask;
         System.Drawing.Bitmap a_alphaBmp;
-        public alpha_mask2_application()
-        {
+        ActualImage lionImg;
+        public LionAlphaMask2()
+        {
+
+            string imgFileName = "d:\\WImageTest\\lion1.png";
+            if (System.IO.File.Exists(imgFileName))
+            {
+                lionImg = DemoHelper.LoadImage(imgFileName);
+            }
+
+
             lionShape = new SpriteShape(SvgRenderVxLoader.CreateSvgRenderVxFromFile("Samples/arrow2.svg"));
             this.Width = 800;
             this.Height = 600;
@@ -61,7 +70,7 @@
         void GenAlphaMask(ScanlineRasToDestBitmapRenderer sclineRasToBmp, ScanlinePacked8 sclnPack, ScanlineRasterizer rasterizer, int width, int height)
         {

-            alphaBitmap = new ActualImage(width, height);
+            alphaBitmap = new ActualImage(width, height);
             alphaMaskImageBuffer = new SubBitmapBlender(alphaBitmap, new PixelBlenderGrey());
             //
             ClipProxyImage clippingProxy = new ClipProxyImage(alphaMaskImageBuffer);
@@ -238,7 +247,7 @@
                     byte src_B = *(src); //b
                     byte src_G = *(src + 1); //g
                     byte src_R = *(src + 2); //r
-                    //convert rgb to gray scale: from  this equation...
+                                             //convert rgb to gray scale: from  this equation...
                     int y = (src_R * 77) + (src_G * 151) + (src_B * 28);
                     *(dest + 3) = (byte)(y >> 8);
                     //*(dest + 3) = (byte)((new_B + new_G + new_R) / 3);
@@ -278,9 +287,7 @@
             }

             //1. alpha mask...
-            //p2.DrawImage(alphaBitmap, 0, 0);
-
-
+            //p2.DrawImage(alphaBitmap, 0, 0);
             var blender = widgetsSubImage.GetRecieveBlender();
             widgetsSubImage.SetRecieveBlender(maskPixelBlender);
             //


Just the addition of a couple of file extensions that I use regularly with Gamebrowser.

Added extensions .gcz for Gamecube and .lnk for Windows. I've been editing and building the plugin over the last couple of releases for my personal use of these extensions. Thought i'd submit a PR to make my life easier.

--- GameBrowser/Resolvers/GameResolver.cs
+++ GameBrowser/Resolvers/GameResolver.cs
@@ -200,7 +200,7 @@
                     return new[] { ".gbc", ".zip" };

                 case "Gamecube":
-                    return new[] { ".iso", ".bin", ".img", ".gcm" };
+                    return new[] { ".iso", ".bin", ".img", ".gcm", ".gcz" };

                 case "Super Nintendo":
                     return new[] { ".smc", ".zip", ".fam", ".rom", ".sfc", ".fig" };
@@ -215,7 +215,7 @@
                     return new[] { ".gbdos", ".disc" };

                 case "Windows":
-                    return new[] { ".gbwin", ".disc" };
+                    return new[] { ".gbwin", ".disc", ".lnk" };

                 case "Sega 32X":
                     return new[] { ".iso", ".bin", ".img", ".zip", ".32x" };


[Badged] Refactoring (#1855)

[Badged] Refactoring (#1855)

Refactoring of the Badged class.
OnBadgeChanged:
Removed exception handling, since there was nothing useful being done with the exception, except a trace being printed which will be accessible anyway.

- Streamlined DependencyProperties
- Created appropriate constant for DefaultCornerRadius
- Simplified OnBadgeChanged

--- MaterialDesignThemes.Wpf/Badged.cs
+++ MaterialDesignThemes.Wpf/Badged.cs
@@ -1,6 +1,4 @@
-using System;
-using System.Diagnostics;
-using System.Windows;
+using System.Windows;
 using System.Windows.Media.Animation;
 using ControlzEx;

@@ -9,65 +7,58 @@
     [TemplatePart(Name = BadgeContainerPartName, Type = typeof(UIElement))]
     public class Badged : BadgedEx
     {
-        public static readonly DependencyProperty BadgeChangedStoryboardProperty = DependencyProperty.Register(
-            "BadgeChangedStoryboard", typeof(Storyboard), typeof(Badged), new PropertyMetadata(default(Storyboard)));
+        private static readonly CornerRadius DefaultCornerRadius = new CornerRadius(9);

+        #region DependencyProperty : BadgeChangedStoryboardProperty
         public Storyboard BadgeChangedStoryboard
         {
-            get { return (Storyboard)this.GetValue(BadgeChangedStoryboardProperty); }
-            set { this.SetValue(BadgeChangedStoryboardProperty, value); }
+            get { return (Storyboard)GetValue(BadgeChangedStoryboardProperty); }
+            set { SetValue(BadgeChangedStoryboardProperty, value); }
         }
+        public static readonly DependencyProperty BadgeChangedStoryboardProperty
+            = DependencyProperty.Register(nameof(BadgeChangedStoryboard), typeof(Storyboard), typeof(Badged), new PropertyMetadata(default(Storyboard)));
+        #endregion

+        #region DependencyProperty : BadgeColorZoneModeProperty
+        public ColorZoneMode BadgeColorZoneMode
+        {
+            get { return (ColorZoneMode)GetValue(BadgeColorZoneModeProperty); }
+            set { SetValue(BadgeColorZoneModeProperty, value); }
+        }
+        public static readonly DependencyProperty BadgeColorZoneModeProperty
+            = DependencyProperty.Register(nameof(BadgeColorZoneMode), typeof(ColorZoneMode), typeof(Badged), new PropertyMetadata(default(ColorZoneMode)));
+        #endregion
+
+        #region DependencyProperty : CornerRadiusProperty
+        public CornerRadius CornerRadius
+        {
+            get { return (CornerRadius)GetValue(CornerRadiusProperty); }
+            set { SetValue(CornerRadiusProperty, value); }
+        }
+        public static readonly DependencyProperty CornerRadiusProperty
+            = DependencyProperty.Register(nameof(CornerRadius), typeof(CornerRadius), typeof(Badged), new PropertyMetadata(DefaultCornerRadius));
+        #endregion
+
         static Badged()
         {
             DefaultStyleKeyProperty.OverrideMetadata(typeof(Badged), new FrameworkPropertyMetadata(typeof(Badged)));
         }

-        public static readonly DependencyProperty BadgeColorZoneModeProperty = DependencyProperty.Register(
-            "BadgeColorZoneMode", typeof(ColorZoneMode), typeof(Badged), new PropertyMetadata(default(ColorZoneMode)));
-
-        public ColorZoneMode BadgeColorZoneMode
-        {
-            get { return (ColorZoneMode)GetValue(BadgeColorZoneModeProperty); }
-            set { SetValue(BadgeColorZoneModeProperty, value); }
-        }
-
-        public static readonly DependencyProperty CornerRadiusProperty =
-            DependencyProperty.Register("CornerRadius", typeof(CornerRadius), typeof(Badged), new PropertyMetadata(new CornerRadius(9)));
-
-        public CornerRadius CornerRadius
-        {
-            get { return (CornerRadius)GetValue(CornerRadiusProperty); }
-            set { SetValue(CornerRadiusProperty, value); }
-        }
-
         public override void OnApplyTemplate()
         {
-            this.BadgeChanged -= this.OnBadgeChanged;
-
+            BadgeChanged -= OnBadgeChanged;
             base.OnApplyTemplate();
-
-            this.BadgeChanged += this.OnBadgeChanged;
+            BadgeChanged += OnBadgeChanged;
         }

         private void OnBadgeChanged(object sender, RoutedPropertyChangedEventArgs<object> e)
         {
-            var sb = this.BadgeChangedStoryboard;
-            if (this._badgeContainer != null && sb != null)
+            if (_badgeContainer is null || BadgeChangedStoryboard is null)
             {
-                try
-                {
-                    this._badgeContainer.BeginStoryboard(sb);
-                }
-                catch (Exception exc)
-                {
-                    Trace.WriteLine("Error during Storyboard execution, exception will be rethrown.");
-                    Trace.WriteLine($"{exc.Message} ({exc.GetType().FullName})");
-                    Trace.WriteLine(exc.StackTrace);
-
-                    throw;
-                }
+                return;
             }
+
+            _badgeContainer.BeginStoryboard(BadgeChangedStoryboard);
         }
     }
-}
+}


Add Listen Now Suggestions

Add Listen Now Suggestions

--- GoogleMusicApi.Common/MobileClient.cs
+++ GoogleMusicApi.Common/MobileClient.cs
@@ -20,7 +20,7 @@
         /// </summary>
         public MobileClient()
         {
-
+
         }

         /// <summary>
@@ -92,6 +92,8 @@
             return new TReuqest();
         }

+        #region Config
+
         /// <summary>
         /// Get the Google Play Music configuration key / values
         /// </summary>
@@ -103,8 +105,8 @@
             var request = MakeRequest<ConfigRequest>();
             var data = request.Get(new GetRequest(Session));
             return data;
-
-        }
+
+        }

         /// <summary>
         /// Runs <seealso cref="GetConfig"/> Asynchronously.
@@ -115,13 +117,17 @@
             return await Task.Factory.StartNew(GetConfig);
         }

-        /// <summary>
-        /// Gets the current Situations from Google Play Music.
+        #endregion
+
+        #region Listen Now Suggestions
+
+        /// <summary>
+        /// Gets the current Situations. Suggestions
         /// </summary>
         /// <param name="situationType">The situation types you wish to receive</param>
         /// <returns>
-        /// This contains information like:
-        ///  -"Its Friday Morning..." : "Play Music for..."
+        /// Information like:
+        ///  - "Its Friday Morning..." : "Play Music for..."
         ///     - "Todays Biggest Hits"
         ///         - "Today's Dance Smashes"
         ///         - "Today's Pop Charts"
@@ -147,13 +153,14 @@
             {
                 RequestSignals = new RequestSignal(RequestSignal.GetTimeZoneOffsetSecs()),
                 SituationType = situationType
-
+
             };

             var request = MakeRequest<ListListenNowSituations>();
             var data = request.Get(requestData);
             return data;
         }
+
         /// <summary>
         /// Runs <seealso cref="GetListenNowSituations"/> Asynchronously.
         /// </summary>
@@ -163,7 +170,41 @@
         public async Task<ListListenNowSituationResponse> GetListenNowSituationsAsync(params int[] situationType)
         {
             return await Task.Factory.StartNew(() => GetListenNowSituations(situationType));
-        }
+        }
+
+        /// <summary>
+        /// Gets a list of suggestions (Albums or Stations).
+        /// </summary>
+        /// <returns>
+        /// Information like:
+        /// - "Skin" : "Flume" : "Skin is a music album by Flume"
+        ///     - Reason: "New Release because you like this artist"
+        /// - "Tourist Radio"
+        ///     - Reason: "Similar to Hayden James"
+        /// Each Entry will have two images, one with an aspect ratio of 1 and another with aspect ratio of 2.
+        /// Each Entry will contain either a RadioStation or an Album, never both.
+        /// </returns>
+        //TODO (Low): Change ListenNowItem Type to Enum
+        public ListListenNowTracksResponse ListListenNowTracks()
+        {
+            if (!CheckSession())
+                return null;
+
+            var request = MakeRequest<ListListenNowTracks>();
+            var data = request.Get(new GetRequest(Session));
+            return data;
+        }
+
+        /// <summary>
+        /// Runs <seealso cref="ListListenNowTracks"/> Asynchronously.
+        /// </summary>
+        /// <returns>The value returned from <seealso cref="ListListenNowTracks"/></returns>
+        public async Task<ListListenNowTracksResponse> ListListenNowTracksAsync()
+        {
+            return await Task.Factory.StartNew(ListListenNowTracks);
+        }
+
+        #endregion

     }


Deployment of DevKitSample v4.40.15654.19318 to Prod:MAIN by GitHub Deployment Plugin

--- DeveloperKitSample/Properties/AssemblyInfo.cs
+++ DeveloperKitSample/Properties/AssemblyInfo.cs
@@ -33,4 +33,4 @@
 // by using the '*' as shown below:
 // [assembly: AssemblyVersion("4.40.0.0")]
 [assembly: AssemblyVersion("4.40.0.0")]
-[assembly: AssemblyFileVersion("4.40.15613.19276")]
+[assembly: AssemblyFileVersion("4.40.15654.19318")]


Allow upgrading for constructors too

Allow upgrading for constructors too

--- Harmony/Attributes.cs
+++ Harmony/Attributes.cs
@@ -312,7 +312,7 @@

 	// This attribute is for Harmony patching itself to the latest
 	//
-	[AttributeUsage(AttributeTargets.Method)]
+	[AttributeUsage(AttributeTargets.Method | AttributeTargets.Constructor)]
 	internal class UpgradeToLatestVersion : Attribute
 	{
 		public int version;


Plugin Hot-Reload Fixes #FIX: Fixed a bug that would cause the currently active runtime-only scene to no longer have a null path.

--- DualityEditor/Forms/ReloadCorePluginDialog.cs
+++ DualityEditor/Forms/ReloadCorePluginDialog.cs
@@ -475,7 +475,13 @@
 		private static void RestoreTemporaryData(WorkerInterface workInterface, Stream strScene, Stream strData)
 		{
 			StreamReader strDataReader = new StreamReader(strData);
+
+			// Read back current scene path, account for Write/ReadLine transforming
+			// null values into an empty string.
 			string scenePath = strDataReader.ReadLine();
+			if (string.IsNullOrEmpty(scenePath))
+				scenePath = null;
+
 			workInterface.MainForm.Invoke((Action)(() => workInterface.TempScene = Resource.Load<Scene>(strScene, scenePath)));
 			if (!workInterface.TempScene.IsRuntimeResource)
 			{


#51 - relaxed where for `ConfigurationBase`, tested.

--- DataBindingsSolution/DataBindings/ConfigurationBase.cs
+++ DataBindingsSolution/DataBindings/ConfigurationBase.cs
@@ -11,7 +11,7 @@
   /// Class ConfigurationBase - Provides basic implementation of the <see cref="IConfiguration"/>.
   /// </summary>
   public abstract class ConfigurationBase<ConfigurationDataType> : UANetworkingConfiguration<ConfigurationDataType>, IConfiguration
-    where ConfigurationDataType : ConfigurationData, new()
+    where ConfigurationDataType : class, IConfigurationDataFactory, new()
   {
     /// <summary>
     /// Initializes a new instance of the <see cref="ConfigurationBase{ConfigurationDataType}"/> class.


Did away with send buffer pool, now per connection

--- Desktop/Tempest/Providers/Network/NetworkConnection.cs
+++ Desktop/Tempest/Providers/Network/NetworkConnection.cs
@@ -92,6 +92,9 @@
 			}

 			this.protocols[1] = TempestMessage.InternalProtocol;
+
+			this.sendArgs.SetBuffer (new byte[1024], 0, 1024);
+			this.sendArgs.Completed += ReliableSendCompleted;

 			#if TRACE
 			this.connectionId = Interlocked.Increment (ref nextConnectionId);
@@ -539,7 +542,9 @@
 			return rawMessage;
 		}

-		private readonly object sendSync = new object();
+		//private readonly object sendSync = new object();
+
+		private SocketAsyncEventArgs sendArgs = new SocketAsyncEventArgs();

 		#if NET_4
 		private readonly Dictionary<int, TaskCompletionSource<Message>> messageResponses = new Dictionary<int, TaskCompletionSource<Message>>();
@@ -548,114 +553,153 @@
 		private void SendMessage (Message message, bool isResponse = false)
 		#endif
 		{
+			int c = GetNextCallId();
+			string callCategory = String.Format ("{1}:{2} {4}:Send({0}:{3})", message, this.typeName, this.connectionId, message.MessageId, c);
+			Trace.WriteLineIf (NTrace.TraceVerbose, "Entering", callCategory);
+
 			if (message == null)
 				throw new ArgumentNullException ("message");
 			if (!this.IsConnected)
+			{
+				Trace.WriteLineIf (NTrace.TraceVerbose, "Exiting (not connected)", callCategory);
 				return;
+			}
+
+			//SocketAsyncEventArgs eargs = null;
+			//#if NET_4
+			//if (timeout > 0)
+			//    throw new NotSupportedException ("Response timeout not support");
+
+			//if (!writerAsyncArgs.TryPop (out eargs))
+			//{
+			//    while (eargs == null)
+			//    {
+			//        int count = bufferCount;
+			//        if (count == BufferLimit)
+			//        {
+			//            SpinWait wait = new SpinWait();
+			//            while (!writerAsyncArgs.TryPop (out eargs))
+			//                wait.SpinOnce();
+
+			//            eargs.AcceptSocket = null;
+			//        }
+			//        else if (count == Interlocked.CompareExchange (ref bufferCount, count + 1, count))
+			//        {
+			//            eargs = new SocketAsyncEventArgs();
+			//            eargs.SetBuffer (new byte[1024], 0, 1024);
+			//        }
+			//    }
+			//}
+			//else
+			//    eargs.AcceptSocket = null;
+			//#else
+			//while (eargs == null)
+			//{
+			//    lock (writerAsyncArgs)
+			//    {
+			//        if (writerAsyncArgs.Count != 0)
+			//        {
+			//            eargs = writerAsyncArgs.Pop();
+			//            #if !SILVERLIGHT
+			//            eargs.AcceptSocket = null;
+			//            #endif
+			//        }
+			//        else
+			//        {
+			//            if (bufferCount != BufferLimit)
+			//            {
+			//                bufferCount++;
+			//                eargs = new SocketAsyncEventArgs();
+			//                eargs.SetBuffer (new byte[1024], 0, 1024);
+			//            }
+			//        }
+			//    }
+			//}
+			//#endif
+
+			#if NET_4
+			SpinWait wait = new SpinWait();
+			#endif
+
+			Trace.WriteLineIf (NTrace.TraceVerbose, "Waiting for buffer", callCategory);

 			SocketAsyncEventArgs eargs = null;
+			//while (!this.disconnecting && (eargs = Interlocked.CompareExchange (ref this.sendArgs, null, sendArgs)) == null)
+			while (!this.disconnecting && (eargs = Interlocked.Exchange (ref this.sendArgs, null)) == null)
+			{
+				#if !NET_4
+				Thread.Sleep (1);
+				#else
+				wait.SpinOnce();
+				#endif
+			}
+
+			if (eargs == null)
+			{
+				Trace.WriteLineIf (NTrace.TraceVerbose, "Exiting (null buffer)", callCategory);
+				return;
+			}
+
+			Trace.WriteLineIf (NTrace.TraceVerbose, "Have buffer", callCategory);
+
+			bool sent;
+			//lock (this.sendSync)
+			//{
+			if (!isResponse)
+			{
+				lock (this.messageIdSync)
+				{
+					if (this.nextMessageId == MaxMessageId)
+						this.nextMessageId = 0;
+					else
+						message.MessageId = this.nextMessageId++;
+				}
+			}
+
 			#if NET_4
-			if (timeout > 0)
-				throw new NotSupportedException ("Response timeout not support");
-
-			if (!writerAsyncArgs.TryPop (out eargs))
-			{
-				while (eargs == null)
-				{
-					int count = bufferCount;
-					if (count == BufferLimit)
-					{
-						SpinWait wait = new SpinWait();
-						while (!writerAsyncArgs.TryPop (out eargs))
-							wait.SpinOnce();
-
-						eargs.AcceptSocket = null;
-					}
-					else if (count == Interlocked.CompareExchange (ref bufferCount, count + 1, count))
-					{
-						eargs = new SocketAsyncEventArgs();
-						eargs.SetBuffer (new byte[1024], 0, 1024);
-					}
-				}
-			}
-			else
-				eargs.AcceptSocket = null;
-			#else
-			while (eargs == null)
-			{
-				lock (writerAsyncArgs)
-				{
-					if (writerAsyncArgs.Count != 0)
-					{
-						eargs = writerAsyncArgs.Pop();
-						#if !SILVERLIGHT
-						eargs.AcceptSocket = null;
-						#endif
-					}
-					else
-					{
-						if (bufferCount != BufferLimit)
-						{
-							bufferCount++;
-							eargs = new SocketAsyncEventArgs();
-							eargs.SetBuffer (new byte[1024], 0, 1024);
-						}
-					}
-				}
+			if (future != null)
+			{
+				lock (this.messageResponses)
+					this.messageResponses.Add (message.MessageId, future);
 			}
 			#endif

-			bool sent;
-			lock (this.sendSync)
-			{
-				if (!isResponse)
-				{
-					lock (this.messageIdSync)
-					{
-						if (this.nextMessageId == MaxMessageId)
-							this.nextMessageId = 0;
-						else
-							message.MessageId = this.nextMessageId++;
-					}
-				}
-
-				#if NET_4
-				if (future != null)
-				{
-					lock (this.messageResponses)
-						this.messageResponses.Add (message.MessageId, future);
-				}
-				#endif
-
-				int length;
-				byte[] buffer = GetBytes (message, out length, eargs.Buffer, isResponse);
-
-				eargs.SetBuffer (buffer, 0, length);
-				eargs.UserToken = message;
-
-				lock (this.stateSync)
-				{
-					if (!this.IsConnected)
-					{
-						#if !NET_4
-						lock (writerAsyncArgs)
-						#endif
-						writerAsyncArgs.Push (eargs);
-
-						return;
-					}
-
-					eargs.Completed += ReliableSendCompleted;
-					int p = Interlocked.Increment (ref this.pendingAsync);
-					Trace.WriteLineIf (NTrace.TraceVerbose, String.Format ("Increment pending: {0}", p),
-									   String.Format ("{1}:{2} Send({0}:{3})", message, this.typeName, this.connectionId, message.MessageId));
-
-					sent = !this.reliableSocket.SendAsync (eargs);
-				}
-			}
+			int length;
+			byte[] buffer = GetBytes (message, out length, eargs.Buffer, isResponse);
+
+			eargs.AcceptSocket = null;
+			eargs.SetBuffer (buffer, 0, length);
+			eargs.UserToken = message;
+
+			lock (this.stateSync)
+			{
+				if (!this.IsConnected)
+				{
+					if (eargs != null)
+						Interlocked.Exchange (ref this.sendArgs, eargs);
+					//#if !NET_4
+					//lock (writerAsyncArgs)
+					//#endif
+					//writerAsyncArgs.Push (eargs);
+
+					return;
+				}
+
+				//eargs.Completed += ReliableSendCompleted;
+				int p = Interlocked.Increment (ref this.pendingAsync);
+				Trace.WriteLineIf (NTrace.TraceVerbose, String.Format ("Increment pending: {0}", p), callCategory);
+
+				sent = !this.reliableSocket.SendAsync (eargs);
+			}
+			//}

 			if (sent)
+			{
+				Trace.WriteLineIf (NTrace.TraceVerbose, "Send completed synchronously", callCategory);
 				ReliableSendCompleted (this.reliableSocket, eargs);
+			}
+
+			Trace.WriteLineIf (NTrace.TraceVerbose, "Exiting", callCategory);
 		}

 		/// <returns><c>true</c> if there was sufficient data to retrieve the message's header.</returns>
@@ -1121,14 +1165,16 @@
 			int c = GetNextCallId();
 			Trace.WriteLineIf (NTrace.TraceVerbose, "Entering", String.Format ("{2}:{4} {3}:ReliableSendCompleted({0},{1})", e.BytesTransferred, e.SocketError, this.typeName, c, connectionId));

-			e.Completed -= ReliableSendCompleted;
+			//e.Completed -= ReliableSendCompleted;

 			var message = (Message)e.UserToken;

-			#if !NET_4
-			lock (writerAsyncArgs)
-			#endif
-			writerAsyncArgs.Push (e);
+			//#if !NET_4
+			//lock (writerAsyncArgs)
+			//#endif
+			//writerAsyncArgs.Push (e);
+			if (Interlocked.Exchange (ref this.sendArgs, e) != null)
+				Debugger.Break();

 			int p;
 			if (e.BytesTransferred == 0 || e.SocketError != SocketError.Success)
@@ -1184,16 +1230,16 @@
 		protected static int nextConnectionId;
 		#endif

-		// TODO: Better buffer limit
-		private static readonly int BufferLimit = Environment.ProcessorCount * 10;
-		private static volatile int bufferCount = 0;
+		//// TODO: Better buffer limit
+		//private static readonly int BufferLimit = Environment.ProcessorCount * 10;
+		//private static volatile int bufferCount = 0;

 		internal static readonly TraceSwitch NTrace = new TraceSwitch ("Tempest.Networking", "NetworkConnectionProvider");

-		#if NET_4
-		private static readonly ConcurrentStack<SocketAsyncEventArgs> writerAsyncArgs = new ConcurrentStack<SocketAsyncEventArgs>();
-		#else
-		private static readonly Stack<SocketAsyncEventArgs> writerAsyncArgs = new Stack<SocketAsyncEventArgs>();
-		#endif
+		//#if NET_4
+		//private static readonly ConcurrentStack<SocketAsyncEventArgs> writerAsyncArgs = new ConcurrentStack<SocketAsyncEventArgs>();
+		//#else
+		//private static readonly Stack<SocketAsyncEventArgs> writerAsyncArgs = new Stack<SocketAsyncEventArgs>();
+		//#endif
 	}
 }


Added ctor trace for NetworkConnection

Added ctor trace for NetworkConnection

--- Desktop/Tempest/Providers/Network/NetworkConnection.cs
+++ Desktop/Tempest/Providers/Network/NetworkConnection.cs
@@ -94,6 +94,7 @@
 			#if TRACE
 			this.connectionId = Interlocked.Increment (ref nextConnectionId);
 			this.typeName = GetType().Name;
+			Trace.WriteLineIf (NTrace.TraceVerbose, String.Empty, this.typeName + ":" + this.connectionId + " Ctor");
 			#endif
 		}


Update accessibility of mongoDB data pager

--- DynamicRepository.MongoDB/DataPagerMongoDB.cs
+++ DynamicRepository.MongoDB/DataPagerMongoDB.cs
@@ -19,7 +19,7 @@
     /// <typeparam name="Entity">
     /// The Entity type mapped by the desired collection.
     /// </typeparam>
-    public class DataPagerMongoDB<Key, Entity> : DataPager<Key, Entity> where Entity : class, new()
+    internal class DataPagerMongoDB<Key, Entity> : DataPager<Key, Entity> where Entity : class, new()
     {
         /// <summary>
         /// Filters paged data based on <see cref="PagedDataSourceSettings"/>.


BL-6332 change epub export folder to not need URL encoding

Works around what appears to be a bug in Readium

--- src/BloomExe/Publish/Epub/EpubMaker.cs
+++ src/BloomExe/Publish/Epub/EpubMaker.cs
@@ -74,7 +74,7 @@
 	{
 		public delegate EpubMaker Factory();// autofac uses this

-		public const string kEPUBExportFolder = "ePUB export";
+		public const string kEPUBExportFolder = "ePUB_export";
 		protected const string kEpubNamespace = "http://www.idpf.org/2007/ops";

 		public const string kAudioFolder = "audio";


Fix so that Create Shape Visual works when multiple objects are selected.

--- Editor/AGXUnityEditor/Menus/GameObjectMenu.cs
+++ Editor/AGXUnityEditor/Menus/GameObjectMenu.cs
@@ -1,4 +1,6 @@
 using System;
+using System.Linq;
+using System.Collections.Generic;
 using UnityEngine;
 using UnityEditor;
 using AGXUnity.Rendering;
@@ -11,55 +13,59 @@
     [MenuItem( "GameObject/AGX Unity/Create Shape Visual in children", false, 0 )]
     public static void CreateVisual()
     {
-      if ( Selection.activeGameObject == null ) {
-        Debug.Log( "Unable to create visual: No game object selected in scene." );
+      // Multi-selection and we're receiving one call per selected object
+      // but it's not possible to process one object each call when
+      // Selection.active* aren't changed - so we're blocking calls for
+      // x seconds.
+      if ( EditorApplication.timeSinceStartup - m_lastCreateVisualCall < 0.5 )
+        return;
+
+      var objects = Selection.GetFiltered<GameObject>( SelectionMode.Editable | SelectionMode.TopLevel );
+      if ( objects.Length == 0 ) {
+        Debug.Log( "Unable to create visual: Selected objects not supported (not editable - such as prefabs)." );
         return;
       }

-      if ( AssetDatabase.Contains( Selection.activeGameObject ) ) {
-        Debug.Log( "Unable to create visual: Selected game object is not an instance in a scene.", Selection.activeGameObject );
-        return;
+      var validShapes            = from go in objects
+                                   from shape in go.GetComponentsInChildren<Shape>()
+                                   where !ShapeVisual.HasShapeVisual( shape ) &&
+                                          ShapeVisual.SupportsShapeVisual( shape )
+                                   select shape;
+      var numSensors             = validShapes.Count( shape => shape.IsSensor );
+      var createVisualForSensors = validShapes.Count() > 0 &&
+                                   numSensors > 0 &&
+                                   // Negated when "No" is first (left button)
+                                   !EditorUtility.DisplayDialog( "Sensors",
+                                                                 "There are " +
+                                                                   numSensors +
+                                                                   " sensors in this object. Would you like to" +
+                                                                   " create visuals for sensors as well?",
+                                                                 "No",
+                                                                 "Yes" );
+
+      if ( validShapes.Count() > 0 && ( createVisualForSensors || numSensors < validShapes.Count() ) ) {
+        Undo.SetCurrentGroupName( "Create GameObject(s) shape visual." );
+        var grouId = Undo.GetCurrentGroup();
+
+        foreach ( var shape in validShapes ) {
+          if ( shape.IsSensor && !createVisualForSensors )
+            continue;
+
+          var visual = ShapeVisual.Create( shape );
+          if ( visual != null )
+            Undo.RegisterCreatedObjectUndo( visual, "Create visual: " + shape.name );
+        }
+
+        Undo.CollapseUndoOperations( grouId );
+      }
+      else {
+        Debug.Log( "Create visual ignored: All shapes already have visual data or doesn't support to be visualized.",
+                   Selection.activeGameObject );
       }

-      var shapes = Selection.activeGameObject.GetComponentsInChildren<Shape>();
-      if ( shapes.Length == 0 ) {
-        Debug.Log( "Unable to create visual: Selected game object doesn't have any shapes.", Selection.activeGameObject );
-        return;
-      }
+      m_lastCreateVisualCall = EditorApplication.timeSinceStartup;
+    }

-      int numValidCreateVisual = 0;
-      int numSensors = 0;
-      foreach ( var shape in shapes ) {
-        var validForVisual    = !ShapeVisual.HasShapeVisual( shape ) && ShapeVisual.SupportsShapeVisual( shape );
-        numValidCreateVisual += Convert.ToInt32( validForVisual );
-        numSensors           += Convert.ToInt32( validForVisual && shape.IsSensor );
-      }
-
-      var createVisualForSensors = false;
-      if ( numSensors > 0 )
-        createVisualForSensors = EditorUtility.DisplayDialog( "Sensors",
-                                                              "There are " + numSensors + " sensors in this object. Would you like to create visuals for sensors as well?",
-                                                              "Yes",
-                                                              "No" );
-
-      if ( numValidCreateVisual == 0 || numSensors >= numValidCreateVisual ) {
-        Debug.Log( "Create visual ignored: All shapes already have visual data or doesn't support to be visualized.", Selection.activeGameObject );
-        return;
-      }
-
-      Undo.SetCurrentGroupName( "Create GameObject shape visual." );
-      var grouId = Undo.GetCurrentGroup();
-      foreach ( var shape in shapes ) {
-        var createVisual = !ShapeVisual.HasShapeVisual( shape ) &&
-                           ( createVisualForSensors || !shape.IsSensor );
-        if ( createVisual ) {
-          var go = ShapeVisual.Create( shape );
-          if ( go != null )
-            Undo.RegisterCreatedObjectUndo( go, "Shape visual" );
-        }
-      }
-
-      Undo.CollapseUndoOperations( grouId );
-    }
+    private static double m_lastCreateVisualCall = 0.0;
   }
 }


Removed some spam in the log file

Removed some spam in the log file

--- Duplicati/Library/Main/Database/LocalBackupDatabase.cs
+++ Duplicati/Library/Main/Database/LocalBackupDatabase.cs
@@ -243,7 +243,9 @@

                     default:
                         m_findblockCommand.Transaction = transaction;
-                        r = m_findblockCommand.ExecuteScalar(null, key, size);
+                        m_findblockCommand.SetParameterValue(0, key);
+                        m_findblockCommand.SetParameterValue(1, size);
+                        r = m_findblockCommand.ExecuteScalar();
                         if (r == null || r == DBNull.Value) {
                             m_blockHashLookup.PositiveMisses++;
                         } else {
@@ -260,7 +262,9 @@
             else
             {
                 m_findblockCommand.Transaction = transaction;
-                r = m_findblockCommand.ExecuteScalar(null, key, size);
+                m_findblockCommand.SetParameterValue(0, key);
+                m_findblockCommand.SetParameterValue(1, size);
+                r = m_findblockCommand.ExecuteScalar();
             }

             if (r == null || r == DBNull.Value)


Improve some xmldoc on ArchiveModelManager for methods which are not going to trigger user interactive flow

--- osu.Game/Database/ArchiveModelManager.cs
+++ osu.Game/Database/ArchiveModelManager.cs
@@ -226,7 +226,7 @@
         public Action<IEnumerable<TModel>> PresentImport;

         /// <summary>
-        /// Import an item from an <see cref="ArchiveReader"/>.
+        /// Silently import an item from an <see cref="ArchiveReader"/>.
         /// </summary>
         /// <param name="archive">The archive to be imported.</param>
         /// <param name="cancellationToken">An optional cancellation token.</param>
@@ -303,7 +303,7 @@
         }

         /// <summary>
-        /// Import an item from a <typeparamref name="TModel"/>.
+        /// Silently import an item from a <typeparamref name="TModel"/>.
         /// </summary>
         /// <param name="item">The model to be imported.</param>
         /// <param name="archive">An optional archive to use for model population.</param>


Fixes BoletoNet/boletonet#645

Fixes BoletoNet/boletonet#645

--- src/Boleto.Net/Banco/Banco_Bansirul.cs
+++ src/Boleto.Net/Banco/Banco_Bansirul.cs
@@ -154,12 +154,12 @@
                 Metade1 = string.Empty;
                 //Metade1 = Cedente.Substring(0, 5);
                 string A = boleto.Cedente.ContaBancaria.Agencia.Substring(3, 1);
-                string CCCC = Cedente.Substring(0, 4);
+                string CCCC = boleto.Cedente.ContaBancaria.Conta.Substring(0, 4);
                 Metade1 = A + CCCC;

                 Metade2 = string.Empty;
                 //Metade2 = Cedente.Substring(5, 2) + NossoNumero.Substring(0, 3);
-                string CCC = Cedente.Substring(4, 3);
+                string CCC = boleto.Cedente.ContaBancaria.Conta.Substring(4, 3);
                 string NN = NossoNumero.Substring(0, 2);
                 Metade2 = CCC + NN;
                 string d2 = Mod10Banri(Metade1 + Metade2).ToString();
@@ -296,7 +296,7 @@
                 //11: 4 (agência) + 7 (cedente)
                 string codCedente = boleto.Cedente.Codigo.Replace(".", "").Replace("-", "").Substring(boleto.Cedente.Codigo.Length < 11 ? 0 : 4, 7);

-                campoLivre = "21" + boleto.Cedente.ContaBancaria.Agencia + codCedente + nossoNumero + "40";
+                campoLivre = "21" + boleto.Cedente.ContaBancaria.Agencia.Substring(0, 4) + codCedente + nossoNumero + "40";
                 string ncCodBarra = CalcularNCCodBarras(campoLivre);
                 int.TryParse(ncCodBarra.Substring(0, 1), out _primDigito);
                 int.TryParse(ncCodBarra.Substring(1, 1), out _segDigito);


检查进度时由于quest实体未更新，不可减少Progress

检查进度时由于quest实体未更新，不可减少Progress

--- ElectronicObserver/Data/Quest/ProgressData.cs
+++ ElectronicObserver/Data/Quest/ProgressData.cs
@@ -133,17 +133,9 @@
 			switch ( q.Progress ) {
 				case 1:		//50%
 					Progress = (int)Math.Max( Progress, Math.Ceiling( ( ProgressMax + SharedCounterShift ) * 0.5 ) - SharedCounterShift );
-					Progress = (int)Math.Min( Progress, Math.Ceiling( ( ProgressMax + SharedCounterShift ) * 0.8 ) - SharedCounterShift - 1 );
 					break;
 				case 2:		//80%
 					Progress = (int)Math.Max( Progress, Math.Ceiling( ( ProgressMax + SharedCounterShift ) * 0.8 ) - SharedCounterShift );
-					Progress = Math.Min( Progress, ProgressMax - 1 );
-					break;
-
-				default:
-					if ( q.State == 2 ) {	// 50%以下，进行中
-						Progress = (int)Math.Min( Progress, Math.Ceiling( ( ProgressMax + SharedCounterShift ) * 0.5 ) - SharedCounterShift - 1 );
-					}
 					break;
 			}


Rename tests for consistency.

Rename tests for consistency.

--- Gu.Persist.Core.Tests/Repositories/RepositoryTests.cs
+++ Gu.Persist.Core.Tests/Repositories/RepositoryTests.cs
@@ -80,7 +80,7 @@
         }

         [Test]
-        public void ReadFileName()
+        public void ReadName()
         {
             var fileInfo = this.Directory.CreateFileInfoInDirectory("Test" + this.Repository.Settings.Extension);
             var dummy = new DummySerializable(1);
@@ -92,7 +92,7 @@
         }

         [Test]
-        public void ReadFullFileName()
+        public void ReadFullName()
         {
             var fileInfo = this.Directory.CreateFileInfoInDirectory("Test" + this.Repository.Settings.Extension);
             var dummy = new DummySerializable(1);
@@ -128,7 +128,7 @@
         }

         [Test]
-        public async Task ReadAsyncFileName()
+        public async Task ReadAsyncName()
         {
             var fileInfo = this.Directory.CreateFileInfoInDirectory("Test" + this.Repository.Settings.Extension);
             var dummy = new DummySerializable(1);
@@ -140,7 +140,7 @@
         }

         [Test]
-        public async Task ReadAsyncFullFileName()
+        public async Task ReadAsyncFullName()
         {
             var fileInfo = this.Directory.CreateFileInfoInDirectory("Test" + this.Repository.Settings.Extension);
             var dummy = new DummySerializable(1);


Only catch `RealmExceptions` to avoid blocking the nested `TimeoutException`

--- osu.Game/Database/RealmContextFactory.cs
+++ osu.Game/Database/RealmContextFactory.cs
@@ -21,6 +21,7 @@
 using osu.Game.Rulesets;
 using osu.Game.Scoring;
 using Realms;
+using Realms.Exceptions;

 #nullable enable

@@ -427,7 +428,7 @@
                             throw new TimeoutException(@"Took too long to acquire lock");
                     }
                 }
-                catch (Exception e)
+                catch (RealmException e)
                 {
                     // Compact may fail if the realm is in a bad state.
                     // We still want to continue with the blocking operation, though.


Store the user when authenticating

Store the user when authenticating

--- Espera/Espera.Core/Analytics/BuddyAnalyticsEndpoint.cs
+++ Espera/Espera.Core/Analytics/BuddyAnalyticsEndpoint.cs
@@ -17,9 +17,9 @@
             this.client = new BuddyClient("Espera", "EC60C045-B432-44A6-A4E0-15B4BF607105", autoRecordDeviceInfo: false);
         }

-        public Task AuthenticateUserAsync(string analyticsToken)
+        public async Task AuthenticateUserAsync(string analyticsToken)
         {
-            return this.client.LoginAsync(analyticsToken);
+            this.storedUser = await this.client.LoginAsync(analyticsToken);
         }

         public async Task<string> CreateUserAsync()


version up to 1.8.3

version up to 1.8.3

--- ElectronicObserver/Properties/AssemblyInfo.cs
+++ ElectronicObserver/Properties/AssemblyInfo.cs
@@ -33,5 +33,5 @@
 // 既定値にすることができます:
 // [assembly: AssemblyVersion("1.0.*")]
 [assembly: AssemblyVersion("1.8.0.0")]
-[assembly: AssemblyFileVersion("1.8.2.0")]
-[assembly: AssemblyInformationalVersion("1.8.2.0.net40")]+[assembly: AssemblyFileVersion("1.8.3.0")]
+[assembly: AssemblyInformationalVersion("1.8.3.0.net40")]


Recovery at EOF fixed.

Recovery at EOF fixed.

--- N2.Visualizer/Recovery/Recovery.cs
+++ N2.Visualizer/Recovery/Recovery.cs
@@ -85,7 +85,16 @@
         Debug.Assert(false);
       }

-      return new List<ParseAlternativeNode>();
+      {
+        var frames = new List<RecoveryStackFrame>();
+        frames.Add(parser.RecoveryStacks.Last());
+        frames = frames.PrepareRecoveryStacks();
+        InitFrames(frames);
+        ParseFrames(parser, skipCount, frames);
+        var nodes = ParseAlternativeNode.MakeGraph(frames);
+        nodes.RemoveAll(node => node.Frame.Depth != 0);
+        return nodes;
+      }
     }

     private static void InitFrames(List<RecoveryStackFrame> frames)
@@ -668,9 +677,24 @@
       {
         var node = allNodes[i];
         var frame = node.Frame;
-        if (!(frame is RecoveryStackFrame.ExtensiblePrefix || frame is RecoveryStackFrame.ExtensiblePostfix) && node.HasAtLeastTwoChildren)
-          foreach (var child in node.Children)
-            MarkRecoveryNodes(child, child, markers);
+        if (node.HasAtLeastTwoChildren)
+        {
+          if (frame is RecoveryStackFrame.ExtensiblePrefix || frame is RecoveryStackFrame.ExtensiblePostfix)
+          {
+            foreach (var group in node.Children.Where(n => n.Best).GroupBy(n => n.Frame.RuleKey))
+            {
+              var children = new List<ParseAlternativeNode>(group);
+              if (children.Count >= 2)
+                foreach (var child in children)
+                  MarkRecoveryNodes(child, child, markers);
+            }
+          }
+          else
+          {
+            foreach (var child in node.Children)
+              MarkRecoveryNodes(child, child, markers);
+          }
+        }
       }

       if (markers.Count > 0)


Missing XML HTTP Content Type for embedded resources

--- Hermod/HTTP/Server/URLMapping/HTTPStandardHandlers.cs
+++ Hermod/HTTP/Server/URLMapping/HTTPStandardHandlers.cs
@@ -194,6 +194,7 @@
                     case "swf":  ResponseContentType = HTTPContentType.SWF;             break;
                     case "js":   ResponseContentType = HTTPContentType.JAVASCRIPT_UTF8; break;
                     case "txt":  ResponseContentType = HTTPContentType.TEXT_UTF8;       break;
+                    case "xml":  ResponseContentType = HTTPContentType.XML_UTF8;        break;
                     default:     ResponseContentType = HTTPContentType.OCTETSTREAM;     break;
                 }

@@ -375,6 +376,7 @@
                         case "swf" : ResponseContentType = HTTPContentType.SWF;             break;
                         case "js"  : ResponseContentType = HTTPContentType.JAVASCRIPT_UTF8; break;
                         case "txt" : ResponseContentType = HTTPContentType.TEXT_UTF8;       break;
+                        case "xml":  ResponseContentType = HTTPContentType.XML_UTF8;        break;
                         default:     ResponseContentType = HTTPContentType.OCTETSTREAM;     break;
                     }


fix row/columns

fix row/columns

--- git-newhand.Web/Views/Checkpoints/Index.cshtml
+++ git-newhand.Web/Views/Checkpoints/Index.cshtml
@@ -4,7 +4,7 @@

-
+

(หน้าจอนี้ยังใช้งานจริงไม่ได้นะครับ  วาดเอาไอเดีย)

@@ -21,9 +21,8 @@

           CHECKPOINT #1

-

-
-          ใช้คำสั่ง git ทั่วไปในเครื่องตัวเองได้
+

+        ใช้คำสั่ง git ทั่วไปในเครื่องตัวเองได้

@@ -46,7 +45,11 @@

-

+
+
+

+

+

@@ -58,9 +61,8 @@

           CHECKPOINT #2

-

-
-          ใช้ branch และ merge ได้
+

+        ใช้ branch และ merge ได้

@@ -75,7 +77,6 @@

-
+

-


This might work.

This might work.

git-svn-id: e63e85eb0bc987f1afc06c3933ee8715e6712952@765 be14db4f-12c9-2748-9cb2-092a125f2d7f

--- NativeMessageConnectionDelegate.cs
+++ NativeMessageConnectionDelegate.cs
@@ -31,6 +31,7 @@
         {
             try
             {
+                responseMessage.RequestMessage.RequestUri = new Uri(response.Url.ToString());
                 var httpResponse = response as NSHttpUrlResponse;
                 if (httpResponse != null)
                 {
@@ -78,11 +79,13 @@

         public override void FailedWithError(NSUrlConnection connection, NSError error)
         {
+            stream.Complete();
             waitEvent.Set();
         }

         public override void FinishedLoading(NSUrlConnection connection)
         {
+            stream.Complete();
             waitEvent.Set();
         }


reparatie fix

reparatie fix

--- ICT4RealsWebForms/ICT4RealsWebForms/Reparatie.aspx.cs
+++ ICT4RealsWebForms/ICT4RealsWebForms/Reparatie.aspx.cs
@@ -30,11 +30,7 @@
             if (!IsPostBack)
             {
                 UpdateRepairList();
-                lboxTramLog.Items.Clear();
-                foreach (Service log in rpService.getAllLog())
-                {
-                    lboxTramLog.Items.Add(log.ToString());
-                }
+                UpdateLogList();
             }
         }

@@ -72,6 +68,11 @@
             {

             }
+            finally
+            {
+                UpdateRepairList();
+                UpdateLogList();
+            }
         }
         private void UpdateRepairList()
         {
@@ -80,5 +81,13 @@
                 lboxBrokeInList.Items.Add(item);
             }
         }
+        private void UpdateLogList()
+        {
+            lboxTramLog.Items.Clear();
+            foreach (Service log in rpService.getAllLog())
+            {
+                lboxTramLog.Items.Add(log.ToString());
+            }
+        }
     }
 }


Fixed issue with cleaning deep dir structures

Order matters when recursively deleting directories, for one
project kept getting:
"An error occured in task The directory is not empty."
solved this by recursively deleting bottom up, it might be a bit
slower, but ensures delets are done in correct order.

--- src/Cake.Common/IO/DirectoryCleaner.cs
+++ src/Cake.Common/IO/DirectoryCleaner.cs
@@ -26,16 +26,17 @@
             context.Log.Verbose("Deleting contents of {0}", path);

             // Delete all files.
-            foreach (var file in root.GetFiles("*", SearchScope.Recursive))
+            foreach (var directory in root.GetDirectories("*", SearchScope.Current))
+            {
+                Clean(context, directory.Path.FullPath);
+                directory.Delete(false);
+            }
+
+            // Delete all files.
+            foreach (var file in root.GetFiles("*", SearchScope.Current))
             {
                 file.Delete();
             }
-
-            // Delete all directories.
-            foreach (var directory in root.GetDirectories("*", SearchScope.Recursive))
-            {
-                directory.Delete(false);
-            }
         }
     }
-}+}


ReplicationStrategies utility methods public CSHARP-227

--- src/Cassandra/ReplicationStrategies.cs
+++ src/Cassandra/ReplicationStrategies.cs
@@ -19,7 +19,10 @@

 namespace Cassandra
 {
-    internal static class ReplicationStrategies
+    /// <summary>
+    /// Provides utility methods to build replication strategies when creating a keyspace
+    /// </summary>
+    public static class ReplicationStrategies
     {
         public const string NetworkTopologyStrategy = "NetworkTopologyStrategy";
         public const string SimpleStrategy = "SimpleStrategy";
@@ -46,9 +49,14 @@
             Dictionary<string, int> datacentersReplicationFactors)
         {
             var result = new Dictionary<string, string> {{"class", NetworkTopologyStrategy}};
-            if (datacentersReplicationFactors.Count > 0)
-                foreach (KeyValuePair<string, int> datacenter in datacentersReplicationFactors)
-                    result.Add(datacenter.Key, datacenter.Value.ToString(CultureInfo.InvariantCulture));
+            if (datacentersReplicationFactors.Count <= 0)
+            {
+                return result;
+            }
+            foreach (var datacenter in datacentersReplicationFactors)
+            {
+                result.Add(datacenter.Key, datacenter.Value.ToString(CultureInfo.InvariantCulture));
+            }
             return result;
         }

@@ -64,9 +72,14 @@
         public static Dictionary<string, string> CreateReplicationProperty(string strategyClass, Dictionary<string, string> subOptions)
         {
             var result = new Dictionary<string, string> {{"class", strategyClass}};
-            if (subOptions.Count > 0)
-                foreach (KeyValuePair<string, string> elem in subOptions)
-                    result.Add(elem.Key, elem.Value);
+            if (subOptions.Count <= 0)
+            {
+                return result;
+            }
+            foreach (var elem in subOptions)
+            {
+                result.Add(elem.Key, elem.Value);
+            }
             return result;
         }
     }


- Renamed grunt menu and commando. - Added more regions to group different tools.

--- GruntLauncher/GruntLauncherPackage.cs
+++ GruntLauncher/GruntLauncherPackage.cs
@@ -89,17 +89,17 @@
             if (null != mcs)
             {
                 // Create the command for the menu item.
-                CommandID menuCommandID = new CommandID(GuidList.guidGruntLauncherCmdSet, (int)PkgCmdIDList.cmdidGruntLauncher);
-                OleMenuCommand command = new OleMenuCommand(this.MenuItemCallback, menuCommandID);
-                command.Visible = false;
-                command.BeforeQueryStatus += this.SetVisibility;
-                baseCommand = command;
-                mcs.AddCommand(command);
+                CommandID cmdGrunt = new CommandID(GuidList.guidGruntLauncherCmdSet, (int)PkgCmdIDList.cmdidGruntLauncher);
+                OleMenuCommand gruntCommand = new OleMenuCommand(this.GruntCallback, cmdGrunt);
+                gruntCommand.Visible = false;
+                gruntCommand.BeforeQueryStatus += GruntBeforeQueryStatus;
+                baseCommand = gruntCommand;
+                mcs.AddCommand(gruntCommand);

                 CommandID gulpMenuCommandID = new CommandID(GuidList.guidGruntLauncherCmdSet, (int)PkgCmdIDList.cmdidGulpLauncher);
                 OleMenuCommand gulpCommand = new OleMenuCommand(this.GulpCallback, gulpMenuCommandID);
                 gulpCommand.Visible = false;
-                gulpCommand.BeforeQueryStatus += this.GulpBeforeQueryStatus;
+                gulpCommand.BeforeQueryStatus += GulpBeforeQueryStatus;
                 mcs.AddCommand(gulpCommand);

                 CommandID cmdBower = new CommandID(GuidList.guidGruntLauncherCmdSet, (int)PkgCmdIDList.cmdidBowerUpdater);
@@ -200,52 +200,26 @@

         #endregion

-        /// <summary>
-        ///     Determines if the solution explorer context menu has been opened on a new file since
-        ///     last time
-        /// </summary>
-        /// <returns>Boolean that indicates if a new file was clicked</returns>
-        private bool IsNewFile()
+        #region Grunt
+
+        /// <summary>
+        ///     Determines if the current file is a gruntfile
+        /// </summary>
+        /// <returns>Boolean that indicates if the clicked file was a gruntfile</returns>
+        private bool IsGruntFile()
         {
             // gets the full path of the clicked file
             var path = SolutionHelpers.GetSourceFilePath();

-            // optimization to avoid parsing the file again if the clicked file has not changed since last time
-            if (path == this.lastFile)
-            {
-                return false;
-            }
-
-            return true;
-        }
-
-        /// <summary>
-        ///     Determines if the current file is a gruntfile
-        /// </summary>
-        /// <returns>Boolean that indicates if the clicked file was a gruntfile</returns>
-        private bool IsGruntFile()
-        {
-            // gets the full path of the clicked file
-            var path = SolutionHelpers.GetSourceFilePath();
-
             return ((path.ToLower().IndexOf("gruntfile.js") != -1) ||(path.ToLower().IndexOf("gruntfile.ts") != -1) || (path.ToLower().IndexOf("gruntfile.coffee") != -1));
         }
-
-        private bool IsGulpFile()
-        {
-            // gets the full path of the clicked file
-            var path = SolutionHelpers.GetSourceFilePath();
-
-            return ((path.ToLower().IndexOf("gulpfile.js") != -1)||(path.ToLower().IndexOf("gulpfile.ts") != -1) || (path.ToLower().IndexOf("gulpfile.coffee") != -1));
-        }
-

         /// <summary>
         /// Sets the visibility of the command and creates the dynamic list of commands
         /// </summary>
         /// <param name="sender">Sender of the event</param>
         /// <param name="e">Event arguments</param>
-        private void SetVisibility(object sender, EventArgs e)
+        private void GruntBeforeQueryStatus(object sender, EventArgs e)
         {
             // gets the full path of the clicked file
             var path = SolutionHelpers.GetSourceFilePath();
@@ -329,13 +303,64 @@

                     CommandID menuCommandID = new CommandID(GuidList.guidGruntLauncherCmdSet, (int)PkgCmdIDList.cmdidGruntLauncher + j);
                     j++;
-                    OleMenuCommand command = new OleMenuCommand(this.MenuItemCallback, menuCommandID);
+                    OleMenuCommand command = new OleMenuCommand(this.GruntCallback, menuCommandID);
                     command.Text = "Grunt: " + ele;
                     command.BeforeQueryStatus += (x, y) => { (x as OleMenuCommand).Visible = true; };
                     commands.Add(command);
                     mcs.AddCommand(command);
                 }
             }
+        }
+
+        /// <summary>
+        /// This function is the callback used to execute a command when the a menu item is clicked.
+        /// See the Initialize method to see how the menu item is associated to this function using
+        /// the OleMenuCommandService service and the MenuCommand class.
+        /// </summary>
+        /// <param name="sender">Sender of the event</param>
+        /// <param name="e">Event arguments</param>
+        private void GruntCallback(object sender, EventArgs e)
+        {
+          var cmd = (OleMenuCommand)sender;
+          var text = cmd.Text;
+          var task = text.Substring(text.IndexOf(':') + 1).Trim();
+          if (task == "Grunt") { task = ""; }
+
+          // if the command is checked it means that there is a running grunt task associated
+          // so we kill it
+          if (cmd.Checked)
+          {
+            System.Diagnostics.Process pro;
+            processes.TryGetValue(cmd, out pro);
+            if (pro != null)
+            {
+              OutputHelpers.Output("Stopping process " + cmd.Text);
+              ProcessHelpers.KillProcessAndChildren(pro.Id);
+              processes.Remove(cmd);
+            }
+          }
+
+          if (!cmd.Checked)
+          {
+            // launches the grunt process and redirects the output to the output window
+            RunProcess(cmd, " /c \"grunt --no-color " + task + "  2>&1 \" ", false);
+          }
+          else
+          {
+            cmd.Checked = false;
+          }
+        }
+
+        #endregion
+
+        #region Gulp
+
+        private bool IsGulpFile()
+        {
+          // gets the full path of the clicked file
+          var path = SolutionHelpers.GetSourceFilePath();
+
+          return ((path.ToLower().IndexOf("gulpfile.js") != -1) || (path.ToLower().IndexOf("gulpfile.ts") != -1) || (path.ToLower().IndexOf("gulpfile.coffee") != -1));
         }

         private void GulpBeforeQueryStatus(object sender, EventArgs e)
@@ -427,19 +452,13 @@
         }

-        /// <summary>
-        /// This function is the callback used to execute a command when the a menu item is clicked.
-        /// See the Initialize method to see how the menu item is associated to this function using
-        /// the OleMenuCommandService service and the MenuCommand class.
-        /// </summary>
-        /// <param name="sender">Sender of the event</param>
-        /// <param name="e">Event arguments</param>
-        private void MenuItemCallback(object sender, EventArgs e)
+        private void GulpCallback(object sender, EventArgs e)
         {
             var cmd = (OleMenuCommand)sender;
             var text = cmd.Text;
             var task = text.Substring(text.IndexOf(':') + 1).Trim();
-            if (task == "Grunt") { task = ""; }
+
+            if (task == "Gulp") { task = ""; }

             // if the command is checked it means that there is a running grunt task associated
             // so we kill it
@@ -458,7 +477,7 @@
             if (!cmd.Checked)
             {
                 // launches the grunt process and redirects the output to the output window
-                RunProcess(cmd, " /c \"grunt --no-color " + task + "  2>&1 \" ", false);
+                RunProcess(cmd, " /c \"gulp --no-color " + task + "  2>&1 \" ", false);
             }
             else
             {
@@ -466,39 +485,26 @@
             }
         }

-        private void GulpCallback(object sender, EventArgs e)
-        {
-            var cmd = (OleMenuCommand)sender;
-            var text = cmd.Text;
-            var task = text.Substring(text.IndexOf(':') + 1).Trim();
-
-            if (task == "Gulp") { task = ""; }
-
-            // if the command is checked it means that there is a running grunt task associated
-            // so we kill it
-            if (cmd.Checked)
-            {
-                System.Diagnostics.Process pro;
-                processes.TryGetValue(cmd, out pro);
-                if (pro != null)
-                {
-                    OutputHelpers.Output("Stopping process " + cmd.Text);
-                    ProcessHelpers.KillProcessAndChildren(pro.Id);
-                    processes.Remove(cmd);
-                }
-            }
-
-            if (!cmd.Checked)
-            {
-                // launches the grunt process and redirects the output to the output window
-                RunProcess(cmd, " /c \"gulp --no-color " + task + "  2>&1 \" ", false);
-            }
-            else
-            {
-                cmd.Checked = false;
-            }
-        }
-
+        #endregion
+
+        /// <summary>
+        ///     Determines if the solution explorer context menu has been opened on a new file since
+        ///     last time
+        /// </summary>
+        /// <returns>Boolean that indicates if a new file was clicked</returns>
+        private bool IsNewFile()
+        {
+          // gets the full path of the clicked file
+          var path = SolutionHelpers.GetSourceFilePath();
+
+          // optimization to avoid parsing the file again if the clicked file has not changed since last time
+          if (path == this.lastFile)
+          {
+            return false;
+          }
+
+          return true;
+        }

         private static void RunProcess(OleMenuCommand cmd, string argument, bool fromRoot)
         {


add comment

add comment

--- csharp/winbind_wrapper/winbind_wrapper/Program.cs
+++ csharp/winbind_wrapper/winbind_wrapper/Program.cs
@@ -13,7 +13,9 @@
         {
             // Wrapper.Initialize should be called only once for the whole lifetime
             // of your program. Do not call it every time when you do a search :)
-            Wrapper.Initialize("d:/pf/projects/monster-avengers/dataset/MH4GU");
+            //
+            // The parameter to Initialize() is the path to the dataset file.
+            Wrapper.Initialize("d:/pf/projects/monster-avengers/dataset/MH4GDEX");

             // Wrapper.Search is the entry point of the wrapper. It returns a list of
             // ArmorSet objects as result. Please See definition of ArmorSet for details.


Fixed handling of message updates when not in cache

--- src/Discord.Net/DiscordSocketClient.cs
+++ src/Discord.Net/DiscordSocketClient.cs
@@ -762,10 +762,23 @@
                                         var channel = DataStore.GetChannel(data.ChannelId) as ICachedMessageChannel;
                                         if (channel != null)
                                         {
-                                            var msg = channel.GetMessage(data.Id);
-                                            var before = _enablePreUpdateEvents ? msg.Clone() : null;
-                                            msg.Update(data, UpdateSource.WebSocket);
-                                            await MessageUpdated.RaiseAsync(before, msg).ConfigureAwait(false);
+                                            IMessage before = null, after = null;
+                                            CachedMessage cachedMsg = channel.GetMessage(data.Id);
+                                            if (cachedMsg != null)
+                                            {
+                                                before = _enablePreUpdateEvents ? cachedMsg.Clone() : null;
+                                                cachedMsg.Update(data, UpdateSource.WebSocket);
+                                                after = cachedMsg;
+                                            }
+                                            else if (data.Author.IsSpecified)
+                                            {
+                                                //Edited message isnt in cache, create a detached one
+                                                var author = channel.GetUser(data.Author.Value.Id);
+                                                if (author != null)
+                                                    after = new Message(channel, author, data);
+                                            }
+                                            if (after != null)
+                                                await MessageUpdated.RaiseAsync(before, after).ConfigureAwait(false);
                                         }
                                         else
                                         {


Convert() を texture2d 非依存に

Convert() を texture2d 非依存に


Commentaire

Commentaire

--- Enigmas/UnderKeyboardEnigmaPanel.cs
+++ Enigmas/UnderKeyboardEnigmaPanel.cs
@@ -13,34 +13,34 @@

     class UnderKeyboardEnigmaPanel : EnigmaPanel
     {
-        private List<Touche> ListeTouche;
-        private List<int> placement;
-        private ShuffleList<char> caractere;
-        private ShuffleList<char> toutestouches;
-        private Button reset;
-        private Label lblPresser;
-        private int iWidth = 70;
-        private int iHeight = 70;
-        private int iLocalisationX = 150;
-        private int iLocalisationY = 150;
-        private int iLocY;
-        private int iLocX;
-        //private int place = 0;
+        private List<Touche> ListeTouche; // Contient la liste de Touche définitive
+        private List<int> placement; // Contient les numéros des emplacement qu'il faut réservé pour certaine lettre
+        private ShuffleList<char> caractere; // Liste qu'on mélange et qui contient les lettres avec un emplacement réserver dans la liste ListeTouche
+        private ShuffleList<char> toutestouches; // Liste qu'on mélage et qui contient les lettres
+        private Button reset; // Bouton pour remettre la localistation des touches au même endroit que au début de l'énigme
+        private Label lblPresser; //Label qui indique la clé de l'énigme
+        private int iWidth = 70; // Largeur des touches
+        private int iHeight = 70; // Hauteur des touches
+        private int iLocalisationX = 150; // Localistation de débart des touches en X
+        private int iLocalisationY = 150; // Localistation de débart des touches en Y
+        private int iLocY; // Localisation tampon pour calculer l'emplacement des touches en X
+        private int iLocX; // Localisation tampon pour calculer l'emplacement des touches en Y
+
         //private string strNom;
         /// <summary>
-        /// place les touches avec 26 touches
+        /// Place les 26 touches
         /// </summary>
         public void PlaceTouche()
         {
             iLocX = iLocalisationX; //la localisation de la touche en X
             iLocY = iLocalisationY; //la localisation de la touche en Y
-            for (int i = 0; i <= 25; i++) //
+            for (int i = 0; i <= 25; i++)
             {
-                iLocX += iWidth;
-                if (i % 7 == 0)
+                iLocX += iWidth; // on ajoute en X la largeur de la touche pour pouvoir la placer l'une à coté de l'autre
+                if (i % 7 == 0) // si il y en a 7 on va à la ligne
                 {
-                    iLocX = iLocalisationX;
-                    iLocY += iHeight;
+                    iLocX = iLocalisationX; // on remet X a la localisation de base
+                    iLocY += iHeight; // On Ajoute la Hauteur en Y ce qui permet de descendre la touche et de refaire une ligne en dessous de l'autre
                 }
                 if (i == 21)
                 {
@@ -103,7 +103,7 @@
             caractere.Add('R');
             caractere.Add('E');

-            lblPresser = new Label() { Text = "PRESSER", Location = new Point(335, 60), TextAlign = ContentAlignment.MiddleCenter, Font = new Font(arial,10) };
+            lblPresser = new Label() { Text = "PRESSER", Location = new Point(335, 60), TextAlign = ContentAlignment.MiddleCenter/*, Font = new Font(,10)*/ };
             Controls.Add(lblPresser);

             // boucle qui va ajouter dans le tableau toutetouches toute les lettre de l'alphabet
@@ -137,7 +137,9 @@
             }
             PlaceTouche();
         }
-
+        /// <summary>
+        /// Supprime ce que contient la liste touche quand on change d'énigme
+        /// </summary>
         public override void Unload()
         {
             foreach(Touche touche in ListeTouche)


Fixed a bug where if a service was not registered we could get a NRE.

--- Envelop/BindingNotFoundException.cs
+++ Envelop/BindingNotFoundException.cs
@@ -36,6 +36,14 @@

             foreach (var r in fullfillments)
             {
+                if (r.Item2 == null)
+                {
+                    sb.AppendFormat("Attempting to resolve '{0}' failed without finding a valid implementation", r.Item1.Name);
+                    sb.AppendLine();
+
+                    return sb.ToString();
+                }
+
                 sb.AppendFormat("Attempting to resolve '{0}' with '{1}'", r.Item1.Name, r.Item2.Name);
                 sb.AppendLine();
             }


Réarrangement des animations de la séquence de vote (à suivre)

--- Execute/Assets/Scripts/VoteState.cs
+++ Execute/Assets/Scripts/VoteState.cs
@@ -186,58 +186,51 @@
 			foreach (Player player in game.players) {
 				// Si l'ID du joueur = le vote
 				if (player.voteID == vote.Key && votesCounted == true) {
-					// Nombre de vote contre le joueur +=1
+					// Nombre de vote contre le joueur +=1, addition des scores au score global
 					player.hasVotes += vote.Value;
-					Debug.Log (" -Joueur # " + player.id + " a reçu " + player.hasVotes + " votes contre lui.");
-
-
-						//if(!scoreCounted){
-						// Comptage des scores, différentes conditions de victoire et défaite
-						// Si le joueur a >3 votes et n'était pas résistant, score /2
-						if (player.hasVotes > 3 && !player.isResistant && !player.scoreCounted) {
-							countScores (player);
-							yield return new WaitForSeconds(1.0f);
-							player.score = player.score / 2;
-							player.scoreCounted = true;
-							Debug.Log ("Joueur " + player.id + " n'était pas résistant et voit son score divisé par 2. Score GLOBAL actuel :" + player.score);
-							// Si le joueur a >3 votes et était résistant, score /4
-						} else if (player.hasVotes > 3 && player.isResistant && !player.scoreCounted) {
-							countScores (player);
-							yield return new WaitForSeconds(1.0f);
-							player.score = player.score / 4;
-							player.scoreCounted = true;
-							Debug.Log ("Joueur " + player.id + " était un résistant et voit son score divisé par 4. Score GLOBAL actuel :" + player.score);
-							// Si le joueur a < 3 votes et n'était pas résistant, pas de pénalité
-						} else if (player.hasVotes < 3 && !player.isResistant && !player.scoreCounted) {
-							countScores (player);
-							player.scoreCounted = true;
-							yield return new WaitForSeconds(1.0f);
-							Debug.Log ("Joueur " + player.id + " n'a pas reçu suffisamment de vote pour etre pénalisé. Score GLOBAL actuel :" + player.score);
-							// Si le joueur a < 3 votes et était résistant, score *4
-						} else if (player.hasVotes < 3 && player.isResistant && !player.scoreCounted) {
-							countScores (player);
-							yield return new WaitForSeconds(1.0f);
-							player.score = player.score * 4;
-							player.scoreCounted = true;
-							Debug.Log ("Joueur " + player.id + " était résistant et voit son score multiplié par 4. Score GLOBAL actuel :" + player.score);
-						}
-						//scoreCounted = true;
-						//}
-
-				}
-
-
-
-					// Reinit
+					Debug.Log (" -Joueur # " + player.id + " a reçu " + player.hasVotes + " votes contre lui.");
+					countScores(player);
+					}
+				}
+
+			}
+
+			yield return new WaitForSeconds(2.0f);
+
+			foreach(Player player in game.players){
+				//if(!scoreCounted){
+				// Conditions de victoire et défaite
+				// Si le joueur a >3 votes et n'était pas résistant, score /2
+				if (player.hasVotes > 3 && !player.isResistant && !player.scoreCounted) {
+					player.score = player.score / 2;
+					player.scoreCounted = true;
+					Debug.Log ("Joueur " + player.id + " n'était pas résistant et voit son score divisé par 2. Score GLOBAL actuel :" + player.score);
+					// Si le joueur a >3 votes et était résistant, score /4
+				} else if (player.hasVotes > 3 && player.isResistant && !player.scoreCounted) {
+					player.score = player.score / 4;
+					player.scoreCounted = true;
+					Debug.Log ("Joueur " + player.id + " était un résistant et voit son score divisé par 4. Score GLOBAL actuel :" + player.score);
+					// Si le joueur a < 3 votes et n'était pas résistant, pas de pénalité
+				} else if (player.hasVotes < 3 && !player.isResistant && !player.scoreCounted) {
+					player.scoreCounted = true;
+					Debug.Log ("Joueur " + player.id + " n'a pas reçu suffisamment de vote pour etre pénalisé. Score GLOBAL actuel :" + player.score);
+					// Si le joueur a < 3 votes et était résistant, score *4
+				} else if (player.hasVotes < 3 && player.isResistant && !player.scoreCounted) {
+					player.score = player.score * 4;
+					player.scoreCounted = true;
+					Debug.Log ("Joueur " + player.id + " était résistant et voit son score multiplié par 4. Score GLOBAL actuel :" + player.score);
+				}
+				//scoreCounted = true;
+				//}
+
+				// Reinit
 				player.hasVotedFor = "";
 				player.hasVotes = 0;
 				player.hasAlreadyVoted = false;
 				player.hasPushedStart = false;
 				player.scoreCounted = false;
-			}
-
-		}
-
+			}
+
 		yield return new WaitForSeconds(2.0f);
 			done = true;
 		}
@@ -292,8 +285,8 @@

 	void countScores(Player _player){
-		Mathf.Lerp (_player.score,_player.score+=round.scores[_player.id],3);
-		Mathf.Lerp(round.scores[_player.id],round.scores[_player.id]-=round.scores[_player.id],3);
+		Mathf.Lerp (_player.score,_player.score+=round.scores[_player.id],0.1f);
+		Mathf.Lerp(round.scores[_player.id],round.scores[_player.id]-=round.scores[_player.id],0.1f);
 	}

 	// Update is called once per frame
@@ -316,7 +309,7 @@
 			if(currentTime < voteDuration){
 				timerText.GetComponent<TextMesh>().text = (Mathf.RoundToInt(voteDuration-currentTime)).ToString();
 			}else{
-				timerText.GetComponent<TextMesh>().text = "TEMPS ÉCOULÉ";
+				timerText.GetComponent<TextMesh>().text = "TEMPS ECOULE";
 			}

 			// Quand un joueur appuie sur un bouton


Derive filename from messageId

Derive filename from messageId

--- ExoMail.Example/FileMessageStore.cs
+++ ExoMail.Example/FileMessageStore.cs
@@ -18,7 +18,7 @@
             )
         {
             var directory = Path.Combine(AppDomain.CurrentDomain.BaseDirectory, "Queue");
-            var path = Path.Combine(directory, Guid.NewGuid().ToString() + ".eml");
+            var path = Path.Combine(directory, messageEnvelope.MessageId + ".eml");

             if (!Directory.Exists(directory))
             {