Slightly restructured output log

Slightly restructured output log

--- SWBF2-AutomationTool/Main.cs
+++ SWBF2-AutomationTool/Main.cs
@@ -652,32 +652,34 @@
         // Scroll to the bottom of the output log, deal with the log being full, and update the line count.
         private void text_OutputLog_TextChanged(object sender, EventArgs e)
         {
+            // Is the log full?
+            if (text_OutputLog.TextLength >= (text_OutputLog.MaxLength - 500))
+            {
+                // Make sure the text box is still populated
+                if (text_OutputLog.Lines.Count() > 0)
+                {
+                    // Get the lines of text
+                    string[] lineArray = text_OutputLog.Lines;
+
+                    // Create a collection so that a line can be removed
+                    var lineCollection = new List<string>(lineArray);
+
+                    // Remove the first line
+                    lineCollection.RemoveAt(0);
+
+                    text_OutputLog.Lines.Count();
+
+                    // Convert the collection back to an array
+                    lineArray = lineCollection.ToArray();
+
+                    // Display the new data in the control
+                    text_OutputLog.Lines = lineArray;
+                }
+            }
+
             // Auto-scroll to the most recent line
             text_OutputLog.ScrollToCaret();

-            // Is the log full?
-            if (text_OutputLog.TextLength >= (text_OutputLog.MaxLength - 500))
-            {
-                // Make sure the text box is still populated
-                if (text_OutputLog.Lines.Count() > 0)
-                {
-                    // Get the lines of text
-                    string[] lineArray = text_OutputLog.Lines;
-
-                    // Create a collection so that a line can be removed
-                    var lineCollection = new List<string>(lineArray);
-
-                    // Remove the first line
-                    lineCollection.RemoveAt(0);
-
-                    // Convert the collection back to an array
-                    lineArray = lineCollection.ToArray();
-
-                    // Display the new data in the control
-                    text_OutputLog.Lines = lineArray;
-                }
-            }
-
             // Update character count
             lbl_OutputLogChars.Text = ("Length: " + text_OutputLog.Text.Count().ToString());


Removed unreferenced members IsMoving and MoveStartSquare from PlayingBoard.

--- Sandra.UI.WF/PlayingBoard.cs
+++ Sandra.UI.WF/PlayingBoard.cs
@@ -658,12 +658,6 @@
         public SquareLocation HoverSquare => getSquareLocation(hoveringSquareIndex);

         /// <summary>
-        /// Gets if an image is currently being moved.
-        /// </summary>
-        [Browsable(false)]
-        public bool IsMoving => moveStartSquareIndex >= 0;
-
-        /// <summary>
         /// Gets the <see cref="Rectangle"/> for the square on position (x, y) in coordinates relative to the top left corner of the control.
         /// </summary>
         /// <exception cref="IndexOutOfRangeException">
@@ -706,13 +700,6 @@
         /// The <see cref="SquareLocation"/> at the specified point, or null if there is none.
         /// </returns>
         public SquareLocation GetSquareLocation(Point point) => getSquareLocation(getSquareIndexFromLocation(point));
-
-        /// <summary>
-        /// Gets the location of the square where the current move started if <see cref="IsMoving"/> is true,
-        /// or null (Nothing in Visual Basic) if no move is currently being performed.
-        /// </summary>
-        [Browsable(false)]
-        public SquareLocation MoveStartSquare => getSquareLocation(moveStartSquareIndex);

         /// <summary>


Allow urls without http://

Allow urls without http://

As @AmadeusW mentioned in #18.

--- src/SourceBrowser.SolutionRetriever/GitHubSolutionRetriever.cs
+++ src/SourceBrowser.SolutionRetriever/GitHubSolutionRetriever.cs
@@ -13,6 +13,8 @@

         public GitHubRetriever(string url)
         {
+            if (!(url.StartsWith("https://") || url.StartsWith("http://")))
+                url = "https://" + url;
             _url = url;
             var splitUrl = url.Split(new char[] { '/' }, StringSplitOptions.RemoveEmptyEntries);


chore(ServicePayController): amend ImmediateBasket failure log to provide better information

--- src/StockportWebapp/Controllers/ServicePayPaymentController.cs
+++ src/StockportWebapp/Controllers/ServicePayPaymentController.cs
@@ -117,7 +117,8 @@
                     ModelState.AddModelError("Reference", $"Check {payment.ReferenceLabel.ToLower()} and try again.");
                     return View(paymentSubmission);
                 }
-                _logger.LogError($"ServicePayPaymentController:: civica basket response failed with response code {civicaResponse.ResponseContent.ResponseCode}, response message - {civicaResponse.ReasonPhrase}");
+
+                _logger.LogError($"ServicePayPaymentController:: Unable to create ImmediateBasket:: CivicaPay response code: {civicaResponse.ResponseContent.ResponseCode}, CivicaPay error message - {civicaResponse.ResponseContent.ErrorMessage}");
                 return View("Error", response);
             }


不要な代入をカット

不要な代入をカット

--- Sdx/Scaffold/Config/Value.cs
+++ Sdx/Scaffold/Config/Value.cs
@@ -64,8 +64,7 @@
       }
       else
       {
-        var method = type.GetMethod(value.ToString());
-        return method;
+        return type.GetMethod(value.ToString());
       }
     }

@@ -82,8 +81,7 @@
       }
       else
       {
-        var property = type.GetProperty(value.ToString());
-        return property;
+        return type.GetProperty(value.ToString());
       }
     }


[Modify] 2016

[Modify] 2016

--- websocket-sharp/MessageEventArgs.cs
+++ websocket-sharp/MessageEventArgs.cs
@@ -4,7 +4,7 @@
  *
  * The MIT License
  *
- * Copyright (c) 2012-2015 sta.blockhead
+ * Copyright (c) 2012-2016 sta.blockhead
  *
  * Permission is hereby granted, free of charge, to any person obtaining a copy
  * of this software and associated documentation files (the "Software"), to deal


[Modify] Add a check

[Modify] Add a check

--- websocket-sharp/Net/HttpListener.cs
+++ websocket-sharp/Net/HttpListener.cs
@@ -811,7 +811,11 @@
       if (_disposed)
         return;

-      close (true);
+      if (_listening) {
+        _listening = false;
+        close (true);
+      }
+
       _disposed = true;
     }


VineVisitor: minor change: untabify lines

--- VineScriptLib/Compilers/Vine/VineVisitor.cs
+++ VineScriptLib/Compilers/Vine/VineVisitor.cs
@@ -199,7 +199,7 @@
         }

-	    public override VineValue VisitIfStmt(VineParser.IfStmtContext context)
+        public override VineValue VisitIfStmt(VineParser.IfStmtContext context)
         {
             lastEnteredContext = context;
             Console.WriteLine("IF STATEMENT");
@@ -216,7 +216,7 @@
             return ifvalue;
         }

-	    public override VineValue VisitElifStmt(VineParser.ElifStmtContext context)
+        public override VineValue VisitElifStmt(VineParser.ElifStmtContext context)
         {
             lastEnteredContext = context;
             Console.WriteLine("ELIF STATEMENT");
@@ -233,7 +233,7 @@
             return elifvalue;
         }

-	    public override VineValue VisitElseStmt(VineParser.ElseStmtContext context)
+        public override VineValue VisitElseStmt(VineParser.ElseStmtContext context)
         {
             lastEnteredContext = context;
             Console.WriteLine("ELSE STATEMENT");


Smimplify

Smimplify

--- src/Workspaces/Core/Portable/Shared/Utilities/NameGenerator.cs
+++ src/Workspaces/Core/Portable/Shared/Utilities/NameGenerator.cs
@@ -37,7 +37,7 @@
                 }
             }

-            EnsureUniquenessInPlace(names, isFixed, canUse: Functions<string>.True, isCaseSensitive: isCaseSensitive);
+            EnsureUniquenessInPlace(names, isFixed, isCaseSensitive: isCaseSensitive);
             return names.First();
         }


Fix xmldocs

Fix xmldocs

--- osu.Framework/Graphics/Containers/GridContainer.cs
+++ osu.Framework/Graphics/Containers/GridContainer.cs
@@ -1,7 +1,6 @@
 // Copyright (c) 2007-2017 ppy Pty Ltd <contact@ppy.sh>.
 // Licensed under the MIT Licence - https://raw.githubusercontent.com/ppy/osu-framework/master/LICENCE

-using System;
 using System.Linq;
 using OpenTK;
 using osu.Framework.Caching;
@@ -263,14 +262,14 @@

         /// <summary>
         /// The size of the row or column which this <see cref="Dimension"/> applies to.
-        /// This only has an effect if <see cref="Mode"/> is not <see cref="GridSizeMode.Auto"/>.
         /// </summary>
         public float Size { get; private set; }

         /// <summary>
         /// Constructs a new <see cref="Dimension"/>.
         /// </summary>
-        /// <param name="mode"/>The sizing mode to use.</param>
+        /// <param name="mode">The sizing mode to use.</param>
+        /// <param name="size">The size of this row or column. This only has an effect if <paramref name="mode"/> is not <see cref="GridSizeMode.Auto"/>.</param>
         public Dimension(GridSizeMode mode = GridSizeMode.Auto, float size = 0)
         {
             Mode = mode;


Restore create-if-not-existing argument for clarity

--- osu.Framework/Graphics/Transforms/Transformable.cs
+++ osu.Framework/Graphics/Transforms/Transformable.cs
@@ -92,13 +92,16 @@
             return null;
         }

-        private TargetGroupingTransformTracker getTrackerForGrouping(string targetGrouping)
+        private TargetGroupingTransformTracker getTrackerForGrouping(string targetGrouping, bool createIfNotExisting)
         {
             foreach (var t in targetGroupingTrackers)
             {
                 if (t.TargetGrouping == targetGrouping)
                     return t;
             }
+
+            if (!createIfNotExisting)
+                return null;

             var tracker = new TargetGroupingTransformTracker(this, targetGrouping);
             targetGroupingTrackers.Add(tracker);
@@ -127,7 +130,7 @@
         /// <param name="toRemove">The <see cref="Transform"/> to remove.</param>
         public void RemoveTransform(Transform toRemove)
         {
-            getTrackerForGrouping(toRemove.TargetGrouping)?.RemoveTransform(toRemove);
+            getTrackerForGrouping(toRemove.TargetGrouping, false)?.RemoveTransform(toRemove);

             toRemove.OnAbort?.Invoke();
         }
@@ -291,7 +294,7 @@
                 return;
             }

-            getTrackerForGrouping(transform.TargetGrouping).AddTransform(transform, customTransformID);
+            getTrackerForGrouping(transform.TargetGrouping, true).AddTransform(transform, customTransformID);
         }
     }
 }


Improve messaging from SDL2 GL context failures

--- osu.Framework/Platform/SDL2/SDL2GraphicsBackend.cs
+++ osu.Framework/Platform/SDL2/SDL2GraphicsBackend.cs
@@ -22,7 +22,12 @@
         protected override IntPtr CreateContext()
         {
             SDL.SDL_GL_SetAttribute(SDL.SDL_GLattr.SDL_GL_CONTEXT_PROFILE_MASK, SDL.SDL_GLprofile.SDL_GL_CONTEXT_PROFILE_COMPATIBILITY);
-            return SDL.SDL_GL_CreateContext(sdlWindowHandle);
+
+            IntPtr context = SDL.SDL_GL_CreateContext(sdlWindowHandle);
+            if (context == IntPtr.Zero)
+                throw new InvalidOperationException($"Failed to create an SDL2 GL context ({SDL.SDL_GetError()})");
+
+            return context;
         }

         protected override void MakeCurrent(IntPtr context) => SDL.SDL_GL_MakeCurrent(sdlWindowHandle, context);


Check if relax is one of the mods, if so hide.

--- osu.Game.Rulesets.Catch/UI/DrawableCatchRuleset.cs
+++ osu.Game.Rulesets.Catch/UI/DrawableCatchRuleset.cs
@@ -4,6 +4,7 @@
 #nullable disable

 using System.Collections.Generic;
+using System.Linq;
 using osu.Framework.Allocation;
 using osu.Framework.Input;
 using osu.Game.Beatmaps;
@@ -26,9 +27,15 @@

         protected override bool UserScrollSpeedAdjustment => false;

+        private bool showMobileMapper = true;
+
         public DrawableCatchRuleset(Ruleset ruleset, IBeatmap beatmap, IReadOnlyList<Mod> mods = null)
             : base(ruleset, beatmap, mods)
         {
+            // Check if mods have RelaxMod instance
+            if (mods.OfType<ModRelax>().Any())
+                showMobileMapper = false;
+
             Direction.Value = ScrollingDirection.Down;
             TimeRange.Value = IBeatmapDifficultyInfo.DifficultyRange(beatmap.Difficulty.ApproachRate, 1800, 1200, 450);
         }
