Better code coverage for Log class

Better code coverage for Log class

--- ATL.test/Logging/LoggingTest.cs
+++ ATL.test/Logging/LoggingTest.cs
@@ -15,6 +15,57 @@
         {
             LogDelegator.SetLog(ref theLog);
             theLog.Register(this);
+        }
+
+        [TestMethod]
+        public void Log_Categories()
+        {
+            messages.Clear();
+
+            theLog.Debug("debug");
+            theLog.Info("info1");
+            theLog.Info("info2");
+            theLog.Warning("warning1");
+            theLog.Warning("warning2");
+            theLog.Warning("warning3");
+            theLog.Error("error");
+
+            IList<Log.LogItem> msgs = theLog.GetAllItems();
+            Assert.AreEqual(7, msgs.Count);
+            Assert.AreEqual(Log.LV_DEBUG, msgs[0].Level);
+            Assert.AreEqual(Log.LV_INFO, msgs[1].Level);
+            Assert.AreEqual(Log.LV_WARNING, msgs[3].Level);
+            Assert.AreEqual(Log.LV_ERROR, msgs[6].Level);
+
+            msgs = theLog.GetAllItems(Log.LV_DEBUG);
+            Assert.AreEqual(1, msgs.Count);
+            Assert.AreEqual(Log.LV_DEBUG, msgs[0].Level);
+            Assert.AreEqual("debug", msgs[0].Message);
+
+            msgs = theLog.GetAllItems(Log.LV_INFO);
+            Assert.AreEqual(2, msgs.Count);
+            Assert.AreEqual(Log.LV_INFO, msgs[0].Level);
+            Assert.AreEqual("info1", msgs[0].Message);
+            Assert.AreEqual(Log.LV_INFO, msgs[1].Level);
+            Assert.AreEqual("info2", msgs[1].Message);
+
+            msgs = theLog.GetAllItems(Log.LV_WARNING);
+            Assert.AreEqual(3, msgs.Count);
+            Assert.AreEqual(Log.LV_WARNING, msgs[0].Level);
+            Assert.AreEqual("warning1", msgs[0].Message);
+            Assert.AreEqual(Log.LV_WARNING, msgs[1].Level);
+            Assert.AreEqual("warning2", msgs[1].Message);
+            Assert.AreEqual(Log.LV_WARNING, msgs[2].Level);
+            Assert.AreEqual("warning3", msgs[2].Message);
+
+            msgs = theLog.GetAllItems(Log.LV_ERROR);
+            Assert.AreEqual(1, msgs.Count);
+            Assert.AreEqual(Log.LV_ERROR, msgs[0].Level);
+            Assert.AreEqual("error", msgs[0].Message);
+
+            theLog.ClearAll();
+            msgs = theLog.GetAllItems();
+            Assert.AreEqual(0, msgs.Count);
         }

         [TestMethod]


Age and gender OK

Age and gender OK

--- Ada/AdaBot/Dialogs/AdaDialog.cs
+++ Ada/AdaBot/Dialogs/AdaDialog.cs
@@ -25,7 +25,7 @@
         //[NonSerialized]
         //private CreateDialog customDialog = new CreateDialog();

-        public AdaDialog(params ILuisService[] services) : base(services)
+        public AdaDialog(params ILuisService[] services) : base(services)
         {

         }


Added tests for doing an edit.

Added tests for doing an edit.

--- Agvise.Api.Tests/ApiUnitTest.cs
+++ Agvise.Api.Tests/ApiUnitTest.cs
@@ -130,24 +130,34 @@
             var submittedSampleOrder = client.SubmitSample(sampleOrder);
             RunSampleOrderAsserts(sampleOrder, submittedSampleOrder);

-            var submittedSampleOrder2 = client.GetSampleSubmission(submittedSampleOrder.SampleOrderID);
-            RunSampleOrderAsserts(sampleOrder, submittedSampleOrder);
-
-            Assert.AreEqual(submittedSampleOrder.CustomerAccountNumber, submittedSampleOrder2.CustomerAccountNumber);
-            Assert.AreEqual(submittedSampleOrder.SubmitterName, submittedSampleOrder2.SubmitterName);
-            Assert.AreEqual(submittedSampleOrder.SubmitterAddress1, submittedSampleOrder2.SubmitterAddress1);
-            Assert.AreEqual(submittedSampleOrder.SubmitterAddress2, submittedSampleOrder2.SubmitterAddress2);
-            Assert.AreEqual(submittedSampleOrder.SubmitterCity, submittedSampleOrder2.SubmitterCity);
-            Assert.AreEqual(submittedSampleOrder.SubmitterState, submittedSampleOrder2.SubmitterState);
-            Assert.AreEqual(submittedSampleOrder.SubmitterPostalCode, submittedSampleOrder2.SubmitterPostalCode);
-            Assert.AreEqual(submittedSampleOrder.SubmitterAccountNumber, submittedSampleOrder2.SubmitterAccountNumber);
-            Assert.AreEqual(submittedSampleOrder.SubmitterEmail, submittedSampleOrder2.SubmitterEmail);
-            Assert.AreEqual(submittedSampleOrder.CreatedByAccountNumber, submittedSampleOrder2.CreatedByAccountNumber);
-            Assert.AreEqual(submittedSampleOrder.UpdatedByAccountNumber, submittedSampleOrder2.UpdatedByAccountNumber);
-            Assert.AreEqual(submittedSampleOrder.Printed, submittedSampleOrder2.Printed);
-            Assert.AreEqual(submittedSampleOrder.Received, submittedSampleOrder2.Received);
-            Assert.AreEqual(submittedSampleOrder.Updated.ToUniversalTime().ToString(), submittedSampleOrder2.Updated.ToUniversalTime().ToString());
-            Assert.AreEqual(submittedSampleOrder.Created.ToUniversalTime().ToString(), submittedSampleOrder2.Created.ToUniversalTime().ToString());
+            // perform an edit
+            submittedSampleOrder.GrowerCity = "Sioux Falls";
+            submittedSampleOrder.GrowerState = "SD";
+            submittedSampleOrder.GrowerPostalCode = "33333";
+            submittedSampleOrder.Samples[0].SampleIdentifier = "3333";
+            submittedSampleOrder.Samples[0].UniqueIdentifier = "4444";
+
+            var submittedSampleOrder2 = client.SubmitSample(submittedSampleOrder);
+            RunSampleOrderAsserts(submittedSampleOrder, submittedSampleOrder2);
+
+            var submittedSampleOrder3 = client.GetSampleSubmission(submittedSampleOrder2.SampleOrderID);
+            RunSampleOrderAsserts(submittedSampleOrder2, submittedSampleOrder3);
+
+            Assert.AreEqual(submittedSampleOrder2.CustomerAccountNumber, submittedSampleOrder3.CustomerAccountNumber);
+            Assert.AreEqual(submittedSampleOrder2.SubmitterName, submittedSampleOrder3.SubmitterName);
+            Assert.AreEqual(submittedSampleOrder2.SubmitterAddress1, submittedSampleOrder3.SubmitterAddress1);
+            Assert.AreEqual(submittedSampleOrder2.SubmitterAddress2, submittedSampleOrder3.SubmitterAddress2);
+            Assert.AreEqual(submittedSampleOrder2.SubmitterCity, submittedSampleOrder3.SubmitterCity);
+            Assert.AreEqual(submittedSampleOrder2.SubmitterState, submittedSampleOrder3.SubmitterState);
+            Assert.AreEqual(submittedSampleOrder2.SubmitterPostalCode, submittedSampleOrder3.SubmitterPostalCode);
+            Assert.AreEqual(submittedSampleOrder2.SubmitterAccountNumber, submittedSampleOrder3.SubmitterAccountNumber);
+            Assert.AreEqual(submittedSampleOrder2.SubmitterEmail, submittedSampleOrder3.SubmitterEmail);
+            Assert.AreEqual(submittedSampleOrder2.CreatedByAccountNumber, submittedSampleOrder3.CreatedByAccountNumber);
+            Assert.AreEqual(submittedSampleOrder2.UpdatedByAccountNumber, submittedSampleOrder3.UpdatedByAccountNumber);
+            Assert.AreEqual(submittedSampleOrder2.Printed, submittedSampleOrder3.Printed);
+            Assert.AreEqual(submittedSampleOrder2.Received, submittedSampleOrder3.Received);
+            Assert.AreEqual(submittedSampleOrder2.Updated.ToUniversalTime().ToString(), submittedSampleOrder3.Updated.ToUniversalTime().ToString());
+            Assert.AreEqual(submittedSampleOrder2.Created.ToUniversalTime().ToString(), submittedSampleOrder3.Created.ToUniversalTime().ToString());

         }


Fixing problems with text not being passed around. Fixing serialization of partial trees.

--- AntlrJson/ParseTreeConverter.cs
+++ AntlrJson/ParseTreeConverter.cs
@@ -35,6 +35,8 @@
             MyLexer lexer = new MyLexer(null);
             MyParser parser = new MyParser(out_token_stream);
             MyCharStream fake_char_stream = new MyCharStream();
+            string text = null;
+
             lexer.InputStream = fake_char_stream;
             if (!(reader.TokenType == JsonTokenType.StartObject)) throw new JsonException();
             reader.Read();
@@ -61,6 +63,7 @@
                 {
                     out_token_stream.Text = reader.GetString();
                     fake_char_stream.Text = out_token_stream.Text;
+                    text = out_token_stream.Text;
                     reader.Read();
                 }
                 else if (pn == "Tokens")
@@ -229,7 +232,8 @@
                 Stream = out_token_stream,
                 Nodes = result.ToArray(),
                 Lexer = lexer,
-                Parser = parser
+                Parser = parser,
+                Text = text
             };
             return res;
         }
