Render methods now deal with a single object instead of a dictionary, so they look up properties on said object instead of checking the dictionary.

--- template/minge/codegen.cs
+++ template/minge/codegen.cs
@@ -103,7 +103,12 @@
 			worker.Emit (OpCodes.Ldarg_2);
 			worker.Emit (OpCodes.Callvirt, app.CommonMethods.GetTypeMethod);
 			worker.Emit (OpCodes.Ldstr, Name.Name);
+
+			worker.Emit (OpCodes.Ldc_I4, (int) (System.Reflection.BindingFlags.IgnoreCase |
+					System.Reflection.BindingFlags.Instance |
+				        System.Reflection.BindingFlags.Public));
 			worker.Emit (OpCodes.Callvirt, app.CommonMethods.GetPropertyMethod);
+
 			worker.Emit (OpCodes.Ldarg_2);
 			worker.Emit (OpCodes.Ldnull);
 			worker.Emit (OpCodes.Callvirt, app.CommonMethods.GetPropertyValueMethod);
@@ -243,6 +248,7 @@

 			worker.Emit (OpCodes.Callvirt, app.CommonMethods.GetTypeMethod);
 			worker.Emit (OpCodes.Ldstr, Property);
+			worker.Emit (OpCodes.Ldc_I4, (int) System.Reflection.BindingFlags.IgnoreCase);
 			worker.Emit (OpCodes.Callvirt, app.CommonMethods.GetPropertyMethod);
 			Target.Emit (app, page, worker);
 			worker.Emit (OpCodes.Ldnull);
@@ -388,9 +394,9 @@

 	public class Application {

-		public Application (MingeContext context, string name, string path)
-		{
-			Context = context;
+		public Application (MingeCompiler compiler, string name, string path)
+		{
+			Compiler = compiler;
 			Name = name;
 			Path = path;

@@ -408,7 +414,7 @@
 			private set;
 		}

-		public MingeContext Context {
+		public MingeCompiler Compiler {
 			get;
 			private set;
 		}
@@ -444,18 +450,11 @@
 		public Page LoadPage (string path)
 		{
 			string ns;
-			Console.WriteLine ("loading page:   {0}", path);
 			string name = Page.NameForPath (path, out ns);

 			TypeDefinition def = Assembly.MainModule.Types [String.Concat (ns, ".", name)];

-			// if (def != null)
-			//	return def;
-
-			Page page = Context.ParsePage (path);
-			// MingeParser parser = new MingeParser (Environment, this);
-			// Page page = parser.ParsePage (path, new StreamReader (File.OpenRead (path)));
-
+			Page page = Compiler.ParsePage (path);
 			return page;
 		}

@@ -475,13 +474,20 @@
 			EnumeratorGetCurrentMethod = assembly.MainModule.Import (typeof (System.Collections.IEnumerator).GetMethod ("get_Current"));

 			GetTypeMethod = assembly.MainModule.Import (typeof (object).GetMethod ("GetType"));
-			GetPropertyMethod = assembly.MainModule.Import (typeof (Type).GetMethod ("GetProperty", new Type [] { typeof (string) }));
+			GetPropertyMethod = assembly.MainModule.Import (typeof (Type).GetMethod ("GetProperty", new Type [] { typeof (string), typeof (System.Reflection.BindingFlags) }));
 			GetPropertyValueMethod = assembly.MainModule.Import (typeof (System.Reflection.PropertyInfo).GetMethod ("GetValue", new Type [] { typeof (object), typeof (object []) }));

 			IsNullOrEmptyMethod = assembly.MainModule.Import (typeof (string).GetMethod ("IsNullOrEmpty"));
 			StringEmptyField = assembly.MainModule.Import (typeof (string).GetField ("Empty"));
-		}
-
+
+			ConsoleWriteLineMethod = assembly.MainModule.Import (typeof (Console).GetMethod ("WriteLine", new Type [] { typeof (object) }));
+		}
+
+		public MethodReference ConsoleWriteLineMethod {
+			get;
+			private set;
+		}
+
 		public MethodReference GetArgMethod {
 			get;
 			private set;
@@ -1086,7 +1092,6 @@
 			string [] pieces = path.Split (System.IO.Path.DirectorySeparatorChar);
 			StringBuilder ns = new StringBuilder ("templates");

-			Console.WriteLine ("full path:  {2} last piece:  {0}   number of pieces: {1}", pieces [pieces.Length - 1], pieces.Length, path);
 			string name = String.Concat ("page_", System.IO.Path.GetFileNameWithoutExtension (pieces [pieces.Length - 1]));
 			for (int i = 0; i < pieces.Length - 1; i++) {
 				ns.Append (".");
@@ -1094,7 +1099,6 @@
 			}

 			name_space = ns.ToString ();
-			Console.WriteLine ("namespace:  '{0}'   name: '{1}'", ns, name);
 			return name;
 		}

@@ -1108,5 +1112,3 @@
 	}
 }

-
-


Fixing the url encode issue.

Fixing the url encode issue.

--- eFormCore/Communication/Http.cs
+++ eFormCore/Communication/Http.cs
@@ -484,7 +484,7 @@
         {
             JObject contentToServer = JObject.FromObject(new { name });
             WebRequest request = WebRequest.Create(
-                $"{newAddressBasic}/Site?token={token}&name={name}&languageCode={languageCode}&sdkVersion={dllVersion}");
+                $"{newAddressBasic}/Site?token={token}&name={Uri.EscapeDataString(name)}&languageCode={languageCode}&sdkVersion={dllVersion}");
             request.Method = "POST";
             byte[] content = Encoding.UTF8.GetBytes(contentToServer.ToString());
             request.ContentType = "application/json; charset=utf-8";
@@ -506,7 +506,7 @@
         {
             JObject contentToServer = JObject.FromObject(new { name });
             WebRequest request = WebRequest.Create(
-                $"{newAddressBasic}/Site/{id}?token={token}&name={name}&languageCode={languageCode}&sdkVersion={dllVersion}");
+                $"{newAddressBasic}/Site/{id}?token={token}&name={Uri.EscapeDataString(name)}&languageCode={languageCode}&sdkVersion={dllVersion}");
             request.Method = "PUT";
             byte[] content = Encoding.UTF8.GetBytes(contentToServer.ToString());
             request.ContentType = "application/json; charset=utf-8";
@@ -563,7 +563,7 @@
         {
             JObject contentToServer = JObject.FromObject(new { first_name = firstName, last_name = lastName, email });
             WebRequest request = WebRequest.Create(
-                $"{newAddressBasic}/User?token={token}&firstName={firstName}&lastName={lastName}&email={email}&sdkVersion={dllVersion}");
+                $"{newAddressBasic}/User?token={token}&firstName={Uri.EscapeDataString(firstName)}&lastName={Uri.EscapeDataString(lastName)}&email={email}&sdkVersion={dllVersion}");
             request.Method = "POST";
             byte[] content = Encoding.UTF8.GetBytes(contentToServer.ToString());
             request.ContentType = "application/json; charset=utf-8";
@@ -585,7 +585,7 @@
         {
             JObject contentToServer = JObject.FromObject(new { first_name = firstName, last_name = lastName, email });
             WebRequest request = WebRequest.Create(
-                $"{newAddressBasic}/User/{id}?token={token}&firstName={firstName}&lastName={lastName}&email={email}&sdkVersion={dllVersion}");
+                $"{newAddressBasic}/User/{id}?token={token}&firstName={Uri.EscapeDataString(firstName)}&lastName={Uri.EscapeDataString(lastName)}&email={email}&sdkVersion={dllVersion}");
             request.Method = "PUT";
             byte[] content = Encoding.UTF8.GetBytes(contentToServer.ToString());
             request.ContentType = "application/json; charset=utf-8";


CloneTo helper for ConsoleBitmap

CloneTo helper for ConsoleBitmap

--- PowerArgs/CLI/Drawing/ConsoleBitmap.cs
+++ PowerArgs/CLI/Drawing/ConsoleBitmap.cs
@@ -478,6 +478,18 @@
                 }
             }
             return ret;
+        }
+
+        public void CloneTo(ConsoleBitmap ret)
+        {
+            for (var x = 0; x < Width; x++)
+            {
+                for (var y = 0; y < Height; y++)
+                {
+                    ret.Pen = this.GetPixel(x, y).Value.HasValue ? this.GetPixel(x, y).Value.Value : new ConsoleCharacter(' ');
+                    ret.DrawPoint(x, y);
+                }
+            }
         }

         private class Chunk


Fixed error in NewBooking modal that stopped recurring meetings from switching between periods

--- VORBS/Views/Shared/Modals/NewBookingModal.cshtml
+++ VORBS/Views/Shared/Modals/NewBookingModal.cshtml
@@ -12,11 +12,11 @@

                             Room Name
-                            <input id="bookingModelRoomName" class="form-control" readonly="readonly" ng-model="newBooking.Room.RoomName" />
+                            <input class="form-control" readonly="readonly" id="bookingModelRoomName" ng-model="newBooking.Room.RoomName">

                             Location
-                            <input id="bookingModalLocationName" class="form-control" readonly="readonly" ng-model="bookingFilter.location.name" />
+                            <input class="form-control" readonly="readonly" id="bookingModalLocationName" ng-model="bookingFilter.location.name">

                             Start Time
@@ -33,13 +33,12 @@
                             <input maxlength="150" id="bookingModalSubject" class="form-control" ng-model="newBooking.Subject">

+

                             <button type="button" class="button button-start" data-toggle="modal" id="recurringMeetingButton" data-target="#newBookingRecurrenceModal" data-backdrop="static" data-keyboard="false">Recurring Meeting</button>
-

-

@@ -95,7 +94,6 @@

-

@@ -121,15 +119,13 @@

This location does not have a dedicated DSS officer, please contact ITSD for support on setting up SMART room meetings.

-
-

-

-                <button type="button" class="button button-secondary" id="newBookingCancelButton" data-dismiss="modal">Cancel</button>
-                <button type="button" class="button" id="newBookingConfirmButton" ng-click="NewBooking()">Confirm Booking</button>
+

+                    <button type="button" class="button button-secondary" id="newBookingCancelButton" data-dismiss="modal">Cancel</button>
+                    <button type="button" class="button" id="newBookingConfirmButton" ng-click="NewBooking()">Confirm Booking</button>
+

-


[1000円札を投入して投入金額が1000円になる]テスト追加

[1000円札を投入して投入金額が1000円になる]テスト追加

--- VendingMachine/VendingMachineTests/Step1Tests.cs
+++ VendingMachine/VendingMachineTests/Step1Tests.cs
@@ -42,6 +42,13 @@
             投入金額.Get合計金額().Is(500);
         }

+        [TestMethod]
+        public void _1000円札を投入して投入金額が1000円になる()
+        {
+            投入金額.初期化();
+            投入口.投入(MoneyKind.Yen1000);
+            投入金額.Get合計金額().Is(1000);
+        }

         [TestMethod]
         public void _10円玉を5回投入して投入金額が50円になる()


Analyzer: allow it to load on windows

Analyzer: allow it to load on windows