@@ -36,7 +43,8 @@
         [BackgroundDependencyLoader]
         private void load()
         {
-            KeyBindingInputManager.Add(new CatchTouchInputMapper());
+            if (showMobileMapper)
+                KeyBindingInputManager.Add(new CatchTouchInputMapper());
         }

         protected override ReplayInputHandler CreateReplayInputHandler(Replay replay) => new CatchFramedReplayInputHandler(replay);


Remove unnecessary raw string prefixes

Remove unnecessary raw string prefixes

--- osu.Game.Tests/Visual/Online/TestSceneUserPanel.cs
+++ osu.Game.Tests/Visual/Online/TestSceneUserPanel.cs
@@ -58,9 +58,9 @@
         public void UserStatusesTests()
         {
             AddStep("online", () => peppy.Status.Value = new UserStatusOnline());
-            AddStep(@"do not disturb", () => peppy.Status.Value = new UserStatusDoNotDisturb());
-            AddStep(@"offline", () => peppy.Status.Value = new UserStatusOffline());
-            AddStep(@"null status", () => peppy.Status.Value = null);
+            AddStep("do not disturb", () => peppy.Status.Value = new UserStatusDoNotDisturb());
+            AddStep("offline", () => peppy.Status.Value = new UserStatusOffline());
+            AddStep("null status", () => peppy.Status.Value = null);
         }

         [Test]


Simplify instantiation

Simplify instantiation

--- osu.Game/Skinning/RulesetSkinProvidingContainer.cs
+++ osu.Game/Skinning/RulesetSkinProvidingContainer.cs
@@ -96,12 +96,14 @@
             {
                 int defaultSkinIndex = SkinSources.IndexOf(skinManager.DefaultSkin);

+                var rulesetResources = new ResourcesSkin(resources, host, audio);
+
                 if (defaultSkinIndex >= 0)
-                    SkinSources.Insert(defaultSkinIndex, new ResourcesSkin(resources, host, audio));
+                    SkinSources.Insert(defaultSkinIndex, rulesetResources);
                 else
                 {
                     // Tests may potentially override the SkinManager with another source that doesn't include it in AllSources.
-                    SkinSources.Add(new ResourcesSkin(resources, host, audio));
+                    SkinSources.Add(rulesetResources);
                 }
             }
         }


Fixed cleanup

Fixed cleanup