@@ -338,7 +342,14 @@
                 if (node is ParserRuleContext n)
                 {
                     if (n.Parent != null)
-                        writer.WriteNumberValue(preorder[n.Parent]);
+                    {
+                        // Note, the node may have a parent, but the tree that is being serialized may be
+                        // a sub tree. If there is no key for the node, write out zero.
+                        if (preorder.ContainsKey(n.Parent))
+                            writer.WriteNumberValue(preorder[n.Parent]);
+                        else
+                            writer.WriteNumberValue(0);
+                    }
                     else
                         writer.WriteNumberValue(0);
                     var type = n.RuleIndex;
@@ -353,7 +364,12 @@
                 } else if (node is TerminalNodeImpl t)
                 {
                     if (t.Parent != null)
-                        writer.WriteNumberValue(preorder[t.Parent]);
+                    {
+                        if (preorder.ContainsKey(t.Parent))
+                            writer.WriteNumberValue(preorder[t.Parent]);
+                        else
+                            writer.WriteNumberValue(0);
+                    }
                     else
                         writer.WriteNumberValue(0);
                     var type = t.Symbol.TokenIndex + 1000000;


(IAF): implemented older format and fixed alpha channel handling.

--- ArcFormats/Triangle/ImageIAF.cs
+++ ArcFormats/Triangle/ImageIAF.cs
@@ -2,7 +2,7 @@
 //! \date       Sun May 31 21:17:54 2015
 //! \brief      IAF image format.
 //
-// Copyright (C) 2015 by morkt
+// Copyright (C) 2015-2016 by morkt
 //
 // Permission is hereby granted, free of charge, to any person obtaining a copy
 // of this software and associated documentation files (the "Software"), to
@@ -53,10 +53,12 @@
             if (12 != stream.Read (header, 0, 12))
                 return null;
             int data_offset;
-            int packed_size = LittleEndian.ToInt32 (header, 1);
-            int x, y, unpacked_size;
-            if (5+packed_size+0x14 == stream.Length)
-            {
+            int packed_size0 = LittleEndian.ToInt32 (header, 0);
+            int packed_size1 = LittleEndian.ToInt32 (header, 1);
+            int x, y, packed_size, unpacked_size;
+            if (5+packed_size1+0x14 == stream.Length)
+            {
+                packed_size = packed_size1;
                 data_offset = 5;
                 stream.Seek (-0x14, SeekOrigin.End);
                 if (0x14 != stream.Read (header, 0, 0x14))
@@ -65,13 +67,24 @@
                 y = LittleEndian.ToInt32 (header, 4);
                 unpacked_size = LittleEndian.ToInt32 (header, 0x10);
             }
+            else if (4+packed_size0+0xC == stream.Length)
+            {
+                packed_size = packed_size0;
+                data_offset = 4;
+                stream.Seek (-12, SeekOrigin.End);
+                if (12 != stream.Read (header, 0, 12))
+                    return null;
+                x = LittleEndian.ToInt32 (header, 0);
+                y = LittleEndian.ToInt32 (header, 4);
+                unpacked_size = LittleEndian.ToInt32 (header, 8);
+            }
             else
             {
+                packed_size = (int)stream.Length-12;
                 data_offset = 12;
                 x = LittleEndian.ToInt32 (header, 0);
                 y = LittleEndian.ToInt32 (header, 4);
                 unpacked_size = LittleEndian.ToInt32 (header, 8);
-                packed_size = (int)stream.Length-12;
             }
             if (Math.Abs (x) > 4096 || Math.Abs (y) > 4096)
                 return null;
@@ -171,10 +184,32 @@

         static ImageData BitmapWithAlphaChannel (ImageMetaData info, byte[] bitmap, int alpha_offset)
         {
+            int info_offset = alpha_offset+0x0E;
+            int palette_offset = info_offset + LittleEndian.ToInt32 (bitmap, info_offset);
+            int src_pixels = LittleEndian.ToInt32 (bitmap, 0x0A);
+            int src_alpha  = alpha_offset + LittleEndian.ToInt32 (bitmap, alpha_offset+0x0A);
+
+            int colors  = (src_alpha - palette_offset) / 4;
+            var alpha_map = new byte[0x100];
+            if (colors > 0)
+            {
+                for (int i = 0; i < colors; ++i)
+                {
+                    byte b = bitmap[palette_offset];
+                    byte g = bitmap[palette_offset+1];
+                    byte r = bitmap[palette_offset+2];
+                    alpha_map[i] = (byte)((b + g + r) / 3);
+                    palette_offset += 4;
+                }
+            }
+            else
+            {
+                for (int i = 0; i < 0x100; ++i)
+                    alpha_map[i] = (byte)i;
+            }
+
             int src_pixel_size = info.BPP/8;
             int src_stride = (int)info.Width*src_pixel_size;
-            int src_pixels = LittleEndian.ToInt32 (bitmap, 0x0A);
-            int src_alpha  = alpha_offset + LittleEndian.ToInt32 (bitmap, alpha_offset+0x0A);
             var pixels = new byte[info.Width * info.Height * 4];
             int dst = 0;
             for (int y = (int)info.Height-1; y >= 0; --y)
@@ -186,7 +221,7 @@
                     pixels[dst++] = bitmap[src];
                     pixels[dst++] = bitmap[src+1];
                     pixels[dst++] = bitmap[src+2];
-                    pixels[dst++] = (byte)~bitmap[alpha++];
+                    pixels[dst++] = (byte)~alpha_map[bitmap[alpha++]];
                     src += src_pixel_size;
                 }
             }


Potential fix for not working on mac

Potential fix for not working on mac

--- CheatModController.cs
+++ CheatModController.cs
@@ -19,9 +19,9 @@
         }

         void Update() {
-            if (Input.GetKeyDown(KeyCode.T)) {
-                CMWindow window = windows.Find(x=> x.id == WindowIds.MainWindow);
-                window.ToggleWindowState();
+            if (Input.GetKeyDown(KeyCode.T) || (Input.GetKeyDown(KeyCode.LeftAlt) && Input.GetKeyDown(KeyCode.T))) {
+                Debug.Log("Toggled Cheatmod window");
+                getWindow(WindowIds.MainWindow).ToggleWindowState();
             }
         }


Cleaner treatment of global input state

Cleaner treatment of global input state

--- Circuit/Simulation.cs
+++ Circuit/Simulation.cs
@@ -339,9 +339,6 @@
             Dictionary<Expression, LinqExpression> map = new Dictionary<Expression, LinqExpression>();
             Dictionary<Expression, LinqExpression> buffers = new Dictionary<Expression, LinqExpression>();

-            // Add the globals to the map.
-            foreach (KeyValuePair<Expression, GlobalExpr<double>> i in globals)
-                map[i.Key] = i.Value;

             // Lambda definition objects.
             List<ParameterExpression> parameters = new List<ParameterExpression>();
@@ -365,13 +362,13 @@
             Input = Input.Where(i => IsExpressionUsed(Output, i)).ToList();
             // Create globals to store previous values of input.
             foreach (Expression i in Input)
-            {
-                GlobalExpr<double> prev = new GlobalExpr<double>(i.ToString().Replace("[t]", "[t-1]"));
-                globals[i] = prev;
-                map[i.Evaluate(t_t0)] = prev;
-            }
+                globals[i.Evaluate(t_t0)] = new GlobalExpr<double>(i.ToString().Replace("[t]", "[t-1]"));

             // Define lambda body.
+
+            // Add the globals to the map.
+            foreach (KeyValuePair<Expression, GlobalExpr<double>> i in globals)
+                map[i.Key] = i.Value;

             // double t = t0
             ParameterExpression t = Declare<double>(locals, map, Simulation.t);
@@ -404,8 +401,7 @@
                     Dictionary<Expression, LinqExpression> dVi = new Dictionary<Expression, LinqExpression>();
                     foreach (Expression i in Input)
                     {
-                        // Ensure that we have a global variable to store the previous sample in.
-                        LinqExpression Va = globals[i];
+                        LinqExpression Va = globals[i.Evaluate(t_t0)];
                         LinqExpression Vb = LinqExpression.MakeIndex(
                             buffers[i],
                             buffers[i].Type.GetProperty("Item"),


Allow customization of enabled stage

Allow customization of enabled stage

--- Client/Base/System.cs
+++ Client/Base/System.cs
@@ -55,6 +55,11 @@
         protected System() => NetworkEvent.onNetworkStatusChanged.Add(NetworkEventHandler);

         /// <summary>
+        /// Override this property if you want to enable the system BEFORE we are in KSC
+        /// </summary>
+        protected virtual ClientState EnableStage => ClientState.Running;
+
+        /// <summary>
         /// Handle here what happens to your system when the network status changes. By default it will be disabled if we disconnect and enable just before starting
         /// </summary>
         protected virtual void NetworkEventHandler(ClientState data)
@@ -64,7 +69,7 @@
                 Enabled = false;
             }

-            if (data == ClientState.Running)
+            if (data == EnableStage)
             {
                 Enabled = true;
             }


reorder

reorder

--- Assets/Scripts/Enemies/Enemy.cs
+++ Assets/Scripts/Enemies/Enemy.cs
@@ -12,15 +12,15 @@
 	public bool IsAutoMove = true;
 	public float Speed = 10;

-	public void DecreaseHealth(int amount)
-	{
-		Health -= amount;
-	}
-
 	void Start()
 	{
 		Game.Enemies.Add(this);
 		if(IsAutoMove == true) IsMoving = true;
+	}
+
+	public void DecreaseHealth(int amount)
+	{
+		Health -= amount;
 	}

 	void OnDestroy()


update

update

--- Assets/Scripts/JointAnimator.cs
+++ Assets/Scripts/JointAnimator.cs
@@ -4,83 +4,104 @@
 [ExecuteInEditMode]
 public class JointAnimator : MonoBehaviour {

-    [Range(0, 135)]
-    public float LeftLowerArmANGLE;
-    [SerializeField]
-    GameObject LeftLowerArm;
+    public Joints mabones;

     [Range(0, 135)]
-    public float RightLowerArmANGLE;
-    [SerializeField]
-    GameObject RightLowerArm;
+    public float LeftLowerArmANGLE;
+
+    [Range(0, 135)]
+    public float RightLowerArmANGLE;

     [Range(-90, 90)]
-    public float LeftShoulderANGLE;
-    [SerializeField]
-    GameObject LeftShoulder;
+    public float LeftShoulderANGLE;

     [Range(-90, 90)]
-    public float RightShoulderANGLE;
-    [SerializeField]
-    GameObject RightShoulder;
+    public float RightShoulderANGLE;

     [Range(-45, 10)]
     public float LeftHandANGLE;
-    [SerializeField]
-    GameObject LeftHand;

     [Range(-45, 10)]
-    public float RightHandANGLE;
-    [SerializeField]
-    GameObject RightHand;
+    public float RightHandANGLE;

     [Range(-30, 70)]
-    public float UpperTorsoANGLE;
-    [SerializeField]
-    GameObject UpperTorso;
+    public float UpperTorsoANGLE;

     [Range(-10, 45)]
-    public float WaistANGLE;
-    [SerializeField]
-    GameObject Waist;
+    public float WaistANGLE;

     [Range(-30, 80)]
     public float LeftThighANGLE;
-    [SerializeField]
-    GameObject LeftThigh;

     [Range(-30, 80)]
-    public float RightThighANGLE;
-    [SerializeField]
-    GameObject RightThigh;
+    public float RightThighANGLE;

     [Range(-135, 0)]
-    public float LeftLowerLegANGLE;
-    [SerializeField]
-    GameObject LeftLowerLeg;
+    public float LeftLowerLegANGLE;

     [Range(-135, 0)]
-    public float RightLowerLegANGLE;
-    [SerializeField]
-    GameObject RightLowerLeg;
+    public float RightLowerLegANGLE;

     [Range(-70, 0)]
-    public float LeftFootANGLE;
-    [SerializeField]
-    GameObject LeftFoot;
+    public float LeftFootANGLE;

     [Range(-70, 0)]
-    public float RightFootANGLE;
-    [SerializeField]
-    GameObject RightFoot;
+    public float RightFootANGLE;

     [Range(-60, 60)]
-    public float HeadANGLE;
-    [SerializeField]
-    GameObject Head;
+    public float HeadANGLE;

     void Update()
     {
-
+        mabones.LeftLowerArm.transform.localRotation = Quaternion.Euler(0, 0, LeftLowerArmANGLE);
+        mabones.RightLowerArm.transform.localRotation = Quaternion.Euler(0, 0, RightLowerArmANGLE);
+        mabones.LeftShoulder.transform.localRotation = Quaternion.Euler(0, 0, LeftShoulderANGLE);
+        mabones.RightShoulder.transform.localRotation = Quaternion.Euler(0, 0, RightShoulderANGLE);
+        mabones.LeftHand.transform.localRotation = Quaternion.Euler(0, 0, LeftHandANGLE);
+        mabones.RightHand.transform.localRotation = Quaternion.Euler(0, 0, RightHandANGLE);
+        mabones.UpperTorso.transform.localRotation = Quaternion.Euler(0, 0, UpperTorsoANGLE);
+        mabones.Waist.transform.localRotation = Quaternion.Euler(0, 0, WaistANGLE);
+        mabones.LeftThigh.transform.localRotation = Quaternion.Euler(0, 0, LeftThighANGLE);
+        mabones.RightThigh.transform.localRotation = Quaternion.Euler(0, 0, RightThighANGLE);
+        mabones.LeftLowerLeg.transform.localRotation = Quaternion.Euler(0, 0, LeftLowerLegANGLE);
+        mabones.RightLowerLeg.transform.localRotation = Quaternion.Euler(0, 0, RightLowerLegANGLE);
+        mabones.LeftFoot.transform.localRotation = Quaternion.Euler(0, 0, LeftFootANGLE);
+        mabones.RightFoot.transform.localRotation = Quaternion.Euler(0, 0, RightFootANGLE);
+        mabones.Head.transform.localRotation = Quaternion.Euler(0, 0, HeadANGLE);
     }
 }
+
+[System.Serializable]
+public class Joints
+{
+    public GameObject LeftLowerArm;
+
+    public GameObject RightLowerArm;
+
+    public GameObject LeftShoulder;
+
+    public GameObject RightShoulder;
+
+    public GameObject LeftHand;
+
+    public GameObject RightHand;
+
+    public GameObject UpperTorso;
+
+    public GameObject Waist;
+
+    public GameObject LeftThigh;
+
+    public GameObject RightThigh;
+
+    public GameObject LeftLowerLeg;
+
+    public GameObject RightLowerLeg;
+
+    public GameObject LeftFoot;
+
+    public GameObject RightFoot;
+
+    public GameObject Head;
+
+}


Minorfix on ShotBehaviour

Minorfix on ShotBehaviour

--- Assets/Scripts/ShotBehaviour.cs
+++ Assets/Scripts/ShotBehaviour.cs
@@ -15,7 +15,7 @@
         {
             if (shownUp && !other.CompareTag("Shot"))
             {
-                Destroy(gameObject);
+                Destroy(this.gameObject);
             }
         }
     }


Added some initial color options for chat messages.

--- Assets/Shared/GUI/ChatWindow.cs
+++ Assets/Shared/GUI/ChatWindow.cs
@@ -51,17 +51,17 @@
 		printGUIStyle.normal.textColor = Color.white;
 		printGUIStyle.wordWrap = true;
 		printGUIStyle.stretchWidth = false;
-		print("Alpha Build 1.0");
-	}
-
-	void print(string m, bool timeStamp = true)
+		print("Alpha Build 1.0", false, "", "#00ffffff");
+	}
+
+	void print(string m, bool timeStamp = true, string u = "", string MessageColor = "")
 	{
 		if (m.Length > maxLength) m = m.Substring(0, maxLength);
 		//m = m.Replace(System.Environment.NewLine, " ");

 		string ts = timeStamp ? DateTime.Now.ToString(dateFormat_12) : "";

-		log.Add(new LogMessage(m, username, ts));
+		log.Add(new LogMessage(m, u, ts, MessageColor));

 		if(log.Count > maxLogMessages){
 			log.RemoveAt(0);
@@ -165,7 +165,7 @@
 		if (Input.GetKeyDown(KeyCode.Return) || returnPressed)
 		{
 			if (stringToEdit != "") {
-				print(stringToEdit, showTimestamp);
+				print(stringToEdit, showTimestamp, username);
 				stringToEdit = "";
 			}
 			selectTextfield = !selectTextfield;
@@ -182,6 +182,10 @@
 	public string user = "";
 	public string timestamp = "";

+	public string tsColor = "#ffa500ff";
+	public string userColor = "#00ff00ff";
+	public string messageColor = "";
+
 	public int length()
 	{
 		return toString().Length;
@@ -189,13 +193,24 @@

 	public string toString()
 	{
-		return "<color=#ffa500ff>" + timestamp + "</color> <color=#00ff00ff>" + user + ":</color> " + message;
-	}
-
-	public LogMessage(string m, string u="", string ts="")
+		string m = "";
+		if (timestamp != "") {
+			m = tsColor != "" ? "<color=" + tsColor + ">" + timestamp + "</color>" : timestamp;
+		}
+		if (user != "") {
+			m = string.Concat(m, userColor != "" ? " <color=" + userColor + ">" +user+":</color> " : user+" ");
+		}
+		if (message != "") {
+			m = string.Concat(m, messageColor != "" ? "<color=" + messageColor + ">" + message + "</color>" : message);
+		}
+		return m;
+	}
+
+	public LogMessage(string m, string u="", string ts="", string MessageColor="")
 	{
 		message = m;
 		user = u;
 		timestamp = ts;
+		messageColor = MessageColor;
 	}
 }


Explosion of Player

Explosion of Player

--- Assets/scripts/ControlPlayer.cs
+++ Assets/scripts/ControlPlayer.cs
@@ -15,6 +15,9 @@
     [SerializeField]
     private GameObject bullet;

+    [SerializeField]
+    private GameObject explosion;
+
     // Use this for initialization
     void Start ()
     {
@@ -31,6 +34,18 @@

         if (Input.GetMouseButtonUp(0)) {
             this.shootBullet();
+        }
+    }
+
+    private void OnCollisionEnter(Collision collision)
+    {
+        ContactPoint contact = collision.contacts[0];
+        if ("Enemy" == collision.gameObject.tag)
+        {
+            Vector3 posCollision = contact.point;
+            Quaternion rotCollision = Quaternion.FromToRotation(Vector3.up, contact.normal);
+            Instantiate(explosion, posCollision, rotCollision);
+            Destroy(gameObject);
         }
     }


Variable Flugbeschreibung

Variable Flugbeschreibung

--- Autopilot/GUI/Aufträge.xaml.cs
+++ Autopilot/GUI/Aufträge.xaml.cs
@@ -86,7 +86,6 @@

         private void BtnAngebotErstellen_Click(object sender, RoutedEventArgs e)
         {
-            CalculateCosts();
             Document Angebot = CreatePDF("Angebot");
             Angebot.Open();
             Angebot.Add(GetAngebotHeader());
@@ -119,10 +118,11 @@

         private Phrase GetAngebotText()
         {
+            double Preis = CalculateCosts();
             var BriefText = new Phrase();
             BriefText.Add(new Chunk("\n\nSehr geehrte/r " + FAnrede + ",", NormalFont));
             BriefText.Add(new Chunk("\n\nfür Ihre Anfrage bedanken wir uns ganz herzlich. Gern machen wir Ihnen ein Angebot über den Charterauftrag.", NormalFont));
-            BriefText.Add(new Chunk("\n\nFlug von A nach B für 1000€", NormalFont));
+            BriefText.Add(new Chunk("\n\n" + GetCharterDescription() + " für " + Preis.ToString("F2") + " €", NormalFont));
             BriefText.Add(new Chunk("\n\nWir würden uns freuen Ihren Auftrag zu erhalten. Bei Fragen zögern Sie nicht uns zu kontaktieren.", NormalFont));
             BriefText.Add(new Chunk("\n\nMit freundlichen Grüße", NormalFont));
             BriefText.Add(new Chunk("\n\nHINOTORI Executive AG", NormalFont));
@@ -130,12 +130,12 @@
         }
         #endregion

-        private void CalculateCosts()
+        private double CalculateCosts()
         {
             double Fixkosten = GetFixkosten();
             double Personalkosten = GetPersonalkosten();
             double Flugkosten = GetFlugkosten();
-            double Gesamtkosten = Fixkosten + Personalkosten + Flugkosten;
+            return Fixkosten + Personalkosten + Flugkosten;
         }

         private double GetFlugkosten()
@@ -215,5 +215,10 @@
             conn.Close();
             return Fixkosten;
         }
+
+        private string GetCharterDescription()
+        {
+            return "Flug von Berlin nach Prag";
+        }
     }
 }


