Some more CardDb fixes

Some more CardDb fixes

--- OpenAI/OpenAI/Ai/CardDB.cs
+++ OpenAI/OpenAI/Ai/CardDB.cs
@@ -54,7 +54,7 @@
             OnSecretPlay,
             OnTurnEndsTrigger,
             OnTurnStartTrigger,
-            triggerInspire
+            OnInspire
         }

         public enum cardrace
@@ -10664,14 +10664,14 @@
                 }

                 c.triggers = new List<CardTriggers>();
-                Type trigerType = c.sim_card.GetType();
+                Type triggerType = c.sim_card.GetType();
                 foreach (string triggerName in Enum.GetNames(typeof(CardTriggers)))
                 {
                     try
                     {
-                        foreach (var m in trigerType.GetMethods().Where(e => e.Name.Equals(triggerName, StringComparison.Ordinal)))
+                        foreach (var m in triggerType.GetMethods().Where(e => e.Name.Equals(triggerName, StringComparison.Ordinal)))
                         {
-                            if (m.DeclaringType == trigerType)
+                            if (m.DeclaringType == triggerType)
                                 c.triggers.Add((CardTriggers)Enum.Parse(typeof(CardTriggers), triggerName));
                         }
                     }


Add comments

Add comments

--- osu.Game.Rulesets.Catch/UI/SkinnableCatcher.cs
+++ osu.Game.Rulesets.Catch/UI/SkinnableCatcher.cs
@@ -16,6 +16,9 @@
     /// </summary>
     public class SkinnableCatcher : SkinnableDrawable
     {
+        /// <summary>
+        /// This is used by skin elements to determine which texture of the catcher is used.
+        /// </summary>
         [Cached]
         public readonly Bindable<CatcherAnimationState> AnimationState = new Bindable<CatcherAnimationState>();


Lvup: commit this only for traceability

Lvup: commit this only for traceability

Will be moved into Lvup next commit

--- OpenKh.Kh2/Battle/Lvup2.cs
+++ OpenKh.Kh2/Battle/Lvup2.cs
@@ -6,9 +6,14 @@
 {
     public class Lvup2
     {
+        [Data] public int MagicCode { get; set; }
+        [Data] public int Count { get; set; }
+        [Data(Count = 0x38)] public byte[] Unknown08 { get; set; }
+        [Data(Count = 13)] public List<Character> Characters { get; set; }
+
         public class Character
         {
-            [Data] public int Unknown00 { get; set; }
+            [Data] public int NumLevels { get; set; }
             [Data(Count = 99)] public List<Level> Levels { get; set; }

             public class Level
@@ -25,28 +30,25 @@
             }
         }

-        private class Header
+        public enum PlayableCharacterType
         {
-            [Data] public int MagicCode { get; set; }
-            [Data] public int Count { get => Characters.TryGetCount(); set => Characters = Characters.CreateOrResize(value); }
-            [Data(Count = 0x38)] public byte[] Unknown08 { get; set; }
-            [Data(Count = 13)] public List<Character> Characters { get; set; }
+            Sora,
+            Donald,
+            Goofy,
+            Mickey,
+            Auron,
+            PingMulan,
+            Aladdin,
+            Sparrow,
+            Biest,
+            Jack,
+            Simba,
+            Tron,
+            Riku
         }

+        public static Lvup2 Read(Stream stream) => BinaryMapping.ReadObject<Lvup2>(stream);

-        static Lvup2()
-        {
-            //BinaryMapping.SetMemberLengthMapping<Header>(nameof(Header.Characters), (o, m) => o.Count);
-        }
-
-        public static List<Character> Read(Stream stream) =>
-            BinaryMapping.ReadObject<Header>(stream).Characters;
-
-        //public static void Write(Stream stream, List<Character> entries) =>
-        //    BinaryMapping.WriteObject(stream, new Header
-        //    {
-        //        MagicCode = 1,
-        //        Entries = entries
-        //    });
+        public void Write(Stream stream) => BinaryMapping.WriteObject(stream, this);
     }
 }


Make timeshift player able to not allow pause

--- osu.Game/Screens/Multi/Play/TimeshiftPlayer.cs
+++ osu.Game/Screens/Multi/Play/TimeshiftPlayer.cs
@@ -35,7 +35,8 @@
         [Resolved]
         private IBindable<RulesetInfo> ruleset { get; set; }

-        public TimeshiftPlayer(PlaylistItem playlistItem)
+        public TimeshiftPlayer(PlaylistItem playlistItem, bool allowPause = true)
+            : base(allowPause)
         {
             this.playlistItem = playlistItem;
         }


fix comments

fix comments

--- PowerShellTools.HostService/ServiceCommon.cs
+++ PowerShellTools.HostService/ServiceCommon.cs
@@ -14,7 +14,7 @@

 namespace PowerShellTools.HostService
 {
-    public class ServiceCommon
+    internal sealed class ServiceCommon
     {
         public static object RunspaceLock = new object();


Fixed bug.

Fixed bug.

--- Praktikum_MVC/Views/ProfSummary/Index.cshtml
+++ Praktikum_MVC/Views/ProfSummary/Index.cshtml
@@ -1,8 +1,8 @@
 @{
     Layout = "~/Views/Shared/_Layout.cshtml";
-    ViewBag.title = "Professor " + ViewBag.professor.name;

     if (ViewBag.exists) {
+    ViewBag.title = "Professor " + ViewBag.professor.name;

@Html.Raw(ViewBag.professor.titel + " " +ViewBag.professor.name)

@@ -66,6 +66,7 @@

     }
     else {
+        ViewBag.title = "Professorenübersicht ";
         @Html.Raw(@"
Professor mit dem Nickname " + @Url.RequestContext.RouteData.Values["id"]
             + " nicht gefunden.
 Hier sind alle registrierten Professoren:
")
         foreach(Praktikum_MVC.Models.Professor prof in ViewBag.professoren) {


Proposal on raising with invalid amount

Proposal on raising with invalid amount

When raising with invalid amount (e.g. <= 0) return CheckOrCall instead of throwing error

--- Source/TexasHoldem.Logic/Players/PlayerAction.cs
+++ Source/TexasHoldem.Logic/Players/PlayerAction.cs
@@ -45,7 +45,7 @@
         {
             if (withAmount <= 0)
             {
-                throw new ArgumentOutOfRangeException(nameof(withAmount), "Raise amount should be at least 1");
+                return CheckOrCall();
             }

             return new PlayerAction(withAmount);


Fixed wrong push. Store and load do not introduce new locations.

--- SpirvNet/SpirvNet/DotNet/SSA/MethodFrameState.cs
+++ SpirvNet/SpirvNet/DotNet/SSA/MethodFrameState.cs
@@ -138,25 +138,10 @@
         {
             if (location == null)
                 throw new InvalidOperationException();
-
+
             StackLocations[StackPosition] = location;
             ++StackPosition;
         }
-        /// <summary>
-        /// Pushes a type of the stack
-        /// </summary>
-        private void Push(SpirvType type)
-        {
-            if (type == null)
-                throw new InvalidOperationException();
-
-            StackLocations[StackPosition] = CreateLocation(type);
-            ++StackPosition;
-        }
-        /// <summary>
-        /// Pushes a type of the stack
-        /// </summary>
-        private void Push(TypeReference type) => Push(Frame.TypeBuilder.Create(type));

         /// <summary>
         /// Pops a value from the stack (returns the type)
@@ -242,16 +227,16 @@
                     break;

                 case Code.Stloc_0:
-                    LocalVars[0] = CreateLocation(Pop());
+                    LocalVars[0] = Pop();
                     break;
                 case Code.Stloc_1:
-                    LocalVars[1] = CreateLocation(Pop());
+                    LocalVars[1] = Pop();
                     break;
                 case Code.Stloc_2:
-                    LocalVars[2] = CreateLocation(Pop());
+                    LocalVars[2] = Pop();
                     break;
                 case Code.Stloc_3:
-                    LocalVars[3] = CreateLocation(Pop());
+                    LocalVars[3] = Pop();
                     break;

                 case Code.Add:


Fix xpath in GetElementWithText method

Fix xpath in GetElementWithText method

--- Src/MvcPages/SeleniumUtils/SeleniumExtensions.cs
+++ Src/MvcPages/SeleniumUtils/SeleniumExtensions.cs
@@ -292,7 +292,7 @@
                 var xpathLiteral = XPathHelpers.ToXPathLiteral(linkText.Trim());
                 var by = isPartialText
                     ? By.XPath(string.Format(".//*[contains(text(), {0}) or (@type='submit' and @value={0}) or (@title={0})]", xpathLiteral))
-                    : By.XPath(string.Format(".//*[(normalize-space(.) = {0}) or (@type='submit' and @value={0}) or (@title={0})]", xpathLiteral));
+                    : By.XPath(string.Format(".//*[(normalize-space(.) = {0}) or (normalize-space(text()) = {0}) or (@type='submit' and @value={0}) or (@title={0})]", xpathLiteral));
                 return GetElementByInScope(driver, by, scope);
             }
             catch (WebDriverTimeoutException ex)


RegistryEditor proper clean-up

RegistryEditor proper clean-up

--- RegistryEditorPlugin/RegistryEditorPlugin.cs
+++ RegistryEditorPlugin/RegistryEditorPlugin.cs
@@ -14,6 +14,7 @@
         public static readonly string VERSION = "v1.0.0";

         private JsonEditorMainForm m_Form = null;
+        private ToolStripMenuItem m_MenuItem = null;

         public override void Initialize()
         {
@@ -24,6 +25,7 @@
             menuItem.Text = "RegistryEditor";
             menuItem.Click += new System.EventHandler(menuItem_Click);
             Main.Instance.settingsToolStripMenuItem.DropDownItems.Add(menuItem);
+            m_MenuItem = menuItem;
         }

         public Stream GenerateStreamFromString(string s)
@@ -48,7 +50,7 @@

         public override void Deinitialize()
         {
-
+            Main.Instance.settingsToolStripMenuItem.DropDownItems.Remove(m_MenuItem);
         }

         public override string GetName()


[Core] Tweak stacktraces to ignore for remote logging

--- Oxide.Core/RemoteLogger.cs
+++ Oxide.Core/RemoteLogger.cs
@@ -155,6 +155,8 @@
         public static void Exception(string message, string rawStackTrace)
         {
             if (!rawStackTrace.Contains("Oxide.Core") && !rawStackTrace.Contains("Oxide.Ext") && !rawStackTrace.Contains("Oxide.Game")) return;
+            if (rawStackTrace.Contains("Oxide.Core.Configuration") || rawStackTrace.Contains("Oxide.Ext.LivemapIO") || rawStackTrace.Contains("Oxide.Ext.RustIO")) return;
+            if (rawStackTrace.Contains("IOException") || rawStackTrace.Contains("Sharing violation") || rawStackTrace.Contains("UnauthorizedAccessException")) return;

             var stackTrace = rawStackTrace.Split('\r', '\n');
             var culprit = stackTrace[0].Split('(')[0].Trim();


Fix cache issue w/ grid

Fix cache issue w/ grid

--- PWPlanner/Core/TileGrid.cs
+++ PWPlanner/Core/TileGrid.cs
@@ -21,6 +21,7 @@
         //Disable/Enable Grid
         private void Grid_Click(object sender, RoutedEventArgs e)
         {
+            Debug.WriteLine("test");
             if (gridButton.IsChecked)
             {
                 RemoveGrid();
@@ -129,7 +130,7 @@
                     scale = new ScaleTransform(MainCanvas.LayoutTransform.Value.M11 - 0.13, MainCanvas.LayoutTransform.Value.M22 - 0.13);
                 }
                 MainCanvas.LayoutTransform = scale;
-                MainCanvas.UpdateLayout();
+                MainCanvas.InvalidateVisual();
             }
         }

@@ -175,6 +176,10 @@

         private void RemoveGrid()
         {
+            //Temporarily get rid of cache, so the lines doesn't stay until visual update
+            CacheMode cm = MainCanvas.CacheMode;
+            MainCanvas.CacheMode = null;
+
             for (int i = 0; i < horiLines.Length - 1; i++)
             {
                 MainCanvas.Children.Remove(horiLines[i]);
@@ -183,7 +188,8 @@
             {
                 MainCanvas.Children.Remove(vertLines[i]);
             }
-
+            MainCanvas.CacheMode = cm;
+
             gridButton.IsChecked = false;
         }


Seed data reworked to seed votes and add them to questions.

--- SummitCommunity/Data/Migrations/Configuration.cs
+++ SummitCommunity/Data/Migrations/Configuration.cs
@@ -37,15 +37,22 @@

             context.SaveChanges();

-            User user = new User
+            var users = new List<User>();
+
+            for (int i = 0; i < 50; i++)
             {
-                UserName = "anonimous@anonimous.com",
-                Email = "anonimous@anonimous.com",
-                FirstName = "Anonymous",
-                LastName = "Snow"
-            };
+                var user = new User
+                {
+                    UserName = "anonimous" + i,
+                    Email = i + "anonimous@anonimous.com",
+                    FirstName = "Anonymous" + i,
+                    LastName = "Snow" + i
+                };

-            context.Users.AddOrUpdate(user);
+                users.Add(user);
+                context.Users.Add(user);
+            }
+
             context.SaveChanges();

             var questions = new List<Question>();
@@ -58,15 +65,35 @@
                     Content = "What to do with my question? Can someone answer me, please ?!",
                     Category = categories[i % 3],
                     CategoryId = categories[i % 3].Id,
-                    User = user,
-                    UserId = user.Id,
-                    Vote = random.Next(-5, 6)
+                    User = users[i],
+                    UserId = users[i].Id,
                 };

                 questions.Add(question);
-                context.Questions.Add(question);
             }
-
+
+            var votes = new List<Vote>();
+
+            for (int i = 0; i < 50; i++)
+            {
+                var vote = new Vote
+                {
+                    Question = questions[i % 9],
+                    QuestionId = questions[i % 9].Id,
+                    User = users[i],
+                    UserId = users[i].Id,
+                    Value = random.Next(-1, 2)
+                };
+
+                context.Votes.Add(vote);
+                context.SaveChanges();
+            }
+
+            questions.ForEach(q =>
+            {
+                q.AverageVote = q.Votes.Sum(v => v.Value);
+                context.Questions.AddOrUpdate(q);
+            });
             context.SaveChanges();

             for (int i = 0; i < questions.Count - 2; i++)
@@ -76,8 +103,8 @@
                     var answerOne = new Answer
                     {
                         Content = "I'm answering now.Read me!",
-                        User = user,
-                        UserId = user.Id,
+                        User = users[random.Next(0, 50)],
+                        UserId = users[random.Next(0, 50)].Id,
                         Question = questions[i],
                         QuestionId = questions[i].Id
                     };
@@ -88,14 +115,14 @@
                 var answerTwo = new Answer
                 {
                     Content = i + " Let's answer this question.This is the correct answer!",
-                    User = user,
-                    UserId = user.Id,
+                    User = users[random.Next(0, 50)],
+                    UserId = users[random.Next(0, 50)].Id,
                     Question = questions[i],
                     QuestionId = questions[i].Id
                 };

-
-
+
+
                 context.Answers.Add(answerTwo);
             }


task 2 works

task 2 works

--- conditional-statements/Task-2/Task-2/Program.cs
+++ conditional-statements/Task-2/Task-2/Program.cs
@@ -11,9 +11,21 @@
             Console.WriteLine("Ohjelma laskee lippusi hinnan antamiesi tietojen perusteella");

             Console.WriteLine("Syötä ikäsi: ");
-            string userInput
+            string userInput;
             userInput = Console.ReadLine();
-            Console.ReadLine();
+
+            Console.WriteLine("Oletko Mtk:n jäsen?: K/E ");
+            string mtk;
+            mtk = Console.ReadLine().ToUpper();
+
+            Console.WriteLine("Oletko varusmies?: K/E ");
+            string vM;
+            vM = Console.ReadLine().ToUpper();
+
+            Console.WriteLine("Oletko opiskelija?: K/E ");
+            string oP;
+            oP = Console.ReadLine().ToUpper();
+
             bool isNumber;

             isNumber = int.TryParse(userInput, out int age);
@@ -21,31 +33,46 @@
             double price = 16;

             double discount = 0;
-
-
-             //lasketaan ikä alennukset
-            if ( age < 7)
+
+            //lasketaan ikä alennukset
+            if (age < 7)
             {
+                discount = 1.00;
                 Console.WriteLine("Pääset ilmaiseksi");
             }
-            else if (age >7 && age < 15)
+            else if (age >= 65)
+            {
+                discount = 0.50;
+            }
+            else if (age > 7 && age < 15)
             {
                 discount = 0.5;
             }
-
-
-
-
-
-
-
-
+            else if (mtk == "K" && oP == "K")
+            {
+                discount = 0.60;
+            }
+            else if (mtk == "K")
+            {
+                discount = 0.15;
+            }
+            else if (vM == "K")
+            {
+                discount = 0.50;
+            }
+            else if (oP == "K")
+            {
+                discount = 0.45;
+            }
+            else
+            {
+                Console.WriteLine("Jokin meni pieleen");
+            }
+
             Console.WriteLine($"Lipun hintasi on: {price-price*discount}");
             Console.ReadKey();
-
-
-
-
+            Console.ReadKey();
+            //Että ohjelma jää pyörimään vähän pidempään
         }
     }
 }


Adding todoitems: Check

Adding todoitems: Check

--- TodoMVC.Server/Controllers/TodoItemController.cs
+++ TodoMVC.Server/Controllers/TodoItemController.cs
@@ -17,6 +17,12 @@
 {
     public class TodoItemController : ApiController
     {
+        public string Options()
+        {
+            return null;
+        }
+
+        [HttpGet]
         public HttpResponseMessage Get()
         {
             var getTodoItemsHandler = new GetTodoItemsHandler();
@@ -26,6 +32,7 @@
             return response;
         }

+        [HttpPost]
         public HttpResponseMessage Post(CreateTodoItemModel model)
         {
             if (ModelState.IsValid)


add defensive checks to PlayerMove ServerUpdateIsSwappable to prevent server NRE

--- UnityProject/Assets/Scripts/Player/PlayerMove.cs
+++ UnityProject/Assets/Scripts/Player/PlayerMove.cs
@@ -531,7 +531,9 @@
 	/// </summary>
 	private void ServerUpdateIsSwappable()
 	{
-		isSwappable = isHelpIntentServer && !PlayerScript.pushPull.IsPullingSomethingServer;
+		isSwappable = isHelpIntentServer && PlayerScript != null &&
+		              PlayerScript.pushPull != null &&
+		              !PlayerScript.pushPull.IsPullingSomethingServer;
 	}

 	/// <summary>


Added local time to textbox output

Added local time to textbox output

--- VectorClock.Commander/ViewModel/MainViewModel.cs
+++ VectorClock.Commander/ViewModel/MainViewModel.cs
@@ -65,7 +65,13 @@
                     UdpReceiveResult result = await client.ReceiveAsync();

                     Message msg = MessageDeserializer.Deserialize(result.Buffer);
-                    TextBoxContent += $"Answer from: { result.RemoteEndPoint.Address}:{result.RemoteEndPoint.Port}. Message: {msg.controlBlock.Command} \n Balance: {msg.communicationBlock.payload.balance} Clock: {msg.communicationBlock.clock}\n" ;
+
+                    TextBoxContent += string.Format("{0:HH:mm:ss}: Answer from {1}. Message: {2}\n Balance: {3} Clock: {4}\n",
+                        DateTime.Now,
+                        result.RemoteEndPoint,
+                        msg.controlBlock.Command,
+                        msg.communicationBlock.payload.balance,
+                        msg.communicationBlock.clock);
                 }
             }
         }


Changed name of ConnectedDeviceCount to ConnectedDeviceNumber. Added ReadOnlyPath property.

--- WIndows.Forms/Dialogs/NetworkConnectionDialog.cs
+++ WIndows.Forms/Dialogs/NetworkConnectionDialog.cs
@@ -14,7 +14,6 @@
 	/// <seealso cref="System.Windows.Forms.CommonDialog" />
 	public class NetworkConnectionDialog : CommonDialog
 	{
-		private SafeCoTaskMemHandle lpnres;
 		private NETRESOURCE nres = new NETRESOURCE();
 		private CONNECTDLGSTRUCT opts;

@@ -25,10 +24,10 @@
 			nres.dwType = NETRESOURCEType.RESOURCETYPE_DISK;
 		}

-		/// Gets the connected device count. This value is only valid after successfully running the dialog.
-		/// <value>The connected device count.</value>
+		/// Gets the connected device number. This value is only valid after successfully running the dialog.
+		/// <value>The connected device number. The value is 1 for A:, 2 for B:, 3 for C:, and so on. If the user made a deviceless connection, the value is –1.</value>
 		[Browsable(false)]
-		public int ConnectedDeviceCount => opts.dwDevNum;
+		public int ConnectedDeviceNumber => opts.dwDevNum;

 		/// Gets or sets a value indicating whether to hide the check box allowing the user to restore the connection at logon.
 		/// <value><c>true</c> if hiding restore connection check box; otherwise, <c>false</c>.</value>
@@ -51,6 +50,14 @@
 				opts.dwFlags = opts.dwFlags.SetFlags(CONN_DLG.CONNDLG_NOT_PERSIST, !value);
 			}
 		}