--- Services/PublisherService.cs
+++ Services/PublisherService.cs
@@ -105,7 +105,7 @@
             PackageHeadObject packageHead, PriceObject packagePrice)
         {
             string descStrippedHtml = Regex.Replace(package.content.description, "<.*?>", String.Empty);
-            descStrippedHtml = Regex.Replace(package.content.description, " ", String.Empty);
+            descStrippedHtml = Regex.Replace(descStrippedHtml, " ", String.Empty);

             StringBuilder sb = new StringBuilder();
             sb.Append("**--- Publisher everyday Advertising ---**\n\n");


Give anonymous connections a connecton id.

--- SignalR/ConnectionManager.cs
+++ SignalR/ConnectionManager.cs
@@ -9,7 +9,7 @@
     public class ConnectionManager : IConnectionManager
     {
         private readonly IDependencyResolver _resolver;
-
+
         public ConnectionManager(IDependencyResolver resolver)
         {
             _resolver = resolver;
@@ -38,10 +38,12 @@

         private IConnection GetConnection(string connectionType)
         {
+            // Give this a unique id
+            var connectionId = Guid.NewGuid().ToString();
             return new Connection(_resolver.Resolve<IMessageBus>(),
                                   _resolver.Resolve<IJsonSerializer>(),
                                   connectionType,
-                                  null,
+                                  connectionId,
                                   new[] { connectionType },
                                   Enumerable.Empty<string>(),
                                   _resolver.Resolve<ITraceManager>());


Refactorings

Refactorings

--- WWCP_OCHPv1.4_Adapter/CPO/WWCPCPOAdapter.cs
+++ WWCP_OCHPv1.4_Adapter/CPO/WWCPCPOAdapter.cs
@@ -3938,7 +3938,10 @@
             {
                 Endtime  = DateTime.Now;
                 Runtime  = Endtime - StartTime;
-                result   = AuthStartResult.OutOfService(Id, SessionId, Runtime);
+                result   = AuthStartResult.OutOfService(Id,
+                                                        this,
+                                                        SessionId,
+                                                        Runtime);
             }

             else
@@ -3965,6 +3968,7 @@
                 {

                     result = AuthStartResult.Authorized(Id,
+                                                        this,
                                                         ChargingSession_Id.New,
                                                         ProviderId: response.Content.RoamingAuthorisationInfo.ContractId.ProviderId.ToWWCP(),
                                                         Runtime:    Runtime);
@@ -3973,6 +3977,7 @@

                 else
                     result = AuthStartResult.NotAuthorized(Id,
+                                                           this,
                                                            // response.Content.ProviderId.ToWWCP(),
                                                            Runtime: Runtime);

@@ -4099,7 +4104,10 @@
             {
                 Endtime  = DateTime.Now;
                 Runtime  = Endtime - StartTime;
-                result   = AuthStartEVSEResult.OutOfService(Id, SessionId, Runtime);
+                result   = AuthStartEVSEResult.OutOfService(Id,
+                                                            this,
+                                                            SessionId,
+                                                            Runtime);
             }

             else
@@ -4126,6 +4134,7 @@
                 {

                     result = AuthStartEVSEResult.Authorized(Id,
+                                                            this,
                                                             ChargingSession_Id.New,
                                                             ProviderId: response.Content.RoamingAuthorisationInfo != null
                                                                             ? response.Content.RoamingAuthorisationInfo.ContractId.ProviderId.ToWWCP()
@@ -4136,6 +4145,7 @@

                 else
                     result = AuthStartEVSEResult.NotAuthorized(Id,
+                                                               this,
                                                                // response.Content.ProviderId.ToWWCP(),
                                                                Runtime: Runtime);

@@ -4278,6 +4288,7 @@
             {

                 result = AuthStartChargingStationResult.Authorized(Id,
+                                                                   this,
                                                                    ChargingSession_Id.New,
                                                                    ProviderId:  response.Content.RoamingAuthorisationInfo.ContractId.ProviderId.ToWWCP(),
                                                                    Runtime:     Runtime);
@@ -4286,6 +4297,7 @@

             else
                 result = AuthStartChargingStationResult.NotAuthorized(Id,
+                                                                      this,
                                                                       // response.Content.ProviderId.ToWWCP(),
                                                                       // response.Content.StatusCode.Description,
                                                                       // response.Content.StatusCode.AdditionalInfo,
@@ -4428,6 +4440,7 @@
             {

                 result = AuthStartChargingPoolResult.Authorized(Id,
+                                                                this,
                                                                 ChargingSession_Id.New,
                                                                 ProviderId:  response.Content.RoamingAuthorisationInfo.ContractId.ProviderId.ToWWCP(),
                                                                 Runtime:     Runtime);
@@ -4436,6 +4449,7 @@

             else
                 result = AuthStartChargingPoolResult.NotAuthorized(Id,
+                                                                   this,
                                                                    // response.Content.ProviderId.ToWWCP(),
                                                                    // response.Content.StatusCode.Description,
                                                                    // response.Content.StatusCode.AdditionalInfo,


no message

no message

--- Solution/WpfApp1/App.xaml.cs
+++ Solution/WpfApp1/App.xaml.cs
@@ -19,7 +19,7 @@
         {
             Class1 c1 = new Class1();
             var tup = c1.GetTuple();
-
+            // VAmos
             Debug.WriteLine("" + tup.First);
         }
     }


Changed top pipe rotation syntax

Changed top pipe rotation syntax

Co-Authored-By: Salman Ahmed <a88b7dcd1a9e3e17770bbaa6d7515b31a2d7e85d@iisalman.me>

--- osu.Framework.Templates/templates/template-flappy/FlappyDon.Game/Obstacles/PipeObstacle.cs
+++ osu.Framework.Templates/templates/template-flappy/FlappyDon.Game/Obstacles/PipeObstacle.cs
@@ -36,7 +36,7 @@
             // Rotate the top pipe 180 degrees, and flip
             // it horizontally so the shading matches the bottom pipe
             topPipe = new Pipe();
-            topPipe.RotateTo(180);
+            topPipe.Rotation = 180.0f;
             topPipe.Scale = new Vector2(-topPipe.Scale.X, topPipe.Scale.Y);
             topPipe.Anchor = Anchor.Centre;
             topPipe.Origin = Anchor.TopCentre;


Version increment

Version increment

--- Source/SharedAssemblyInfo.cs
+++ Source/SharedAssemblyInfo.cs
@@ -6,7 +6,7 @@
 [assembly: AssemblyProduct("Synthesis")]
 [assembly: AssemblyCopyright("Copyright © Kam Figy, ISITE Design")]
 [assembly: ComVisible(false)]
-[assembly: AssemblyVersion("7.3.3.0")]
-[assembly: AssemblyFileVersion("7.3.3.0")]
-[assembly: AssemblyInformationalVersion("7.3.3")]
+[assembly: AssemblyVersion("8.0.0.0")]
+[assembly: AssemblyFileVersion("8.0.0.0")]
+[assembly: AssemblyInformationalVersion("8.0.0-beta01")]
 [assembly: CLSCompliant(false)]


Fixes GetServerRulesSync()

Fixes GetServerRulesSync()

--- Source/Steam.Query/Server.cs
+++ Source/Steam.Query/Server.cs
@@ -55,7 +55,7 @@
                 byte[] responseData = client.Receive(ref localEndpoint);
                 requestPacket.Clear();
                 requestPacket.AddRange(new Byte[] { 0xFF, 0xFF, 0xFF, 0xFF, 0x56 });
-                requestPacket.AddRange(responseData.Skip(6).Take(4));
+                requestPacket.AddRange(responseData.Skip(5).Take(4));
                 client.Send(requestPacket.ToArray(), requestPacket.ToArray().Length);
                 responseData = client.Receive(ref localEndpoint);
                 return ServerRulesResult.Parse(responseData);


update version

update version

--- Wodsoft.ComBoost/Properties/AssemblyInfo.cs
+++ Wodsoft.ComBoost/Properties/AssemblyInfo.cs
@@ -32,5 +32,5 @@
 // 可以指定所有这些值，也可以使用“内部版本号”和“修订号”的默认值，
 // 方法是按如下所示使用“*”:
 // [assembly: AssemblyVersion("1.0.*")]
-[assembly: AssemblyVersion("1.0.2.0")]
-[assembly: AssemblyFileVersion("1.0.2.0")]
+[assembly: AssemblyVersion("1.0.3.0")]
+[assembly: AssemblyFileVersion("1.0.3.0")]


[WPF] Improve GetScaleFactor and return device-independent pixels from GetMouseLocation

This enables us to use the value of Desktop.MouseLocation to accurately set the
ScreenBounds of a window on WPF.

--- Xwt.WPF/Xwt.WPFBackend/WpfDesktopBackend.cs
+++ Xwt.WPF/Xwt.WPFBackend/WpfDesktopBackend.cs
@@ -23,7 +23,8 @@
 // LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
 // OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
 // THE SOFTWARE.
-using System;
+using System;
+using System.Reflection;
 using System.Runtime.InteropServices;
 using Xwt.Backends;
 using SWF = System.Windows.Forms;
@@ -42,31 +43,54 @@
 			{
 				System.Windows.Application.Current.Dispatcher.BeginInvoke (new Action (OnScreensChanged));
 			};
-		}
+		}

+		static bool cannotCallGetDpiForMonitor;
 		public override double GetScaleFactor (object backend)
-		{
-			var hdc = GetDC (IntPtr.Zero);
-			if (hdc == IntPtr.Zero) {
-				// GetDC failed for some reason
-				return base.GetScaleFactor (backend);
-			}
-			try {
-				//FIXME: Is it possible for the Y dpi to differ from the X dpi,
-				//  and if so, what should we do about it?
-				var dpiX = GetDeviceCaps (hdc, LOGPIXELSX);
-				return dpiX / BASELINE_DPI;
-			} finally {
-				ReleaseDC (IntPtr.Zero, hdc);
-			}
+		{
+			//FIXME: Is it possible for the Y dpi to differ from the X dpi,
+			//  and if so, what should we do about it?
+			int dpi = (int)BASELINE_DPI;
+
+			// In Windows 8.1, there can be a different dpi per monitor
+			if (!cannotCallGetDpiForMonitor) {
+				// .. I wish there was a less hacky way of getting the HMONITOR from the SWF.Screen :/
+				var hmonitorField = typeof (SWF.Screen).GetField ("hmonitor", BindingFlags.Instance | BindingFlags.NonPublic);
+				if (hmonitorField == null) {
+					cannotCallGetDpiForMonitor = true;
+				} else {
+					try {
+						int dpiY;
+						GetDpiForMonitor ((IntPtr)hmonitorField.GetValue (backend), MDT_Effective_DPI, out dpi, out dpiY);
+					} catch {
+						cannotCallGetDpiForMonitor = true;
+					}
+				}
+			}
+			if (cannotCallGetDpiForMonitor) {
+				// Get system-wide dpi
+				var hdc = GetDC (IntPtr.Zero);
+				if (hdc != IntPtr.Zero) {
+					try {
+						dpi = GetDeviceCaps (hdc, LOGPIXELSX);
+					} finally {
+						ReleaseDC (IntPtr.Zero, hdc);
+					}
+				}
+			}
+			return dpi / BASELINE_DPI;
 		}

 		#region implemented abstract members of DesktopBackend

 		public override Point GetMouseLocation()
 		{
-			var loc = SWF.Cursor.Position;
-			return new Point (loc.X, loc.Y);
+			var loc = SWF.Cursor.Position;
+			var screen = SWF.Screen.FromPoint (loc);
+			var scale = GetScaleFactor (screen);
+
+			// We need to convert the device pixels into WPF's device-independent pixels..
+			return new Point (loc.X / scale, loc.Y / scale);
 		}

 		public override IEnumerable<object> GetScreens ()
@@ -102,10 +126,12 @@

 		const int LOGPIXELSX = 88;
 		const int LOGPIXELSY = 90;
+		const int MDT_Effective_DPI = 0;

 		[DllImport ("user32")] static extern IntPtr GetDC (IntPtr hWnd);
 		[DllImport ("user32")] static extern int ReleaseDC (IntPtr hWnd, IntPtr hdc);
 		[DllImport ("gdi32")]  static extern int GetDeviceCaps (IntPtr hdc, int nIndex);
+		[DllImport ("Shcore")] static extern int GetDpiForMonitor (IntPtr hmonitor, int dpiType, out int dpiX, out int dpiY);
 		#endregion
 	}
 }


Fixing float precision errors

Fixing float precision errors

--- Assets/CapsuleCharacterCollision/CCCollision/PlayerRigidbody.cs
+++ Assets/CapsuleCharacterCollision/CCCollision/PlayerRigidbody.cs
@@ -274,7 +274,8 @@
 					Vector3 hitNormal = Vector3.zero;
 					bool hasHit = false;
 					//It is important for us to have a negativeOffset, otherwise our collision detection methods might keep telling us we are penetrated...
-					if(attempts > 0 && attempts < collisionHandleInfo.addNegativeOffsetUntilAttempt) negativeOffset += -smallOffset;
+				//There seems to be float precision errors on large convex mesh colliders (not even that large, like 40 units wide) when using Physics.CheckCapsule (and possibly other physics methods) so try to allow negativeOffset to go below -.01f or so. Not sure if will work well at lower player scales.
+					if(attempts > 0 && negativeOffset > -safeCheckOffset) negativeOffset += -smallOffset;

 					//It is advised to do your grounding somewhere here depending on your grounding method and I also think its better for framerate independence.
 					//Keep in mind the the way your collision system is, it can make or break your chances of framerate independence.
@@ -312,7 +313,7 @@
 							hitNormal = (depenetration != Vector3.zero) ? depenetration.normalized : hitNormal;

 							//Final check if we are safe, if not then we just move a little and hope for the best.
-							if(ExtPhysics.CheckCapsule(origin, transformUp, capsuleHeight + ((negativeOffset - smallOffset) * 2f), capsuleRadius + negativeOffset - smallOffset, ignoreColliders, mask))
+							if(ExtPhysics.CheckCapsule(origin, transformUp, capsuleHeight + ((negativeOffset - smallOffset) * 2f), capsuleRadius + (negativeOffset - smallOffset), ignoreColliders, mask))
 							{
 								origin += (hitNormal * smallOffset);
 							}
@@ -886,7 +887,6 @@
 			public int maxCollisionCheckIterations = 15; //On average it runs 2 to 3 times, but on surfaces with opposing normals it could run much more.
 			public int maxDepenetrationIterations = 10;
 			public int maxVelocitySteps = 20; //A safety in case we are moving very fast we dont want to divide our velocity into to many steps since that can cause lag and freeze the game, so we prefer to have the collision be unsafe.
-			public int addNegativeOffsetUntilAttempt = 5;
 			public bool abortIfFailedThisFrame = true; //Prevents us from constantly trying and failing this frame which causes lots of lag if using subUpdater, which would make subUpdater run more and lag more...
 			public bool tryBlockAtSlopeLimit = true;
 			public bool cleanByIgnoreBehindPlane;


Fix starting character pool being drained for multiple playthroughs

--- Assets/Scripts/HarryPotterUnity/DeckGeneration/DeckGenerator.cs
+++ Assets/Scripts/HarryPotterUnity/DeckGeneration/DeckGenerator.cs
@@ -1,4 +1,5 @@
-using System.Collections.Generic;
+using System;
+using System.Collections.Generic;
 using System.Linq;
 using HarryPotterUnity.Cards;
 using HarryPotterUnity.Cards.Interfaces;
@@ -6,6 +7,7 @@
 using JetBrains.Annotations;
 using UnityEngine;
 using Random = UnityEngine.Random;
+using Type = HarryPotterUnity.Enums.Type;

 namespace HarryPotterUnity.DeckGeneration
 {
@@ -22,16 +24,17 @@
                 }
         }

-        private static List<BaseCard> _startingCharacters;
-
+        private static List<BaseCard> _availableStartingCharacters;
+        private static List<BaseCard> _allStartingCharacters;
         private static void LoadCardLibrary()
         {
             _cardLibrary = new List<BaseCard>();
-            _startingCharacters = new List<BaseCard>();
+            _allStartingCharacters = new List<BaseCard>();
+            _availableStartingCharacters = new List<BaseCard>();

             var resources = Resources.LoadAll("Cards/");

-            foreach (var container in resources.Cast<GameObject>())
+            foreach (GameObject container in resources.Cast<GameObject>())
             {
                 if (container == null)
                 {
@@ -43,34 +46,30 @@

                 if (cardInfo.Type == Type.Character)
                 {
-                    _startingCharacters.Add(cardInfo);
+                    _availableStartingCharacters.Add(cardInfo);
+                    _allStartingCharacters.Add(cardInfo);
                 }
             }
         }

         public static BaseCard GetRandomStartingCharacter()
         {
-            if(_startingCharacters == null) LoadCardLibrary();
+            if(_availableStartingCharacters == null) LoadCardLibrary();

-            if (_startingCharacters == null)
+            if (_availableStartingCharacters == null)
             {
-                throw new System.Exception("Starting Characters are not loaded!");
+                throw new Exception("Starting Characters are not loaded!");
             }

-            var character = _startingCharacters.Skip(Random.Range(0, _startingCharacters.Count)).First();
+            BaseCard character = _availableStartingCharacters.Skip(Random.Range(0, _availableStartingCharacters.Count)).First();

-            _startingCharacters.Remove(character);
+            _availableStartingCharacters.Remove(character);

             return character;
         }

         public static IEnumerable<BaseCard> GenerateDeck(List<LessonTypes> types)
         {
-            if (types.Count != 2 && types.Count != 3)
-            {
-                throw new System.Exception(types.Count + " type(s) sent to GenerateDeck, unsupported");
-            }
-
             var deck = new List<BaseCard>();

             switch (types.Count)
@@ -91,6 +90,8 @@
                     AddCardsToDeck(ref deck, MapLessonType(types[1]), 10);
                     AddCardsToDeck(ref deck, MapLessonType(types[2]), 10);
                     break;
+                default:
+                    throw new Exception(types.Count + " type(s) sent to GenerateDeck, unsupported");
             }

             return deck;
@@ -105,15 +106,14 @@
                     case LessonTypes.Transfiguration: return  ClassificationTypes.Transfiguration;
                     case LessonTypes.Quidditch: return  ClassificationTypes.Quidditch;
                     case LessonTypes.Potions: return ClassificationTypes.Potions;
+                default:
+                    throw new ArgumentException("Unable to map lesson type");
             }
-
-            throw new System.ArgumentException("Unable to map lesson type");
         }

         private static void AddLessonsToDeck(ref List<BaseCard> deck, LessonTypes lessonType, int amount)
         {
-            var card = CardLibrary.Where(c => c.Classification == ClassificationTypes.Lesson)
-                .First(l => ((ILessonProvider) l).LessonType == lessonType);
+            BaseCard card = CardLibrary.Where(c => c.Classification == ClassificationTypes.Lesson).First(l => ((ILessonProvider) l).LessonType == lessonType);

             for (int i = 0; i < amount; i++)
             {
@@ -133,11 +133,9 @@
                 var card = potentialCards[selected];

                 var deckCopy = deck.ToList();
-
-                bool canBeAdded = (card.DeckGenerationRequirements.Count == 0 ||
-                                  card.DeckGenerationRequirements.TrueForAll(req => req.MeetsRequirement(deckCopy))) &&
-                                  card.MeetsRarityRequirements();
-
+
+                bool canBeAdded = (card.DeckGenerationRequirements.Count == 0 || card.DeckGenerationRequirements.TrueForAll(req => req.MeetsRequirement(deckCopy))) && card.MeetsRarityRequirements();
+
                 //TODO: Enabled the second check when enough cards have been implemented
                 if (canBeAdded == false /* || deck.Count(c => c.Equals(card)) >= 4 */) continue;

@@ -148,7 +146,7 @@

         private static bool MeetsRarityRequirements(this BaseCard card)
         {
-            float chanceToAdd = 1f;
+            float chanceToAdd;

             float rng = Random.Range(0f, 1f);

@@ -166,9 +164,17 @@
                 case Rarity.UltraRare:
                     chanceToAdd = 0.3f;
                     break;
+                default:
+                    chanceToAdd = 1f;
+                    break;
             }
-
+
             return rng <= chanceToAdd;
+        }
+
+        public static void ResetStartingCharacterPool()
+        {
+            _availableStartingCharacters = _allStartingCharacters.ToList();
         }
     }
 }


Perfected :D

Perfected :D

--- Assets/ViveGrip/Examples/Scripts/ViveGripExample_CapsuleZone.cs
+++ Assets/ViveGrip/Examples/Scripts/ViveGripExample_CapsuleZone.cs
@@ -12,8 +12,13 @@
   }

   void OnTriggerStay(Collider other) {
-    if (CapsuleNotSeated() && CapsuleObjectIs(other.gameObject)) { SetEnteredTo(true); }
-	}
+    if (CapsuleSeated()) {
+      SetEnteredTo(false);
+    }
+    else {
+      if (CapsuleObjectIs(other.gameObject)) { SetEnteredTo(true); }
+    }
+  }

   void OnTriggerExit(Collider other) {
     if (CapsuleObjectIs(other.gameObject)) { SetEnteredTo(false); }
@@ -28,7 +33,7 @@
     return gameObject.GetInstanceID() != capsule.gameObject.GetInstanceID();
   }

-  bool CapsuleNotSeated() {
-    return !capsule.gameObject.GetComponent<ViveGripExample_Capsule>().seated;
+  bool CapsuleSeated() {
+    return capsule.gameObject.GetComponent<ViveGripExample_Capsule>().seated;
   }
 }


removing superfluous code.

removing superfluous code.

--- AuroraService/addon-modules/AuroraWebUI/Modules/WebUIHandler.cs
+++ AuroraService/addon-modules/AuroraWebUI/Modules/WebUIHandler.cs
@@ -988,19 +988,15 @@
         OSDMap DeleteUser(OSDMap map)
         {
             OSDMap resp = new OSDMap();
+            resp["Finished"] = OSD.FromBoolean(true);
+
             UUID agentID = map["UserID"].AsUUID();
             IAgentInfo GetAgent = DataManager.RequestPlugin<IAgentConnector>().GetAgent(agentID);

-            if (GetAgent == null)
-            {
-                resp["Finished"] = OSD.FromBoolean(true);
-            }
-            else
+            if (GetAgent != null)
             {
                 GetAgent.Flags &= ~IAgentFlags.PermBan;
                 DataManager.RequestPlugin<IAgentConnector>().UpdateAgent(GetAgent);
-
-                resp["Finished"] = OSD.FromBoolean(true);
             }
             return resp;
         }


use stipple line to display extruded volume.

--- CSharpGL/Scene/Algorithms/Actions/3DWorld/ShadowVolumeAction.cs
+++ CSharpGL/Scene/Algorithms/Actions/3DWorld/ShadowVolumeAction.cs
@@ -35,6 +35,8 @@
         private readonly DepthMaskState depthMask = new DepthMaskState(writable: false);
         private readonly DepthClampState depthClamp = new DepthClampState(enableCapacity: true);
         private readonly BlendState blend = new BlendState(BlendingSourceFactor.One, BlendingDestinationFactor.One);
+        private readonly PolygonModeState polygonMode = new PolygonModeState(PolygonMode.Line);
+        private readonly LineStippleState lineSipple = new LineStippleState();
         //private readonly GLStateList stateList;
         private readonly ClearStencilNode clearStencilNode;

@@ -77,6 +79,7 @@
                 {
                     this.depthMask.On(); // Disable writing to depth buffer.
                     if (!displayShadowVolume) { this.colorMask.On(); } // Disable writing to color buffer.
+                    else { this.polygonMode.On(); this.lineSipple.On(); }
                     this.cullFace.On();  // Disable culling face.
                     GL.Instance.StencilFunc(GL.GL_ALWAYS, 0, 0xFF); // always pass stencil test.
                     // If depth test fails for back face, increase value in stencil buffer.
@@ -90,6 +93,7 @@

                     this.cullFace.Off();
                     if (!displayShadowVolume) { this.colorMask.Off(); }
+                    else { this.polygonMode.Off(); this.lineSipple.Off(); }
                     this.depthMask.Off();
                 }
                 //


Add pointer null check into the base method call

--- Assets/MixedRealityToolkit-SDK/Features/Input/FocusProvider.cs
+++ Assets/MixedRealityToolkit-SDK/Features/Input/FocusProvider.cs
@@ -306,12 +306,15 @@
         /// <inheritdoc />
         public bool TryGetFocusDetails(IMixedRealityPointer pointer, out FocusDetails focusDetails)
         {
-            foreach (var pointerData in pointers)
-            {
-                if (pointerData.Pointer.PointerId == pointer.PointerId)
-                {
-                    focusDetails = pointerData.Details;
-                    return true;
+            if (pointer != null)
+            {
+                foreach (var pointerData in pointers)
+                {
+                    if (pointerData.Pointer.PointerId == pointer.PointerId)
+                    {
+                        focusDetails = pointerData.Details;
+                        return true;
+                    }
                 }
             }


Changed ListUnifiedGroups method back to the old version and marked as as obsolet. Created new method GetUnifiedGroups with correct parameters as replacement.

--- Core/OfficeDevPnP.Core/Framework/Graph/UnifiedGroupsUtility.cs
+++ Core/OfficeDevPnP.Core/Framework/Graph/UnifiedGroupsUtility.cs
@@ -789,6 +789,7 @@
         /// <param name="includeClassification">Defines whether or not to return details about the Modern Site classification value.</param>
         /// <param name="includeHasTeam">Defines whether to check for each unified group if it has a Microsoft Team provisioned for it. Default is false.</param>
         /// <returns>An IList of SiteEntity objects</returns>
+        [Obsolete("ListUnifiedGroups is deprecated, please use GetUnifiedGroups instead.")]
         public static List<UnifiedGroupEntity> ListUnifiedGroups(string accessToken,
             String displayName = null, string mailNickname = null,
             int startIndex = 0, int endIndex = 999, bool includeSite = true,
@@ -891,6 +892,115 @@
         }

         /// <summary>
+        /// Returns all the Office 365 Groups in the current Tenant based on a startIndex. IncludeSite adds additional properties about the Modern SharePoint Site backing the group
+        /// </summary>
+        /// <param name="accessToken">The OAuth 2.0 Access Token to use for invoking the Microsoft Graph</param>
+        /// <param name="displayName">The DisplayName of the Office 365 Group</param>
+        /// <param name="mailNickname">The MailNickname of the Office 365 Group</param>
+        /// <param name="startIndex">If not specified, method will start with the first group.</param>
+        /// <param name="endIndex">If not specified, method will return all groups.</param>
+        /// <param name="includeSite">Defines whether to return details about the Modern SharePoint Site backing the group. Default is true.</param>
+        /// <param name="retryCount">Number of times to retry the request in case of throttling</param>
+        /// <param name="delay">Milliseconds to wait before retrying the request. The delay will be increased (doubled) every retry</param>
+        /// <param name="includeClassification">Defines whether or not to return details about the Modern Site classification value.</param>
+        /// <param name="pageSize">Page size used for the individual requests to Micrsoft Graph. Defaults to 999 which is currently the maximum value.</param>
+        /// <returns>An IList of SiteEntity objects</returns>
+        public static List<UnifiedGroupEntity> GetUnifiedGroups(string accessToken,
+            String displayName = null, string mailNickname = null,
+            int startIndex = 0, int? endIndex = null, bool includeSite = true,
+            int retryCount = 10, int delay = 500, bool includeClassification = false, int pageSize = 999)
+        {
+            if (String.IsNullOrEmpty(accessToken))
+            {
+                throw new ArgumentNullException(nameof(accessToken));
+            }
+
+            List<UnifiedGroupEntity> result = null;
+            try
+            {
+                // Use a synchronous model to invoke the asynchronous process
+                result = Task.Run(async () =>
+                {
+                    List<UnifiedGroupEntity> groups = new List<UnifiedGroupEntity>();
+
+                    var graphClient = CreateGraphClient(accessToken, retryCount, delay);
+
+                    // Apply the DisplayName filter, if any
+                    var displayNameFilter = !String.IsNullOrEmpty(displayName) ? $" and (DisplayName eq '{Uri.EscapeDataString(displayName.Replace("'", "''"))}')" : String.Empty;
+                    var mailNicknameFilter = !String.IsNullOrEmpty(mailNickname) ? $" and (MailNickname eq '{Uri.EscapeDataString(mailNickname.Replace("'", "''"))}')" : String.Empty;
+
+                    var pagedGroups = await graphClient.Groups
+                        .Request()
+                        .Filter($"groupTypes/any(grp: grp eq 'Unified'){displayNameFilter}{mailNicknameFilter}")
+                        .Top(pageSize)
+                        .GetAsync();
+
+                    Int32 pageCount = 0;
+                    Int32 currentIndex = 0;
+
+                    while (true)
+                    {
+                        pageCount++;
+
+                        foreach (var g in pagedGroups)
+                        {
+                            currentIndex++;
+
+                            if (currentIndex >= startIndex)
+                            {
+                                var group = new UnifiedGroupEntity
+                                {
+                                    GroupId = g.Id,
+                                    DisplayName = g.DisplayName,
+                                    Description = g.Description,
+                                    Mail = g.Mail,
+                                    MailNickname = g.MailNickname,
+                                    Visibility = g.Visibility
+                                };
+
+                                if (includeSite)
+                                {
+                                    try
+                                    {
+                                        group.SiteUrl = GetUnifiedGroupSiteUrl(g.Id, accessToken);
+                                    }
+                                    catch (ServiceException e)
+                                    {
+                                        group.SiteUrl = e.Error.Message;
+                                    }
+                                }
+
+                                if (includeClassification)
+                                {
+                                    group.Classification = g.Classification;
+                                }
+
+                                groups.Add(group);
+                            }
+                        }
+
+                        if (pagedGroups.NextPageRequest != null && (endIndex == null || groups.Count < endIndex))
+                        {
+                            pagedGroups = await pagedGroups.NextPageRequest.GetAsync();
+                        }
+                        else
+                        {
+                            break;
+                        }
+                    }
+
+                    return (groups);
+                }).GetAwaiter().GetResult();
+            }
+            catch (ServiceException ex)
+            {
+                Log.Error(Constants.LOGGING_SOURCE, CoreResources.GraphExtensions_ErrorOccured, ex.Error.Message);
+                throw;
+            }
+            return (result);
+        }
+
+        /// <summary>
         /// Returns all the Members of an Office 365 group.
         /// </summary>
         /// <param name="group">The Office 365 group object of type UnifiedGroupEntity</param>


Http timeout increased to 60 seconds

Http timeout increased to 60 seconds

--- XHRTool.XHRLogic/XHRLogic.cs
+++ XHRTool.XHRLogic/XHRLogic.cs
@@ -26,7 +26,7 @@
                 var requestUri = new Uri(requestModel.Url, UriKind.Absolute);
                 var client = new TcpClient
                 {
-                    ReceiveTimeout = 5000
+                    ReceiveTimeout = 60000
                 };
                 client.Connect(requestUri.Host, requestUri.Port);
                 var httpRequest = new StringBuilder();


Commit fix

Commit fix

--- src/SIM.Tool/App.xaml.cs
+++ src/SIM.Tool/App.xaml.cs
@@ -332,6 +332,7 @@
     private static void RunUpdater()
     {
 #if DEBUG
+      return;
 #endif
       if (!ApplicationManager.IsDebugging)
       {


Add TerminationCounter to Driver and output counter results at the end execution.

--- src/Symbooglix/driver.cs
+++ src/Symbooglix/driver.cs
@@ -300,6 +300,9 @@
                 PM.AfterPassRun += afterPassHandler;
                 e.PrepareProgram(PM);

+                var terminationCounter = new TerminationCounter();
+                terminationCounter.Connect(e);
+
                 // Write program to file if requested
                 if (options.dumpProgramPath.Length > 0)
                 {
@@ -320,6 +323,7 @@
                 }

                 Console.WriteLine(solver.Statistics.ToString());
+                Console.WriteLine(terminationCounter.ToString());
             }
             return 0;
         }


Improve performance by aggregating multi-sector writes to the underlying stream.  Importantly, means block bitmap is updated just once.

--- src/Vhd/DynamicStream.cs
+++ src/Vhd/DynamicStream.cs
@@ -190,13 +190,16 @@

                 int sectorInBlock = (int)(offsetInBlock / Utilities.SectorSize);
                 int offsetInSector = (int)(offsetInBlock % Utilities.SectorSize);
-                int toWrite = Math.Min(count - numWritten, 512 - offsetInSector); // TODO - write to end of block
-
-                byte sectorMask = (byte)(1 << (7 - (sectorInBlock % 8)));
+                int toWrite = (int)Math.Min(count - numWritten, _dynamicHeader.BlockSize - offsetInBlock);

                 // Need to read - we're not handling a full sector
-                if (toWrite != Utilities.SectorSize)
-                {
+                if (offsetInSector != 0 || toWrite < Utilities.SectorSize)
+                {
+                    // Reduce the write to just the end of the current sector
+                    toWrite = Math.Min(count - numWritten, Utilities.SectorSize - offsetInSector);
+
+                    byte sectorMask = (byte)(1 << (7 - (sectorInBlock % 8)));
+
                     long sectorStart = (_blockAllocationTable[block] + sectorInBlock) * Utilities.SectorSize + _blockBitmaps[block].Length;

                     // Get the existing sector data (if any)
@@ -213,17 +216,31 @@
                     // Overlay as much data as we have for this sector
                     Array.Copy(buffer, offset + numWritten, sectorBuffer, offsetInSector, toWrite);

+                    // Write the sector back
                     _fileStream.Position = sectorStart;
                     _fileStream.Write(sectorBuffer, 0, Utilities.SectorSize);
+
+                    // Update the in-memory block bitmap
+                    _blockBitmaps[block][sectorInBlock / 8] |= sectorMask;
                 }
                 else
                 {
-                    // Whole sector, just write...
+                    // Processing at least one whole sector, just write (after making sure to trim any partial sectors from the end)...
+                    toWrite = (toWrite / Utilities.SectorSize) * Utilities.SectorSize;
+
                     _fileStream.Position = (_blockAllocationTable[block] + sectorInBlock) * Utilities.SectorSize + _blockBitmaps[block].Length;
                     _fileStream.Write(buffer, offset + numWritten, toWrite);
-                }
-
-                _blockBitmaps[block][sectorInBlock / 8] |= sectorMask;
+
+                    // Update all of the bits in the block bitmap
+                    for (int i = offset; i < offset + toWrite; i += Utilities.SectorSize)
+                    {
+                        byte sectorMask = (byte)(1 << (7 - (sectorInBlock % 8)));
+                        _blockBitmaps[block][sectorInBlock / 8] |= sectorMask;
+                        sectorInBlock++;
+                    }
+
+                }
+
                 WriteBlockBitmap(block);

                 numWritten += toWrite;


RTL - More cleanup

RTL - More cleanup

--- source/Cosmos/Cosmos.Hardware/Network/Devices/RTL8139/RTL8139.cs
+++ source/Cosmos/Cosmos.Hardware/Network/Devices/RTL8139/RTL8139.cs
@@ -58,54 +58,6 @@
             }

             return found;
-        }
-
-        #endregion
-
-        #region NetworkDevice members
-
-        public override string Name
-        {
-            get { return "Generic RTL8139 Network device"; }
-        }
-
-        public override MACAddress MACAddress
-        {
-            get
-            {
-                return valueReg.Mac;
-            }
-        }
-
-        /// <summary>
-        /// Returns a text with the hardware revision model. F.instance RTL8139C+ or RTL8139.
-        /// </summary>
-        public string HardwareRevision
-        {
-            get {
-                var tcr = Register.TransmitConfigurationRegister.Load(mem);
-                return Register.TransmitConfigurationRegister.GetHardwareRevision(tcr.GetHWVERID());
-            }
-            private set { ;}
-        }
-
-        public PCIDevice PCICard { get { return pciCard; } private set { ;} }
-
-
-        /// <summary>
-        /// A general purpose timer. Writing to this will reset timer. NB: Timer does not work in Qemu.
-        /// </summary>
-        public UInt32 TimerCount
-        {
-            get
-            {
-                return IOSpace.Read32(pciCard.BaseAddress1 + (byte)Register.MainRegister.Bit.Timer);
-            }
-            set
-            {
-                UInt32 address = pciCard.BaseAddress1 + (byte)Register.MainRegister.Bit.Timer;
-                IOSpace.Write32(address, 0x00); //Resets timer
-            }
         }

         #endregion
@@ -244,6 +196,52 @@

         }