Fix test

Fix test

--- BTCPayServer.Tests/UnitTest1.cs
+++ BTCPayServer.Tests/UnitTest1.cs
@@ -370,9 +370,8 @@
             foreach (var match in regex.Matches(text).OfType<Match>())
             {
                 var url = match.Groups[1].Value;
-                if (urlBlacklist.Any(a => a.StartsWith(url.ToLowerInvariant())))
+                if (urlBlacklist.Any(a => url.StartsWith(a.ToLowerInvariant())))
                     continue;
-
                 checkLinks.Add(AssertLinkNotDead(httpClient, url, file));
             }


Fixing CheckNoDeadLink test now that btse blocks our call from circleci

--- BTCPayServer.Tests/UnitTest1.cs
+++ BTCPayServer.Tests/UnitTest1.cs
@@ -117,16 +117,25 @@
         {
             List<Task> checkLinks = new List<Task>();
             var text = await File.ReadAllTextAsync(file);
+
+            var urlBlacklist = new string[]
+            {
+                "https://www.btse.com" // not allowing to be hit from circleci
+            };
+
             foreach (var match in regex.Matches(text).OfType<Match>())
             {
-                checkLinks.Add(AssertLinkNotDead(httpClient, match, file));
+                var url = match.Groups[1].Value;
+                if (urlBlacklist.Any(a => a.StartsWith(url.ToLowerInvariant())))
+                    continue;
+
+                checkLinks.Add(AssertLinkNotDead(httpClient, url, file));
             }
             await Task.WhenAll(checkLinks);
         }

-        private static async Task AssertLinkNotDead(HttpClient httpClient, Match match, string file)
-        {
-            var url = match.Groups[1].Value;
+        private static async Task AssertLinkNotDead(HttpClient httpClient, string url, string file)
+        {
             try
             {
                 using var request = new HttpRequestMessage(HttpMethod.Get, new Uri(url));


Revert "Use auto-gen'd partial properties since they magically work now."

This reverts commit 7e9b6e99c8d2a28c95082acaac6c66511b67149d.

--- VCSFramework/V2/AssemblyLine.cs
+++ VCSFramework/V2/AssemblyLine.cs
@@ -92,45 +92,45 @@
     public sealed partial record PushConstant : IStackPusher
     {
         public void PerformStackPushOps(IStackTracker stackTracker, ImmutableArray<Label> parameters)
+            => stackTracker.Push((TypeLabel)parameters[1], (SizeLabel)parameters[2]);
+    }
+
+    public partial record Duplicate : IStackPusher
+    {
+        public void PerformStackPushOps(IStackTracker stackTracker, ImmutableArray<Label> parameters)
+            => stackTracker.Push((StackTypeArrayLabel)parameters[0], (StackSizeArrayLabel)parameters[1]);
+    }
+
+    public partial record PushGlobal : IStackPusher
+    {
+        public void PerformStackPushOps(IStackTracker stackTracker, ImmutableArray<Label> parameters)
+            => stackTracker.Push((TypeLabel)parameters[1], (BaseSizeLabel)parameters[2]);
+    }
+
+    public partial record PushAddressOfGlobal : IStackPusher
+    {
+        public void PerformStackPushOps(IStackTracker stackTracker, ImmutableArray<Label> parameters)
+            => stackTracker.Push((PointerTypeLabel)parameters[1], new PointerSizeLabel(true));
+    }
+
+    public partial record PushAddressOfLocal : IStackPusher
+    {
+        public void PerformStackPushOps(IStackTracker stackTracker, ImmutableArray<Label> parameters)
+            => stackTracker.Push(PointerType, PointerSize);
+    }
+
+    public partial record PushAddressOfField : IStackPusher
+    {
+        public void PerformStackPushOps(IStackTracker stackTracker, ImmutableArray<Label> parameters)
+            => stackTracker.Push(PointerType, PointerStackSize);
+    }
+
+    public partial record PushDereferenceFromStack : IStackPusher
+    {
+        public void PerformStackPushOps(IStackTracker stackTracker, ImmutableArray<Label> parameters)
             => stackTracker.Push(Type, Size);
     }

-    public partial record Duplicate : IStackPusher
-    {
-        public void PerformStackPushOps(IStackTracker stackTracker, ImmutableArray<Label> parameters)
-            => stackTracker.Push(StackType, StackSize);
-    }
-
-    public partial record PushGlobal : IStackPusher
-    {
-        public void PerformStackPushOps(IStackTracker stackTracker, ImmutableArray<Label> parameters)
-            => stackTracker.Push(Type, Size);
-    }
-
-    public partial record PushAddressOfGlobal : IStackPusher
-    {
-        public void PerformStackPushOps(IStackTracker stackTracker, ImmutableArray<Label> parameters)
-            => stackTracker.Push(PointerType, PointerSize);
-    }
-
-    public partial record PushAddressOfLocal : IStackPusher
-    {
-        public void PerformStackPushOps(IStackTracker stackTracker, ImmutableArray<Label> parameters)
-            => stackTracker.Push(PointerType, PointerSize);
-    }
-
-    public partial record PushAddressOfField : IStackPusher
-    {
-        public void PerformStackPushOps(IStackTracker stackTracker, ImmutableArray<Label> parameters)
-            => stackTracker.Push(PointerType, PointerStackSize);
-    }
-
-    public partial record PushDereferenceFromStack : IStackPusher
-    {
-        public void PerformStackPushOps(IStackTracker stackTracker, ImmutableArray<Label> parameters)
-            => stackTracker.Push(Type, Size);
-    }
-
     public partial record PushFieldFromStack : IStackPusher
     {
         public void PerformStackPushOps(IStackTracker stackTracker, ImmutableArray<Label> parameters)
@@ -141,7 +141,7 @@
     {
         public void PerformStackPushOps(IStackTracker stackTracker, ImmutableArray<Label> parameters)
             => stackTracker.Push(
-                new GetAddResultType(GlobalType, ConstantType),
+                new GetAddResultType((TypeLabel)parameters[1], (TypeLabel)parameters[4]),
                 new GetSizeFromBuiltInType(new(0)));
     }

@@ -164,7 +164,7 @@
         public void PerformStackPushOps(IStackTracker stackTracker, ImmutableArray<Label> parameters)
         {
             stackTracker.Push(
-                new GetAddResultType(FirstOperandStackType, SecondOperandStackType),
+                new GetAddResultType((StackTypeArrayLabel)parameters[0], (StackTypeArrayLabel)parameters[2]),
                 new GetSizeFromBuiltInType(new StackTypeArrayLabel(0)));
         }
     }
@@ -172,7 +172,7 @@
     public partial record PushLocal : IStackPusher
     {
         public void PerformStackPushOps(IStackTracker stackTracker, ImmutableArray<Label> parameters)
-            => stackTracker.Push(Type, Size);
+            => stackTracker.Push((TypeLabel)parameters[1], (BaseSizeLabel)parameters[2]);
     }

     public partial record SubFromStack : IStackPusher
@@ -180,7 +180,7 @@
         public void PerformStackPushOps(IStackTracker stackTracker, ImmutableArray<Label> parameters)
         {
             stackTracker.Push(
-                new GetAddResultType(FirstOperandStackType, SecondOperandStackType),
+                new GetAddResultType((StackTypeArrayLabel)parameters[0], (StackTypeArrayLabel)parameters[2]),
                 new GetSizeFromBuiltInType(new StackTypeArrayLabel(0)));
         }
     }
@@ -188,7 +188,7 @@
     public partial record OrFromStack : IStackPusher
     {
         public void PerformStackPushOps(IStackTracker stackTracker, ImmutableArray<Label> parameters)
-            => stackTracker.Push(new GetBitOpResultType(FirstOperandStackType, SecondOperandStackType), new GetSizeFromBuiltInType(new(0)));
+            => stackTracker.Push(new GetBitOpResultType(new StackTypeArrayLabel(0), new StackTypeArrayLabel(1)), new GetSizeFromBuiltInType(new(0)));
     }

     public partial record CompareEqualToFromStack : IStackPusher


fix version

fix version

--- CommonAssemblyInfo.cs
+++ CommonAssemblyInfo.cs
@@ -1,5 +1,5 @@
 using System.Reflection;
 [assembly: AssemblyTitle("Obsolete")]
 [assembly: AssemblyProduct("Obsolete")]
-[assembly: AssemblyVersion("4.3.0")]
-[assembly: AssemblyFileVersion("4.3.0")]+[assembly: AssemblyVersion("4.3.1")]
+[assembly: AssemblyFileVersion("4.3.1")]


Write options for generate command.

Write options for generate command.

--- BehaveN.Tool/GenerateCommand.cs
+++ BehaveN.Tool/GenerateCommand.cs
@@ -9,7 +9,7 @@
     {
         public static void WriteHelp()
         {
-            Console.WriteLine("usage: BehaveN.Tool Generate <filepattern>...");
+            Console.WriteLine("usage: BehaveN.Tool Generate [OPTION]... <filepattern>...");
             Console.WriteLine();
             Console.WriteLine("<filepattern> can be the path to any file. Wildcards don't work yet.");
             Console.WriteLine("All files are considered to be text files containing scenarios. A .g.cs");
@@ -17,20 +17,20 @@
             Console.WriteLine("fixtures.");
             Console.WriteLine();
             Console.WriteLine("NOTE: You need to specify at least one text file!");
+            Console.WriteLine();
+            Console.WriteLine("options:");
+            Console.WriteLine();
+            GetOptions().WriteOptionDescriptions(Console.Out);
         }
+
+        static string ns = "MyNamespace";
+        static string baseClass = null;
+        static bool noSetUp = false;
+        static bool noTearDown = false;

         public int Run(string[] args)
         {
-            string ns = "MyNamespace";
-            string baseClass = null;
-            bool noSetUp = false;
-            bool noTearDown = false;
-
-            var options = new OptionSet();
-            options.Add("namespace=", s => ns = s);
-            options.Add("base-class=", s => baseClass = s);
-            options.Add("no-setup", s => noSetUp = true);
-            options.Add("no-teardown", s => noTearDown = true);
+            OptionSet options = GetOptions();

             var files = options.Parse(args);

@@ -117,5 +117,15 @@

             return 0;
         }
+
+        private static OptionSet GetOptions()
+        {
+            var options = new OptionSet();
+            options.Add("namespace=", "the namespace for the generated classes", s => ns = s);
+            options.Add("base-class=", "the base class for the generated classes", s => baseClass = s);
+            options.Add("no-setup", "do not generate a test fixture set up method", s => noSetUp = true);
+            options.Add("no-teardown", "do not generate a test fixture tear down method", s => noTearDown = true);
+            return options;
+        }
     }
 }


Add PostId response

Add PostId response

Add PostId response

--- VkNet/Model/NewsSearchResult.cs
+++ VkNet/Model/NewsSearchResult.cs
@@ -1,4 +1,4 @@
-using System;
+using System;
 using System.Collections.Generic;
 using Newtonsoft.Json;
 using Newtonsoft.Json.Converters;
@@ -73,7 +73,18 @@
 		/// <summary>
 		/// Тип записи
 		/// </summary>
+		///
+
+
+
+
 		public PostType PostType { get; set; }
+
+		/// <summary>
+		///  Идентификатор записи при PostType == reply
+		/// </summary>
+
+		public int? PostId { get; set; } //Будет иметь значение null, кроме случаев при "post_type": "reply"

 		/// <summary>
 		/// Разобрать из json.
@@ -95,9 +106,10 @@
 					, Geo = response[key: "geo"]
 					, SignerId = response[key: "signer_id"]
 					, PostType = response[key: "post_type"]
+					, PostId = response[key: "post_id"]   //
 			};

 			return newsSearchResult;
 		}
 	}