+
+		///
+		/// Gets or sets a value indicating whether to display a read-only path instead of allowing the user to type in a path. This is only
+		/// valid if <see cref="RemoteNetworkName"/> is not <see langword="null"/>.
+		///
+		/// <value><c>true</c> to display a read only path; otherwise, <c>false</c>.</value>
+		[DefaultValue(false), Category("Appearance"), Description("Display a read-only path instead of allowing the user to type in a path.")]
+		public bool ReadOnlyPath { get; set; }

 		/// Gets or sets the name of the remote network.
 		/// <value>The name of the remote network.</value>
@@ -78,18 +85,24 @@
 			opts.dwDevNum = -1;
 			opts.dwFlags = 0;
 			opts.lpConnRes = IntPtr.Zero;
+			ReadOnlyPath = false;
 		}

 		/// <inheritdoc/>
 		protected override bool RunDialog(IntPtr hwndOwner)
 		{
-			opts.hwndOwner = hwndOwner;
-			lpnres = SafeCoTaskMemHandle.CreateFromStructure(nres);
-			opts.lpConnRes = lpnres.DangerousGetHandle();
-			var ret = WNetConnectionDialog1(opts);
-			if (ret == -1) return false;
-			ret.ThrowIfFailed();
-			return true;
+			using (var lpnres = SafeCoTaskMemHandle.CreateFromStructure(nres))
+			{
+				opts.hwndOwner = hwndOwner;
+				opts.lpConnRes = lpnres.DangerousGetHandle();
+				if (ReadOnlyPath && !string.IsNullOrEmpty(nres.lpRemoteName))
+					opts.dwFlags |= CONN_DLG.CONNDLG_RO_PATH;
+				var ret = WNetConnectionDialog1(opts);
+				opts.lpConnRes = IntPtr.Zero;
+				if (ret == -1) return false;
+				ret.ThrowIfFailed();
+				return true;
+			}
 		}
 	}
 }


comment: DependencyGraph is unused but brings back good memories

--- Assets/Scripts/DependencyGraph.cs
+++ Assets/Scripts/DependencyGraph.cs
@@ -1,3 +1,6 @@
+// This file is never used, but I'm leaving it here because it brings back good memories.
+// Thanks Zach!
+
 // Written in 2013 by Zachary Latta
 // To the extent possible under law, the author(s) have dedicated all copyright and related and neighboring rights to this software to the public domain worldwide. This software is distributed without any warranty.
 // You should have received a copy of the CC0 Public Domain Dedication along with this software. If not, see https://creativecommons.org/publicdomain/zero/1.0/.


Gamepad: increased hard pressed threshold from 8 to 9 for mobile 60 fps

--- Assets/Scripts/Gamepad/Gamepad.cs
+++ Assets/Scripts/Gamepad/Gamepad.cs
@@ -8,8 +8,8 @@
 		A, B, UP, RIGHT, DOWN, LEFT
 	}

-	// 5 is ok for mobile 30 fps, 8 for 60 fps
-	public const short HARD_PRESSED_MIN_COUNT = 8;
+	// 5 is ok for mobile 30 fps, 9 for 60 fps
+	public const short HARD_PRESSED_MIN_COUNT = 9;

 	// keeps track of every button's state
 	private static bool[] buttonsState = new bool[System.Enum.GetValues(typeof(BUTTONS)).Length];