+        public override string Name
+        {
+            get { return "Generic RTL8139 Network device"; }
+        }
+
+        public override MACAddress MACAddress
+        {
+            get
+            {
+                return valueReg.Mac;
+            }
+        }
+
+        /// <summary>
+        /// Returns a text with the hardware revision model. F.instance RTL8139C+ or RTL8139.
+        /// </summary>
+        public string HardwareRevision
+        {
+            get
+            {
+                var tcr = Register.TransmitConfigurationRegister.Load(mem);
+                return Register.TransmitConfigurationRegister.GetHardwareRevision(tcr.GetHWVERID());
+            }
+            private set { ;}
+        }
+
+        public PCIDevice PCICard { get { return pciCard; } private set { ;} }
+
+
+        /// <summary>
+        /// A general purpose timer. Writing to this will reset timer. NB: Timer does not work in Qemu.
+        /// </summary>
+        public UInt32 TimerCount
+        {
+            get
+            {
+                return IOSpace.Read32(pciCard.BaseAddress1 + (byte)Register.MainRegister.Bit.Timer);
+            }
+            set
+            {
+                UInt32 address = pciCard.BaseAddress1 + (byte)Register.MainRegister.Bit.Timer;
+                IOSpace.Write32(address, 0x00); //Resets timer
+            }
+        }
+
+
         #endregion

         #region Receive data