-}+}


more accurate comment

more accurate comment

--- src/csharp/Grpc.Core.Api/DeserializationContext.cs
+++ src/csharp/Grpc.Core.Api/DeserializationContext.cs
@@ -53,7 +53,7 @@
         /// The ReadOnlySequence is only valid for the duration of the deserializer routine and the caller must not access it after the deserializer returns.
         /// Using the read only sequence is the most efficient way to access the message payload. Where possible it allows directly
         /// accessing the received payload without needing to perform any buffer copying or buffer allocations.
-        /// NOTE: In order to access the payload via this method, your compiler needs to support C# 7.2 (to be able to use the <c>Span</c> type).
+        /// NOTE: When using this method, it is recommended to use C# 7.2 compiler to make it more useful (using Span type directly from your code requires C# 7.2)."
         /// NOTE: Deserializers are expected not to call this method (or other payload accessor methods) more than once per received message
         /// (as there is no practical reason for doing so) and <c>DeserializationContext</c> implementations are free to assume so.
         /// </summary>


Twitch changed the location of Delay in their API for no perceivable reason and with no forewarning -_-

--- Dbot.Utility/Tools.cs
+++ Dbot.Utility/Tools.cs
@@ -154,7 +154,7 @@
       dynamic dyn = JsonConvert.DeserializeObject(answer);
       var streamState = (JObject) dyn.stream;
       if (streamState != null) {
-        var delayJvalue = (JValue) dyn.stream.channel.delay;
+        var delayJvalue = (JValue) dyn.stream.delay;
         var viewersJvalue = (JValue) dyn.stream.viewers;
         int delay;
         int viewers;


oops, forgot to register the new event service

--- Purchasing.Web/ComponentRegistrar.asax.cs
+++ Purchasing.Web/ComponentRegistrar.asax.cs
@@ -17,6 +17,7 @@
             AddGenericRepositoriesTo(container);

             container.Register(Component.For<IRepositoryFactory>().ImplementedBy<RepositoryFactory>().Named("repositoryFactory"));
+            container.Register(Component.For<IEventService>().ImplementedBy<EventService>().Named("eventService"));
             container.Register(Component.For<IOrderService>().ImplementedBy<OrderService>().Named("orderService"));
             container.Register(Component.For<IDirectorySearchService>().ImplementedBy<DirectorySearchService>().Named("directorySearch"));
             container.Register(Component.For<IInterceptor>().ImplementedBy<AuditInterceptor>().Named("audit"));


Fixed an issue when deleting data requested at UTC or Local timezone.

--- QDMSServer/Windows/DataEditWindow.xaml.cs
+++ QDMSServer/Windows/DataEditWindow.xaml.cs
@@ -28,6 +28,8 @@
         public DateTime EndTime { get; set; }

         private BarSize _loadedFrequency;
+        private string _loadedTimeZone;
+        private TimeZoneInfo _tzInfo;

         public DataEditWindow(Instrument instrument)
         {
@@ -43,6 +45,8 @@
                 context.Entry(instrument).Reload();
                 TheInstrument = instrument;
             }
+
+            _tzInfo = TimeZoneInfo.FindSystemTimeZoneById(TheInstrument.Exchange.Timezone);

             StartTime = new DateTime(1950, 1, 1, 0, 0, 0, 0);
             EndTime = new DateTime(DateTime.Now.Year, DateTime.Now.Month, DateTime.Now.Day, 0, 0, 0, 0);
@@ -79,14 +83,14 @@
             //grab the data
             using (var localStorage = new MySQLStorage())
             {
-                var tzInfo = TimeZoneInfo.FindSystemTimeZoneById(TheInstrument.Exchange.Timezone);
+
                 var bars = localStorage.GetData(TheInstrument, StartTime, EndTime, (BarSize)ResolutionComboBox.SelectedItem);
                 foreach (OHLCBar b in bars)
                 {
                     //do any required time zone coversions
                     if (TimezoneComboBox.Text == "UTC")
                     {
-                        b.DT = TimeZoneInfo.ConvertTimeToUtc(b.DT, tzInfo);
+                        b.DT = TimeZoneInfo.ConvertTimeToUtc(b.DT, _tzInfo);
                     }
                     else if (TimezoneComboBox.Text == "Local")
                     {
@@ -95,6 +99,7 @@
                     Data.Add(b);
                 }
                 _loadedFrequency = (BarSize)ResolutionComboBox.SelectedItem;
+                _loadedTimeZone = TimezoneComboBox.Text;
             }

             StatusLabel.Content = string.Format("Loaded {0} Bars", Data.Count);
@@ -110,6 +115,21 @@
             if (result == MessageBoxResult.No) return;

             var toDelete = rows.Cast<OHLCBar>().ToList();
+
+            //data is stored in the db at exchange time. But we may have loaded it at UTC or local.
+            //If so, we must convert it back.
+            foreach (OHLCBar b in toDelete)
+            {
+                if (_loadedTimeZone == "UTC")
+                {
+                    b.DT = TimeZoneInfo.ConvertTimeFromUtc(b.DT, _tzInfo);
+                }
+                else if (_loadedTimeZone == "Local")
+                {
+                    b.DT = TimeZoneInfo.ConvertTime(b.DT, TimeZoneInfo.Local, _tzInfo);
+                }
+            }
+

             using (var localStorage = new MySQLStorage())
             {


do not cancel the build for non-Qt projects

--- Qt4VS2003/Qt4VSAddin/AddInEventHandler.cs
+++ Qt4VS2003/Qt4VSAddin/AddInEventHandler.cs
@@ -502,10 +502,7 @@
                 }
             }
             if (project == null || !HelperFunctions.IsQtProject(project))
-            {
-                dte.ExecuteCommand("Build.Cancel", "");
-                return;
-            }
+                return;

             QtProject qtpro = QtProject.Create(project);
             QtVersionManager versionManager = QtVersionManager.The();


日期变更时更新当前选中日期

日期变更时更新当前选中日期

--- RemodelHelper/ViewModels/ToolViewModel.cs
+++ RemodelHelper/ViewModels/ToolViewModel.cs
@@ -2,6 +2,7 @@
 using System.Collections.Generic;
 using System.Linq;
 using System.Text;
+using System.Threading;
 using System.Threading.Tasks;
 using Livet;
 using Livet.Messaging;
@@ -49,8 +50,9 @@
         public ToolViewModel()
         {
             DaysOfWeek = new[] { "周日", "周一", "周二", "周三", "周四", "周五", "周六" };
-            this.CurrentDay = DateTime.Now.DayOfWeek;
+            this.CurrentDay = GetJstNow().DayOfWeek;
             RemodelData.Current.PropertyChanged += DataUpdated;
+            Task.Run(() => this.UpdateDate());
         }

         private void DataUpdated(object sender, System.ComponentModel.PropertyChangedEventArgs e) => Update();
@@ -59,5 +61,26 @@
         {
             this.Items = await RemodelData.Current.GetRemodelInfo(this.CurrentDay);
         }
+
+        private void UpdateDate()
+        {
+            var day = GetJstNow().DayOfWeek;
+            while (true)
+            {
+                var current = GetJstNow().DayOfWeek;
+                // 日期更新
+                if (day != current)
+                {
+                    if (this.CurrentDay == day)
+                        this.CurrentDay = current;
+
+                    day = current;
+                }
+                // 每分钟检查一次
+                Thread.Sleep(60000);
+            }
+        }
+
+        private static DateTime GetJstNow() => DateTime.UtcNow.AddHours(9);
     }
 }


Catch welcome message failing to send, crashes server

--- RemoteTaskServer/Api/UlteriusApiServer.cs
+++ RemoteTaskServer/Api/UlteriusApiServer.cs
@@ -193,10 +193,18 @@
             });
             if (clientSocket != null)
             {
-                await clientSocket.WriteStringAsync(welcomeMessage, CancellationToken.None);
-                var userCount = AllClients.Count;
-                var extra = userCount > 1 ? "s" : string.Empty;
-                UlteriusTray.ShowMessage($"There are now {userCount} user{extra} connected.", "A new user connected!");
+                try
+                {
+                    await clientSocket.WriteStringAsync(welcomeMessage, CancellationToken.None);
+                    var userCount = AllClients.Count;
+                    var extra = userCount > 1 ? "s" : string.Empty;
+                    UlteriusTray.ShowMessage($"There are now {userCount} user{extra} connected.", "A new user connected!");
+                }
+                catch (Exception ex)
+                {
+
+                    Console.WriteLine("Failed to write welcome message " + ex.Message );
+                }
             }
         }


indexing exception instead of message twice

--- src/log4net.ElasticSearch/ElasticSearchAppender.cs
+++ src/log4net.ElasticSearch/ElasticSearchAppender.cs
@@ -44,7 +44,7 @@
             logEvent.UserName = loggingEvent.UserName;
             logEvent.MessageObject = loggingEvent.MessageObject == null ? "" : loggingEvent.MessageObject.ToString();
             logEvent.TimeStamp = loggingEvent.TimeStamp;
-            logEvent.Exception = loggingEvent.ExceptionObject == null ? "" : loggingEvent.MessageObject.ToString();
+            logEvent.Exception = loggingEvent.ExceptionObject == null ? "" : loggingEvent.ExceptionObject.ToString();
             logEvent.Message = loggingEvent.RenderedMessage;
             logEvent.Fix = loggingEvent.Fix.ToString();
             logEvent.HostName = Environment.MachineName;


Fixed invalid format in String.Format

Fixed invalid format in String.Format

Found by CodeRush for Roslyn Static Code Analysis

--- symbols/mdb/Mono.CompilerServices.SymbolWriter/MonoSymbolTable.cs
+++ symbols/mdb/Mono.CompilerServices.SymbolWriter/MonoSymbolTable.cs
@@ -234,7 +234,7 @@

 		public override string ToString ()
 		{
-			return String.Format ("[Line {0}:{1,2}-{3,4}:{5}]", File, Row, Column, EndRow, EndColumn, Offset);
+			return String.Format ("[Line {0}:{1},{2}-{3},{4}:{5}]", File, Row, Column, EndRow, EndColumn, Offset);
 		}
 	}