--- Vernacular.Tool/Vernacular.Analyzers/Hunspell.cs
+++ Vernacular.Tool/Vernacular.Analyzers/Hunspell.cs
@@ -37,15 +37,19 @@
     // as well (UTF-8).
     public class Hunspell
     {
+#if WIN32
+        private const string LIBHUNSPELL = "libhunspell";
+#else
         private const string LIBHUNSPELL = "libhunspell-1.2";
+#endif

-        [DllImport (LIBHUNSPELL)]
+        [DllImport (LIBHUNSPELL, CallingConvention = CallingConvention.Cdecl)]
         private static extern IntPtr Hunspell_create (string affpath, string dicpath);

-        [DllImport (LIBHUNSPELL)]
+        [DllImport (LIBHUNSPELL, CallingConvention = CallingConvention.Cdecl)]
         private static extern int Hunspell_spell (IntPtr handle, string word);

-        [DllImport (LIBHUNSPELL)]
+        [DllImport (LIBHUNSPELL, CallingConvention = CallingConvention.Cdecl)]
         private static extern int Hunspell_add (IntPtr handle, string word);

         private IntPtr handle;


Fix position issue with Xmas Snowflake 2nd behaviour.

--- Xmas-Hell/Xmas-Hell-Core/Spriter/SpriterUtils.cs
+++ Xmas-Hell/Xmas-Hell-Core/Spriter/SpriterUtils.cs
@@ -139,14 +139,11 @@
                 var scale = new Vector2(spriterObject.ScaleX, spriterObject.ScaleY);
                 var realPivotPosition = new Vector2(1 - spriterObject.PivotX, 1 - spriterObject.PivotY);

-                // TOFIX...
-                realPivotPosition = new Vector2(0f, 1f);
-
                 var spriterFile = GetSpriterFile(spriterObject, animator);

                 var spriteCenter = new Vector2(
-                    spriterFile.Width * realPivotPosition.X,
-                    spriterFile.Height * realPivotPosition.Y
+                    spriterFile.Width * (realPivotPosition.X - 0.5f),
+                    spriterFile.Height * (realPivotPosition.Y - 0.5f)
                 );
                 var worldTopLeftCornerPosition = animator.Position - (spriteCenter * scale);


Handle deprecated elements in storage

Handle deprecated elements in storage

--- StorageAccounts/StorageAccount.cs
+++ StorageAccounts/StorageAccount.cs
@@ -9,6 +9,13 @@

 namespace Linq2Azure.StorageAccounts
 {
+    public enum StorageAccountType
+    {
+        Standard_LRS = 0,
+        Standard_ZRS = 1,
+        Standard_GRS = 2,
+        Standard_RAGRS = 3
+    }
     public class StorageAccount
     {
         private StorageAccount()
@@ -16,34 +23,46 @@
             Keys = new LatentSequence<StorageAccountKey>(GetStorageAccountKeysAsync);
         }

+        public StorageAccount(
+            string serviceName,
+            string description,
+            string locationOrAffinityGroup,
+            LocationType locationType,
+            StorageAccountType storageAccountType)
+            : this()
+        {
+            Contract.Requires(!string.IsNullOrWhiteSpace(serviceName));
+            Contract.Requires(!string.IsNullOrWhiteSpace(description));
+            Contract.Requires(!string.IsNullOrWhiteSpace(locationOrAffinityGroup));
+
+            ServiceName = Label = serviceName;
+            Description = description;
+            if (locationType == LocationType.Region)
+            {
+                Location = locationOrAffinityGroup;
+            }
+            else
+            {
+                AffinityGroup = locationOrAffinityGroup;
+            }
+            AccountType = storageAccountType.ToString();
+            GeoReplicationEnabled = storageAccountType == StorageAccountType.Standard_GRS || storageAccountType == StorageAccountType.Standard_RAGRS;
+            SecondaryReadEnabled = storageAccountType == StorageAccountType.Standard_ZRS || storageAccountType == StorageAccountType.Standard_RAGRS;
+
+            ExtendedProperties = new Dictionary<string, string>();
+            Endpoints = new List<Uri>();
+            SecondaryEndpoints = new List<Uri>();
+        }
+
+        [Obsolete("StorageAccountGeoReplication has been replaced with AccountType", false)]
         public StorageAccount(
                 string serviceName,
                 string description,
                 string locationOrAffinityGroup,
                 LocationType locationType,
                 StorageAccountGeoReplication geoReplication)
-            : this()
-        {
-            Contract.Requires(!string.IsNullOrWhiteSpace(serviceName));
-            Contract.Requires(!string.IsNullOrWhiteSpace(description));
-            Contract.Requires(!string.IsNullOrWhiteSpace(locationOrAffinityGroup));
-
-            ServiceName = Label = serviceName;
-            Description = description;
-            if (locationType == LocationType.Region)
-            {
-                Location = locationOrAffinityGroup;
-            }
-            else
-            {
-                AffinityGroup = locationOrAffinityGroup;
-            }
-            GeoReplicationEnabled = geoReplication != StorageAccountGeoReplication.Disabled;
-            SecondaryReadEnabled = geoReplication == StorageAccountGeoReplication.ReadAccessEnabled;
-            ExtendedProperties = new Dictionary<string, string>();
-            Endpoints = new List<Uri>();
-            SecondaryEndpoints = new List<Uri>();
-        }
+            : this(serviceName, description, locationOrAffinityGroup, locationType, DetermineStorageAccountType(geoReplication))
+        {}

         internal StorageAccount(XElement xml, Subscription subscription)
             : this()
@@ -79,6 +98,7 @@
         public string Status { get; private set; }
         public string AffinityGroup { get; private set; }
         public string Location { get; private set; }
+        [Obsolete("GeoReplicationEnabled has been replaced by AccountType", false)]
         public bool GeoReplicationEnabled { get; private set; }
         public string GeoPrimaryRegion { get; private set; }
         public string StatusOfPrimary { get; private set; }
@@ -86,12 +106,14 @@
         public string StatusOfSecondary { get; private set; }
         public string AccountType { get; private set; }
         public DateTimeOffset CreationTime { get; private set; }
+        [Obsolete("SecondayRealEnabled has been replaced by AccountType", false)]
         public bool SecondaryReadEnabled { get; private set; }
         public IDictionary<string, string> ExtendedProperties { get; set; }
         public IEnumerable<Uri> Endpoints { get; set; }
         public IEnumerable<Uri> SecondaryEndpoints { get; set; }
         public LatentSequence<StorageAccountKey> Keys { get; private set; }

+        [Obsolete("StorageAccountGeoReplication has been replaced with AccountType", false)]
         public StorageAccountGeoReplication StorageAccountGeoReplication
         {
             get
@@ -171,18 +193,32 @@
                 new XElement(azureNamespace + "Label", Label.ToBase64String()),
                 string.IsNullOrWhiteSpace(Location) ? null : new XElement(azureNamespace + "Location", Location),
                 string.IsNullOrWhiteSpace(AffinityGroup) ? null : new XElement(azureNamespace + "AffinityGroup", AffinityGroup),
-                new XElement(azureNamespace + "GeoReplicationEnabled", GeoReplicationEnabled ? "true" : "false"),
                 ExtendedProperties == null || ExtendedProperties.Count == 0
                     ? new XElement(azureNamespace + "ExtendedProperties")
                     : new XElement(azureNamespace + "ExtendedProperties", ExtendedProperties.Select(kv =>
                         new XElement(azureNamespace + "ExtendedProperty",
                             new XElement(azureNamespace + "Name", kv.Key),
                             new XElement(azureNamespace + "Value", kv.Value)))),
-                new XElement(azureNamespace + "SecondaryReadEnabled", SecondaryReadEnabled ? "true" : "false"));
+                new XElement(azureNamespace + "AccountType", AccountType));

             var hc = subscription.GetCoreRestClient20140601("services/storageservices");
             await hc.PostAsync(content);
             Subscription = subscription;
+        }
+
+        private static StorageAccountType DetermineStorageAccountType(StorageAccountGeoReplication geoReplication)
+        {
+            switch (geoReplication)
+            {
+                case StorageAccountGeoReplication.Disabled:
+                    return StorageAccountType.Standard_LRS;
+                case StorageAccountGeoReplication.Enabled:
+                    return StorageAccountType.Standard_GRS;
+                case StorageAccountGeoReplication.ReadAccessEnabled:
+                    return StorageAccountType.Standard_RAGRS;
+                default:
+                    throw new ArgumentOutOfRangeException("geoReplication");
+            }
         }

         private static IEnumerable<Uri> GetEndpoints(XContainer storageServicePropertiesElement, XNamespace azureNamespace, string endpointElement)


Added free space for disk.

Added free space for disk.

--- Source/VhdAttach/MainForm.cs
+++ Source/VhdAttach/MainForm.cs
@@ -179,6 +179,11 @@
                         items.Add(new ListViewItem(new string[] { "File size", string.Format(CultureInfo.CurrentCulture, "{0} ({1:#,##0} bytes)", BinaryPrefixExtensions.ToBinaryPrefixString(fi.Length, "B", "0"), fi.Length) }) { Group = GroupFileSystem });
                     } catch { }

+                    try {
+                        var di = new DriveInfo(new FileInfo(document.FileName).Directory.Root.FullName);
+                        items.Add(new ListViewItem(new string[] { "Free space on " + di.Name, string.Format(CultureInfo.CurrentCulture, "{0} ({1:#,##0} bytes)", BinaryPrefixExtensions.ToBinaryPrefixString(di.AvailableFreeSpace, "B", "0"), di.AvailableFreeSpace) }) { Group = GroupFileSystem });
+                    } catch { }
+
                     document.Open(Medo.IO.VirtualDiskAccessMask.GetInfo);
                     string attachedDevice = null;
                     string[] attachedPaths = null;


Added MySQL support partially

Added MySQL support partially

--- Supermarket.Data/Exports/MySql.cs
+++ Supermarket.Data/Exports/MySql.cs
@@ -1,6 +1,20 @@
 namespace Supermarket.Data.Exports
 {
+    using System;
+    using System.Linq;
+    using Context;
+    using System.Text;
+
     public class MySql
     {
+
+        public static void Export(ISupermarketContext context, DateTime? startDate, DateTime? endDate)
+        {
+            //var sqlString = new StringBuilder();
+            //var vendors = context.Vendors.ToList();
+            //TODO: Implement
+            throw new NotImplementedException("MYSQL not implemented Yet");
+
+        }
     }
 }


set PEC only when polar aligned

set PEC only when polar aligned

--- NexStar/Common.cs
+++ NexStar/Common.cs
@@ -1798,7 +1798,10 @@
                 Scope.TargetRa = 0;
                 Scope.Name = "Celestron " + Scope.ModelName;
                 Scope.isSlewing = isSlewing();
-                EnablePec(Scope.PecEnabled);
+                if (Scope.AlignmentMode != AlignmentModes.algAltAz)
+                {
+                    EnablePec(Scope.PecEnabled);
+                }
                 GetMotorVersion(out Scope.AzmVersion, out Scope.AltVersion);
                 Scope.Latitude = GetLatitude();
                 Scope.Longitude = GetLongitude();


Add default setting it's missing.

Add default setting it's missing.

--- TeamTracker/SettingsLogin.aspx.cs
+++ TeamTracker/SettingsLogin.aspx.cs
@@ -14,6 +14,10 @@

   protected void Page_Load( object sender, EventArgs e )
   {
+    if( Database.ExecSql( "SELECT id FROM Settings WHERE [Key]='SettingsPassword'" ) == 0 )
+    {
+      Database.ExecSql( "INSERT INTO Settings ( [Key], Value ) VALUES ( 'SettingsPassword', 'admin' )" );
+    }
   }

   //---------------------------------------------------------------------------


Improve sync behaviour by not rewriting new packet for each connections

--- Scripts/GameApi/LiteNetLibBehaviour.cs
+++ Scripts/GameApi/LiteNetLibBehaviour.cs
@@ -174,10 +174,12 @@
             Profiler.BeginSample("LiteNetLibBehaviour - Update Sync Behaviour");
             if (ShouldSyncBehaviour())
             {
+                TransportHandler.WritePacket(GlobalVariables.Writer, GameMsgTypes.ServerSyncBehaviour);
+                Serialize(GlobalVariables.Writer);
                 foreach (long connectionId in Manager.GetConnectionIds())
                 {
                     if (Identity.HasSubscriberOrIsOwning(connectionId))
-                        Manager.ServerSendPacket(connectionId, dataChannel, sendOptions, GameMsgTypes.ServerSyncBehaviour, this);
+                        Manager.Server.SendMessage(connectionId, dataChannel, sendOptions, GlobalVariables.Writer);
                 }
             }
             Profiler.EndSample();


cleanup example, fix attachments

cleanup example, fix attachments

--- SendGrid/SendGridMail/Transport/Web.cs
+++ SendGrid/SendGridMail/Transport/Web.cs
@@ -13,7 +13,7 @@
     {
         #region Properties
 		//TODO: Make this configurable
-        public const String BaseUrl = "sendgrid-com-ddrst15a2d5q.runscope.net";//"sendgrid.com/api/";
+        public const String BaseUrl = "sendgrid.com/api/";
         public const String Endpoint = "/api/mail.send";
         public const String JsonFormat = "json";
         public const String XmlFormat = "xml";
@@ -82,9 +82,11 @@

                 fileContent.Headers.ContentDisposition = new ContentDispositionHeaderValue("form-data")
                 {
-                    FileName = "files[" + Path.GetFileName(file.Key) + "]"
+                    Name =  "files[" + Path.GetFileName(file.Key) + "]",
+                    FileName = Path.GetFileName(file.Key)
                 };

+                fileContent.Headers.ContentType = MediaTypeHeaderValue.Parse("application/octet-stream");
                 content.Add(fileContent);
             }

@@ -93,12 +95,15 @@
 				var name = file.Key;
 				var stream = file.Value;
                 var fileContent = new StreamContent(stream);
+
+                fileContent.Headers.ContentDisposition = new ContentDispositionHeaderValue("form-data")
+                {
+                    Name = "files[" + Path.GetFileName(file.Key) + "]",
+                    FileName = Path.GetFileName(file.Key)
+                };