@@ -351,7 +349,7 @@

         #endregion

-        #region Receive and Interrupt
+        #region Interrupt (IRQ)

         /// <summary>
         /// (Should be) Called when the PCI network card raises an Interrupt.


* Fixed #109

 * Fixed #109

git-svn-id: e2945e6dc2723cb01f425b5a7c3c201ce5019a89@458 080cfd25-d5d9-4c59-82ea-70d02a200d8b

--- Gablarski/Client/ClientUserManager.cs
+++ Gablarski/Client/ClientUserManager.cs
@@ -263,8 +263,10 @@
 				if (!this.users.TryGetValue (msg.ChangeInfo.TargetUserId, out old))
 					return;

-				this.users[msg.ChangeInfo.TargetUserId] = new ClientUser (old.Nickname, old.UserId, msg.ChangeInfo.TargetChannelId, this.context.Connection, old.IsMuted);
-				user = this.users[msg.ChangeInfo.TargetUserId];
+				user = this.users[msg.ChangeInfo.TargetUserId] = new ClientUser (old.Nickname, old.UserId, msg.ChangeInfo.TargetChannelId, this.context.Connection, old.IsMuted);
+
+				if (user.Equals (context.CurrentUser))
+					context.CurrentUser.CurrentChannelId = msg.ChangeInfo.TargetChannelId;

 				if (msg.ChangeInfo.RequestingUserId != 0)
 					this.users.TryGetValue (msg.ChangeInfo.RequestingUserId, out movedBy);


Add Calc Sea Area

Add Calc Sea Area


RUNNING_PIDがロックのため読み込めず開始エラーとなる場合に対応


Small update

Small update

--- src/Catel.Extensions.Prism/Catel.Extensions.Prism.NET40/Modules/NuGetBasedModuleCatalog.cs
+++ src/Catel.Extensions.Prism/Catel.Extensions.Prism.NET40/Modules/NuGetBasedModuleCatalog.cs
@@ -280,7 +280,7 @@
                     yield return moduleInfo;
                 }

-                if (!string.IsNullOrEmpty(PackagedModuleIdPattern))
+                if (!string.IsNullOrEmpty(PackagedModuleIdFilterExpression))
                 {
                     var moduleInfos = new Dictionary<string, ModuleInfo>();
                     foreach (ModuleInfo moduleInfo in PackagedModules())
@@ -318,7 +318,8 @@
         private IEnumerable<ModuleInfo> PackagedModules()
         {
             var packageRepository = GetPackageRepository();
-            var packages = packageRepository.GetPackages().Where(package => Regex.IsMatch(package.Id, PackagedModuleIdPattern));
+            var packages = packageRepository.GetPackages().Where(package => package.Id.Contains(PackagedModuleIdFilterExpression));
+
             foreach (var package in packages)
             {
                 var moduleInfoFile = package.GetFiles().FirstOrDefault(file => file.Path.EndsWith("ModuleInfo.xml"));
@@ -362,7 +363,7 @@
         /// <summary>
         /// The package id pattern
         /// </summary>
-        public string PackagedModuleIdPattern { get; set; }
+        public string PackagedModuleIdFilterExpression { get; set; }
         #endregion
     }
 }


updated field reference tests.

updated field reference tests.

--- src/Compilers/CSharp/Test/Semantic/IOperation/IOperationTests_IFieldReferenceExpression.cs
+++ src/Compilers/CSharp/Test/Semantic/IOperation/IOperationTests_IFieldReferenceExpression.cs
@@ -52,7 +52,7 @@
 ";
             string expectedOperationTree = @"
 IFieldReferenceExpression: System.Int32 Script.i (IsDeclaration: True) (OperationKind.FieldReferenceExpression, Type: System.Int32) (Syntax: 'int i')
-  Instance Receiver: IInstanceReferenceExpression (InstanceReferenceKind.Implicit) (OperationKind.InstanceReferenceExpression, Type: Script) (Syntax: 'i')
+  Instance Receiver: IInstanceReferenceExpression (OperationKind.InstanceReferenceExpression, Type: Script) (Syntax: 'i')
 ";
             var expectedDiagnostics = DiagnosticDescription.None;

@@ -71,9 +71,9 @@
 ITupleExpression (OperationKind.TupleExpression, Type: (System.Int32 i1, System.Int32 i2)) (Syntax: '(int i1, int i2)')
   Elements(2):
       IFieldReferenceExpression: System.Int32 Script.i1 (IsDeclaration: True) (OperationKind.FieldReferenceExpression, Type: System.Int32) (Syntax: 'int i1')
-        Instance Receiver: IInstanceReferenceExpression (InstanceReferenceKind.Implicit) (OperationKind.InstanceReferenceExpression, Type: Script) (Syntax: 'i1')
+        Instance Receiver: IInstanceReferenceExpression (OperationKind.InstanceReferenceExpression, Type: Script) (Syntax: 'i1')
       IFieldReferenceExpression: System.Int32 Script.i2 (IsDeclaration: True) (OperationKind.FieldReferenceExpression, Type: System.Int32) (Syntax: 'int i2')
-        Instance Receiver: IInstanceReferenceExpression (InstanceReferenceKind.Implicit) (OperationKind.InstanceReferenceExpression, Type: Script) (Syntax: 'i2')
+        Instance Receiver: IInstanceReferenceExpression (OperationKind.InstanceReferenceExpression, Type: Script) (Syntax: 'i2')
 ";
             var expectedDiagnostics = DiagnosticDescription.None;

@@ -95,7 +95,7 @@
 ";
             string expectedOperationTree = @"
 IFieldReferenceExpression: System.Int32 Script.i (IsDeclaration: True) (OperationKind.FieldReferenceExpression, Type: System.Int32) (Syntax: 'var i')
-  Instance Receiver: IInstanceReferenceExpression (InstanceReferenceKind.Implicit) (OperationKind.InstanceReferenceExpression, Type: Script) (Syntax: 'i')
+  Instance Receiver: IInstanceReferenceExpression (OperationKind.InstanceReferenceExpression, Type: Script) (Syntax: 'i')
 ";
             var expectedDiagnostics = DiagnosticDescription.None;

@@ -114,9 +114,9 @@
 ITupleExpression (OperationKind.TupleExpression, Type: (System.Int32 i1, System.Int32 i2)) (Syntax: '(var i1, var i2)')
   Elements(2):
       IFieldReferenceExpression: System.Int32 Script.i1 (IsDeclaration: True) (OperationKind.FieldReferenceExpression, Type: System.Int32) (Syntax: 'var i1')
-        Instance Receiver: IInstanceReferenceExpression (InstanceReferenceKind.Implicit) (OperationKind.InstanceReferenceExpression, Type: Script) (Syntax: 'i1')
+        Instance Receiver: IInstanceReferenceExpression (OperationKind.InstanceReferenceExpression, Type: Script) (Syntax: 'i1')
       IFieldReferenceExpression: System.Int32 Script.i2 (IsDeclaration: True) (OperationKind.FieldReferenceExpression, Type: System.Int32) (Syntax: 'var i2')
-        Instance Receiver: IInstanceReferenceExpression (InstanceReferenceKind.Implicit) (OperationKind.InstanceReferenceExpression, Type: Script) (Syntax: 'i2')
+        Instance Receiver: IInstanceReferenceExpression (OperationKind.InstanceReferenceExpression, Type: Script) (Syntax: 'i2')
 ";
             var expectedDiagnostics = DiagnosticDescription.None;

@@ -135,9 +135,9 @@
 ITupleExpression (OperationKind.TupleExpression, Type: (System.Int32 i1, System.Int32 i2)) (Syntax: 'var (i1, i2)')
   Elements(2):
       IFieldReferenceExpression: System.Int32 Script.i1 (IsDeclaration: True) (OperationKind.FieldReferenceExpression, Type: System.Int32) (Syntax: 'i1')
-        Instance Receiver: IInstanceReferenceExpression (InstanceReferenceKind.Implicit) (OperationKind.InstanceReferenceExpression, Type: Script) (Syntax: 'i1')
+        Instance Receiver: IInstanceReferenceExpression (OperationKind.InstanceReferenceExpression, Type: Script) (Syntax: 'i1')
       IFieldReferenceExpression: System.Int32 Script.i2 (IsDeclaration: True) (OperationKind.FieldReferenceExpression, Type: System.Int32) (Syntax: 'i2')
-        Instance Receiver: IInstanceReferenceExpression (InstanceReferenceKind.Implicit) (OperationKind.InstanceReferenceExpression, Type: Script) (Syntax: 'i2')
+        Instance Receiver: IInstanceReferenceExpression (OperationKind.InstanceReferenceExpression, Type: Script) (Syntax: 'i2')
 ";
             var expectedDiagnostics = DiagnosticDescription.None;


successful test in Revit 2018

successful test in Revit 2018

--- AdnRme/CmdInspectElectricallForm2.cs
+++ AdnRme/CmdInspectElectricallForm2.cs
@@ -120,7 +120,7 @@
       tv.BeginUpdate();
       PopulateFromMapParentToChildren( tv.Nodes, ElementId.InvalidElementId, map );
       tv.EndUpdate();
-      listBox1.SelectedIndex = 0;
+      //listBox1.SelectedIndex = 0;
     }
     #endregion // Constructor


Fixes for getting requested part names

Fixes for getting requested part names

--- Source/parameterContainer.cs
+++ Source/parameterContainer.cs
@@ -129,7 +129,7 @@

 						s += "The following parts are acceptable:";

-						for (int i = 0; i < titles.Count; i++)
+						for (int i = titles.Count - 1; i >= 0; i--)
 						{
 							string t = titles[i];

@@ -138,14 +138,9 @@
 					}
 				}

-				var modFields = pType.GetFields(BindingFlags.NonPublic | BindingFlags.Instance);
-
-				if (modFields == null)
-					return "";
-
 				try
 				{
-					l = (List<string>)modFields[5].GetValue((PartRequestParameter)cParam);
+					l = (List<string>)partFields[5].GetValue((PartRequestParameter)cParam);
 				}
 				catch (Exception e)
 				{
@@ -167,7 +162,7 @@
 							s = "The following parts are acceptable:";
 						}