Fixing unit test?

Fixing unit test?

--- test/UnitTests/LogJam/Writer/BackgroundMultiLogWriterUnitTests.cs
+++ test/UnitTests/LogJam/Writer/BackgroundMultiLogWriterUnitTests.cs
@@ -282,7 +282,7 @@
 		public void ExceedingQueueSizeBlocksLogging()
 		{
 			// Slow log writer - starting, stopping, disposing, writing an entry, all take at least 10ms each.
-			const int opDelayMs = 20;
+			const int opDelayMs = 30;
 			const int maxQueueLength = 10;
 			const int countBlockingWrites = 4;
 			var slowLogWriter = new SlowTestLogWriter<MessageEntry>(opDelayMs, false);


Save conversion from any number to double

--- WPCharting/Controls/PieChart.cs
+++ WPCharting/Controls/PieChart.cs
@@ -169,13 +169,13 @@
         #endregion

         #region GetValue
-        private static T GetValueHelper<T>(object obj, string member, T defaultValue)
+        private static object GetValueHelper(object obj, string member, object defaultValue)
         {
             PropertyInfo info = obj.GetType().GetProperty(member);

             if (info != null)
             {
-                return (T)info.GetValue(obj, null);
+                return info.GetValue(obj, null);
             }

             return defaultValue;
@@ -190,13 +190,18 @@

             foreach (object item in this.ItemsSource)
             {
-                ChartItem _item = new ChartItem();
-                _item.Caption = PieChart.GetValueHelper<string>(item, this.CaptionMemberPath, "");
-                _item.Value = PieChart.GetValueHelper<double>(item, this.ValueMemberPath, 0);
-
-                sum += _item.Value;
-
-                items.Add(_item);
+                try
+                {
+                    ChartItem _item = new ChartItem();
+                    _item.Caption = PieChart.GetValueHelper(item, this.CaptionMemberPath, "").ToString();
+
+                    var res = PieChart.GetValueHelper(item, this.ValueMemberPath, 0);
+                    _item.Value = Convert.ToDouble(res);
+
+                    sum += _item.Value;
+                    items.Add(_item);
+                }
+                catch { }
             }

             this._items = items;


Change chart fields

Change chart fields

--- CPUMonitor/MainForm.Designer.cs
+++ CPUMonitor/MainForm.Designer.cs
@@ -14,7 +14,7 @@
 		/// Designer variable used to keep track of non-visual components.
 		/// </summary>
 		private System.ComponentModel.IContainer components = null;
-		private System.Windows.Forms.DataVisualization.Charting.Chart chart1;
+		private System.Windows.Forms.DataVisualization.Charting.Chart chartCPU;

 		/// <summary>
 		/// Disposes resources used by the form.
@@ -40,35 +40,35 @@
 			System.Windows.Forms.DataVisualization.Charting.ChartArea chartArea1 = new System.Windows.Forms.DataVisualization.Charting.ChartArea();
 			System.Windows.Forms.DataVisualization.Charting.Legend legend1 = new System.Windows.Forms.DataVisualization.Charting.Legend();
 			System.Windows.Forms.DataVisualization.Charting.Series series1 = new System.Windows.Forms.DataVisualization.Charting.Series();
-			this.chart1 = new System.Windows.Forms.DataVisualization.Charting.Chart();
-			((System.ComponentModel.ISupportInitialize)(this.chart1)).BeginInit();
+			this.chartCPU = new System.Windows.Forms.DataVisualization.Charting.Chart();
+			((System.ComponentModel.ISupportInitialize)(this.chartCPU)).BeginInit();
 			this.SuspendLayout();
 			//
-			// chart1
+			// chartCPU
 			//
 			chartArea1.Name = "ChartArea1";
-			this.chart1.ChartAreas.Add(chartArea1);
+			this.chartCPU.ChartAreas.Add(chartArea1);
 			legend1.Name = "Legend1";
-			this.chart1.Legends.Add(legend1);
-			this.chart1.Location = new System.Drawing.Point(12, 12);
-			this.chart1.Name = "chart1";
+			this.chartCPU.Legends.Add(legend1);
+			this.chartCPU.Location = new System.Drawing.Point(12, 12);
+			this.chartCPU.Name = "chartCPU";
 			series1.ChartArea = "ChartArea1";
 			series1.Legend = "Legend1";
-			series1.Name = "Series1";
-			this.chart1.Series.Add(series1);
-			this.chart1.Size = new System.Drawing.Size(534, 308);
-			this.chart1.TabIndex = 0;
-			this.chart1.Text = "chart1";
+			series1.Name = "CPU";
+			this.chartCPU.Series.Add(series1);
+			this.chartCPU.Size = new System.Drawing.Size(534, 308);
+			this.chartCPU.TabIndex = 0;
+			this.chartCPU.Text = "chart1";
 			//
 			// MainForm
 			//
 			this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F);
 			this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
 			this.ClientSize = new System.Drawing.Size(558, 383);
-			this.Controls.Add(this.chart1);
+			this.Controls.Add(this.chartCPU);
 			this.Name = "MainForm";
 			this.Text = "CPUMonitor";
-			((System.ComponentModel.ISupportInitialize)(this.chart1)).EndInit();
+			((System.ComponentModel.ISupportInitialize)(this.chartCPU)).EndInit();
 			this.ResumeLayout(false);

 		}


minor

minor

--- CQRSPipeline.DemoApp/Program.cs
+++ CQRSPipeline.DemoApp/Program.cs
@@ -51,6 +51,7 @@
             {
                 // queries in the same scope (i.e. database transaction)
                 // transaction is kept open until disposed so don't do much work!
+                // make sure you dispose otherwise the transaction might get stuck!

                 productModels = client.Query(new ListProductModels());


Added additional info to error log when a binary is not found in the broker (which binary was requested)

--- Sdl.Web.DD4T/Statics/BinaryFileManager.cs
+++ Sdl.Web.DD4T/Statics/BinaryFileManager.cs
@@ -285,7 +285,7 @@
             }
             catch (Exception ex)
             {
-                Log.Error(ex);
+                Log.Error(ex, "Unable to get {0} from Broker", urlPath);
             }
             //For some reason DD4T returns a non-null binary with null binary data if it doesnt exist
             return binary.BinaryData==null ? null : binary;


Use VkPhysicalDeviceFeatures class

Use VkPhysicalDeviceFeatures class

--- CSGL.Vulkan/VkPhysicalDevice.cs
+++ CSGL.Vulkan/VkPhysicalDevice.cs
@@ -16,13 +16,8 @@
                 return physicalDevice;
             }
         }
-
-        Unmanaged.VkPhysicalDeviceFeatures features;
-        public Unmanaged.VkPhysicalDeviceFeatures Features {
-            get {
-                return features;
-            }
-        }
+
+        public VkPhysicalDeviceFeatures Features { get; private set; }

         Unmanaged.VkPhysicalDeviceMemoryProperties memoryProperties;
         public Unmanaged.VkPhysicalDeviceMemoryProperties MemoryProperties {
@@ -72,7 +67,7 @@
         void GetDeviceFeatures() {
             using (var feat = new Native<Unmanaged.VkPhysicalDeviceFeatures>()) {
                 Instance.Commands.getFeatures(physicalDevice, feat.Address);
-                features = feat.Value;
+                Features = new VkPhysicalDeviceFeatures(feat.Value);
             }
         }


Cleans up some test code.

Cleans up some test code.

--- SequencerAiiiight.Tests/SequencerTests.cs
+++ SequencerAiiiight.Tests/SequencerTests.cs
@@ -4,29 +4,20 @@
     using System.Threading;

     using NFluent;
-
     using NUnit.Framework;

     [TestFixture]
     public class SequencerTests
     {
-        #region Constants
+        #region Gin and Juice (fields)

         private const int SecondInMsec = 1000;
-
-        #endregion
-
-        #region Fields
-
-        private readonly object syncRoot = new object();
-
         private List<int> result;
-
         private AutoResetEvent sequenceFinished;

         #endregion

-        #region SetUp/TearDown
+        #region Bang bang (SetUp/TearDown)

         [TestFixtureSetUp]
         public void TestFixtureSetUp()
@@ -46,7 +37,7 @@

         #endregion

-        #region Tests
+        #region Mos Def (Tests)

         [Test]
         public void SequencerExecutesTasksInTheOrderOfTheirDispatch()
@@ -56,17 +47,17 @@

             this.result = new List<int>(TasksNumber);

-            // loads the sequencer
+            // Dispatches tasks to the sequencer
             for (var i = 0; i < TasksNumber; i++)
             {
                 var antiClosureSideEffectNumber = i;
                 sequencer.Dispatch(() => this.result.Add(antiClosureSideEffectNumber));
             }

-            // Indicates the end of the sequence
+            // Indicates the end of the sequence with a final task
             sequencer.Dispatch(() => this.sequenceFinished.Set()) ;

-            // use an autoreset event here instead
+            // Waits for sequence completion
             Check.That(this.sequenceFinished.WaitOne(5 * SecondInMsec)).IsTrue();

             // Checks that everything was properly processed in sequence


Start of buy settlement AI

Start of buy settlement AI

--- SettlersOfCatanAnalysis/Objects/Player.cs
+++ SettlersOfCatanAnalysis/Objects/Player.cs
@@ -1,4 +1,5 @@
 using System;
+using System.Collections.Generic;

 namespace SettlersOfCatanAnalysis.Objects
 {
@@ -110,7 +111,20 @@
                 // Random Choice
                 // Weighted for numbers that have a higher chance of being rolled
                 // Weighted for specific resources
-                //
+                var availableVertices = board.GetAvailableVertices(false);
+                var sumVertexPoints = new List<double>();
+                var sumHexPoints = new List<double>();
+                var sumPointsPoints = new List<double>();
+
+                foreach (var vertex in availableVertices)
+                {
+                    for (int i = 0; i < board.IslandVertices[vertex].LocalHexes.Count; i++)
+                    {
+                        if (board.IslandVertices[vertex].LocalHexes[i] == -1)
+                            continue;
+                        //sumHexPoints[vertex]
+                    }
+                }
             }
             else
             {


Increased the internal refresh timer to 1 minute.

--- Code/ViewModels/WeatherModel.cs
+++ Code/ViewModels/WeatherModel.cs
@@ -160,7 +160,7 @@
             if (_weatherRefreshTimer == null)
             {
                 _weatherRefreshTimer = new Timer(this);
-                _weatherRefreshTimer.Interval = 7000; // 7 seconds interval
+                _weatherRefreshTimer.Interval = 60000; // 1 minute interval
                 _weatherRefreshTimer.Tick += delegate { LoadWeatherData(); };
             }
         }


polished Do

polished Do

--- Dragon/Source/Stmt.cs
+++ Dragon/Source/Stmt.cs
@@ -144,10 +144,13 @@
     }

+    /// <summary>
+    /// do stmt while (bool)
+    /// </summary>
     public class Do : Stmt
     {
-        public Expr Expr;
-        public Stmt Stmt;
+        public Expr Expr { get; private set; }
+        public Stmt Stmt { get; private set; }

         public Do()
         {
@@ -166,7 +169,7 @@
         public override void Gen(int beginning, int after)
         {
             this.After = after;
-            int label = this.NewLable();
+            var label = this.NewLable();
             this.Stmt.Gen(beginning, label);
             this.EmitLabel(label);
             this.Expr.Jumping(beginning, 0);


Comment out redis queue tests for now.

Comment out redis queue tests for now.

--- Source/Api.Tests/Queue/RedisQueueTests.cs
+++ Source/Api.Tests/Queue/RedisQueueTests.cs
@@ -1,20 +1,20 @@
-using System;
-using Exceptionless.Core;
-using Exceptionless.Core.Queues;
-using StackExchange.Redis;
+//using System;
+//using Exceptionless.Core;
+//using Exceptionless.Core.Queues;
+//using StackExchange.Redis;

-namespace Exceptionless.Api.Tests.Queue {
-    public class RedisQueueTests : InMemoryQueueTests {
-        private ConnectionMultiplexer _muxer;
+//namespace Exceptionless.Api.Tests.Queue {
+//    public class RedisQueueTests : InMemoryQueueTests {
+//        private ConnectionMultiplexer _muxer;

-        protected override IQueue<SimpleWorkItem> GetQueue(int retries, TimeSpan? workItemTimeout, TimeSpan? retryDelay) {
-            //if (!Settings.Current.UseAzureServiceBus)
-            //      return;
+//        protected override IQueue<SimpleWorkItem> GetQueue(int retries, TimeSpan? workItemTimeout, TimeSpan? retryDelay) {
+//            //if (!Settings.Current.UseAzureServiceBus)
+//            //      return;

-            if (_muxer == null)
-                _muxer = ConnectionMultiplexer.Connect(Settings.Current.RedisConnectionInfo.ToString());
+//            if (_muxer == null)
+//                _muxer = ConnectionMultiplexer.Connect(Settings.Current.RedisConnectionInfo.ToString());

-            return new RedisQueue<SimpleWorkItem>(_muxer, workItemTimeout: workItemTimeout, retries: 1);
-        }
-    }
-}+//            return new RedisQueue<SimpleWorkItem>(_muxer, workItemTimeout: workItemTimeout, retries: 1);
+//        }
+//    }
+//}


Some old time formatter updates

Some old time formatter updates

--- Source/ContractsWindow/contractsWindow.cs
+++ Source/ContractsWindow/contractsWindow.cs
@@ -37,6 +37,7 @@
 using Contracts.Parameters;
 using Contracts.Agents;
 using ContractsWindow.Toolbar;
+using ContractsWindow.PanelInterfaces;
 using UnityEngine;

 namespace ContractsWindow
@@ -1974,7 +1975,7 @@
 					{
 						cC.Duration = cC.Root.DateDeadline - Planetarium.GetUniversalTime();
 						//Calculate time in day values using Kerbin or Earth days
-						cC.DaysToExpire = contractScenario.timeInDays(cC.Duration);
+						cC.DaysToExpire = cC.timeInDays(cC.Duration);
 					}

 					cC.Title = cC.Root.Title;


Minor changes.

Minor changes.

--- Source/Main/NProxy.Core/ProxyGenerator.cs
+++ Source/Main/NProxy.Core/ProxyGenerator.cs
@@ -77,7 +77,7 @@
         }

         /// <summary>
-        /// Generates a proxy template.
+        /// Generates a proxy template based on the specified proxy definition.
         /// </summary>
         /// <param name="proxyDefinition">The proxy definition.</param>
         /// <returns>The proxy template.</returns>


added Should_Retrieve_User_By_UserName test

--- tests/AspNet.Identity.RavenDB.Tests/Stores/RavenUserStoreFacts.cs
+++ tests/AspNet.Identity.RavenDB.Tests/Stores/RavenUserStoreFacts.cs
@@ -36,6 +36,25 @@
             }
         }

+        [Fact]
+        public async Task Should_Retrieve_User_By_UserName()
+        {
+            string userName = "Tugberk";
+
+            using (IDocumentStore store = CreateEmbeddableStore())
+            using (IAsyncDocumentSession ses = store.OpenAsyncSession())
+            {
+                IUserStore userStore = new RavenUserStore<RavenUser>(ses);
+                await ses.StoreAsync(new RavenUser { UserName = userName });
+                await ses.SaveChangesAsync();
+
+                IUser user = await userStore.FindByUserName(userName);
+
+                Assert.NotNull(user);
+                Assert.Equal(userName, user.UserName, StringComparer.InvariantCultureIgnoreCase);
+            }
+        }
+
         // privates
         private IDocumentStore CreateEmbeddableStore()
         {


Added another test condition.

Added another test condition.

--- tests/Mono.Upnp.Dcp.MediaServer1.Tests/ObjectQueryContextTests.cs
+++ tests/Mono.Upnp.Dcp.MediaServer1.Tests/ObjectQueryContextTests.cs
@@ -281,6 +281,7 @@
             Assert.IsFalse (superclass_context.PropertyExists ("Bar", test));
             Assert.IsTrue (subclass_context.PropertyExists ("Foo", test));
             Assert.IsTrue (subclass_context.PropertyExists ("Bar", test));
+            Assert.IsFalse (new ObjectQueryContext (typeof (ElementTestSubclass)).PropertyExists ("Foo", test));
         }
     }
 }


