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" },
             } },
         };


SVGを簡略化

SVGを簡略化

--- QRCodeLib/QRCode/Symbol.cs
+++ QRCodeLib/QRCode/Symbol.cs
@@ -600,13 +600,7 @@
             int width, height;
             width = height = moduleSize * moduleMatrix.Length;

-            int rowBytesLen = 3 * width;
-
-            int pack4byte = 0;
-            if (rowBytesLen % 4 > 0)
-                pack4byte = 4 - (rowBytesLen % 4);
-
-            int rowSize = rowBytesLen + pack4byte;
+            int rowSize = ((3 * width + 3) / 4) * 4;
             byte[] bitmapData = new byte[rowSize * height];
             int offset = 0;

@@ -769,14 +763,8 @@

             string newLine = Environment.NewLine;

-            string svg = GetSvg(moduleSize, foreRgb);
-            string svgFile =
-                $"<?xml version='1.0' encoding='UTF-8' standalone='no'?>{newLine}" +
-                $"<!DOCTYPE svg PUBLIC '-//W3C//DTD SVG 20010904//EN'{newLine}" +
-                $"    'http://www.w3.org/TR/2001/REC-SVG-20010904/DTD/svg10.dtd'>{newLine}" +
-                svg + newLine;
-
-            File.WriteAllText(fileName, svgFile);
+            string svg = GetSvg(moduleSize, foreRgb) + newLine;
+            File.WriteAllText(fileName, svg);
         }

         public string GetSvg(int moduleSize = DEFAULT_MODULE_SIZE,
@@ -822,7 +810,7 @@

             Point[][] gpPaths = GraphicPath.FindContours(image);
             var buf = new StringBuilder();
-            string indent = new string(' ', 11);
+            string indent = new string(' ', 5);

             foreach (var gpPath in gpPaths)
             {
@@ -837,11 +825,10 @@
             string newLine = Environment.NewLine;
             string data = buf.ToString().Trim();
             string svg =
-                $"<svg xmlns='http://www.w3.org/2000/svg'{newLine}" +
-                $"    width='{width}' height='{height}' viewBox='0 0 {width} {height}'>{newLine}" +
-                $"    <path fill='{foreRgb}' stroke='{foreRgb}' stroke-width='1'{newLine}" +
-                $"        d='{data}'{newLine}" +
-                $"    />{newLine}" +
+                $"<svg version=\"1.1\" xmlns=\"http://www.w3.org/2000/svg\" xmlns:xlink=\"http://www.w3.org/1999/xlink\"" + newLine +
+                $"  width=\"{width}px\" height=\"{height}px\" viewBox=\"0 0 {width} {height}\">" + newLine +
+                $"<path fill=\"{foreRgb}\" stroke=\"{foreRgb}\" stroke-width=\"1\"" + newLine +
+                $"  d=\"{data}\" />" + newLine +
                 $"</svg>";

             return svg;


Extract constants into meaningful names in RenderOffsetCalculator

--- EndlessClient/Rendering/RenderOffsetCalculator.cs
+++ EndlessClient/Rendering/RenderOffsetCalculator.cs
@@ -11,40 +11,45 @@
 {
     public class RenderOffsetCalculator : IRenderOffsetCalculator
     {
+        private const int WidthFactor = 32;
+        private const int HeightFactor = 16;
+        private const int WalkWidthFactor = WidthFactor/4;
+        private const int WalkHeightFactor = HeightFactor/4;
+
         public int CalculateOffsetX(ICharacterRenderProperties properties)
         {
             var multiplier = properties.IsFacing(EODirection.Left, EODirection.Down) ? -1 : 1;
-            var walkAdjust = properties.IsActing(CharacterActionState.Walking) ? 8 * properties.WalkFrame : 0;
+            var walkAdjust = properties.IsActing(CharacterActionState.Walking) ? WalkWidthFactor * properties.WalkFrame : 0;

             //walkAdjust * multiplier is the old ViewAdjustX
-            return properties.MapX*32 - properties.MapY*32 + walkAdjust*multiplier;
+            return properties.MapX*WidthFactor - properties.MapY*WidthFactor + walkAdjust*multiplier;
         }

         public int CalculateOffsetY(ICharacterRenderProperties properties)
         {
             var multiplier = properties.IsFacing(EODirection.Left, EODirection.Up) ? -1 : 1;
-            var walkAdjust = properties.IsActing(CharacterActionState.Walking) ? 4 * properties.WalkFrame : 0;
+            var walkAdjust = properties.IsActing(CharacterActionState.Walking) ? WalkHeightFactor * properties.WalkFrame : 0;

             //walkAdjust * multiplier is the old ViewAdjustY
-            return properties.MapX*16 + properties.MapY*16 + walkAdjust*multiplier;
+            return properties.MapX*HeightFactor + properties.MapY*HeightFactor + walkAdjust*multiplier;
         }

         public int CalculateOffsetX(INPC npc)
         {
             var multiplier = npc.IsFacing(EODirection.Left, EODirection.Down) ? -1 : 1;
-            var walkAdjust = npc.IsActing(NPCActionState.Walking) ? 8 * npc.GetWalkFrame() : 0;
+            var walkAdjust = npc.IsActing(NPCActionState.Walking) ? WalkWidthFactor * npc.GetWalkFrame() : 0;

             //walkAdjust * multiplier is the old ViewAdjustX
-            return npc.X*32 - npc.Y*32 + walkAdjust*multiplier;
+            return npc.X*WidthFactor - npc.Y*WidthFactor + walkAdjust*multiplier;
         }

         public int CalculateOffsetY(INPC npc)
         {
             var multiplier = npc.IsFacing(EODirection.Left, EODirection.Down) ? -1 : 1;
-            var walkAdjust = npc.IsActing(NPCActionState.Walking) ? 4 * npc.GetWalkFrame() : 0;
+            var walkAdjust = npc.IsActing(NPCActionState.Walking) ? WalkHeightFactor * npc.GetWalkFrame() : 0;

             //walkAdjust * multiplier is the old ViewAdjustY
-            return npc.X*16 - npc.Y*16 + walkAdjust*multiplier;
+            return npc.X*HeightFactor - npc.Y*HeightFactor + walkAdjust*multiplier;
         }
     }


Rolled back change which enabled failing tests

--- Engine3D/Engine3D-Tests/Raytrace/RendererTests.cs
+++ Engine3D/Engine3D-Tests/Raytrace/RendererTests.cs
@@ -105,7 +105,7 @@
         // Release mode: 6 mins @ res 100
         // Release mode: (5 flags) 54 seconds @ res 400
         // TODO: very, very slow! Make this much faster!
-        [TestMethod]
+        [TestMethod, Ignore]
         public void RaytraceTest()
         {
             var flags = new bool[6];
@@ -190,7 +190,7 @@
         // TODO: produced image is slightly different if this test is run in isolation vs run together with test RaytraceStaticShadow. Why?
         // TODO: number of threads affects resulting image, slighty changing quite a few pixels
         // Most likely the threads are racing each other to update the shadow cache, causing non-deterministic behaviour!
-        [TestMethod]
+        [TestMethod, Ignore]
         public void RaytraceStaticShadowAndFocalBlur()
         {
             RaytraceScenario(focalBlur: true, shadows: true, staticShadows: true, subPixelRes: 4);


Fixed a bug that NullReferenceExecption is thrown when the EventSource has a method without any argument.

--- EtwStream.Core/EventWrittenEventArgsExtensions.cs
+++ EtwStream.Core/EventWrittenEventArgsExtensions.cs
@@ -24,26 +24,18 @@
                 var xElem = XElement.Parse(manifest);
                 var ns = xElem.Name.Namespace;

-                // { tid : { eventId, keywords, taskName} }
-                var tidRef = xElem.Descendants(ns + "event")
-                    .ToDictionary(x => x.Attribute("template").Value, x => new
-                    {
-                        EventId = int.Parse(x.Attribute("value").Value),
-                        Keywords = x.Attribute("keywords")?.Value ?? "",
-                        Task = x.Attribute("task").Value
-                    });
+                // { tid : {[payloadNames]}}
+                var tidRef = xElem.Descendants(ns + "template")
+                    .ToDictionary(x => x.Attribute("tid").Value, x => new ReadOnlyCollection<string>(
+                        x.Elements(ns + "data")
+                        .Select(y => y.Attribute("name").Value)
+                        .ToArray()));

-
-                var dict = xElem.Descendants(ns + "template")
-                     .Select(template => new { template, @event = tidRef[template.Attribute("tid").Value] })
-                     .ToDictionary(
-                        x => x.@event.EventId,
-                        x => new EventSchemaPortion(
-                                new ReadOnlyCollection<string>(x.template.Elements(ns + "data")
-                                .Select(y => y.Attribute("name").Value)
-                                .ToArray()),
-                                x.@event.Keywords,
-                                x.@event.Task));
+                var dict = xElem.Descendants(ns + "event")
+                    .ToDictionary(x => int.Parse(x.Attribute("value").Value), x => new EventSchemaPortion(
+                        x.Attribute("template")?.Value != null ? tidRef[x.Attribute("template").Value] : new string[0].ToList().AsReadOnly(),
+                        x.Attribute("keywords")?.Value ?? "",
+                        x.Attribute("task")?.Value ?? x.Attribute("symbol").Value));

                 return new ReadOnlyDictionary<int, EventSchemaPortion>(dict);
             });
@@ -62,7 +54,7 @@
         /// <summary>
         /// Get KeywordDescription from EventSource manifest.
         /// </summary>
-        public static string GetKeywordDescription(this System.Diagnostics.Tracing.EventWrittenEventArgs eventArgs)
+        public static string GetKeywordName(this System.Diagnostics.Tracing.EventWrittenEventArgs eventArgs)
         {
             var source = eventArgs.EventSource;
             var templates = GetEventSchemaPortions(source);


Improve margin of page in design

Improve margin of page in design

Now margin in design draw another color.
Showing correct right edge of work area(paper - margin).
Out of work area items colored to red.

--- RdlDesign/DesignXmlDraw.cs
+++ RdlDesign/DesignXmlDraw.cs
@@ -47,12 +47,14 @@
         readonly Color BANDBORDERCOLOR = Color.DimGray; //Josh: added for Band Border
         readonly BorderStyleEnum BANDBORDERSTYLE = BorderStyleEnum.Solid; //Josh: Band Border Style
         const float BANDBORDERWIDTH = 1f; //Josh: Band border width
-        readonly Color AREABACKCOLOR = Color.LightGray; //Josh: added for area background color (behind page)
+        readonly Color AREABACKCOLOR = Color.LightGray; //Josh: added for area background color (behind page)
+		readonly Color OUTWORKAREACOLOR = Color.Azure; //out work area background color (on page, but in margin)
+		readonly Color OUTITEMCOLOR = Color.Salmon; //color of out work area parts of item

 		const float RADIUS = 2.5f;
         readonly Color BANDCOLOR = Color.LightGray;
 		const int BANDHEIGHT = 12;              // height of band (e.g. body, pageheader, pagefooter) in pts
-		const float LEFTGAP = 10f; // keep a gap on the left size of the screen
+		const float LEFTGAP = 0f; // keep a gap on the left size of the screen
 		// Various page measurements that we keep
 		float rWidth, pHeight, pWidth;
 		float lMargin, rMargin, tMargin, bMargin;
@@ -1096,10 +1098,19 @@
             // in the "off-paper" area.
             //White "Paper"
 			StyleInfo si = new StyleInfo();
-            si.BackgroundColor = Color.White;
-
-            RectangleF b = new RectangleF(xLoc, yLoc + 1, /*PointsX(Width)*/(pWidth) /*+ _hScroll*/, /*height*/ ((height > TotalPageHeight /* - yLoc*/) ? TotalPageHeight/* - yLoc*/ : height));//displayHeight > 0 ? displayHeight : 0);
-            DrawBackground(b, si);
+
+			// Entire Paper
+			si.BackgroundColor = OUTWORKAREACOLOR;
+			RectangleF b = new RectangleF(xLoc, yLoc + 1, /*PointsX(Width)*/(pWidth) /*+ _hScroll*/, /*height*/ ((height > TotalPageHeight /* - yLoc*/) ? TotalPageHeight/* - yLoc*/ : height));//displayHeight > 0 ? displayHeight : 0);
+			DrawBackground(b, si);
+
+			// Work area
+			si.BackgroundColor = Color.White;
+			b = new RectangleF(xLoc + lMargin, yLoc + 1, /*PointsX(Width)*/(pWidth - lMargin - rMargin) /*+ _hScroll*/, /*height*/ ((height > TotalPageHeight /* - yLoc*/) ? TotalPageHeight/* - yLoc*/ : height));//displayHeight > 0 ? displayHeight : 0);
+            DrawBackground(b, si);
+
+			//Edge of paper
+			DrawLine(Color.Gray, BorderStyleEnum.Solid, 1, pWidth, yLoc + 1, pWidth, yLoc + height);
             //End "Paper"

             // Josh:
@@ -1246,7 +1257,7 @@
         {
             RectangleF rir = GetReportItemRect(xNode);

-            if (rir.Right + LEFTGAP <= r.Right)
+            if (rir.Right + LEFTGAP + lMargin <= r.Right)
             {
                 return rir;
             }
@@ -1907,7 +1918,7 @@
         {
             StyleInfo si = GetStyleInfo(xNode);
             RectangleF ri = GetOutOfBoundsRightReportItemRect(xNode, r);
-            si.BackgroundColor = AREABACKCOLOR;
+			si.BackgroundColor = OUTITEMCOLOR;

             if (ri.Right > r.Right)//(!r.Contains(ri))
             {


format trend graph

format trend graph

--- RepoStats/HtmlTemplates.cs
+++ RepoStats/HtmlTemplates.cs
@@ -191,8 +191,19 @@
         public static class Graph
         {
             public static string ContainerTempalte = @"
-

-
";
+

+

+
+
Code Trend

+
+

+

+
+

+

+
+

+
";

             public static string GraphTemplate = @"


pull out email address to app settings

pull out email address to app settings

--- RequestTopicExpert/run.csx
+++ RequestTopicExpert/run.csx
@@ -62,7 +62,7 @@
     //"Node","foo@microsoft.com";"Azure Functions","foo1@microsoft.com";"Azure App Services","foo2@microsoft.com"
     string Experts = ConfigurationManager.AppSettings["EXPERT_LIST"].ToString();

-    string[] ExpertList = Experts.Split(";",StringSplitOptions.RemoveEmptyEntries);
+    string[] ExpertList = Experts.Split(';',StringSplitOptions.RemoveEmptyEntries);

     foreach (var item in ExpertList)
     {


Properly implemented sendUpdate (variable arguments\!); Interest class

--- AstronClientRepository.cs
+++ AstronClientRepository.cs
@@ -283,11 +283,60 @@
 		cr = _cr;
 	}

-	public void sendUpdate(string methodName, object[] parameters) {
+	public void legacyUpdate(string methodName, object[] parameters) {
 		cr.sendUpdate(doID, methodName, parameters); // pass off to ACR to do the dirty work
+	}
+
+	public void sendUpdate(string methodName, params string[] parameters) {
+
+		Debug.Log (parameters.Length);
+		cr.sendUpdate(doID, methodName, parameters);
 	}

 	public string getClass() {
 		return this.GetType().Name; // while this seems like utter nonsense, it allows the ACR to perform reflection on subclasses of DOs
 	}
-}+}
+
+public class DistributedObjectOV : DistributedObject {
+	public DistributedObjectOV(AstronClientRepository cr) : base(cr) {
+
+	}
+}
+
+public class Interest {
+	private UInt32 context;
+	private UInt16 interest_id;
+	private UInt32 parent_id;
+	private UInt32[] zones;
+
+	public Interest(UInt32 _context, UInt16 _interest_id, UInt32 _parent_id, UInt32[] _zones) {
+		context = _context;
+		interest_id = _interest_id;
+		parent_id = _parent_id;
+		zones = _zones;
+	}
+
+	public Interest(UInt32 _context, UInt16 _interest_id, UInt32 _parent_id, UInt32 _zone)
+		: this(_context, _interest_id, _parent_id, new UInt32[]{zone})
+	{
+		// pass
+	}
+
+	public UInt32 getZone() {
+		return zones[0];
+	}
+
+	public UInt32[] getZones() {
+		return zones;
+	}
+
+	public UInt16 getID() {
+		return interest_id;
+	}
+
+	public UInt32 getContext() {
+		return context;
+	}
+}
+


Disposing of objects in a list while enumerating it throws a runtime exception. Use an array instead.

--- COMWrapper/Application.cs
+++ COMWrapper/Application.cs
@@ -162,7 +162,9 @@

         public void Dispose()
         {
-            foreach (var pair in _wbs)
+            var to_dispose = _wbs.ToArray();
+
+            foreach (var pair in to_dispose)
             {
                 pair.Value.Dispose();
             }


Changed Coupon Validation Logic so that it MaxUsage only fails if both Unlimited and maxUsage are true.

git-tfs-id: [https://tfs.caes.ucdavis.edu:8088/tfs/DefaultCollection]$/CRP/Trunk/CRP;C9479

--- CRP.Core/Domain/Coupon.cs
+++ CRP.Core/Domain/Coupon.cs
@@ -203,7 +203,7 @@
             }

             UnlimitedAndMaxUage = true;
-            if (Unlimited != (MaxUsage == null))
+            if (Unlimited && MaxUsage != null)
             {
                 UnlimitedAndMaxUage = false;
             }


--- CSharp/Method/Internal.cs
+++ CSharp/Method/Internal.cs
@@ -3,7 +3,6 @@
     internal void Pedal() { }
     //pode ser acessado por uma classe qualquer que derive desta, ou tipos desta DLL.
     protected internal int Wheels => { get; } => 3
-    }
 }

 //http://pt.stackoverflow.com/q/186062/101


Adding the CompilationRelaxationsAttribute and CompilationRelaxations enum to System.Runtime.CompilerServices namespace.

--- Runtime/CoreLib/Runtime.cs
+++ Runtime/CoreLib/Runtime.cs
@@ -604,6 +604,33 @@
 	public interface ICriticalNotifyCompletion : INotifyCompletion {
 		void UnsafeOnCompleted(Action continuation);
 	}
+
+	[NonScriptable]
+	[EditorBrowsable(EditorBrowsableState.Never)]
+	public class CompilationRelaxationsAttribute : Attribute
+	{
+		public CompilationRelaxationsAttribute(int relaxations)
+		{
+			CompilationRelaxations = relaxations;
+		}
+
+		public CompilationRelaxationsAttribute(CompilationRelaxations relaxations)
+		{
+			CompilationRelaxations = (int)relaxations;
+		}
+
+		public int CompilationRelaxations { get; private set; }
+	}
+
+	[Flags]
+	[NonScriptable]
+	[EditorBrowsable(EditorBrowsableState.Never)]
+	public enum CompilationRelaxations : int
+	{
+		NoStringInterning = 0x0008, // Start in 0x0008, we had other non public flags in this enum before,
+		// so we'll start here just in case somebody used them. This flag is only
+		// valid when set for Assemblies.
+	};
 }

 namespace System.Runtime.InteropServices {


handle some nulls

handle some nulls

--- platform/fGameObject.cs
+++ platform/fGameObject.cs
@@ -65,6 +65,11 @@
         }

+        public virtual bool IsDestroyed {
+            // see http://answers.unity3d.com/questions/13840/how-to-detect-if-a-gameobject-has-been-destroyed.html
+            get { return go == null && ReferenceEquals(go, null) == false; }
+        }
+

         // allow game object wrapper to do things here, eg lazy updates, etc
         // This will be called by the GameObject itself, using the PreRenderBehavior (!)
@@ -165,8 +170,10 @@

         public virtual void SetColor(Colorf color)
         {
-            Renderer r = go.GetComponent<Renderer>();
-            r.material.color = color;
+            if (go != null) {
+                Renderer r = go.GetComponent<Renderer>();
+                r.material.color = color;
+            }
         }


[Gen] Don't generate extra array allocations for signals.

--- generator/Signal.cs
+++ generator/Signal.cs
@@ -442,42 +442,46 @@
 				sw.WriteLine ("\t\t\tGLib.Value ret = new GLib.Value (" + ReturnGType + ");");

 			sw.WriteLine ("\t\t\tGLib.ValueArray inst_and_params = new GLib.ValueArray (" + parms.Count + ");");
-			sw.WriteLine ("\t\t\tGLib.Value[] vals = new GLib.Value [" + parms.Count + "];");
-			sw.WriteLine ("\t\t\tvals [0] = new GLib.Value (this);");
-			sw.WriteLine ("\t\t\tinst_and_params.Append (vals [0]);");
-			string cleanup = "";
+			sw.WriteLine ("\t\t\tusing (var val0 = new GLib.Value (this)) {");
+			sw.WriteLine ("\t\t\t\tinst_and_params.Append (val0);");
+			string cleanup = "";
+			string indent = new string ('\t', 4);
 			for (int i = 1; i < parms.Count; i++) {
-				Parameter p = parms [i];
+				Parameter p = parms [i];
+				indent = new string ('\t', 3 + i);
 				if (p.PassAs != "") {
 					if (SymbolTable.Table.IsBoxed (p.CType)) {
 						if (p.PassAs == "ref")
-							sw.WriteLine ("\t\t\tvals [" + i + "] = new GLib.Value (" + p.Name + ");");
+							sw.WriteLine (indent + "using (var val" + i + " = new GLib.Value (" + p.Name + ")) {");
 						else
-							sw.WriteLine ("\t\t\tvals [" + i + "] = new GLib.Value ((GLib.GType)typeof (" + p.CSType + "));");
-						cleanup += "\t\t\t" + p.Name + " = (" + p.CSType + ") vals [" + i + "];\n";
+							sw.WriteLine (indent + "using (var val" + i + " = new GLib.Value ((GLib.GType)typeof (" + p.CSType + "))) {");
+						cleanup += indent + p.Name + " = (" + p.CSType + ") vals [" + i + "];\n";
 					} else {
 						if (p.PassAs == "ref")
-							sw.WriteLine ("\t\t\tIntPtr " + p.Name + "_ptr = GLib.Marshaller.StructureToPtrAlloc (" + p.Generatable.CallByName (p.Name) + ");");
+							sw.WriteLine (indent + "IntPtr " + p.Name + "_ptr = GLib.Marshaller.StructureToPtrAlloc (" + p.Generatable.CallByName (p.Name) + ");");
 						else
-							sw.WriteLine ("\t\t\tIntPtr " + p.Name + "_ptr = Marshal.AllocHGlobal (Marshal.SizeOf (typeof (" + p.MarshalType + ")));");
-
-						sw.WriteLine ("\t\t\tvals [" + i + "] = new GLib.Value (" + p.Name + "_ptr);");
-						cleanup += "\t\t\t" + p.Name + " = " + p.FromNative ("(" + p.MarshalType + ") Marshal.PtrToStructure (" + p.Name + "_ptr, typeof (" + p.MarshalType + "))") + ";\n";
-						cleanup += "\t\t\tMarshal.FreeHGlobal (" + p.Name + "_ptr);\n";
+							sw.WriteLine (indent + "IntPtr " + p.Name + "_ptr = Marshal.AllocHGlobal (Marshal.SizeOf (typeof (" + p.MarshalType + ")));");
+
+						sw.WriteLine (indent + "using (var val" + i + " = new GLib.Value (" + p.Name + "_ptr)) {");
+						cleanup += indent + p.Name + " = " + p.FromNative ("(" + p.MarshalType + ") Marshal.PtrToStructure (" + p.Name + "_ptr, typeof (" + p.MarshalType + "))") + ";\n";
+						cleanup += indent + "Marshal.FreeHGlobal (" + p.Name + "_ptr);\n";
 					}
 				} else if (p.IsLength && parms [i - 1].IsString)
-					sw.WriteLine ("\t\t\tvals [" + i + "] = new GLib.Value (System.Text.Encoding.UTF8.GetByteCount (" + parms [i-1].Name + "));");
+					sw.WriteLine (indent + "using (var val" + i + " = new GLib.Value (System.Text.Encoding.UTF8.GetByteCount (" + parms [i-1].Name + "))) {");
 				else
-					sw.WriteLine ("\t\t\tvals [" + i + "] = new GLib.Value (" + p.Name + ");");
-
-				sw.WriteLine ("\t\t\tinst_and_params.Append (vals [" + i + "]);");
-			}
-
-			sw.WriteLine ("\t\t\tg_signal_chain_from_overridden (inst_and_params.ArrayPtr, ref ret);");
+					sw.WriteLine (indent + "using (var val" + i + " = new GLib.Value (" + p.Name + ")) {");
+
+				sw.WriteLine (indent + "inst_and_params.Append (val" + i + ");");
+			}
+
+			sw.WriteLine (indent + "g_signal_chain_from_overridden (inst_and_params.ArrayPtr, ref ret);");
 			if (cleanup != "")
 				sw.WriteLine (cleanup);
-			sw.WriteLine ("\t\t\tforeach (GLib.Value v in vals)");
-			sw.WriteLine ("\t\t\t\tv.Dispose ();");
+			for (int i = 1; i < parms.Count; ++i) {
+				indent = new string ('\t', parms.Count - i + 3);
+				sw.WriteLine (indent + "}");
+			}
+			sw.WriteLine ("\t\t\t}");
 			if (!IsVoid) {
 				IGeneratable igen = SymbolTable.Table [retval.CType];
 				sw.WriteLine ("\t\t\t" + retval.CSType + " result = (" + (igen is EnumGen ? retval.CSType + ") (Enum" : retval.CSType) + ") ret;");


Pango and Cairo conversions

Pango and Cairo conversions

git-svn-id: 16f658619b342a39b0afd2472f072a689916e5a2@114 6f2d7086-9719-0410-ba06-0b8292a297aa

--- psycho/Psycho/Core/Color.cs
+++ psycho/Psycho/Core/Color.cs
@@ -29,10 +29,8 @@

 namespace Psycho
 {
-
         public class Color
         {
-
                 string name;
                 ushort red;
                 ushort green;
@@ -136,5 +134,33 @@
                         outColor.Blue = this.blue;
                         return outColor;
                 }
+
+                public Cairo.Color ToCairoColor ()
+                {
+                        Cairo.Color outColor = new Cairo.Color ();
+                        outColor.A = this.alfa / 255;
+                        outColor.R = this.red / 255;
+                        outColor.G = this.green / 255;
+                        outColor.B = this.blue / 255;
+                        return outColor;
+                }
+
+                public Color (Pango.Color paramColor)
+                {
+                        this.alfa = 255;
+                        this.red = paramColor.Red;
+                        this.green = paramColor.Green;
+                        this.blue = paramColor.Blue;
+                        this.name = "";
+                }
+
+                public Color (Cairo.Color paramColor)
+                {
+                        this.alfa = (ushort) (paramColor.A * 255);
+                        this.red = (ushort) (paramColor.R * 255);
+                        this.green = (ushort) (paramColor.G * 255);
+                        this.blue = (ushort) (paramColor.B * 255);
+                        this.name = "";
+                }
         }
-}
+}


Fixed test now using separate files

Fixed test now using separate files

--- SharpUV.Tests/FileTests.cs
+++ SharpUV.Tests/FileTests.cs
@@ -6,23 +6,20 @@
 {
 	public class FileTests
 	{
-		private static string TestFilePath
-		{
-			get{ return System.IO.Path.Combine(AppDomain.CurrentDomain.BaseDirectory, "test.txt"); }
-		}
-
 		[Fact]
 		public void WriteAndReadFile()
 		{
 			const string data = "test string";

+            var path = System.IO.Path.GetTempFileName();
+
 			var handle = new WriteFileHandle(data);
-			handle.OpenWrite(TestFilePath);
+			handle.OpenWrite(path);

             Loop.Current.Run();

             var handle2 = new ReadFileHandle();
-            handle2.OpenRead(TestFilePath);
+            handle2.OpenRead(path);

             Loop.Current.Run();

@@ -35,13 +32,15 @@
 		{
 			const string data = "test string";

-			var handle = new WriteFileHandle(data);
-			handle.OpenWrite(TestFilePath);
+            var path = System.IO.Path.GetTempFileName();
+
+            var handle = new WriteFileHandle(data);
+			handle.OpenWrite(path);

 			Loop.Current.Run();

 			var handle2 = new Filesystem();
-			handle2.Stat(TestFilePath, (args) => {
+			handle2.Stat(path, (args) => {
 				Assert.Equal((ulong)data.Length, args.Stat.st_size);
 			});

@@ -53,13 +52,15 @@
 		{
 			const string data = "test string";

-			var handle = new WriteFileHandle(data);
-			handle.OpenWrite(TestFilePath);
+            var path = System.IO.Path.GetTempFileName();
+
+            var handle = new WriteFileHandle(data);
+			handle.OpenWrite(path);

 			Loop.Current.Run();

 			var handle2 = new Filesystem();
-			handle2.Delete(TestFilePath, (args) =>
+			handle2.Delete(path, (args) =>
 			{
 				Assert.True(args.Successful);
 			});
@@ -72,13 +73,15 @@
 		{
 			const string data = "test string";

-			var handle = new WriteFileHandle(data);
-			handle.OpenWrite(TestFilePath);
+            var path = System.IO.Path.GetTempFileName();
+
+            var handle = new WriteFileHandle(data);
+			handle.OpenWrite(path);

 			Loop.Current.Run();

 			var handle2 = new Filesystem();
-			handle2.Copy(TestFilePath, TestFilePath + "copy", (args) =>
+			handle2.Copy(path, path + "copy", (args) =>
 			{
 				Assert.True(args.Successful);
 			});


Fixed documentation bugs

Fixed documentation bugs

git-svn-id: 61c3ae23f3a6520e9bc357b51591209af2ede9d8@244 45b04e34-05f1-4d87-a130-40a8491d5c8b

--- Mosa/Platforms/x86/Instructions/SbbInstruction.cs
+++ Mosa/Platforms/x86/Instructions/SbbInstruction.cs
@@ -18,21 +18,21 @@
 namespace Mosa.Platforms.x86.Instructions
 {
     /// <summary>
-    /// Intermediate representation of the x86 adc instruction.
+    /// Intermediate representation of the x86 sbb instruction.
     /// </summary>
     sealed class SbbInstruction : IR.TwoOperandInstruction
     {
         #region Construction

         /// <summary>
-        /// Initializes a new instance of the <see cref="AdcInstruction"/> class.
+        /// Initializes a new instance of the <see cref="SbbInstruction"/> class.
         /// </summary>
         public SbbInstruction()
         {
         }

         /// <summary>
-        /// Initializes a new instance of the <see cref="AdcInstruction"/> class.
+        /// Initializes a new instance of the <see cref="SbbInstruction"/> class.
         /// </summary>
         /// <param name="destination">The destination operand.</param>
         /// <param name="source">The source operand.</param>


Pop up version to 0.2.1 for this hotfix.

--- Nancy.AttributeRouting/Properties/AssemblyInfo.cs
+++ Nancy.AttributeRouting/Properties/AssemblyInfo.cs
@@ -11,5 +11,5 @@
 [assembly: AssemblyCulture("")]
 [assembly: ComVisible(false)]
 [assembly: Guid("c66bf3e3-f147-41b1-ad52-7ac8d7d573c1")]
-[assembly: AssemblyVersion("0.2.0.0")]
-[assembly: AssemblyFileVersion("0.2.0.0")]
+[assembly: AssemblyVersion("0.2.1.0")]
+[assembly: AssemblyFileVersion("0.2.1.0")]


Gets the exception type

Gets the exception type

--- code/Inbox.cs
+++ code/Inbox.cs
@@ -245,7 +245,7 @@
 				UI.NotificationService.Tip(Translation.error, Translation.syncErrorOccured + exception.Message, Notification.Type.Warning, 1500);

 				// logs the error
-				Core.Log("Sync: " + exception.Message);
+				Core.Log("Sync: " + exception.GetType().ToString() + " " + exception.Message);
 			} finally {
 				UI.notifyIcon.Text = UI.notifyIcon.Text.Split('\n')[0] + "\n" + Translation.syncTime.Replace("{time}", Time.ToLongTimeString());
 			}


Changed default block light to 0

Changed default block light to 0

--- Craft.Net.Data/Section.cs
+++ Craft.Net.Data/Section.cs
@@ -42,7 +42,7 @@
             BlockLight = new NibbleArray(Width*Height*Depth);
             SkyLight = new NibbleArray(Width*Height*Depth);
             for (int i = 0; i < SkyLight.Data.Length; i++)
-                SkyLight.Data[i] = BlockLight.Data[i] = 0xFF;
+                SkyLight.Data[i] = 0xFF;
             nonAirCount = 0;
         }


Set the extension when used in the gltf file

--- Source/Runtime/Material.cs
+++ Source/Runtime/Material.cs
@@ -311,9 +311,23 @@
                 {
                     material.Extensions = new Dictionary<string, object>();
                 }
+                if (gltf.ExtensionsUsed != null)
+                {
+                    gltf.ExtensionsUsed = new List<string>();
+                }
                 foreach (var extension in Extensions)
                 {
                     material.Extensions.Add(extension.Name, extension.ConvertToSchema(gltf, samplers, images, textures));
+                    if (gltf.ExtensionsUsed == null)
+                    {
+                        gltf.ExtensionsUsed = new List<string>(new[] { extension.Name });
+
+                    }
+                    else if (!gltf.ExtensionsUsed.Contains(extension.Name))
+                    {
+                        gltf.ExtensionsUsed.Add(extension.Name);
+                    }
+
                 }
             }


Fixed a virtual list scrolling bug. (optimized)

--- Source/Scripts/UI/GList.cs
+++ Source/Scripts/UI/GList.cs
@@ -1795,8 +1795,8 @@
 			_firstIndex = newFirstIndex;
 			int curIndex = newFirstIndex;
 			bool forward = oldFirstIndex > newFirstIndex;
-			int oldCount = this.numChildren;
-			int lastIndex = oldFirstIndex + oldCount - 1;
+			int childCount = this.numChildren;
+			int lastIndex = oldFirstIndex + childCount - 1;
 			int reuseIndex = forward ? lastIndex : oldFirstIndex;
 			float curX = 0, curY = pos;
 			bool needRender;
@@ -1885,10 +1885,7 @@
 					needRender = true;
 				}
 				else
-				{
-					SetChildIndex(ii.obj, forward ? curIndex - newFirstIndex : numChildren);
 					needRender = forceUpdate;
-				}

 				if (needRender)
 				{
@@ -1924,7 +1921,7 @@
 				curIndex++;
 			}

-			for (int i = 0; i < oldCount; i++)
+			for (int i = 0; i < childCount; i++)
 			{
 				ItemInfo ii = _virtualItems[oldFirstIndex + i];
 				if (ii.updateFlag != itemInfoVer && ii.obj != null)
@@ -1936,6 +1933,14 @@
 				}
 			}

+			childCount = _children.Count;
+			for (int i = 0; i < childCount; i++)
+			{
+				GObject obj = _children[i];
+				if (obj != _virtualItems[newFirstIndex + i].obj)
+					SetChildIndex(obj, i);
+			}
+
 			if (deltaSize != 0 || firstItemDeltaSize != 0)
 				this.scrollPane.ChangeContentSizeOnScrolling(0, deltaSize, 0, firstItemDeltaSize);

@@ -1965,8 +1970,8 @@
 			_firstIndex = newFirstIndex;
 			int curIndex = newFirstIndex;
 			bool forward = oldFirstIndex > newFirstIndex;
-			int oldCount = this.numChildren;
-			int lastIndex = oldFirstIndex + oldCount - 1;
+			int childCount = this.numChildren;
+			int lastIndex = oldFirstIndex + childCount - 1;
 			int reuseIndex = forward ? lastIndex : oldFirstIndex;
 			float curX = pos, curY = 0;
 			bool needRender;
@@ -2054,10 +2059,7 @@
 					needRender = true;
 				}
 				else
-				{
-					SetChildIndex(ii.obj, forward ? curIndex - newFirstIndex : numChildren);
 					needRender = forceUpdate;
-				}

 				if (needRender)
 				{
@@ -2093,7 +2095,7 @@
 				curIndex++;
 			}

-			for (int i = 0; i < oldCount; i++)
+			for (int i = 0; i < childCount; i++)
 			{
 				ItemInfo ii = _virtualItems[oldFirstIndex + i];
 				if (ii.updateFlag != itemInfoVer && ii.obj != null)
@@ -2103,6 +2105,14 @@
 					RemoveChildToPool(ii.obj);
 					ii.obj = null;
 				}
+			}
+
+			childCount = _children.Count;
+			for (int i = 0; i < childCount; i++)
+			{
+				GObject obj = _children[i];
+				if (obj != _virtualItems[newFirstIndex + i].obj)
+					SetChildIndex(obj, i);
 			}

 			if (deltaSize != 0 || firstItemDeltaSize != 0)


[SharpDX] Fixed MathUtil.Gauss function (#489).

--- Source/SharpDX/MathUtil.cs
+++ Source/SharpDX/MathUtil.cs
@@ -96,7 +96,7 @@
             int bInt = *(int*)&b;

             // Different signs means they do not match.
-            if((aInt < 0) != (bInt < 0))
+            if ((aInt < 0) != (bInt < 0))
                 return false;

             // Find the difference in ULPs.
@@ -424,38 +424,42 @@

         /// <summary>
         /// Gauss function.
+        /// http://en.wikipedia.org/wiki/Gaussian_function#Two-dimensional_Gaussian_function
         /// </summary>
         /// <param name="amplitude">Curve amplitude.</param>
         /// <param name="x">Position X.</param>
         /// <param name="y">Position Y</param>
-        /// <param name="radX">Radius X.</param>
-        /// <param name="radY">Radius Y.</param>
+        /// <param name="centerX">Center X.</param>
+        /// <param name="centerY">Center Y.</param>
         /// <param name="sigmaX">Curve sigma X.</param>
         /// <param name="sigmaY">Curve sigma Y.</param>
         /// <returns>The result of Gaussian function.</returns>
-        public static float Gauss(float amplitude, float x, float y, float radX, float radY, float sigmaX, float sigmaY)
-        {
-            return (float)Gauss((double)amplitude, x, y, radX, radY, sigmaX, sigmaY);
+        public static float Gauss(float amplitude, float x, float y, float centerX, float centerY, float sigmaX, float sigmaY)
+        {
+            return (float)Gauss((double)amplitude, x, y, centerX, centerY, sigmaX, sigmaY);
         }

         /// <summary>
         /// Gauss function.
+        /// http://en.wikipedia.org/wiki/Gaussian_function#Two-dimensional_Gaussian_function
         /// </summary>
         /// <param name="amplitude">Curve amplitude.</param>
         /// <param name="x">Position X.</param>
         /// <param name="y">Position Y</param>
-        /// <param name="radX">Radius X.</param>
-        /// <param name="radY">Radius Y.</param>
+        /// <param name="centerX">Center X.</param>
+        /// <param name="centerY">Center Y.</param>
         /// <param name="sigmaX">Curve sigma X.</param>
         /// <param name="sigmaY">Curve sigma Y.</param>
         /// <returns>The result of Gaussian function.</returns>
-        public static double Gauss(double amplitude, double x, double y, double radX, double radY, double sigmaX, double sigmaY)
-        {
-            return (amplitude * Math.E) -
-                (
-                    Math.Pow(x - (radX / 2), 2) / (2 * Math.Pow(sigmaX, 2)) +
-                    Math.Pow(y - (radY / 2), 2) / (2 * Math.Pow(sigmaY, 2))
-                );
+        public static double Gauss(double amplitude, double x, double y, double centerX, double centerY, double sigmaX, double sigmaY)
+        {
+            var cx = x - centerX;
+            var cy = y - centerY;
+
+            var componentX = (cx * cx) / (2 * sigmaX * sigmaX);
+            var componentY = (cy * cy) / (2 * sigmaY * sigmaY);
+
+            return amplitude * Math.Exp(-(componentX + componentY));
         }
     }
 }


Adding %CommonAppDataFolder% to Dir.cs description

%CommonAppDataFolder% environment variable, mapped to Wix constant [CommonAppDataFolder] was missing from the list in the class description.
It is a minor detail, but it saves you some time when you're searching for that destination.

--- Source/src/WixSharp/Dir.cs
+++ Source/src/WixSharp/Dir.cs
@@ -47,6 +47,7 @@
     ///  <para>%WindowsFolder% - [WindowsFolder]</para>
     ///  <para>%ProgramFiles% - [ProgramFilesFolder]</para>
     ///  <para>%ProgramMenu% - [ProgramMenuFolder]</para>
+    ///  <para>%CommonAppDataFolder% - [CommonAppDataFolder]</para>
     ///  <para>%AppDataFolder% - [AppDataFolder]</para>
     ///  <para>%CommonFilesFolder% - [CommonFilesFolder]</para>
     ///  <para>%LocalAppDataFolder% - [LocalAppDataFolder]</para>


healthdataprobe cleaned up comments

healthdataprobe cleaned up comments

--- Sensus.iOS.Shared/Probes/User/Health/iOSHealthDataProbe.cs
+++ Sensus.iOS.Shared/Probes/User/Health/iOSHealthDataProbe.cs
@@ -405,11 +405,6 @@

 		private void InitializeCollectors()
 		{
-			//if (Collectors == null)
-			//{
-			//	Collectors = new List<HealthDataCollector>();
-			//}
-
 			_collectors = Collectors.ToDictionary(x => x.Key);

 			InitializeCollector(CollectBiologicalSex, new BiologicalSexCollector(_healthStore));


ログの自動スクロールは初期値ON

ログの自動スクロールは初期値ON

--- DemoP2P/Form1.Designer.cs
+++ DemoP2P/Form1.Designer.cs
@@ -504,6 +504,8 @@
             //
             this.checkBoxAutoScroll.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Left)));
             this.checkBoxAutoScroll.AutoSize = true;
+            this.checkBoxAutoScroll.Checked = true;
+            this.checkBoxAutoScroll.CheckState = System.Windows.Forms.CheckState.Checked;
             this.checkBoxAutoScroll.Location = new System.Drawing.Point(3, 406);
             this.checkBoxAutoScroll.Name = "checkBoxAutoScroll";
             this.checkBoxAutoScroll.Size = new System.Drawing.Size(94, 16);


add missing Owned property on Reward

add missing Owned property on Reward

--- Soomla/Assets/Plugins/Soomla/Core/domain/rewards/Reward.cs
+++ Soomla/Assets/Plugins/Soomla/Core/domain/rewards/Reward.cs
@@ -35,6 +35,12 @@
 		public string RewardId;
 		public string Name;
 		public bool   Repeatable;
+
+		public bool Owned {
+			get {
+				return RewardStorage.IsRewardGiven(this);
+			}
+		}

 		/// <summary>
 		/// Constructor.


Minor changes.

Minor changes.

--- Source/Main/NProxy.Core/Internal/Reflection/MemberToken.cs
+++ Source/Main/NProxy.Core/Internal/Reflection/MemberToken.cs
@@ -78,7 +78,7 @@
         /// <inheritdoc/>
         public override string ToString()
         {
-            return string.Format("[{0}]{1}", _module.Name, _metadataToken);
+            return String.Format("[{0}]{1}", _module.Name, _metadataToken);
         }

         #endregion


regular backup

regular backup

--- SteamBot/KeyUserHandler.cs
+++ SteamBot/KeyUserHandler.cs
@@ -18,8 +18,8 @@
 	{
 		private const string BotVersion = "3.2.5";
 		public TF2Value UserMetalAdded, NonTradeInventoryMetal, InventoryMetal, BotMetalAdded, ExcessRefined, KeysToScrap, AdditionalRefined, ChangeAdded, LeftoverMetal;
-		public static TF2Value SellPricePerKey = TF2Value.FromRef(21.00); //high
-		public static TF2Value BuyPricePerKey = TF2Value.FromRef(20.66); //low
+		public static TF2Value SellPricePerKey = TF2Value.FromRef(21.22); //high
+		public static TF2Value BuyPricePerKey = TF2Value.FromRef(20.88); //low

         int KeysCanBuy, NonTradeKeysCanBuy, ValidateMetaltoKey, PreviousKeys, UserKeysAdded, BotKeysAdded, InventoryKeys, NonTradeInventoryKeys, IgnoringBot, PayAttention, ScamAttempt, NonTradeScrap, Scrap, Crates, KeyNumber, ScrapAdded, NonTradeReclaimed, Reclaimed, ReclaimedAdded, NonTradeRefined, Refined, RefinedAdded, InvalidItem, NumKeys, TradeFrequency;
         double Item;


Improve `TrayManu.Dispose()` method implementation #293

--- Source/Office/Tools/Contribution/TrayMenuUtils/TrayMenu.cs
+++ Source/Office/Tools/Contribution/TrayMenuUtils/TrayMenu.cs
@@ -875,24 +875,36 @@
         #region IDisposableState

         /// <summary>
-        /// Returns information the instance is already disposed
+        /// Gets a value indicating whether the control has been disposed of.
         /// </summary>
         public bool IsDisposed { get; private set; }

         /// <summary>
-        /// Dispose the instance
+        /// Dispose the instance.
         /// </summary>
         public void Dispose()
         {
-            if (IsDisposed)
-            {
-                if (null != _contextMenu)
-                {
-                    _contextMenu.Dispose();
-                    _contextMenu = null;
-                }
-                IsDisposed = true;
-            }
+            this.Dispose(true);
+        }
+
+        /// <summary>
+        /// Dispose the instance.
+        /// </summary>
+        /// <param name="disposing"></param>
+        protected virtual void Dispose(bool disposing)
+        {
+            if (this.IsDisposed)
+            {
+                return;
+            }
+
+            if (disposing)
+            {
+                _contextMenu?.Dispose();
+                _contextMenu = null;
+            }
+
+            this.IsDisposed = true;
         }

         #endregion