-						for (int i = 0; i < titles.Count; i++)
+						for (int i = titles.Count - 1; i >= 0; i--)
 						{
 							string t = titles[i];

@@ -200,12 +195,11 @@

 				if (l.Count > 0)
 				{
-
-					for (int j = 0; j < l.Count; j++)
+					for (int j = l.Count - 1; j >= 0; j--)
 					{
-						List<string> modNames = FinePrint.ContractDefs.GetModules(l[j]);
-
-						List<string> titles = getPartTitlesFromModules(modNames);
+						string m = l[j];
+
+						List<string> titles = getPartTitlesFromModuleType(m);

 						if (titles.Count > 0)
 						{
@@ -229,6 +223,31 @@
 		{
 			List<string> l = new List<string>();

+			for (int i = names.Count - 1; i >= 0; i--)
+			{
+				string s = names[i];
+
+				if (string.IsNullOrEmpty(s))
+					continue;
+
+				AvailablePart p = PartLoader.getPartInfoByName(s.Replace('_', '.'));
+
+				if (p == null)
+					continue;
+
+				if (!ResearchAndDevelopment.PartModelPurchased(p))
+					continue;
+
+				l.Add(p.title);
+			}
+
+			return l;
+		}
+
+		private List<string> getPartTitlesFromModules(List<string> names)
+		{
+			List<string> l = new List<string>();
+
 			for (int i = 0; i < names.Count; i++)
 			{
 				string s = names[i];
@@ -236,32 +255,7 @@
 				if (string.IsNullOrEmpty(s))
 					continue;

-				AvailablePart p = PartLoader.getPartInfoByName(s.Replace('_', '.'));
-
-				if (p == null)
-					continue;
-
-				if (!ResearchAndDevelopment.PartModelPurchased(p))
-					continue;
-
-				l.Add(p.title);
-			}
-
-			return l;
-		}
-
-		private List<string> getPartTitlesFromModules(List<string> names)
-		{
-			List<string> l = new List<string>();
-
-			for (int i = 0; i < names.Count; i++)
-			{
-				string s = names[i];
-
-				if (string.IsNullOrEmpty(s))
-					continue;
-
-				for (int j = 0; j < PartLoader.LoadedPartsList.Count; j++)
+				for (int j = PartLoader.LoadedPartsList.Count - 1; j >= 0; j--)
 				{
 					AvailablePart p = PartLoader.LoadedPartsList[j];

@@ -279,6 +273,32 @@

 					l.Add(p.title);
 				}
+			}
+
+			return l;
+		}
+
+		private List<string> getPartTitlesFromModuleType(string type)
+		{
+			List<string> l = new List<string>();
+
+			for (int i = PartLoader.LoadedPartsList.Count - 1; i >= 0; i--)
+			{
+				AvailablePart p = PartLoader.LoadedPartsList[i];
+
+				if (p == null)
+					continue;
+
+				if (p.partPrefab == null)
+					continue;
+
+				if (!p.partPrefab.HasValidContractObjective(type))
+					continue;
+
+				if (!ResearchAndDevelopment.PartModelPurchased(p))
+					continue;
+
+				l.Add(p.title);
 			}

 			return l;


Return types of functions in algorithm.cs correcteted

--- src/Wrapper/Algorithm.cs
+++ src/Wrapper/Algorithm.cs
@@ -112,75 +112,117 @@
         }

         [MethodImpl(MethodImplOptions.AggressiveInlining)]
-        public static Complex SumAll(Array arr)
+        public static Complex SumAll(Array arr) => SumAll<Complex>(arr);
+
+        [MethodImpl(MethodImplOptions.AggressiveInlining)]
+        public static returnType SumAll<returnType>(Array arr)
         {
             double r, i;
             Internal.VERIFY(AFAlgorithm.af_sum_all(out r, out i, arr._ptr));
-            return new Complex(r, i);
-        }
-
-        [MethodImpl(MethodImplOptions.AggressiveInlining)]
-        public static Complex SumAll(Array arr, double nanval)
+            if (typeof(returnType) == typeof(Complex))
+                return (returnType)Convert.ChangeType(new Complex(r, i), typeof(returnType));
+            else
+                return (returnType)Convert.ChangeType(r, typeof(returnType));
+        }
+
+        [MethodImpl(MethodImplOptions.AggressiveInlining)]
+        public static Complex SumAll(Array arr, double nanval) => SumAll<Complex>(arr, nanval);
+
+        [MethodImpl(MethodImplOptions.AggressiveInlining)]
+        public static returnType SumAll<returnType>(Array arr, double nanval)
         {
             double r, i;
             Internal.VERIFY(AFAlgorithm.af_sum_nan_all(out r, out i, arr._ptr, nanval));
-            return new Complex(r, i);
-        }
-
-        [MethodImpl(MethodImplOptions.AggressiveInlining)]
-        public static Complex ProductAll(Array arr)
+            if (typeof(returnType) == typeof(Complex))
+                return (returnType)Convert.ChangeType(new Complex(r, i), typeof(returnType));
+            else
+                return (returnType)Convert.ChangeType(r, typeof(returnType));
+        }
+
+        [MethodImpl(MethodImplOptions.AggressiveInlining)]
+        public static Complex ProductAll(Array arr) => ProductAll<Complex>(arr);
+
+        [MethodImpl(MethodImplOptions.AggressiveInlining)]
+        public static returnType ProductAll<returnType>(Array arr)
         {
             double r, i;
             Internal.VERIFY(AFAlgorithm.af_product_all(out r, out i, arr._ptr));
-            return new Complex(r, i);
-        }
-
-        [MethodImpl(MethodImplOptions.AggressiveInlining)]
-        public static Complex ProductAll(Array arr, double nanval)
+            if (typeof(returnType) == typeof(Complex))
+                return (returnType)Convert.ChangeType(new Complex(r, i), typeof(returnType));
+            else
+                return (returnType)Convert.ChangeType(r, typeof(returnType));
+        }
+
+        [MethodImpl(MethodImplOptions.AggressiveInlining)]
+        public static Complex ProductAll(Array arr, double nanval) => ProductAll<Complex>(arr, nanval);
+
+        [MethodImpl(MethodImplOptions.AggressiveInlining)]
+        public static returnType ProductAll<returnType>(Array arr, double nanval)
         {
             double r, i;
             Internal.VERIFY(AFAlgorithm.af_product_nan_all(out r, out i, arr._ptr, nanval));
-            return new Complex(r, i);
-        }
-
-        [MethodImpl(MethodImplOptions.AggressiveInlining)]
-        public static Complex MinAll(Array arr)
+            if (typeof(returnType) == typeof(Complex))
+                return (returnType)Convert.ChangeType(new Complex(r, i), typeof(returnType));
+            else
+                return (returnType)Convert.ChangeType(r, typeof(returnType));
+        }
+
+        [MethodImpl(MethodImplOptions.AggressiveInlining)]
+        public static Complex MinAll(Array arr) => MinAll<Complex>(arr);
+
+        [MethodImpl(MethodImplOptions.AggressiveInlining)]
+        public static returnType MinAll<returnType>(Array arr)
         {
             double r, i;
             Internal.VERIFY(AFAlgorithm.af_min_all(out r, out i, arr._ptr));
-            return new Complex(r, i);
-        }
-
-        [MethodImpl(MethodImplOptions.AggressiveInlining)]
-        public static Complex MaxAll(Array arr)
+            if (typeof(returnType) == typeof(Complex))
+                return (returnType)Convert.ChangeType(new Complex(r, i), typeof(returnType));
+            else
+                return (returnType)Convert.ChangeType(r, typeof(returnType));
+        }
+
+        [MethodImpl(MethodImplOptions.AggressiveInlining)]
+        public static Complex MaxAll(Array arr) => MaxAll<Complex>(arr);
+
+        [MethodImpl(MethodImplOptions.AggressiveInlining)]
+        public static returnType MaxAll<returnType>(Array arr)
         {
             double r, i;
             Internal.VERIFY(AFAlgorithm.af_max_all(out r, out i, arr._ptr));
-            return new Complex(r, i);
-        }
-
-        [MethodImpl(MethodImplOptions.AggressiveInlining)]
-        public static Complex AllTrueAll(Array arr)
+            if (typeof(returnType) == typeof(Complex))
+                return (returnType)Convert.ChangeType(new Complex(r, i), typeof(returnType));
+            else
+                return (returnType)Convert.ChangeType(r, typeof(returnType));
+        }
+
+        [MethodImpl(MethodImplOptions.AggressiveInlining)]
+        public static bool AllTrueAll(Array arr)
         {
             double r, i;
             Internal.VERIFY(AFAlgorithm.af_all_true_all(out r, out i, arr._ptr));
-            return new Complex(r, i);
-        }
-
-        [MethodImpl(MethodImplOptions.AggressiveInlining)]
-        public static Complex AnyTrueAll(Array arr)
+            if (r == 0)
+                return false;
+            else
+                return true;
+        }
+
+        [MethodImpl(MethodImplOptions.AggressiveInlining)]
+        public static bool AnyTrueAll(Array arr)
         {
             double r, i;
             Internal.VERIFY(AFAlgorithm.af_any_true_all(out r, out i, arr._ptr));
-            return new Complex(r, i);
-        }
-
-        [MethodImpl(MethodImplOptions.AggressiveInlining)]
-        public static Complex CountAll(Array arr)
+            if (r == 0)
+                return false;
+            else
+                return true;
+        }
+
+        [MethodImpl(MethodImplOptions.AggressiveInlining)]
+        public static long CountAll(Array arr)
         {
             double r, i;
             Internal.VERIFY(AFAlgorithm.af_count_all(out r, out i, arr._ptr));
-            return new Complex(r, i);
+            return (long)r;
         }

         [MethodImpl(MethodImplOptions.AggressiveInlining)]
@@ -204,19 +246,31 @@
         }

         [MethodImpl(MethodImplOptions.AggressiveInlining)]
-        public static Complex MinAll(Array arr, out uint idx)
-        {
-            double r, i;
-            Internal.VERIFY(AFAlgorithm.af_imin_all(out r, out i, out idx ,arr._ptr));
-            return new Complex(r, i);
-        }
-
-        [MethodImpl(MethodImplOptions.AggressiveInlining)]
-        public static Complex MaxAll(Array arr, out uint idx)
+        public static Complex MinAll(Array arr, out uint idx) => MinAll<Complex>(arr, out idx);
+
+        [MethodImpl(MethodImplOptions.AggressiveInlining)]
+        public static returnType MinAll<returnType>(Array arr, out uint idx)
+        {
+            double r, i;
+            Internal.VERIFY(AFAlgorithm.af_imin_all(out r, out i, out idx, arr._ptr));
+            if (typeof(returnType) == typeof(Complex))
+                return (returnType)Convert.ChangeType(new Complex(r, i), typeof(returnType));
+            else
+                return (returnType)Convert.ChangeType(r, typeof(returnType));
+        }
+
+        [MethodImpl(MethodImplOptions.AggressiveInlining)]
+        public static Complex MaxAll(Array arr, out uint idx) => MaxAll<Complex>(arr, out idx);
+
+        [MethodImpl(MethodImplOptions.AggressiveInlining)]
+        public static returnType MaxAll<returnType>(Array arr, out uint idx)
         {
             double r, i;
             Internal.VERIFY(AFAlgorithm.af_imax_all(out r, out i, out idx, arr._ptr));
-            return new Complex(r, i);
+            if (typeof(returnType) == typeof(Complex))
+                return (returnType)Convert.ChangeType(new Complex(r, i), typeof(returnType));
+            else
+                return (returnType)Convert.ChangeType(r, typeof(returnType));
         }

         [MethodImpl(MethodImplOptions.AggressiveInlining)]


Delete XmlSerializer.cs

Delete XmlSerializer.cs


Closure capturing over a collection

Closure capturing over a collection

Former-commit-id: 1e29fb1cb0e6d2fd340b2b169ac707591b4cb971

--- MeTLMeeting/SandRibbon/Components/CollapsedCanvasStack.xaml.cs
+++ MeTLMeeting/SandRibbon/Components/CollapsedCanvasStack.xaml.cs
@@ -317,7 +317,8 @@
             Globals.CanvasClipboardFocusChanged += CanvasClipboardFocusChanged;

             //For development
-            //UndoHistory.ShowVisualiser(Window.GetWindow(this));
+            if (_target == "presentationSpace" && me != Globals.PROJECTOR)
+                UndoHistory.ShowVisualiser(Window.GetWindow(this));
         }

         void Work_IsKeyboardFocusWithinChanged(object sender, DependencyPropertyChangedEventArgs e)
@@ -922,31 +923,31 @@
             var images = ImageSelectionMovedOrResized(filterOnlyMine(selectedElements), startingSelectedImages);
             var text = TextMovedOrResized(filterOnlyMine(selectedElements), _boxesAtTheStart);