Disabled Firefox for Release builds

Disabled Firefox for Release builds

Release is used by our CI rig (to temp hide Firefox issues with 2.25 on
Windows Server 2008 R2)

--- Sp.Test.Html/BrowserDriverDataProvider.cs
+++ Sp.Test.Html/BrowserDriverDataProvider.cs
@@ -20,7 +20,10 @@
 			return new RemoteWebDriver[]
 			{
 				new ChromeDriver(),
+				#if DEBUG
+				// TODO Temporarily inhibit on our Windows Server 2008 R2 test rig - TODO: reinstate
 				new FirefoxDriver( GetSeleniumFirefoxProfile() )
+				#endif
 			};
 		}


Fix broken encoding in GlobalSuppressions file

--- Src/AutoNSubstitute/GlobalSuppressions.cs
+++ Src/AutoNSubstitute/GlobalSuppressions.cs
@@ -1,37 +1,19 @@
-// This file is used by Code Analysis to maintain SuppressMessage
-
-// attributes that are applied to this project.
-
-// Project-level suppressions either have no target or are given
-
-// a specific target and scoped to a namespace, type, member, etc.
-
-//
-
-// To add a suppression to this file, right-click the message in the
-
-// Code Analysis results, point to "Suppress Message", and click
-
-// "In Suppression File".
-
-// You do not need to add suppressions to this file manually.
-
-
-
-using System.Diagnostics.CodeAnalysis;
-
-
-
-[assembly:
-
-    SuppressMessage("Microsoft.Design", "CA1020:AvoidNamespacesWithFewTypes", Scope = "namespace", Target = "Ploeh.AutoFixture.AutoNSubstitute",
-
-        Justification = "This is the root namespace of the project. There is no other namespace those types could be merged with.")]
-
-[assembly:
-
-    SuppressMessage("Microsoft.Design", "CA2210:AssembliesShouldHaveValidStrongNames",
-
-        Justification = "AutoFixture itself currently doesn't have a strong name.")]
-
-+// This file is used by Code Analysis to maintain SuppressMessage
+// attributes that are applied to this project.
+// Project-level suppressions either have no target or are given
+// a specific target and scoped to a namespace, type, member, etc.
+//
+// To add a suppression to this file, right-click the message in the
+// Code Analysis results, point to "Suppress Message", and click
+// "In Suppression File".
+// You do not need to add suppressions to this file manually.
+
+using System.Diagnostics.CodeAnalysis;
+
+[assembly:
+    SuppressMessage("Microsoft.Design", "CA1020:AvoidNamespacesWithFewTypes", Scope = "namespace", Target = "Ploeh.AutoFixture.AutoNSubstitute",
+        Justification = "This is the root namespace of the project. There is no other namespace those types could be merged with.")]
+[assembly:
+    SuppressMessage("Microsoft.Design", "CA2210:AssembliesShouldHaveValidStrongNames",
+        Justification = "AutoFixture itself currently doesn't have a strong name.")]
+


Renaming constant member

Renaming constant member

--- SteamShutdown/CustomApplicationContext.cs
+++ SteamShutdown/CustomApplicationContext.cs
@@ -14,7 +14,7 @@
     /// </remarks>
     public class CustomApplicationContext : ApplicationContext
     {
-        const string DefaultTooltip = "Execute action after chosen game downloads finished.";
+        const string TOOL_TIP = "Execute action after chosen game downloads finished.";

         /// <summary>
 		/// This class should be created and passed into Application.Run( ... )
@@ -152,7 +152,7 @@
             {
                 ContextMenuStrip = new ContextMenuStrip(),
                 Icon = Properties.Resources.icon,
-                Text = DefaultTooltip,
+                Text = TOOL_TIP,
                 Visible = true
             };
             notifyIcon.ContextMenuStrip.Opening += ContextMenuStrip_Opening;


Missed in last commit

Missed in last commit

--- SurveyMonkey/SurveyMonkeyApi.Endpoints.cs
+++ SurveyMonkey/SurveyMonkeyApi.Endpoints.cs
@@ -393,7 +393,7 @@

         #region CreateRecipients endpoint

-        public RecipientCreationResponse CreateRecipients(long collectorId, long emailMessageId, List<Recipient> recipients)
+        public CreateRecipientsResponse CreateRecipients(long collectorId, long emailMessageId, List<Recipient> recipients)
         {
             var parameters = new RequestSettings();
             parameters.Add("collector_id", collectorId.ToString());
@@ -405,7 +405,7 @@
                 const string endPoint = "/collectors/create_recipients";
                 var o = MakeApiRequest(endPoint, parameters);

-                var response = new RecipientCreationResponse();
+                var response = new CreateRecipientsResponse();
                 response.Collector = o["collector"].ToObject<Collector>();
                 response.RecipientsReport = o["recipients_report"].ToObject<RecipientsReport>();
                 return response;


Remove TvSeasonEpisode ShowId

Remove TvSeasonEpisode ShowId

--- TMDbLib/Objects/Search/TvSeasonEpisode.cs
+++ TMDbLib/Objects/Search/TvSeasonEpisode.cs
@@ -34,10 +34,7 @@

         [JsonProperty("season_number")]
         public int SeasonNumber { get; set; }
-
-        [JsonProperty("show_id")]
-        public int ShowId { get; set; }
-
+
         [JsonProperty("still_path")]
         public string StillPath { get; set; }


fixed typo

fixed typo

--- Tools/SLiNgshoT/SLiNgshoT/AssemblyInfo.cs
+++ Tools/SLiNgshoT/SLiNgshoT/AssemblyInfo.cs
@@ -6,8 +6,8 @@
 // set of attributes. Change these attribute values to modify the information
 // associated with an assembly.
 //
-[assembly: AssemblyTitle("SLiNshoT")]
-[assembly: AssemblyDescription("SLiNshoT")]
+[assembly: AssemblyTitle("SLiNgshoT")]
+[assembly: AssemblyDescription("SLiNgshoT")]

 [assembly: AssemblyDelaySign(false)]
 [assembly: AssemblyKeyFile("")]


BitmapControllerTest#ConstructorTestメソッドを追加

--- UnitTest/Graphics/BitmapControllerTest.cs
+++ UnitTest/Graphics/BitmapControllerTest.cs
@@ -121,5 +121,14 @@
             }
         }
         #endregion
+
+        #region -- Constructor --
+        [TestMethod]
+        [ExpectedException(typeof(ArgumentNullException))]
+        public void ConstructorTest()
+        {
+            using (var controller = new BitmapController(null, ImageLockMode.ReadOnly)) { }
+        }
+        #endregion
     }
 }


Made Backstab use NetScript.Find for Rpcs.

--- Framework/Backstab.cs
+++ Framework/Backstab.cs
@@ -261,7 +261,7 @@
 	//Recieving

 	static void GetRpc (RpcData rpc) {
-		NetScript inst = NetScript.Instances[rpc.sceneId];
+		NetScript inst = NetScript.Find(rpc.sceneId);
 		inst.RecieveRpc(rpc);
 	}


Catch build file errors in release builds and propagate them like parser errors.

This was regressed during some refactoring.

--- Compiler/Crayon/MainPipeline.cs
+++ Compiler/Crayon/MainPipeline.cs
@@ -67,8 +67,28 @@
                     return new Result();

                 case ExecutionType.EXPORT_VM_BUNDLE:
-                    buildContext = new GetBuildContextWorker().DoWorkImpl(command);
-                    Parser.CompilationBundle compilation = Parser.Compiler.Compile(CreateCompileRequest(buildContext), isRelease);
+                    Parser.CompilationBundle compilation;
+
+                    if (isRelease)
+                    {
+                        try
+                        {
+                            buildContext = new GetBuildContextWorker().DoWorkImpl(command);
+                            compilation = Parser.Compiler.Compile(CreateCompileRequest(buildContext), isRelease);
+                        }
+                        catch (InvalidOperationException ioe)
+                        {
+                            return new Result()
+                            {
+                                Errors = new Error[] { new Error() { Message = ioe.Message } },
+                            };
+                        }
+                    }
+                    else
+                    {
+                        buildContext = new GetBuildContextWorker().DoWorkImpl(command);
+                        compilation = Parser.Compiler.Compile(CreateCompileRequest(buildContext), isRelease);
+                    }

                     if (compilation.HasErrors)
                     {
@@ -83,6 +103,7 @@
                         string depTree = AssemblyResolver.AssemblyDependencyResolver.GetDependencyTreeJson(compilation.RootScopeDependencyMetadata).Trim();
                         ConsoleWriter.Print(ConsoleMessageType.LIBRARY_TREE, depTree);
                     }
+
                     string outputDirectory = command.HasOutputDirectoryOverride
                         ? command.OutputDirectoryOverride
                         : buildContext.OutputFolder;