-                fileContent.Headers.ContentDisposition = new ContentDispositionHeaderValue("attachment")
-                {
-                    FileName = "files[" + name + "]"
-                };
-                content.Add(fileContent);
+                fileContent.Headers.ContentType = MediaTypeHeaderValue.Parse("application/octet-stream");
+                content.Add(fileContent);
 			}
         }


Use it from the default path if found.

Use it from the default path if found.

--- PrinterDriverInstaller/InfInstaller.cs
+++ PrinterDriverInstaller/InfInstaller.cs
@@ -38,15 +38,20 @@

             string pnpUtilFileName = "PnPUtil.exe";

-            string pnPUtilPathAndFileName = Path.Combine("C:/WIndows/winsxs/amd64_microsoft-windows-pnputil_31bf3856ad364e35_6.1.7600.16385_none_5958b438d6388d15", pnpUtilFileName);
+            string pnPUtilPathAndFileName = Path.Combine("C:/Windows/winsxs/amd64_microsoft-windows-pnputil_31bf3856ad364e35_6.1.7600.16385_none_5958b438d6388d15", pnpUtilFileName);
+            bool fileExists = File.Exists(pnPUtilPathAndFileName);

-            // Disable redirection
-            IntPtr ptr = new IntPtr();
-            bool isWow64FsRedirectionDisabled = Wow64DisableWow64FsRedirection(ref ptr);
-            if (isWow64FsRedirectionDisabled)
+            if (!fileExists)
             {
-                pnPUtilPathAndFileName = Path.Combine(Environment.GetFolderPath(Environment.SpecialFolder.System), pnpUtilFileName);
+                // Disable redirection
+                IntPtr ptr = new IntPtr();
+                bool isWow64FsRedirectionDisabled = Wow64DisableWow64FsRedirection(ref ptr);
+                if (isWow64FsRedirectionDisabled)
+                {
+                    pnPUtilPathAndFileName = Path.Combine(Environment.GetFolderPath(Environment.SpecialFolder.System), pnpUtilFileName);
+                }
             }
+

             driverInstallerProcess.StartInfo.FileName = pnPUtilPathAndFileName;
             driverInstallerProcess.StartInfo.Verb = "runas";
@@ -56,8 +61,12 @@

             driverInstallerProcess.WaitForExit();

-            // Restore redirection
-            Wow64RevertWow64FsRedirection(ptr);
+            if (!fileExists)
+            {
+                // Restore redirection
+                IntPtr ptr = new IntPtr();
+                Wow64RevertWow64FsRedirection(ptr);
+            }
         }

         [STAThread]


fix ContainsDescription in DescriptionManager

--- Signum.Utilities/DescriptionManager.cs
+++ Signum.Utilities/DescriptionManager.cs
@@ -564,7 +564,7 @@

         public bool ContainsDescription(string text)
         {
-            return this.Type.Name.Contains(text) ||
+            return this.Type.Name.Contains(text, StringComparison.InvariantCultureIgnoreCase) ||
                             this.Description != null && this.Description.Contains(text, StringComparison.InvariantCultureIgnoreCase) ||
                             this.PluralDescription != null && this.Description.Contains(text, StringComparison.InvariantCultureIgnoreCase);
         }


Update form

Update form

--- Site/Views/Partials/ContactForm.cshtml
+++ Site/Views/Partials/ContactForm.cshtml
@@ -3,25 +3,31 @@
     Layout = null;
 }

-@using (Html.BeginUmbracoForm("SendEmail", "ContactFormSurface", new {}, new {@class = "form-horizontal"}))
+@using (Html.BeginUmbracoForm("SendEmail", "ContactFormSurface", new { }, new { @class = "form-horizontal" }))
 {

-        @Html.LabelFor(x => Model.Name, new {@class = "col-sm-2 control-label"})
-        @Html.EditorFor(x => Model.Name, new {@class = "col-sm-6 form-control"})
-        @Html.ValidationMessageFor(x => Model.Name, "", new {@class = "alert"})
-

+        @library.GetDictionaryItem("name")
+

+            @Html.EditorFor(x => Model.Name)
+            @Html.ValidationMessageFor(x => Model.Name, "", new { @class = "alert" })
+

+

-        @Html.LabelFor(x => Model.Email, new {@class = "col-sm-2 control-label"})
-        @Html.EditorFor(x => Model.Email, new {@class = "col-sm-6 form-control"})
-        @Html.ValidationMessageFor(x => Model.Email, "", new {@class = "alert"})
-

+        @library.GetDictionaryItem("email")
+

+            @Html.EditorFor(x => Model.Email)
+            @Html.ValidationMessageFor(x => Model.Email, "", new { @class = "alert" })
+

+

-        @Html.LabelFor(x => Model.Comment, new {@class = "col-sm-2 control-label"})
-        @Html.EditorFor(x => Model.Comment, new {@class = "col-sm-6 form-control"})
-        @Html.ValidationMessageFor(x => Model.Comment, "", new {@class = "alert"})
-

+        @library.GetDictionaryItem("comment")
+

+            @Html.EditorFor(x => Model.Comment)
+            @Html.ValidationMessageFor(x => Model.Comment, "", new { @class = "alert" })
+

+


Improved ApplicationViewModel's loading status

--- SkyEditor.Core/ApplicationViewModel.cs
+++ SkyEditor.Core/ApplicationViewModel.cs
@@ -584,6 +584,15 @@
                     if (RunningProgressReportables.Any(x => x.IsIndeterminate))
                     {
                         IsIndeterminate = true;
+
+                        if (RunningProgressReportables.Count > 1)
+                        {
+                            Message = Properties.Resources.UI_LoadingGeneric;
+                        }
+                        else
+                        {
+                            Message = RunningProgressReportables.First().Message;
+                        }
                     }
                     else
                     {
@@ -637,6 +646,7 @@
                 if (RunningProgressReportables.Count == 0)
                 {
                     IsCompleted = true;
+                    IsIndeterminate = false;
                     Completed?.Invoke(this, new EventArgs());
                 }
             }


Closes #1195 - vermoedelijk het probleem van de verkeerde adressen gefixt.

--- Solution/Chiro.Gap.Data/AdresHelper.cs
+++ Solution/Chiro.Gap.Data/AdresHelper.cs
@@ -47,30 +47,35 @@
         /// <remarks>De adresobjecten moeten al gekoppeld zijn; deze method instantieert enkel nog straat, gemeente en land.</remarks>
         public static IEnumerable<GelieerdePersoon> VoorkeursAdresKoppelen(IEnumerable<GelieerdePersoon> gelieerdePersonen)
         {
-            var alleAdressen = from gp in gelieerdePersonen
-                               where gp.PersoonsAdres != null
-                               select gp.PersoonsAdres.Adres;
-
-            // De truuk is gewoon de informatie van de adressen te instantiren: eerst die van de
-            // Belgische, dan die van de buitenlandse.
+            // De truuk is gewoon de informatie van de adressen te instantiren, als Belgisch of
+            // buitenlands adres.
             // Entity framework zal ervoor zorgen dat de extra info aan de reeds geladen adresobjecten
             // wordt gekoppeld.

-            foreach (var adr in alleAdressen)
+            var alleGps = gelieerdePersonen.ToArray();
+
+            foreach (var gp in alleGps)
             {
-                if (adr is BelgischAdres)
+                gp.PersoonsAdresReference.Load();
+
+                if (gp.PersoonsAdres != null)
                 {
-                    (adr as BelgischAdres).StraatNaamReference.Load();
-                    (adr as BelgischAdres).WoonPlaatsReference.Load();
-                }
-                else
-                {
-                    Debug.Assert(adr is BuitenLandsAdres);
-                    ((BuitenLandsAdres)adr).LandReference.Load();
+                    gp.PersoonsAdres.AdresReference.Load();
+                    var adr = gp.PersoonsAdres.Adres;
+                    if (adr is BelgischAdres)
+                    {
+                        (adr as BelgischAdres).StraatNaamReference.Load();
+                        (adr as BelgischAdres).WoonPlaatsReference.Load();
+                    }
+                    else
+                    {
+                        Debug.Assert(adr is BuitenLandsAdres);
+                        ((BuitenLandsAdres) adr).LandReference.Load();
+                    }
                 }
             }

-            return gelieerdePersonen;
+            return alleGps;
         }

         /// <summary>


Build new facade construct around Graphologist and DefaultGraphologistComponents

--- Src/Graphology/Graphology.cs
+++ Src/Graphology/Graphology.cs
@@ -10,6 +10,108 @@
 namespace TeaDriven.Graphology
 {
     #region Facade objects
+
+    public interface IGraphologistComponents
+    {
+        IGraphTraversal GraphTraversal { get; }
+
+        IGraphVisualization GraphVisualization { get; }
+    }
+
+    public class GraphologistComponents : IGraphologistComponents
+    {
+        private IGraphTraversal _graphTraversal;
+        private IGraphVisualization _graphVisualization;
+
+        public GraphologistComponents(IGraphTraversal graphTraversal, IGraphVisualization graphVisualization)
+        {
+            this._graphTraversal = graphTraversal;
+            this._graphVisualization = graphVisualization;
+        }
+
+        #region IGraphologistComponents Members
+
+        public IGraphTraversal GraphTraversal
+        {
+            get { return this._graphTraversal; }
+        }
+
+        public IGraphVisualization GraphVisualization
+        {
+            get { return this._graphVisualization; }
+        }
+
+        #endregion IGraphologistComponents Members
+    }
+
+    public class DefaultGraphologistComponents : GraphologistComponents
+    {
+        public DefaultGraphologistComponents(TypeExclusions typeExclusions, ITypeFieldExclusion typeFieldExclusion)
+            : base(
+                new GraphTraversal(BuildGetObjectGraph(typeExclusions, typeFieldExclusion)),
+                new GraphVisualization(new DefaultGetNodeString(new DefaultGetDepthString(), new DefaultGetMemberTypesString(BuildGetTypeNameString()))))
+        {
+        }
+
+        public DefaultGraphologistComponents()
+            : this(DefaultTypeExclusions, DefaultTypeFieldExclusion)
+        {
+        }
+
+        public DefaultGraphologistComponents(TypeExclusions typeExclusions)
+            : this(typeExclusions, DefaultTypeFieldExclusion)
+        {
+        }
+
+        public DefaultGraphologistComponents(ITypeFieldExclusion typeFieldExclusion)
+            : this(DefaultTypeExclusions, typeFieldExclusion)
+        {
+        }
+
+        private static readonly TypeExclusions _defaultTypeExclusions = new MinimalTypeExclusions();
+        private static readonly ITypeFieldExclusion _defaultTypeFieldExclusion = new GenericListItemsTypeFieldExclusion();
+
+        public static TypeExclusions DefaultTypeExclusions
+        {
+            get { return _defaultTypeExclusions; }
+        }
+
+        public static ITypeFieldExclusion DefaultTypeFieldExclusion
+        {
+            get { return _defaultTypeFieldExclusion; }
+        }
+
+        private static IGetObjectGraph BuildGetObjectGraph(TypeExclusions typeExclusions, ITypeFieldExclusion typeFieldExclusion)
+        {
+            LazyGetObjectGraph getObjectGraph = new LazyGetObjectGraph();
+
+            IGetSubGraph getSubGraph = new CompositeGetSubGraph(new List<IGetSubGraph>()
+                                                                {
+                                                                    new EnumerableGetSubGraph(getObjectGraph, typeExclusions),
+                                                                    new DefaultGetSubGraph(getObjectGraph,
+                                                                                new DefaultGetObjectFields(
+                                                                                new FilteringGetTypeFields(
+                                                                                new DefaultGetTypeFields(),
+                                                                                typeFieldExclusion)),
+                                                                                typeExclusions)
+                                                                });
+
+            getObjectGraph.GetObjectGraph = new DefaultGetObjectGraph(getSubGraph, typeExclusions);
+
+            return getObjectGraph;
+        }
+
+        private static IGetTypeNameString BuildGetTypeNameString()
+        {
+            LazyGetTypeNameString lazyGetTypeNameString = new LazyGetTypeNameString();
+            IGetTypeNameString getTypeNameString =
+                new CompositeGetTypeNameString(new RecursiveGenericTypeGetTypeNameString(lazyGetTypeNameString),
+                                               new DefaultGetTypeNameString());
+            lazyGetTypeNameString.GetTypeNameString = getTypeNameString;
+
+            return lazyGetTypeNameString;
+        }
+    }

     public class CreateGraphologist
     {
@@ -49,7 +151,7 @@

             IGraphVisualization visualization =
                 new GraphVisualization(new DefaultGetNodeString(new DefaultGetDepthString(),
-                                                         new DefaultGetMemberTypesString(lazyGetTypeNameString)));
+                                                                new DefaultGetMemberTypesString(lazyGetTypeNameString)));

             Graphologist graphologist = new Graphologist(traversal, visualization);

@@ -67,6 +169,21 @@
         private readonly IGraphTraversal _traversal;
         private readonly IGraphVisualization _visualization;

+        public Graphologist()
+            : this(new DefaultGraphologistComponents())
+        {
+        }
+
+        public Graphologist(TypeExclusions typeExclusions)
+            : this(new DefaultGraphologistComponents(typeExclusions))
+        {
+        }
+
+        public Graphologist(IGraphologistComponents components)
+            : this(components.GraphTraversal, components.GraphVisualization)
+        {
+        }
+
         public Graphologist(IGraphTraversal traversal, IGraphVisualization visualization)
         {
             this._traversal = traversal;
@@ -83,7 +200,7 @@

     public static class GraphologistExtensions
     {
-        public static void WriteGraph(this Graphologist graphologist, object targetObject, string projectPath, string graphName)
+        public static void WriteGraph(this IGraphologist graphologist, object targetObject, string projectPath, string graphName)
         {
             var currentDir = Directory.GetCurrentDirectory();


Error handling in StateMachine

Error handling in StateMachine

--- StateMachine/StateMachine.cs
+++ StateMachine/StateMachine.cs
@@ -28,11 +28,11 @@
             var transition = new StateTransition<T>(suspended, newState, StateTransitionKind.Push);
             this.BeforeStateChange?.Invoke(transition);

-            suspended?.Suspend(newState);
+            SuspendState(suspended, newState);

             this.stack.Push(newState);
-            newState.Enter(suspended);
-            newState.Restore(suspended);
+            EnterState(newState, suspended);
+            RestoreState(newState, suspended);

             this.StateChanged?.Invoke(transition);
         }
@@ -44,12 +44,12 @@

             this.BeforeStateChange?.Invoke(transition);

-            replaced?.Suspend(newState);
-            replaced?.Exit(newState);
+            SuspendState(replaced, newState);
+            ExitState(replaced, newState);

             this.stack.Push(newState);
-            newState.Enter(replaced);
-            newState.Restore(replaced);
+            EnterState(newState, replaced);
+            RestoreState(newState, replaced);

             this.StateChanged?.Invoke(transition);
         }
@@ -67,12 +67,44 @@

             this.BeforeStateChange?.Invoke(transition);

-            popped.Suspend(restored);
-            popped.Exit(restored);
+            SuspendState(popped, restored);
+            ExitState(popped, restored);

-            restored?.Restore(popped);
+            RestoreState(restored, popped);

             this.StateChanged?.Invoke(transition);
+        }
+
+        private static void EnterState(T state, T fromState) {
+            try {
+                state?.Enter(fromState);
+            } catch (Exception ex) {
+                Debug.LogErrorFormat("State Enter transition failed: {0}", ex);
+            }
+        }
+
+        private static void RestoreState(T state, T fromState) {
+            try {
+                state?.Restore(fromState);
+            } catch (Exception ex) {
+                Debug.LogErrorFormat("State Restore transition failed: {0}", ex);
+            }
+        }
+
+        private static void SuspendState(T state, T toState) {
+            try {
+                state?.Suspend(toState);
+            } catch (Exception ex) {
+                Debug.LogErrorFormat("State Suspend transition failed: {0}", ex);
+            }
+        }
+
+        private static void ExitState(T state, T toState) {
+            try {
+                state?.Exit(toState);
+            } catch (Exception ex) {
+                Debug.LogErrorFormat("State Exit transition failed: {0}", ex);
+            }
         }

         public void PopWhile(Func<T, bool> predicate) {


Added IsSubcategory Property to Variable

--- SpeedrunComSharp/Variables/Variable.cs
+++ SpeedrunComSharp/Variables/Variable.cs
@@ -16,6 +16,7 @@
         public bool IsUsedForObsoletingRuns { get; private set; }
         public ReadOnlyCollection<VariableValue> Values { get; private set; }
         public VariableValue DefaultValue { get; private set; }
+        public bool IsSubcategory { get; private set; }

         #region Links

@@ -76,6 +77,8 @@
             if (!string.IsNullOrEmpty(defaultValue))
                 variable.DefaultValue = variable.Values.FirstOrDefault(x => x.ID == defaultValue);

+            variable.IsSubcategory = (bool)(properties["is-subcategory"] ?? false);
+
             //Parse Links

             var gameLink = links.FirstOrDefault(x => x.rel == "game");


Changed combinationFilter

Changed combinationFilter

--- Sting/DAL/Filters/CombinationFilter.cs
+++ Sting/DAL/Filters/CombinationFilter.cs
@@ -8,18 +8,16 @@
 {
     public class CombinationFilter : IFilter
     {
-        public IFilter FirstFilter { get; set; }
-        public IFilter SecondFilter { get; set; }
+        public IFilter[] Filters { get; set; }

-        public CombinationFilter(IFilter firstFilter, IFilter secondFilter)
+        public CombinationFilter(params IFilter[] filters)
         {
-            FirstFilter = firstFilter;
-            SecondFilter = secondFilter;
+            Filters = filters;
         }

         public string GetFilterString()
         {
-            return string.Format("{0},{1}",FirstFilter,SecondFilter);
+            return string.Join(",", Filters.ToList());
         }

         public override string ToString()


MarketAlbum Attachment add missing namespace

--- VkNet/Model/Attachments/MarketAlbum.cs
+++ VkNet/Model/Attachments/MarketAlbum.cs
@@ -1,9 +1,8 @@
 using System;
 using System.Runtime.Serialization;
-using VkNet.Model.Attachments;
 using VkNet.Utils;

-namespace VkNet.Model
+namespace VkNet.Model.Attachments
 {
 	/// <summary>
 	/// Подборка товаров


Changed logic for exposing experiment view model - make that static instead of needing to expose the whole MainViewModel

--- ZebraTrack/ViewModels/MainViewModel.cs
+++ ZebraTrack/ViewModels/MainViewModel.cs
@@ -211,7 +211,7 @@
             }
         }

-        public IExperimentVM ExperimentViewModel { get; set; }
+        public static IExperimentVM ExperimentViewModel { get; set; }

         #endregion

@@ -226,7 +226,6 @@
             _mainImage = new EZImageSource();
             _fishImage = new EZImageSource();
             _acquisitionThread = new WorkerT<IExperiment>(TrackThreadRun, null, true, 3000);
-            Current = this;
         }

         #region Methods
@@ -384,24 +383,7 @@
         }

         #endregion
-        private static MainViewModel _current = null;
-
-        /// <summary>
-        /// Handle to the applications main view model
-        /// </summary>
-        public static MainViewModel Current
-        {
-            get
-            {
-                return _current;
-            }
-            private set
-            {
-                if (_current != null && value != null)
-                    throw new ApplicationException("MainViewModel was created a second time");
-                _current = value;
-            }
-        }
+

         #region Cleanup

@@ -413,7 +395,6 @@
                 _acquisitionThread.Dispose();
                 _acquisitionThread = null;
             }