Everything now editable.

Everything now editable.

--- Assets/Scripts/QuestEditorData.cs
+++ Assets/Scripts/QuestEditorData.cs
@@ -498,16 +498,16 @@
         DialogBox db = new DialogBox(new Vector2(0, 8), new Vector2(5, 1), "Unique Title:");
         db.ApplyTag("editor");

-        tb = new TextButton(new Vector2(5, 8), new Vector2(15, 1), m.uniqueTitleOriginal, delegate { Cancel(); });
-        tb.button.GetComponent<UnityEngine.UI.Text>().fontSize = UIScaler.GetSmallFont();
-        tb.ApplyTag("editor");
+        dbe1 = new DialogBoxEditable(new Vector2(5, 8), new Vector2(15, 1), m.uniqueTitleOriginal, delegate { UpdateUniqueTitle(); });
+        dbe1.ApplyTag("editor");
+        dbe1.AddBorder();

         db = new DialogBox(new Vector2(0, 10), new Vector2(20, 1), "Unique Information:");
         db.ApplyTag("editor");

-        tb = new TextButton(new Vector2(0, 11), new Vector2(20, 8), m.uniqueText, delegate { Cancel(); });
-        tb.button.GetComponent<UnityEngine.UI.Text>().fontSize = UIScaler.GetSmallFont();
-        tb.ApplyTag("editor");
+        dbe2 = new DialogBoxEditable(new Vector2(0, 11), new Vector2(20, 8), m.uniqueText, delegate { UpdateUniqueText(); });
+        dbe2.ApplyTag("editor");
+        dbe2.AddBorder();

         db = new DialogBox(new Vector2(0, 20), new Vector2(3, 1), "Types:");
         db.ApplyTag("editor");
@@ -573,6 +573,18 @@
         game.tokenBoard.AddHighlight(m.location, "MonsterLoc", "editor");

         m.SetVisible(1f);
+    }
+
+    public void UpdateUniqueTitle()
+    {
+        QuestData.Monster m = selection as QuestData.Monster;
+        m.uniqueTitleOriginal = dbe1.uiInput.text;
+    }
+
+    public void UpdateUniqueText()
+    {
+        QuestData.Monster m = selection as QuestData.Monster;
+        m.uniqueText = dbe1.uiInput.text;
     }

     public void SelectMonsterPlacements()


Made billboard memory efficiency fix. See http://sourceforge.net/tracker/index.php?func=detail&aid=1192765&group_id=84345&atid=572527

git-svn-id: 53f2a8ff3606f182ef4420064c1f4a5cdcbe6bb1@603 bb9bf1cf-960d-0410-9a3a-baeba60cf407

--- Axiom/Engine/Core/BillboardSet.cs
+++ Axiom/Engine/Core/BillboardSet.cs
@@ -64,7 +64,7 @@
         /// Reference to the material to use
         protected Material material;
         ///
-        protected bool allDefaultSize;
+        protected bool allDefaultSize = true;
         ///
         protected bool autoExtendPool = true;

@@ -471,6 +471,12 @@
         ///		Empties all of the active billboards from this set.
         ///
         public void Clear() {
+			// add all the currently active billboards to the free billboard queue
+			foreach ( Billboard b in activeBillboards )
+			{
+				freeBillboards.Enqueue(b);
+ 			}
+
             // clear the active billboard list
             activeBillboards.Clear();
         }


[packages,VisualCCommon] Fixing merge error

--- packages/VisualCCommon/bam/Scripts/MetaData.cs
+++ packages/VisualCCommon/bam/Scripts/MetaData.cs
@@ -393,7 +393,7 @@

         protected virtual bool Has64bithost_32bitcross => true;

-        protected virtual bool hasNative64BitTools => true;
+        protected virtual bool HasNative64BitTools => true;

         private static bool report_WindowsSDK_done = false;
         private static void
@@ -490,7 +490,7 @@
                 this.Get_tool_environment_variables(
                     bitdepth,
                     this.Has64bithost_32bitcross,
-                    this.hasNative64BitTools
+                    this.HasNative64BitTools
                 );
                 Report_WindowsSDK(this.Environment(bitdepth), bitdepth);
             }


CA-141868: Boot options are deleted by New VM Wizard if Installation Media page skipped - Fixed

- Fixed tests

Signed-off-by: Mihaela Stoica <be95049f8e30d921fc7e2579c00c48bd84c40606@citrix.com>

--- XenAdminTests/WizardTests/NewVMWizardStorageTest.cs
+++ XenAdminTests/WizardTests/NewVMWizardStorageTest.cs
@@ -275,7 +275,7 @@
         private bool _cloneInvoked;

         public NewVMWizardTestDefaultTemplate()
-            : base(new string[] { "Template", "Name", "Home Server", "CPU && Memory", "Storage", "Networking", "Finish" }, true, true)
+            : base(new string[] { "Template", "Name", "Installation Media", "Home Server", "CPU && Memory", "Storage", "Networking", "Finish" }, true, true)
         {
             Assert.AreEqual(1, DbProxy.proxys.Count);
             DbProxy.proxys[ConnectionsManager.XenConnectionsCopy[0]].Invoking += DbProxy_Invoking;


have copyFrom working. Now for CopyTo

have copyFrom working. Now for CopyTo

--- Aggregator.cs
+++ Aggregator.cs
@@ -166,8 +166,9 @@
             // Iterate through all of the TFS Fields that we are aggregating.
             foreach (ConfigItemType sourceField in configAggregatorItem.SourceItems)
             {
+                object value = targetWorkItem.GetField(sourceField.Name, (object)null);
                 // Get the value of the sourceField on the sourceWorkItem and add it to the list
-                string sourceValue = targetWorkItem.GetField(sourceField.Name, "");
+                string sourceValue = (value??"").ToString();
                 aggregateSourceValues.Add(sourceValue);
             }


Removed API suggestions for CashRegister

--- CSharp/Supermarket/Model/Checkout/CashRegister.cs
+++ CSharp/Supermarket/Model/Checkout/CashRegister.cs
@@ -4,20 +4,11 @@
 {
     public interface ICashRegister
     {
-        void Scan(EAN ean);
-        Receipt CreateReceipt();
+        // TODO: Defined the API for the cash register
     }

     public class CashRegister : ICashRegister
     {
-        public void Scan(EAN ean)
-        {
-            throw new System.NotImplementedException();
-        }
-
-        public Receipt CreateReceipt()
-        {
-            throw new System.NotImplementedException();
-        }
+        // TODO: Implement the cash register
     }
 }


Fix the ZMO rotation channel dimension order

--- Revise.Files/ZMO/Channels/RotationChannel.cs
+++ Revise.Files/ZMO/Channels/RotationChannel.cs
@@ -74,7 +74,7 @@
         /// <param name="reader">The reader.</param>
         /// <param name="frame">The frame to read.</param>
         public override void ReadFrame(BinaryReader reader, int frame) {
-            frames[frame] = reader.ReadQuaternion();
+            frames[frame] = reader.ReadQuaternion(true);
         }

         /// <summary>
@@ -83,7 +83,7 @@
         /// <param name="writer">The writer.</param>
         /// <param name="frame">The frame to write.</param>
         public override void WriteFrame(BinaryWriter writer, int frame) {
-            writer.Write(frames[frame]);
+            writer.Write(frames[frame], true);
         }
     }
 }


Add next tick tracking to compare against the new infraction's duration

--- Modix.Services/Moderation/ModerationAutoRescindBehavior.cs
+++ Modix.Services/Moderation/ModerationAutoRescindBehavior.cs
@@ -37,8 +37,12 @@
         /// <inheritdoc />
         public Task OnInfractionCreatedAsync(long infractionId, InfractionCreationData data)
         {
-            if(data.Duration != null)
-                SetNextUpdateTimerTrigger(data.Duration.Value);
+            if (data.Duration is TimeSpan dataDuration
+                && (!UpdateTimer.Enabled
+                    || (DateTimeOffset.Now + dataDuration) < _nextTick))
+            {
+                SetNextUpdateTimerTrigger(dataDuration);
+            }

             return Task.CompletedTask;
         }
@@ -89,17 +93,22 @@
                 var nextExpiration = await moderationService.GetNextInfractionExpiration();

                 if (nextExpiration != null)
-                    SetNextUpdateTimerTrigger(nextExpiration.Value - DateTimeOffset.Now);
+                    SetNextUpdateTimerTrigger(nextExpiration.Value - DateTimeOffset.Now);
             });
 #pragma warning restore CS4014
         }

         private void SetNextUpdateTimerTrigger(TimeSpan interval)
         {
-            UpdateTimer.Interval =
+            var newInterval =
                 (interval.TotalMilliseconds < MinTimerInterval) ? MinTimerInterval :
                 (interval.TotalMilliseconds > MaxTimerInterval) ? MaxTimerInterval :
                 interval.TotalMilliseconds;
+
+            _nextTick = DateTimeOffset.Now.AddMilliseconds(newInterval);
+
+            UpdateTimer.Interval = newInterval;
+
             UpdateTimer.Start();
         }

@@ -108,5 +117,7 @@

         private const double MaxTimerInterval
             = 3600000; // 1 hour
+
+        private DateTimeOffset _nextTick;
     }
 }


SampleChart. Update indicators on real-time.

--- Samples/Chart/SampleChart/MainWindow.xaml.cs
+++ Samples/Chart/SampleChart/MainWindow.xaml.cs
@@ -46,7 +46,7 @@
 	public partial class MainWindow
 	{
 		private ChartArea _areaComb;
-		private ChartCandleElement _candleElement1;
+		private ChartCandleElement _candleElement;
 		private TimeFrameCandle _candle;
 		private CandleMessageVolumeProfile _volumeProfile;
 		private readonly DispatcherTimer _chartUpdateTimer = new DispatcherTimer();
@@ -57,6 +57,7 @@
 		private Security _security;
 		private readonly IExchangeInfoProvider _exchangeInfoProvider = new InMemoryExchangeInfoProvider();
 		private RandomWalkTradeGenerator _tradeGenerator;
+		private readonly CachedSynchronizedDictionary<ChartIndicatorElement, IIndicator> _indicators = new CachedSynchronizedDictionary<ChartIndicatorElement, IIndicator>();

 		private TimeSpan _timeframe;

@@ -89,6 +90,7 @@
 		{
 			Chart.FillIndicators();
 			Chart.SubscribeIndicatorElement += Chart_OnSubscribeIndicatorElement;
+			Chart.UnSubscribeElement += Chart_OnUnSubscribeElement;

 			ConfigManager.RegisterService<IBackupService>(new YandexDiskService());

@@ -116,13 +118,23 @@

 			foreach (var candle in _allCandles.Cache)
 			{
-				//if (candle.State != CandleStates.Finished)
+				//if (candle.State != CandleStates.Finished)
 				//	candle.State = CandleStates.Finished;

 				chartData.Group(candle.OpenTime).Add(element, indicator.Process(candle));
 			}

 			Chart.Draw(chartData);
+
+			_indicators.Add(element, indicator);
+		}
+
+		private void Chart_OnUnSubscribeElement(IChartElement element)
+		{
+			var indElem = element as ChartIndicatorElement;
+
+			if (indElem != null)
+				_indicators.Remove(indElem);
 		}

 		private void RefreshCharts()
@@ -159,8 +171,8 @@
 				_security,
 				_timeframe);

-			_candleElement1 = new ChartCandleElement { FullTitle = "Candles" };
-			Chart.AddElement(_areaComb, _candleElement1, series);
+			_candleElement = new ChartCandleElement { FullTitle = "Candles" };
+			Chart.AddElement(_areaComb, _candleElement, series);

 			LoadData(_security);
 		}
@@ -176,7 +188,7 @@
 			_lastPrice = 0m;
 			_allCandles.Clear();

-			Chart.Reset(new IChartElement[] { _candleElement1 });
+			Chart.Reset(new IChartElement[] { _candleElement });

 			var storage = new StorageRegistry();

@@ -293,7 +305,14 @@
 				if (chartData == null)
 					chartData = new ChartDrawData();

-				chartData.Group(candle.OpenTime).Add(_candleElement1, candle);
+				var chartGroup = chartData.Group(candle.OpenTime);
+
+				chartGroup.Add(_candleElement, candle);
+
+				foreach (var pair in _indicators.CachedPairs)
+				{
+					chartGroup.Add(pair.Key, pair.Value.Process(candle));
+				}
 			}

 			if (chartData != null)


