Implement oxygen watermarks

Implement oxygen watermarks

--- BARABAS.cs
+++ BARABAS.cs
@@ -97,7 +97,7 @@
 const string CONFIGSTR_KEEP_STONE = "keep stone";
 const string CONFIGSTR_SORT_STORAGE = "sort storage";
 const string CONFIGSTR_HUD_NOTIFICATIONS = "HUD notifications";
-const string CONFIGSTR_OXYGEN_THRESHOLD = "oxygen threshold";
+const string CONFIGSTR_OXYGEN_WATERMARKS = "oxygen watermarks";
 const string CONFIGSTR_HYDROGEN_THRESHOLD = "hydrogen threshold";

 // ore_volume
@@ -137,7 +137,7 @@
 	}, {
 		CONFIGSTR_POWER_WATERMARKS, ""
 	}, {
-		CONFIGSTR_OXYGEN_THRESHOLD, ""
+		CONFIGSTR_OXYGEN_WATERMARKS, ""
 	}, {
 		CONFIGSTR_HYDROGEN_THRESHOLD, ""
 	}, {
@@ -3140,8 +3140,8 @@
 	material_thresholds[STONE] = 5000M;
 	power_low_watermark = 0;
 	power_high_watermark = 0;
-	oxygen_high_watermark = 30;
-	oxygen_low_watermark = has_oxygen_tanks ? 10 : 0;
+	oxygen_high_watermark = 0;
+	oxygen_low_watermark = 0;
 	hydrogen_high_watermark = 0;
 	hydrogen_low_watermark = 0;
 }
@@ -3179,6 +3179,20 @@
 			power_high_watermark = 480;
 		} else {
 			power_high_watermark = 120;
+		}
+	}
+	if (oxygen_high_watermark == 0 && has_oxygen_tanks) {
+		if (op_mode == OP_MODE_BASE) {
+			oxygen_high_watermark = 30;
+		} else {
+			oxygen_high_watermark = 60;
+		}
+	}
+	if (oxygen_low_watermark == 0 && has_oxygen_tanks) {
+		if (op_mode == OP_MODE_BASE) {
+			oxygen_low_watermark = 10;
+		} else {
+			oxygen_low_watermark = 15;
 		}
 	}
 }
@@ -3356,10 +3370,10 @@
 	} else {
 		config_options[CONFIGSTR_KEEP_STONE] = "all";
 	}
-	if (oxygen_low_watermark != 0M) {
-		config_options[CONFIGSTR_OXYGEN_THRESHOLD] = Convert.ToString(oxygen_low_watermark);
+	if (oxygen_low_watermark > 0) {
+		config_options[CONFIGSTR_OXYGEN_WATERMARKS] = getWatermarkStr(oxygen_low_watermark, oxygen_high_watermark);
 	} else {
-		config_options[CONFIGSTR_OXYGEN_THRESHOLD] = "none";
+		config_options[CONFIGSTR_OXYGEN_WATERMARKS] = "none";
 	}
 	if (hydrogen_low_watermark != 0M) {
 		config_options[CONFIGSTR_HYDROGEN_THRESHOLD] = Convert.ToString(hydrogen_low_watermark);
@@ -3386,9 +3400,12 @@
 	sb.AppendLine("# Second number is when to stop refueling.");
 	sb.AppendLine(key + " = " + config_options[key]);
 	sb.AppendLine();
-	key = CONFIGSTR_OXYGEN_THRESHOLD;
-	sb.AppendLine("# Percentage of oxygen to be considered \"enough\".");
-	sb.AppendLine("# Can be a number between 0 and 100, or \"none\" to disable.");
+	key = CONFIGSTR_OXYGEN_WATERMARKS;
+	sb.AppendLine("# Percentage of oxygen to keep.");
+	sb.AppendLine("# Can be \"none\", \"auto\", or two numbers between 1 and 100");
+	sb.AppendLine("# separated by slash (for example, \"15 / 30\").");
+	sb.AppendLine("# First number is when to sound an alarm.");
+	sb.AppendLine("# second number is when to shut off oxygen generators.");
 	sb.AppendLine(key + " = " + config_options[key]);
 	sb.AppendLine();
 	key = CONFIGSTR_HYDROGEN_THRESHOLD;
@@ -3500,6 +3517,18 @@
 			throw new BarabasException("Invalid config value: " + strval);
 		}
 	}
+	if (str == "oxygen threshold") {
+		Decimal tmp;
+		if (strval == "none") {
+			oxygen_low_watermark = -1;
+			oxygen_high_watermark = -1;
+		} else if (Decimal.TryParse(strval, out tmp) && tmp > 0 && tmp <= 100) {
+				oxygen_low_watermark = tmp;
+				oxygen_high_watermark = 100;
+		} else {
+			throw new BarabasException("Invalid config value: " + strval);
+		}
+	}
 	if (!config_options.ContainsKey(str)) {
 		throw new BarabasException("Invalid config option: " + str);
 	}
@@ -3582,11 +3611,25 @@
 		} else {
 			fail = true;
 		}