-            Current = null;
             base.Dispose(disposing);
         }


Remove AllowsTransparency

Remove AllowsTransparency

--- StrawMan/Classes/SNDialog.cs
+++ StrawMan/Classes/SNDialog.cs
@@ -7,7 +7,6 @@
         public SNDialog()
         {
             ShowInTaskbar = false;
-            AllowsTransparency = true;

             PreviewMouseDoubleClick += (sender, e) =>
             {


haaaaaaaaaaaaaaaaaaands

haaaaaaaaaaaaaaaaaaands

--- Principia/Core.cs
+++ Principia/Core.cs
@@ -66,8 +66,7 @@
       };
       double UT = Planetarium.GetUniversalTime();
       QuaternionD rotation = Planetarium.Rotation;
-      if (activeVessel.loaded
-          && TimeWarp.CurrentRate < TimeWarp.MaxPhysicsRate) {
+      if (activeVessel.loaded && !activeVessel.packed) {
         // We compute the velocity ourselves so that we only deal with Unity's
         // and not with KSP's calculations. This also ensures that the
         // accumulation is done in double precision.
@@ -166,8 +165,7 @@
             Vector3d relativeVelocity
               = secondary.v.ToVector() - primary.v.ToVector();
             if (vessel.isActiveVessel &&
-                vessel.loaded
-                && TimeWarp.CurrentRate < TimeWarp.MaxPhysicsRate) {
+                !vessel.packed) {
               Vector3d worldPosition = rotation * relativePosition.xzy
                                        + vessel.orbit.referenceBody.position;
               vessel.SetPosition(worldPosition);
@@ -189,8 +187,7 @@
         }
       }

-      if (activeVessel.loaded
-          && TimeWarp.CurrentRate < TimeWarp.MaxPhysicsRate) {
+      if (activeVessel.loaded && !activeVessel.packed) {
         // Compute the velocity used to extract the proper acceleration in the
         // next step.
         activeVesselVelocity = Vector3d.zero;


Particle thing uses actual particles to draw itself.

--- examples/Flight/Flight.cs
+++ examples/Flight/Flight.cs
@@ -131,16 +131,6 @@
       Gfx.GlColor(Color.Olivedrab);
       landscape.Draw();
       Gl.glPopMatrix();
-
-      // Draw particle using point sprites.
-
-      Gl.glBindTexture(Gl.GL_TEXTURE_2D, App.Service<ITaoService>().Textures["particle"]);
-
-      Gfx.GlColor(Color.White);
-
-      Gfx.DrawParticle(0, 0, 10, 10);
-
-      Gl.glBindTexture(Gl.GL_TEXTURE_2D, 0);
     }

@@ -516,7 +506,7 @@
                        App.Service<IFlightService>().Rng.UnitVec() * 10.0,
                        Color.Red,
                        1.0,
-                       0.1));
+                       2.0));

       }
       if (health < 0.0)
