Add overloads to constructors for friendlyName parameter.

--- cslacs/Csla/Validation/CommonRules.cs
+++ cslacs/Csla/Validation/CommonRules.cs
@@ -109,12 +109,46 @@
       /// Create a new object.
       /// </summary>
       /// <param name="propertyName">Name of the property to validate.</param>
+      /// <param name="friendlyName">A friendly name for the property, which
+      /// will be used in place of the property name when
+      /// creating the broken rule description string.</param>
+      /// <param name="maxLength">Max length of characters allowed.</param>
+      public MaxLengthRuleArgs(
+        string propertyName, string friendlyName, int maxLength)
+        : base(propertyName, friendlyName)
+      {
+        this["MaxLength"] = maxLength;
+        this["Format"] = string.Empty;
+      }
+
+      /// <summary>
+      /// Create a new object.
+      /// </summary>
+      /// <param name="propertyName">Name of the property to validate.</param>
       /// <param name="maxLength">Max length of characters allowed.</param>
       /// <param name="format">Format string for the max length
       /// value in the broken rule string.</param>
       public MaxLengthRuleArgs(
         string propertyName, int maxLength, string format)
         : base(propertyName)
+      {
+        this["MaxLength"] = maxLength;
+        this["Format"] = format;
+      }
+
+      /// <summary>
+      /// Create a new object.
+      /// </summary>
+      /// <param name="propertyName">Name of the property to validate.</param>
+      /// <param name="friendlyName">A friendly name for the property, which
+      /// will be used in place of the property name when
+      /// creating the broken rule description string.</param>
+      /// <param name="maxLength">Max length of characters allowed.</param>
+      /// <param name="format">Format string for the max length
+      /// value in the broken rule string.</param>
+      public MaxLengthRuleArgs(
+        string propertyName, string friendlyName, int maxLength, string format)
+        : base(propertyName, friendlyName)
       {
         this["MaxLength"] = maxLength;
         this["Format"] = format;
@@ -192,12 +226,46 @@
       /// Create a new object.
       /// </summary>
       /// <param name="propertyName">Name of the property to validate.</param>
+      /// <param name="friendlyName">A friendly name for the property, which
+      /// will be used in place of the property name when
+      /// creating the broken rule description string.</param>
+      /// <param name="minLength">min length of characters allowed.</param>
+      public MinLengthRuleArgs(
+        string propertyName, string friendlyName, int minLength)
+        : base(propertyName, friendlyName)
+      {
+        this["MinLength"] = minLength;
+        this["Format"] = string.Empty;
+      }
+
+      /// <summary>
+      /// Create a new object.
+      /// </summary>
+      /// <param name="propertyName">Name of the property to validate.</param>
       /// <param name="minLength">min length of characters allowed.</param>
       /// <param name="format">Format string for the min length
       /// value in the broken rule string.</param>
       public MinLengthRuleArgs(
         string propertyName, int minLength, string format)
         : base(propertyName)
+      {
+        this["MinLength"] = minLength;
+        this["Format"] = format;
+      }
+
+      /// <summary>
+      /// Create a new object.
+      /// </summary>
+      /// <param name="propertyName">Name of the property to validate.</param>
+      /// <param name="friendlyName">A friendly name for the property, which
+      /// will be used in place of the property name when
+      /// creating the broken rule description string.</param>
+      /// <param name="minLength">min length of characters allowed.</param>
+      /// <param name="format">Format string for the min length
+      /// value in the broken rule string.</param>
+      public MinLengthRuleArgs(
+        string propertyName, string friendlyName, int minLength, string format)
+        : base(propertyName, friendlyName)
       {
         this["MinLength"] = minLength;
         this["Format"] = format;
@@ -266,11 +334,45 @@
       /// Create a new object.
       /// </summary>
       /// <param name="propertyName">Name of the property.</param>
+      /// <param name="friendlyName">A friendly name for the property, which
+      /// will be used in place of the property name when
+      /// creating the broken rule description string.</param>
+      /// <param name="maxValue">Maximum allowed value for the property.</param>
+      public IntegerMaxValueRuleArgs(
+        string propertyName, string friendlyName, int maxValue)
+        : base(propertyName, friendlyName)
+      {
+        this["MaxValue"] = maxValue;
+        this["Format"] = string.Empty;
+      }
+
+      /// <summary>
+      /// Create a new object.
+      /// </summary>
+      /// <param name="propertyName">Name of the property.</param>
       /// <param name="maxValue">Maximum allowed value for the property.</param>
       /// <param name="format">Format string for the max value
       /// value in the broken rule string.</param>
       public IntegerMaxValueRuleArgs(string propertyName, int maxValue, string format)
         : base(propertyName)
+      {
+        this["MaxValue"] = maxValue;
+        this["Format"] = format;
+      }
+
+      /// <summary>
+      /// Create a new object.
+      /// </summary>
+      /// <param name="propertyName">Name of the property.</param>
+      /// <param name="friendlyName">A friendly name for the property, which
+      /// will be used in place of the property name when
+      /// creating the broken rule description string.</param>
+      /// <param name="maxValue">Maximum allowed value for the property.</param>
+      /// <param name="format">Format string for the max value
+      /// value in the broken rule string.</param>
+      public IntegerMaxValueRuleArgs(
+        string propertyName, string friendlyName, int maxValue, string format)
+        : base(propertyName, friendlyName)
       {
         this["MaxValue"] = maxValue;
         this["Format"] = format;
@@ -339,11 +441,45 @@
       /// Create a new object.
       /// </summary>
       /// <param name="propertyName">Name of the property.</param>
+      /// <param name="friendlyName">A friendly name for the property, which
+      /// will be used in place of the property name when
+      /// creating the broken rule description string.</param>
+      /// <param name="minValue">Minimum allowed value for the property.</param>
+      public IntegerMinValueRuleArgs(
+        string propertyName, string friendlyName, int minValue)
+        : base(propertyName, friendlyName)
+      {
+        this["MinValue"] = minValue;
+        this["Format"] = string.Empty;
+      }
+
+      /// <summary>
+      /// Create a new object.
+      /// </summary>
+      /// <param name="propertyName">Name of the property.</param>
       /// <param name="minValue">Minimum allowed value for the property.</param>
       /// <param name="format">Format string for the min value
       /// value in the broken rule string.</param>
       public IntegerMinValueRuleArgs(string propertyName, int minValue, string format)
         : base(propertyName)
+      {
+        this["MinValue"] = minValue;
+        this["Format"] = format;
+      }
+
+      /// <summary>
+      /// Create a new object.
+      /// </summary>
+      /// <param name="propertyName">Name of the property.</param>
+      /// <param name="friendlyName">A friendly name for the property, which
+      /// will be used in place of the property name when
+      /// creating the broken rule description string.</param>
+      /// <param name="minValue">Minimum allowed value for the property.</param>
+      /// <param name="format">Format string for the min value
+      /// value in the broken rule string.</param>
+      public IntegerMinValueRuleArgs(
+        string propertyName, string friendlyName, int minValue, string format)
+        : base(propertyName, friendlyName)
       {
         this["MinValue"] = minValue;
         this["Format"] = format;
@@ -418,11 +554,45 @@
       /// Create a new object.
       /// </summary>
       /// <param name="propertyName">Name of the property.</param>
+      /// <param name="friendlyName">A friendly name for the property, which
+      /// will be used in place of the property name when
+      /// creating the broken rule description string.</param>
+      /// <param name="maxValue">Maximum allowed value for the property.</param>
+      public MaxValueRuleArgs(
+        string propertyName, string friendlyName, T maxValue)
+        : base(propertyName, friendlyName)
+      {
+        this["MaxValue"] = maxValue;
+        this["Format"] = string.Empty;
+      }
+
+      /// <summary>
+      /// Create a new object.
+      /// </summary>
+      /// <param name="propertyName">Name of the property.</param>
       /// <param name="maxValue">Maximum allowed value for the property.</param>
       /// <param name="format">Format string for the max value
       /// value in the broken rule string.</param>
       public MaxValueRuleArgs(string propertyName, T maxValue, string format)
         : base(propertyName)
+      {
+        this["MaxValue"] = maxValue;
+        this["Format"] = format;
+      }
+
+      /// <summary>
+      /// Create a new object.
+      /// </summary>
+      /// <param name="propertyName">Name of the property.</param>
+      /// <param name="friendlyName">A friendly name for the property, which
+      /// will be used in place of the property name when
+      /// creating the broken rule description string.</param>
+      /// <param name="maxValue">Maximum allowed value for the property.</param>
+      /// <param name="format">Format string for the max value
+      /// value in the broken rule string.</param>
+      public MaxValueRuleArgs(
+        string propertyName, string friendlyName, T maxValue, string format)
+        : base(propertyName, friendlyName)
       {
         this["MaxValue"] = maxValue;
         this["Format"] = format;
@@ -497,11 +667,45 @@
       /// Create a new object.
       /// </summary>
       /// <param name="propertyName">Name of the property.</param>
+      /// <param name="friendlyName">A friendly name for the property, which
+      /// will be used in place of the property name when
+      /// creating the broken rule description string.</param>
+      /// <param name="minValue">Minimum allowed value for the property.</param>
+      public MinValueRuleArgs(
+        string propertyName, string friendlyName, T minValue)
+        : base(propertyName, friendlyName)
+      {
+        this["MinValue"] = minValue;
+        this["Format"] = string.Empty;
+      }
+
+      /// <summary>
+      /// Create a new object.
+      /// </summary>
+      /// <param name="propertyName">Name of the property.</param>
       /// <param name="minValue">Minimum allowed value for the property.</param>
       /// <param name="format">Format string for the min value
       /// value in the broken rule string.</param>
       public MinValueRuleArgs(string propertyName, T minValue, string format)
         : base(propertyName)
+      {
+        this["MinValue"] = minValue;
+        this["Format"] = format;
+      }
+
+      /// <summary>
+      /// Create a new object.
+      /// </summary>
+      /// <param name="propertyName">Name of the property.</param>
+      /// <param name="friendlyName">A friendly name for the property, which
+      /// will be used in place of the property name when
+      /// creating the broken rule description string.</param>
+      /// <param name="minValue">Minimum allowed value for the property.</param>
+      /// <param name="format">Format string for the min value
+      /// value in the broken rule string.</param>
+      public MinValueRuleArgs(
+        string propertyName, string friendlyName, T minValue, string format)
+        : base(propertyName, friendlyName)
       {
         this["MinValue"] = minValue;
         this["Format"] = format;
@@ -647,6 +851,22 @@
       /// Creates a new object.
       /// </summary>
       /// <param name="propertyName">Name of the property to validate.</param>
+      /// <param name="friendlyName">A friendly name for the property, which
+      /// will be used in place of the property name when
+      /// creating the broken rule description string.</param>
+      /// <param name="pattern">Built-in regex pattern to use.</param>
+      public RegExRuleArgs(
+        string propertyName, string friendlyName, RegExPatterns pattern)
+        : base(propertyName, friendlyName)
+      {
+        this["RegEx"] = new Regex(GetPattern(pattern));
+        this["NullOption"] = NullResultOptions.ReturnFalse;
+      }
+
+      /// <summary>
+      /// Creates a new object.
+      /// </summary>
+      /// <param name="propertyName">Name of the property to validate.</param>
       /// <param name="pattern">Custom regex pattern to use.</param>
       public RegExRuleArgs(string propertyName, string pattern)
         : base(propertyName)
@@ -659,9 +879,41 @@
       /// Creates a new object.
       /// </summary>
       /// <param name="propertyName">Name of the property to validate.</param>
+      /// <param name="friendlyName">A friendly name for the property, which
+      /// will be used in place of the property name when
+      /// creating the broken rule description string.</param>
+      /// <param name="pattern">Custom regex pattern to use.</param>
+      public RegExRuleArgs(
+        string propertyName, string friendlyName, string pattern)
+        : base(propertyName, friendlyName)
+      {
+        this["RegEx"] = new Regex(pattern);
+        this["NullOption"] = NullResultOptions.ReturnFalse;
+      }
+
+      /// <summary>
+      /// Creates a new object.
+      /// </summary>
+      /// <param name="propertyName">Name of the property to validate.</param>
       /// <param name="regEx"><see cref="RegEx"/> object to use.</param>
       public RegExRuleArgs(string propertyName, System.Text.RegularExpressions.Regex regEx)
         : base(propertyName)
+      {
+        this["RegEx"] = regEx;
+        this["NullOption"] = NullResultOptions.ReturnFalse;
+      }
+
+      /// <summary>
+      /// Creates a new object.
+      /// </summary>
+      /// <param name="propertyName">Name of the property to validate.</param>
+      /// <param name="friendlyName">A friendly name for the property, which
+      /// will be used in place of the property name when
+      /// creating the broken rule description string.</param>
+      /// <param name="regEx"><see cref="RegEx"/> object to use.</param>
+      public RegExRuleArgs(
+        string propertyName, string friendlyName, System.Text.RegularExpressions.Regex regEx)
+        : base(propertyName, friendlyName)
       {
         this["RegEx"] = regEx;
         this["NullOption"] = NullResultOptions.ReturnFalse;
@@ -687,6 +939,26 @@
       /// Creates a new object.
       /// </summary>
       /// <param name="propertyName">Name of the property to validate.</param>
+      /// <param name="friendlyName">A friendly name for the property, which
+      /// will be used in place of the property name when
+      /// creating the broken rule description string.</param>
+      /// <param name="pattern">Built-in regex pattern to use.</param>
+      /// <param name="nullResult">
+      /// Value indicating how a null value should be
+      /// handled by the rule method.
+      /// </param>
+      public RegExRuleArgs(
+        string propertyName, string friendlyName, RegExPatterns pattern, NullResultOptions nullResult)
+        : base(propertyName, friendlyName)
+      {
+        this["RegEx"] = new Regex(GetPattern(pattern));
+        this["NullOption"] = nullResult;
+      }
+
+      /// <summary>
+      /// Creates a new object.
+      /// </summary>
+      /// <param name="propertyName">Name of the property to validate.</param>
       /// <param name="pattern">Custom regex pattern to use.</param>
       /// <param name="nullResult">
       /// Value indicating how a null value should be
@@ -703,6 +975,26 @@
       /// Creates a new object.
       /// </summary>
       /// <param name="propertyName">Name of the property to validate.</param>
+      /// <param name="friendlyName">A friendly name for the property, which
+      /// will be used in place of the property name when
+      /// creating the broken rule description string.</param>
+      /// <param name="pattern">Custom regex pattern to use.</param>
+      /// <param name="nullResult">
+      /// Value indicating how a null value should be
+      /// handled by the rule method.
+      /// </param>
+      public RegExRuleArgs(
+        string propertyName, string friendlyName, string pattern, NullResultOptions nullResult)
+        : base(propertyName, friendlyName)
+      {
+        this["RegEx"] = new Regex(pattern);
+        this["NullOption"] = nullResult;
+      }
+
+      /// <summary>
+      /// Creates a new object.
+      /// </summary>
+      /// <param name="propertyName">Name of the property to validate.</param>
       /// <param name="regEx"><see cref="RegEx"/> object to use.</param>
       /// <param name="nullResult">
       /// Value indicating how a null value should be
@@ -710,6 +1002,26 @@
       /// </param>
       public RegExRuleArgs(string propertyName, System.Text.RegularExpressions.Regex regEx, NullResultOptions nullResult)
         : base(propertyName)
+      {
+        this["RegEx"] = regEx;
+        this["NullOption"] = nullResult;
+      }
+
+      /// <summary>
+      /// Creates a new object.
+      /// </summary>
+      /// <param name="propertyName">Name of the property to validate.</param>
+      /// <param name="friendlyName">A friendly name for the property, which
+      /// will be used in place of the property name when
+      /// creating the broken rule description string.</param>
+      /// <param name="regEx"><see cref="RegEx"/> object to use.</param>
+      /// <param name="nullResult">
+      /// Value indicating how a null value should be
+      /// handled by the rule method.
+      /// </param>
+      public RegExRuleArgs(
+        string propertyName, string friendlyName, System.Text.RegularExpressions.Regex regEx, NullResultOptions nullResult)
+        : base(propertyName, friendlyName)
       {
         this["RegEx"] = regEx;
         this["NullOption"] = nullResult;


Include the maximum number of Cell Styles in the spreadsheet versions class

--- main/SS/SpreadsheetVersion.cs
+++ main/SS/SpreadsheetVersion.cs
@@ -25,7 +25,7 @@
          *
Length of text cell contents is 32767

          *

          */
-        public static SpreadsheetVersion EXCEL97 = new SpreadsheetVersion("xls", 0x10000, 0x0100, 30, 3, 32767);
+        public static SpreadsheetVersion EXCEL97 = new SpreadsheetVersion("xls", 0x10000, 0x0100, 30, 3, 4000, 32767);

         /**
          * Excel2007
@@ -39,22 +39,24 @@
          *
Length of text cell contents is unlimited

          *

          */
-        public static SpreadsheetVersion EXCEL2007 = new SpreadsheetVersion("xlsx", 0x100000, 0x4000, 255, Int32.MaxValue, Int32.MaxValue);
+        public static SpreadsheetVersion EXCEL2007 = new SpreadsheetVersion("xlsx", 0x100000, 0x4000, 255, Int32.MaxValue, 64000, Int32.MaxValue);

         private string _defaultExtension;
         private int _maxRows;
         private int _maxColumns;
         private int _maxFunctionArgs;
         private int _maxCondFormats;
+        private int _maxCellStyles;
         private int _maxTextLength;

-        private SpreadsheetVersion(string defaultExtension, int maxRows, int maxColumns, int maxFunctionArgs, int maxCondFormats, int maxText)
+        private SpreadsheetVersion(string defaultExtension, int maxRows, int maxColumns, int maxFunctionArgs, int maxCondFormats, int maxCellStyles, int maxText)
         {
             _defaultExtension = defaultExtension;
             _maxRows = maxRows;
             _maxColumns = maxColumns;
             _maxFunctionArgs = maxFunctionArgs;
             _maxCondFormats = maxCondFormats;
+            _maxCellStyles = maxCellStyles;
             _maxTextLength = maxText;
         }

@@ -148,7 +150,16 @@
                 return CellReference.ConvertNumToColString(LastColumnIndex);
             }
         }
-
+        /**
+        * @return the maximum number of cell styles per spreadsheet
+        */
+        public int MaxCellStyles
+        {
+            get
+            {
+                return _maxCellStyles;
+            }
+        }
         /**
          * @return the maximum length of a text cell
          */


use GITHUB_TOKEN

use GITHUB_TOKEN

--- tools/anglesharp.cake
+++ tools/anglesharp.cake
@@ -160,7 +160,7 @@
     .IsDependentOn("Run-Unit-Tests")
     .Does(() =>
     {
-        var githubToken = EnvironmentVariable("GITHUB_API_TOKEN");
+        var githubToken = EnvironmentVariable("GITHUB_TOKEN");

         if (String.IsNullOrEmpty(githubToken))
         {


Testing more stuff

Testing more stuff

--- Api/Controllers/AuthController.cs
+++ Api/Controllers/AuthController.cs
@@ -51,7 +51,17 @@
             {
                 _logger.Log("Post api/auth. Object AuthRequestViewModel initial: pw" + obj.Password + "user" + obj.UserName, "api", 3);

-                var user = AuthRepo.Get(x => string.Equals(Encryptor.DecryptUserName(x.UserName), obj.UserName, StringComparison.CurrentCultureIgnoreCase)).FirstOrDefault();
+                var users = AuthRepo.Get();
+                UserAuth user = null;
+                foreach(var u in users)
+                {
+                    var decryptedUserName = Encryptor.DecryptUserName(u.UserName);
+                    if (decryptedUserName.Equals(obj.UserName, StringComparison.CurrentCultureIgnoreCase))
+                    {
+                        user = u;
+                    }
+                }
+                //var user = AuthRepo.Get(x => string.Equals(Encryptor.DecryptUserName(x.UserName), obj.UserName, StringComparison.CurrentCultureIgnoreCase)).FirstOrDefault();

                 var auth = Encryptor.EncryptAuthRequest(obj);


(BgdFormat.Read): cleaned up.

(BgdFormat.Read): cleaned up.

--- ArcFormats/GameSystem/ImageBGD.cs
+++ ArcFormats/GameSystem/ImageBGD.cs
@@ -64,30 +64,28 @@
             file.Position = 0x10;
             for (int i = 0; i < count; ++i)
             {
-                byte c = file.ReadUInt8();
+                int c = file.ReadInt24();
                 s1 = s1 << 4 | c & 0xF;
                 s2 = s2 << 4 | (c >> 4) & 0xF;
+                s3 = s3 << 4 | (c >> 8) & 0xF;
                 b += RgbShift[s1];
                 g += RgbShift[s2];
-                c = file.ReadUInt8();
-                s3 = s3 << 4 | c & 0xF;
                 r += RgbShift[s3];
                 pixels[dst++] = (byte)b;
                 pixels[dst++] = (byte)g;
                 pixels[dst++] = (byte)r;
-                s3 = ShiftTable[s3] << 4 | (c >> 4) & 0xF;
-                c = file.ReadUInt8();
-                s1 = ShiftTable[s1] << 4 | c & 0xF;
-                s2 = ShiftTable[s2] << 4 | (c >> 4) & 0xF;
+                s1 = ShiftTable[s1] << 4 | (c >> 16) & 0xF;
+                s2 = ShiftTable[s2] << 4 | (c >> 20) & 0xF;
+                s3 = ShiftTable[s3] << 4 | (c >> 12) & 0xF;
                 b += RgbShift[s1];
                 g += RgbShift[s2];
                 r += RgbShift[s3];
+                pixels[dst++] = (byte)b;
+                pixels[dst++] = (byte)g;
+                pixels[dst++] = (byte)r;
                 s1 = ShiftTable[s1];
                 s2 = ShiftTable[s2];
                 s3 = ShiftTable[s3];
-                pixels[dst++] = (byte)b;
-                pixels[dst++] = (byte)g;
-                pixels[dst++] = (byte)r;
             }
             return ImageData.CreateFlipped (info, PixelFormats.Bgr24, null, pixels, (int)info.Width*3);
         }


Revert changes to UniqueQueue

Revert changes to UniqueQueue

--- Assets/MapGen/Util/UniqueQueue.cs
+++ Assets/MapGen/Util/UniqueQueue.cs
@@ -2,80 +2,63 @@

 namespace Util
 {
-    /// <summary>
-    /// Class for storing a queue of elements with unique keys;
-    /// E.g. map blocks for meshing, where we don't want to
-    /// mesh the same block twice.
-    /// Thread safe.
-    /// </summary>
+    // Class for storing a queue of elements with unique keys;
+    // E.g. map blocks for meshing, where we don't want to
+    // mesh the same block twice.
     public sealed class UniqueQueue<Key, Value> {
         private Dictionary<Key, Value> dict;
+        private Queue<Key> queue;

-        /// <summary>
-        /// Gets the number of elements in this queue.
-        /// </summary>
-        /// <value>The count.</value>
         public int Count {
             get {
-                lock (this) {
-                    return dict.Count;
+                int dictCount = dict.Count;
+                if (dictCount != queue.Count) {
+                    throw new System.InvalidOperationException("Inconsistent state?");
                 }
+                return dictCount;
             }
         }

-        /// <summary>
-        /// Initializes a new instance of the <see cref="Util.UniqueQueue`2"/> class.
-        /// </summary>
-        /// <param name="capacity">Capacity.</param>
         public UniqueQueue() {
             dict = new Dictionary<Key, Value>();
+            queue = new Queue<Key>();
         }

-        /// <summary>
-        /// Enqueues a value and returns anything it displaced.
-        /// Currently throws an exception if it hits the queue capacity, to
-        /// avoid deadlock; there should be a better solution.
-        /// </summary>
-        /// <returns>The displaced value, or default(Value) if there was none.</returns>
-        /// <param name="key">The key.</param>
-        /// <param name="value">The value.</param>
+        // Push a value and return anything it displaced
         public Value EnqueueAndDisplace(Key key, Value value) {
-            lock (this) {
+            if (dict.ContainsKey(key)) {
+                // This key is already in the queue.
+                Value result = dict[key];
+                dict.Remove(key);
+                dict[key] = value;
+                return result;
+            } else {
+                // This key isn't in the queue; add it:
+                queue.Enqueue(key);
+                dict[key] = value;
+                return default(Value);
+            }
+        }
+
+        public Value this[Key key] {
+            get {
                 if (dict.ContainsKey(key)) {
-                    // This key is already in the queue.
-                    Value result = dict[key];
-                    dict.Remove(key);
-                    dict[key] = value;
-                    return result;
+                    return dict[key];
                 } else {
-                    // This key isn't in the queue; add it:
-                    dict[key] = value;
                     return default(Value);
                 }
             }
         }

-        public Value this[Key key] {
-            get {
-                lock(this) {
-                    if (dict.ContainsKey(key)) {
-                        return dict[key];
-                    } else {
-                        return default(Value);
-                    }
-                }
+        public Value Dequeue() {
+            if (queue.Count == 0) return default(Value);
+            Key next = queue.Dequeue();
+            if (!dict.ContainsKey(next)) {
+                throw new System.InvalidOperationException("Dict doesn't contain queue entry, sky is falling");
             }
-        }
-
-        public Value Dequeue() {
-            lock(this) {
-                if (dict.Count == 0) return default(Value);
-
-                Key next = dict.Keys[0];
-                Value result = dict[next];
-                dict.Remove(next);
-                return result;
-            }
+            Value result = dict[next];
+            dict.Remove(next);
+            return result;
         }
     }
 }


Fix an issue with release notes

Fix an issue with release notes

--- tools/ReleaseNotes/Program.cs
+++ tools/ReleaseNotes/Program.cs
@@ -189,7 +189,7 @@
 						continue;
 					}

-					if (currentReleaseVersion.Major == releasingSuite && (highestReleaseVersion == null || currentReleaseVersion > highestReleaseVersion))
+					if (currentReleaseVersion.Major == releasingSuite && (highestReleaseVersion == null || currentReleaseVersion > highestReleaseVersion) && version != currentReleaseVersion)
 					{
 						highestReleaseVersion = currentReleaseVersion;
 						highestRelease = I;
@@ -208,13 +208,10 @@
 				//trim away all the lines that don't start with #

 				string keepThisRelease;
-				if (version.Major != 4 && version.Revision == 0)
-					if (version.Build == 0)
-						keepThisRelease = "# ";
-					else
-						keepThisRelease = "## ";
+				if (version.Build == 0)
+					keepThisRelease = "# ";
 				else
-					keepThisRelease = "### ";
+					keepThisRelease = "## ";

 				for (; !splits[0].StartsWith(keepThisRelease, StringComparison.Ordinal); splits.RemoveAt(0))
 					if (splits.Count == 1)


Refactor

Refactor

--- Assets/Scripts/Room/RoomLoader.cs
+++ Assets/Scripts/Room/RoomLoader.cs
@@ -114,10 +114,11 @@

 	void SetRoomObjectsVisibility(int room)
 	{
-		bool showallrooms = ShowRooms.Value == 3 || ShowRooms.Value == 2;
-		bool showallroomstransparent = ShowRooms.Value == 2;
-		bool showcolliders = ShowRooms.Value != 0;
-		bool showtiggers = ShowTriggers.BoolValue;
+		bool showAllRooms = ShowRooms.Value == 3 || ShowRooms.Value == 2;
+		bool showAllRoomsTransparent = ShowRooms.Value == 2;
+		bool showColliders = ShowRooms.Value != 0;
+		bool showTriggers = ShowTriggers.BoolValue;
+		bool showAreas = ShowAreas.Value != 0;

 		int roomIndex = 0;
 		var dosBox = GetComponent<DosBox>();
@@ -125,7 +126,7 @@
 			dosBox.CurrentCameraRoom >= 0 && dosBox.CurrentCameraRoom < camerasPerRoom.Count &&
 			currentCamera >= 0 && currentCamera < camerasPerRoom[dosBox.CurrentCameraRoom].Count ? camerasPerRoom[dosBox.CurrentCameraRoom][currentCamera] : -1;

-		CameraFrustum.SetActive(ShowAreas.Value != 0 && currentCameraBox != null);
+		CameraFrustum.SetActive(showAreas && currentCameraBox != null);

 		foreach (Transform roomTransform in rooms)
 		{
@@ -139,7 +140,7 @@
 			{
 				if (box.name == "Trigger")
 				{
-					box.gameObject.SetActive(showtiggers && currentRoom);
+					box.gameObject.SetActive(showTriggers && currentRoom);
 				}

 				if (box.name == "Camera")
@@ -152,8 +153,8 @@

 				if (box.name == "Collider")
 				{
-					box.gameObject.SetActive(showcolliders && (showallrooms || currentRoom));
-					box.Alpha = (byte)((showallroomstransparent && !currentRoom) ? 40 : 255);
+					box.gameObject.SetActive(showColliders && (showAllRooms || currentRoom));
+					box.Alpha = (byte)((showAllRoomsTransparent && !currentRoom) ? 40 : 255);
 				}
 			}
 			roomIndex++;


Refactor

Refactor

--- Assets/Scripts/Room/RoomLoader.cs
+++ Assets/Scripts/Room/RoomLoader.cs
@@ -72,7 +72,7 @@
 		floor = floors.FirstOrDefault();
 		gameVersion = DetectGame();

-		CheckCommandLine();
+		ParseCommandLine();
 		if (floors.Count > 0)
 		{
 			RefreshRooms();
@@ -929,10 +929,7 @@
 				Vector3 cameraHeight = new Vector3(0.0f, 0.0f, Camera.main.transform.position.y);
 				Vector3 position = Camera.main.ScreenToWorldPoint(Input.mousePosition + cameraHeight);
 				Camera.main.transform.position = new Vector3(position.x, Camera.main.transform.position.y, position.z);
-
-				//reset zoom
-				float planeWidth = Mathf.Tan(Camera.main.fieldOfView * Mathf.Deg2Rad / 2.0f);
-				Camera.main.orthographicSize = defaultCameraZoom * planeWidth;
+				ResetCameraZoom();
 				break;

 			case KeyCode.Escape:
@@ -992,15 +989,15 @@

 	#endregion

-	void CheckCommandLine()
+	void ParseCommandLine()
 	{
 		var args = Environment.GetCommandLineArgs();
 		if (args.Contains("-speedrun", StringComparer.InvariantCultureIgnoreCase))
 		{
 			speedRunMode = true;
 			defaultCameraZoom = 10.0f / Mathf.Pow(0.9f, 5.0f);
-			ProcessKey(KeyCode.Mouse2); //reset camera zoom
-			ProcessKey(KeyCode.E); //extra info
+			ResetCameraZoom();
+			ShowAdditionalInfo.BoolValue = true;
 		}
 	}

@@ -1019,4 +1016,9 @@
 		SetRoomObjectsVisibility(room);
 	}

+	void ResetCameraZoom()
+	{
+		float planeWidth = Mathf.Tan(Camera.main.fieldOfView * Mathf.Deg2Rad / 2.0f);
+		Camera.main.orthographicSize = defaultCameraZoom * planeWidth;
+	}
 }


Fix stack overflow and other problems in DBs over 8MB in space de/allocation part.

--- BTDB/Implementation/LowLevelDB.cs
+++ BTDB/Implementation/LowLevelDB.cs
@@ -760,39 +760,61 @@
                 _postponedDeallocateSectors.Add(sector);
                 return;
             }
-            if (sector.InTransaction)
-            {
-                sector.Deleted = true;
-                _sectorCache.TryRemove(sector.Position);
-                if (!sector.Allocated)
-                {
-                    UnlinkFromUnallocatedSectors(sector);
-                    return;
-                }
-                if (sector.Dirty)
-                {
-                    UnlinkFromDirtySectors(sector);
+            _inSpaceAllocation = true;
+            try
+            {
+                if (sector.InTransaction)
+                {
+                    sector.Deleted = true;
+                    _sectorCache.TryRemove(sector.Position);
+                    if (!sector.Allocated)
+                    {
+                        UnlinkFromUnallocatedSectors(sector);
+                        return;
+                    }
+                    if (sector.Dirty)
+                    {
+                        UnlinkFromDirtySectors(sector);
+                    }
+                    else
+                    {
+                        UnlinkFromInTransactionSectors(sector);
+                    }
+                    _spaceAllocatedInTransaction.TryExclude((ulong) sector.Position, (ulong) sector.Length);
                 }
                 else
                 {
-                    UnlinkFromInTransactionSectors(sector);
-                }
-                _spaceAllocatedInTransaction.TryExclude((ulong)sector.Position, (ulong)sector.Length);
-            }
-            else
-            {
-                _spaceDeallocatedInTransaction.TryInclude((ulong)sector.Position, (ulong)sector.Length);
-                _spaceUsedByReadOnlyTransactions.TryInclude((ulong)sector.Position, (ulong)sector.Length);
-            }
-            if (_newState.RootAllocPage.Ptr == 0)
-            {
-                CreateInitialAllocPages();
-            }
-            long startGran = sector.Position / AllocationGranularity;
-            int grans = sector.Length / AllocationGranularity;
-            var totalGrans = (long)(_newState.WantedDatabaseLength / AllocationGranularity);
-            UnsetBitsInAlloc(startGran, grans, ref _newState.RootAllocPage, totalGrans, null);
-            _newState.UsedSize -= (ulong)sector.Length;
+                    _spaceDeallocatedInTransaction.TryInclude((ulong) sector.Position, (ulong) sector.Length);
+                    _spaceUsedByReadOnlyTransactions.TryInclude((ulong) sector.Position, (ulong) sector.Length);
+                }
+                if (_newState.RootAllocPage.Ptr == 0)
+                {
+                    CreateInitialAllocPages();
+                }
+                long startGran = sector.Position/AllocationGranularity;
+                int grans = sector.Length/AllocationGranularity;
+                var totalGrans = (long) (_newState.WantedDatabaseLength/AllocationGranularity);
+                UnsetBitsInAlloc(startGran, grans, ref _newState.RootAllocPage, totalGrans, null);
+                _newState.UsedSize -= (ulong) sector.Length;
+            }
+            finally
+            {
+                FinishPostponedSpaceDeallocation();
+            }
+        }
+
+        void FinishPostponedSpaceDeallocation()
+        {
+            _inSpaceAllocation = false;
+            if (_postponedDeallocateSectors.Count > 0)
+            {
+                var postponed = _postponedDeallocateSectors.ToArray();
+                _postponedDeallocateSectors.Clear();
+                foreach (var postbonedDeallocateSector in postponed)
+                {
+                    DeallocateSector(postbonedDeallocateSector);
+                }
+            }
         }

         static long GetGransInDownLevel(long len, out int downPtrCount)
@@ -826,8 +848,8 @@
                                             sectorPtr.Checksum,
                                             true);
                         sector.Type = SectorType.AllocChild;
-                        sector.Parent = parent;
-                    }
+                    }
+                    sector.Parent = parent;
                     sector = DirtizeSector(sector, sector.Parent, null);
                     BitArrayManipulation.UnsetBits(sector.Data, (int)startGran, grans);
                     sectorPtr = sector.ToSectorPtr();
@@ -842,8 +864,8 @@
                                         sectorPtr.Checksum,
                                         true);
                     sector.Type = SectorType.AllocParent;
-                    sector.Parent = parent;
-                }
+                }
+                sector.Parent = parent;
                 sector = DirtizeSector(sector, sector.Parent, null);
                 for (var i = (int)(startGran / gransInChild); i < childSectors; i++)
                 {
@@ -1069,12 +1091,7 @@
             }
             finally
             {
-                _inSpaceAllocation = false;
-                foreach (var postbonedDeallocateSector in _postponedDeallocateSectors)
-                {
-                    DeallocateSector(postbonedDeallocateSector);
-                }
-                _postponedDeallocateSectors.Clear();
+                FinishPostponedSpaceDeallocation();
             }
         }


Better error message when attempting to add null value to BDictionary

--- BencodeNET/Objects/BDictionary.cs
+++ BencodeNET/Objects/BDictionary.cs
@@ -165,7 +165,8 @@
             get { return ContainsKey(key) ? Value[key] : null; }
             set
             {
-                if (value == null) throw new ArgumentNullException(nameof(value));
+                if (value == null)
+                    throw new ArgumentNullException(nameof(value), "A null value cannot be added to a BDictionary");
                 Value[key] = value;
             }
         }


Add support for http basic auth.

Add support for http basic auth.

--- BosunReporter/MetricsCollector.cs
+++ BosunReporter/MetricsCollector.cs
@@ -594,6 +594,14 @@
             if (gzip)
                 request.Headers["Content-Encoding"] = "gzip";

+            // support for http://username:password@domain.com, by default this does not work
+            var userInfo = url.GetComponents(UriComponents.UserInfo, UriFormat.Unescaped);
+            if (!string.IsNullOrEmpty(userInfo))
+            {
+                var auth = "Basic " + Convert.ToBase64String(Encoding.Default.GetBytes(userInfo));
+                request.Headers["Authorization"] = auth;
+            }
+
             try
             {
                 using (var stream = request.GetRequestStream())


Added Info Command

Added Info Command

--- BradlBot/Commands/UserCommands.cs
+++ BradlBot/Commands/UserCommands.cs
@@ -1,4 +1,8 @@
 using System;
+using System.Linq;
+using System.Reflection;
+using System.Runtime.InteropServices;
+using System.Runtime.Versioning;
 using System.Threading.Tasks;
 using DSharpPlus;
 using DSharpPlus.CommandsNext;
@@ -11,7 +15,7 @@

         [Command("ping")]
         [Description("Reply's if the bot is on")]
-        [Aliases("on","up","online")]
+        [Aliases("on", "up", "online")]
         public async Task Ping(CommandContext ctx)
         {
             //Show that we are doing stuff
@@ -25,19 +29,49 @@

         [Command("uptime")]
         [Description("The time that the bot has been online.")]
-        [Aliases("onlinefor","upfor","onfor")]
+        [Aliases("onlinefor", "upfor", "onfor")]
         public async Task Online(CommandContext ctx)
         {
             //show that stuff's happening
             await ctx.TriggerTypingAsync();

             var clock = DiscordEmoji.FromName(ctx.Client, ":alarm_clock:");
-
+
             //Get date started
             var timeSinceStart = DateTime.UtcNow.Subtract(Program.TimeStarted);

             await ctx.RespondAsync(
                 $"{clock} The bot has been up for {timeSinceStart.Days} Day[s], {timeSinceStart.Hours % 24} Hour[s], {timeSinceStart.Minutes % (24 * 60)} Minute[s], {timeSinceStart.Seconds % (24 * 60 * 60)} Second[s]");
         }
+
+        [Command("info")]
+        [Description("Information about the bot")]
+        [Aliases("botinfo")]
+        public async Task Info(CommandContext ctx)
+        {
+            await ctx.TriggerTypingAsync();
+            Assembly thisAssembly = Assembly.GetEntryAssembly();
+            string title = $"{thisAssembly.GetName().Name} - Version {thisAssembly.GetName().Version}";
+            string output = String.Empty;
+
+            //find dependancies and add to string
+            output += "•Dependencies:\n";
+            foreach (var assemblyReference in thisAssembly.GetReferencedAssemblies())
+            {
+                output += $"    ‣{assemblyReference.Name} - Version {assemblyReference.Version}\n";
+            }
+
+            //Tell them that it's running off a DotNetCoreApp 1.1
+            var targetFw = thisAssembly.GetCustomAttributes<TargetFrameworkAttribute>();
+            output += $"•Targets: {targetFw.ToList()[0].FrameworkName}\n";
+
+            //Get os
+            output += $"•OS: {RuntimeInformation.OSDescription} {RuntimeInformation.OSArchitecture}";
+
+            //output github
+            output += "•Github Repo: https://www.github.com/thebradad1111/bradlbot";
+            CommandsCommon.Respond(ctx,title,output,0x00FF00);
+        }
+
     }
 }


remove debug code

remove debug code

--- CobaltAHK/ExpressionTree/Scope.cs
+++ CobaltAHK/ExpressionTree/Scope.cs
@@ -159,7 +159,6 @@
 			var properties = typeof(IronAHK.Rusty.Core).GetProperties(flags);

 			foreach (var prop in properties) {
-				Console.WriteLine(prop.Name);
 				if (Syntax.IsBuiltinVariable(prop.Name)) {
 					builtinVars[Syntax.GetBuiltinVariable(prop.Name)] = prop;
 				}


Button.B works for all the player indices's.


Making exceptions consistent and changing general Exception to ArgumentOutOfRangeException as appropriate

--- Fitbit.Portable/FitbitClient.cs
+++ Fitbit.Portable/FitbitClient.cs
@@ -23,7 +23,9 @@
         public FitbitClient(IAuthorization authorization, HttpClient httpClient = null)
         {
             if (authorization == null)
+            {
                 throw new ArgumentNullException(nameof(authorization), "Authorization can not be null; please provide an Authorization instance.");
+            }

             Authorization = authorization;

@@ -33,9 +35,7 @@
                 this.HttpClient = httpClient;

             this.HttpClient = authorization.CreateAuthorizedHttpClient(); //use whatever authorization method to provide the HttpClient
-
-        }
-
+        }

         /// <summary>
         /// Use this constructor if an authorized httpclient has already been setup and accessing the resources is what is required.
@@ -483,7 +483,7 @@
                     break;

                 default:
-                    throw new Exception("This API endpoint only supports range up to 31 days. See https://wiki.fitbit.com/display/API/API-Get-Body-Weight");
+                    throw new ArgumentOutOfRangeException("This API endpoint only supports range up to 31 days. See https://wiki.fitbit.com/display/API/API-Get-Body-Weight");
             }

             string apiCall = FitbitClientHelperExtensions.ToFullUrl("/1/user/{0}/body/log/weight/date/{1}/{2}.json", args: new object[] { startDate.ToFitbitFormat(), period.GetStringValue() });
@@ -512,7 +512,7 @@
             {
                 if (startDate.AddDays(31) < endDate)
                 {
-                    throw new Exception("31 days is the max span. Try using period format instead for longer: https://wiki.fitbit.com/display/API/API-Get-Body-Weight");
+                    throw new ArgumentOutOfRangeException("31 days is the max span. Try using period format instead for longer: https://wiki.fitbit.com/display/API/API-Get-Body-Weight");
                 }

                 apiCall = FitbitClientHelperExtensions.ToFullUrl("/1/user/{0}/body/log/weight/date/{1}/{2}.json", args: new object[] { startDate.ToFitbitFormat(), endDate.Value.ToFitbitFormat() });


default start under the chart

default start under the chart

--- Indicator/Distance_Indicator.cs
+++ Indicator/Distance_Indicator.cs
@@ -12,7 +12,7 @@
 using AgenaTrader.Helper;

 /// <summary>
-/// Version: 1.2
+/// Version: 1.2.1
 /// -------------------------------------------------------------------------
 /// Simon Pucher 2016
 /// -------------------------------------------------------------------------
@@ -54,7 +54,7 @@
 		{
 			Add(new Plot(Color.FromKnownColor(KnownColor.Orange), "MyPlot1"));
             //Add(new Plot(Color.FromKnownColor(KnownColor.Gray), "MyPlot2"));
-            IsOverlay = true;
+            IsOverlay = false;
 			CalculateOnClosedBar = true;
 		}

@@ -187,7 +187,7 @@
         #endregion
     }
 }
-#region AgenaTrader Automaticaly Generated Code. Do not change it manualy
+#region AgenaTrader Automaticaly Generated Code. Do not change it manually

 namespace AgenaTrader.UserCode
 {


Fixed typo

Fixed typo

--- storage/api/Storage/Storage.cs
+++ storage/api/Storage/Storage.cs
@@ -1045,9 +1045,9 @@
             var uniformBucketLevelAccess = bucket.IamConfiguration.UniformBucketLevelAccess;

             bool? enabledOrNull = uniformBucketLevelAccess?.Enabled;
-            bool uniformBucketLevelAccess =
+            bool uniformBucketLevelAccessEnabled =
                 enabledOrNull.HasValue ? enabledOrNull.Value : false;
-            if (uniformBucketLevelAccess)
+            if (uniformBucketLevelAccessEnabled)
             {
                 Console.WriteLine($"Uniform bucket-level access is enabled for {bucketName}.");
                 Console.WriteLine(


Doing the multiplication in the right order

--- RayTracer/Primitive/IBvhItem.cs
+++ RayTracer/Primitive/IBvhItem.cs
@@ -128,7 +128,7 @@
 					yield return this;
 					if (transform.Child != null)
 					{
-						foreach (var subIterator in new BvhIterator(transform.Child, TransformToWorld * transform.AxisToWorld, Depth + 1, DecentFilter))
+						foreach (var subIterator in new BvhIterator(transform.Child, transform.AxisToWorld * TransformToWorld, Depth + 1, DecentFilter))
 						{
 							yield return subIterator;
 						}


Skip blank lines instead of throwing IOException


Fix CDATA bug

Fix CDATA bug


Change inputs performance counter to show ms/inputs

--- Stratis.Bitcoin.FullNode/Consensus/ConsensusPerformanceCounter.cs
+++ Stratis.Bitcoin.FullNode/Consensus/ConsensusPerformanceCounter.cs
@@ -133,7 +133,8 @@
 		public override string ToString()
 		{
 			StringBuilder builder = new StringBuilder();
-			builder.AppendLine("Inputs : " + ToKBSec(ProcessedInputsPerSecond));
+			//builder.AppendLine("Inputs : " + ToKBSec(ProcessedInputsPerSecond));
+			builder.AppendLine("Inputs : " + (Elapsed.TotalMilliseconds / TotalProcessedInputs).ToString("0.0000") + " ms/inputs");
 			builder.AppendLine("Transactions : " + ToKBSec(ProcessedTransactionsPerSecond));
 			builder.AppendLine("Blocks : " + ToKBSec(ProcessedBlocksPerSecond));
 			builder.AppendLine("Fetching Block : " + ToTimespan(TotalBlockFetchingTime));


CCNet still builds with C#2 compiler... autoproperties don't work

--- SubtextSolution/Subtext.Framework/Syndication/GenericRssWriter.cs
+++ SubtextSolution/Subtext.Framework/Syndication/GenericRssWriter.cs
@@ -397,9 +397,27 @@

         protected class EnclosureItem
         {
-            public string Url { get; set; }
-            public long Size { get; set; }
-            public string MimeType { get; set; }
+            private string _url;
+            private long _size;
+            private string _mimeType;
+
+            public string MimeType
+            {
+                get { return _mimeType; }
+                set { _mimeType = value; }
+            }
+
+            public long Size
+            {
+                get { return _size; }
+                set { _size = value; }
+            }
+
+            public string Url
+            {
+                get { return _url; }
+                set { _url = value; }
+            }
         }
 	}
 }


Missing comment on Model.SetProperty.

Missing comment on Model.SetProperty.

--- LordJZ/Model.cs
+++ LordJZ/Model.cs
@@ -86,6 +86,30 @@
             return false;
         }

+        /// <summary>
+        /// Sets the property to the specified value and raises
+        /// the <see cref="NotifyPropertyChangedObject.PropertyChanged"/> event if
+        /// the new value is not equal to the old value of the property
+        /// according to the specified equality comparer.
+        /// </summary>
+        /// <typeparam name="T">
+        /// The underlying type of the property.
+        /// </typeparam>
+        /// <param name="property">
+        /// The backing field of the property, passed by reference.
+        /// </param>
+        /// <param name="value">
+        /// The new value of the property.
+        /// </param>
+        /// <param name="propertyName">
+        /// The name of the property to set.
+        /// </param>
+        /// <param name="equalityComparer">
+        /// The equality comparer to use when comparing the old value and the new value of the property.
+        /// </param>
+        /// <returns>
+        /// <c>true</c>, if the value has been changed; otherwise, <c>false</c>.
+        /// </returns>
         protected bool SetProperty<T>(ref T property, T value, IEqualityComparer<T> equalityComparer,
                                       [CallerMemberName] string propertyName = null)
         {


[Editor API] - Updated content file browser control to return the current directory when in single selection mode.

--- Tools/Editor/Gorgon.Editor.API/UI/Controls/ContentFileExplorer.cs
+++ Tools/Editor/Gorgon.Editor.API/UI/Controls/ContentFileExplorer.cs
@@ -29,11 +29,13 @@
 using System.Collections.Generic;
 using System.ComponentModel;
 using System.Drawing;
+using System.IO;
 using System.Linq;
 using System.Windows.Forms;
 using Gorgon.Core;
 using Gorgon.Editor.Properties;
 using Gorgon.Editor.UI.Views;
+using Gorgon.IO;
 using Gorgon.UI;

 namespace Gorgon.Editor.UI.Controls
@@ -1000,6 +1002,40 @@
             GridFiles.Sort(_fileComparer);
             GridFiles.Select();
         }
+
+        ///
+        /// Function to retrieve the current directory for the currently selected row in the list.
+        ///
+        /// <returns>The path to the directory.</returns>
+        /// <remarks>
+        /// <para>
+        /// If <see cref="MultiSelect"/> is true, then this method will return null.
+        /// </para>
+        /// </remarks>
+        public string GetCurrentDirectory()
+        {
+            if (MultiSelect)
+            {
+                return null;
+            }
+
+            for (int i = 0; i < GridFiles.SelectedRows.Count; ++i)
+            {
+                DataGridViewRow row = GridFiles.Rows[i];
+
+                if (IsDirectoryRow(row))
+                {
+                    return _rowDirsXref[row].FullPath;
+                }
+
+                if (_rowFilesXref.TryGetValue(row, out ContentFileExplorerFileEntry fileEntry))
+                {
+                    return Path.GetDirectoryName(fileEntry.FullPath).FormatDirectory('/');
+                }
+            }
+
+            return null;
+        }
         #endregion

         #region Constructor/Finalizer.


* Look for enums of type 'int' in GetCPPEnumValue() but return them as 'uint's as
  that is the type of an Q_FLAGS arguments

CCMAIL: kde-bindings@kde.org

svn path=/trunk/KDE/kdebindings/csharp/; revision=742941

--- qyoto/src/Qyoto.cs
+++ qyoto/src/Qyoto.cs
@@ -130,10 +130,18 @@
 				return 0;
 			}
 			foreach (Type nt in t.GetNestedTypes()) {
-				if (nt.IsEnum && Enum.GetUnderlyingType(nt) == typeof(uint)) {
-					foreach (uint i in Enum.GetValues(nt)) {
-						if (Enum.Format(nt, i, "f") == value) {
-							return (uint) i;
+				if (nt.IsEnum) {
+					if (Enum.GetUnderlyingType(nt) == typeof(uint)) {
+						foreach (uint i in Enum.GetValues(nt)) {
+							if (Enum.Format(nt, i, "f") == value) {
+								return i;
+							}
+						}
+					} else if (Enum.GetUnderlyingType(nt) == typeof(int)) {
+						foreach (int i in Enum.GetValues(nt)) {
+							if (Enum.Format(nt, i, "f") == value) {
+								return (uint) i;
+							}
 						}
 					}
 				}


Multiple

Multiple

* !unclaimed and !find now only finds modules on bombs that it can
access currently.
* !find now prefers unsolved unclaimed exact matches over unsolved
unclaimed general matches.

--- TwitchPlaysAssembly/Src/MessageResponders/BombMessageResponder.cs
+++ TwitchPlaysAssembly/Src/MessageResponders/BombMessageResponder.cs
@@ -425,10 +425,10 @@
 		{
 			if (!IsAuthorizedDefuser(userNickName)) return;

-			IEnumerable<string> unclaimed = _componentHandles.Where(handle => !handle.claimed && !handle.Solved).Shuffle().Take(3)
-				.Select(handle => string.Format("{0} ({1})", handle.headerText.text, handle.Code));
+			IEnumerable<string> unclaimed = _componentHandles.Where(handle => !handle.claimed && !handle.Solved && GameRoom.Instance.IsCurrentBomb(handle.bombID)).Shuffle().Take(3)
+				.Select(handle => string.Format("{0} ({1})", handle.headerText.text, handle.Code)).ToList();

-			if (unclaimed.Count() > 0) _ircConnection.SendMessage("Unclaimed Modules: {0}", unclaimed.Join(", "));
+			if (unclaimed.Any()) _ircConnection.SendMessage("Unclaimed Modules: {0}", unclaimed.Join(", "));
 			else _ircConnection.SendMessage("There are no more unclaimed modules.");

 			return;
@@ -440,13 +440,13 @@

 			var split = text.Split(new[] { ' ' }, StringSplitOptions.RemoveEmptyEntries);
 			string query = split.Skip(1).Join(" ");
-			IEnumerable<string> modules = _componentHandles.Where(handle => handle.headerText.text.ToLowerInvariant().Contains(query))
-                .OrderBy(handle => handle.Solved).ThenBy(handle => handle.PlayerName != null).Take(3)
+			IEnumerable<string> modules = _componentHandles.Where(handle => handle.headerText.text.ToLowerInvariant().Contains(query) && GameRoom.Instance.IsCurrentBomb(handle.bombID))
+                .OrderBy(handle => handle.Solved).ThenBy(handle => handle.PlayerName != null).ThenByDescending(handle => handle.headerText.text.ToLowerInvariant().Equals(query)).Take(3)
 				.Select(handle => string.Format("{0} ({1}) - {2}", handle.headerText.text, handle.Code,
 					handle.Solved ? "Solved" : (handle.PlayerName == null ? "Unclaimed" : "Claimed by " + handle.PlayerName)
-				));
-
-			if (modules.Count() > 0) _ircConnection.SendMessage("Modules: {0}", modules.Join(", "));
+				)).ToList();
+
+			if (modules.Any()) _ircConnection.SendMessage("Modules: {0}", modules.Join(", "));
 			else _ircConnection.SendMessage("Couldn't find any modules containing \"{0}\".", query);

 			return;


Update res

Update res

--- XamarinApp/MyTrips/MyTrips.Android/Resources/Resource.designer.cs
+++ XamarinApp/MyTrips/MyTrips.Android/Resources/Resource.designer.cs
@@ -1,15 +1,15 @@
 #pragma warning disable 1591
-//------------------------------------------------------------------------------
-// <auto-generated>
-//     This code was generated by a tool.
-//     Runtime Version:4.0.30319.42000
-//
-//     Changes to this file may cause incorrect behavior and will be lost if
-//     the code is regenerated.
-// </auto-generated>
-//------------------------------------------------------------------------------
+// ------------------------------------------------------------------------------
+//  <autogenerated>
+//      This code was generated by a tool.
+//      Mono Runtime Version: 4.0.30319.42000
+//
+//      Changes to this file may cause incorrect behavior and will be lost if
+//      the code is regenerated.
+//  </autogenerated>
+// ------------------------------------------------------------------------------

-[assembly: global::Android.Runtime.ResourceDesignerAttribute("MyTrips.Droid.Resource", IsApplication=true)]
+[assembly: Android.Runtime.ResourceDesignerAttribute("MyTrips.Droid.Resource", IsApplication=true)]

 namespace MyTrips.Droid
 {
@@ -26,6 +26,9 @@

 		public static void UpdateIdValues()
 		{
+			global::PCLStorage.Resource.String.ApplicationName = global::MyTrips.Droid.Resource.String.ApplicationName;
+			global::PCLStorage.Resource.String.Hello = global::MyTrips.Droid.Resource.String.Hello;
+			global::Splat.Resource.String.library_name = global::MyTrips.Droid.Resource.String.library_name;
 			global::Acr.UserDialogs.Resource.Animation.abc_fade_in = global::MyTrips.Droid.Resource.Animation.abc_fade_in;
 			global::Acr.UserDialogs.Resource.Animation.abc_fade_out = global::MyTrips.Droid.Resource.Animation.abc_fade_out;
 			global::Acr.UserDialogs.Resource.Animation.abc_grow_fade_in_from_bottom = global::MyTrips.Droid.Resource.Animation.abc_grow_fade_in_from_bottom;
@@ -1593,9 +1596,6 @@
 			global::AndroidHUD.Resource.Styleable.ProgressWheel_ahText = global::MyTrips.Droid.Resource.Styleable.ProgressWheel_ahText;
 			global::AndroidHUD.Resource.Styleable.ProgressWheel_ahTextColor = global::MyTrips.Droid.Resource.Styleable.ProgressWheel_ahTextColor;
 			global::AndroidHUD.Resource.Styleable.ProgressWheel_ahTextSize = global::MyTrips.Droid.Resource.Styleable.ProgressWheel_ahTextSize;
-			global::PCLStorage.Resource.String.ApplicationName = global::MyTrips.Droid.Resource.String.ApplicationName;
-			global::PCLStorage.Resource.String.Hello = global::MyTrips.Droid.Resource.String.Hello;
-			global::Splat.Resource.String.library_name = global::MyTrips.Droid.Resource.String.library_name;
 		}

 		public partial class Animation
@@ -1758,41 +1758,41 @@
 			// aapt resource value: 0x7f0100db
 			public const int activityChooserViewStyle = 2130772187;

+			// aapt resource value: 0x7f010165
+			public const int ahBarColor = 2130772325;
+
+			// aapt resource value: 0x7f01016d
+			public const int ahBarLength = 2130772333;
+
+			// aapt resource value: 0x7f01016c
+			public const int ahBarWidth = 2130772332;
+
+			// aapt resource value: 0x7f01016a
+			public const int ahCircleColor = 2130772330;
+
 			// aapt resource value: 0x7f010169
-			public const int ahBarColor = 2130772329;
-
-			// aapt resource value: 0x7f010171
-			public const int ahBarLength = 2130772337;
-
-			// aapt resource value: 0x7f010170
-			public const int ahBarWidth = 2130772336;
-
-			// aapt resource value: 0x7f01016e
-			public const int ahCircleColor = 2130772334;
-
-			// aapt resource value: 0x7f01016d
-			public const int ahDelayMillis = 2130772333;
-
-			// aapt resource value: 0x7f01016f
-			public const int ahRadius = 2130772335;
-
-			// aapt resource value: 0x7f01016a
-			public const int ahRimColor = 2130772330;
+			public const int ahDelayMillis = 2130772329;

 			// aapt resource value: 0x7f01016b
-			public const int ahRimWidth = 2130772331;
-
-			// aapt resource value: 0x7f01016c
-			public const int ahSpinSpeed = 2130772332;
+			public const int ahRadius = 2130772331;

 			// aapt resource value: 0x7f010166
-			public const int ahText = 2130772326;
+			public const int ahRimColor = 2130772326;

 			// aapt resource value: 0x7f010167
-			public const int ahTextColor = 2130772327;
+			public const int ahRimWidth = 2130772327;

 			// aapt resource value: 0x7f010168
-			public const int ahTextSize = 2130772328;
+			public const int ahSpinSpeed = 2130772328;
+
+			// aapt resource value: 0x7f010162
+			public const int ahText = 2130772322;
+
+			// aapt resource value: 0x7f010163
+			public const int ahTextColor = 2130772323;
+
+			// aapt resource value: 0x7f010164
+			public const int ahTextSize = 2130772324;

 			// aapt resource value: 0x7f0100fe
 			public const int alertDialogButtonGroupStyle = 2130772222;
@@ -1926,17 +1926,17 @@
 			// aapt resource value: 0x7f010013
 			public const int circleCrop = 2130771987;

-			// aapt resource value: 0x7f010163
-			public const int civ_border_color = 2130772323;
-
-			// aapt resource value: 0x7f010164
-			public const int civ_border_overlay = 2130772324;
-
-			// aapt resource value: 0x7f010162
-			public const int civ_border_width = 2130772322;
-
-			// aapt resource value: 0x7f010165
-			public const int civ_fill_color = 2130772325;
+			// aapt resource value: 0x7f01016f
+			public const int civ_border_color = 2130772335;
+
+			// aapt resource value: 0x7f010170
+			public const int civ_border_overlay = 2130772336;
+
+			// aapt resource value: 0x7f01016e
+			public const int civ_border_width = 2130772334;
+
+			// aapt resource value: 0x7f010171
+			public const int civ_fill_color = 2130772337;

 			// aapt resource value: 0x7f010094
 			public const int closeIcon = 2130772116;
@@ -4944,11 +4944,11 @@
 		public partial class String
 		{

-			// aapt resource value: 0x7f060039
-			public const int ApplicationName = 2131099705;
-
-			// aapt resource value: 0x7f060038
-			public const int Hello = 2131099704;
+			// aapt resource value: 0x7f06007c
+			public const int ApplicationName = 2131099772;
+
+			// aapt resource value: 0x7f06007b
+			public const int Hello = 2131099771;

 			// aapt resource value: 0x7f060021
 			public const int abc_action_bar_home_description = 2131099681;
@@ -5106,206 +5106,206 @@
 			// aapt resource value: 0x7f06001e
 			public const int common_signin_button_text_long = 2131099678;

+			// aapt resource value: 0x7f060038
+			public const int hockeyapp_crash_dialog_app_name_fallback = 2131099704;
+
+			// aapt resource value: 0x7f060039
+			public const int hockeyapp_crash_dialog_message = 2131099705;
+
 			// aapt resource value: 0x7f06003a
-			public const int hockeyapp_crash_dialog_app_name_fallback = 2131099706;
+			public const int hockeyapp_crash_dialog_negative_button = 2131099706;

 			// aapt resource value: 0x7f06003b
-			public const int hockeyapp_crash_dialog_message = 2131099707;
+			public const int hockeyapp_crash_dialog_neutral_button = 2131099707;

 			// aapt resource value: 0x7f06003c
-			public const int hockeyapp_crash_dialog_negative_button = 2131099708;
+			public const int hockeyapp_crash_dialog_positive_button = 2131099708;

 			// aapt resource value: 0x7f06003d
-			public const int hockeyapp_crash_dialog_neutral_button = 2131099709;
+			public const int hockeyapp_crash_dialog_title = 2131099709;

 			// aapt resource value: 0x7f06003e
-			public const int hockeyapp_crash_dialog_positive_button = 2131099710;
+			public const int hockeyapp_dialog_error_message = 2131099710;

 			// aapt resource value: 0x7f06003f
-			public const int hockeyapp_crash_dialog_title = 2131099711;
+			public const int hockeyapp_dialog_error_title = 2131099711;

 			// aapt resource value: 0x7f060040
-			public const int hockeyapp_dialog_error_message = 2131099712;
+			public const int hockeyapp_dialog_negative_button = 2131099712;

 			// aapt resource value: 0x7f060041
-			public const int hockeyapp_dialog_error_title = 2131099713;
+			public const int hockeyapp_dialog_positive_button = 2131099713;

 			// aapt resource value: 0x7f060042
-			public const int hockeyapp_dialog_negative_button = 2131099714;
+			public const int hockeyapp_download_failed_dialog_message = 2131099714;

 			// aapt resource value: 0x7f060043
-			public const int hockeyapp_dialog_positive_button = 2131099715;
+			public const int hockeyapp_download_failed_dialog_negative_button = 2131099715;

 			// aapt resource value: 0x7f060044
-			public const int hockeyapp_download_failed_dialog_message = 2131099716;
+			public const int hockeyapp_download_failed_dialog_positive_button = 2131099716;

 			// aapt resource value: 0x7f060045
-			public const int hockeyapp_download_failed_dialog_negative_button = 2131099717;
+			public const int hockeyapp_download_failed_dialog_title = 2131099717;

 			// aapt resource value: 0x7f060046
-			public const int hockeyapp_download_failed_dialog_positive_button = 2131099718;
+			public const int hockeyapp_error_no_network_message = 2131099718;

 			// aapt resource value: 0x7f060047
-			public const int hockeyapp_download_failed_dialog_title = 2131099719;
+			public const int hockeyapp_expiry_info_text = 2131099719;

 			// aapt resource value: 0x7f060048
-			public const int hockeyapp_error_no_network_message = 2131099720;
+			public const int hockeyapp_expiry_info_title = 2131099720;

 			// aapt resource value: 0x7f060049
-			public const int hockeyapp_expiry_info_text = 2131099721;
+			public const int hockeyapp_feedback_attach_file = 2131099721;

 			// aapt resource value: 0x7f06004a
-			public const int hockeyapp_expiry_info_title = 2131099722;
+			public const int hockeyapp_feedback_attach_picture = 2131099722;

 			// aapt resource value: 0x7f06004b
-			public const int hockeyapp_feedback_attach_file = 2131099723;
+			public const int hockeyapp_feedback_attachment_button_text = 2131099723;

 			// aapt resource value: 0x7f06004c
-			public const int hockeyapp_feedback_attach_picture = 2131099724;
+			public const int hockeyapp_feedback_attachment_error = 2131099724;

 			// aapt resource value: 0x7f06004d
-			public const int hockeyapp_feedback_attachment_button_text = 2131099725;
+			public const int hockeyapp_feedback_attachment_loading = 2131099725;

 			// aapt resource value: 0x7f06004e
-			public const int hockeyapp_feedback_attachment_error = 2131099726;
+			public const int hockeyapp_feedback_email_hint = 2131099726;

 			// aapt resource value: 0x7f06004f
-			public const int hockeyapp_feedback_attachment_loading = 2131099727;
+			public const int hockeyapp_feedback_failed_text = 2131099727;

 			// aapt resource value: 0x7f060050
-			public const int hockeyapp_feedback_email_hint = 2131099728;
+			public const int hockeyapp_feedback_failed_title = 2131099728;

 			// aapt resource value: 0x7f060051
-			public const int hockeyapp_feedback_failed_text = 2131099729;
+			public const int hockeyapp_feedback_generic_error = 2131099729;

 			// aapt resource value: 0x7f060052
-			public const int hockeyapp_feedback_failed_title = 2131099730;
+			public const int hockeyapp_feedback_last_updated_text = 2131099730;

 			// aapt resource value: 0x7f060053
-			public const int hockeyapp_feedback_generic_error = 2131099731;
+			public const int hockeyapp_feedback_max_attachments_allowed = 2131099731;

 			// aapt resource value: 0x7f060054
-			public const int hockeyapp_feedback_last_updated_text = 2131099732;
+			public const int hockeyapp_feedback_message_hint = 2131099732;

 			// aapt resource value: 0x7f060055
-			public const int hockeyapp_feedback_max_attachments_allowed = 2131099733;
+			public const int hockeyapp_feedback_name_hint = 2131099733;

 			// aapt resource value: 0x7f060056
-			public const int hockeyapp_feedback_message_hint = 2131099734;
+			public const int hockeyapp_feedback_refresh_button_text = 2131099734;

 			// aapt resource value: 0x7f060057
-			public const int hockeyapp_feedback_name_hint = 2131099735;
+			public const int hockeyapp_feedback_response_button_text = 2131099735;

 			// aapt resource value: 0x7f060058
-			public const int hockeyapp_feedback_refresh_button_text = 2131099736;
+			public const int hockeyapp_feedback_select_file = 2131099736;

 			// aapt resource value: 0x7f060059
-			public const int hockeyapp_feedback_response_button_text = 2131099737;
+			public const int hockeyapp_feedback_select_picture = 2131099737;

 			// aapt resource value: 0x7f06005a
-			public const int hockeyapp_feedback_select_file = 2131099738;
+			public const int hockeyapp_feedback_send_button_text = 2131099738;

 			// aapt resource value: 0x7f06005b
-			public const int hockeyapp_feedback_select_picture = 2131099739;
+			public const int hockeyapp_feedback_send_generic_error = 2131099739;

 			// aapt resource value: 0x7f06005c
-			public const int hockeyapp_feedback_send_button_text = 2131099740;
+			public const int hockeyapp_feedback_send_network_error = 2131099740;

 			// aapt resource value: 0x7f06005d
-			public const int hockeyapp_feedback_send_generic_error = 2131099741;
+			public const int hockeyapp_feedback_subject_hint = 2131099741;

 			// aapt resource value: 0x7f06005e
-			public const int hockeyapp_feedback_send_network_error = 2131099742;
+			public const int hockeyapp_feedback_title = 2131099742;

 			// aapt resource value: 0x7f06005f
-			public const int hockeyapp_feedback_subject_hint = 2131099743;
+			public const int hockeyapp_feedback_validate_email_empty = 2131099743;

 			// aapt resource value: 0x7f060060
-			public const int hockeyapp_feedback_title = 2131099744;
+			public const int hockeyapp_feedback_validate_email_error = 2131099744;

 			// aapt resource value: 0x7f060061
-			public const int hockeyapp_feedback_validate_email_empty = 2131099745;
+			public const int hockeyapp_feedback_validate_name_error = 2131099745;

 			// aapt resource value: 0x7f060062
-			public const int hockeyapp_feedback_validate_email_error = 2131099746;
+			public const int hockeyapp_feedback_validate_subject_error = 2131099746;

 			// aapt resource value: 0x7f060063
-			public const int hockeyapp_feedback_validate_name_error = 2131099747;
+			public const int hockeyapp_feedback_validate_text_error = 2131099747;

 			// aapt resource value: 0x7f060064
-			public const int hockeyapp_feedback_validate_subject_error = 2131099748;
+			public const int hockeyapp_login_email_hint = 2131099748;

 			// aapt resource value: 0x7f060065
-			public const int hockeyapp_feedback_validate_text_error = 2131099749;
+			public const int hockeyapp_login_headline_text = 2131099749;

 			// aapt resource value: 0x7f060066
-			public const int hockeyapp_login_email_hint = 2131099750;
+			public const int hockeyapp_login_login_button_text = 2131099750;

 			// aapt resource value: 0x7f060067
-			public const int hockeyapp_login_headline_text = 2131099751;
+			public const int hockeyapp_login_missing_credentials_toast = 2131099751;

 			// aapt resource value: 0x7f060068
-			public const int hockeyapp_login_login_button_text = 2131099752;
+			public const int hockeyapp_login_password_hint = 2131099752;

 			// aapt resource value: 0x7f060069
-			public const int hockeyapp_login_missing_credentials_toast = 2131099753;
+			public const int hockeyapp_paint_dialog_message = 2131099753;

 			// aapt resource value: 0x7f06006a
-			public const int hockeyapp_login_password_hint = 2131099754;
+			public const int hockeyapp_paint_dialog_negative_button = 2131099754;

 			// aapt resource value: 0x7f06006b
-			public const int hockeyapp_paint_dialog_message = 2131099755;
+			public const int hockeyapp_paint_dialog_neutral_button = 2131099755;

 			// aapt resource value: 0x7f06006c
-			public const int hockeyapp_paint_dialog_negative_button = 2131099756;
+			public const int hockeyapp_paint_dialog_positive_button = 2131099756;

 			// aapt resource value: 0x7f06006d
-			public const int hockeyapp_paint_dialog_neutral_button = 2131099757;
+			public const int hockeyapp_paint_indicator_toast = 2131099757;

 			// aapt resource value: 0x7f06006e
-			public const int hockeyapp_paint_dialog_positive_button = 2131099758;
+			public const int hockeyapp_paint_menu_clear = 2131099758;

 			// aapt resource value: 0x7f06006f
-			public const int hockeyapp_paint_indicator_toast = 2131099759;
+			public const int hockeyapp_paint_menu_save = 2131099759;

 			// aapt resource value: 0x7f060070
-			public const int hockeyapp_paint_menu_clear = 2131099760;
+			public const int hockeyapp_paint_menu_undo = 2131099760;

 			// aapt resource value: 0x7f060071
-			public const int hockeyapp_paint_menu_save = 2131099761;
+			public const int hockeyapp_permission_dialog_negative_button = 2131099761;

 			// aapt resource value: 0x7f060072
-			public const int hockeyapp_paint_menu_undo = 2131099762;
+			public const int hockeyapp_permission_dialog_positive_button = 2131099762;

 			// aapt resource value: 0x7f060073
-			public const int hockeyapp_permission_dialog_negative_button = 2131099763;
+			public const int hockeyapp_permission_update_message = 2131099763;

 			// aapt resource value: 0x7f060074
-			public const int hockeyapp_permission_dialog_positive_button = 2131099764;
+			public const int hockeyapp_permission_update_title = 2131099764;

 			// aapt resource value: 0x7f060075
-			public const int hockeyapp_permission_update_message = 2131099765;
+			public const int hockeyapp_update_button = 2131099765;

 			// aapt resource value: 0x7f060076
-			public const int hockeyapp_permission_update_title = 2131099766;
+			public const int hockeyapp_update_dialog_message = 2131099766;

 			// aapt resource value: 0x7f060077
-			public const int hockeyapp_update_button = 2131099767;
+			public const int hockeyapp_update_dialog_negative_button = 2131099767;

 			// aapt resource value: 0x7f060078
-			public const int hockeyapp_update_dialog_message = 2131099768;
+			public const int hockeyapp_update_dialog_positive_button = 2131099768;

 			// aapt resource value: 0x7f060079
-			public const int hockeyapp_update_dialog_negative_button = 2131099769;
+			public const int hockeyapp_update_dialog_title = 2131099769;

 			// aapt resource value: 0x7f06007a
-			public const int hockeyapp_update_dialog_positive_button = 2131099770;
-
-			// aapt resource value: 0x7f06007b
-			public const int hockeyapp_update_dialog_title = 2131099771;
-
-			// aapt resource value: 0x7f06007c
-			public const int hockeyapp_update_mandatory_toast = 2131099772;
+			public const int hockeyapp_update_mandatory_toast = 2131099770;

 			// aapt resource value: 0x7f060037
 			public const int library_name = 2131099703;
@@ -6486,7 +6486,8 @@
 		public partial class Styleable
 		{

-			public static int[] ActionBar = new int[] {
+			public static int[] ActionBar = new int[]
+			{
 					2130772055,
 					2130772057,
 					2130772058,
@@ -6596,13 +6597,15 @@
 			// aapt resource value: 5
 			public const int ActionBar_titleTextStyle = 5;

-			public static int[] ActionBarLayout = new int[] {
+			public static int[] ActionBarLayout = new int[]
+			{
 					16842931};

 			// aapt resource value: 0
 			public const int ActionBarLayout_android_layout_gravity = 0;

-			public static int[] ActionMenuItemView = new int[] {
+			public static int[] ActionMenuItemView = new int[]
+			{
 					16843071};

 			// aapt resource value: 0
@@ -6610,7 +6613,8 @@

 			public static int[] ActionMenuView;

-			public static int[] ActionMode = new int[] {
+			public static int[] ActionMode = new int[]
+			{
 					2130772055,
 					2130772061,
 					2130772062,
@@ -6636,7 +6640,8 @@
 			// aapt resource value: 1
 			public const int ActionMode_titleTextStyle = 1;

-			public static int[] ActivityChooserView = new int[] {
+			public static int[] ActivityChooserView = new int[]
+			{
 					2130772083,
 					2130772084};

@@ -6646,7 +6651,8 @@
 			// aapt resource value: 0
 			public const int ActivityChooserView_initialActivityCount = 0;

-			public static int[] AlertDialog = new int[] {
+			public static int[] AlertDialog = new int[]
+			{
 					16842994,
 					2130772085,
 					2130772086,
@@ -6672,7 +6678,8 @@
 			// aapt resource value: 4
 			public const int AlertDialog_singleChoiceItemLayout = 4;

-			public static int[] AppBarLayout = new int[] {
+			public static int[] AppBarLayout = new int[]
+			{
 					16842964,
 					2130772080,
 					2130772260};
@@ -6686,7 +6693,8 @@
 			// aapt resource value: 2
 			public const int AppBarLayout_expanded = 2;

-			public static int[] AppBarLayout_LayoutParams = new int[] {
+			public static int[] AppBarLayout_LayoutParams = new int[]
+			{
 					2130772261,
 					2130772262};

@@ -6696,7 +6704,8 @@
 			// aapt resource value: 1
 			public const int AppBarLayout_LayoutParams_layout_scrollInterpolator = 1;

-			public static int[] AppCompatTextView = new int[] {
+			public static int[] AppCompatTextView = new int[]
+			{
 					16842804,
 					2130772090};

@@ -6706,13 +6715,15 @@
 			// aapt resource value: 1
 			public const int AppCompatTextView_textAllCaps = 1;

-			public static int[] ButtonBarLayout = new int[] {
+			public static int[] ButtonBarLayout = new int[]
+			{
 					2130772091};

 			// aapt resource value: 0
 			public const int ButtonBarLayout_allowStacking = 0;

-			public static int[] CardView = new int[] {
+			public static int[] CardView = new int[]
+			{
 					2130772043,
 					2130772044,
 					2130772045,
@@ -6758,7 +6769,8 @@
 			// aapt resource value: 9
 			public const int CardView_contentPaddingTop = 9;

-			public static int[] CheckBoxPreference = new int[] {
+			public static int[] CheckBoxPreference = new int[]
+			{
 					16843247,
 					16843248,
 					16843249,
@@ -6784,11 +6796,12 @@
 			// aapt resource value: 3
 			public const int CheckBoxPreference_summaryOn = 3;

-			public static int[] CircleImageView = new int[] {
-					2130772322,
-					2130772323,
-					2130772324,
-					2130772325};
+			public static int[] CircleImageView = new int[]
+			{
+					2130772334,
+					2130772335,
+					2130772336,
+					2130772337};

 			// aapt resource value: 1
 			public const int CircleImageView_civ_border_color = 1;
@@ -6802,7 +6815,8 @@
 			// aapt resource value: 3
 			public const int CircleImageView_civ_fill_color = 3;

-			public static int[] CollapsingAppBarLayout_LayoutParams = new int[] {
+			public static int[] CollapsingAppBarLayout_LayoutParams = new int[]
+			{
 					2130772263,
 					2130772264};

@@ -6812,7 +6826,8 @@
 			// aapt resource value: 1
 			public const int CollapsingAppBarLayout_LayoutParams_layout_collapseParallaxMultiplier = 1;

-			public static int[] CollapsingToolbarLayout = new int[] {
+			public static int[] CollapsingToolbarLayout = new int[]
+			{
 					2130772057,
 					2130772265,
 					2130772266,
@@ -6870,7 +6885,8 @@
 			// aapt resource value: 10
 			public const int CollapsingToolbarLayout_toolbarId = 10;

-			public static int[] CompoundButton = new int[] {
+			public static int[] CompoundButton = new int[]
+			{
 					16843015,
 					2130772092,
 					2130772093};
@@ -6884,7 +6900,8 @@
 			// aapt resource value: 2
 			public const int CompoundButton_buttonTintMode = 2;

-			public static int[] CoordinatorLayout = new int[] {
+			public static int[] CoordinatorLayout = new int[]
+			{
 					2130772278,
 					2130772279};

@@ -6894,7 +6911,8 @@
 			// aapt resource value: 1
 			public const int CoordinatorLayout_statusBarBackground = 1;

-			public static int[] CoordinatorLayout_LayoutParams = new int[] {
+			public static int[] CoordinatorLayout_LayoutParams = new int[]
+			{
 					16842931,
 					2130772280,
 					2130772281,
@@ -6916,7 +6934,8 @@
 			// aapt resource value: 3
 			public const int CoordinatorLayout_LayoutParams_layout_keyline = 3;

-			public static int[] DialogPreference = new int[] {
+			public static int[] DialogPreference = new int[]
+			{
 					16843250,
 					16843251,
 					16843252,
@@ -6966,7 +6985,8 @@
 			// aapt resource value: 9
 			public const int DialogPreference_positiveButtonText = 9;

-			public static int[] DrawerArrowToggle = new int[] {
+			public static int[] DrawerArrowToggle = new int[]
+			{
 					2130772094,
 					2130772095,
 					2130772096,
@@ -7000,7 +7020,8 @@
 			// aapt resource value: 7
 			public const int DrawerArrowToggle_thickness = 7;

-			public static int[] FloatingActionButton = new int[] {
+			public static int[] FloatingActionButton = new int[]
+			{
 					2130772080,
 					2130772258,
 					2130772259,
@@ -7030,7 +7051,8 @@
 			// aapt resource value: 3
 			public const int FloatingActionButton_rippleColor = 3;

-			public static int[] ForegroundLinearLayout = new int[] {
+			public static int[] ForegroundLinearLayout = new int[]
+			{
 					16843017,
 					16843264,
 					2130772288};
@@ -7044,7 +7066,8 @@
 			// aapt resource value: 2
 			public const int ForegroundLinearLayout_foregroundInsidePadding = 2;

-			public static int[] LinearLayoutCompat = new int[] {
+			public static int[] LinearLayoutCompat = new int[]
+			{
 					16842927,
 					16842948,
 					16843046,
@@ -7082,7 +7105,8 @@
 			// aapt resource value: 7
 			public const int LinearLayoutCompat_showDividers = 7;

-			public static int[] LinearLayoutCompat_Layout = new int[] {
+			public static int[] LinearLayoutCompat_Layout = new int[]
+			{
 					16842931,
 					16842996,
 					16842997,
@@ -7100,7 +7124,8 @@
 			// aapt resource value: 1
 			public const int LinearLayoutCompat_Layout_android_layout_width = 1;

-			public static int[] ListPopupWindow = new int[] {
+			public static int[] ListPopupWindow = new int[]
+			{
 					16843436,
 					16843437};

@@ -7110,7 +7135,8 @@
 			// aapt resource value: 1
 			public const int ListPopupWindow_android_dropDownVerticalOffset = 1;

-			public static int[] ListPreference = new int[] {
+			public static int[] ListPreference = new int[]
+			{
 					16842930,
 					16843256,
 					2130772004,
@@ -7128,7 +7154,8 @@
 			// aapt resource value: 3
 			public const int ListPreference_entryValues = 3;

-			public static int[] LoadingImageView = new int[] {
+			public static int[] LoadingImageView = new int[]
+			{
 					2130771985,
 					2130771986,
 					2130771987};
@@ -7142,7 +7169,8 @@
 			// aapt resource value: 0
 			public const int LoadingImageView_imageAspectRatioAdjust = 0;

-			public static int[] MapAttrs = new int[] {
+			public static int[] MapAttrs = new int[]
+			{
 					2130771968,
 					2130771969,
 					2130771970,
@@ -7212,7 +7240,8 @@
 			// aapt resource value: 14
 			public const int MapAttrs_zOrderOnTop = 14;

-			public static int[] MenuGroup = new int[] {
+			public static int[] MenuGroup = new int[]
+			{
 					16842766,
 					16842960,
 					16843156,
@@ -7238,7 +7267,8 @@
 			// aapt resource value: 2
 			public const int MenuGroup_android_visible = 2;

-			public static int[] MenuItem = new int[] {
+			public static int[] MenuItem = new int[]
+			{
 					16842754,
 					16842766,
 					16842960,
@@ -7308,7 +7338,8 @@
 			// aapt resource value: 13
 			public const int MenuItem_showAsAction = 13;

-			public static int[] MenuView = new int[] {
+			public static int[] MenuView = new int[]
+			{
 					16842926,
 					16843052,
 					16843053,
@@ -7342,7 +7373,8 @@
 			// aapt resource value: 7
 			public const int MenuView_preserveIconSpacing = 7;

-			public static int[] MultiSelectListPreference = new int[] {
+			public static int[] MultiSelectListPreference = new int[]
+			{
 					16842930,
 					16843256,
 					2130772004,
@@ -7360,7 +7392,8 @@
 			// aapt resource value: 3
 			public const int MultiSelectListPreference_entryValues = 3;

-			public static int[] NavigationView = new int[] {
+			public static int[] NavigationView = new int[]
+			{
 					16842964,
 					16842973,
 					16843039,
@@ -7402,7 +7435,8 @@
 			// aapt resource value: 4
 			public const int NavigationView_menu = 4;

-			public static int[] PopupWindow = new int[] {
+			public static int[] PopupWindow = new int[]
+			{
 					16843126,
 					2130772110};

@@ -7412,13 +7446,15 @@
 			// aapt resource value: 1
 			public const int PopupWindow_overlapAnchor = 1;

-			public static int[] PopupWindowBackgroundState = new int[] {
+			public static int[] PopupWindowBackgroundState = new int[]
+			{
 					2130772111};

 			// aapt resource value: 0
 			public const int PopupWindowBackgroundState_state_above_anchor = 0;

-			public static int[] Preference = new int[] {
+			public static int[] Preference = new int[]
+			{
 					16842754,
 					16842765,
 					16842766,
@@ -7532,7 +7568,8 @@
 			// aapt resource value: 18
 			public const int Preference_widgetLayout = 18;

-			public static int[] PreferenceFragmentCompat = new int[] {
+			public static int[] PreferenceFragmentCompat = new int[]
+			{
 					16842994,
 					2130772112};

@@ -7542,7 +7579,8 @@
 			// aapt resource value: 1
 			public const int PreferenceFragmentCompat_layout = 1;

-			public static int[] PreferenceGroup = new int[] {
+			public static int[] PreferenceGroup = new int[]
+			{
 					16843239,
 					2130772017};

@@ -7552,7 +7590,8 @@
 			// aapt resource value: 1
 			public const int PreferenceGroup_orderingFromXml = 1;

-			public static int[] PreferenceImageView = new int[] {
+			public static int[] PreferenceImageView = new int[]
+			{
 					16843039,
 					16843040,
 					2130772018,
@@ -7570,7 +7609,12 @@
 			// aapt resource value: 2
 			public const int PreferenceImageView_maxWidth = 2;

-			public static int[] ProgressWheel = new int[] {
+			public static int[] ProgressWheel = new int[]
+			{
+					2130772322,
+					2130772323,
+					2130772324,
+					2130772325,
 					2130772326,
 					2130772327,
 					2130772328,
@@ -7578,11 +7622,7 @@
 					2130772330,
 					2130772331,
 					2130772332,
-					2130772333,
-					2130772334,
-					2130772335,
-					2130772336,
-					2130772337};
+					2130772333};

 			// aapt resource value: 3
 			public const int ProgressWheel_ahBarColor = 3;
@@ -7620,7 +7660,8 @@
 			// aapt resource value: 2
 			public const int ProgressWheel_ahTextSize = 2;

-			public static int[] RecyclerView = new int[] {
+			public static int[] RecyclerView = new int[]
+			{
 					16842948,
 					2130771991,
 					2130771992,
@@ -7642,19 +7683,22 @@
 			// aapt resource value: 4
 			public const int RecyclerView_stackFromEnd = 4;

-			public static int[] ScrimInsetsFrameLayout = new int[] {
+			public static int[] ScrimInsetsFrameLayout = new int[]
+			{
 					2130772295};

 			// aapt resource value: 0
 			public const int ScrimInsetsFrameLayout_insetForeground = 0;

-			public static int[] ScrollingViewBehavior_Params = new int[] {
+			public static int[] ScrollingViewBehavior_Params = new int[]
+			{
 					2130772296};

 			// aapt resource value: 0
 			public const int ScrollingViewBehavior_Params_behavior_overlapTop = 0;

-			public static int[] SearchView = new int[] {
+			public static int[] SearchView = new int[]
+			{
 					16842970,
 					16843039,
 					16843296,
@@ -7724,7 +7768,8 @@
 			// aapt resource value: 12
 			public const int SearchView_voiceIcon = 12;

-			public static int[] SignInButton = new int[] {
+			public static int[] SignInButton = new int[]
+			{
 					2130771988,
 					2130771989,
 					2130771990};
@@ -7738,7 +7783,8 @@
 			// aapt resource value: 2
 			public const int SignInButton_scopeUris = 2;

-			public static int[] SnackbarLayout = new int[] {
+			public static int[] SnackbarLayout = new int[]
+			{
 					16843039,
 					2130772080,
 					2130772297};
@@ -7752,7 +7798,8 @@
 			// aapt resource value: 2
 			public const int SnackbarLayout_maxActionInlineWidth = 2;

-			public static int[] Spinner = new int[] {
+			public static int[] Spinner = new int[]
+			{
 					16843126,
 					16843131,
 					16843362,
@@ -7770,7 +7817,8 @@
 			// aapt resource value: 3
 			public const int Spinner_popupTheme = 3;

-			public static int[] SwitchCompat = new int[] {
+			public static int[] SwitchCompat = new int[]
+			{
 					16843044,
 					16843045,
 					16843074,
@@ -7812,7 +7860,8 @@
 			// aapt resource value: 3
 			public const int SwitchCompat_track = 3;

-			public static int[] SwitchPreference = new int[] {
+			public static int[] SwitchPreference = new int[]
+			{
 					16843247,
 					16843248,
 					16843249,
@@ -7854,7 +7903,8 @@
 			// aapt resource value: 8
 			public const int SwitchPreference_switchTextOn = 8;

-			public static int[] SwitchPreferenceCompat = new int[] {
+			public static int[] SwitchPreferenceCompat = new int[]
+			{
 					16843247,
 					16843248,
 					16843249,
@@ -7896,7 +7946,8 @@
 			// aapt resource value: 8
 			public const int SwitchPreferenceCompat_switchTextOn = 8;

-			public static int[] TabLayout = new int[] {
+			public static int[] TabLayout = new int[]
+			{
 					2130772298,
 					2130772299,
 					2130772300,
@@ -7962,7 +8013,8 @@
 			// aapt resource value: 9
 			public const int TabLayout_tabTextColor = 9;

-			public static int[] TextAppearance = new int[] {
+			public static int[] TextAppearance = new int[]
+			{
 					16842901,
 					16842902,
 					16842903,
@@ -8000,7 +8052,8 @@
 			// aapt resource value: 8
 			public const int TextAppearance_textAllCaps = 8;

-			public static int[] TextInputLayout = new int[] {
+			public static int[] TextInputLayout = new int[]
+			{
 					16842906,
 					16843088,
 					2130772314,
@@ -8042,7 +8095,8 @@
 			// aapt resource value: 2
 			public const int TextInputLayout_hintTextAppearance = 2;

-			public static int[] Theme = new int[] {
+			public static int[] Theme = new int[]
+			{
 					16842839,
 					16842926,
 					2130772022,
@@ -8568,7 +8622,8 @@
 			// aapt resource value: 10
 			public const int Theme_yesNoPreferenceStyle = 10;

-			public static int[] Toolbar = new int[] {
+			public static int[] Toolbar = new int[]
+			{
 					16842927,
 					16843072,
 					2130772057,
@@ -8670,7 +8725,8 @@
 			// aapt resource value: 23
 			public const int Toolbar_titleTextColor = 23;

-			public static int[] View = new int[] {
+			public static int[] View = new int[]
+			{
 					16842752,
 					16842970,
 					2130772255,
@@ -8692,7 +8748,8 @@
 			// aapt resource value: 4
 			public const int View_theme = 4;

-			public static int[] ViewBackgroundHelper = new int[] {
+			public static int[] ViewBackgroundHelper = new int[]
+			{
 					16842964,
 					2130772258,
 					2130772259};
@@ -8706,7 +8763,8 @@
 			// aapt resource value: 2
 			public const int ViewBackgroundHelper_backgroundTintMode = 2;

-			public static int[] ViewStubCompat = new int[] {
+			public static int[] ViewStubCompat = new int[]
+			{
 					16842960,
 					16842994,
 					16842995};


Removing debug statement

Removing debug statement

--- ZScript/CodeGeneration/Tokenization/Helpers/JumpTokenOptimizer.cs
+++ ZScript/CodeGeneration/Tokenization/Helpers/JumpTokenOptimizer.cs
@@ -50,8 +50,6 @@
         /// <param name="endJumpTargetInstruction">The instruction to expand the last jump target as</param>
         public static void OptimizeJumps(IntermediaryTokenList tokens, VmInstruction endJumpTargetInstruction)
         {
-            return;
-
             tokens.BindJumpTargets(endJumpTargetInstruction);

             // Optimize the jump flow


修改雅虎天气提示语

修改雅虎天气提示语

雅虎天气接口错误率较高

--- GetInfo.cs
+++ GetInfo.cs
@@ -93,7 +93,7 @@
                     return "未查询到指定城市 " + city + " 的天气信息";
                 else
                 {
-                    ans = "根据" + weather.query.results.channel.description + "提供的消息，" + city + "的气息情况如下：";
+                    ans = weather.query.results.channel.description + "（请核对城市名是否正确）";
                     for (int i = 0; i < weather.query.results.channel.item.forecast.Count; i++)
                         ans = ans + Environment.NewLine + "周" + getYahooWeak(weather.query.results.channel.item.forecast[i].day) + "：" + getYahooWeatherCode(weather.query.results.channel.item.forecast[i].code) + "，最高气温：" + weather.query.results.channel.item.forecast[i].high + "摄氏度，最低气温：" + weather.query.results.channel.item.forecast[i].low + "摄氏度";
                     return ans;


9658: Glyph.AdvanceWidth

9658: Glyph.AdvanceWidth

--- a_mini/projects/PixelFarm/Typography/Typography.OpenFont/Glyph.cs
+++ a_mini/projects/PixelFarm/Typography/Typography.OpenFont/Glyph.cs
@@ -10,6 +10,8 @@
     {
         GlyphPointF[] glyphPoints;
         ushort[] _contourEndPoints;
+        ushort _advWidth;
+        bool _hasAdvWidth;
         Bounds _bounds;
         public static readonly Glyph Empty = new Glyph(new GlyphPointF[0], new ushort[0], Bounds.Zero, null);

@@ -31,13 +33,22 @@
             _contourEndPoints = contourEndPoints;
             _bounds = bounds;
             GlyphInstructions = glyphInstructions;
-
         }

         public Bounds Bounds { get { return _bounds; } }
         public ushort[] EndPoints { get { return _contourEndPoints; } }
         public GlyphPointF[] GlyphPoints { get { return glyphPoints; } }
+        public ushort AdvanceWidth
+        {
+            get { return _advWidth; }
+            set
+            {
+                _advWidth = value;
+                _hasAdvWidth = true;
+            }
+        }
+        public bool HasAdvWidth { get { return _hasAdvWidth; } }
         //--------------

         internal static void OffsetXY(Glyph glyph, short dx, short dy)


fix bug in file list when file gets downloaded from blob

--- DBLike/Client/Threads/Uploader.cs
+++ DBLike/Client/Threads/Uploader.cs
@@ -69,6 +69,9 @@
                     if (eventType == "create")
                     {
                         additionalInfo = "create";
+                        // add to the file list
+                        Client.LocalFileSysAccess.FileListMaintain addToFileList = new Client.LocalFileSysAccess.FileListMaintain();
+                        addToFileList.addSingleFileToFileList(fullpathOfChnagedFile);
                     }
                     if (eventType == "change")
                     {
@@ -79,7 +82,8 @@
                         additionalInfo = "signUpStart";
                     }

-                    // get the initial attribute before making this change
+
+                    // get the initial attribute before making this "change"
                     Client.LocalFileSysAccess.FileInfo tmp = new Client.LocalFileSysAccess.FileInfo();
                     Client.LocalFileSysAccess.FileList.fileInfoDic.TryGetValue(fullpathOfChnagedFile, out tmp);
                     DateTime timeBefore = tmp.time;
@@ -181,6 +185,7 @@

                                     }

+                                    // if file is in dic
                                     if (Client.LocalFileSysAccess.FileList.fileInfoDic.ContainsKey(fullpathOfChnagedFile))
                                     {
                                         // after it has been deleted
@@ -190,6 +195,7 @@

                                         // TODO
                                         // download newer version from server
+
                                     }
                                 }
                             }


Rewrote ssh disconnection handler

Rewrote ssh disconnection handler

--- Necrow/Probe.cs
+++ Necrow/Probe.cs
@@ -865,6 +865,7 @@
             if (!IsStarted)
             {
                 started = true;
+                Event("Probe.IsConnected?" + IsConnected);
                 Event("Connecting... (" + properties.SSHUser + "@" + properties.SSHServerAddress + " [" + properties.TacacUser + "])");
                 new Thread(new ThreadStart(delegate ()
                 {
@@ -919,25 +920,45 @@
         private void OnDisconnected(object sender)
         {
             outputIdentifier = null;
-            Event("Disconnected");
-
-            probing = false;
-
-            sshProbeStartTime = DateTime.MinValue;
-            started = false;
-
-            if (mainLoop != null)
-            {
-                mainLoop.Abort();
-                mainLoop = null;
-            }
+
+            Thread stop = new Thread(new ThreadStart(delegate ()
+            {
+                do
+                {
+                    if (mainLoop != null)
+                    {
+                        if (!mainLoop.IsAlive)
+                        {
+                            mainLoop = null;
+                            break;
+                        }
+                    }
+                    else break;
+
+                    Thread.Sleep(100);
+                }
+                while (true);
+
+                probing = false;
+                started = false;
+                sshProbeStartTime = DateTime.MinValue;
+
+                Event("Disconnected");
+            }));
+
+            stop.Start();
+
             if (idleThread != null)
             {
+                Event("Destroying idle thread");
                 idleThread.Abort();
                 idleThread = null;
             }
-
-            started = false;
+            if (mainLoop != null)
+            {
+                Event("Destroying main thread");
+                mainLoop.Abort();
+            }
         }

         private void OnConnectionFailed(object sender, Exception exception)
@@ -1731,6 +1752,7 @@
                         {
                             if (probe != null)
                             {
+                                timeout = false;
                                 probe.FailureType = FailureTypes.Connection;
                             }
                         }
@@ -1772,13 +1794,21 @@
                 else requestLoop = false;
             }

-            if (!timeout) return false;
+            if (command == "display clock")
+            {
+                probe.FailureType = FailureTypes.Connection;
+                timeout = true;
+            }
+
+            if (!timeout)
+            {
+                probe.FailureType = FailureTypes.None;
+                return false;
+            }
             else
             {
-                if (probe != null)
-                {
+                if (probe != null && probe.FailureType == FailureTypes.None)
                     probe.FailureType = FailureTypes.Request;
-                }
                 return true;
             }
         }


Reverted back public class to internal for ServiceMapping (due to test)

--- Necrow/Probe.cs
+++ Necrow/Probe.cs
@@ -5417,7 +5417,7 @@
         #endregion
     }

-    public class ServiceMapping
+    internal class ServiceMapping
     {
         #region Constants