-	} else if (clStrCompare(str, CONFIGSTR_OXYGEN_THRESHOLD)) {
-		if (fparse && fval >= 0 && fval <= 100) {
-			oxygen_low_watermark = fval;
+	} else if (clStrCompare(str, CONFIGSTR_OXYGEN_WATERMARKS)) {
+		Decimal low, high;
+		if (strval == "auto") {
+			oxygen_low_watermark = 0;
+			oxygen_high_watermark = 0;
 		} else if (strval == "none") {
-			oxygen_low_watermark = 0;
+			oxygen_low_watermark = -1;
+			oxygen_high_watermark = -1;
+		} else if (parseWatermarkStr(strval, out low, out high)) {
+			if (low > 0 && low <= 100) {
+				oxygen_low_watermark = low;
+			} else {
+				fail = true;
+			}
+			if (high > 0 && high <= 100 && low <= high) {
+				oxygen_high_watermark = high;
+			} else {
+				fail = true;
+			}
 		} else {
 			fail = true;
 		}


enable notices

enable notices

--- TCC.Core/App.xaml.cs
+++ TCC.Core/App.xaml.cs
@@ -17,13 +17,13 @@
 using TCC.Exceptions;
 using TCC.Interop.Proxy;
 using TCC.Loader;
+using TCC.Notice;
 using TCC.Settings;
 using TCC.UI;
 using TCC.UI.Windows;
 using TCC.Update;
 using TCC.Utilities;
 using TCC.Utils;
-using TCC.ViewModels;
 using MessageBoxImage = TCC.Data.MessageBoxImage;

 namespace TCC
@@ -82,8 +82,6 @@
                 return;
             }
             if (!Debugger.IsAttached) AppDomain.CurrentDomain.UnhandledException += GlobalExceptionHandler.HandleGlobalException;
-
-            //NoticeChecker.Init();

             Loading = true;
             await Setup();
@@ -92,6 +90,8 @@

         private static async Task Setup()
         {
+            NoticeChecker.Init();
+
             TccSplashScreen.InitOnNewThread();

             if (!ToolboxMode)
@@ -154,11 +154,8 @@
             ReadyEvent?.Invoke();

             if (!Beta && Settings.BetaNotification && UpdateManager.IsBetaNewer())
-                Log.N("TCC beta available", SR.BetaAvailable,
-                    NotificationType.Success,
-                    10000);
-
-            //NoticeChecker.Ready();
+                Log.N("TCC beta available", SR.BetaAvailable, NotificationType.Success, 10000);
+
         }
         private static void ParseStartupArgs(IList<string> args)
         {


renamed error.txt to crash.log

renamed error.txt to crash.log

--- TCC.Core/App.xaml.cs
+++ TCC.Core/App.xaml.cs
@@ -27,7 +27,7 @@
     public partial class App
     {
         public const bool Debug = false;
-        private static string _version;
+        public static string AppVersion;
         public static SplashScreen SplashScreen;
         public static Dispatcher BaseDispatcher;
         public static string BasePath = Path.GetDirectoryName(typeof(App).Assembly.Location);
@@ -42,7 +42,7 @@
         {
             Loading = true;
             var v = Assembly.GetExecutingAssembly().GetName().Version;
-            _version = $"TCC v{v.Major}.{v.Minor}.{v.Build}";
+            AppVersion = $"TCC v{v.Major}.{v.Minor}.{v.Build}";
             InitSplashScreen();

             BaseDispatcher = Dispatcher.CurrentDispatcher;
@@ -87,7 +87,7 @@
             SessionManager.CurrentPlayer.Name = "player";
             SessionManager.CurrentPlayer.EntityId = 10;
             TimeManager.Instance.SetServerTimeZone(Settings.Settings.LastRegion);
-            ChatWindowManager.Instance.AddTccMessage(_version);
+            ChatWindowManager.Instance.AddTccMessage(AppVersion);
             SplashScreen.CloseWindowSafe();

             UpdateManager.StartCheck();
@@ -282,21 +282,21 @@
         {
             var ex = (Exception)e.ExceptionObject;
             var sb = new StringBuilder("\r\n\r\n");
-            sb.AppendLine($"##### {_version} - {DateTime.Now:dd/MM/yyyy HH:mm:ss} #####");
-            sb.AppendLine($"Version: {PacketAnalyzer.Factory.Version}");
+            sb.AppendLine($"##### {AppVersion} - {DateTime.Now:dd/MM/yyyy HH:mm:ss} #####");
+            sb.Append($"Version: {PacketAnalyzer.Factory.Version}");
             if (SessionManager.Server != null)
             {
                 sb.Append($" - Region: {SessionManager.Server.Region}");
                 sb.Append($" - Server:{SessionManager.Server.ServerId}");
             }
-
+            sb.AppendLine();
             sb.AppendLine($"{ex.Message}");
             sb.AppendLine($"{ex.StackTrace}");
             sb.AppendLine($"Source: {ex.Source}");
             sb.AppendLine($"Data: {ex.Data}");
             if(ex.InnerException != null) sb.AppendLine($"InnerException: \n{ex.InnerException}");
             sb.AppendLine($"TargetSite: {ex.TargetSite}");
-            File.AppendAllText(Path.GetDirectoryName(typeof(App).Assembly.Location) + "/error.txt", sb.ToString());
+            File.AppendAllText(Path.GetDirectoryName(typeof(App).Assembly.Location) + "/crash.log", sb.ToString());
             try
             {
                 var t = new Thread(() => UploadCrashDump(e));
@@ -307,7 +307,7 @@
                 // ignored
             }

-            TccMessageBox.Show("TCC", "An error occured and TCC will now close. Report this issue to the developer attaching error.txt from TCC folder.",
+            TccMessageBox.Show("TCC", "An error occured and TCC will now close. Report this issue to the developer attaching crash.log from TCC folder.",
                 MessageBoxButton.OK, MessageBoxImage.Error);

             if (Proxy.Proxy.IsConnected) Proxy.Proxy.CloseConnection();
@@ -338,7 +338,7 @@
                            ex.StackTrace + "\r\n" + ex.Source + "\r\n" + ex + "\r\n" + ex.Data + "\r\n" +
                            ex.InnerException +
                            "\r\n" + ex.TargetSite;
-                js.Add("tcc_version", new JValue(_version));
+                js.Add("tcc_version", new JValue(AppVersion));
                 js.Add("full_exception", new JValue(full));
                 js.Add("inner_exception",
                     new JValue(ex.InnerException != null ? ex.InnerException.Message : "undefined"));
@@ -369,7 +369,7 @@
                     SynchronizationContext.SetSynchronizationContext(new DispatcherSynchronizationContext(Dispatcher.CurrentDispatcher));
                     SplashScreen = new SplashScreen();
                     SplashScreen.SetText("Initializing...");
-                    SplashScreen.SetVer(_version);
+                    SplashScreen.SetVer(AppVersion);
                     SplashScreen.Show();
                     waiting = false;
                     Dispatcher.Run();


Tracks can now be resized

Tracks can now be resized

--- TimeBeam/Timeline.cs
+++ TimeBeam/Timeline.cs
@@ -1,7 +1,6 @@
 using System;
 using System.Collections.Generic;
 using System.ComponentModel;
-using System.Diagnostics;
 using System.Drawing;
 using System.Drawing.Drawing2D;
 using System.Windows.Forms;
@@ -123,6 +122,11 @@
     ///   The point where the user started drawing up a selection rectangle.
     /// </summary>
     private PointF? _selectionOrigin;
+
+    /// <summary>
+    ///   The currently active edge of the tracks in focus (if any).
+    /// </summary>
+    private RectangleHelper.Edge _activeEdge = RectangleHelper.Edge.None;
     #endregion

     #region Enums
@@ -144,7 +148,12 @@
       /// <summary>
       ///   The user is currently moving selected items.
       /// </summary>
-      MovingSelection
+      MovingSelection,
+
+      /// <summary>
+      ///   The user is resizing the selected tracks.
+      /// </summary>
+      ResizingSelection
     }
     #endregion

@@ -329,7 +338,6 @@

       // Is the left mouse button pressed?
       if( ( e.Button & MouseButtons.Left ) != 0 ) {
-        //if( null != focusedTrack && focusedTrack == _selectedTracks ) {
         if( CurrentMode == BehaviorMode.MovingSelection ) {
           // Indicate ability to move though cursor.
           Cursor = Cursors.SizeWE;
@@ -348,6 +356,25 @@
           // Force a redraw.
           RedrawAndRefresh();

+        } else if( CurrentMode == BehaviorMode.ResizingSelection ) {
+          // Indicate ability to resize though cursor.
+          Cursor = Cursors.SizeWE;
+
+          foreach( TrackSurrogate selectedTrack in _trackSurrogates ) {
+            // Calculate the movement delta.
+            PointF delta = PointF.Subtract( location, new SizeF( _dragOrigin ) );
+            // Apply the delta to the start or end of the timline track,
+            // depending on the edge where the user originally started the resizing operation.
+            if( ( _activeEdge & RectangleHelper.Edge.Left ) != 0 ) {
+              selectedTrack.Start = selectedTrack.SubstituteFor.Start + delta.X;
+            } else if( ( _activeEdge & RectangleHelper.Edge.Right ) != 0 ) {
+              selectedTrack.End = selectedTrack.SubstituteFor.End + delta.X;
+            }
+          }
+
+          // Force a redraw.
+          RedrawAndRefresh();
+
         } else if( CurrentMode == BehaviorMode.Selecting ) {
           if( !_selectionOrigin.HasValue ) {
             throw new InvalidOperationException( "Selection origin not set. This shouldn't happen." );
@@ -372,7 +399,7 @@
         if( null != focusedTrack ) {
           RectangleF trackExtents = GetTrackExtents( focusedTrack );
           RectangleHelper.Edge isPointOnEdge = RectangleHelper.IsPointOnEdge( trackExtents, location, 3f, RectangleHelper.EdgeTest.Horizontal );
-
+
           // Select the appropriate size cursor for the cursor position.
           // Even though we currently only support horizontal cases, we respect all possible return values here.
           switch( isPointOnEdge ) {
@@ -431,7 +458,16 @@
         // Create and store surrogates for selected timeline tracks.
         _trackSurrogates = SurrogateHelper.GetSurrogates( _selectedTracks );

-        CurrentMode = BehaviorMode.MovingSelection;
+        // Check whether the user wants to move or resize the selected tracks.
+        RectangleF trackExtents = GetTrackExtents( focusedTrack );
+        RectangleHelper.Edge isPointOnEdge = RectangleHelper.IsPointOnEdge( trackExtents, location, 3f, RectangleHelper.EdgeTest.Horizontal );
+        if( isPointOnEdge != RectangleHelper.Edge.None ) {
+          CurrentMode = BehaviorMode.ResizingSelection;
+          _activeEdge = isPointOnEdge;
+        } else {
+          CurrentMode = BehaviorMode.MovingSelection;
+        }
+

       } else {
         // Reset the track selection.
@@ -475,7 +511,7 @@
           trackOffset += ( TrackBorderSize * 2 ) + TrackHeight;
         }

-      } else if( CurrentMode == BehaviorMode.MovingSelection ) {
+      } else if( CurrentMode == BehaviorMode.MovingSelection || CurrentMode == BehaviorMode.ResizingSelection ) {
         // The moving operation ended, apply the values of the surrogates to the originals
         foreach( TrackSurrogate surrogate in _trackSurrogates ) {
           surrogate.CopyTo( surrogate.SubstituteFor );


Fix bug with not chaning direction

Fix bug with not chaning direction

--- Tron/Tron/Car/Car.cs
+++ Tron/Tron/Car/Car.cs
@@ -181,7 +181,7 @@
             {
                 this.IsBoosting = true;
                 this.BoostsRemeaning--;
-                this.BoostTimeRemeaning = 15;
+                this.BoostTimeRemeaning = 50;
             }
         }

@@ -190,6 +190,10 @@
         /// </summary>
         protected void Move()
         {
+            // Change the direction
+            this.Direction = this.NewDirection;
+
+            // Move the car accordingly
             if (this.Direction == Tron.Direction.Up)
             {
                 this.Y--;


Fix MVC example donation form action

Fix MVC example donation form action

--- Fundraise.MvcExample/Views/Fundraiser/Donate.cshtml
+++ Fundraise.MvcExample/Views/Fundraiser/Donate.cshtml
@@ -8,7 +8,7 @@

-    <form action=""@Url.Action("Donate", "Fundraiser")" method="post" id="payment-form">
+    <form action="@Url.Action("Donate", "Fundraiser")" method="post" id="payment-form">

                 Amount


Ongoing experiments to obtain SCANdata

Ongoing experiments to obtain SCANdata


add test for vb.net generic parameter list

--- src/test/Test.RazorEngine.Core/CompilerServicesUtilityTestFixture.cs
+++ src/test/Test.RazorEngine.Core/CompilerServicesUtilityTestFixture.cs
@@ -100,5 +100,16 @@
             var result = CompilerServicesUtility.ResolveCSharpTypeName(typeof(HostingClass.GenericNestedClass<string>));
             Assert.AreEqual("Test.RazorEngine.TestTypes.BaseTypes.HostingClass.GenericNestedClass<System.String>", result);
         }
+
+        /// <summary>
+        /// Check that we can generate the type name from a iterator type
+        /// </summary>
+        [Test]
+        public void CompilerServiceUtility_CheckVBNetIteratorType()
+        {
+            var type = IteratorHelper().GetType();
+            var result = CompilerServicesUtility.ResolveVBTypeName(type);
+            Assert.AreEqual("System.Collections.Generic.IEnumerable(Of System.String)", result);
+        }
     }
 }


Tabs --> Spaces

Tabs --> Spaces

--- JabbR/ContentProviders/GoogleMapsContentProvider.cs
+++ JabbR/ContentProviders/GoogleMapsContentProvider.cs
@@ -4,29 +4,29 @@

 namespace JabbR.ContentProviders
 {
-	public class GoogleMapsContentProvider : EmbedContentProvider
-	{
-		private static readonly Regex _mapQueryRegex = new Regex(@".&hnear=(.*)\&[tg].*");
+    public class GoogleMapsContentProvider : EmbedContentProvider
+    {
+        private static readonly Regex _mapQueryRegex = new Regex(@".&hnear=(.*)\&[tg].*");

-		protected override Regex ParameterExtractionRegex
-		{
-			get
-			{
-				return _mapQueryRegex;
-			}
-		}
+        protected override Regex ParameterExtractionRegex
+        {
+            get
+            {
+                return _mapQueryRegex;
+            }
+        }

-		public override IEnumerable<string> Domains
-		{
-			get { yield return "http://maps.google.com"; }
-		}
+        public override IEnumerable<string> Domains
+        {
+            get { yield return "http://maps.google.com"; }
+        }

-		public override string MediaFormatString
-		{
-			get
-			{
-				return @"Google Maps
";
-			}
-		}
-	}
+        public override string MediaFormatString
+        {
+            get
+            {
+                return @"Google Maps
";
+            }
+        }
+    }
 }


Fix Vornoi generation

Fix Vornoi generation

--- hlae/AfxRgbaLutVoronoiGenerator.cs
+++ hlae/AfxRgbaLutVoronoiGenerator.cs
@@ -531,38 +531,48 @@
                             HlaeColor xx = new HlaeColor(fiR, fiG, fiB, fiA);

                             bool hasBest = false;
-                            KeyValuePair<HlaeCommentedColor, HlaeWeightedColor> best = m_Colors.First();
                             float bestDist = 0;
-                            float dist;
-
-                            float maxWeight = 1;
+                            float bestTargetDist = 0;
+                            HlaeColor cur_y = new HlaeColor(0, 0, 0, 0);
+                            float cur_s = 0;

                             foreach (KeyValuePair<HlaeCommentedColor, HlaeWeightedColor> kvp in m_Colors)
                             {
-                                dist = xx.CalcDistanceSquared(kvp.Key.Color, kvp.Value.Weight);
-
-                                if (!hasBest || dist < bestDist)
+                                float dist = xx.CalcDistanceSquared(kvp.Key.Color, kvp.Value.Weight);
+                                float targetDist = x.CalcDistanceSquared(kvp.Key.Color, kvp.Value.Weight);
+
+                                if(!hasBest)
                                 {
                                     hasBest = true;
                                     bestDist = dist;
-                                    best = kvp;
+                                    bestTargetDist = targetDist;
+                                    cur_y = kvp.Value.Color;
+                                    cur_s = 1;
+                                } else
+                                {
+                                    if (dist < bestDist)
+                                    {
+                                        bestDist = dist;
+                                        cur_y = kvp.Value.Color;
+                                        cur_s = 1;
+                                    }
+                                    else if(dist == bestDist)
+                                    {
+                                        cur_y += kvp.Value.Color;
+                                        cur_s += 1;
+                                    }
+                                    if (targetDist < bestTargetDist)
+                                    {
+                                        bestTargetDist = targetDist;
+                                    }
                                 }
+
                             }

-                            if (!hasBest)
+                            if(xx.CalcDistanceSquared(x, 1.0f) <= bestTargetDist)
                             {
-                                outR = best.Value.Color.R;
-                                outG = best.Value.Color.G;
-                                outB = best.Value.Color.B;
-                                outA = best.Value.Color.A;
-                                return false;
-                            }
-
-                            dist = xx.CalcDistanceSquared(x, 1.0f);
-                            if(dist <= bestDist)
-                            {
-                                y = y + best.Value.Color;
-                                s = s + 1;
+                                y += cur_y;
+                                s += cur_s;
                             }
                         }
                     }


no more inline todo's

no more inline todo's

--- projects/CaseTracker/HoverWindow.cs
+++ projects/CaseTracker/HoverWindow.cs
@@ -688,8 +688,5 @@
             }
         };

-        // TODO: disable tray icon menu according to state
-
-
     } // Class HoverWindow
 }


Stupid Access Error #92343

Stupid Access Error #92343


Reduce some line

Reduce some line

--- SpaceBlog/SpaceBlog/Views/Article/Index.cshtml
+++ SpaceBlog/SpaceBlog/Views/Article/Index.cshtml
@@ -47,12 +47,18 @@
                     @Html.DisplayFor(modelItem => item.Author.FullName)
                 </td>
                 <td>
-                @if (User.IsInRole("Administrators") || User.IsInRole("Moderators") || User.Identity.Name == item.Author.UserName)
-                {
+                    @{
+                        var userInRole = User.IsInRole("Administrators") || User.IsInRole("Moderators") || User.Identity.Name == item.Author.UserName;
+                    }
+
+                    @if (userInRole)
+                    {
                         @Html.ActionLink("Edit", "Edit", new { id = item.Id }, new { @class = "btn-sm btn-primary" })
                     }
+
                     @Html.ActionLink("Details", "Details", new { id = item.Id }, new { @class = "btn-sm btn-primary" })
-                    @if (User.IsInRole("Administrators") || User.IsInRole("Moderators") || User.Identity.Name == item.Author.UserName)
+
+                    @if (userInRole)
                     {
                         @Html.ActionLink("Delete", "Delete", new { id = item.Id }, new { @class = "btn-sm btn-danger" })
                     }


RuleSetGeneratorTests cleanup

RuleSetGeneratorTests cleanup


run Klondike as a service to see if it fixes build issue


Implemented and tested Binary Search iterative and recursive versions


optimizing assignement emit a bit

optimizing assignement emit a bit


Change the default file names and load priority (#249)


133: not used LoadNewBuffer() and AppendBuffer()


Simplify cake script

Simplify cake script

--- build.cake
+++ build.cake
@@ -1,6 +1,3 @@
-using System.Text.RegularExpressions;
-using System.Xml.Linq;
-
 var target = Argument("Target", "Default");
 var configuration =
     HasArgument("Configuration") ? Argument<string>("Configuration") :
@@ -40,21 +37,21 @@
         DotNetCoreRestore();
     });

- Task("BuildTool")
+Task("Build")
     .IsDependentOn("Restore")
     .Does(() =>
     {
-        var project = GetFiles("./**/Schema.NET.Tool.csproj").First();
         DotNetCoreBuild(
-            project.GetDirectory().FullPath,
+            ".",
             new DotNetCoreBuildSettings()
             {
-                Configuration = configuration
+                Configuration = configuration,
+                VersionSuffix = versionSuffix
             });
     });

  Task("RunTool")
-    .IsDependentOn("BuildTool")
+    .IsDependentOn("Build")
     .Does(() =>
     {
         var project = GetFiles("./**/Schema.NET.Tool.csproj").First();
@@ -66,19 +63,6 @@
             Information(file.ToString());
         }
         Information("Finished Listing Files");
-    });
-
-Task("Build")
-    .IsDependentOn("Restore")
-    .Does(() =>
-    {
-        DotNetCoreBuild(
-            ".",
-            new DotNetCoreBuildSettings()
-            {
-                Configuration = configuration,
-                VersionSuffix = versionSuffix
-            });
     });

 Task("Test")
@@ -103,9 +87,8 @@
     .IsDependentOn("Test")
     .Does(() =>
     {
-        var project = GetFiles("./**/Schema.NET.csproj").First();
         DotNetCorePack(
-            project.GetDirectory().FullPath,
+            ".",
             new DotNetCorePackSettings()
             {
                 Configuration = configuration,


Another go, coveralls.io hangs in the cake tool install, this seems to work locally.

--- build.cake
+++ build.cake
@@ -2,7 +2,7 @@
 #tool "OpenCover"
 #tool "GitVersion.CommandLine"
 #tool "docfx.console"
-#tool "coveralls.io"
+#tool nuget:?package=coveralls.net&version=0.7.0
 #tool "PdbGit"
 #addin "Cake.FileHelpers"
 #addin "Cake.DocFx"
@@ -122,7 +122,7 @@
     .WithCriteria(() => !string.IsNullOrEmpty(coverallsRepoToken))
     .Does(() =>
 {
-	CoverallsIo("./artifacts/coverage.xml", new CoverallsIoSettings()
+	CoverallsNet("./artifacts/coverage.xml", CoverallsNetReportType.OpenCover, new CoverallsNetSettings()
     {
         RepoToken = coverallsRepoToken
     });


Rename tasks and add empty package test tasks

--- build.cake
+++ build.cake
@@ -373,7 +373,7 @@
         CopyDirectory(BIN_DIR, CURRENT_IMG_DIR + "bin/");
     });

-Task("PackageNuGet")
+Task("BuildNuGetPackages")
     .Description("Creates NuGet packages of the engine/console")
     .IsDependentOn("CreateImage")
     .Does(() =>
@@ -437,7 +437,13 @@
         });
     });

-Task("PackageChocolatey")
+Task("TestNugetPackages")
+    .Does(() =>
+    {
+
+    });
+
+Task("BuildChocolateyPackages")
     .Description("Creates chocolatey packages of the console runner")
     .Does(() =>
     {
@@ -498,6 +504,12 @@
             });
     });

+Task("TestChocolateyPackage")
+    .Does(() =>
+    {
+
+    });
+
 //////////////////////////////////////////////////////////////////////
 // PACKAGE COMBINED DISTRIBUTIONS
 //////////////////////////////////////////////////////////////////////
@@ -533,7 +545,7 @@
     }
 });