React to changes of DisplayLegalTargetSquares setting.

--- Sandra.UI.WF.Chess/StandardChessBoardForm.cs
+++ Sandra.UI.WF.Chess/StandardChessBoardForm.cs
@@ -169,6 +169,7 @@
             Program.LocalSettings.RegisterSettingsChangedHandler(SettingKeys.DarkSquareColor, DarkSquareColorChanged);
             Program.LocalSettings.RegisterSettingsChangedHandler(SettingKeys.LightSquareColor, LightSquareColorChanged);
             Program.LocalSettings.RegisterSettingsChangedHandler(SettingKeys.LastMoveArrowColor, LastMoveArrowColorChanged);
+            Program.LocalSettings.RegisterSettingsChangedHandler(SettingKeys.DisplayLegalTargetSquares, DisplayLegalTargetSquaresChanged);

             PlayingBoard.MouseMove += playingBoard_MouseMove;
             PlayingBoard.MouseEnterSquare += playingBoard_MouseEnterSquare;
@@ -216,6 +217,14 @@
             lastMoveArrowPen.Dispose();
             updateLastMoveArrowPen();
             PlayingBoard.Invalidate();
+        }
+
+        private void DisplayLegalTargetSquaresChanged(object sender, EventArgs e)
+        {
+            if (moveStatus != MoveStatus.None)
+            {
+                displayLegalTargetSquaresEffect();
+            }
         }

         private void playingBoard_MouseWheel(object sender, MouseEventArgs e)


ScadaWeb: fix menu selection

ScadaWeb: fix menu selection

--- ScadaWeb/ScadaWebShell5/MasterMain.Master.cs
+++ ScadaWeb/ScadaWebShell5/MasterMain.Master.cs
@@ -67,7 +67,7 @@
         protected string GenMainMenuHtml()
         {
             TreeViewRenderer.Options options = new TreeViewRenderer.Options() { ShowIcons = false };
-            return treeViewRenderer.GenerateHtml(userData.UserMenu.MenuItems, Request.Url.AbsolutePath, options);
+            return treeViewRenderer.GenerateHtml(userData.UserMenu.MenuItems, Request.Url.PathAndQuery, options);
         }

         /// <summary>


placed todos to indicate where changes for issue #152 should be placed

--- ScampApi/Controllers/GroupUsersController.cs
+++ ScampApi/Controllers/GroupUsersController.cs
@@ -99,6 +99,9 @@
             if (userList.Count() > 0) // user is already in the list
                 return new ObjectResult("designated user is already a member of specified group") { StatusCode = 400 };

+            //TODO: Issue #152
+            // check to make sure enough remains in the group allocation to allow add of user
+
             // create document updates
             await _groupRepository.AddUserToGroup(groupId, userId);

@@ -109,6 +112,9 @@
                 UnitsUsed = 0
             };
             await _volatileStorageController.AddUserBudgetState(newBudget);
+            //TODO: Issue #152
+            // update group budget allocation to reflect addition of new user
+

             // return list
             return new ObjectResult(null) { StatusCode = 200 };


发送缓存满时不抛异常，改interrupt掉，打日志

发送缓存满时不抛异常，改interrupt掉，打日志

--- BcpSession.cs
+++ BcpSession.cs
@@ -339,7 +339,8 @@
                         Debug.WriteLine("Before Unavailable enqueue: " + packQueue.Count());
                         if (packQueue.Count() >= Bcp.MaxOfflinePack)
                         {
-                            throw new BcpException.SendingQueueIsFull();
+                            Debug.WriteLine("Sending queue is full!");
+                            Interrupt();
                         }
                         else
                         {


Add a default Postman client registration to Mvc.Server

--- samples/Mvc.Server/Startup.cs
+++ samples/Mvc.Server/Startup.cs
@@ -132,6 +132,22 @@
                         Type = OpenIddictConstants.ApplicationTypes.Confidential
                     });

+                    // To test this sample with Postman, use the following settings:
+                    //
+                    // * Authorization URL: http://localhost:54540/connect/authorize
+                    // * Access token URL: http://localhost:54540/connect/token
+                    // * Client ID: postman
+                    // * Client secret: [blank] (not used with public clients)
+                    // * Scope: openid email profile roles
+                    // * Grant type: authorization code
+                    // * Request access token locally: yes
+                    context.Applications.Add(new Application {
+                        Id = "postman",
+                        DisplayName = "Postman",
+                        RedirectUri = "https://www.getpostman.com/oauth2/callback",
+                        Type = OpenIddictConstants.ApplicationTypes.Public
+                    });
+
                     context.SaveChanges();
                 }
             }


[ci skip] Updating ServerBuildInfo_Dynamic.cs

1.20.3821.20210128044506-master-cbadfc0

--- Source/ACE.Server/ServerBuildInfo_Dynamic.cs
+++ Source/ACE.Server/ServerBuildInfo_Dynamic.cs
@@ -4,17 +4,17 @@
     public static partial class ServerBuildInfo
     {
         public static string Branch = "master";
-        public static string Commit = "07e098354decced1ac9685816a44ad2112132325";
+        public static string Commit = "cbadfc086e254cf107a767eb384ef83e20c274a1";

         public static string Version = "1.20";
-        public static string Build   = "3820";
+        public static string Build   = "3821";

         public static int BuildYear   = 2021;
         public static int BuildMonth  = 01;
-        public static int BuildDay    = 27;
-        public static int BuildHour   = 18;
-        public static int BuildMinute = 14;
-        public static int BuildSecond = 14;
+        public static int BuildDay    = 28;
+        public static int BuildHour   = 04;
+        public static int BuildMinute = 45;
+        public static int BuildSecond = 06;
     }
 }


[ci skip] Updating ServerBuildInfo_Dynamic.cs

1.14.3731.20201102050039-master-a460125

--- Source/ACE.Server/ServerBuildInfo_Dynamic.cs
+++ Source/ACE.Server/ServerBuildInfo_Dynamic.cs
@@ -4,16 +4,16 @@
     public static partial class ServerBuildInfo
     {
         public static string Branch = "master";
-        public static string Commit = "3efdbda70809bcf7ec3ca9dd6ba0639455e4d1ea";
+        public static string Commit = "a460125738fca56b03b651ef32fc3c8a25dcbb3b";

         public static string Version = "1.14";
-        public static string Build   = "3730";
+        public static string Build   = "3731";

         public static int BuildYear   = 2020;
         public static int BuildMonth  = 11;
-        public static int BuildDay    = 01;
-        public static int BuildHour   = 18;
-        public static int BuildMinute = 28;
+        public static int BuildDay    = 02;
+        public static int BuildHour   = 05;
+        public static int BuildMinute = 00;
         public static int BuildSecond = 39;
     }
 }


format

format

--- Source/BetterManeuvering/ManeuverMainMenu.cs
+++ Source/BetterManeuvering/ManeuverMainMenu.cs
@@ -64,7 +64,6 @@
 			{
 				var button = buttons[buttons.Length - 1];

-
 				button.onClick.AddListener(new UnityAction(onSettingsApply));
 			}
 		}


- [SearchHelper] Changement de méthode pour la récupération de la result source. Ici on a seulement besoin de récupérer la source, pas de la créer si elle n'existe pas.

--- Source/GSoft.Dynamite/Search/SearchHelper.cs
+++ Source/GSoft.Dynamite/Search/SearchHelper.cs
@@ -808,9 +808,10 @@
         public ResultItemType EnsureResultType(SPSite site, ResultTypeInfo resultType)
         {
             ResultItemType resType = null;
-
+
+            var ssa = this.GetDefaultSearchServiceApplication(site);
             var searchOwner = new SearchObjectOwner(SearchObjectLevel.SPSite, site.RootWeb);
-            var resultSource = this.EnsureResultSource(site, resultType.ResultSource);
+            var resultSource = this.GetResultSourceByName(ssa, resultType.ResultSource.Name, resultType.ResultSource.Level, site.RootWeb);

             var resultTypeManager = new ResultItemTypeManager(this.GetDefaultSearchServiceApplication(site));
             var existingResultTypes = resultTypeManager.GetResultItemTypes(searchOwner, true);


Accessory: Add CanMount() static utility method

Implement a static CanMount() utility method the implements the standard
CanMount() functionality.

--- Source/Lizitt/Plugins/Outfitter/Accessory.cs
+++ Source/Lizitt/Plugins/Outfitter/Accessory.cs
@@ -76,6 +76,7 @@
         /// </remarks>
         public abstract MountPoint CurrentLocation { get; }

+        // TODO: Get rid of this method.  It is not worth the maintenance.
         /// <summary>
         /// True if the accessory is currently attached to the specified mount location.
         /// </summary>
@@ -408,6 +409,40 @@
         public abstract void RemoveObserver(IAccessoryObserver observer);

         #endregion
+
+        #region Utility Methods
+
+        /// <summary>
+        /// Determines if the mounter can mount the accessory to the specified location based on
+        /// the accessory's current state and without violating the coverage restrictions.
+        /// </summary>
+        /// <remarks>
+        /// <para>
+        /// This method implements the standard method for this check, including all appropriate null checks.
+        /// (E.g. If there is no accessory, it will return false.)
+        /// </para>
+        /// <para>
+        /// The coverage restrictions are violated if a successful mount will result in a coverage that overlaps
+        /// <paramref name="restrictions"/>.
+        /// </para>
+        /// </remarks>
+        /// <param name="accessory">The accessory. (Optional)</param>
+        /// <param name="mounter">The mounter. (Optional)</param>
+        /// <param name="locationType">The mount location type.</param>
+        /// <param name="restrictions">The body coverage restrictions.</param>
+        /// <returns>
+        /// True if accessory and mounter are non-null and the mounter can mount the accessory to the specified
+        /// location based on the accessory's current state and coverage restrictions.</returns>
+        public static bool CanMount(
+            Accessory accessory, AccessoryMounter mounter, MountPointType locationType, BodyCoverage restrictions)
+        {
+            if (accessory && mounter && (mounter.GetCoverageFor(locationType) & restrictions) == 0)
+                return mounter.CanMount(accessory, locationType);
+
+            return false;
+        }
+
+        #endregion
     }
 }


added Bug test

added Bug test

--- Source/Mosa.TestWorld.x86/Tests/OtherTest.cs
+++ Source/Mosa.TestWorld.x86/Tests/OtherTest.cs
@@ -8,6 +8,7 @@
  */

 using System.Collections.Generic;
+using System.Runtime.InteropServices;

 namespace Mosa.TestWorld.x86.Tests
 {
@@ -27,6 +28,7 @@
 			testMethods.AddLast(StructNotBoxed);
 			testMethods.AddLast(ForeachBreak);
 			testMethods.AddLast(ConditionalBug);
+			testMethods.AddLast(PointerBug);
 		}

 		private static uint StaticValue = 0x200000;
@@ -162,15 +164,50 @@

 		public static bool ConditionalBug()
 		{
-			uint address = 0x0B8050; //it's the display memory, but you can use any other adress, so far it's no critical area
-			Mosa.Platform.Internal.x86.Native.Set8(address, 81); //set ascii 'Q'
-			var num = Mosa.Platform.Internal.x86.Native.Get8(address); //get the 'Q' back
+			uint address = 0x1000;
+			Mosa.Platform.Internal.x86.Native.Set8(address, 81);
+			var num = Mosa.Platform.Internal.x86.Native.Get8(address);

 			if (num >= 32 && num < 128)
 				return true;
 			else
 				return false;
 		}
+
+		public static bool PointerBug()
+		{
+			return PointerBugClass.Test();
+		}
+
+		unsafe public static class PointerBugClass
+		{
+			private static uint pageDirectoryAddress = 0x1000;
+			private static PageDirectoryEntry* pageDirectoryEntries;
+
+			public static bool Test()
+			{
+				pageDirectoryEntries = (PageDirectoryEntry*)pageDirectoryAddress;
+				return GetItem(1);
+			}
+
+			internal static bool GetItem(uint index)
+			{
+				//increpmenting a pointer
+				var addr1 = (uint)(pageDirectoryEntries + index);
+
+				//increpmenting a UInt32
+				var addr2 = (uint)(pageDirectoryAddress + (index * 4));  //struct PageDirectoryEntry as a size of 4 bytes
+
+				return addr1 == addr2;
+			}
+
+			[StructLayout(LayoutKind.Explicit)]
+			unsafe public struct PageDirectoryEntry
+			{
+				[FieldOffset(0)]
+				private uint data;
+			}
+		}
 	}

 	public struct TestStruct