+            var thisXTrans = moveMetrics.Delta.X;
+            var thisYTrans = moveMetrics.Delta.Y;
+            var thisXScale = moveMetrics.Scale.X;
+            var thisYScale = moveMetrics.Scale.Y;
+
+            var thisOriginalBoundsX = moveMetrics.OriginalContentBounds.Left;
+            var thisOriginalBoundsY = moveMetrics.OriginalContentBounds.Top;
+
+            var selectedStrokeIds = Work.GetSelectedStrokes().Select(stroke => stroke.tag().id);
+            var selectedImagesIds = Work.GetSelectedImages().ToList().Select(image => image.tag().id);
+            var selectedTextBoxes = Work.GetSelectedTextBoxes().ToList().Select(textBox => textBox.tag().id);
+            var mdb = ContentBuffer.getLogicalBoundsOfContent(selectedElements.OfType<MeTLImage>().ToList(),selectedElements.OfType<MeTLTextBox>().ToList(),selectedStrokes);
+
             Action undo = () =>
                 {
-/*
-                    if (contentBuffer.logicalX > originalBounds.X || contentBuffer.logicalY > originalBounds.Y)
-                    {
-                        contentBuffer.logicalX = originalBounds.X;
-                        contentBuffer.logicalY = originalBounds.Y;
-                    }
- */
-                    var selectedStrokeIds = Work.GetSelectedStrokes().Select(stroke => stroke.tag().id);
-                    var selectedImagesIds = Work.GetSelectedImages().ToList().Select(image => image.tag().id);
-                    var selectedTextBoxes = Work.GetSelectedTextBoxes().ToList().Select(textBox => textBox.tag().id);
-
                     ClearAdorners();

                     var identity = Globals.generateId(Guid.NewGuid().ToString());
                     var moveDelta = TargettedMoveDelta.Create(Globals.slide, Globals.me, _target, Privacy.NotSet, identity, -1L, new StrokeCollection(selectedStrokes.Select(s => s as Stroke)), selectedElements.OfType<MeTLTextBox>().Select(s => s as TextBox), selectedElements.OfType<MeTLImage>().Select(s => s as Image));
-                    //moveDelta.newPrivacy = Privacy.NotSet;
-
-                    moveDelta.xTranslate = -moveMetrics.Delta.X;
-                    moveDelta.yTranslate = -moveMetrics.Delta.Y;
-                    moveDelta.xScale = 1 / moveMetrics.Scale.X;
-                    moveDelta.yScale = 1 / moveMetrics.Scale.Y;
-
-                    var mdb = ContentBuffer.getLogicalBoundsOfContent(selectedElements.OfType<MeTLImage>().ToList(),selectedElements.OfType<MeTLTextBox>().ToList(),selectedStrokes);
+
+                    moveDelta.xTranslate = -thisXTrans;
+                    moveDelta.yTranslate = -thisYTrans;
+                    moveDelta.xScale = 1 / thisXScale;
+                    moveDelta.yScale = 1 / thisYScale;
+
                     moveDelta.xOrigin = mdb.Left;
                     moveDelta.yOrigin = mdb.Top;

@@ -964,29 +965,19 @@
                 };
             Action redo = () =>
                 {
-
-                    var selectedStrokeIds = Work.GetSelectedStrokes().Select(stroke => stroke.tag().id);
-                    var selectedImagesIds = Work.GetSelectedImages().ToList().Select(image => image.tag().id);
-                    var selectedTextBoxes = Work.GetSelectedTextBoxes().ToList().Select(textBox => textBox.tag().id);
-
                     ClearAdorners();

                     var identity = Globals.generateId(Guid.NewGuid().ToString());
                     var moveDelta = TargettedMoveDelta.Create(Globals.slide, Globals.me, _target, Privacy.NotSet, identity, -1L, new StrokeCollection(selectedStrokes.Select(s => s as Stroke)), selectedElements.OfType<MeTLTextBox>().Select(s => s as TextBox), selectedElements.OfType<MeTLImage>().Select(s => s as Image));
-                    //moveDelta.newPrivacy = Privacy.NotSet;
-
-                    moveDelta.xTranslate = moveMetrics.Delta.X;
-                    moveDelta.yTranslate = moveMetrics.Delta.Y;
-                    moveDelta.xScale = moveMetrics.Scale.X;
-                    moveDelta.yScale = moveMetrics.Scale.Y;
-
-                    moveDelta.xOrigin = moveMetrics.OriginalContentBounds.Left;
-                    moveDelta.yOrigin = moveMetrics.OriginalContentBounds.Top;
-/*
-                    var mdb = ContentBuffer.getBoundsOfMoveDelta(moveDelta,selectedElements.OfType<MeTLImage>().ToList(),selectedElements.OfType<MeTLTextBox>().ToList(),selectedStrokes);
-                    moveDelta.xOrigin = mdb.Left;
-                    moveDelta.yOrigin = mdb.Top;
-                    */
+
+                    moveDelta.xTranslate = thisXTrans;
+                    moveDelta.yTranslate = thisYTrans;
+                    moveDelta.xScale = thisXScale;
+                    moveDelta.yScale = thisYScale;
+
+                    moveDelta.xOrigin = thisOriginalBoundsX;
+                    moveDelta.yOrigin = thisOriginalBoundsY;
+
                     moveDeltaProcessor.rememberSentMoveDelta(moveDelta);
                     Commands.SendMoveDelta.ExecuteAsync(moveDelta);


removed typo

removed typo

Former-commit-id: be9dbba4d13304f1cad503c483deade720588251

--- MeTLMeeting/SandRibbon/Components/CollapsedCanvasStack.xaml.cs
+++ MeTLMeeting/SandRibbon/Components/CollapsedCanvasStack.xaml.cs
@@ -2440,7 +2440,7 @@
             var listToCut = selectedStrokes.Select(stroke => new TargettedDirtyElement(Globals.slide, stroke.tag().author, _target, stroke.tag().privacy, stroke.sum().checksum.ToString())).ToList();
             foreach (var element in listToCut)
                 Commands.SendDirtyStroke.Execute(element);
-            return selectedStrokes.ToList().ToList().ToList().ToList().ToList().ToList().ToList().ToList().ToList();
+            return selectedStrokes.ToList();
         }
         protected void HandleCut(object _args)
         {


freeforall signup bool

freeforall signup bool

--- StableAPIHandler/Function.cs
+++ StableAPIHandler/Function.cs
@@ -38,6 +38,13 @@
 									StatusCode = 418
 								};
 			bool enabled = bool.Parse(Environment.GetEnvironmentVariable("enabled"));
+
+			bool freeforall = false;
+			try {
+				freeforall = bool.Parse(Environment.GetEnvironmentVariable("freeforall"));
+			} catch(Exception e) {
+				Logger.LogLine("Warning! " + e.Message);
+			}


Fixed casing error in playerGameType property of Player class

--- SubstrateCS/Source/Player.cs
+++ SubstrateCS/Source/Player.cs
@@ -141,7 +141,7 @@
             new SchemaNodeScaler("XpLevel", TagType.TAG_INT, SchemaOptions.OPTIONAL),
             new SchemaNodeScaler("XpTotal", TagType.TAG_INT, SchemaOptions.OPTIONAL),
             new SchemaNodeScaler("Score", TagType.TAG_INT, SchemaOptions.OPTIONAL),
-            new SchemaNodeScaler("PlayerGameType", TagType.TAG_INT, SchemaOptions.OPTIONAL),
+            new SchemaNodeScaler("playerGameType", TagType.TAG_INT, SchemaOptions.OPTIONAL),
             new SchemaNodeCompound("abilities", new SchemaNodeCompound("") {
                 new SchemaNodeScaler("flying", TagType.TAG_BYTE),
                 new SchemaNodeScaler("instabuild", TagType.TAG_BYTE),
@@ -603,7 +603,7 @@
                 tree["Score"] = new TagNodeInt(_score ?? 0);

             if (_gameType != null)
-                tree["PlayerGameType"] = new TagNodeInt((int)(_gameType ?? PlayerGameType.Survival));
+                tree["playerGameType"] = new TagNodeInt((int)(_gameType ?? PlayerGameType.Survival));

             if (AbilitiesSet()) {
                 TagNodeCompound pb = new TagNodeCompound();


append

append

--- Nodes/VVVV.DX11.Nodes/Nodes/Textures/2D/WriterTexture2dNode.cs
+++ Nodes/VVVV.DX11.Nodes/Nodes/Textures/2D/WriterTexture2dNode.cs
@@ -1,95 +1,95 @@
-using System;
-using System.Collections.Generic;
-using System.Linq;
-using System.Text;
-using System.ComponentModel.Composition;
-
-using VVVV.PluginInterfaces.V1;
-using VVVV.PluginInterfaces.V2;
-
-using SlimDX.Direct3D11;
-
-using VVVV.Core.Logging;
-
-using FeralTic.DX11;
-using FeralTic.DX11.Resources;
-
-namespace VVVV.DX11.Nodes
-{
-    [PluginInfo(Name = "Writer", Category = "DX11.Texture", Version = "2d", Author = "vux", AutoEvaluate = true)]
-    public class WriterTextureNode : IPluginEvaluate, IDX11ResourceDataRetriever
-    {
-        [Input("Texture In")]
-        protected Pin<DX11Resource<DX11Texture2D>> FTextureIn;
-
-        [Input("Filename",StringType=StringType.Filename,DefaultString="render")]
-        protected ISpread<string> FInPath;
-
-        [Input("Format")]
-        protected ISpread<ImageFileFormat> FInFormat;
-
-        [Input("Write", IsBang = true)]
-        protected ISpread<bool> FInSave;
-
-        [Output("Valid")]
-        protected ISpread<bool> FOutValid;
-
-        [Import()]
-        protected IPluginHost FHost;
-
-        [Import()]
-        protected ILogger FLogger;
-
-        public DX11RenderContext AssignedContext
-        {
-            get;
-            set;
-        }
-
-        public event DX11RenderRequestDelegate RenderRequest;
-
-
-        #region IPluginEvaluate Members
-
-        public void Evaluate(int SpreadMax)
-        {
-            this.FOutValid.SliceCount = 1;
-
-            if (this.FTextureIn.PluginIO.IsConnected)
-            {
-                if (this.RenderRequest != null) { this.RenderRequest(this, this.FHost); }
-
-                if (this.AssignedContext == null) { this.FOutValid.SliceCount = 0; return; }
-                //Do NOT cache this, assignment done by the host
-
-                for (int i = 0; i < SpreadMax; i++)
-                {
-                    if (this.FTextureIn[i].Contains(this.AssignedContext) && this.FInSave[i])
-                    {
-                        try
-                        {
-                            Texture2D.SaveTextureToFile(this.AssignedContext.CurrentDeviceContext, this.FTextureIn[i][this.AssignedContext].Resource, this.FInFormat[i], this.FInPath[i]);
-                            this.FOutValid[0] = true;
-                        }
-                        catch (Exception ex)
-                        {
-                            FLogger.Log(ex);
-                            this.FOutValid[0] = false;
-                        }
-                    }
-                    else
-                    {
-                        this.FOutValid[0] = false;
-                    }
-                }
-            }
-            else
-            {
-                this.FOutValid.SliceCount = 0;
-
-            }
-        }
-
-        #endregion
-    }
-}
+using System;
+using System.Collections.Generic;
+using System.Linq;
+using System.Text;
+using System.ComponentModel.Composition;
+
+using VVVV.PluginInterfaces.V1;
+using VVVV.PluginInterfaces.V2;
+
+using SlimDX.Direct3D11;
+
+using VVVV.Core.Logging;
+
+using FeralTic.DX11;
+using FeralTic.DX11.Resources;
+
+namespace VVVV.DX11.Nodes
+{
+    [PluginInfo(Name = "Writer", Category = "DX11.Texture", Version = "2d", Author = "vux", AutoEvaluate = true)]
+    public class WriterTextureNode : IPluginEvaluate, IDX11ResourceDataRetriever
+    {
+        [Input("Texture In")]
+        protected Pin<DX11Resource<DX11Texture2D>> FTextureIn;
+
+        [Input("Filename",StringType=StringType.Filename,DefaultString="render")]
+        protected ISpread<string> FInPath;
+
+        [Input("Format")]
+        protected ISpread<ImageFileFormat> FInFormat;
+
+        [Input("Write", IsBang = true)]
+        protected ISpread<bool> FInSave;
+
+        [Output("Valid")]
+        protected ISpread<bool> FOutValid;
+
+        [Import()]
+        protected IPluginHost FHost;
+
+        [Import()]
+        protected ILogger FLogger;
+
+        public DX11RenderContext AssignedContext
+        {
+            get;
+            set;
+        }
+
+        public event DX11RenderRequestDelegate RenderRequest;
+
+
+        #region IPluginEvaluate Members
+
+        public void Evaluate(int SpreadMax)
+        {
+            this.FOutValid.SliceCount = 1;
+
+            if (this.FTextureIn.PluginIO.IsConnected)
+            {
+                if (this.RenderRequest != null) { this.RenderRequest(this, this.FHost); }
+
+                if (this.AssignedContext == null) { this.FOutValid.SliceCount = 0; return; }
+                //Do NOT cache this, assignment done by the host
+
+                for (int i = 0; i < SpreadMax; i++)
+                {
+                    if (this.FTextureIn[i].Contains(this.AssignedContext) && this.FInSave[i])
+                    {
+                        try
+                        {
+                            Texture2D.SaveTextureToFile(this.AssignedContext.CurrentDeviceContext, this.FTextureIn[i][this.AssignedContext].Resource, this.FInFormat[i], this.FInPath[i]);
+                            this.FOutValid[0] = true;
+                        }
+                        catch (Exception ex)
+                        {
+                            FLogger.Log(ex);
+                            this.FOutValid[0] = false;
+                        }
+                    }
+                    else
+                    {
+                        this.FOutValid[0] = false;
+                    }
+                }
+            }
+            else
+            {
+                this.FOutValid.SliceCount = 0;
+
+            }
+        }
+
+        #endregion
+    }
+}


Better way to reset "Active" event list

Better way to reset "Active" event list

--- Project-Aurora/Project-Aurora/Profiles/LightingStateManager.cs
+++ Project-Aurora/Project-Aurora/Profiles/LightingStateManager.cs
@@ -568,8 +568,10 @@
             foreach (var eventToDeactivate in eventsToDeactivate)
             {
                 eventToDeactivate.OnDeactivate();
-                ActiveEvents.Remove(eventToDeactivate);
-            }
+            }
+
+            ActiveEvents.Clear();
+            ActiveEvents.AddRange(UpdatedEvents);

             return true;
         }


changenfjhgej

changenfjhgej

--- TP3Etu/TP3/FormPrincipale.cs
+++ TP3Etu/TP3/FormPrincipale.cs
@@ -299,6 +299,31 @@
 			toutesImagesVisuelles[ligneCourante + blocActifY[2], colonneCourante + blocActifX[2]].BackgroundImage = bloc;
 			toutesImagesVisuelles[ligneCourante + blocActifY[3], colonneCourante + blocActifX[3]].BackgroundImage = bloc;
 		}