-Task("PackageMsi")
+Task("BuildMsiPackage")
 .IsDependentOn("CreateCombinedImage")
 .Does(() =>
 {
@@ -549,7 +561,13 @@
         );
 });

-Task("PackageZip")
+Task("TestMsiPackage")
+    .Does(() =>
+    {
+
+    });
+
+Task("BuildZipPackage")
 .IsDependentOn("CreateCombinedImage")
 .Does(() =>
 {
@@ -568,6 +586,12 @@
     var zipPath = string.Format("{0}NUnit.Console-{1}.zip", PACKAGE_DIR, productVersion);
     Zip(ZIP_IMG, zipPath);
 });
+
+Task("TestZipPackage")
+    .Does(() =>
+    {
+
+    });

 Task("InstallSigningTool")
     .Does(() =>
@@ -624,8 +648,8 @@
         }
     });

-Task("CheckPackages")
-    .Description("Check content of NuGet packages")
+Task("CheckPackageContent")
+    .Description("Check content of all the packages we build")
     .Does(() =>
     {
         CheckAllPackages();
@@ -825,14 +849,26 @@
     .IsDependentOn("TestEngine")
     .IsDependentOn("TestConsole");

+Task("BuildPackages")
+    .Description("Builds all packages for distribution")
+    .IsDependentOn("BuildNuGetPackages")
+    .IsDependentOn("BuildChocolateyPackages")
+    .IsDependentOn("BuildMsiPackage")
+    .IsDependentOn("BuildZipPackage");
+
+Task("TestPackages")
+    .Description("Tests the packages")
+    .IsDependentOn("TestNugetPackages")
+    .IsDependentOn("TestChocolateyPackage")
+    .IsDependentOn("TestMsiPackage")
+    .IsDependentOn("TestZipPackage");
+
 Task("Package")
-    .Description("Packages the engine and console runner")
+    .Description("Builds and tests all packages")
     .IsDependentOn("CheckForError")
-    .IsDependentOn("PackageNuGet")
-    .IsDependentOn("PackageChocolatey")
-    .IsDependentOn("PackageMsi")
-    .IsDependentOn("PackageZip")
-    .IsDependentOn("CheckPackages");
+    .IsDependentOn("BuildPackages")
+    .IsDependentOn("CheckPackageContent")
+    .IsDependentOn("TestPackages");

 Task("Appveyor")
     .Description("Builds, tests and packages on AppVeyor")


Moved criteria to Impl tasks

Moved criteria to Impl tasks

--- build.cake
+++ build.cake
@@ -109,6 +109,7 @@
 });

 Task("Restore-NuGet-Packages-Impl")
+    .WithCriteria<AvaloniaBuildData>((context, data) => data.Parameters.IsRunningOnWindows)
     .Does<AvaloniaBuildData>(data =>
 {
     var maxRetryCount = 5;
@@ -191,6 +192,7 @@
 }

 Task("Run-Unit-Tests-Impl")
+    .WithCriteria<AvaloniaBuildData>((context, data) => !data.Parameters.SkipTests)
     .Does<AvaloniaBuildData>(data => {
         RunCoreTest("./tests/Avalonia.Base.UnitTests", data.Parameters, false);
         RunCoreTest("./tests/Avalonia.Controls.UnitTests", data.Parameters, false);
@@ -209,17 +211,20 @@
     });

 Task("Run-Designer-Tests-Impl")
+    .WithCriteria<AvaloniaBuildData>((context, data) => !data.Parameters.SkipTests)
     .Does<AvaloniaBuildData>(data => {
         RunCoreTest("./tests/Avalonia.DesignerSupport.Tests", data.Parameters, false);
     });

 Task("Run-Render-Tests-Impl")
+    .WithCriteria<AvaloniaBuildData>((context, data) => !data.Parameters.SkipTests && data.Parameters.IsRunningOnWindows)
     .Does<AvaloniaBuildData>(data => {
         RunCoreTest("./tests/Avalonia.Skia.RenderTests/Avalonia.Skia.RenderTests.csproj", data.Parameters, true);
         RunCoreTest("./tests/Avalonia.Direct2D1.RenderTests/Avalonia.Direct2D1.RenderTests.csproj", data.Parameters, true);
     });

 Task("Run-Leak-Tests-Impl")
+    .WithCriteria<AvaloniaBuildData>((context, data) => !data.Parameters.SkipTests && data.Parameters.IsRunningOnWindows)
     .Does(() =>
     {
         var dotMemoryUnit = Context.Tools.Resolve("dotMemoryUnit.exe");
@@ -269,6 +274,11 @@
 });

 Task("Publish-MyGet-Impl")
+    .WithCriteria<AvaloniaBuildData>((context, data) => !data.Parameters.IsLocalBuild)
+    .WithCriteria<AvaloniaBuildData>((context, data) => !data.Parameters.IsPullRequest)
+    .WithCriteria<AvaloniaBuildData>((context, data) => data.Parameters.IsMainRepo)
+    .WithCriteria<AvaloniaBuildData>((context, data) => data.Parameters.IsMasterBranch)
+    .WithCriteria<AvaloniaBuildData>((context, data) => data.Parameters.IsMyGetRelease)
     .Does<AvaloniaBuildData>(data =>
 {
     var apiKey = EnvironmentVariable("MYGET_API_KEY");
@@ -297,6 +307,10 @@
 });

 Task("Publish-NuGet-Impl")
+    .WithCriteria<AvaloniaBuildData>((context, data) => !data.Parameters.IsLocalBuild)
+    .WithCriteria<AvaloniaBuildData>((context, data) => !data.Parameters.IsPullRequest)
+    .WithCriteria<AvaloniaBuildData>((context, data) => data.Parameters.IsMainRepo)
+    .WithCriteria<AvaloniaBuildData>((context, data) => data.Parameters.IsNuGetRelease)
     .Does<AvaloniaBuildData>(data =>
 {
     var apiKey = EnvironmentVariable("NUGET_API_KEY");
@@ -325,6 +339,7 @@
 });

 Task("Inspect-Impl")
+    .WithCriteria<AvaloniaBuildData>((context, data) => data.Parameters.IsRunningOnWindows)
     .Does(() =>
     {
         var badIssues = new []{"PossibleNullReferenceException"};
@@ -367,7 +382,6 @@
     .IsDependentOn("Clean-Impl");

 Task("Restore-NuGet-Packages")
-    .WithCriteria<AvaloniaBuildData>((context, data) => data.Parameters.IsRunningOnWindows)
     .IsDependentOn("Clean")
     .IsDependentOn("Restore-NuGet-Packages-Impl");

@@ -376,22 +390,18 @@
     .IsDependentOn("Build-Impl");

 Task("Run-Unit-Tests")
-    .WithCriteria<AvaloniaBuildData>((context, data) => !data.Parameters.SkipTests)
     .IsDependentOn("Build")
     .IsDependentOn("Run-Unit-Tests-Impl");

 Task("Run-Designer-Tests")
-    .WithCriteria<AvaloniaBuildData>((context, data) => !data.Parameters.SkipTests)
     .IsDependentOn("Build")
     .IsDependentOn("Run-Designer-Tests-Impl");

 Task("Run-Render-Tests")
-    .WithCriteria<AvaloniaBuildData>((context, data) => !data.Parameters.SkipTests && data.Parameters.IsRunningOnWindows)
     .IsDependentOn("Build")
     .IsDependentOn("Run-Render-Tests-Impl");

 Task("Run-Leak-Tests")
-    .WithCriteria<AvaloniaBuildData>((context, data) => !data.Parameters.SkipTests && data.Parameters.IsRunningOnWindows)
     .IsDependentOn("Build")
     .IsDependentOn("Run-Leak-Tests-Impl");

@@ -415,24 +425,14 @@
     .IsDependentOn("Create-NuGet-Packages-Impl");

 Task("Publish-MyGet")
-    .WithCriteria<AvaloniaBuildData>((context, data) => !data.Parameters.IsLocalBuild)
-    .WithCriteria<AvaloniaBuildData>((context, data) => !data.Parameters.IsPullRequest)
-    .WithCriteria<AvaloniaBuildData>((context, data) => data.Parameters.IsMainRepo)
-    .WithCriteria<AvaloniaBuildData>((context, data) => data.Parameters.IsMasterBranch)
-    .WithCriteria<AvaloniaBuildData>((context, data) => data.Parameters.IsMyGetRelease)
     .IsDependentOn("Create-NuGet-Packages")
     .IsDependentOn("Publish-MyGet-Impl");

 Task("Publish-NuGet")
-    .WithCriteria<AvaloniaBuildData>((context, data) => !data.Parameters.IsLocalBuild)
-    .WithCriteria<AvaloniaBuildData>((context, data) => !data.Parameters.IsPullRequest)
-    .WithCriteria<AvaloniaBuildData>((context, data) => data.Parameters.IsMainRepo)
-    .WithCriteria<AvaloniaBuildData>((context, data) => data.Parameters.IsNuGetRelease)
     .IsDependentOn("Create-NuGet-Packages")
     .IsDependentOn("Publish-NuGet-Impl");

 Task("Inspect")
-    .WithCriteria<AvaloniaBuildData>((context, data) => data.Parameters.IsRunningOnWindows)
     .IsDependentOn("Restore-NuGet-Packages")
     .IsDependentOn("Inspect-Impl");


still tuning nuget fixes on CI server

still tuning nuget fixes on CI server

--- build.cake
+++ build.cake
@@ -21,8 +21,16 @@
 		() =>
 		{
 			nuget_tool_path = GetToolPath ("../nuget.exe");
-
-			if(IsRunningOnWindows() == false)
+			cake_tool_path = GetToolPath ("./Cake.exe");
+
+			Information("cake_tool_path = {0}", cake_tool_path);
+
+			if
+				(
+					IsRunningOnWindows() == false
+					//&&
+					//"Components-Generic-Build-Mac/CI/tools/Cake"
+				)
 			{
 				/*
 					NuGet Version: 3.4.4.1321
@@ -41,6 +49,8 @@
 						"./tools/nuget.2.8.6.exe"
 					);
 				}
+
+				if ()
 				nuget_tool_path = GetToolPath ("../nuget.2.8.6.exe");
 			}


[build] Attempt to account for older git

--- build.cake
+++ build.cake
@@ -97,7 +97,7 @@
 		// and also set our previous commit to 'master' to compare against
 		var prActualCommit = EnvironmentVariable("ghprbActualCommit");
 		if (!string.IsNullOrWhiteSpace(prActualCommit)) {
-			gitPreviousCommit = "master";
+			gitPreviousCommit = "origin/HEAD";
 			gitCommit = prActualCommit;
 		}


build fixing file paths for non-windows

build fixing file paths for non-windows

--- build.cake
+++ build.cake
@@ -260,31 +260,29 @@
 	.IsDependentOn("RunTests")
     .Does(() =>
 {
-	if (!IsRunningOnWindows())
-	{
-		return;
-	}
-
-	CreateDirectory(testResultsDir);
-
-	var projects = GetFiles("./test/**/*.csproj");
+	if (IsRunningOnWindows())
+	{
+		CreateDirectory(testResultsDir);
+
+		var projects = GetFiles("./test/**/*.csproj");

-	foreach (var project in projects)
-    {
-		var folderName = new System.IO.DirectoryInfo(System.IO.Path.GetDirectoryName(project.ToString())).Name;
-
-		IEnumerable<FilePath> filePaths = GetFiles(System.IO.Path.GetDirectoryName(project.ToString()) + "/TestResults" + "/*.trx");
-
-		Context.Information("Found " + filePaths.Count() + " .trx files");
-
-		foreach(var filePath in filePaths)
-		{
-			Context.Information("Moving " + filePath.FullPath + " to " + testResultsDir);
-
-			MoveFiles(filePath.FullPath, testResultsDir);
-			MoveFile(testResultsDir + @"\" + filePath.GetFilename(), testResultsDir + @"\" + folderName + ".trx");
-		}
-	}
+		foreach (var project in projects)
+		{
+			var folderName = new System.IO.DirectoryInfo(System.IO.Path.GetDirectoryName(project.ToString())).Name;
+
+			IEnumerable<FilePath> filePaths = GetFiles(System.IO.Path.GetDirectoryName(project.ToString()) + "/TestResults" + "/*.trx");
+
+			Context.Information("Found " + filePaths.Count() + " .trx files");
+
+			foreach(var filePath in filePaths)
+			{
+				Context.Information("Moving " + filePath.FullPath + " to " + testResultsDir);
+
+				MoveFiles(filePath.FullPath, testResultsDir);
+				MoveFile(testResultsDir + "/" + filePath.GetFilename(), testResultsDir + "/" + folderName + ".trx");
+			}
+		}
+	}
 });

 Task("RunTestsWithDotCover")


Fixed artifacts path for msbuild 2017

Fixed artifacts path for msbuild 2017

--- build.cake
+++ build.cake
@@ -155,9 +155,10 @@
     .IsDependentOn("test")
     .Does(()=>
 {
-    var settings = new ProcessSettings
-    {
-        Arguments = "pack Statsd -c Release --output ../artifacts",
+    var artifacts = Directory("./artifacts");
+    var settings = new ProcessSettings
+    {
+        Arguments = "pack Statsd -c Release --output " + artifacts.Path.FullPath,
         WorkingDirectory = Directory("./src")
     };
     int result;


Fixed issue with version generated by AppVeyor PR (x.y.z-random)

--- build.cake
+++ build.cake
@@ -9,7 +9,7 @@
 var projects = new[] { mainProject, testProject };
 var artifactsDirectory = Directory("./artifacts");
 var revision = AppVeyor.IsRunningOnAppVeyor ? AppVeyor.Environment.Build.Number : 0;
-var version = AppVeyor.IsRunningOnAppVeyor ? new Version(AppVeyor.Environment.Build.Version).ToString(3) : "1.0.0";
+var version = AppVeyor.IsRunningOnAppVeyor ? new Version(AppVeyor.Environment.Build.Version.Split('-')[0]).ToString(3) : "1.0.0";
 var globalAssemblyInfo = File("./GlobalAssemblyVersion.cs");

 var generatedVersion = "";
@@ -106,7 +106,8 @@
         testProject,
         new DotNetCoreTestSettings
         {
-            Configuration = configuration
+            Configuration = configuration,
+            Verbose = true
         }
     );
 });


Updated Cake.DotNetTool.Module to 0.2.0

Updated Cake.DotNetTool.Module to 0.2.0

--- build.cake
+++ build.cake
@@ -1,4 +1,4 @@
-#module nuget:?package=Cake.DotNetTool.Module&version=0.1.0
+#module nuget:?package=Cake.DotNetTool.Module&version=0.2.0
 #tool "dotnet:https://api.nuget.org/v3/index.json?package=Wyam.Tool&version=2.2.4"
 #tool "nuget:https://api.nuget.org/v3/index.json?package=KuduSync.NET&version=1.5.2"
 #tool "nuget:https://api.nuget.org/v3/index.json?package=NuGet.CommandLine&version=4.9.4"


remove duplicate push symbols package

remove duplicate push symbols package

--- build.cake
+++ build.cake
@@ -114,11 +114,6 @@
       {
          DotNetCoreNuGetPush(package.FullPath, pushSetting);
       }
-      var symbolsPackages = GetFiles($"{artifacts}/*.snupkg");
-      foreach(var package in symbolsPackages)
-      {
-         DotNetCoreNuGetPush(package.FullPath, pushSetting);
-      }
       return true;
    }
    return false;


Allows dotnet to build when testing and packaging

It seems that building and packaging in two separate tasks
leads to the creation of an empty Nuget package, at least on OS X.

So, we let the dotnet CLI tool build from sources before packaging
as well as before running the tests. It would have been nice to handle
these dependencies with Cake and skip building using the '--no-build'
flag but dotnet doesn't seem to work reliably enough.

--- build.cake
+++ build.cake
@@ -58,7 +58,7 @@
 });

 Task("Test")
-    .IsDependentOn("Compile")
+    .IsDependentOn("Restore-Packages")
     .Does(() =>
 {
     var settings = new DotNetCoreTestSettings
@@ -75,7 +75,7 @@
 });

 Task("Package")
-    .IsDependentOn("Compile")
+    .IsDependentOn("Restore-Packages")
     .IsDependentOn("Version")
     .Does(() =>
 {
@@ -84,7 +84,7 @@
         new DotNetCorePackSettings
         {
             OutputDirectory = packageOutputDirectory,
-            NoBuild = true
+            Configuration = configuration
         });
 });