LineAnnotation: don't render text if null or empty

--- Source/OxyPlot/Annotations/LineAnnotation.cs
+++ Source/OxyPlot/Annotations/LineAnnotation.cs
@@ -327,7 +327,7 @@
             if (clippedPoints != null && GetPointAtRelativeDistance(clippedPoints, this.TextPosition, margin, out position, out angle))
             {
                 var cs = new CohenSutherlandClipping(clippingRectangle);
-                if (cs.IsInside(position))
+                if (!string.IsNullOrEmpty(this.Text) && cs.IsInside(position))
                 {
                     rc.DrawClippedText(
                         clippingRectangle,


Change the dog messages to Chinese

Change the dog messages to Chinese

--- Aeronet.Dog/AeronetDog.cs
+++ Aeronet.Dog/AeronetDog.cs
@@ -15,7 +15,7 @@
     {
         private static AeronetDog _default=new AeronetDog();

-        private StringCollection _stringCollection;
+        private Dictionary<int,string> _dogMsgs=new Dictionary<int, string>();

         // private SuperDog.Dog _dog;

@@ -26,129 +26,90 @@
             // next could be considered ugly.
             // build up a string collection holding
             // the status codes in a human readable manner.
-            string[] stringRange = new string[]
-            {
-                "Request successfully completed.",
-                "Request exceeds data file range.",
-                "",
-                "System is out of memory.",
-                "Too many open login sessions.",
-                "Access denied.",
-                "",
-                "Required SuperDog not found.",
-                "Encryption/decryption data length is too short.",
-                "Invalid input handle.",
-                "Specified File ID not recognized by API.",
-                "",
-                "",
-                "",
-                "",
-                "Invalid XML format.",
-                "",
-                "",
-                "SuperDog to be updated not found.",
-                "Required XML tags not found; Contents in binary data are missing or invalid.",
-                "Update not supported by SuperDog.",
-                "Update counter is set incorrectly.",
-                "Invalid Vendor Code passed.",
-                "",
-                "Passed time value is outside supported value range.",
-                "",
-                "Acknowledge data requested by the update, however the ack_data input parameter is NULL.",
-                "Program running on a terminal server.",
-                "",
-                "Unknown algorithm used in V2C file.",
-                "Signature verification failed.",
-                "Requested Feature not available.",
-                "",
-                "Communication error between API and local SuperDog License Manager.",
-                "Vendor Code not recognized by API.",
-                "Invalid XML specification.",
-                "Invalid XML scope.",
-                "Too many SuperDog currently connected.",
-                "",
-                "Session was interrupted.",
-                "",
-                "Feature has expired.",
-                "SuperDog License Manager version too old.",
-                "USB error occurred when communicating with a SuperDog.",
-                "",
-                "System time has been tampered.",
-                "Communication error occurred in secure channel.",
-                "",
-                "",
-                "",
-                "Unable to locate a Feature matching the scope.",
-                "",
-                "",
-                "",
-                "Trying to install a V2C file with an update counter that is out" +
-                "of sequence with the update counter in the SuperDog." +
-                "The values of the update counter in the file are lower than" +
-                "those in the SuperDog.",
-                "Trying to install a V2C file with an update counter that is out" +
-                "of sequence with the update counter in the SuperDog." +
-                "The first value of the update counter in the file is greater than" +
-                "the value in the SuperDog."
-            };
-
-             _stringCollection = new StringCollection();
-            _stringCollection.AddRange(stringRange);
-
-            for (int n = _stringCollection.Count; n < 400; n++)
-            {
-                _stringCollection.Insert(n, "");
-            }
-
-            stringRange = new string[]
-            {
-                "A required API dynamic library was not found.",
-                "The found and assigned API dynamic library could not be verified.",
-            };
-
-            _stringCollection.AddRange(stringRange);
-
-            for (int n = _stringCollection.Count; n < 500; n++)
-            {
-                _stringCollection.Insert(n, "");
-            }
-
-            stringRange = new string[]
-            {
-                "Object incorrectly initialized.",
-                "A parameter is invalid.",
-                "Already logged in.",
-                "Already logged out."
-            };
-
-            _stringCollection.AddRange(stringRange);
-
-            for (int n = _stringCollection.Count; n < 525; n++)
-            {
-                _stringCollection.Insert(n, "");
-            }
-
-            _stringCollection.Insert(525, "Incorrect use of system or platform.");
-
-            for (int n = _stringCollection.Count; n < 698; n++)
-            {
-                _stringCollection.Insert(n, "");
-            }
-
-            _stringCollection.Insert(698, "Capability is not available.");
-            _stringCollection.Insert(699, "Internal API error.");
-
-            // this._dog = new SuperDog.Dog(DogFeature.Default);
+            _dogMsgs.Add(0, "请求成功");//0|"Request successfully completed."
+            _dogMsgs.Add(1, "请求超出数据文件的范围");//1|"Request exceeds data file range."
+            _dogMsgs.Add(3, "系统内存不足");//3|"System is out of memory."
+            _dogMsgs.Add(4, "打开的登录会话数目过多");//0|"Too many open login sessions."
+            _dogMsgs.Add(5, "禁止访问");//5|"Access denied."
+            _dogMsgs.Add(7, "未找到超级狗");//7|"Required SuperDog not found."
+            _dogMsgs.Add(8, "加密/解密的数据长度太短");//8|"Encryption/decryption data length is too short."
+            _dogMsgs.Add(9, "无效的文件句柄");//9|"Invalid input handle."
+            _dogMsgs.Add(10, "无法识别的文件");//10|"Specified File ID not recognized by API."
+            _dogMsgs.Add(15, "无效的XML格式");//15|"Invalid XML format."
+            _dogMsgs.Add(16, "不支持所请求的功能");
+            _dogMsgs.Add(17, "不正确的升级文件");
+            _dogMsgs.Add(18, "未找到指定的超级狗");//18|"SuperDog to be updated not found."
+            _dogMsgs.Add(19, "未找到所需的XML标记");//19|"Required XML tags not found; Contents in binary data are missing or invalid."
+            _dogMsgs.Add(20, "超级狗不支持的升级请求");//20|"Update not supported by SuperDog."
+            _dogMsgs.Add(21, "升级计数器设置不正确");//21|"Update counter is set incorrectly."
+            _dogMsgs.Add(22, "开发商代码不正确");//22|"Invalid Vendor Code passed."
+            _dogMsgs.Add(24, "输入的时间值超出支持的范围");//24|"Passed time value is outside supported value range."
+            _dogMsgs.Add(26, "升级要求回执数据，但输入的接收参数为空");//26|"Acknowledge data requested by the update, however the ack_data input parameter is NULL."
+            _dogMsgs.Add(27, "检测到程序在终端服务器上运行");//27|"Program running on a terminal server."
+            _dogMsgs.Add(29, "不支持的算法");//29|"Unknown algorithm used in V2C file."
+            _dogMsgs.Add(30, "签名验证失败");//30|"Signature verification failed."
+            _dogMsgs.Add(31, "未找到特征");//31|"Requested Feature not available."
+            _dogMsgs.Add(33, "和超级狗运行环境通讯错误");//33|"Communication error between API and local SuperDog License Manager."
+            _dogMsgs.Add(34, "无法识别的开发商代码");//34|"Vendor Code not recognized by API."
+            _dogMsgs.Add(35, "无效的XML格式");//35|"Invalid XML specification."
+            _dogMsgs.Add(36, "无效的XML范围");//36|"Invalid XML scope."
+            _dogMsgs.Add(37, "当前连接的超级狗数目过多");//37|"Too many SuperDog currently connected."
+            _dogMsgs.Add(39, "会话被中断");//39|"Session was interrupted."
+            _dogMsgs.Add(41, "特征已失效");//41|"Feature has expired."
+            _dogMsgs.Add(42, "超级狗的运行环境版本太低");//42|"SuperDog License Manager version too old."
+            _dogMsgs.Add(43, "与超级狗通讯过程中出现USB错误");//43|"USB error occurred when communicating with a SuperDog."
+            _dogMsgs.Add(45, "检测到系统时钟被篡改");//45|"System time has been tampered."
+            _dogMsgs.Add(46, "安全通道中发生了错误");//46|"Communication error occurred in secure channel."
+            _dogMsgs.Add(47, "超级狗软许可存储区损坏");
+            _dogMsgs.Add(50, "未找到与范围匹配的特征");//50|"Unable to locate a Feature matching the scope."
+            _dogMsgs.Add(52, "超级狗软许可与此硬件不兼容");
+            _dogMsgs.Add(54, "升级文件太旧，此升级文件已经安装过");
+            //54|"Trying to install a V2C file with an update counter that is out" +
+            //54|"of sequence with the update counter in the SuperDog." +
+            //54|"The values of the update counter in the file are lower than" +
+            //54|"those in the SuperDog.",
+            _dogMsgs.Add(55, "升级文件太新，必须先安装其它的升级文件");
+            //55|"Trying to install a V2C file with an update counter that is out" +
+            //55|"of sequence with the update counter in the SuperDog." +
+            //55|"The first value of the update counter in the file is greater than" +
+            //55|"the value in the SuperDog."
+            _dogMsgs.Add(64, "检测到克隆的超级狗软许可");
+            _dogMsgs.Add(65, "此升级文件已经应用过，不能再次应用");
+            _dogMsgs.Add(78, "安全存储ID不匹配");
+            _dogMsgs.Add(400, "没有找到供应商提供的API类库");//402|A required API dynamic library was not found.
+            _dogMsgs.Add(401, "供应商提供的API类库不能通过校验");//401|The found and assigned API dynamic library could not be verified.
+            _dogMsgs.Add(500, "对象没有正确初始化");//500|Object incorrectly initialized.
+            _dogMsgs.Add(501, "一个无效的参数");//501|A parameter is invalid.
+            _dogMsgs.Add(502, "重复登入");//502|Already logged in.
+            _dogMsgs.Add(503, "重复登出");//502|Already logged in.
+            _dogMsgs.Add(525, "不支持该系统版本");//525|Incorrect use of system or platform.
+            _dogMsgs.Add(698, "不支持所请求的功能");//698|"Capability is not available."
+            _dogMsgs.Add(699, "API发生内部错误");//699|"Internal API error."
+            // windows
+            _dogMsgs.Add(1001, "可执行文件不正确");
+            _dogMsgs.Add(1002, "系统内存不足");
+            _dogMsgs.Add(1003, "发生内部错误");
+            _dogMsgs.Add(1004, "解密失败");
+            _dogMsgs.Add(1019, "不支持的操作系统");
+            _dogMsgs.Add(1030, "检测到调试器");
+            _dogMsgs.Add(1031, "未找到超级狗");
+            _dogMsgs.Add(1032, "发生未知错误");
+
             this._logger=Logger.CreateNew("dog");
         }

         public static AeronetDog Default { get { return _default;} }

-        public string GetStatus(int status)
+        public string GetStatus(DogStatus status)
         {
             try
             {
-                return this._stringCollection[status];
+                int key = (int) status;
+
+                if (this._dogMsgs.ContainsKey(key))
+                    return string.Format("{0} :: {1}", this._dogMsgs[(int) status], status);
+                else
+                    return status.ToString();
             }
             catch (Exception)
             {
@@ -207,7 +168,7 @@
                     DogStatus status = dog.Login(VendorCode, scope);
                     if (status != DogStatus.StatusOk)
                     {
-                        isActived = new MethodResult(false, this.GetStatus((int)status));
+                        isActived = new MethodResult(false, this.GetStatus(status));
                         LogError(string.Format("Is dog active? {0}", isActived));
                     }
                 }


* Fixed StartBoundary problem in CalendarTriggerUI

--- TaskEditor/UIComponents/CalendarTriggerUI.cs
+++ TaskEditor/UIComponents/CalendarTriggerUI.cs
@@ -158,6 +158,8 @@
 					(newT = new MonthlyTrigger()).CopyProperties(this.Trigger);
 				else
 					(newT = new MonthlyDOWTrigger()).CopyProperties(this.Trigger);
+				if (this.Trigger == null)
+					newT.StartBoundary = schedStartDatePicker.Value;
 				monthlyTriggerUI1.Trigger = newT;
 				schedTabControl.SelectedTab = monthlyTab;
 				OnTriggerTypeChanged();
@@ -180,6 +182,7 @@
 		{
 			if (((RadioButton)sender).Checked)
 			{
+				bool nullTrigger = this.Trigger == null;
 				if (sender == schedOneRadio)
 				{
 					if (!onAssignment)
@@ -202,6 +205,8 @@
 				{
 					monthlyTriggerUI1_TriggerTypeChanged(this, EventArgs.Empty);
 				}
+				if (nullTrigger)
+					this.Trigger.StartBoundary = schedStartDatePicker.Value;
 				if (!onAssignment && sender != schedMonthlyRadio)
 					OnTriggerTypeChanged();
 			}


clean up observeParameters

clean up observeParameters

--- Templates/Full/game/art/datablocks/player.cs
+++ Templates/Full/game/art/datablocks/player.cs
@@ -649,7 +649,6 @@

    //exitingWater         = ExitingWaterLightSound;

-   observeParameters = "0.5 4.5 4.5";

    cameraMinDist = "0";
    DecalData = "PlayerFootprint";


Refactoring MagicEffectsEngine to allow short-term/long term casting of some spells.

--- Trunk/GameEngine/Magic/MagicEffectsEngine.cs
+++ Trunk/GameEngine/Magic/MagicEffectsEngine.cs
@@ -26,7 +26,7 @@
             if (caster.CurrentMP >= spell.Cost)
             {
                 string effectString = string.Format("{0} casts {1}.", caster.Name, spell.Name);
-                if (DoEffect(caster, spell, spell.EffectType, caster.SpellStrength(spell.School), target, effectString, caster.CurrentMP - spell.Cost))
+                if (DoEffect(caster, spell, spell.EffectType, caster.SpellStrength(spell.School), true, target, effectString, caster.CurrentMP - spell.Cost))
                 {
                     caster.SpendMP(spell.Cost);
                     return true;
@@ -38,7 +38,7 @@
         internal void UseItemWithEffect(Character invoker, ItemWithEffects item, Point targetedPoint)
         {
             string effectString = string.Format(item.OnUseString, invoker.Name, item.Name);
-            DoEffect(invoker, item, item.Spell.EffectType, item.Strength, targetedPoint, effectString, -1);
+            DoEffect(invoker, item, item.Spell.EffectType, item.Strength, false, targetedPoint, effectString, -1);
             return;
         }

@@ -77,7 +77,7 @@

         // mpTotalAfterSpellCastIfApplicable is a hack, used to not cast spells that have sustaining costs you can't sustain.
         // DoEffect needs to be refactored, and callers should be able to ask if there will be a sustaining cost pre-cast
-        private bool DoEffect(Character invoker, object invokingMethod, string effectName, int strength, Point target, string printOnEffect, int mpTotalAfterSpellCastIfApplicable)
+        private bool DoEffect(Character invoker, object invokingMethod, string effectName, int strength, bool couldBeLongTerm, Point target, string printOnEffect, int mpTotalAfterSpellCastIfApplicable)
         {
             switch (effectName)
             {
@@ -160,6 +160,69 @@
                 case "Light":
                 case "Earthen Armor":
                 {
+                    bool successAddingEffect = AddEffectToTarget(effectName, invoker, strength, couldBeLongTerm, target, mpTotalAfterSpellCastIfApplicable);
+                    if (successAddingEffect)
+                        CoreGameEngine.Instance.SendTextOutput(printOnEffect);
+                    return successAddingEffect;
+                }
+                case "Poison Bolt":
+                {
+                    CoreGameEngine.Instance.SendTextOutput(printOnEffect);
+                    m_combatEngine.RangedBoltToLocation(invoker, target, 1, invokingMethod, DamageDoneDelegate);
+                    AddEffectToTarget("Poison", invoker, strength, false, target, mpTotalAfterSpellCastIfApplicable);
+                    return true;
+                }
+                case "Slow":
+                {
+                    CoreGameEngine.Instance.SendTextOutput(printOnEffect);
+                    return AddEffectToTarget("Slow", invoker, strength, false, target, mpTotalAfterSpellCastIfApplicable);
+                }
+                case "Blink":
+                {
+                    CoreGameEngine.Instance.SendTextOutput(printOnEffect);
+                    return HandleRandomTeleport(invoker, 5);
+                }
+                case "Teleport":
+                {
+                    CoreGameEngine.Instance.SendTextOutput(printOnEffect);
+                    return HandleRandomTeleport(invoker, 25);
+                }
+                default:
+                    throw new InvalidOperationException("MagicEffectsEngine::DoEffect - don't know how to do: " + effectName);
+            }
+        }
+
+        private void ShowExplodingRangedPointAttack(Character invoker, object invokingMethod, Point target, int burstWidth)
+        {
+            List<Point> pointsInBallPath = RangedAttackPathfinder.RangedListOfPoints(CoreGameEngine.Instance.Map, invoker.Position, target, false, false);
+
+            List<List<Point>> pointsInExplosion = new List<List<Point>>();
+            for (int i = 1; i <= burstWidth; ++i)
+            {
+                List<Point> explosionRing = PointListUtils.PointListFromBurstPosition(target, i);
+                CoreGameEngine.Instance.FilterNotTargetablePointsFromList(explosionRing, invoker.Position, invoker.Vision, true);
+                CoreGameEngine.Instance.FilterNotVisibleBothWaysFromList(invoker.Position, explosionRing, invoker.Position);
+                pointsInExplosion.Add(explosionRing);
+            }
+
+            var pathData = new Pair<List<Point>, List<List<Point>>>(pointsInBallPath, pointsInExplosion);
+            CoreGameEngine.Instance.ShowRangedAttack(invokingMethod, ShowRangedAttackType.RangedExplodingPoint, pathData, false);
+        }
+
+        private static void ShowConeAttack(Character invoker, object invokingMethod, List<Point> pointsInConeAttack)
+        {
+            List<Point> coneBlastList = new List<Point>(pointsInConeAttack);
+            CoreGameEngine.Instance.FilterNotTargetablePointsFromList(coneBlastList, invoker.Position, invoker.Vision, true);
+            CoreGameEngine.Instance.ShowRangedAttack(invokingMethod, ShowRangedAttackType.Cone, coneBlastList, false);
+        }
+
+        private bool AddEffectToTarget(string effectName, Character invoker, int strength, bool longTerm, Point target, int mpTotalAfterSpellCastIfApplicable)
+        {
+            Character targetCharacter = m_combatEngine.FindTargetAtPosition(target);
+            if (targetCharacter != null)
+            {
+                if (longTerm)
+                {
                     StatusEffect previousEffect = invoker.Effects.FirstOrDefault(x => x.Name == effectName);
                     if (previousEffect == null)
                     {
@@ -167,14 +230,13 @@
                         Player invokerAsPlayer = invoker as Player;
                         if (invokerAsPlayer != null)
                         {
-                            if(effect.MPCost > mpTotalAfterSpellCastIfApplicable && mpTotalAfterSpellCastIfApplicable != -1)
+                            if (effect.MPCost > mpTotalAfterSpellCastIfApplicable && mpTotalAfterSpellCastIfApplicable != -1)
                             {
                                 CoreGameEngine.Instance.SendTextOutput(string.Format("Cannot cast {0} as {1} does not have the energy to sustain it.", effectName, invoker.Name));
                                 return false;
                             }
                         }
                         // Check here if mp will bring us under 0 since mp cost of spell hasn't hit yet...
-                        CoreGameEngine.Instance.SendTextOutput(printOnEffect);
                         invoker.AddEffect(effect);
                         return true;
                     }
@@ -184,63 +246,13 @@
                         return false;
                     }
                 }
-                case "Poison Bolt":
-                {
-                    CoreGameEngine.Instance.SendTextOutput(printOnEffect);
-                    m_combatEngine.RangedBoltToLocation(invoker, target, 1, invokingMethod, DamageDoneDelegate);
-                    AddAffactToTarget("Poison", invoker, strength, false, target);
-                    return true;
-                }
-                case "Blink":
-                {
-                    CoreGameEngine.Instance.SendTextOutput(printOnEffect);
-                    return HandleRandomTeleport(invoker, 5);
-                }
-                case "Teleport":
-                {
-                    CoreGameEngine.Instance.SendTextOutput(printOnEffect);
-                    return HandleRandomTeleport(invoker, 25);
-                }
-                case "Slow":
-                {
-                    CoreGameEngine.Instance.SendTextOutput(printOnEffect);
-                    AddAffactToTarget("Slow", invoker, strength, false, target);
-                    return true;
-                }
-                default:
-                    throw new InvalidOperationException("MagicEffectsEngine::DoEffect - don't know how to do: " + effectName);
-            }
-        }
-
-        private void ShowExplodingRangedPointAttack(Character invoker, object invokingMethod, Point target, int burstWidth)
-        {
-            List<Point> pointsInBallPath = RangedAttackPathfinder.RangedListOfPoints(CoreGameEngine.Instance.Map, invoker.Position, target, false, false);
-
-            List<List<Point>> pointsInExplosion = new List<List<Point>>();
-            for (int i = 1; i <= burstWidth; ++i)
-            {
-                List<Point> explosionRing = PointListUtils.PointListFromBurstPosition(target, i);
-                CoreGameEngine.Instance.FilterNotTargetablePointsFromList(explosionRing, invoker.Position, invoker.Vision, true);
-                CoreGameEngine.Instance.FilterNotVisibleBothWaysFromList(invoker.Position, explosionRing, invoker.Position);
-                pointsInExplosion.Add(explosionRing);
-            }
-
-            var pathData = new Pair<List<Point>, List<List<Point>>>(pointsInBallPath, pointsInExplosion);
-            CoreGameEngine.Instance.ShowRangedAttack(invokingMethod, ShowRangedAttackType.RangedExplodingPoint, pathData, false);
-        }
-
-        private static void ShowConeAttack(Character invoker, object invokingMethod, List<Point> pointsInConeAttack)
-        {
-            List<Point> coneBlastList = new List<Point>(pointsInConeAttack);
-            CoreGameEngine.Instance.FilterNotTargetablePointsFromList(coneBlastList, invoker.Position, invoker.Vision, true);
-            CoreGameEngine.Instance.ShowRangedAttack(invokingMethod, ShowRangedAttackType.Cone, coneBlastList, false);
-        }
-
-        private void AddAffactToTarget(string name, Character caster, int strength, bool longTerm, Point target)
-        {
-            Character targetCharacter = m_combatEngine.FindTargetAtPosition(target);
-            if (targetCharacter != null)
-                targetCharacter.AddEffect(Effects.EffectFactory.CreateEffect(caster, name, longTerm, strength));
+                else
+                {
+                    targetCharacter.AddEffect(Effects.EffectFactory.CreateEffect(invoker, effectName, longTerm, strength));
+                    return true;
+                }
+            }
+            return false;
         }

         private static int CalculateDamgeFromSpell(int strength)


Fix for multi-line helpers

Fix for multi-line helpers

--- Veil/Src/Veil/Parser/SyntaxTreeExpression.cs
+++ Veil/Src/Veil/Parser/SyntaxTreeExpression.cs
@@ -143,7 +143,7 @@

 		public static HelperExpressionNode Helper(string expression, IHelperHandler helperHandler, SourceLocation location)
 		{
-			var parts = expression.Split(new[] { ' ' }, StringSplitOptions.RemoveEmptyEntries);
+			var parts = expression.Split(new[] { ' ', '\t', '\n', '\r' }, StringSplitOptions.RemoveEmptyEntries);
 			return Helper(parts, helperHandler, location);
 		}

@@ -156,7 +156,7 @@
 				foreach (var value in parameter.Skip(1))
 				{
 					var tmp = value.Split(new[] {'='}, 2);
-					data.Add(Trim(tmp[0]), tmp.Length == 2 ? tmp[1] : string.Empty);
+					data.Add(tmp[0], tmp.Length == 2 ? tmp[1] : string.Empty);
 				}
 			}

@@ -168,15 +168,5 @@
                 HelperHandler = helperHandler
 			};
 		}
-
-	    private static string Trim(string token)
-	    {
-	        if (string.IsNullOrEmpty(token))
-	        {
-	            return token;
-	        }
-
-	        return token.Trim('\t', '\n', '\r');
-	    }
 	}
 }


少し修正しました。

少し修正しました。

--- VoteServer/VoteStrategy/ShogiVoteStrategy.cs
+++ VoteServer/VoteStrategy/ShogiVoteStrategy.cs
@@ -541,14 +541,13 @@
                 return move;
             }