@@ -187,7 +208,22 @@
             bool isDryRunErrorCheck,
             bool isRelease)
         {
-            BuildContext buildContext = new GetBuildContextCbxWorker().DoWorkImpl(command);
+            BuildContext buildContext;
+            if (isRelease)
+            {
+                try
+                {
+                    buildContext = new GetBuildContextCbxWorker().DoWorkImpl(command);
+                }
+                catch (InvalidOperationException ioe)
+                {
+                    return new ExportResponse() { Errors = new Error[] { new Error() { Message = ioe.Message } } };
+                }
+            }
+            else
+            {
+                buildContext = new GetBuildContextCbxWorker().DoWorkImpl(command);
+            }

             Parser.CompilationBundle compilation = Parser.Compiler.Compile(CreateCompileRequest(buildContext), isRelease);
             if (isDryRunErrorCheck)


Introduce EiB to FileSize

Introduce EiB to FileSize

--- GUtils.IO/FileSize.cs
+++ GUtils.IO/FileSize.cs
@@ -4,13 +4,14 @@
 {
     public static class FileSize
     {
-        public const Int64 KiB = 1024;
-        public const Int64 MiB = 1024 * KiB;
-        public const Int64 GiB = 1024 * MiB;
-        public const Int64 TiB = 1024 * GiB;
-        public const Int64 PiB = 1024 * TiB;
+        public const Int64 KiB = 1 << 10;
+        public const Int64 MiB = 1 << 20;
+        public const Int64 GiB = 1 << 30;
+        public const Int64 TiB = 1 << 40;
+        public const Int64 PiB = 1 << 50;
+        public const Int64 EiB = 1 << 60;

-        private static readonly String[] _suffixes = new[] { "B", "KiB", "MiB", "GiB", "TiB", "PiB" };
+        private static readonly String[] _suffixes = new[] { "B", "KiB", "MiB", "GiB", "TiB", "PiB", "EiB" };

         public static String Format ( Int64 Size )
         {


Added Hit() and SetPartner(Block) to Block

--- GameElements/Block.cs
+++ GameElements/Block.cs
@@ -8,12 +8,14 @@
 	public class Block : JumpSprite
 	{
 		private Color color;
+		private Block partner = null;

 		//Speed is pixels per second.
 		private int xSpeed = 0;
 	    private int ySpeed = 0;
 		private int leftOverTimeX = 0;
 		private int leftOverTimeY = 0;
+		private bool hit = false;

 		public Block(Jump game, ILevel level, Rectangle blockRect, Color color, int ySpeed) : base(game)
 		{
@@ -34,15 +36,36 @@
             this.level = level;
 		}

-		public bool Hit
-		{
-			get;
-			set;
-		}
-
 		protected override void LoadContent()
 		{
 			CreateTexture(rect.Width, rect.Height, game.graphics);
+		}
+
+		public void Hit()
+		{
+			if (partner != null)
+			{
+				if (partner.hit || hit)
+				{
+
+				}
+				else
+				{
+					//Handle new hit
+				}
+			}
+			else if (!hit)
+			{
+				//handle new hit
+			}
+
+			hit = true;
+		}
+
+		public void SetPartner(Block partnerBlock)
+		{
+			partner = partnerBlock;
+			partnerBlock.partner = this;
 		}

 		public override void Update(GameTime gt)


add soft reset to amend checkbox - not sure - verify later

--- GitUI/GitViewModel.cs
+++ GitUI/GitViewModel.cs
@@ -300,5 +300,6 @@
             GitRun("merge " + branchName);
         }
         #endregion
+
     }
 }


allowed deserializing empty list

allowed deserializing empty list

--- x2/Deserializer.cs
+++ x2/Deserializer.cs
@@ -214,7 +214,7 @@
         {
             int count;
             ReadVariableNonnegative(out count);
-            value = (count != 0 ? new List<int>() : null);
+            value = new List<int>();
             for (int i = 0; i < count; ++i)
             {
                 int element;
@@ -231,7 +231,7 @@
         {
             int count;
             ReadVariableNonnegative(out count);
-            value = (count != 0 ? new List<T>() : null);
+            value = new List<T>();
             for (int i = 0; i < count; ++i)
             {
                 T element;


Add DarkGray code

Add DarkGray code

--- ConsoleApplication61/Program.cs
+++ ConsoleApplication61/Program.cs
@@ -11,5 +11,24 @@
         static void Main(string[] args)
         {
         }
+
+        void M1()
+        {
+            var currentGroupId = GetGroup("A");
+            F1(currentGroupId);
+            F2(currentGroupId);
+
+            var groupB = GetGroup("B");
+            F3(groupB);
+        }
+
+        private int GetGroup(string p0)
+        {
+            throw new NotImplementedException();
+        }
+
+        void F1(int groupId){}
+        void F2(int groupId){}
+        void F3(int groupId){}
     }
 }


Removed remove send javascript

Removed remove send javascript

Since it’s not used in any projects, and was anyways just a temporary
hack

--- plugins/p5.web/PageManager.cs
+++ plugins/p5.web/PageManager.cs
@@ -107,22 +107,6 @@
         }

         /// <summary>
-        ///     Removes the previously sent JavaScript.
-        /// </summary>
-        /// <param name="context">Application Context</param>
-        /// <param name="e">Parameters passed into Active Event</param>
-        [ActiveEvent (Name = "p5.web.remove-send-javascript")]
-        public void p5_web_remove_send_javascript (ApplicationContext context, ActiveEventArgs e)
-        {
-            // Looping through each JavaScript snippet supplied
-            foreach (var idxSnippet in XUtil.Iterate<string> (context, e.Args)) {
-
-                // Passing JavaScript to client
-                AjaxPage.RemoveSendJavaScript (idxSnippet);
-            }
-        }
-
-        /// <summary>
         ///     Includes the given JavaScript on page persistently
         /// </summary>
         /// <param name="context">Application Context</param>
@@ -213,7 +197,7 @@
             using (new ArgsRemover (e.Args)) {

                 // Returning current URL
-                e.Args.Value = AjaxPage.Request.Url.ToString ();
+                e.Args.Value = HttpContext.Current.Request.Url.GetLeftPart (UriPartial.Authority) + AjaxPage.Request.RawUrl;
             }
         }

@@ -229,7 +213,7 @@
             using (new ArgsRemover (e.Args)) {

                 // Returning current URL
-                e.Args.Value = AjaxPage.Request.Url.GetLeftPart (UriPartial.Path);
+                e.Args.Value = HttpContext.Current.Request.Url.GetLeftPart (UriPartial.Authority) + AjaxPage.Request.RawUrl.Split ('?') [0];
             }
         }


project verion update

project verion update

--- Core/Properties/AssemblyInfo.cs
+++ Core/Properties/AssemblyInfo.cs
@@ -26,5 +26,5 @@
 // You can specify all the values or you can default the Build and Revision Numbers
 // by using the '*' as shown below:
 // [assembly: AssemblyVersion("1.0.*")]
-[assembly: AssemblyVersion("0.0.1.0")]
-[assembly: AssemblyFileVersion("0.0.1.0")]
+[assembly: AssemblyVersion("0.7.0.0")]
+[assembly: AssemblyFileVersion("0.7.0.0")]


Allow for setting the group value

Allow for setting the group value

--- CouchTrafficClient/QueryBase.cs
+++ CouchTrafficClient/QueryBase.cs
@@ -61,8 +61,8 @@
             t.Start();
         }
         public abstract string Run();
-    private string OldServer { get { return "http://52.10.252.48:5984/"; } }
-    private string Server { get { return "http://50.112.172.199:5984/";  } }
+    private string Server { get { return "http://52.10.252.48:5984/"; } }
+    private string NewServer { get { return "http://50.112.172.199:5984/";  } }

     /// <summary>
     /// Query a view from our CouchDB Server, returning a Dictionary of keys to values!
@@ -72,9 +72,9 @@
     /// <param name="keys">Optional list of keys to query the view for.</param>

     /// <returns></returns>
-    public MultiValueDictionary Query(string designDocumentName, string viewName, IList<object> keys = null, string db = "traffic")
+    public MultiValueDictionary Query(string designDocumentName, string viewName, IList<object> keys = null, string db = "traffic", bool group = true)
     {
-        return InternalQuery(designDocumentName, viewName, null, null, keys, db);
+        return InternalQuery(designDocumentName, viewName, null, null, keys, db, group);
     }
     /// <summary>
     /// Query a view from our CouchDB Server, returning a Dictionary of keys to values!
@@ -84,30 +84,30 @@
     /// <param name="startKey">Optional list of startkeys to query the view for.</param>
     /// <param name="endKey">Optional list of endkeys to query the view for.</param>
     /// <returns></returns>
-    public MultiValueDictionary QueryWithStartAndEnd(string designDocumentName, string viewName, object startKey, object endKey, string db = "traffic")
+    public MultiValueDictionary QueryWithStartAndEnd(string designDocumentName, string viewName, object startKey, object endKey, string db = "traffic", bool group = true)
     {
-        return InternalQuery(designDocumentName, viewName, startKey, endKey, null, db);
+        return InternalQuery(designDocumentName, viewName, startKey, endKey, null, db, group);
     }
-    private MultiValueDictionary InternalQuery(string designDocumentName, string viewName, object startKey = null, object endKey = null, IList<object> keys = null, string db = "traffic")
+    private MultiValueDictionary InternalQuery(string designDocumentName, string viewName, object startKey = null, object endKey = null, IList<object> keys = null, string db = "traffic", bool group = true)
     {
         try
         {
             var keyString = "";
             if (keys != null)
             {
-                keyString = string.Format("?keys={0}{1}", Uri.EscapeDataString(JsonConvert.SerializeObject(keys)), keys.Count > 1 ? "&group=true" : "");
+                keyString += string.Format("?group={0}&keys={1}", group.ToString(), Uri.EscapeDataString(JsonConvert.SerializeObject(keys)), keys.Count > 1 ? "&group=true" : "");
             }
             else if (startKey != null && endKey != null)
             {
-                keyString = string.Format("?startkey={0}&endkey={1}&group=true", Uri.EscapeDataString(JsonConvert.SerializeObject(startKey)), Uri.EscapeDataString(JsonConvert.SerializeObject(endKey)));
+                keyString += string.Format("?group={0}&startkey={1}&endkey={2}", group.ToString(), Uri.EscapeDataString(JsonConvert.SerializeObject(startKey)), Uri.EscapeDataString(JsonConvert.SerializeObject(endKey)));
             }
             else if (startKey != null)
             {
-                keyString = string.Format("?startkey={0}&group=true", Uri.EscapeDataString(JsonConvert.SerializeObject(startKey)));
+                keyString += string.Format("?group={0}&startkey={1}", group.ToString(), Uri.EscapeDataString(JsonConvert.SerializeObject(startKey)));
             }
             else if (endKey != null)
             {
-                keyString = string.Format("?endkey={0}&group=true", Uri.EscapeDataString(JsonConvert.SerializeObject(endKey)));
+                keyString += string.Format("?group={0}&endkey={1}", group.ToString(), Uri.EscapeDataString(JsonConvert.SerializeObject(endKey)));
             }
             var url = Server + db + "/_design/" + designDocumentName + "/_view/" + viewName + keyString;
             dynamic queryResult;


riesumate notifiche

riesumate notifiche

--- App/MicrosoftHouse/MicrosoftHouse/ViewModels/EntryPageViewModel.cs
+++ App/MicrosoftHouse/MicrosoftHouse/ViewModels/EntryPageViewModel.cs
@@ -28,9 +28,9 @@
 			{
                 var cloudService = ServiceLocator.Instance.Resolve<ICloudService>();
                 await cloudService.LoginAsync();
-                // Creando una nuova navigation page, non cè più la possibilità di tornare indietro.
+                // Creando una nuova navigation page, non c'è più la possibilità di tornare indietro.

-                //await cloudService.RegisterForPushNotifications();
+                await cloudService.RegisterForPushNotifications();

                 Application.Current.MainPage = new MasterPage();


Simplified tests for payload limiting.

Simplified tests for payload limiting.

--- test/Serilog.Tests/LoggerConfigurationTests.cs
+++ test/Serilog.Tests/LoggerConfigurationTests.cs
@@ -5,6 +5,7 @@
 using System.Reflection;
 using System.Runtime.InteropServices.ComTypes;
 using Xunit;
+using Serilog.Configuration;
 using Serilog.Core;
 using Serilog.Core.Filters;
 using Serilog.Events;
@@ -265,14 +266,7 @@
                 }
             };

-            LogEvent evt = null;
-            var log = new LoggerConfiguration()
-                .WriteTo.Sink(new DelegatingSink(e => evt = e))
-                .Destructure.ToMaximumDepth(3)
-                .CreateLogger();
-
-            log.Information("{@X}", x);
-            var xs = evt.Properties["X"].ToString();
+            var xs = LogAndGetAsString(x, conf => conf.Destructure.ToMaximumStringLength(3), "@");

             Assert.Contains("C", xs);
             Assert.DoesNotContain(xs, "D");
@@ -290,15 +284,7 @@
         public void MaximumStringLengthNOTEffectiveForString()
         {
             var x = "ABCD";
-
-            LogEvent evt = null;
-            var log = new LoggerConfiguration()
-                .WriteTo.Sink(new DelegatingSink(e => evt = e))
-                .Destructure.ToMaximumStringLength(3)
-                .CreateLogger();
-
-            log.Information("{X}", x);
-            var limitedText = evt.Properties["X"].ToString();
+            var limitedText = LogAndGetAsString(x, conf => conf.Destructure.ToMaximumStringLength(3));

             Assert.Equal("\"ABCD\"", limitedText);
         }
@@ -308,14 +294,7 @@
         {
             var x = "ABCD";

-            LogEvent evt = null;
-            var log = new LoggerConfiguration()
-                .WriteTo.Sink(new DelegatingSink(e => evt = e))
-                .Destructure.ToMaximumStringLength(3)
-                .CreateLogger();
-
-            log.Information("{@X}", x);
-            var limitedText = evt.Properties["X"].ToString();
+            var limitedText = LogAndGetAsString(x, conf => conf.Destructure.ToMaximumStringLength(3), "@");

             Assert.Equal("\"AB…\"", limitedText);
         }
@@ -325,14 +304,7 @@
         {
             var x = "ABCD";

-            LogEvent evt = null;
-            var log = new LoggerConfiguration()
-                .WriteTo.Sink(new DelegatingSink(e => evt = e))
-                .Destructure.ToMaximumStringLength(3)
-                .CreateLogger();
-
-            log.Information("{$X}", x);
-            var limitedText = evt.Properties["X"].ToString();
+            var limitedText = LogAndGetAsString(x, conf => conf.Destructure.ToMaximumStringLength(3), "$");

             Assert.Equal("\"AB…\"", limitedText);
         }
@@ -347,14 +319,7 @@
                 TooLongText = text
             };