@@ -119,6 +119,7 @@
     .IsDependentOn("Version")
     .IsDependentOn("Set-Build-Version")
     .IsDependentOn("Test")
+    .IsDependentOn("Package")
     .IsDependentOn("Publish-Build-Artifact");

 Task("Deploy")


define typos fixed

define typos fixed

--- build.cake
+++ build.cake
@@ -344,7 +344,7 @@
 			"__ANDROID_17__", "__ANDROID_18__", "__ANDROID_19__", "__ANDROID_20__", "__ANDROID_21__",
 			"__ANDROID_22__", "__ANDROID_23__", "__ANDROID_24__", "__ANDROID_25__", "__ANDROID_26__",
 			"__MOBILE__",			// Xamarin Legacy
-			"PLATFOROM_ANDROID",	// Xamarin.Auth Legacy
+			"PLATFORM_ANDROID",	// Xamarin.Auth Legacy
 		}
 	},
 	{
@@ -354,7 +354,7 @@
 			"__IOS__",
 			"__UNIFIED__",
 			"___MOBILE__",
-			"PLATFOROM_IOS",		// Xamarin.Auth Legacy
+			"PLATFORM_IOS",		// Xamarin.Auth Legacy
 		}
 	},
 	{


Correct some file paths in build script.


(GH-556) Use OutputDirectory when creating Chocolatey Package

--- build.cake
+++ build.cake
@@ -158,24 +158,23 @@
     .WithCriteria(() => isRunningOnWindows)
     .Does(() =>
 {
-  // Create Cake package.
-  ChocolateyPack("./nuspec/Cake.Portable.nuspec", new ChocolateyPackSettings {
-      Version = semVersion,
-	  ReleaseNotes = releaseNotes.Notes.ToArray(),
-      Files = new [] {
-        new ChocolateyNuSpecContent {Source = string.Concat("./../", binDir.Path.FullPath, "/Cake.exe")},
-        new ChocolateyNuSpecContent {Source = string.Concat("./../", binDir.Path.FullPath, "/Cake.Core.dll")},
-        new ChocolateyNuSpecContent {Source = string.Concat("./../", binDir.Path.FullPath, "/Cake.Core.xml")},
-        new ChocolateyNuSpecContent {Source = string.Concat("./../", binDir.Path.FullPath, "/Cake.Common.dll")},
-        new ChocolateyNuSpecContent {Source = string.Concat("./../", binDir.Path.FullPath, "/Cake.Common.xml")},
-        new ChocolateyNuSpecContent {Source = string.Concat("./../", binDir.Path.FullPath, "/NuGet.Core.dll")},
-        new ChocolateyNuSpecContent {Source = string.Concat("./../", binDir.Path.FullPath, "/Mono.CSharp.dll")},
-        new ChocolateyNuSpecContent {Source = string.Concat("./../", binDir.Path.FullPath, "/Autofac.dll")},
-        new ChocolateyNuSpecContent {Source = string.Concat("./../", binDir.Path.FullPath, "/LICENSE")}
-    }
-  });
-
-  MoveFileToDirectory(string.Concat("cake.portable.", semVersion, ".nupkg"), nugetRoot);
+    // Create Cake package.
+    ChocolateyPack("./nuspec/Cake.Portable.nuspec", new ChocolateyPackSettings {
+        Version = semVersion,
+        ReleaseNotes = releaseNotes.Notes.ToArray(),
+        OutputDirectory = nugetRoot,
+        Files = new [] {
+            new ChocolateyNuSpecContent {Source = string.Concat("./../", binDir.Path.FullPath, "/Cake.exe")},
+            new ChocolateyNuSpecContent {Source = string.Concat("./../", binDir.Path.FullPath, "/Cake.Core.dll")},
+            new ChocolateyNuSpecContent {Source = string.Concat("./../", binDir.Path.FullPath, "/Cake.Core.xml")},
+            new ChocolateyNuSpecContent {Source = string.Concat("./../", binDir.Path.FullPath, "/Cake.Common.dll")},
+            new ChocolateyNuSpecContent {Source = string.Concat("./../", binDir.Path.FullPath, "/Cake.Common.xml")},
+            new ChocolateyNuSpecContent {Source = string.Concat("./../", binDir.Path.FullPath, "/NuGet.Core.dll")},
+            new ChocolateyNuSpecContent {Source = string.Concat("./../", binDir.Path.FullPath, "/Mono.CSharp.dll")},
+            new ChocolateyNuSpecContent {Source = string.Concat("./../", binDir.Path.FullPath, "/Autofac.dll")},
+            new ChocolateyNuSpecContent {Source = string.Concat("./../", binDir.Path.FullPath, "/LICENSE")}
+        }
+    });
 });

 Task("Create-NuGet-Packages")


Add criteria to Slack task

Add criteria to Slack task


Build: Set DOTNET_CLI_UI_LANGUAGE to en-US when invoking dotnet --info

--- build.cake
+++ build.cake
@@ -186,6 +186,9 @@
         version: buildPlan.LegacyDotNetVersion,
         installFolder: env.Folders.LegacyDotNetSdk);

+    string DOTNET_CLI_UI_LANGUAGE = "DOTNET_CLI_UI_LANGUAGE";
+    var originalUILanguageValue = Environment.GetEnvironmentVariable(DOTNET_CLI_UI_LANGUAGE);
+    Environment.SetEnvironmentVariable(DOTNET_CLI_UI_LANGUAGE, "en-US");

     // Capture 'dotnet --info' output and parse out RID.
     var lines = new List<string>();
@@ -197,6 +200,10 @@
     catch (Win32Exception)
     {
         throw new Exception("Failed to run 'dotnet --info'");
+    }
+    finally
+    {
+        Environment.SetEnvironmentVariable(DOTNET_CLI_UI_LANGUAGE, originalUILanguageValue);
     }

     string version, rid, basePath;


Fix type in error message

Fix type in error message

--- build.cake
+++ build.cake
@@ -601,7 +601,7 @@
         var copyError = new List<string>();
         copyError = errorDetail.Select(s => s).ToList();
         errorDetail.Clear();
-        throw new Exception("One or more unit test failed, breaking the build.\n"
+        throw new Exception("One or more unit tests failed, breaking the build.\n"
                               + copyError.Aggregate((x,y) => x + "\n" + y));
     }
 }


cake script cleanup

cake script cleanup

--- build.cake
+++ build.cake
@@ -292,29 +292,50 @@
             //DeleteDirectories (GetDirectories("./output"), recursive:true);
             // OK
             //CleanDirectories("**/obj");