-            // 現局面から指せるかどうか調べます。
+            // 一度、指し手の正規化を行います（打を消したり、左を追加するなど）
             var bm = this.board.ConvertMove(move, true);
-            if (bm == null)
+            if (bm == null /*|| !this.board.CanMove(bm)*/)
             {
                 return null;
             }

-            // 指し手の正規化を行います（打を消したり、左を追加するなど）
             var newMove = this.board.ConvertMove(bm, false);
             if (newMove == null)
             {


Readonly and renaming

Readonly and renaming

--- AngleSharp/DefaultInfo.cs
+++ AngleSharp/DefaultInfo.cs
@@ -10,8 +10,8 @@
     {
         #region Fields

-        String version;
-        String agent;
+        readonly String _version;
+        readonly String _agent;

         #endregion

@@ -19,8 +19,8 @@

         public DefaultInfo()
         {
-            version = typeof(DefaultInfo).GetTypeInfo().Assembly.GetCustomAttribute<AssemblyFileVersionAttribute>().Version;
-            agent = "AngleSharp/" + version;
+            _version = typeof(DefaultInfo).GetTypeInfo().Assembly.GetCustomAttribute<AssemblyFileVersionAttribute>().Version;
+            _agent = "AngleSharp/" + _version;
         }

         #endregion
@@ -32,7 +32,7 @@
         /// </summary>
         public String Version
         {
-            get { return version; }
+            get { return _version; }
         }

         /// <summary>
@@ -40,7 +40,7 @@
         /// </summary>
         public String Agent
         {
-            get { return agent; }
+            get { return _agent; }
         }

         #endregion


Fixed bug with moved torrents

Fixed bug with moved torrents

--- Patchy/MainWindow.Logic.cs
+++ Patchy/MainWindow.Logic.cs
@@ -128,12 +128,17 @@
                             {
                                 torrent.Torrent.Stop();
                                 while (torrent.Torrent.State != TorrentState.Stopped) ;
+                                var oldPath = torrent.Torrent.SavePath;
                                 var path = Path.Combine(SettingsManager.PostCompletionDestination,
                                     Path.GetFileName(torrent.Torrent.SavePath));
                                 if (!Directory.Exists(path))
                                     Directory.CreateDirectory(path);
                                 torrent.Torrent.MoveFiles(path, true);
                                 torrent.Torrent.Start();
+                                Directory.Delete(oldPath, true);
+                                var cache = Path.Combine(SettingsManager.TorrentCachePath, Path.GetFileName(oldPath));
+                                File.WriteAllText(Path.Combine(Path.GetDirectoryName(cache),
+                                    Path.GetFileNameWithoutExtension(cache)) + ".info", path);
                             });
                     }
                 }