@@ -613,9 +603,6 @@
   {
     public Particle(Vec3 pos, Vec3 velocity, Color color, double lifetime, double scale)
     {
-      // XXX: Use proper particles.
-      this.Model = Flight.Octahedron();
-
       this.Pos = pos;
       this.Color = color;
       this.velocity = velocity;
@@ -637,15 +624,13 @@

     public override void Draw(double timeElapsed)
     {
-      // XXX: Code repetition
-      Gl.glPushMatrix();
+      Gl.glBindTexture(Gl.GL_TEXTURE_2D, App.Service<ITaoService>().Textures["particle"]);
+
       Gfx.GlColor(Color);

-      Gl.glTranslatef((float)Pos.X, (float)Pos.Y, (float)Pos.Z);
-      Gl.glScalef((float)scale, (float)scale, (float)scale);
-      // TODO: Use proper simple particles, not meshes.
-      Model.Draw();
-      Gl.glPopMatrix();
+      Gfx.DrawParticle((float)Pos.X, (float)Pos.Y, (float)Pos.Z, (float)scale);
+
+      Gl.glBindTexture(Gl.GL_TEXTURE_2D, 0);
     }


rm support for old style ios from imp_ios_internal.cs

--- src/cs/imp_ios_internal.cs
+++ src/cs/imp_ios_internal.cs
@@ -16,8 +16,6 @@

 #if IOS_PACKAGED_E_SQLITE3

-#if PLATFORM_UNIFIED
-
 [assembly: ObjCRuntime.LinkWith(
         "e_sqlite3.a",
         LinkTarget = ObjCRuntime.LinkTarget.Simulator | ObjCRuntime.LinkTarget.Simulator64 | ObjCRuntime.LinkTarget.ArmV7 | ObjCRuntime.LinkTarget.ArmV7s | ObjCRuntime.LinkTarget.Arm64,
@@ -26,22 +24,10 @@
         Frameworks=""
         )
         ]
-#else
-[assembly: MonoTouch.ObjCRuntime.LinkWith(
-        "e_sqlite3.a",
-        LinkTarget = MonoTouch.ObjCRuntime.LinkTarget.Simulator | MonoTouch.ObjCRuntime.LinkTarget.Simulator64 | MonoTouch.ObjCRuntime.LinkTarget.ArmV7 | MonoTouch.ObjCRuntime.LinkTarget.ArmV7s | MonoTouch.ObjCRuntime.LinkTarget.Arm64,
-        ForceLoad=true,
-        LinkerFlags="",
-        Frameworks=""
-        )
-        ]
-#endif
-
 #endif

 #if IOS_PACKAGED_SQLCIPHER

-#if PLATFORM_UNIFIED
 [assembly: ObjCRuntime.LinkWith(
         "sqlcipher.a",
         LinkTarget = ObjCRuntime.LinkTarget.Simulator | ObjCRuntime.LinkTarget.Simulator64 | ObjCRuntime.LinkTarget.ArmV7 | ObjCRuntime.LinkTarget.ArmV7s | ObjCRuntime.LinkTarget.Arm64,
@@ -51,17 +37,5 @@
         )
         ]

-#else
-[assembly: MonoTouch.ObjCRuntime.LinkWith(
-        "sqlcipher.a",
-        LinkTarget = MonoTouch.ObjCRuntime.LinkTarget.Simulator | MonoTouch.ObjCRuntime.LinkTarget.Simulator64 | MonoTouch.ObjCRuntime.LinkTarget.ArmV7 | MonoTouch.ObjCRuntime.LinkTarget.ArmV7s | MonoTouch.ObjCRuntime.LinkTarget.Arm64,
-        ForceLoad=true,
-        LinkerFlags="",
-        Frameworks=""
-        )
-        ]
-
 #endif

-#endif
-


Changed namespace for templatization.

Changed namespace for templatization.

--- Template/Template/Program.cs
+++ Template/Template/Program.cs
@@ -5,7 +5,7 @@
 using System.Text;
 using System.Threading.Tasks;

-namespace Template
+namespace $safeprojectname$
 {
     public interface ISolver
     {


Actually what we want for channel mask is to skip ONLY notes.

NoteOff can be ignored because we send "all sound off" when mute is set.

--- lib/base/MidiPlayer.cs
+++ lib/base/MidiPlayer.cs
@@ -289,9 +289,12 @@

 			player = new MidiSyncPlayer (music, timeManager);
 			EventReceived += (m) => {
-				if (channel_mask != null && channel_mask [m.Channel])
-					return; // ignore messages for the masked channel.
 				switch (m.EventType) {
+				case MidiEvent.NoteOn:
+				case MidiEvent.NoteOff:
+					if (channel_mask != null && channel_mask [m.Channel])
+						return; // ignore messages for the masked channel.
+					goto default;
 				case MidiEvent.SysEx1:
 				case MidiEvent.SysEx2:
 					if (buffer.Length <= m.Data.Length)


Fix thread culture setting tests (#2946)

Fix thread culture setting tests

--- osu.Framework.Tests/Localisation/ThreadCultureTest.cs
+++ osu.Framework.Tests/Localisation/ThreadCultureTest.cs
@@ -1,8 +1,9 @@
 // Copyright (c) ppy Pty Ltd <contact@ppy.sh>. Licensed under the MIT Licence.
 // See the LICENCE file in the repository root for full licence text.

-using System.Collections.Generic;
+using System.Collections.Concurrent;
 using System.Globalization;
+using System.Linq;
 using System.Threading;
 using NUnit.Framework;
 using osu.Framework.Allocation;
@@ -50,11 +51,17 @@
             assertThreadCulture("ko-KR");
         }

-        private void setCulture(string name) => AddStep($"set culture = {name}", () => config.Set(FrameworkSetting.Locale, name));
+        private void setCulture(string name) => AddStep($"set culture = {name}", () =>
+        {
+            var locale = config.GetBindable<string>(FrameworkSetting.Locale);
+            // force ValueChanged to trigger by calling SetValue explicitly instead of setting .Value
+            // this is done since the existing value might have been the same and TestScene.SetUpTestForUnit() might have overridden the culture silently
+            locale.SetValue(locale.Value, name);
+        });

         private void assertCulture(string name)
         {
-            var cultures = new List<CultureInfo>();
+            var cultures = new ConcurrentBag<CultureInfo>();

             AddStep("query cultures", () =>
             {
@@ -64,7 +71,7 @@
             });

             AddUntilStep("wait for query", () => cultures.Count == 3);
-            AddAssert($"culture is {name}", () => cultures.TrueForAll(c => c.Name == name));
+            AddAssert($"culture is {name}", () => cultures.All(c => c.Name == name));
         }

         private void assertThreadCulture(string name)


Simplify JoystickAxisInput constructor and add guard clause

--- osu.Framework/Input/StateChanges/JoystickAxisInput.cs
+++ osu.Framework/Input/StateChanges/JoystickAxisInput.cs
@@ -1,6 +1,7 @@
 // Copyright (c) ppy Pty Ltd <contact@ppy.sh>. Licensed under the MIT Licence.
 // See the LICENCE file in the repository root for full licence text.

+using System;
 using System.Collections.Generic;
 using System.Linq;
 using osu.Framework.Extensions.IEnumerableExtensions;
@@ -12,7 +13,7 @@
 {
     public class JoystickAxisInput : IInput
     {
-        private readonly IEnumerable<float> axes;
+        public readonly IEnumerable<JoystickAxis> Axes;

         public JoystickAxisInput(JoystickAxis axis)
             : this(axis.Yield())
@@ -21,19 +22,15 @@

         public JoystickAxisInput(IEnumerable<JoystickAxis> axes)
         {
-            var array = new float[JoystickState.MAX_AXES];
+            if (axes.Count() > JoystickState.MAX_AXES)
+                throw new ArgumentException("Too many axes in the passed collection", nameof(axes));

-            foreach (var axis in axes)
-            {
-                array[axis.Axis - InputAxis.FirstJoystickAxis] = axis.Value;
-            }
-
-            this.axes = array;
+            Axes = axes;
         }

         public void Apply(InputState state, IInputStateChangeHandler handler)
         {
-            foreach (var a in axes.Select((v, i) => new JoystickAxis(i + InputAxis.FirstJoystickAxis, v)))
+            foreach (var a in Axes)
             {
                 // Not enough movement, don't fire event
                 if (Precision.AlmostEquals(state.Joystick.Axes[a.Axis - InputAxis.FirstJoystickAxis], a.Value))


Change order of settings to make scrolling easier

There's an issue with dropdown menus nested inside a scroll view being
very frustrating to scroll to off-screen items. This works around that
to some extent by giving the user more "parent-scrollable" space to
mouse wheel or drag over.

--- osu.Game.Rulesets.Osu/Mods/OsuModApproachDifferent.cs
+++ osu.Game.Rulesets.Osu/Mods/OsuModApproachDifferent.cs
@@ -1,7 +1,6 @@
 // Copyright (c) ppy Pty Ltd <contact@ppy.sh>. Licensed under the MIT Licence.
 // See the LICENCE file in the repository root for full licence text.

-using System;
 using System.Collections.Generic;
 using osu.Framework.Bindables;
 using osu.Framework.Extensions.IEnumerableExtensions;
@@ -22,18 +21,16 @@
         public override double ScoreMultiplier => 1;
         public override IconUsage? Icon { get; } = FontAwesome.Regular.Circle;

-        [SettingSource("Style", "Change the animation style of the approach circles.", 0)]
-        public Bindable<AnimationStyle> Style { get; } = new Bindable<AnimationStyle>();
-
-        [SettingSource("Initial size", "Change the initial size of the approach circle, relative to hit circles.", 1)]
-        public BindableFloat Scale { get; } = new BindableFloat
+        [SettingSource("Initial size", "Change the initial size of the approach circle, relative to hit circles.", 0)]
+        public BindableFloat Scale { get; } = new BindableFloat(4)
         {
             Precision = 0.1f,
             MinValue = 2,
             MaxValue = 10,
-            Default = 4,
-            Value = 4
         };
+
+        [SettingSource("Style", "Change the animation style of the approach circles.", 1)]
+        public Bindable<AnimationStyle> Style { get; } = new Bindable<AnimationStyle>();

         public void ApplyToDrawableHitObjects(IEnumerable<DrawableHitObject> drawables)
         {


Fix incorrect property xmldoc inherited

Fix incorrect property xmldoc inherited

--- osu.Game/Localisation/NamedOverlayComponentStrings.cs
+++ osu.Game/Localisation/NamedOverlayComponentStrings.cs
@@ -53,7 +53,7 @@
         /// </summary>
         public static LocalisableString NewsDescription => new TranslatableString(getKey(@"news_description"), @"get up-to-date on community happenings");

-        /// <inheritdoc cref="LayoutStrings.MenuHelpGetWiki"/>
+        /// <inheritdoc cref="PageTitleStrings.MainWikiControllerDefault"/>
         public static LocalisableString WikiTitle => PageTitleStrings.MainWikiControllerDefault;

         /// <summary>


Use fixed width font for performance points counter

Matches all other display counters for in-game metrics.

As mentioned in https://github.com/ppy/osu/discussions/15584.

--- osu.Game/Screens/Play/HUD/PerformancePointsCounter.cs
+++ osu.Game/Screens/Play/HUD/PerformancePointsCounter.cs
@@ -184,7 +184,7 @@
                         {
                             Anchor = Anchor.BottomLeft,
                             Origin = Anchor.BottomLeft,
-                            Font = OsuFont.Numeric.With(size: 16)
+                            Font = OsuFont.Numeric.With(size: 16, fixedWidth: true)
                         },
                         new OsuSpriteText
                         {


[V2] First stab at Unix GCC 4.8 support

[V2] First stab at Unix GCC 4.8 support

--- packages/Gcc/4.8/Scripts/CCompilerOptionCollection.cs
+++ packages/Gcc/4.8/Scripts/CCompilerOptionCollection.cs
@@ -16,8 +16,678 @@
 // You should have received a copy of the GNU Lesser General Public License
 // along with BuildAMation.  If not, see <http://www.gnu.org/licenses/>.
 #endregion // License
+using C.V2.DefaultSettings;
+using Gcc.V2.DefaultSettings;
 namespace Gcc
 {
+    public static partial class NativeImplementation
+    {
+        public static void
+        Convert(
+            this C.V2.ICommonCompilerOptions options,
+            Bam.Core.V2.Module module,
+            Bam.Core.StringArray commandLine)
+        {
+            var objectFile = module as C.V2.ObjectFile;
+            if (null != options.Bits)
+            {
+                if (options.Bits == C.V2.EBit.SixtyFour)
+                {
+                    commandLine.Add("-m64");
+                }
+                else
+                {
+                    commandLine.Add("-m32");
+                }
+            }
+            if (null != options.DebugSymbols)
+            {
+                if (true == options.DebugSymbols)
+                {
+                    commandLine.Add("-g");
+                }
+            }
+            foreach (var warning in options.DisableWarnings)
+            {
+                commandLine.Add(System.String.Format("-Wno-{0}", warning));
+            }
+            foreach (var path in options.IncludePaths)
+            {
+                var formatString = path.ContainsSpace ? "-I\"{0}\"" : "-I{0}";
+                commandLine.Add(System.String.Format(formatString, path));
+            }
+            if (null != options.LanguageStandard)
+            {
+                switch (options.LanguageStandard)
+                {
+                    case C.ELanguageStandard.C89:
+                        commandLine.Add("-std=c89");
+                        break;
+                    case C.ELanguageStandard.C99:
+                        commandLine.Add("-std=c99");
+                        break;
+                    default:
+                        // TODO: Might want to split this across C specific and Cxx specific options
+                        throw new Bam.Core.Exception("Invalid language standard, '{0}'", options.LanguageStandard.ToString());
+                }
+            }
+            if (null != options.OmitFramePointer)
+            {
+                if (true == options.OmitFramePointer)
+                {
+                    commandLine.Add("-fomit-frame-pointer");
+                }
+                else
+                {
+                    commandLine.Add("-fno-omit-frame-pointer");
+                }
+            }
+            if (null != options.Optimization)
+            {
+                switch (options.Optimization)
+                {
+                    case C.EOptimization.Off:
+                        commandLine.Add("-O0");
+                        break;
+                    case C.EOptimization.Size:
+                        commandLine.Add("-Os");
+                        break;
+                    case C.EOptimization.Speed:
+                        commandLine.Add("-O1");
+                        break;
+                    case C.EOptimization.Full:
+                        commandLine.Add("-O3");
+                        break;
+                }
+            }
+            foreach (var define in options.PreprocessorDefines)
+            {
+                if (System.String.IsNullOrEmpty(define.Value))
+                {
+                    commandLine.Add(System.String.Format("-D{0}", define.Key));
+                }
+                else
+                {
+                    commandLine.Add(System.String.Format("-D{0}={1}", define.Key, define.Value));
+                }
+            }
+            foreach (var undefine in options.PreprocessorUndefines)
+            {
+                commandLine.Add(System.String.Format("-U{0}", undefine));
+            }
+            foreach (var path in options.SystemIncludePaths)
+            {
+                var formatString = path.ContainsSpace ? "-I\"{0}\"" : "-I{0}";
+                commandLine.Add(System.String.Format(formatString, path));
+            }
+            if (null != options.TargetLanguage)
+            {
+                switch (options.TargetLanguage)
+                {
+                    case C.ETargetLanguage.C:
+                        commandLine.Add("-x c");
+                        break;
+                    case C.ETargetLanguage.Cxx:
+                        commandLine.Add("-x c++");
+                        break;
+                    default:
+                        throw new Bam.Core.Exception("Unsupported target language");
+                }
+            }
+            if (null != options.WarningsAsErrors)
+            {
+                if (true == options.WarningsAsErrors)
+                {
+                    commandLine.Add("-Werror");
+                }
+            }
+            if (null != options.OutputType)
+            {
+                switch (options.OutputType)
+                {
+                    case C.ECompilerOutput.CompileOnly:
+                        commandLine.Add(System.String.Format("-c {0}", objectFile.InputPath.ToString()));
+                        commandLine.Add(System.String.Format("-o {0}", module.GeneratedPaths[C.V2.ObjectFile.Key].ToString()));
+                        break;
+                    case C.ECompilerOutput.Preprocess:
+                        commandLine.Add(System.String.Format("-E {0}", objectFile.InputPath.ToString()));
+                        commandLine.Add(System.String.Format("-o {0}", module.GeneratedPaths[C.V2.ObjectFile.Key].ToString()));
+                        break;
+                }
+            }
+        }
+    }
+
+    public static partial class NativeImplementation
+    {
+        public static void
+        Convert(
+            this C.V2.ICommonArchiverOptions options,
+            Bam.Core.V2.Module module,
+            Bam.Core.StringArray commandLine)
+        {
+            switch (options.OutputType)
+            {
+                case C.EArchiverOutput.StaticLibrary:
+                    commandLine.Add(module.GeneratedPaths[C.V2.StaticLibrary.Key].ToString());
+                    break;
+            }
+        }
+
+        public static void
+        Convert(
+            this V2.IArchiverOptions options,
+            Bam.Core.V2.Module module,
+            Bam.Core.StringArray commandLine)
+        {
+            if (options.Ranlib)
+            {
+                commandLine.Add("-s");
+            }
+            if (options.DoNotWarnIfLibraryCreated)
+            {
+                commandLine.Add("-c");
+            }
+            switch (options.Command)
+            {
+                case V2.EArchiverCommand.Replace:
+                    commandLine.Add("-r");
+                    break;
+
+                default:
+                    throw new Bam.Core.Exception("No such archiver command");
+            }
+        }
+    }
+
+    public static partial class NativeImplementation
+    {
+        public static void
+        Convert(
+            this C.V2.ICommonLinkerOptions options,
+            Bam.Core.V2.Module module,
+            Bam.Core.StringArray commandLine)
+        {
+            //var applicationFile = module as C.V2.ConsoleApplication;
+            switch (options.OutputType)
+            {
+                case C.ELinkerOutput.Executable:
+                    commandLine.Add(System.String.Format("-o {0}", module.GeneratedPaths[C.V2.ConsoleApplication.Key].ToString()));
+                    break;
+
+                case C.ELinkerOutput.DynamicLibrary:
+                    commandLine.Add("-shared");
+                    commandLine.Add(System.String.Format("-o {0}", module.GeneratedPaths[C.V2.ConsoleApplication.Key].ToString()));
+                    break;
+            }
+            foreach (var path in options.LibraryPaths)
+            {
+                var format = path.ContainsSpace ? "-L\"{0}\"" : "-L{0}";
+                commandLine.Add(System.String.Format(format, path.ToString()));
+            }
+        }
+    }
+
+namespace V2
+{
+    namespace DefaultSettings
+    {
+        public static partial class DefaultSettingsExtensions
+        {
+            public static void Defaults(this IArchiverOptions settings, Bam.Core.V2.Module module)
+            {
+                settings.Ranlib = true;
+                settings.DoNotWarnIfLibraryCreated = true;
+                settings.Command = EArchiverCommand.Replace;
+            }
+        }
+    }
+
+    public enum EArchiverCommand
+    {
+        Replace
+    }
+
+    public interface IArchiverOptions
+    {
+        bool Ranlib
+        {
+            get;
+            set;
+        }
+
+        bool DoNotWarnIfLibraryCreated
+        {
+            get;
+            set;
+        }
+
+        EArchiverCommand Command
+        {
+            get;
+            set;
+        }
+    }
+
+    public class CompilerSettings :
+        Bam.Core.V2.Settings,
+        CommandLineProcessor.V2.IConvertToCommandLine,
+        C.V2.ICommonCompilerOptions,
+        C.V2.ICOnlyCompilerOptions
+    {
+        public CompilerSettings(Bam.Core.V2.Module module)
+            : this(module, true)
+        {
+        }
+
+        public CompilerSettings(Bam.Core.V2.Module module, bool useDefaults)
+        {
+            (this as C.V2.ICommonCompilerOptions).Empty();
+            if (useDefaults)
+            {
+                (this as C.V2.ICommonCompilerOptions).Defaults(module);
+            }
+        }
+
+        void CommandLineProcessor.V2.IConvertToCommandLine.Convert(Bam.Core.V2.Module module, Bam.Core.StringArray commandLine)
+        {
+            (this as C.V2.ICommonCompilerOptions).Convert(module, commandLine);
+        }
+
+
+        C.V2.EBit? C.V2.ICommonCompilerOptions.Bits
+        {
+            get;
+            set;
+        }
+
+        C.V2.PreprocessorDefinitions C.V2.ICommonCompilerOptions.PreprocessorDefines
+        {
+            get;
+            set;
+        }
+
+        Bam.Core.Array<Bam.Core.V2.TokenizedString> C.V2.ICommonCompilerOptions.IncludePaths
+        {
+            get;
+            set;
+        }
+
+        Bam.Core.Array<Bam.Core.V2.TokenizedString> C.V2.ICommonCompilerOptions.SystemIncludePaths
+        {
+            get;
+            set;
+        }
+
+        C.ECompilerOutput? C.V2.ICommonCompilerOptions.OutputType
+        {
+            get;
+            set;
+        }
+
+        bool? C.V2.ICommonCompilerOptions.DebugSymbols
+        {
+            get;
+            set;
+        }
+
+        bool? C.V2.ICommonCompilerOptions.WarningsAsErrors
+        {
+            get;
+            set;
+        }
+
+        C.EOptimization? C.V2.ICommonCompilerOptions.Optimization
+        {
+            get;
+            set;
+        }
+
+        C.ETargetLanguage? C.V2.ICommonCompilerOptions.TargetLanguage
+        {
+            get;
+            set;
+        }
+
+        C.ELanguageStandard? C.V2.ICommonCompilerOptions.LanguageStandard
+        {
+            get;
+            set;
+        }
+
+        bool? C.V2.ICommonCompilerOptions.OmitFramePointer
+        {
+            get;
+            set;
+        }
+
+        Bam.Core.StringArray C.V2.ICommonCompilerOptions.DisableWarnings
+        {
+            get;
+            set;
+        }
+
+        Bam.Core.StringArray C.V2.ICommonCompilerOptions.PreprocessorUndefines
+        {
+            get;
+            set;
+        }
+    }
+
+    public sealed class CxxCompilerSettings :
+        Bam.Core.V2.Settings,
+        C.V2.ICommonCompilerOptions,
+        C.V2.ICxxOnlyCompilerOptions
+    {
+        C.V2.EBit? C.V2.ICommonCompilerOptions.Bits
+        {
+            get;
+            set;
+        }
+
+        C.V2.PreprocessorDefinitions C.V2.ICommonCompilerOptions.PreprocessorDefines
+        {
+            get;
+            set;
+        }
+
+        Bam.Core.Array<Bam.Core.V2.TokenizedString> C.V2.ICommonCompilerOptions.IncludePaths
+        {
+            get;
+            set;
+        }
+
+        Bam.Core.Array<Bam.Core.V2.TokenizedString> C.V2.ICommonCompilerOptions.SystemIncludePaths
+        {
+            get;
+            set;
+        }
+
+        C.ECompilerOutput? C.V2.ICommonCompilerOptions.OutputType
+        {
+            get;
+            set;
+        }
+
+        bool? C.V2.ICommonCompilerOptions.DebugSymbols
+        {
+            get;
+            set;
+        }
+
+        bool? C.V2.ICommonCompilerOptions.WarningsAsErrors
+        {
+            get;
+            set;
+        }
+
+        C.EOptimization? C.V2.ICommonCompilerOptions.Optimization
+        {
+            get;
+            set;
+        }
+
+        C.ETargetLanguage? C.V2.ICommonCompilerOptions.TargetLanguage
+        {
+            get;
+            set;
+        }
+
+        C.ELanguageStandard? C.V2.ICommonCompilerOptions.LanguageStandard
+        {
+            get;
+            set;
+        }
+
+        bool? C.V2.ICommonCompilerOptions.OmitFramePointer
+        {
+            get;
+            set;
+        }
+
+        Bam.Core.StringArray C.V2.ICommonCompilerOptions.DisableWarnings
+        {
+            get;
+            set;
+        }
+
+        Bam.Core.StringArray C.V2.ICommonCompilerOptions.PreprocessorUndefines
+        {
+            get;
+            set;
+        }
+
+        C.Cxx.EExceptionHandler C.V2.ICxxOnlyCompilerOptions.ExceptionHandler
+        {
+            get;
+            set;
+        }
+    }
+
+    public class LibrarianSettings :
+        Bam.Core.V2.Settings,
+        CommandLineProcessor.V2.IConvertToCommandLine,
+        C.V2.ICommonArchiverOptions,
+        IArchiverOptions
+    {
+        public LibrarianSettings(Bam.Core.V2.Module module)
+        {
+            (this as C.V2.ICommonArchiverOptions).Defaults(module);
+            (this as IArchiverOptions).Defaults(module);
+        }
+
+        void CommandLineProcessor.V2.IConvertToCommandLine.Convert(Bam.Core.V2.Module module, Bam.Core.StringArray commandLine)
+        {
+            (this as IArchiverOptions).Convert(module, commandLine);
+            // output file comes last, before inputs
+            (this as C.V2.ICommonArchiverOptions).Convert(module, commandLine);
+        }
+
+        C.EArchiverOutput C.V2.ICommonArchiverOptions.OutputType
+        {
+            get;
+            set;
+        }
+
+        bool IArchiverOptions.Ranlib
+        {
+            get;
+            set;
+        }
+
+        bool IArchiverOptions.DoNotWarnIfLibraryCreated
+        {
+            get;
+            set;
+        }
+
+        EArchiverCommand IArchiverOptions.Command
+        {
+            get;
+            set;
+        }
+    }
+
+    public class LinkerSettings :
+        Bam.Core.V2.Settings,
+        CommandLineProcessor.V2.IConvertToCommandLine,
+        C.V2.ICommonLinkerOptions
+    {
+        public LinkerSettings(Bam.Core.V2.Module module)
+        {
+            (this as C.V2.ICommonLinkerOptions).Defaults(module);
+        }
+
+        void CommandLineProcessor.V2.IConvertToCommandLine.Convert(Bam.Core.V2.Module module, Bam.Core.StringArray commandLine)
+        {
+            (this as C.V2.ICommonLinkerOptions).Convert(module, commandLine);
+        }
+
+        C.ELinkerOutput C.V2.ICommonLinkerOptions.OutputType
+        {
+            get;
+            set;
+        }
+
+        Bam.Core.Array<Bam.Core.V2.TokenizedString> C.V2.ICommonLinkerOptions.LibraryPaths
+        {
+            get;
+            set;
+        }
+    }
+
+    public static class Configure
+    {
+        static Configure()
+        {
+            InstallPath = Bam.Core.V2.TokenizedString.Create(@"/usr/bin", null);
+        }
+
+        public static Bam.Core.V2.TokenizedString InstallPath
+        {
+            get;
+            private set;
+        }
+    }
+
+    [C.V2.RegisterArchiver("GCC", Bam.Core.EPlatform.Unix)]
+    public sealed class Librarian :
+        C.V2.LibrarianTool
+    {
+        public Librarian()
+        {
+            this.Macros.Add("InstallPath", Configure.InstallPath);
+            this.Macros.Add("libprefix", "lib");
+            this.Macros.Add("libext", ".a");
+            this.Macros.Add("LibrarianPath", Bam.Core.V2.TokenizedString.Create("$(InstallPath)/ar", this));
+        }
+
+        public override Bam.Core.V2.Settings CreateDefaultSettings<T>(T module)
+        {
+            var settings = new LibrarianSettings(module);
+            return settings;
+        }
+
+        public override Bam.Core.V2.TokenizedString Executable
+        {
+            get
+            {
+                return this.Macros["LibrarianPath"];
+            }
+        }
+    }
+
+    [C.V2.RegisterLinker("GCC", Bam.Core.EPlatform.Unix)]
+    public sealed class Linker :
+        C.V2.LinkerTool
+    {
+        public Linker()
+        {
+            this.EnvironmentVariables.Add("PATH", new Bam.Core.V2.TokenizedStringArray(Bam.Core.V2.TokenizedString.Create(@"$(InstallPath)", this)));
+
+            this.Macros.Add("InstallPath", Configure.InstallPath);
+            this.Macros.Add("exeext", string.Empty);
+            this.Macros.Add("dynamicext", ".so");
+            this.Macros.Add("LinkerPath", Bam.Core.V2.TokenizedString.Create("$(InstallPath)/gcc-4.8", this));
+        }
+
+        public override bool UseLPrefixLibraryPaths
+        {
+            get
+            {
+                return true;
+            }
+        }
+
+        public override Bam.Core.V2.Settings CreateDefaultSettings<T>(T module)
+        {
+            var settings = new LinkerSettings(module);
+            return settings;
+        }
+
+        public override Bam.Core.V2.TokenizedString Executable
+        {
+            get
+            {
+                return this.Macros["LinkerPath"];
+            }
+        }
+    }
+
+    public abstract class CompilerBase :
+        C.V2.CompilerTool
+    {
+        protected CompilerBase()
+        {
+            this.Macros.Add("InstallPath", Configure.InstallPath);
+            this.Macros.Add("objext", ".o");
+        }
+
+        public override Bam.Core.V2.TokenizedString Executable
+        {
+            get
+            {
+                return this.Macros["CompilerPath"];
+            }
+        }
+
+        public override Bam.Core.V2.Settings CreateDefaultSettings<T>(T module)
+        {
+            if (typeof(C.Cxx.V2.ObjectFile).IsInstanceOfType(module) ||
+                typeof(C.Cxx.V2.ObjectFileCollection).IsInstanceOfType(module))
+            {
+                var settings = new CxxCompilerSettings();
+                this.OverrideDefaultSettings(settings);
+                return settings;
+            }
+            else if (typeof(C.V2.ObjectFile).IsInstanceOfType(module) ||
+                     typeof(C.V2.CObjectFileCollection).IsInstanceOfType(module))
+            {
+                var settings = new CompilerSettings(module);
+                this.OverrideDefaultSettings(settings);
+                return settings;
+            }
+            // TODO: objective C
+            else
+            {
+                throw new Bam.Core.Exception("Could not determine type of module {0}", typeof(T).ToString());
+            }
+        }
+
+        protected abstract void OverrideDefaultSettings(Bam.Core.V2.Settings settings);
+    }
+
+    [C.V2.RegisterCompiler("GCC", Bam.Core.EPlatform.Unix)]
+    public sealed class CCompiler :
+        CompilerBase
+    {
+        public CCompiler()
+        {
+            this.Macros.Add("CompilerPath", Bam.Core.V2.TokenizedString.Create("$(InstallPath)/gcc-4.8", this));
+        }
+
+        protected override void OverrideDefaultSettings(Bam.Core.V2.Settings settings)
+        {
+            var cSettings = settings as C.V2.ICommonCompilerOptions;
+            cSettings.TargetLanguage = C.ETargetLanguage.C;
+        }
+    }
+
+    public sealed class CxxCompiler :
+        CompilerBase
+    {
+        public CxxCompiler()
+        {
+            this.Macros.Add("CompilerPath", Bam.Core.V2.TokenizedString.Create("$(InstallPath)/g++-4.8", this));
+        }
+
+        protected override void OverrideDefaultSettings(Bam.Core.V2.Settings settings)
+        {
+            var cSettings = settings as C.V2.ICommonCompilerOptions;
+            cSettings.TargetLanguage = C.ETargetLanguage.Cxx;
+        }
+    }
+}
     // Not sealed since the C++ compiler inherits from it
     public partial class CCompilerOptionCollection :
         GccCommon.CCompilerOptionCollection,


Fix build warning

Fix build warning

--- Test/Helpers/ConfigHelper.cs
+++ Test/Helpers/ConfigHelper.cs
@@ -14,10 +14,13 @@

 	public static string TestSchemaDir => GetSetting("test_schema_dir");

-	public static string SqlDbDiffPath => GetSetting("SqlDbDiffPath");
-
 	private static string GetSetting(string key) {
 		var val = Environment.GetEnvironmentVariable(key);
-		return val ?? (config.TryGetValue(key, out val) ? val : null);
+		if (val != null) return val;
+
+		if (config.TryGetValue(key, out val)) return val;
+
+		throw new Exception(
+			$"Setting: {key} not found in appsettings or environment variable");
 	}
 }


Xunit TestCleanup - UnloadAllServers - using IDisposable

- Ensure UnloadAllServers is called for test cleanup.

- Using IDisposable for TestCleanup hooks with Xunit.

- Added (skeleton) Class Fixture to hold equivalent ClassInitialize/Cleanup functionality.

--- Tests/ServerTestHostTests.cs
+++ Tests/ServerTestHostTests.cs
@@ -11,9 +11,11 @@

 namespace Tests
 {
-    public class ServerTestHostTests
+    public class ServerTestHostTests : IClassFixture<ServerTestHostFixture>, IDisposable
     {
         private static readonly ILog log = LogManager.GetLogger(typeof(ServerTestHostTests));
+
+        private readonly ITestOutputHelper output;

         [Fact]
         public void LoadServerInNewAppDomain()
@@ -32,37 +34,45 @@

         #region Test Initialization / Cleanup methods

-        private readonly ITestOutputHelper output;
+        // TestInitialize
+        public ServerTestHostTests(ITestOutputHelper output, ServerTestHostFixture fixture)
+        {
+            this.output = output;
+            output.WriteLine("TestInitialize");

-        // ClassInitialize
-        public ServerTestHostTests(ITestOutputHelper output)
-        {
-            // Set up the log4net configuration from data in the App.config file.
-            XmlConfigurator.Configure();
+            output.WriteLine("Fixture = {0}", fixture);

-            this.output = output;
-
-            log.InfoFormat("ClassInitialize - Current directory = {0}", Environment.CurrentDirectory);
-        }
-
-        // TestInitialize
-        public void TestInitialize()
-        {
-            string testName = null; // TestContext.TestName;
-
-            output.WriteLine("TestInitialize - {0}", testName);
+            output.WriteLine("Current directory = {0}", Environment.CurrentDirectory);
         }

         // TestCleanup
-        public void TestCleanup()
+        public void Dispose()
         {
-            string testName = null; // TestContext.TestName;
+            output.WriteLine("TestCleanup");

-            output.WriteLine("TestCleanup - {0}", testName);
-
+            output.WriteLine("UnloadAllServers");
             ServerTestHost.UnloadAllServers();
         }
-
         #endregion
     }
+
+    public class ServerTestHostFixture : IDisposable
+    {
+        internal static readonly ILog log = LogManager.GetLogger(typeof(ServerTestHostFixture));
+
+        // ClassInitialize
+        public ServerTestHostFixture()
+        {
+            // Set up the log4net configuration.
+            BasicConfigurator.Configure();
+
+            log.Info("ServerTestHostFixture - Initialize");
+        }
+
+        // ClassCleanup
+        public void Dispose()
+        {
+            log.Info("ServerTestHostFixture - Dispose");
+        }
+    }
 }


check: Make missing breaking change a warning

--- Verbot/VerbotRepository.Checks.cs
+++ Verbot/VerbotRepository.Checks.cs
@@ -361,8 +361,7 @@

                 if (!hasBreakingChangeSincePreviousVersion)
                 {
-                    Trace.TraceError($"No breaking changes between {previousVersion} and {version}");
-                    passed = false;
+                    Trace.TraceWarning($"No breaking changes between {previousVersion} and {version}");
                     continue;
                 }
             }


HOTFIX

HOTFIX

--- ViewModels/MainWindowViewModel.cs
+++ ViewModels/MainWindowViewModel.cs
@@ -412,12 +412,15 @@

         public void TrackSelected(object param)
         {
-            mediaPlayer.NowPlaying = CurrentAlbum[(int)param];
-            OnPropertyChanged("NowPlayingTitle");
-            OnPropertyChanged("NowPlayingArtist");
-            Console.WriteLine("File Path: " + CurrentAlbum[(int)param].File);
-            this._myMediaElement.Source = new Uri(CurrentAlbum[(int)param].File);
-            PlayMedia(null);
+            if ((int)param < CurrentAlbum.Count())
+            {
+                mediaPlayer.NowPlaying = CurrentAlbum[(int)param];
+                OnPropertyChanged("NowPlayingTitle");
+                OnPropertyChanged("NowPlayingArtist");
+                Console.WriteLine("File Path: " + CurrentAlbum[(int)param].File);
+                this._myMediaElement.Source = new Uri(CurrentAlbum[(int)param].File);
+                PlayMedia(null);
+            }
         }

         #endregion


Set error type depending on severity (squiggle color)

--- VisualLinter/Tagging/LinterTag.cs
+++ VisualLinter/Tagging/LinterTag.cs
@@ -12,13 +12,16 @@

         internal LinterTag(LinterMessage message)
         {
-            ErrorType = GetErrorType(message.IsFatal);
+            ErrorType = GetErrorType(message);
             ToolTipContent = GetToolTipContent(message.IsFatal, message.Message, message.RuleId);
         }

-        private static string GetErrorType(bool isFatal)
+        private static string GetErrorType(LinterMessage message)
         {
-            return isFatal
+            if (message.IsFatal)
+                return PredefinedErrorTypeNames.SyntaxError;
+
+            return RuleSeverity.Error == message.Severity
                 ? PredefinedErrorTypeNames.SyntaxError
                 : PredefinedErrorTypeNames.Warning;
         }


Apply window placement second time to override possible WM_DPICHANGED reaction

--- WindowPositions/WindowPosition.cs
+++ WindowPositions/WindowPosition.cs
@@ -29,6 +29,8 @@
             WindowPlacement placement = this.Placement;

             window.Placement = placement;
+            // apply second time to override possible WM_DPICHANGED reaction
+            window.Placement = placement;
         }
     }
 }


version

version

--- Worker/Properties/AssemblyInfo.cs
+++ Worker/Properties/AssemblyInfo.cs
@@ -11,5 +11,5 @@
 [assembly: AssemblyCulture("")]
 [assembly: ComVisible(false)]
 [assembly: Guid("12fcdf6a-25ae-4673-a0aa-8d82238d5755")]
-[assembly: AssemblyVersion("1.0.0.9")]
-[assembly: AssemblyFileVersion("1.0.0.9")]+[assembly: AssemblyVersion("1.0.0.10")]
+[assembly: AssemblyFileVersion("1.0.0.10")]


Logging added

Logging added

--- TicTacToeGame.Common/Game.cs
+++ TicTacToeGame.Common/Game.cs
@@ -3,6 +3,7 @@
 using System.Linq;
 using System.Threading;
 using System.Threading.Tasks;
+using ITCC.Logging.Core;
 using TicTacToeGame.Common.Enums;
 using TicTacToeGame.Common.Interfaces;
 using TicTacToeGame.Common.Utils;
@@ -31,6 +32,7 @@
                 if (_started)
                     return;
                 _started = true;
+
             }

             _gameThread = new Thread(GameLoop);
@@ -64,6 +66,7 @@
             _currentSign = CellSign.X;
             _currentPlayer = _firstPlayer;
             _field = new CellSign[_height, _width];
+            LogMessage(LogLevel.Info, $"Game {_height}x{_width} created ({_firstPlayer.Name} vs {_secondPlayer.Name})");
         }

         private void GameLoop()
@@ -72,8 +75,17 @@
             {
                 _step++;
                 var move = GetNextMove();
-                if (move == null || !MoveIsValid(move))
-                {
+
+                if (move == null)
+                {
+                    LogMessage(LogLevel.Info, $"Move by {_currentPlayer.Name} took longer than {_botTurnLength}ms, {NotCurrentPlayer.Name} won");
+                    ReportCurrentMoveInvalid();
+                    return;
+                }
+
+                if (!MoveIsValid(move))
+                {
+                    LogMessage(LogLevel.Info, $"Move ({move.X}, {move.Y}) by {_currentPlayer.Name} is not valid, {NotCurrentPlayer.Name} won");
                     ReportCurrentMoveInvalid();
                     return;
                 }
@@ -81,19 +93,22 @@
                 ApplyMove(move);
                 if (LastMoveVictorious())
                 {
-
+                    LogMessage(LogLevel.Info, $"{_currentPlayer.Name} won with ({move.X}, {move.Y}) move");
                     ReportCurrentPlayerWon();
                     return;
                 }

                 if (FieldIsFull())
                 {
+                    LogMessage(LogLevel.Info, "Field is full, draw");
                     ReportDraw();
                     return;
                 }

+                LogMessage(LogLevel.Debug, $"Step {_step} computed, waiting for observers");
                 ReportGameStateChanged();
                 WaitStepProcessed();
+                LogMessage(LogLevel.Debug, $"Step {_step} processed");
                 MoveNextSign();
             }
         }
@@ -176,6 +191,7 @@
         {
             _field[move.X, move.Y] = _currentSign;
             _history.Add(move);
+            LogMessage(LogLevel.Debug, $"Move ({move.X}, {move.Y} applied)");
         }

         /*
@@ -310,6 +326,10 @@
             _currentPlayer,
             NotCurrentPlayer);

+        private void ReportMoveTimeout() => ReportGameEnded(_currentSign == CellSign.O ? GameState.OInvalidTurn : GameState.XInvalidTurn,
+            NotCurrentPlayer,
+            _currentPlayer);
+
         private void ReportCurrentMoveInvalid() => ReportGameEnded(_currentSign == CellSign.O ? GameState.OInvalidTurn : GameState.XInvalidTurn,
             NotCurrentPlayer,
             _currentPlayer);
@@ -326,6 +346,8 @@
         private void OnGameStateChanged(GameStateChangedEventArgs e) => GameStateChanged?.Invoke(this, e);

         private void OnGameEnded(GameEndedEventArgs e) => GameEnded?.Invoke(this, e);
+
+        private static void LogMessage(LogLevel level, string message) => Logger.LogEntry("TICTACTOE", level, message);

         private readonly int _width;
         private readonly int _height;


[KMS] UI.MapRender (9)

[KMS] UI.MapRender (9)

--- WzComparerR2.MapRender/MapData.cs
+++ WzComparerR2.MapRender/MapData.cs
@@ -543,6 +543,14 @@
         private void PreloadResource(ResourceLoader resLoader, LifeItem life)
         {
             string path;
+            if (life.Hide)
+            {
+                life.View = new LifeItem.ItemView()
+                {
+                    Animator = null
+                };
+                return;
+            }
             switch (life.Type)
             {
                 case LifeItem.LifeType.Mob:
@@ -740,6 +748,30 @@
                     }
                 }
             }
+            long now = Int64.Parse(DateTime.Now.ToString("yyyyMMddHHmm"));
+            foreach (var conditionNode in node.Nodes)
+            {
+                var condName = conditionNode.Text;
+                if (condName.StartsWith("condition"))
+                {
+                    if (conditionNode.Nodes["dateStart"].GetValueEx<long>(0) <= now && now <= conditionNode.Nodes["dateEnd"].GetValueEx<long>(0))
+                    {
+                        aniData.Clear();
+                        foreach (var conditionedActionNode in conditionNode.Nodes)
+                        {
+                            var conditionedActName = conditionedActionNode.Text;
+                            if (conditionedActName != "dateStart" && conditionedActName != "dateEnd")
+                            {
+                                var ani = resLoader.LoadAnimationData(conditionedActionNode) as RepeatableFrameAnimationData;
+                                if (ani != null)
+                                {
+                                    aniData.Add(condName + "/" + conditionedActName, ani);
+                                }
+                            }
+                        }
+                    }
+                }
+            }
             if (aniData.Count > 0)
             {
                 return new StateMachineAnimator(aniData);
@@ -792,7 +824,7 @@
         {
             Random r = new Random();
             var actions = new[] { "stand", "say", "mouse", "move", "hand", "laugh", "eye" };
-            var availActions = ani.Data.States.Where(act => actions.Contains(act)).ToArray();
+            var availActions = ani.Data.States.Where(act => actions.Where(acts => act.Contains(acts)).Count() > 0).ToArray();
             if (availActions.Length > 0)
             {
                 ani.AnimationEnd += (o, e) =>


[Mac] Refactor PopoverBackend a little to enable better native integration

The iOS designer needs these exposed APIs

--- Xwt.Mac/Xwt.Mac/PopoverBackend.cs
+++ Xwt.Mac/Xwt.Mac/PopoverBackend.cs
@@ -110,10 +110,7 @@

 		public void Show (Xwt.Popover.Position orientation, Xwt.Widget referenceWidget, Xwt.Rectangle positionRect, Xwt.Widget child)
 		{
-			var controller = new FactoryViewController (child);
-			popover = new NSPopover ();
-			popover.Behavior = NSPopoverBehavior.Transient;
-			popover.ContentViewController = controller;
+			popover = MakePopover (child);
 			ViewBackend backend = (ViewBackend)Toolkit.GetBackend (referenceWidget);
 			var reference = backend.Widget;
 			popover.Show (positionRect.ToRectangleF (),
@@ -125,8 +122,21 @@
 		{
 			popover.Close ();
 		}
+
+		public void Dispose ()
+		{
+			popover.Close ();
+		}
+
+		public static NSPopover MakePopover (Xwt.Widget child)
+		{
+			return new NSPopover {
+				Behavior = NSPopoverBehavior.Transient,
+				ContentViewController = new FactoryViewController (child)
+			};
+		}

-		NSRectEdge ToRectEdge (Xwt.Popover.Position pos)
+		public static NSRectEdge ToRectEdge (Xwt.Popover.Position pos)
 		{
 			switch (pos) {
 			case Popover.Position.Top:
@@ -136,11 +146,6 @@
 				return NSRectEdge.MinYEdge;
 			}
 		}
-
-		public void Dispose ()
-		{
-			popover.Close ();
-		}
 	}
 }


Bump version to 2.2.2

Bump version to 2.2.2

--- YAXBPC/Properties/AssemblyInfo.cs
+++ YAXBPC/Properties/AssemblyInfo.cs
@@ -33,4 +33,4 @@
 // by using the '*' as shown below:
 // [assembly: AssemblyVersion("1.0.*")]
 [assembly: AssemblyVersion("1.0.0.0")]
-[assembly: AssemblyFileVersion("2.1.0.0")]
+[assembly: AssemblyFileVersion("2.2.2.0")]


Adds OutputFilePath()

Adds OutputFilePath()

--- Transcoder/TranscoderFile.cs
+++ Transcoder/TranscoderFile.cs
@@ -78,7 +78,7 @@
 				encoderType.CommandLineArgs(RequiresDecoding),
 				FilePath,
 				bitrate,
-                Path.Combine(OutputFolderPath(baseOutputFolder), Path.ChangeExtension(FileName, encoderType.FileExtension))
+                OutputFilePath(encoderType, baseOutputFolder)
 			);

             return args;
@@ -88,7 +88,12 @@
 			return Path.Combine(baseOutputFolder, Folder);
 		}

-		public class Type
+        public String OutputFilePath(Type encoderType, String baseOutputFolder)
+        {
+            return Path.Combine(OutputFolderPath(baseOutputFolder), Path.ChangeExtension(FileName, encoderType.FileExtension));
+        }
+
+        public class Type
 		{
 			public static Type QTAAC = new Type() {
 				Name = "QuickTime AAC",


2015 05 C# Guard against short strings

2015 05 C# Guard against short strings

--- 2015/cs/AdventOfCode2015_CSharp/AdventOfCode2015.Core/Day05.cs
+++ 2015/cs/AdventOfCode2015_CSharp/AdventOfCode2015.Core/Day05.cs
@@ -50,7 +50,7 @@

         public static bool ContainsLetterTwiceInARow(string input)
         {
-            if (input.Length == 0) { return false; }
+            if (input.Length < 2) { return false; }
             return input
                 .Zip(input.Substring(1), ValueTuple.Create)
                 .Where(tuple => tuple.Item1 == tuple.Item2)


Make custom swagger attributes also work with parameter info

If somebody ever uses it as such, that is

--- ArchiSteamFarm/IPC/Integration/CustomAttributesSchemaFilter.cs
+++ ArchiSteamFarm/IPC/Integration/CustomAttributesSchemaFilter.cs
@@ -37,11 +37,17 @@
 				throw new ArgumentNullException(nameof(context));
 			}

-			if (context.MemberInfo == null) {
+			ICustomAttributeProvider customSwaggerAttributes;
+
+			if (context.MemberInfo != null) {
+				customSwaggerAttributes = context.MemberInfo;
+			} else if (context.ParameterInfo != null) {
+				customSwaggerAttributes = context.ParameterInfo;
+			} else {
 				return;
 			}

-			foreach (CustomSwaggerAttribute customSwaggerAttribute in context.MemberInfo.GetCustomAttributes<CustomSwaggerAttribute>()) {
+			foreach (CustomSwaggerAttribute customSwaggerAttribute in customSwaggerAttributes.GetCustomAttributes(typeof(CustomSwaggerAttribute), true)) {
 				customSwaggerAttribute.Apply(schema);
 			}
 		}


Signed-off-by: S <selvan.s@capgemini.com>

--- Cik.MagazineWeb.WebApp/Areas/Admin/Views/Shared/_Layout.cshtml
+++ Cik.MagazineWeb.WebApp/Areas/Admin/Views/Shared/_Layout.cshtml
@@ -42,7 +42,7 @@
             @RenderBody()

-
© @DateTime.Now.Year - By someone

+
© @DateTime.Now.Year - By Selvan


1.8.0: Centralizado códigos das colunas da tela de informações do team services

--- ControlePontos/Forms/TeamServices/TotalHorasIntegracaoAtual.cs
+++ ControlePontos/Forms/TeamServices/TotalHorasIntegracaoAtual.cs
@@ -13,6 +13,15 @@
 {
     internal partial class TotalHorasIntegracaoAtual : BaseForm
     {
+        private static class Colunas
+        {
+            public const int ID = 0;
+            public const int Criacao = 1;
+            public const int Titulo = 2;
+            public const int Estado = 3;
+            public const int Horas = 4;
+        }
+
         private readonly ITeamServiceServico tfs;
         private readonly ProgressoCarregamento progressoForm;
         private readonly CancellationTokenSource tokenSource;
@@ -50,7 +59,7 @@
         {
             var total = this.Grid.Rows.OfType<DataGridViewRow>().Select(linha =>
             {
-                var horaString = linha.Cells[4 /*Horas*/].Value?.ToString();
+                var horaString = linha.Cells[Colunas.Horas].Value?.ToString();

                 int hora;
                 if (int.TryParse(horaString, out hora))
@@ -114,11 +123,11 @@

         private void TotalHorasIntegracaoAtual_Load(object sender, EventArgs e)
         {
-            this.Grid.Columns[0].Width = 41;
-            this.Grid.Columns[1].Width = 116;
-            this.Grid.Columns[2].Width = 555;
-            this.Grid.Columns[3].Width = 63;
-            this.Grid.Columns[4].Width = 45;
+            this.Grid.Columns[Colunas.ID].Width = 41;
+            this.Grid.Columns[Colunas.Criacao].Width = 116;
+            this.Grid.Columns[Colunas.Titulo].Width = 555;
+            this.Grid.Columns[Colunas.Estado].Width = 63;
+            this.Grid.Columns[Colunas.Horas].Width = 45;

             this.progressoForm.Titulo = this.progressoForm.Mensagem = "Carregando...";
             this.progressoForm.TotalPassos = 3;
@@ -136,7 +145,7 @@

         private void Grid_CellContentClick(object sender, DataGridViewCellEventArgs e)
         {
-            if (e.ColumnIndex == 0 /*ID*/ && e.RowIndex >= 0)
+            if (e.ColumnIndex == Colunas.ID && e.RowIndex >= 0)
             {
                 var id = this.Grid.Rows[e.RowIndex].Cells[e.ColumnIndex].Value?.ToString();
                 var url = $@"http://waplprd26v:8080/tfs/DEMOGRAF_SOCIAIS/GECEN.SIGC/_workitems?id={id}&_a=edit";
@@ -147,7 +156,7 @@

         private void Grid_CellBeginEdit(object sender, DataGridViewCellCancelEventArgs e)
         {
-            if (e.ColumnIndex == 4 /*Horas*/)
+            if (e.ColumnIndex == Colunas.Horas)
             {
                 var horasString = this.Grid.Rows[e.RowIndex].Cells[e.ColumnIndex].Value?.ToString();

@@ -166,10 +175,10 @@

         private void Grid_CellEndEdit(object sender, DataGridViewCellEventArgs e)
         {
-            if (e.ColumnIndex == 4 /*Horas*/)
+            if (e.ColumnIndex == Colunas.Horas)
             {
                 var horasString = this.Grid.Rows[e.RowIndex].Cells[e.ColumnIndex].Value?.ToString();
-                var idString = this.Grid.Rows[e.RowIndex].Cells[0/*ID*/].Value?.ToString();
+                var idString = this.Grid.Rows[e.RowIndex].Cells[Colunas.ID].Value?.ToString();

                 if (!string.IsNullOrEmpty(idString))
                 {