-            //CleanDirectories("**/Obj");
             //CleanDirectories("**/bin");
-            //CleanDirectories("**/Bin");

             //CleanDirectories(GetDirectories("**/obj"));
-            //CleanDirectories(GetDirectories("**/Obj"));
             //CleanDirectories(GetDirectories("**/bin"));
-            //CleanDirectories(GetDirectories("**/Bin"));
-

             // OK
-            DeleteDirectories(GetDirectories("**/obj"), recursive:true);
-            DeleteDirectories(GetDirectories("**/Obj"), recursive:true);
-            DeleteDirectories(GetDirectories("**/bin"), recursive:true);
-            DeleteDirectories(GetDirectories("**/Bin"), recursive:true);
-
-            // ! OK
-            //DeleteDirectories("**/obj", true);
-            // The best overloaded method match for
-            //		`CakeBuildScriptImpl.DeleteDirectories(System.Collections.Generic.IEnumerable<Cake.Core.IO.DirectoryPath>, bool)'
-            // has some invalid arguments
-            //Information("NOGO: DeleteDirectories(\"**/obj\", true);");
-
+            DeleteDirectories
+                (
+                    GetDirectories("**/obj"),
+                    new DeleteDirectorySettings
+                    {
+                        Recursive = true,
+                        Force = true
+                    }
+                );
+            DeleteDirectories
+                (
+                    GetDirectories("**/Obj"),
+                    new DeleteDirectorySettings
+                    {
+                        Recursive = true,
+                        Force = true
+                    }
+                );
+            DeleteDirectories
+                (
+                    GetDirectories("**/bin"),
+                    new DeleteDirectorySettings
+                    {
+                        Recursive = true,
+                        Force = true
+                    }
+                );
+            DeleteDirectories
+                (
+                    GetDirectories("**/Bin"),
+                    new DeleteDirectorySettings
+                    {
+                        Recursive = true,
+                        Force = true
+                    }
+                );
+
+            return;
         }
     );

@@ -344,12 +365,62 @@

             // }

-            DeleteDirectories(GetDirectories("**/bin"), recursive:true);
-            DeleteDirectories(GetDirectories("**/Bin"), recursive:true);
-            DeleteDirectories(GetDirectories("**/obj"), recursive:true);
-            DeleteDirectories(GetDirectories("**/Obj"), recursive:true);
-            DeleteDirectories(GetDirectories("**/packages"), recursive:true);
-            DeleteDirectories(GetDirectories("**/Components"), recursive:true);
+            DeleteDirectories
+                (
+                    GetDirectories("**/obj"),
+                    new DeleteDirectorySettings
+                    {
+                        Recursive = true,
+                        Force = true
+                    }
+                );
+            DeleteDirectories
+                (
+                    GetDirectories("**/Obj"),
+                    new DeleteDirectorySettings
+                    {
+                        Recursive = true,
+                        Force = true
+                    }
+                );
+            DeleteDirectories
+                (
+                    GetDirectories("**/bin"),
+                    new DeleteDirectorySettings
+                    {
+                        Recursive = true,
+                        Force = true
+                    }
+                );
+            DeleteDirectories
+                (
+                    GetDirectories("**/Bin"),
+                    new DeleteDirectorySettings
+                    {
+                        Recursive = true,
+                        Force = true
+                    }
+                );
+            DeleteDirectories
+                (
+                    GetDirectories("**/packages"),
+                    new DeleteDirectorySettings
+                    {
+                        Recursive = true,
+                        Force = true
+                    }
+                );
+            DeleteDirectories
+                (
+                    GetDirectories("**/Components"),
+                    new DeleteDirectorySettings
+                    {
+                        Recursive = true,
+                        Force = true
+                    }
+                );
+
+            return;
         }
     );


Inflate and Offset now return the modified rect instead of changing the current instance

--- Xwt/Xwt/Rectangle.cs
+++ Xwt/Xwt/Rectangle.cs
@@ -57,8 +57,7 @@

 		public static Rectangle FromLTRB (double left, double top, double right, double bottom)
 		{
-			return new Rectangle (left, top, right - left,
-					      bottom - top);
+			return new Rectangle (left, top, right - left + 1, bottom - top + 1);
 		}

 		// Equality
@@ -113,7 +112,7 @@
 			return Union (this, r);
 		}

-		public static Rectangle Union (Rectangle r1, Rectangle r2)
+		Rectangle Union (Rectangle r1, Rectangle r2)
 		{
 			return FromLTRB (Math.Min (r1.Left, r2.Left),
 					 Math.Min (r1.Top, r2.Top),
@@ -126,7 +125,7 @@
 			return Intersect (this, r);
 		}

-		public static Rectangle Intersect (Rectangle r1, Rectangle r2)
+		Rectangle Intersect (Rectangle r1, Rectangle r2)
 		{
 			if (!r1.IntersectsWith (r2))
 				return new Rectangle ();
@@ -179,52 +178,32 @@
 		}

 		// Inflate and Offset
-		public void Inflate (Size sz)
-		{
-			Inflate (sz.Width, sz.Height);
-		}
-
-		public void Inflate (double width, double height)
-		{
-			X -= width;
-			Y -= height;
-			Width += width * 2;
-			Height += height * 2;
-		}
-
-		public static Rectangle Inflate (Rectangle rect, double x, double y)
-		{
-			Rectangle r = rect;
-			r.Inflate (x, y);
+		public Rectangle Inflate (Size sz)
+		{
+			return Inflate (sz.Width, sz.Height);
+		}
+
+		public Rectangle Inflate (double width, double height)
+		{
+			Rectangle r = this;
+			r.X -= width;
+			r.Y -= height;
+			r.Width += width * 2;
+			r.Height += height * 2;
 			return r;
 		}

-		public static Rectangle Inflate (Rectangle rect, Size sz)
-		{
-			return Inflate (rect, sz.Width, sz.Height);
-		}
-
-		public void Offset (double dx, double dy)
-		{
-			X += dx;
-			Y += dy;
-		}
-
-		public void Offset (Point dr)
-		{
-			Offset (dr.X, dr.Y);
-		}
-
-		public static Rectangle Offset (Rectangle rect, double dx, double dy)
-		{
-			Rectangle r = rect;
-			r.Offset (dx, dy);
+		public Rectangle Offset (double dx, double dy)
+		{
+			Rectangle r = this;
+			r.X += dx;
+			r.Y += dy;
 			return r;
 		}

-		public static Rectangle Offset (Rectangle rect, Point dr)
-		{
-			return Offset (rect, dr.X, dr.Y);
+		public Rectangle Offset (Point dr)
+		{
+			return Offset (dr.X, dr.Y);
 		}
 	}
 }


builder setup

builder setup

--- test/desktop/features/fixtures/maze_runner/Assets/Scripts/Builder.cs
+++ test/desktop/features/fixtures/maze_runner/Assets/Scripts/Builder.cs
@@ -16,16 +16,19 @@
         BuildPipeline.BuildPlayer(opts);
     }

-    // Generates Mazerunner.app
     public static void MacOS()
     {
         Build("Mazerunner", BuildTarget.StandaloneOSX);
     }

-    // Generates Mazerunner.app
     public static void Win64()
     {
         Build("WindowsBuild/Mazerunner.exe", BuildTarget.StandaloneWindows64);
     }
+
+    public static void WebGL()
+    {
+        Build("Mazerunner", BuildTarget.WebGL);
+    }
 }
 #endif


Fixed issue with sponsorship row... Was inserting columns that no longer exist.

--- yafsrc/YetAnotherForum.NET/pages/posts.ascx.cs
+++ yafsrc/YetAnotherForum.NET/pages/posts.ascx.cs
@@ -424,12 +424,6 @@
 			sponserRow ["Message"] = PageContext.BoardSettings.AdPost;
 			sponserRow ["HasAvatarImage"] = false;
 			sponserRow ["HasAttachments"] = false;
-			sponserRow ["ICQ"] = DBNull.Value;
-			sponserRow ["AIM"] = DBNull.Value;
-			sponserRow ["YIM"] = DBNull.Value;
-			sponserRow ["MSN"] = DBNull.Value;
-			sponserRow ["Weblog"] = DBNull.Value;
-			sponserRow ["Homepage"] = DBNull.Value;
 			sponserRow ["Signature"] = GetText( "AD_SIGNATURE" );
 			sponserRow ["IP"] = "none";
 			sponserRow ["Edited"] = sponserRow ["Posted"];


Fix possible null ref

Fix possible null ref