Inheriting IProjectBinding instead of DotNetProjectBinding hopefully AddIn build will pass

--- MonoDevelop.MicroFramework/MicroFrameworkProjectBinding.cs
+++ MonoDevelop.MicroFramework/MicroFrameworkProjectBinding.cs
@@ -1,19 +1,47 @@
 using System;
 using MonoDevelop.Projects;
 using System.Xml;
+using System.IO;

 namespace MonoDevelop.MicroFramework
 {
-	public class MicroFrameworkProjectBinding : DotNetProjectBinding
+	public class MicroFrameworkProjectBinding : IProjectBinding
 	{
-		public override string Name
+		public string Name
 		{
 			get { return ".NETMicroFramework"; }
 		}

-		protected override DotNetProject CreateProject(string languageName, ProjectCreateInformation info, XmlElement projectOptions)
+		public Project CreateProject (ProjectCreateInformation info, XmlElement projectOptions)
+		{
+			string lang = projectOptions.GetAttribute ("language");
+			return CreateProject (lang, info, projectOptions);
+		}
+
+		protected DotNetProject CreateProject (string languageName, ProjectCreateInformation info, XmlElement projectOptions)
 		{
 			return new MicroFrameworkProject(languageName, info, projectOptions);
+		}
+
+		public Project CreateSingleFileProject (string file)
+		{
+			IDotNetLanguageBinding binding = LanguageBindingService.GetBindingPerFileName (file) as IDotNetLanguageBinding;
+			if (binding != null) {
+				ProjectCreateInformation info = new ProjectCreateInformation ();
+				info.ProjectName = Path.GetFileNameWithoutExtension (file);
+				info.SolutionPath = Path.GetDirectoryName (file);
+				info.ProjectBasePath = Path.GetDirectoryName (file);
+				Project project = CreateProject (binding.Language, info, null);
+				project.Files.Add (new ProjectFile (file));
+				return project;
+			}
+			return null;
+		}
+
+		public bool CanCreateSingleFileProject (string file)
+		{
+			IDotNetLanguageBinding binding = LanguageBindingService.GetBindingPerFileName (file) as IDotNetLanguageBinding;
+			return binding != null;
 		}
 	}
 }


Handle input again.

Handle input again.

--- Perspex.Controls/Window.cs
+++ Perspex.Controls/Window.cs
@@ -9,6 +9,7 @@
     using System;
     using System.Reactive.Linq;
     using Perspex.Input;
+    using Perspex.Input.Raw;
     using Perspex.Layout;
     using Perspex.Media;
     using Perspex.Platform;
@@ -64,6 +65,7 @@
             this.impl.SetOwner(this);
             this.impl.Activated += this.HandleActivated;
             this.impl.Closed += this.HandleClosed;
+            this.impl.Input += this.HandleInput;

             Size clientSize = this.ClientSize = this.impl.ClientSize;
             this.dispatcher = Dispatcher.UIThread;
@@ -127,6 +129,11 @@
             }
         }

+        private void HandleInput(object sender, RawInputEventArgs e)
+        {
+            this.inputManager.Process(e);
+        }
+
         private void HandleLayoutNeeded()
         {
             this.dispatcher.InvokeAsync(this.LayoutPass, DispatcherPriority.Render);


Make add-in repo name translatable

Make add-in repo name translatable

--- Pinta/AddinSetupService.cs
+++ Pinta/AddinSetupService.cs
@@ -27,6 +27,7 @@
 using Mono.Addins;
 using Mono.Addins.Setup;
 using Pinta.Core;
+using Mono.Unix;

 namespace Pinta
 {
@@ -47,7 +48,7 @@
 			string url = GetPlatformRepositoryUrl ();
 			if (!Repositories.ContainsRepository (url)) {
 				var rep = Repositories.RegisterRepository (null, url, false);
-				rep.Name = "Pinta Platform Dependent Add-in Repository";
+				rep.Name = Catalog.GetString ("Pinta Platform Dependent Add-in Repository");
 				if (!enable)
 					Repositories.SetRepositoryEnabled (url, false);
 			}
@@ -55,7 +56,7 @@
 			url = GetAllRepositoryUrl ();
 			if (!Repositories.ContainsRepository (url)) {
 				var rep2 = Repositories.RegisterRepository (null, url, false);
-				rep2.Name = "Pinta Platform Independent Add-in Repository";
+				rep2.Name = Catalog.GetString ("Pinta Platform Independent Add-in Repository");
 				if (!enable)
 					Repositories.SetRepositoryEnabled (url, false);
 			}


Vastly improve IK tool

Vastly improve IK tool

--- PlayClubStudioVR/IKTool.cs
+++ PlayClubStudioVR/IKTool.cs
@@ -12,8 +12,85 @@

 namespace PlayClubStudioVR
 {
+    static class IKCtrl
+    {
+        private static bool _Ik = true;
+
+
+        internal static void Change(bool state)
+        {
+            foreach (var actor in VR.Interpreter.Actors.OfType<StudioActor>())
+            {
+                bool ikState = state && _Ik;
+                bool fkState = state && !_Ik;
+
+                //if (ikState)
+                //{
+                //    actor.Actor.ikCtrl.SetActive(ikState);
+                //}
+                //if(fkState) {
+                //    actor.Actor.fkCtrl.SetActive(fkState);
+                //}
+
+                //actor.Actor.ikCtrl.SetActiveTargets(ikState);
+                //actor.Actor.fkCtrl.SetActiveTargets(fkState);
+
+                //if(ikState)
+                //{
+                //    actor.Actor.ikCtrl.SetupIK();
+                //}
+                //if(fkState)
+                //{
+                //    actor.Actor.fkCtrl.SetupFK();
+                //}
+
+                bool isActive = actor.Actor.fkCtrl.IsActive;
+
+                if (state)
+                {
+                    actor.Actor.ikCtrl.SetActive(ikState);
+                    actor.Actor.fkCtrl.SetActive(state);
+                }
+
+                actor.Actor.ikCtrl.SetActiveTargets(ikState);
+                actor.Actor.fkCtrl.SetActiveTargets(fkState);
+
+                if (ikState)
+                {
+                    actor.Actor.ikCtrl.SetupIK();
+                    if (!isActive)
+                    {
+                        actor.Actor.fkCtrl.SetupFK();
+                    }
+                }
+                else if (fkState)
+                {
+                    actor.Actor.fkCtrl.SetupFK();
+                }
+
+            }
+        }
+
+        internal static void Enable()
+        {
+            Change(true);
+        }
+
+        internal static void Disable()
+        {
+            Change(false);
+        }
+
+        internal static void Toggle()
+        {
+            _Ik = !_Ik;
+            Change(true);
+        }
+    }
     class IKTool : Tool
     {
+        private const float MAX_DISTANCE = 0.5f;
+
         private static string[] BLACKLIST = new string[] { "XY", "YZ", "XZ", "RingGuidZ", "RingGuidX", "RingGuidY" };
         private readonly static int GIZMO_LAYER = LayerMask.NameToLayer("DriveUI");
         private bool _Dragging = false;
@@ -47,8 +124,18 @@
         {
             base.OnDisable();
             Owner.StopRumble(_Rumble);
-        }
-
+
+            if(!(Owner.Other.ActiveTool is IKTool))
+            {
+                IKCtrl.Disable();
+            }
+        }
+
+        protected override void OnEnable()
+        {
+            base.OnEnable();
+            IKCtrl.Enable();
+        }
         protected override void OnFixedUpdate()
         {
             base.OnFixedUpdate();
@@ -85,13 +172,24 @@
                         Owner.StopRumble(_Rumble);
                     }
                 }
+                if(device.GetPressDown(EVRButtonId.k_EButton_SteamVR_Touchpad))
+                {
+                    IKCtrl.Toggle();
+                }
             }
         }

         private GameObject FindNearestHandle()
         {
             var nearest = GameObject.FindObjectsOfType<GuideDrive>().OrderBy(g => Vector3.Distance(g.transform.position, transform.position)).FirstOrDefault();
-            return nearest ? nearest.gameObject : null;
+            if(nearest)
+            {
+                if (Vector3.Distance(nearest.transform.position, transform.position) <= MAX_DISTANCE)
+                {
+                    return nearest.gameObject;
+                }
+            }
+            return null;
         }

         //public void OnTriggerEnter(Collider other)


new descriptions for the viruses

new descriptions for the viruses

--- ParticleStormControl/ParticleStormControl/InGame/Player.cs
+++ ParticleStormControl/ParticleStormControl/InGame/Player.cs
@@ -28,10 +28,23 @@

         public readonly static VirusType[] Viruses = { VirusType.H5N1, VirusType.HEPATITISB, VirusType.HIV, VirusType.EPSTEINBARR };
         public readonly static string[] VirusNames = { "Influenza A", "Hepatitis B", "Human immunodeficiency", "Epstein-Barr" };