-            LogEvent evt = null;
-            var log = new LoggerConfiguration()
-                .WriteTo.Sink(new DelegatingSink(e => evt = e))
-                .Destructure.ToMaximumStringLength(limit)
-                .CreateLogger();
-
-            log.Information("{@X}", x);
-            var limitedText = evt.Properties["X"].ToString();
+            var limitedText = LogAndGetAsString(x, conf => conf.Destructure.ToMaximumStringLength(limit), "@");

             Assert.Contains(textAfter, limitedText);
         }
@@ -364,15 +329,7 @@
         {
             var x = new ToStringOfLength(4);

-            LogEvent evt = null;
-            var log = new LoggerConfiguration()
-                .WriteTo.Sink(new DelegatingSink(e => evt = e))
-                .Destructure.ToMaximumStringLength(3)
-                .CreateLogger();
-
-            log.Information("{$X}", x);
-            var limitedText = evt.Properties["X"].ToString();
-
+            var limitedText = LogAndGetAsString(x, conf => conf.Destructure.ToMaximumStringLength(3), "$");
             Assert.Contains("##…", limitedText);
         }

@@ -381,14 +338,7 @@
         {
             var x = new ToStringOfLength(4);

-            LogEvent evt = null;
-            var log = new LoggerConfiguration()
-                .WriteTo.Sink(new DelegatingSink(e => evt = e))
-                .Destructure.ToMaximumStringLength(3)
-                .CreateLogger();
-
-            log.Information("{X}", x);
-            var limitedText = evt.Properties["X"].ToString();
+            var limitedText = LogAndGetAsString(x, conf => conf.Destructure.ToMaximumStringLength(3));

             Assert.Contains("####", limitedText);
         }
@@ -421,14 +371,7 @@
         {
             var x = new[] { 1, 2, 3, 4 };

-            LogEvent evt = null;
-            var log = new LoggerConfiguration()
-                .WriteTo.Sink(new DelegatingSink(e => evt = e))
-                .Destructure.ToMaximumCollectionLength(3)
-                .CreateLogger();
-
-            log.Information("{X}", x);
-            var limitedCollection = evt.Properties["X"].ToString();
+            var limitedCollection = LogAndGetAsString(x, conf => conf.Destructure.ToMaximumCollectionLength(3));

             Assert.Contains("3", limitedCollection);
             Assert.DoesNotContain("4", limitedCollection);
@@ -444,17 +387,23 @@
                 {"3", 3}
             };

-            LogEvent evt = null;
-            var log = new LoggerConfiguration()
-                .WriteTo.Sink(new DelegatingSink(e => evt = e))
-                .Destructure.ToMaximumCollectionLength(2)
-                .CreateLogger();
-
-            log.Information("{X}", x);
-            var limitedCollection = evt.Properties["X"].ToString();
+            var limitedCollection = LogAndGetAsString(x, conf => conf.Destructure.ToMaximumCollectionLength(2));

             Assert.Contains("2", limitedCollection);
             Assert.DoesNotContain("3", limitedCollection);
+        }
+
+        private string LogAndGetAsString(object x, Func<LoggerConfiguration, LoggerConfiguration> conf, string destructuringSymbol = "")
+        {
+            LogEvent evt = null;
+            var logConf = new LoggerConfiguration()
+                .WriteTo.Sink(new DelegatingSink(e => evt = e));
+            logConf = conf(logConf);
+            var log = logConf.CreateLogger();
+
+            log.Information($"{{{destructuringSymbol}X}}", x);
+            var result = evt.Properties["X"].ToString();
+            return result;
         }

         [Fact]


Make EnableIf and DisableIf tests work

Make EnableIf and DisableIf tests work

--- Assets/NaughtyAttributes/Scripts/Editor/Utility/PropertyUtility.cs
+++ Assets/NaughtyAttributes/Scripts/Editor/Utility/PropertyUtility.cs
@@ -78,6 +78,17 @@

 			object target = GetTargetObjectWithProperty(property);

+			// deal with enum conditions
+			if (enableIfAttribute.EnumValue != null)
+			{
+				Enum value = GetEnumValue(target, enableIfAttribute.Conditions[0]);
+				if (value != null) return enableIfAttribute.EnumValue.Equals(value) != enableIfAttribute.Inverted;
+
+				string message = enableIfAttribute.GetType().Name + " needs a valid enum field, property or method name to work";
+				Debug.LogWarning(message, property.serializedObject.targetObject);
+				return false;
+			}
+
 			List<bool> conditionValues = GetConditionValues(target, enableIfAttribute.Conditions);
 			if (conditionValues.Count > 0)
 			{
@@ -116,6 +127,29 @@

 				return false;
 			}
+		}
+
+		/// <summary>
+		///		Gets an enum value from reflection.
+		/// </summary>
+		/// <param name="target">The target object.</param>
+		/// <param name="enumName">Name of a field, property, or method that returns an enum.</param>
+		/// <returns>Null if can't find an enum value.</returns>
+		internal static Enum GetEnumValue(object target, string enumName)
+		{
+			FieldInfo enumField = ReflectionUtility.GetField(target, enumName);
+			if (enumField != null && enumField.FieldType.IsSubclassOf(typeof(Enum)))
+				return (Enum) enumField.GetValue(target);
+
+			PropertyInfo enumProperty = ReflectionUtility.GetProperty(target, enumName);
+			if (enumProperty != null && enumProperty.PropertyType.IsSubclassOf(typeof(Enum)))
+				return (Enum) enumProperty.GetValue(target);
+
+			MethodInfo enumMethod = ReflectionUtility.GetMethod(target, enumName);
+			if (enumMethod != null && enumMethod.ReturnType.IsSubclassOf(typeof(Enum)))
+				return (Enum) enumMethod.Invoke(target, null);
+
+			return null;
 		}

 		internal static List<bool> GetConditionValues(object target, string[] conditions)


use extension method to grab lessons in wand shop

--- Assets/Scripts/HarryPotterUnity/Cards/Charms/Locations/WandShop.cs
+++ Assets/Scripts/HarryPotterUnity/Cards/Charms/Locations/WandShop.cs
@@ -1,6 +1,7 @@
 using System.Collections.Generic;
 using System.Linq;
 using HarryPotterUnity.Enums;
+using HarryPotterUnity.Utils;

 namespace HarryPotterUnity.Cards.Charms.Locations
 {
@@ -11,9 +12,9 @@
         {
             get
             {
-                return Player.InPlay.Lessons.Cast<BaseLesson>()
-                    .Concat(Player.OppositePlayer.InPlay.Lessons.Cast<BaseLesson>())
-                    .Where(c => c.LessonType == LessonTypes.Charms);
+                return Player.InPlay.LessonsOfType(LessonTypes.Charms)
+                    .Concat(Player.OppositePlayer.InPlay.LessonsOfType(LessonTypes.Charms))
+                    .Cast<BaseLesson>();
             }
         }
         public override void OnEnterInPlayAction()


Fix #878.

Fix #878.

--- Aurora/CoreApplicationPlugins/RegionLoaderPlugins/RegionManager.cs
+++ Aurora/CoreApplicationPlugins/RegionLoaderPlugins/RegionManager.cs
@@ -295,6 +295,8 @@
                 MessageBox.Show("Select a valid region from the list.");
                 return;
             }
+            if (item.ToString().StartsWith("Online - "))
+                item = item.ToString().Remove(0, 9);
             RegionInfo region = m_connector.GetRegionInfo(item.ToString(), false);
             if (region == null)
             {


Fixed some oddities with the mouse cursor not showing after exclusive mode is enabled/disabled.

git-svn-id: 64cc320d9ecd7aad470f8b18be342a8e58536f88@224 a61f9e97-bd4c-0410-8c65-85b29eaa70ff

--- Gorgon/Input/Mouse.cs
+++ Gorgon/Input/Mouse.cs
@@ -127,7 +127,10 @@
 						Forms.Cursor.Show();
 				}
 				else
-					Forms.Cursor.Hide();
+				{
+					if (_cursorVisible)
+						Forms.Cursor.Hide();
+				}

 				_cursorVisible = value;
 			}
@@ -144,10 +147,9 @@
 			}
 			set
 			{
+				base.Exclusive = value;
 				if (value)
 					CursorVisible = false;
-
-				base.Exclusive = value;
 			}
 		}


Home and end keys in the result grid now go to the top and bottom of the grid.

--- WastedgeQuerier/EditInExcel/ResultForm.cs
+++ WastedgeQuerier/EditInExcel/ResultForm.cs
@@ -85,6 +85,25 @@
             }
         }

+        protected override bool ProcessCmdKey(ref Message msg, Keys keyData)
+        {
+            if (_grid.ContainsFocus && _grid.RowsCount > _grid.FixedRows)
+            {
+                switch (keyData)
+                {
+                    case Keys.Home:
+                        _grid.Selection.FocusRow(1);
+                        return true;
+
+                    case Keys.End:
+                        _grid.Selection.FocusRow(_grid.RowsCount - 1);
+                        return true;
+                }
+            }
+
+            return base.ProcessCmdKey(ref msg, keyData);
+        }
+
         private void LoadResultSet(ResultSet resultSet)
         {
             _resultSet = resultSet;


Added proxying to the check join api

Added proxying to the check join api

--- Com/GitHub/ZachDeibert/DecentralizedYggdrasil/Apis/CheckJoinApi.cs
+++ Com/GitHub/ZachDeibert/DecentralizedYggdrasil/Apis/CheckJoinApi.cs
@@ -1,6 +1,7 @@
 using System;
 using System.Collections.Generic;
 using System.Linq;
+using System.Net;
 using System.Security.Cryptography;
 using Com.GitHub.ZachDeibert.DecentralizedYggdrasil.Model;

@@ -8,6 +9,7 @@
 	public class CheckJoinApi : IApi {
 		private List<UserData> Users;
 		private TransientStateData State;
+		private RealYggdrasil Yggdrasil;

 		public Type ParamType {
 			get {
@@ -24,6 +26,7 @@
 		public void Init(YggdrasilServer server, List<UserData> users, TransientStateData state, RealYggdrasil yggdrasil) {
 			Users = users;
 			State = state;
+			Yggdrasil = yggdrasil;
 		}

 		public bool IsAcceptable(Uri uri) {
@@ -40,16 +43,20 @@
 			IEnumerable<Profile> matchedProfiles = Users.SelectMany(u => u.Profiles).Where(p => p.Name == username);
 			foreach (Profile profile in matchedProfiles) {
 				TransientProfileData data = State[profile];
-				UserData user = Users.FirstOrDefault(u => u.Profiles.Any(p => p.Id == profile.Id));
-				if (user == null) {
-					throw new StandardErrorException(StandardErrors.InvalidToken, 403, "Forbidden");
-				} else {
-					RSACryptoServiceProvider rsa = user.RSAPublicKey;
-					if (rsa.VerifyHash(serverHash.SHA1HexToBytes(), CryptoConfig.MapNameToOID("SHA1"), Convert.FromBase64String(data.JoinedServerHash))) {
-						return profile;
+				UserData user = Users.First(u => u.Profiles.Any(p => p.Id == profile.Id));
+				RSACryptoServiceProvider rsa = user.RSAPublicKey;
+				if (rsa.VerifyHash(serverHash.SHA1HexToBytes(), CryptoConfig.MapNameToOID("SHA1"), Convert.FromBase64String(data.JoinedServerHash))) {
+					return profile;
+				} else if (user.TryProxy) {
+					HttpStatusCode status;
+					Profile real = Yggdrasil.Request<Profile>(string.Concat("https://sessionserver.mojang.com/session/minecraft/hasJoined?username=", username, "&serverId=", serverHash), null, out status);
+					if (status == HttpStatusCode.OK) {
+						return real;
 					} else {
 						throw new StandardErrorException(StandardErrors.InvalidToken, 403, "Forbidden");
 					}
+				} else {
+					throw new StandardErrorException(StandardErrors.InvalidToken, 403, "Forbidden");
 				}
 			}
 			throw new StandardErrorException(StandardErrors.InvalidToken, 403, "Forbidden");