--- Lottie.Forms/Platforms/Ios/AnimationViewRenderer.cs
+++ Lottie.Forms/Platforms/Ios/AnimationViewRenderer.cs
@@ -188,7 +188,10 @@
         {
             if (animationFinished)
             {
-                Element?.InvokeFinishedAnimation();
+                if (_animationView == null || Element == null)
+                    return;
+
+                Element.InvokeFinishedAnimation();
                 if (Element.RepeatMode == RepeatMode.Infinite)
                 {
                     Element.InvokeRepeatAnimation();


Fix: cascaded include unit test

Fix: cascaded include unit test

--- Main/Source/Effort.Test/Features/RelationFixture.cs
+++ Main/Source/Effort.Test/Features/RelationFixture.cs
@@ -109,6 +109,8 @@

             var res = this.RelationEntities
                 .Include(x => x.CascadedRelation.RequiredRelation)
+                .AsEnumerable()
+                .Where(x => x.CascadedRelation != null)
                 .FirstOrDefault();

             res.ShouldNotBeNull();


Guard for null helpText

Guard for null helpText

--- MatterControlLib/SlicerConfiguration/SettingsRow.cs
+++ MatterControlLib/SlicerConfiguration/SettingsRow.cs
@@ -61,7 +61,7 @@
 		{
 			using (this.LayoutLock())
 			{
-				this.HelpText = helpText;
+				this.HelpText = helpText ?? "";
 				this.theme = theme;
 				this.fullRowSelect = fullRowSelect;


print parsers now work

print parsers now work

Former-commit-id: 7017681f6374d8b802c4cea90bf36739bcf4fb0d

--- MeTLMeeting/SandRibbon/Providers/HistoryProvider.cs
+++ MeTLMeeting/SandRibbon/Providers/HistoryProvider.cs
@@ -92,7 +92,7 @@
             {

              */
-            new HttpHistoryProvider().Retrieve<PreParser>(
+            new HttpHistoryProvider().Retrieve<T>(
                     delegate { },
                     (_i, _j) => { },
                     history =>


Data synchronization for PyScopeTest.TestThread

--- src/embed_tests/TestPyScope.cs
+++ src/embed_tests/TestPyScope.cs
@@ -337,10 +337,13 @@
                     //add function to the scope
                     //can be call many times, more efficient than ast
                     ps.Exec(
+                        "import threading\n"+
+                        "lock = threading.Lock()\n"+
                         "def update():\n" +
-                        "    global res, th_cnt\n" +
-                        "    res += bb + 1\n" +
-                        "    th_cnt += 1\n"
+                         "    global res, th_cnt\n" +
+                         "    with lock:\n" +
+                         "       res += bb + 1\n" +
+                         "       th_cnt += 1\n"
                     );
                 }
                 int th_cnt = 3;


-filled out a few more enums to improve display of effect 382 (inhibit effect)

--- SpellParser.cs
+++ SpellParser.cs
@@ -114,33 +114,48 @@
         Melee_Mitigation = 168,
         Critical_Hit_Chance = 169,
         Crippling_Blow_Chance = 171,
-        Avoid_Melee_Chance = 172,
+        Avoid_Melee_Chance = 172, // combat agility AA?
         Riposte_Chance = 173,
         Dodge_Chance = 174,
         Parry_Chance = 175,
         Lifetap_From_Weapon = 178,
         Weapon_Delay = 182,
+        Hit_Chance = 184,
         Block_Chance = 188,
         Endurance_Repeating = 189,
         Hate_Repeating = 192,
         Skill_Attack = 193,
         Cancel_All_Aggro = 194,
+        Stun_Resist_Chance = 195,
         Taunt = 199,
         Proc_Rate = 200,
         Slay_Undead = 219,
         Weapon_Damage_Bonus = 220,
         Lung_Capacity = 246,
-        Frontal_Backstab = 252,
+        Frontal_Backstab_Chance = 252,
+        Frontal_Backstab_Min_Damage = 253,
+        Shroud_Of_Stealth = 256,
+        Triple_Backstab_Chance = 258,
+        Combat_Stability = 259, // ac soft cap. AA and a few shaman spells
         Song_Range = 270,
         Flurry = 279,
         Spell_Damage_Bonus = 286,
         Dispel_Detrimental = 291,
         Movement_Speed_AA = 271,
         Critical_DoT_Chance = 273,
+        Critical_Heal_Chance = 274,
+        Double_Special_Attack_Chance = 283, // monk specials
+        Movement_Speed_Cap = 290,
+        Frontal_Stun_Resist_Chance = 293, // AA
         Critical_Nuke_Chance = 294,
+        Archery_Damage = 301, // AA, not sure which
+        Damage_Shield_Taken = 305,
+        Teleport_To_Bind = 309,
         Invis = 314,
         Targets_Target_Hate = 321,
         Gate_to_Home_City = 322,
+        Crit_Hit_Damage = 330,
+        Summon_To_Corpse = 332,
         XP_Gain = 337,
         Casting_Trigger = 339,
         Mana_Burn = 350,
@@ -149,8 +164,12 @@
         Corruption_Counter = 369,
         Corruption_Resist = 370,
         Melee_Delay = 371,
+        Crit_DoT_Damage = 375,
         Push = 379,
         Cast_On_Spell = 383,
+        Healing_Taken = 393,
+        Healing_Taken2 = 394,
+        Crit_DoT_Chance = 395,
         Pet_Duration = 398,
         Twincast_Chance = 399,
         Heal_From_Mana = 400,
@@ -1544,7 +1563,7 @@
                 case 258:
                     return Spell.FormatPercent("Chance to Triple Backstab", value);
                 case 259:
-                    // based on lucy interpretation
+                    // i.e. Combat Stability
                     return Spell.FormatCount("AC Soft Cap", value);
                 case 262:
                     // affects worn cap


-added a few more target types and deity casting restrictions

--- SpellParser.cs
+++ SpellParser.cs
@@ -293,12 +293,17 @@
         Plant = 16,
         Old_Giants = 17,
         Old_Dragons = 18,
+        Target_AE_Lifetap = 20,
         Undead_AE = 24,
         Summoned_AE = 25,
-        Hatelist = 33,
+        Hatelist = 32,
+        Hatelist2 = 33,
         Chest = 34,
-        Caster_PB_Players = 36, // only PCs? originally used for GM mass illusions
+        Special_Muramites = 35, // bane for Ingenuity group trial in MPG
+        Caster_PB_Players = 36,
+        Caster_PB_NPC = 37,
         Pet2 = 38,
+        No_Pets = 39, // single/group/ae ?
         Nearby_Players = 40, // bard AE hits all players
         Target_Group = 41,
         Directional_AE = 42,
@@ -651,7 +656,11 @@
         public bool CancelOnSit;
         public bool Sneaking;
         public int[] CategoryDescID; // AAs don't have these set
+        public string Deity;
+
+        #if LargeMemory
         public string Category;
+        #endif

         public float Unknown;
@@ -694,6 +703,9 @@

             if (!String.IsNullOrEmpty(ClassesLevels))
                 result.Add("Classes: " + ClassesLevels);
+
+            if (!String.IsNullOrEmpty(Deity))
+                result.Add("Deity: " + Deity);

             if (Mana > 0)
                 result.Add("Mana: " + Mana);
@@ -2122,6 +2134,7 @@
                         string[] fields = line.Split('^');
                         Spell spell = LoadSpell(fields);

+                        #if LargeMemory
                         string s;
                         if (desc.TryGetValue("5/" + spell.CategoryDescID[0], out s))
                         {
@@ -2131,6 +2144,7 @@
                             if (desc.TryGetValue("5/" + spell.CategoryDescID[2], out s))
                                 spell.Category += "/" + s;
                         }
+                        #endif

                         if (!desc.TryGetValue("6/" + spell.DescID, out spell.Desc))
                             spell.Desc = null;
@@ -2228,7 +2242,6 @@
             spell.ProcRestrict = (SpellTargetRestrict)ParseInt(fields[220]);  // field 206/216 seems to be related
             spell.PersistAfterDeath = ParseBool(fields[224]);

-
             // debug stuff
             //spell.Unknown = ParseFloat(fields[231]);

@@ -2261,6 +2274,12 @@
                 //    Console.Error.WriteLine(String.Format("SPA {1} {0} has diff value/base1: {2}/{3} calc: {4}", spell.Name, spa, value, base1, calc));
             }

+            // 125..141 deity casting restrictions
+            string[] gods = new string[] { "Agnostic", "Bertox", "Brell", "Cazic", "Erollisi", "Bristlebane", "Innoruuk", "Karana", "Mithanial", "Prexus", "Quellious", "Rallos", "Rodcet", "Solusek", "Tribunal", "Tunare", "Veeshan" };
+            for (int i = 0; i < gods.Length; i++)
+                if (ParseBool(fields[125 + i]))
+                    spell.Deity += gods[i] + " ";
+
             // debug stuff
             //if (spell.ID == 31123) for (int i = 0; i < fields.Length; i++) Console.WriteLine("{0}: {1}", i, fields[i]);


-effect 158 should use scaled value -effects 164, 165, 166 (chest spells) use value for something -modified comments per issue1

--- SpellParser.cs
+++ SpellParser.cs
@@ -1062,7 +1062,7 @@
                 case 157:
                     return Spell.FormatCount("Spell Damage Shield", -value);
                 case 158:
-                    return Spell.FormatPercent("Chance to Reflect Spell", base1);
+                    return Spell.FormatPercent("Chance to Reflect Spell", value);
                 case 159:
                     return Spell.FormatCount("Base Stats", value);
                 case 160:
@@ -1078,11 +1078,11 @@
                 case 163:
                     return String.Format("Absorb {0} Hits or Spells", value);
                 case 164:
-                    return "Appraise Chest";
+                    return String.Format("Appraise Chest ({0})", value);
                 case 165:
-                    return "Disarm Chest";
+                    return String.Format("Disarm Chest ({0})", value);
                 case 166:
-                    return "Unlock Chest";
+                    return String.Format("Unlock Chest ({0})", value);
                 case 167:
                     return String.Format("Pet Power ({0})", value);
                 case 168:
@@ -1213,8 +1213,9 @@
                 case 280:
                     return Spell.FormatPercent("Pet Chance to Flurry", value);
                 case 286:
-                    // bonus is added after focus and crit multipliers. for DoTs it adds base1/ticks to each tick.
-                    return Spell.FormatCount("Spell Damage Bonus", value);
+                    // is added after all other multipliers (focus, crit, etc..)
+                    // for DoTs it adds base1/ticks to each tick.
+                    return Spell.FormatCount("Spell Damage Bonus", base1);
                 case 287:
                     return String.Format("Increase Duration by {0}s", base1 * 6);
                 case 289:
@@ -1223,10 +1224,10 @@
                 case 291:
                     return String.Format("Dispel Detrimental ({0})", value);
                 case 294:
-                    if (value > 0 && base2 > 100)
-                        return Spell.FormatPercent("Chance to Critical Nuke", value) + " and " + Spell.FormatPercent("Critical Nuke Damage", base2 - 100);
-                    else if (value > 0)
-                        return Spell.FormatPercent("Chance to Critical Nuke", value);
+                    if (base1 > 0 && base2 > 100)
+                        return Spell.FormatPercent("Chance to Critical Nuke", base1) + " and " + Spell.FormatPercent("Critical Nuke Damage", base2 - 100);
+                    else if (base1 > 0)
+                        return Spell.FormatPercent("Chance to Critical Nuke", base1);
                     else
                         return Spell.FormatPercent("Critical Nuke Damage", base2 - 100);
                 case 296:
@@ -1241,11 +1242,12 @@
                     return "Doppelganger";
                 case 302:
                     // see also 124. only used on 2 AA
-                    return Spell.FormatPercent("Spell Damage", value);
+                    return Spell.FormatPercent("Spell Damage", base1);
                 case 303:
                     // used on type 3 augments
-                    // is added before crit multipliers. for DoTs it adds base1/ticks to each tick.
-                    return Spell.FormatCount("Spell Damage", value);
+                    // is added before crit multipliers, but after SPA 296 and 302 (and maybe 124).
+                    // for DoTs it adds base1/ticks to each tick.
+                    return Spell.FormatCount("Spell Damage", base1);
                 case 305:
                     return Spell.FormatCount("Damage Shield Taken", -Math.Abs(value));
                 case 306:
@@ -1930,6 +1932,13 @@

                 spell.SlotEffects[i] = spa;
                 spell.Slots[i] = spell.ParseSlot(spa, base1, base2, max, calc, MaxLevel);
+
+                // debug stuff: detect difference in value/base1 for spells where i'm not sure which one should be used and have chosen one arbitrarily
+                //int[] uses_value = new int[] {0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 15, 21, 24, 35, 36, 46, 47, 48, 49, 50, 55, 58, 59, 69, 79, 92, 97, 100, 111, 116, 158, 159, 164, 165, 166, 169, 184, 189, 190, 192, 262, 334, 417};
+                //int[] uses_base1 = new int[] { 32, 64, 109, 148, 149, 193, 254, 323, 360, 374, 414 };
+                //int value = Spell.CalcValue(calc, base1, max, 0, 90);
+                //if (value != base1 && Array.IndexOf(uses_value, spa) < 0 && Array.IndexOf(uses_base1, spa) < 0)
+                //    Console.Error.WriteLine(String.Format("SPA {1} {0} has diff value/base1: {2}/{3} calc: {4}", spell.Name, spa, value, base1, calc));
             }

             // debug stuff


Trim whitespace and newlines after {wc} & {c} tags #115

--- Assets/Fungus/Narrative/Scripts/DialogParser.cs
+++ Assets/Fungus/Narrative/Scripts/DialogParser.cs
@@ -76,6 +76,29 @@
 					AddWordsToken(tokens, postText);
 				}
 			}
+
+			// Remove all leading whitespace & newlines after a {c} or {wc} tag
+			// These characters are usually added for legibility when editing, but are not
+			// desireable when viewing the text in game.
+			bool trimLeading = false;
+			foreach (Token token in tokens)
+			{
+				if (trimLeading &&
+				    token.type == TokenType.Words)
+				{
+					token.param.TrimStart(' ', '\t', '\r', '\n');
+				}
+
+				if (token.type == TokenType.Clear ||
+				    token.type == TokenType.WaitForInputAndClear)
+				{
+					trimLeading = true;
+				}
+				else
+				{
+					trimLeading = false;
+				}
+			}
 		}

 		protected static void AddWordsToken(List<Token> tokenList, string words)


Removed flowchart min/max buttons and undid reflection null checks

-Removed redundant min/max buttons in flowchart toolbar
-Undid null checks from previous commit in favor of knowing about
problems versus potential dead code

--- Assets/Fungus/Scripts/Editor/FlowchartWindow.cs
+++ Assets/Fungus/Scripts/Editor/FlowchartWindow.cs
@@ -95,24 +95,16 @@
             // The docked value doesn't always report correctly without the delayCall
             EditorApplication.delayCall += () => {
                 var flags = BindingFlags.Public | BindingFlags.NonPublic | BindingFlags.Instance;
-                var dockedProperty = typeof(EditorWindow).GetProperty("docked", flags);
-
-                if (dockedProperty != null)
-                {
-                    var isDockedMethod = dockedProperty.GetGetMethod(true);
-                    if (isDockedMethod != null)
-                    {
-                        if ((bool) isDockedMethod.Invoke(this, null))
-                        {
-                            EditorZoomArea.Offset = new Vector2(2.0f, 19.0f);
-                        }
-                        else
-                        {
-                            EditorZoomArea.Offset = new Vector2(0.0f, 22.0f);
-                        }
-                    }
-                }
-            };
+                var isDockedMethod = typeof(EditorWindow).GetProperty("docked", flags).GetGetMethod(true);
+                if ((bool) isDockedMethod.Invoke(this, null))
+                {
+                    EditorZoomArea.Offset = new Vector2(2.0f, 19.0f);
+                }
+                else
+                {
+                    EditorZoomArea.Offset = new Vector2(0.0f, 22.0f);
+                }
+            };
         }

         public static Flowchart GetFlowchart()
@@ -204,15 +196,6 @@
                 flowchart.Zoom, minZoomValue, maxZoomValue, GUILayout.MinWidth(40), GUILayout.MaxWidth(100)
             );
             GUILayout.Label(flowchart.Zoom.ToString("0.0#x"), EditorStyles.miniLabel, GUILayout.Width(30));
-
-            if (GUILayout.Button("Min", EditorStyles.toolbarButton))
-            {
-                newZoom = minZoomValue;
-            }
-            if (GUILayout.Button("Max", EditorStyles.toolbarButton))
-            {
-                newZoom = maxZoomValue;
-            }

             DoZoom(flowchart, newZoom - flowchart.Zoom, Vector2.one * 0.5f);


billboard tweaks

billboard tweaks

--- Assets/Scripts/Brendan/CameraFacingBillboard.cs
+++ Assets/Scripts/Brendan/CameraFacingBillboard.cs
@@ -1,26 +1,14 @@
 // http://wiki.unity3d.com/index.php?title=CameraFacingBillboard