+		void DeplacerBloc(TouchesJoueur deplacement)
+		{
+			if (deplacement == TouchesJoueur.DéplacerDroit)
+			{
+				colonneCourante++;
+			}
+			if (deplacement == TouchesJoueur.DéplacerGauche)
+			{
+				colonneCourante--;
+			}
+			if (deplacement == TouchesJoueur.DéplacerBas)
+			{
+				ligneCourante++;
+			}
+			if (deplacement == TouchesJoueur.RotationAntiHoraire)
+			{
+				RotationBlocs(TouchesJoueur.RotationAntiHoraire);
+			}
+			if (deplacement == TouchesJoueur.RotationHoraire)
+			{
+				RotationBlocs(TouchesJoueur.RotationHoraire);
+			}
+
+
+		}

 		/// <summary>


teste do repositorio de paginacao

teste do repositorio de paginacao

--- src/test/Thunder.Data/Pattern/Repository/UserRepositoryTest.cs
+++ src/test/Thunder.Data/Pattern/Repository/UserRepositoryTest.cs
@@ -187,31 +187,21 @@
                     new User { Name = "Yasmin", Age = 2, Status = new Status { Id = 1 } }
                 });

-            var paging1 = Repository.Page(1, 2);
-            var paging2 = Repository.Page(0, 2, new List<ICriterion> { Restrictions.On<User>(x => x.Name).IsInsensitiveLike("adr", MatchMode.Anywhere) });
-            var paging3 = Repository.Page(0, 2, new List<Expression<Func<User, bool>>> {x => (x.Status == new Status {Id = 1})}, new List<Order>{Order.Asc("Name"), Order.Desc("Age")});
-            var paging4 = Repository.Page(0, 2, Restrictions.On<User>(x => x.Name).IsInsensitiveLike("adr", MatchMode.Anywhere));
-            var paging5 = Repository.Page(0, 2, x => (x.Status == new Status {Id = 1}), Order.Asc("Name"));

-            Assert.AreEqual(2, paging1.PageCount);
-            Assert.AreEqual(2, paging1.PageSize);
-            Assert.AreEqual(3, paging1.Records);
-
-            Assert.AreEqual(1, paging2.PageCount);
-            Assert.AreEqual(2, paging2.PageSize);
-            Assert.AreEqual(1, paging2.Records);
-
-            Assert.AreEqual(2, paging3.PageCount);
-            Assert.AreEqual(2, paging3.PageSize);
-            Assert.AreEqual(3, paging3.Records);
-
-            Assert.AreEqual(1, paging4.PageCount);
-            Assert.AreEqual(2, paging4.PageSize);
-            Assert.AreEqual(1, paging4.Records);
-
-            Assert.AreEqual(2, paging5.PageCount);
-            Assert.AreEqual(2, paging5.PageSize);
-            Assert.AreEqual(3, paging5.Records);
+            Assert.AreEqual(3, Repository.Page(0, 2).Records);
+            Assert.AreEqual("Yasmin", Repository.Page(0, 2, Order.Desc("Name"))[0].Name);
+            Assert.AreEqual("Yasmin", Repository.Page(0, 2, new List<Order> { Order.Asc("Age"), Order.Asc("Name") })[0].Name);
+            Assert.AreEqual("Adriano", Repository.Page(0, 2, x => x.Age == 30 )[0].Name);
+            Assert.AreEqual("Lucas", Repository.Page(0, 2, x => x.Age < 30, Order.Desc("Age"))[0].Name);
+            Assert.AreEqual("Yasmin", Repository.Page(0, 2, new List<Expression<Func<User, bool>>>{x=> x.Age == 2 && x.Name == "Yasmin"})[0].Name);
+            Assert.AreEqual("Lucas", Repository.Page(0, 2, new List<Expression<Func<User, bool>>> { x => x.Age < 30 }, Order.Asc("Name"))[0].Name);
+            Assert.AreEqual("Yasmin", Repository.Page(0, 2, new List<Expression<Func<User, bool>>> { x => x.Age < 30 }, new List<Order> { Order.Asc("Age") })[0].Name);
+            Assert.AreEqual("Adriano", Repository.Page(0, 2, Restrictions.Eq("Age", 30))[0].Name);
+            Assert.AreEqual("Adriano", Repository.Page(0, 2, Restrictions.Eq("Age", 30), Order.Asc("Name"))[0].Name);
+            Assert.AreEqual("Adriano", Repository.Page(0, 2, Restrictions.Eq("Age", 30), new List<Order> { Order.Asc("Name") })[0].Name);
+            Assert.AreEqual("Adriano", Repository.Page(0, 2, new List<ICriterion> { Restrictions.Eq("Age", 30), Restrictions.Eq("Name", "Adriano") })[0].Name);
+            Assert.AreEqual("Adriano", Repository.Page(0, 2, new List<ICriterion> { Restrictions.Eq("Age", 30), Restrictions.Eq("Name", "Adriano") }, Order.Asc("Name"))[0].Name);
+            Assert.AreEqual("Adriano", Repository.Page(0, 2, new List<ICriterion> { Restrictions.Eq("Age", 30), Restrictions.Eq("Name", "Adriano") }, new List<Order> { Order.Asc("Name") })[0].Name);
         }
     }
 }


Add ResolveByName attribute to TargetControl property

--- src/Avalonia.Xaml.Interactions/Custom/HideOnLostFocusBehavior.cs
+++ src/Avalonia.Xaml.Interactions/Custom/HideOnLostFocusBehavior.cs
@@ -19,6 +19,7 @@
     /// <summary>
     /// Gets or sets the target control. This is a avalonia property.
     /// </summary>
+    [ResolveByName]
     public Control? TargetControl
     {
         get => GetValue(TargetControlProperty);


Fixed 0x67 ActionBar prop name

Fixed 0x67 ActionBar prop name

--- src/Booma.Proxy.Packets.BlockServer/Models/LobbyCharacterData.cs
+++ src/Booma.Proxy.Packets.BlockServer/Models/LobbyCharacterData.cs
@@ -85,10 +85,10 @@
 		[WireMember(13)]
 		public string CharacterName { get; }

-		//TODO: No idea what this is
+		//This is pallete/actionbar according to Soly.
 		[KnownSize(0xE8)]
 		[WireMember(14)]
-		public byte[] Config { get; }
+		public byte[] ActionBarSettings { get; }

 		[KnownSize(0x14)]
 		[WireMember(15)]


Sync giving to NPC

Sync giving to NPC

--- RedoxExtensions/Actions.Dispatched/Internal/GiveItemsByName.cs
+++ RedoxExtensions/Actions.Dispatched/Internal/GiveItemsByName.cs
@@ -16,6 +16,7 @@
 using RedoxExtensions.Dispatching;
 using RedoxLib.General;
 using RedoxLib.Objects;
+using RedoxLib.Utilities;

 namespace RedoxExtensions.Actions.Dispatched.Internal
 {
@@ -142,7 +143,20 @@
         {
             var giveData = this._foundItemsToGive[this._currentGiveIndex][this._givenCount[this._currentGiveIndex]];

-            giveData.Item.Give(giveData.TargetId);
+            var woTarget = giveData.TargetId.ToWorldObject();
+            if (woTarget.IsNpc())
+            {
+                // When giving to NPC's, sync up so that we don't flood the NPC with items.  Sometimes they bug out
+                // and one character won't get credit for giving the npc an item
+                using (var mutex = WorldObjectMutex.Obtain(woTarget))
+                {
+                    giveData.Item.Give(giveData.TargetId);
+                }
+            }
+            else
+            {
+                giveData.Item.Give(giveData.TargetId);
+            }
         }

         protected override void InitializeData()


More tweaks

More tweaks

--- TestEtoGl.XamMac/MainForm.cs
+++ TestEtoGl.XamMac/MainForm.cs
@@ -21,6 +21,8 @@
 		{
 			public List<string> entries { get; set; }
 		}
+
+		public List<string> myList;

 		public OVPSettings ovpSettings, ovp2Settings;
 		public System.Timers.Timer m_timer;
@@ -243,9 +245,11 @@

         public MainForm ()
         {
+			myList = new List<string> { "First", "Second" };
+
 			DataContext = new myStuff
 			{
-				entries = new List<string> { "First", "Second" },
+				entries = myList
 			};

 			refPoly = new PointF[5];
@@ -347,6 +351,9 @@

 			var abort = new Command { MenuText = "Abort", ToolBarText = "Abort" };
 			abort.Executed += abortTheRun;
+
+			var adjustList = new Command { MenuText = "Add to list", ToolBarText = "Add" };
+			adjustList.Executed += adjustList_;

 			var quitCommand = new Command { MenuText = "Quit", Shortcut = Application.Instance.CommonModifier | Keys.Q };
             quitCommand.Executed += (sender, e) => Application.Instance.Quit ();
@@ -371,10 +378,16 @@
             };

             // create toolbar
-            ToolBar = new ToolBar { Items = { clickMe, abort } };
+            ToolBar = new ToolBar { Items = { clickMe, abort, adjustList } };

         }
-    }
+
+		void adjustList_(object sender, EventArgs e)
+		{
+			myList.Add("Entry " + myList.Count.ToString());
+		}
+	}
+

 	public static class RNG
 	{


Made async

Made async

--- SQLDatabase.Tests/RemoteStorage/Command/LocationPosterClass.cs
+++ SQLDatabase.Tests/RemoteStorage/Command/LocationPosterClass.cs
@@ -14,7 +14,7 @@
     public class LocationPosterClass
     {
         [TestClass]
-        public class PostLocationMethod
+        public class PostLocationAsyncMethod
         {
             [TestMethod]
             public async Task AllowsPostingForRandomID()


SB-35 search improvements

SB-35 search improvements

--- Server/src/SchoolBusAPI/Services.Impl/SchoolBusOwnerService.cs
+++ Server/src/SchoolBusAPI/Services.Impl/SchoolBusOwnerService.cs
@@ -428,7 +428,10 @@
                 {
                     if (district != null)
                     {
-                        var buses = _context.SchoolBuss.Where(x => x.District.Id == district);
+                        var buses = _context.SchoolBuss
+                            .Include(x => x.District)
+                            .Include(x => x.SchoolBusOwner)
+                            .Where(x => x.District.Id == district);
                         foreach (var bus in buses)
                         {
                             if (bus.SchoolBusOwner != null)
@@ -457,7 +460,10 @@
                 {
                     if (inspector != null)
                     {
-                        var buses = _context.SchoolBuss.Where(x => x.Inspector.Id == inspector);
+                        var buses = _context.SchoolBuss
+                            .Include(x => x.Inspector)
+                            .Include( x => x.SchoolBusOwner)
+                            .Where(x => x.Inspector.Id == inspector);
                         foreach (var bus in buses)
                         {
                             if (bus.SchoolBusOwner != null)