-        public readonly static string[] VirusDescriptions = { "causes influenza in birds and some mammals, and is the only species of influenzavirus A.",
-                                                               "is a species of the genus Orthohepadnavirus, which is likewise a part of the Hepadnaviridae family of viruses.",
-                                                               "is a lentivirus (slowly replicating retrovirus) that causes acquired immunodeficiency syndrome (AIDS).",
-                                                               "best known as the cause of infectious mononucleosis (glandular fever). It is also associated with particular forms of cancer, such as Hodgkin's lymphoma, Burkitt's lymphoma, " };
+        public readonly static string[] VirusAdditionalInfo = { "It is a highly contagious virus which is a potantial pandemic threat.",
+                                                               "Can also lead to cirrhosis and hepatocellular carcinoma.",
+                                                               "Infection with HIV occurs by the transfer of blood, semen, vaginal fluid, pre-ejaculate, or breast milk.",
+                                                               "It is one of the most common viruses in humans." };
+        public readonly static string[] VirusClassification = { "Group V; Genus A; Family of Orthomyxoviridae",
+                                                                  "Goup VII; Genus Orthohepadnavirus; Family of Hepadnaviridae",
+                                                                  "Group VI; Genus Lentivirus; Family of Retroviridae",
+                                                                  "Group I; Genus of Lymphocryptovirus; Family of" };
+        public readonly static string[] VirusShortName = { "H5N1",
+                                                             "HBV",
+                                                             "HIV",
+                                                             "EBV" };
+        public readonly static string[] VirusCausedDisease = { "avian influenza (bird flu)",
+                                                                 "hepatitis B",
+                                                                 "acquired immunodeficiency syndrome (AIDS)",
+                                                                 "Implicated in several diseases that include infectious mononucleosis, multiple sclerosis and Hodgkin lymphoma." };
+
         private int virusIndex;
         public int VirusIndex
         {


Refactor

Refactor

--- Wpf3DSample/DiceRotationWpf/MainViewModel.cs
+++ Wpf3DSample/DiceRotationWpf/MainViewModel.cs
@@ -7,21 +7,21 @@
 {
     public class MainViewModel
     {
-        public Transform3D CubeTransform { get; private set; }
+        public Transform3D CubeTransform { get; }

         MatrixTransform3D matrixTransform = new MatrixTransform3D();

         public MainViewModel()
         {
-            InitializeCube();
+            CubeTransform = InitializeCubeTransform();
         }

-        void InitializeCube()
+        Transform3D InitializeCubeTransform()
         {
             var transform = new Transform3DGroup();
             transform.Children.Add(matrixTransform);
             transform.Children.Add(new RotateTransform3D(new AxisAngleRotation3D(new Vector3D(0.6, 0.3, 0.7), -70)));
-            CubeTransform = transform;
+            return transform;
         }
     }
 }


Refactor output for Lunar Example.

Refactor output for Lunar Example.

--- ConsoleExamples/Examples/Lunar/LanderSimulator.cs
+++ ConsoleExamples/Examples/Lunar/LanderSimulator.cs
@@ -1,92 +1,87 @@
-//
-// Encog(tm) Core v3.1 - .Net Version
-// http://www.heatonresearch.com/encog/
-//
-// Copyright 2008-2012 Heaton Research, Inc.
-//
-// Licensed under the Apache License, Version 2.0 (the "License");
-// you may not use this file except in compliance with the License.
-// You may obtain a copy of the License at
-//
-//  http://www.apache.org/licenses/LICENSE-2.0
-//
-// Unless required by applicable law or agreed to in writing, software
-// distributed under the License is distributed on an "AS IS" BASIS,
-// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-// See the License for the specific language governing permissions and
-// limitations under the License.
-//
-// For more information on Heaton Research copyrights, licenses
-// and trademarks visit:
-// http://www.heatonresearch.com/copyright
-//
-using System;
-using System.Text;
-using Encog.Util;
-
-namespace Encog.Examples.Lunar
-{
-    public class LanderSimulator
-    {
-        public const double Gravity = 1.62;
-        public const double Thrust = 10;
-        public const double TerminalVelocity = 40;
-
-        public LanderSimulator()
-        {
-            Fuel = 200;
-            Seconds = 0;
-            Altitude = 10000;
-            Velocity = 0;
-        }
-
-        public int Fuel { get; set; }
-        public int Seconds { get; set; }
-        public double Altitude { get; set; }
-        public double Velocity { get; set; }
-
-        public int Score
-        {
-            get { return (int) ((Fuel*10) + Seconds + (Velocity*1000)); }
-        }
-
-        public void Turn(bool thrust)
-        {
-            Seconds++;
-            Velocity -= Gravity;
-            Altitude += Velocity;
-
-            if (thrust && Fuel > 0)
-            {
-                Fuel--;
-                Velocity += Thrust;
-            }
-
-            Velocity = Math.Max(-TerminalVelocity, Velocity);
-            Velocity = Math.Min(TerminalVelocity, Velocity);
-
-            if (Altitude < 0)
-                Altitude = 0;
-        }
-
-        public String Telemetry()
-        {
-            var result = new StringBuilder();
-            result.Append("Elapsed: ");
-            result.Append(Seconds);
-            result.Append(" s, Fuel: ");
-            result.Append(Fuel);
-            result.Append(" l, Velocity: ");
-            result.Append(Format.FormatDouble(Velocity, 4));
-            result.Append(" m/s, ");
-            result.Append((int) Altitude);
-            result.Append(" m");
-            return result.ToString();
-        }
-
-        public bool Flying
-        {
-            get { return Altitude > 0; }
-        }
-    }
-}
+//
+// Encog(tm) Core v3.1 - .Net Version
+// http://www.heatonresearch.com/encog/
+//
+// Copyright 2008-2012 Heaton Research, Inc.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+//  http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+//
+// For more information on Heaton Research copyrights, licenses
+// and trademarks visit:
+// http://www.heatonresearch.com/copyright
+//
+using System;
+using System.Text;
+using Encog.Util;
+
+namespace Encog.Examples.Lunar
+{
+    public class LanderSimulator
+    {
+        public const double Gravity = 1.62;
+        public const double Thrust = 10;
+        public const double TerminalVelocity = 40;
+
+        public LanderSimulator()
+        {
+            Fuel = 200;
+            Seconds = 0;
+            Altitude = 10000;
+            Velocity = 0;
+        }
+
+        public int Fuel { get; set; }
+        public int Seconds { get; set; }
+        public double Altitude { get; set; }
+        public double Velocity { get; set; }
+
+        public int Score
+        {
+            get { return (int) ((Fuel*10) + Seconds + (Velocity*1000)); }
+        }
+
+        public void Turn(bool thrust)
+        {
+            Seconds++;
+            Velocity -= Gravity;
+            Altitude += Velocity;
+
+            if (thrust && Fuel > 0)
+            {
+                Fuel--;
+                Velocity += Thrust;
+            }
+
+            Velocity = Math.Max(-TerminalVelocity, Velocity);
+            Velocity = Math.Min(TerminalVelocity, Velocity);
+
+            if (Altitude < 0)
+                Altitude = 0;
+        }
+
+        public String Telemetry()
+        {
+            return string
+                .Format("Elapsed: {0} s, Fuel: {1} l, Velocity: {2} m/s, {3} m",
+                Seconds,
+                Fuel,
+                Format.FormatDouble(Velocity, 4),
+                (int) Altitude);
+        }
+
+        public bool Flying
+        {
+            get { return Altitude > 0; }
+        }
+    }
+}


Build fix - little overlook in recent commits

The internal field _emptyObjects in TypeHelper no longer exists.

--- Core/Theraot/Core/TypeHelper.ConstructorHelper.cs
+++ Core/Theraot/Core/TypeHelper.ConstructorHelper.cs
@@ -143,7 +143,7 @@
                 }
                 else
                 {
-                    return (TReturn)_constructorInfo.Invoke(_emptyObjects);
+                    return (TReturn)_constructorInfo.Invoke(EmptyObjects);
                 }
             }
         }


Increased version

Increased version

--- Properties/AssemblyInfo.cs
+++ Properties/AssemblyInfo.cs
@@ -32,5 +32,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")]
-[assembly: AssemblyFileVersion("0.0.1")]
+[assembly: AssemblyVersion("1.0.0.0")]
+[assembly: AssemblyFileVersion("1.0.0.0")]


Bumped the version no.

Bumped the version no.

--- Properties/AssemblyInfo.cs
+++ Properties/AssemblyInfo.cs
@@ -32,5 +32,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("1.1.1.0")]
-[assembly: AssemblyFileVersion("1.1.1.0")]
+[assembly: AssemblyVersion("1.1.2.0")]
+[assembly: AssemblyFileVersion("1.1.2.0")]


Update body designation mappings

Update body designation mappings

--- EliteDangerous/EliteDangerous/BodyDesignations.cs
+++ EliteDangerous/EliteDangerous/BodyDesignations.cs
@@ -264,7 +264,12 @@
             { "9 Aurigae", new Dictionary<string, string> {
                 { "9 Aurigae B", "9 Aurigae A" },
                 { "9 Aurigae", "9 Aurigae B" },
-            } }
+            } },
+            { "IGR J17497-2821", new Dictionary<string, string>
+            {
+                { "IGR J17497-2821 X", "IGR J17497-2821 B" },
+            } },
+
         };

         public static Dictionary<string, Dictionary<string, string>> Planets = new Dictionary<string, Dictionary<string, string>>
@@ -281,6 +286,10 @@
                 { "Asellus 1", "Asellus Primus A 1" },
                 { "Asellus 2", "Asellus Primus A 2" },
                 { "Asellus 3", "Asellus Primus A 3" },
+                { "A Ring", "Asellus Primus A 3 A Ring" },
+                { "B Ring", "Asellus Primus A 3 B Ring" },
+                { "C Ring", "Asellus Primus A 3 C Ring" },
+                { "D Ring", "Asellus Primus A 3 D Ring" },
                 { "Asellus 3a", "Asellus Primus A 3 a" },
                 { "Asellus 3b", "Asellus Primus A 3 b" },
                 { "Asellus 3c", "Asellus Primus A 3 c" },
@@ -758,6 +767,7 @@
                 { "Cho", "Carthage 1 a" },
                 { "Belus", "Carthage 2" },
                 { "Archerbas", "Carthage 3" },
+                { "Archerbas r1", "Carthage 3 A Ring" },
             } },
             { "CD-54 471", new Dictionary<string, string> {
                 { "Brigsteer", "CD-54 471 1" },
@@ -838,6 +848,7 @@
             } },
             { "Dahan", new Dictionary<string, string> {
                 { "Hathor", "Dahan 2" },
+                { "Hathor r1", "Dahan 2 A Ring" },
                 { "Coltan", "Dahan 2 a" },
                 { "Zhang's Claim", "Dahan 2 b" },
                 { "Smithy's Claim", "Dahan 2 c" },
@@ -1189,6 +1200,7 @@
             } },
             { "LHS 3006", new Dictionary<string, string> {
                 { "Vulcan", "LHS 3006 1" },
+                { "Vulcan Ring", "LHS 3006 1 A Ring" },
             } },
             { "LHS 3262", new Dictionary<string, string> {
                 { "Ashanti", "LHS 3262 1" },
@@ -1240,6 +1252,7 @@
             } },
             { "LP 98-132", new Dictionary<string, string> {
                 { "Anahit", "LP 98-132 1" },
+                { "Anahit Ring", "LP 98-132 1 A Ring" },
             } },
             { "LTT 1345", new Dictionary<string, string> {
                 { "Pod", "LTT 1345 1" },
@@ -1574,6 +1587,7 @@
                 { "Moon", "Sol 3 a" },
                 { "Mars", "Sol 4" },
                 { "Jupiter", "Sol 5" },
+                { "Jupiter Halo Ring", "Sol 5 A Ring" },
                 { "Io", "Sol 5 a" },
                 { "Europa", "Sol 5 b" },
                 { "Ganymede", "Sol 5 c" },
@@ -1833,6 +1847,7 @@
             } },
             { "Anapos", new Dictionary<string, string> {
                 { "Jackson", "Anapos 1" },
+                { "Emilia", "Anapos 5" },
             } },
             { "BD-01 2075", new Dictionary<string, string> {
                 { "KT-Lin", "BD-01 2075 1 a" },
@@ -1949,6 +1964,15 @@
             } },
             { "Praea Euq WD-T c3-36", new Dictionary<string, string> {
                 { "Miola", "Praea Euq WD-T c3-36 B 9 a" }
+            } },
+            { "Sapill", new Dictionary<string, string> {
+                { "LAWMAN", "Sapill A 3 a" },
+            } },
+            { "Dubbuennel", new Dictionary<string, string> {
+                { "Garibaldi", "Dubbuennel 5" },
+            } },
+            { "Lambda Aquarii", new Dictionary<string, string> {
+                { "Taylor Dale", "Lambda Aquarii 8" },
             } },
         };