-/*using UnityEngine;
-using System.Collections;
-
-public class CameraFacingBillboard : MonoBehaviour
-{
-	public Camera m_Camera;
-
-	void Update()
-	{
-		transform.LookAt(transform.position + m_Camera.transform.rotation * Vector3.back,
-		                 m_Camera.transform.rotation * Vector3.up);
-	}
-}*/
-
-//cameraFacingBillboard.cs v02
+//cameraFacingBillboard.cs v03
 //by Neil Carter (NCarter)
 //modified by Juan Castaneda (juanelo)
+//modified by Brendan Matkin
 //
 //added in-between GRP object to perform rotations on
 //added auto-find main camera
 //added un-initialized state, where script will do nothing
+//BM - added color tinting
 using UnityEngine;
 using System.Collections;

@@ -30,7 +18,10 @@

 	public Camera m_Camera;
 	public bool amActive =false;
-	public bool autoInit =false;
+	public bool autoInit =true;
+	//public bool _32bitColor = true;
+	//public Color32 tintColor = new Color32(127,0,255,255);
+	//public Color tintColor = new Color(0.0F,0.5F,1.0F,1.0F);
 	GameObject myContainer;

 	void Awake(){
@@ -38,11 +29,16 @@
 			m_Camera = Camera.main;
 			amActive = true;
 		}
+		// switch to 32 bit color necessary for analog input??
+		//if (_32bitColor == false) {
+		//	tintColor = new Color(0.5F,0.0F,1.0F,1.0F);
+		//}

 		myContainer = new GameObject();
 		myContainer.name = "GRP_"+transform.gameObject.name;
 		myContainer.transform.position = transform.position;
 		transform.parent = myContainer.transform;
+		//transform.renderer.material.color = tintColor;
 	}


IHttpSessionContext implemented and done

--- NJetty.Servlet_3_0.Spec/Http/IHttpSessionContext.cs
+++ NJetty.Servlet_3_0.Spec/Http/IHttpSessionContext.cs
@@ -21,20 +21,51 @@
 using System.Collections.Generic;
 using System.Linq;
 using System.Text;
+using System.Collections;

 namespace Javax.NServlet.Http
 {

     ///
-    /// TODO: Class/Interface Information here
+    /// Obsolete As of Java(tm) Servlet API 2.1 for security reasons,
+    /// with no replacement. This interface will be removed in a future
+    /// version of this API.
     ///
     /// <author>
     ///     Leopoldo Lee Agdeppa III
     /// </author>
     /// <date>
-    /// TODO: date here
+    /// April 28, 2009
     /// </date>
+    [Obsolete("As of Java(tm) Servlet API 2.1 for security reasons, with no replacement. This interface will be removed in a future version of this API.")]
     public interface IHttpSessionContext
     {
+
+
+
+        ///
+        /// Obsolete As of Java Servlet API 2.1 with
+        /// no replacement. This method must
+        /// return null and will be removed in
+        /// a future version of this API.
+        ///
+        /// <param name="sessionId"></param>
+        /// <returns></returns>
+        [Obsolete("As of Java Servlet API 2.1 with no replacement. This method must return null and will be removed in a future version of this API.")]
+        IHttpSession GetSession(String sessionId);
+
+
+
+
+        ///
+        /// Obsolete as of Java Servlet API 2.1 with no replacement.
+        /// This method must return an empty List and will be removed
+        /// in a future version of this API.
+        ///
+        [Obsolete("As of Java Servlet API 2.1 with no replacement. This method must return an empty List and will be removed in a future version of this API.")]
+        IList Ids
+        {
+            get;
+        }
     }
 }


Add SUTA login link

Add SUTA login link

For #680

--- Battery-Commander.Web/Views/SUTA/Details.cshtml
+++ Battery-Commander.Web/Views/SUTA/Details.cshtml
@@ -1,4 +1,9 @@
 @model SUTA
+
+@if(!User.Identity.IsAuthenticated)
+{
+    Click to Login
+}

 @Html.ActionLink("Edit Request", "Edit", "SUTA", new { Model.Id })


Delete ConsentScreenControl.cs

Delete ConsentScreenControl.cs

--- Belka/GoogleCloudPlugin/ConsentScreenControl.cs
+++ Belka/GoogleCloudPlugin/ConsentScreenControl.cs
@@ -1,160 +0,0 @@
-namespace BelkaCloudDownloader.Gui
-{
-    using System;
-    using System.Threading;
-    using System.Threading.Tasks;
-    using System.Windows.Forms;
-    using global::Google.Apis.Auth.OAuth2.Responses;
-    using Timer = System.Timers.Timer;
-
-    /// <summary>
-    /// Provides a button to open OAuth 2.0 consent screen in browser and a text box with Refresh Token received
-    /// with user consent.
-    /// </summary>
-    public sealed partial class ConsentScreenControl : UserControl
-    {
-        /// <summary>
-        /// Text that is shown on button when control is ready to begin authentication.
-        /// </summary>
-        private const string ReadyText = "Authenticate using browser consent screen (or stored authentication info)";
-
-        /// <summary>
-        /// Text that is shown on button when user is already authenticated and Refresh Token is ready.
-        /// </summary>
-        private const string DoneText = "Done!";
-
-        /// <summary>
-        /// Text that is shown on button when user denied consent.
-        /// </summary>
-        private const string AccessDeniedText = "Access denied by user";
-
-        /// <summary>
-        /// Text that is shown on button when user interacts with a browser.
-        /// </summary>
-        private const string CancelText = "Cancel";
-
-        /// <summary>
-        /// Method that actually opens required consent screen. Protocol-specific.
-        /// </summary>
-        private readonly Func<CancellationToken, Task<string>> openConsentScreenDelegate;
-
-        /// <summary>
-        /// Timer that is used to revert button to the Ready state after showing the error.
-        /// </summary>
-        private readonly Timer cooldownTimer = new Timer(2000);
-
-        /// <summary>
-        /// Cancellation token source that is used to abort authentication.
-        /// </summary>
-        private CancellationTokenSource cancellationTokenSource;
-
-        /// <summary>
-        /// Current state of a control - ready to begin authentication, authenticating, done authentication.
-        /// </summary>
-        private State state = State.Ready;
-
-        /// <summary>
-        /// Initializes a new instance of the <see cref="ConsentScreenControl"/> class.
-        /// </summary>
-        /// <param name="openConsentScreenDelegate">A function that asynchronously opens consent screen in browser.
-        /// It allows different protocols reuse this control to open their (possibly, different) consent screens.</param>
-        public ConsentScreenControl(Func<CancellationToken, Task<string>> openConsentScreenDelegate)
-        {
-            this.InitializeComponent();
-
-            this.openConsentScreenDelegate = openConsentScreenDelegate;
-            this.cooldownTimer.Elapsed += (timerSender, timerArgs) =>
-            {
-                this.state = State.Ready;
-                if (this.openConsentScreenButton.InvokeRequired)
-                {
-                    this.openConsentScreenButton.Invoke(
-                        new Action<string>(s => this.openConsentScreenButton.Text = s),
-                        ConsentScreenControl.ReadyText);
-                }
-                else
-                {
-                    this.openConsentScreenButton.Text = ConsentScreenControl.ReadyText;
-                }
-
-                this.cooldownTimer.Stop();
-            };
-        }
-
-        /// <summary>
-        /// State of the consent screen control - not opened, opened, got consent.
-        /// </summary>
-        private enum State
-        {
-            /// <summary>
-            /// Consent screen was not opened, so this control awaits user input.
-            /// </summary>
-            Ready,
-
-            /// <summary>
-            /// User is supposedly interacting with the browser now.
-            /// </summary>
-            Authenticating,
-
-            /// <summary>
-            /// Got user consent and received Refresh Token.
-            /// </summary>
-            Done
-        }
-
-        /// <summary>
-        /// Gets Refresh Token received with user consent.
-        /// </summary>
-        public string RefreshToken { get; private set; }
-
-        /// <summary>
-        /// Handler for a click on "Open consent screen" button, asynchronously launches browser.
-        /// </summary>
-        /// <param name="sender">Object who sent an event.</param>
-        /// <param name="e">Event arguments (ignored here).</param>
-        private async void OnOpenConsentScreenButtonClick(object sender, EventArgs e)
-        {
-            switch (this.state)
-            {
-                case State.Ready:
-                    this.refreshTokenBox.Text = string.Empty;
-                    this.cancellationTokenSource = new CancellationTokenSource();
-                    try
-                    {
-                        var task = this.openConsentScreenDelegate(this.cancellationTokenSource.Token);
-                        this.state = State.Authenticating;
-                        this.openConsentScreenButton.Text = ConsentScreenControl.CancelText;
-                        this.RefreshToken = await task;
-                        /* TODO: Due to known bug in Google API (https://github.com/google/google-api-dotnet-client/issues/508) cancellation will not work
-                          if user closes browser page. For now authentication task will become zombie, in future we shall find a workaround for this
-                          (maybe implement our own OAuth consent mechanism). */
-                        this.state = State.Done;
-                        this.openConsentScreenButton.Text = ConsentScreenControl.DoneText;
-                        this.openConsentScreenButton.Enabled = false;
-                        this.refreshTokenBox.Text = this.RefreshToken;
-                    }
-                    catch (TokenResponseException ex)
-                    {
-                        if (ex.Error.Error == "access_denied")
-                        {
-                            this.openConsentScreenButton.Text = ConsentScreenControl.AccessDeniedText;
-                            this.cooldownTimer.Start();
-                        }
-                        else
-                        {
-                            throw;
-                        }
-                    }
-
-                    break;
-                case State.Authenticating:
-                    this.cancellationTokenSource.Cancel();
-                    this.state = State.Ready;
-                    this.openConsentScreenButton.Text = ConsentScreenControl.ReadyText;
-                    break;
-                case State.Done:
-                    break;
-            }
-        }
-    }
-}


Fixed a wide ray test bug for convex hulls, though the batched ray codepath should probably be removed.

--- BepuPhysics/CollisionDetection/WideRayTester.cs
+++ BepuPhysics/CollisionDetection/WideRayTester.cs
@@ -1,6 +1,7 @@
 using BepuPhysics.Collidables;
 using BepuPhysics.Trees;
 using BepuUtilities;
+using BepuUtilities.Memory;
 using System.Diagnostics;
 using System.Numerics;
 using System.Runtime.CompilerServices;
@@ -20,8 +21,12 @@
         {
             RayWide rayWide;
             TShapeWide wide;
-            //TODO: Pointer initialization skip hack. Replace with Unsafe.SkipInit?
-            (*&wide).Broadcast(shape);
+            if ((*&wide).InternalAllocationSize > 0)
+            {
+                var memory = stackalloc byte[wide.InternalAllocationSize];
+                wide.Initialize(new RawBuffer(memory, wide.InternalAllocationSize));
+            }
+            wide.Broadcast(shape);
             RigidPoses poses;
             Vector3Wide.Broadcast(pose.Position, out poses.Position);
             QuaternionWide.Broadcast(pose.Orientation, out poses.Orientation);


removed unused namespace

removed unused namespace

--- BuildingCoder/BuildingCoder/CmdCloseDocument.cs
+++ BuildingCoder/BuildingCoder/CmdCloseDocument.cs
@@ -13,7 +13,6 @@
 using System;
 using System.Threading;
 using System.Windows.Forms;
-using Autodesk.Revit.ApplicationServices;
 using Autodesk.Revit.Attributes;
 using Autodesk.Revit.DB;
 using Autodesk.Revit.UI;


Before adding a new element to the Hastable, check that it doesn't already exists.

git-svn-id: 6c68d65edd5507bf6b37474e0d155329cbeeff2a@439677 13f79535-47bb-0310-9956-ffa450edef68

--- C#/src/Lucene.Net/Search/Spans/SpanTermQuery.cs
+++ C#/src/Lucene.Net/Search/Spans/SpanTermQuery.cs
@@ -149,7 +149,10 @@

         public override void  ExtractTerms(System.Collections.Hashtable terms)
         {
-            terms.Add(term, term);
+            if (terms.Contains(term) == false)
+            {
+                terms.Add(term, term);
+            }
         }

 		public override System.String ToString(System.String field)


Make decimal serialization in Gremlin.Net culture independent CTR

This led tests fail on my system and probably leads to broken
serialization of gx:BigDecimal on systems with ',' as the decimal
separator.

--- gremlin-dotnet/src/Gremlin.Net/Structure/IO/GraphSON/NumberConverter.cs
+++ gremlin-dotnet/src/Gremlin.Net/Structure/IO/GraphSON/NumberConverter.cs
@@ -23,6 +23,7 @@

 using System;
 using System.Collections.Generic;
+using System.Globalization;
 using Newtonsoft.Json.Linq;

 namespace Gremlin.Net.Structure.IO.GraphSON
@@ -44,7 +45,7 @@
             object value = objectData;
             if (StringifyValue)
             {
-                value = value?.ToString();
+                value = string.Format(CultureInfo.InvariantCulture, "{0}", value);
             }
             return GraphSONUtil.ToTypedValue(GraphSONTypeName, value, Prefix);
         }


Fuuuun with lines.

Fuuuun with lines.


That was too long

That was too long

--- sample/DokanNetMirror/Mirror.cs
+++ sample/DokanNetMirror/Mirror.cs
@@ -254,32 +254,35 @@

         public DokanResult FindFiles(string fileName, out IList<FileInformation> files, DokanFileInfo info)
         {
-            files = new DirectoryInfo(GetPath(fileName)).GetFileSystemInfos().Select(finfo => new FileInformation
-                                                                                {
-                                                                                Attributes =
-                                                                                finfo.
-                                                                                Attributes,
-                                                                                CreationTime =
-                                                                                finfo.
-                                                                                CreationTime,
-                                                                                LastAccessTime =
-                                                                                finfo.
-                                                                                LastAccessTime,
-                                                                                LastWriteTime =
-                                                                                finfo.
-                                                                                LastWriteTime,
-                                                                                Length =
-                                                                                (finfo is
-                                                                                FileInfo)
-                                                                                ? ((
-                                                                                FileInfo
-                                                                                ) finfo
-                                                                                ).
-                                                                                Length
-                                                                                : 0,
-                                                                                FileName =
-                                                                                finfo.Name,
-                                                                                }).ToArray();
+            files = new DirectoryInfo(GetPath(fileName))
+                .GetFileSystemInfos()
+                .Select(finfo => new FileInformation
+                {
+                    Attributes =
+                        finfo.
+                        Attributes,
+                    CreationTime =
+                        finfo.
+                        CreationTime,
+                    LastAccessTime =
+                        finfo.
+                        LastAccessTime,
+                    LastWriteTime =
+                        finfo.
+                        LastWriteTime,
+                    Length =
+                        (finfo is
+                         FileInfo)
+                            ? ((
+                               FileInfo
+                               )finfo
+                              ).
+                                  Length
+                            : 0,
+                    FileName =
+                        finfo.Name,
+                }).ToArray();
+
             return DokanResult.Success;
         }


No longer inject id this way

No longer inject id this way

--- query/src/ReamQuery/Services/QueryService.cs
+++ query/src/ReamQuery/Services/QueryService.cs
@@ -87,8 +87,7 @@
             var src = _template
                 .Replace("##NS##", assmName)
                 .Replace("##DB##", "Proxy")
-                .Replace("##SCHEMA##", schemaSrc)
-                .Replace("##QUERYID##", Guid.NewGuid().ToString());
+                .Replace("##SCHEMA##", schemaSrc);

             var srcLineOffset = -1;
             var lines = src.Split(new string[] { "\r\n", "\n" }, StringSplitOptions.None);


add discord.net logger

add discord.net logger

--- Streams/Bot.cs
+++ Streams/Bot.cs
@@ -39,6 +39,7 @@
             client.Connected += Client_Connected;
             client.MessageReceived += Client_MessageReceived;
             client.GuildAvailable += Client_GuildAvailable;
+            client.Log += msg => Task.Run(() => Console.WriteLine($"Discord.Net log: {msg}"));

             Console.WriteLine("Connecting...");
             await client.LoginAsync(TokenType.Bot, token, true);


Update FirstLevel.cs

Update FirstLevel.cs

--- OOPTeamwork/OOPTeamwork/Models/Levels/FirstLevel.cs
+++ OOPTeamwork/OOPTeamwork/Models/Levels/FirstLevel.cs
@@ -68,6 +68,9 @@
                 }

                 Console.WriteLine($"Player { winningPlayer } wins!");
+
+                Result.PlayerWin(winningPlayer);
+
             }
             else if (this.flag == -1)
             {


Small fix of build failure

Small fix of build failure

--- Objectivity.Test.Automation.Common/DriverContext.cs
+++ Objectivity.Test.Automation.Common/DriverContext.cs
@@ -497,7 +497,8 @@
         /// </summary>
         public void Stop()
         {
-            if (this.driver != null) {
+            if (this.driver != null)
+            {
                 this.driver.Quit();
             }
         }


SQL: Fix null ref

SQL: Fix null ref

--- Opserver/Views/SQL/Servers.AvailabilityGroup.cshtml
+++ Opserver/Views/SQL/Servers.AvailabilityGroup.cshtml
@@ -13,7 +13,7 @@
     {
         var unhealthy = r.Databases.Where(db => db.SynchronizationHealth.HasValue && db.SynchronizationHealth != SynchronizationHealths.Healthy).ToList();
         var replica = Model.Node?.Cluster?.GetNode(r.ReplicaServerName);
-        var remoteAgData = replica?.AvailabilityGroups.SafeData(true).First(g => g.Name == Model.Name);
+        var remoteAgData = replica?.AvailabilityGroups.SafeData(true).FirstOrDefault(g => g.Name == Model.Name);
         var remoteDBs = remoteAgData?.LocalReplica?.Databases?.ToDictionary(db => db.DatabaseName) ?? new Dictionary<string, SQLNode.AGDatabaseReplica>();
         if (r.Databases.Count > unhealthy.Count)
         {


Property made public

Property made public

--- PART/Source/Core/Data/DataProviders/DataProvider.cs
+++ PART/Source/Core/Data/DataProviders/DataProvider.cs
@@ -61,7 +61,7 @@
     {
         public static RijndaelManaged EncryptionAlgorithm;

-        private readonly List<AttributeType> Properties = new List<AttributeType>();
+        public readonly List<AttributeType> Properties = new List<AttributeType>();

         partial void OnLoaded()
         {


Comments in AbstractWorkflow.cs

Comments in AbstractWorkflow.cs

--- Cornelius/Criteria/Workflow/AbstractWorkflow.cs
+++ Cornelius/Criteria/Workflow/AbstractWorkflow.cs
@@ -99,9 +99,10 @@
         /// </summary>
         /// <param name="student">A hallgató</param>
         /// <param name="original">Igaz, ha az eredeti képzéskódját akarjuk a hallgatónak nézni, hamis, ha a jelenlegit.</param>
-        /// <returns></returns>
+        /// <returns>Igaz, ha a hallgatóra az adott kritériumrendszer vonatkozik.</returns>
         public bool Match(Student student, bool original = false)
         {
+            // TODO frissíteni a régi és az új képzés kezeléséhez (vagy nem? ha külön futtatjuk, OK?)
             return (original ? student.OriginalEducationProgram : student.EducationProgram) == this.EducationProgram && Semester.InInterval(student.EffectiveSemester, this.From, this.To);
         }


added a remark comment

added a remark comment

--- Domain/Scheduling/ISpecifySchedulingBehavior.cs
+++ Domain/Scheduling/ISpecifySchedulingBehavior.cs
@@ -5,7 +5,8 @@
 {
     /// <summary>
     ///     Defines rules for how scheduling of the command should be handled.
-    /// </summary>
+    /// </summary>
+    /// <remarks>This interface should be implemented by commands that have non-default scheduling requirements.</remarks>
     public interface ISpecifySchedulingBehavior
     {
         /// <summary>


Toメソッドを削除

Toメソッドを削除

--- DotNetUtility/DotNetUtility/ObjectExtensions.cs
+++ DotNetUtility/DotNetUtility/ObjectExtensions.cs
@@ -63,25 +63,5 @@
         {
             return value;
         }
-
-        /// <summary>
-        /// T に変換する
-        /// 変換ができない場合、T のデフォルト値を返す
-        /// </summary>
-        /// <typeparam name="T"></typeparam>
-        /// <param name="value">変換前値</param>
-        public static T To<T>(this IConvertible value)
-            where T : struct
-        {
-            try
-            {
-                return (T)Convert.ChangeType(value, typeof(T));
-            }
-            catch
-            {
-                // TODO : catchしてそのままデフォルトを返すのは検討
-                return default(T);
-            }
-        }
     }
 }


Adjust wordings

Adjust wordings

--- Duplicati.Library.Backend.Tardigrade/Strings.cs
+++ Duplicati.Library.Backend.Tardigrade/Strings.cs
@@ -13,11 +13,11 @@
         public static string Description { get { return LC.L(@"This backend can read and write data to the Tardigrade Decentralized Cloud Storage."); } }
         public static string TardigradeSatelliteDescriptionShort { get { return LC.L(@"The satellite"); } }
         public static string TardigradeSatelliteDescriptionLong { get { return LC.L(@"The satellite that keeps track of all metadata. Use a Tardigrade-grade server for high-performance SLA-backed connectivity or use a community server. Or even host your own."); } }
-        public static string TardigradeAPIKeyDescriptionShort { get { return LC.L(@"The API-key"); } }
-        public static string TardigradeAPIKeyDescriptionLong { get { return LC.L(@"The API-key grants access to a specific project on your chosen satellite. Head over to the dashboard of your satellite to create one if you do not already have an API-key."); } }
-        public static string TardigradeSecretDescriptionShort { get { return LC.L(@"The secret"); } }
-        public static string TardigradeSecretDescriptionLong { get { return LC.L(@"The secret is used to encrypt your data before sending it to the tardigrade network. This secret can be the only secret to provide - for Tardigrade you do not necessary need any additional encryption (from Duplicati) in place."); } }
-        public static string TardigradeSharedAccessDescriptionShort { get { return LC.L(@"The shared access"); } }
-        public static string TardigradeSharedAccessDescriptionLong { get { return LC.L(@"A shared access contains all information in one encrypted string. You may use it instead of a satellite, API-key and secret."); } }
+        public static string TardigradeAPIKeyDescriptionShort { get { return LC.L(@"The API key"); } }
+        public static string TardigradeAPIKeyDescriptionLong { get { return LC.L(@"The API key grants access to a specific project on your chosen satellite. Head over to the dashboard of your satellite to create one if you do not already have an API key."); } }
+        public static string TardigradeSecretDescriptionShort { get { return LC.L(@"The encryption passphrase"); } }
+        public static string TardigradeSecretDescriptionLong { get { return LC.L(@"The encryption passphrase is used to encrypt your data before sending it to the tardigrade network. This passphrase can be the only secret to provide - for Tardigrade you do not necessary need any additional encryption (from Duplicati) in place."); } }
+        public static string TardigradeSharedAccessDescriptionShort { get { return LC.L(@"The access grant"); } }
+        public static string TardigradeSharedAccessDescriptionLong { get { return LC.L(@"An access grant contains all information in one encrypted string. You may use it instead of a satellite, API key and secret."); } }
     }
 }


When disabling a note, disable entire window, and save focus widget

Now the toolbar and other widgets are disabled, and you don't lose your
cursor after a sync.

--- Tomboy/Note.cs
+++ Tomboy/Note.cs
@@ -1086,13 +1086,19 @@
 			}
 		}

+		private Gtk.Widget focusWidget;
 		public bool Enabled
 		{
 			get { return enabled; }
 			set {
 				enabled = value;
-				if (window != null)
-					window.Editor.Sensitive = enabled;
+				if (window != null) {
+					if (!enabled)
+						focusWidget = window.Focus;
+					window.Sensitive = enabled;
+					if (enabled)
+						window.Focus = focusWidget;
+				}
 			}
 		}


More small changes to FlotsamAssetCache as per mcortez' request.

--- OpenSim/Region/CoreModules/Asset/FlotsamAssetCache.cs
+++ OpenSim/Region/CoreModules/Asset/FlotsamAssetCache.cs
@@ -142,7 +142,7 @@
                     m_CacheDirectory = assetConfig.GetString("CacheDirectory", m_DefaultCacheDirectory);
                     m_log.InfoFormat("[FLOTSAM ASSET CACHE]: Cache Directory", m_DefaultCacheDirectory);

-                    m_MemoryCacheEnabled = assetConfig.GetBoolean("MemoryCacheEnabled", true);
+                    m_MemoryCacheEnabled = assetConfig.GetBoolean("MemoryCacheEnabled", false);
                     m_MemoryExpiration = TimeSpan.FromHours(assetConfig.GetDouble("MemoryCacheTimeout", m_DefaultMemoryExpiration));

 #if WAIT_ON_INPROGRESS_REQUESTS
@@ -150,7 +150,7 @@
 #endif

                     m_LogLevel = assetConfig.GetInt("LogLevel", 1);
-                    m_HitRateDisplay = (ulong)assetConfig.GetInt("HitRateDisplay", 1);
+                    m_HitRateDisplay = (ulong)assetConfig.GetInt("HitRateDisplay", 1000);

                     m_FileExpiration = TimeSpan.FromHours(assetConfig.GetDouble("FileCacheTimeout", m_DefaultFileExpiration));
                     m_FileExpirationCleanupTimer = TimeSpan.FromHours(assetConfig.GetDouble("FileCleanupTimer", m_DefaultFileExpiration));


Fix antiforgerytoken validation missing a claim.