correct kingdom connectivity solution

correct kingdom connectivity solution

--- kingdom-connectivity/Solution.cs
+++ kingdom-connectivity/Solution.cs
@@ -1,5 +1,8 @@
 /**
  * @author ShengMin Zhang
+ *
+ * @revision 1.1
+ * - save computed results
  * @revision 1.0
  * - DFS
  */
@@ -100,6 +103,7 @@
 	readonly Natural MOD = 1000000000;
 	bool[] visited;
 	bool[] visited2;
+	int[] reachabletb;
 	Stack<City> visitedCities;
 	City[] cities;
 	City firstCity, lastCity;
@@ -110,6 +114,9 @@
 	bool IsReachable(City city, City to) {
 		if(city == to) return true; // reach the destination city
 		if(visited2[city]) return false; // a cycle;
+		int result = reachabletb[city];
+		if(result == 1) return true;
+		else if(result == -1) return false;

 		visited2[city] = true;

@@ -123,7 +130,7 @@
 		}

 		visited2[city] = false;
-
+		reachabletb[city] = anyReachable ? 1 : -1;
 		return anyReachable;
 	}

@@ -168,6 +175,7 @@
 		visited2 = new bool[N + 1];
 		visitedCities = new Stack<City>(N);
 		cities = new City[N + 1];
+		reachabletb = new int[N + 1];

 		for(int i = N; i > 0; i--) {
 			City c = new City(i);


fix block list issue?

fix block list issue?

--- TCC.Core/Parsing/PacketHandler.cs
+++ TCC.Core/Parsing/PacketHandler.cs
@@ -166,7 +166,7 @@
             WindowManager.FloatingButton.SetMoongourdButtonVisibility();
             EntityManager.ClearNPC();
             GroupWindowViewModel.Instance.ClearAll();
-
+            ChatWindowManager.Instance.BlockedUsers.Clear();
             SessionManager.CurrentPlayer.ClearAbnormalities();

             SessionManager.LoadingScreen = true;
@@ -633,7 +633,11 @@

         public static void HandleBlockList(S_USER_BLOCK_LIST x)
         {
-            ChatWindowManager.Instance.BlockedUsers = x.BlockedUsers;
+            x.BlockedUsers.ForEach(u =>
+            {
+                if (ChatWindowManager.Instance.BlockedUsers.Contains(u)) return;
+                ChatWindowManager.Instance.BlockedUsers.Add(u);
+            });
         }

         internal static void HandleFriendList(S_FRIEND_LIST x)
@@ -844,7 +848,7 @@
             }
             WindowManager.Dashboard.VM.SetElleonMarks(S_INVEN.ElleonMarks);
             WindowManager.Dashboard.VM.CurrentCharacter.DragonwingScales = S_INVEN.DragonwingScales;
-            WindowManager.Dashboard.VM.CurrentCharacter.PiecesOfDragonScroll= S_INVEN.PiecesOfDragonScroll;
+            WindowManager.Dashboard.VM.CurrentCharacter.PiecesOfDragonScroll = S_INVEN.PiecesOfDragonScroll;

             GroupWindowViewModel.Instance.UpdateMyGear();
             //88273 - 88285 L weapons


modify

modify

--- src/Senparc.Weixin.MP/Senparc.Weixin.MP/AdvancedAPIs/ShakeAround/ShakeAroundJson/DeviceManageResultJson.cs
+++ src/Senparc.Weixin.MP/Senparc.Weixin.MP/AdvancedAPIs/ShakeAround/ShakeAroundJson/DeviceManageResultJson.cs
@@ -30,10 +30,10 @@
         /// 申请的批次ID，可用在“查询设备列表”接口按批次查询本次申请成功的设备ID。
         /// </summary>
         public long apply_id { get; set; }
-        /// <summary>
-        /// 指定的设备ID列表
-        /// </summary>
-        public List<DeviceApply_Data_Device_Identifiers> device_identifiers { get; set; }
+        ///// <summary>
+        ///// 指定的设备ID列表
+        ///// </summary>
+        //public List<DeviceApply_Data_Device_Identifiers> device_identifiers { get; set; }
         /// <summary>
         /// 审核状态。0：审核未通过、1：审核中、2：审核已通过；审核会在三个工作日内完成
         /// </summary>


Small bugfix

Small bugfix

--- tmp-l-l/Program.cs
+++ tmp-l-l/Program.cs
@@ -56,6 +56,7 @@
                 }
             }

+            r = LLR.GetRegistry("otherparams");
             //other
             if (r != null)
             {


Added Ident Request to rest api

Added Ident Request to rest api

--- FEClient/API/ClientRestApi.cs
+++ FEClient/API/ClientRestApi.cs
@@ -206,6 +206,19 @@
                 SendTextResponse(context, Rsa.getPublicKey());
             }

+            [RESTRoute(Method = HttpMethod.GET, PathInfo = @"^/ident/?$")]
+            public void HandleIdentRequest(HttpListenerContext context)
+            {//TODO: add debug
+#if TRACE
+                Debug.WriteLine("/ident/");
+#endif
+                var returnObj = new JObject();
+                returnObj.Add("email", SettingsWrapper.Instance.Email);
+                returnObj.Add("pubKey", Rsa.getPublicKey());
+                Debug.WriteLine("/ident/ sent " + returnObj);
+                SendJsonResponse(context, returnObj);
+            }
+

             [RESTRoute]
             public void HandleAllGetRequests(HttpListenerContext context)


Add back structure init after conflict

Add back structure init after conflict

--- box2d/Collision/b2TimeOfImpact.cs
+++ box2d/Collision/b2TimeOfImpact.cs
@@ -253,6 +253,18 @@
 	/// Input parameters for b2TimeOfImpact
 	public struct b2TOIInput
 	{
+		public static b2TOIInput Zero = b2TOIInput.Create();
+
+		public static b2TOIInput Create()
+		{
+			var toi = new b2TOIInput();
+			toi.proxyA = new b2DistanceProxy();
+			toi.proxyB = new b2DistanceProxy();
+			toi.sweepA = new b2Sweep();
+			toi.sweepB = new b2Sweep();
+			return toi;
+		}
+
 		public b2DistanceProxy proxyA;
 		public b2DistanceProxy proxyB;
 		public b2Sweep sweepA;


Disable tests referencing .NET Framework on Linux

--- test/Microsoft.NET.Build.Tests/GivenThatWeWantToBuildAppsWithFrameworkRefs.cs
+++ test/Microsoft.NET.Build.Tests/GivenThatWeWantToBuildAppsWithFrameworkRefs.cs
@@ -23,6 +23,11 @@
         [Fact]
         public void It_builds_the_projects_successfully()
         {
+            if (!RuntimeInformation.IsOSPlatform(OSPlatform.Windows))
+            {
+                return;
+            }
+
             var testAsset = _testAssetsManager
                 .CopyTestAsset("AppsWithFrameworkReferences")
                 .WithSource();
@@ -36,6 +41,11 @@
         [Fact]
         public void It_builds_with_disable_implicit_frameworkRefs()
         {
+            if (!RuntimeInformation.IsOSPlatform(OSPlatform.Windows))
+            {
+                return;
+            }
+
             var testAsset = _testAssetsManager
                 .CopyTestAsset("AppsWithFrameworkReferences")
                 .WithSource()
@@ -61,6 +71,11 @@
         [Fact]
         public void It_builds_the_projects_successfully_twice()
         {
+            if (!RuntimeInformation.IsOSPlatform(OSPlatform.Windows))
+            {
+                return;
+            }
+
             var testAsset = _testAssetsManager
                 .CopyTestAsset("AppsWithFrameworkReferences")
                 .WithSource();


Update PopupNotifications.cs

Update PopupNotifications.cs

--- plugins/Prrovoss/PopupNotifications.cs
+++ plugins/Prrovoss/PopupNotifications.cs
@@ -10,7 +10,11 @@
     {
         public List<Popup> Popups { get; set; }
         public TopLabelWithTitleDecorator PopupDecorator { get; set; }
-        public float RatioX, RatioY, RatioW, RatioH, VerticalGap;
+        public float RatioX { get; set; }
+        public float RatioY { get; set; }
+        public float RatioW { get; set; }
+        public float RatioH { get; set; }
+        public float VerticalGap { get; set; }

         public class Popup
         {


Added more unit tests for MimeUtils

Added more unit tests for MimeUtils

--- UnitTests/Utils/MimeUtilsTests.cs
+++ UnitTests/Utils/MimeUtilsTests.cs
@@ -92,6 +92,7 @@
 			"<local-part@ (unterminated comment...",
 			"<local-part@",
 			"<local-part @ bad-domain (comment) . (comment com",
+			"<local-part@[127.0"
 		};

 		[Test]
@@ -107,5 +108,26 @@
 				Assert.IsNull (reference, "MimeUtils.ParseMessageId (\"{0}\")", BadReferences[i]);
 			}
 		}
+
+		[Test]
+		public void TestTryParseVersion ()
+		{
+			Version version;
+
+			Assert.IsTrue (MimeUtils.TryParse (" 1 (comment) .\t0\r\n", out version), "1.0");
+			Assert.AreEqual ("1.0", version.ToString ());
+
+			Assert.IsTrue (MimeUtils.TryParse (" 1 (comment) .\t0\r\n .0\r\n", out version), "1.0.0");
+			Assert.AreEqual ("1.0.0", version.ToString ());
+
+			Assert.IsTrue (MimeUtils.TryParse (" 1 (comment) .\t0\r\n .0.0\r\n", out version), "1.0.0.0");
+			Assert.AreEqual ("1.0.0.0", version.ToString ());
+
+			Assert.IsFalse (MimeUtils.TryParse ("1", out version), "1");
+			Assert.IsFalse (MimeUtils.TryParse ("1.2.3.4.5", out version), "1.2.3.4.5");
+			Assert.IsFalse (MimeUtils.TryParse ("1x2.3", out version), "1x2.3");
+			Assert.IsFalse (MimeUtils.TryParse ("(unterminated comment", out version), "unterminated comment");
+			Assert.IsFalse (MimeUtils.TryParse ("1 (unterminated comment", out version), "1 + unterminated comment");
+		}
 	}
 }


Make Task.Run run tasks on the threadpool (#251)

--- Unity.Tasks/Public/TaskFactory.cs
+++ Unity.Tasks/Public/TaskFactory.cs
@@ -18,11 +18,11 @@
     }

     public TaskFactory(CancellationToken cancellationToken)
-      : this(TaskScheduler.FromCurrentSynchronizationContext(), cancellationToken) {
+      : this(new TaskScheduler(null), cancellationToken) {
     }

     public TaskFactory()
-      : this(TaskScheduler.FromCurrentSynchronizationContext(), CancellationToken.None) {
+      : this(new TaskScheduler(null), CancellationToken.None) {
     }

     public TaskFactory(CancellationToken cancellationToken,
@@ -161,11 +161,11 @@
     }

     public TaskFactory(CancellationToken cancellationToken)
-      : this(TaskScheduler.FromCurrentSynchronizationContext(), cancellationToken) {
+      : this(new TaskScheduler(null), cancellationToken) {
     }

     public TaskFactory()
-      : this(TaskScheduler.FromCurrentSynchronizationContext(), CancellationToken.None) {
+      : this(new TaskScheduler(null), CancellationToken.None) {
     }

     public TaskScheduler Scheduler {


add auto re-connect

add auto re-connect

--- MouseStreamNet.cs
+++ MouseStreamNet.cs
@@ -14,25 +14,27 @@
         private TcpClient client = null;
         private StreamWriter netStream = null;
         private bool enabled;
+        private DateTime lastConnectAttempted;
+        private string address;
+        private int port;

         public MouseStreamNet(bool enable = true, string address = "129.21.207.17", int port = 1313)
         {
             this.enabled = enable;
             if (this.enabled)
             {
+                this.address = address;
+                this.port = port;
                 try
                 {
-                    this.client = new TcpClient(address, port);
+                    connect();
                 }
                 catch (SocketException se)
                 {
                     this.enabled = false;
                     Console.WriteLine("failed to connect to mouse");
                     Console.WriteLine(se.Message);
-                    return;
                 }
-                NetworkStream ns = this.client.GetStream();
-                this.netStream = new StreamWriter(ns);
             }
         }

@@ -47,7 +49,30 @@
             } catch (Exception e)
             {
                 Console.Error.WriteLine(e.Message);
+                if ((DateTime.Now - lastConnectAttempted).Seconds > 3)
+                {
+                    try
+                    {
+                        Console.WriteLine("Attempting to reconnect");
+                        connect();
+                    } catch (SocketException)
+                    {
+                        Console.WriteLine("Reconnect failed");
+                    }
+                }
             }
+        }
+
+
+        private void connect()
+        {
+            if (!this.enabled) return;
+            this.lastConnectAttempted = DateTime.Now;
+            this.client = new TcpClient();
+            client.ReceiveTimeout = 100;
+            this.client.Connect(address, port);
+            NetworkStream ns = this.client.GetStream();
+            this.netStream = new StreamWriter(ns);
         }

     }


Added per file licensing

Added per file licensing

--- MovingPlatform.cs
+++ MovingPlatform.cs
@@ -1,3 +1,27 @@
+/*
+The MIT License (MIT)
+
+Copyright (c) 2014 Liam Middlebrook ( https://github.com/liam-middlebrook )
+
+Permission is hereby granted, free of charge, to any person obtaining a copy
+of this software and associated documentation files (the "Software"), to deal
+in the Software without restriction, including without limitation the rights
+to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
+copies of the Software, and to permit persons to whom the Software is
+furnished to do so, subject to the following conditions:
+
+The above copyright notice and this permission notice shall be included in all
+copies or substantial portions of the Software.
+
+THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
+SOFTWARE.
+*/
+
 using UnityEngine;
 using System.Collections;


missing passing CulureInfo.InvariantCulture

--- NBitcoin/Money.cs
+++ NBitcoin/Money.cs
@@ -670,7 +670,7 @@
 		/// <returns></returns>
 		public string ToString(bool fplus, bool trimExcessZero = true)
 		{
-			var fmt = string.Format("{{0:{0}{1}B}}",
+			var fmt = string.Format(CultureInfo.InvariantCulture, "{{0:{0}{1}B}}",
 									(fplus ? "+" : null),
 									(trimExcessZero ? "2" : "8"));
 			return string.Format(BitcoinFormatter.Formatter, fmt, _Satoshis);


Updated sample with working code

Updated sample with working code

--- VlcXamarin.Sample/MainActivity.cs
+++ VlcXamarin.Sample/MainActivity.cs
@@ -19,14 +19,18 @@
             // Set our view from the "main" layout resource
             SetContentView (Resource.Layout.Main);

+            if(mLibVLC == null)
+            {
+                mLibVLC = new LibVLC();
+                mLibVLC.Init(this);
+            }
+
             // Get our button from the layout resource,
             // and attach an event to it
             Button button = FindViewById<Button> (Resource.Id.myButton);

             button.Click += delegate {
                 button.Text = string.Format ("{0} clicks!", count++);
-                if(mLibVLC == null)
-                    mLibVLC = new LibVLC();
                 mLibVLC.PlayMRL("http://www.montemagno.com/sample.mp3");
             };
         }


run desktop tests on *nix as part of build script

--- build/Build.csx
+++ build/Build.csx
@@ -9,7 +9,7 @@
 using static FileUtils;
 using System.Xml.Linq;

-[StepDescription("Runs all tests. Note: Desktop tests are only executed on Windows.")]
+[StepDescription("Runs all tests.")]
 Step test = () => RunTests();

 [StepDescription("Creates all NuGet packages and the release zip for GitHub releases")]
@@ -76,10 +76,7 @@
 private void RunTests()
 {
     DotNet.Test(testProjectFolder);
-    if (BuildEnvironment.IsWindows)
-    {
-        DotNet.Test(testDesktopProjectFolder);
-    }
+    DotNet.Test(testDesktopProjectFolder);
 }

 private async Task PublishRelease()


Add WSH testbench terminal

Add WSH testbench terminal

--- WebScriptHook.Terminal/Program.cs
+++ WebScriptHook.Terminal/Program.cs
@@ -1,9 +1,8 @@
 using System;
-using System.Collections.Generic;
-using System.Linq;
-using System.Text;
-using System.Threading.Tasks;
+using System.Threading;
 using WebScriptHook.Framework;
+using WebScriptHook.Framework.BuiltinPlugins;
+using WebScriptHook.Terminal.Plugins;

 namespace WebScriptHook.Terminal
 {
@@ -13,8 +12,29 @@

         static void Main(string[] args)
         {
-            string componentName = Guid.NewGuid().ToString();
-            wshComponent = new WebScriptHookComponent(componentName, new RemoteSettings("localhost", "25555", "/pushws"));
+            string componentName = "testbench"; //Guid.NewGuid().ToString();
+            wshComponent = new WebScriptHookComponent(componentName, new RemoteSettings("ws", "localhost", "25555", "/componentws"));
+            // Register custom plugins
+            wshComponent.PluginManager.RegisterPlugin(new Echo());
+            wshComponent.PluginManager.RegisterPlugin(new PluginList());
+            wshComponent.PluginManager.RegisterPlugin(new PrintToScreen());
+            // Start WSH component
+            wshComponent.Start();
+
+            // Print all registered plugins
+            Console.WriteLine("Registered plugins on \"" + wshComponent.Name + "\":");
+            var pluginIDs = wshComponent.PluginManager.PluginIDs;
+            foreach (var pluginID in pluginIDs)
+            {
+                Console.WriteLine(pluginID);
+            }
+
+            // TODO: Use a timer instead of Sleep
+            while (true)
+            {
+                wshComponent.Update();
+                Thread.Sleep(20);
+            }
         }
     }
 }


Removed more cruft

Removed more cruft


Fix Vector2d property drawing

Fix Vector2d property drawing


add new method for auto auto complete testsng


Added mtu, encapsulation, mode capture on ME nodes

--- Necrow/MEProbe.cs
+++ Necrow/MEProbe.cs
@@ -992,7 +992,7 @@
                 insert.Value("MS_Status", s.Status);
                 insert.Value("MS_Protocol", s.Protocol);
                 insert.Value("MS_IP", s.FarEnd);
-                insert.Value("MS_MTU", s.AdmMTU.Nullable(0));
+                insert.Value("MS_MTU", s.AdmMTU.Nullable(-1));
                 insert.Value("MS_Type", s.Type);
                 insert.Value("MS_LSP", s.LSP);
                 insert.Value("MS_TO_NO", s.FarEndNodeID);
@@ -1011,7 +1011,7 @@
                 update.Set("MS_Protocol", s.Protocol, s.UpdateProtocol);
                 update.Set("MS_Type", s.Type, s.UpdateType);
                 update.Set("MS_LSP", s.LSP, s.UpdateLSP);
-                update.Set("MS_MTU", s.AdmMTU.Nullable(0), s.UpdateAdmMTU);
+                update.Set("MS_MTU", s.AdmMTU.Nullable(-1), s.UpdateAdmMTU);
                 update.Set("MS_IP", s.FarEnd, s.UpdateFarEnd);
                 update.Set("MS_TO_NO", s.FarEndNodeID, s.UpdateFarEndNodeID);
                 update.Where("MS_ID", s.ID);
@@ -2048,6 +2048,12 @@

                 if (Request("show port", out lines, probe)) return probe;

+
+                //4/2/11      Up    Yes  Up      9212 9212    - accs null xcme   GIGE-LX  10KM
+                //0           1     2    3       4    5       6 7    8    9      10       11
+                //4/2/12      Up    Yes  Link Up 9212 9212    2 netw null xcme   GIGE-LX  10KM
+                //0           1     2    3    4  5    6       7 8    9    10     11       12
+
                 List<Tuple<MEInterfaceToDatabase, string, int>> monitorPort = new List<Tuple<MEInterfaceToDatabase, string, int>>();

                 foreach (string line in lines)
@@ -2056,27 +2062,46 @@
                     {
                         if (char.IsDigit(line[0]))
                         {
-                            string[] linex = line.Split(new char[] { ' ' }, StringSplitOptions.RemoveEmptyEntries);
-
-                            if (linex.Length >= 4)
-                            {
-                                string portdet = linex[0].Trim();
+                            string[] tokens = line.Split(new char[] { ' ' }, StringSplitOptions.RemoveEmptyEntries);
+
+                            if (tokens.Length >= 4)
+                            {
+                                string portdet = tokens[0].Trim();
                                 string portex = "Ex" + portdet;
                                 portex = portex.Replace('.', ':');

                                 if (interfacelive.ContainsKey(portex))
                                 {
-                                    interfacelive[portex].Enable = linex[1].Trim() == "Up";
-                                    interfacelive[portex].Protocol = linex[2].Trim() == "Yes";
-
-                                    string il3 = linex[3].Trim();
-                                    if (il3 == "Link") il3 = "Up";
+                                    interfacelive[portex].Enable = tokens[1].Trim() == "Up";
+                                    interfacelive[portex].Protocol = tokens[2].Trim() == "Yes";
+
+                                    string il3 = tokens[3].Trim();
+                                    int tokenShift = 0;
+
+                                    if (il3 == "Link")
+                                    {
+                                        il3 = "Up";
+                                        tokenShift = 1;
+                                    }

                                     interfacelive[portex].Status = il3 == "Up";
-
-                                    if (linex.Length >= 7)
+
+                                    if (tokens.Length >= (6 + tokenShift))
                                     {
-                                        string agr = linex[6].Trim();
+                                        // mtu
+                                        string cmtu = tokens[4 + tokenShift];
+                                        string omtu = tokens[5 + tokenShift];
+
+                                        if (int.TryParse(cmtu, out int icmtu)) interfacelive[portex].AdmMTU = icmtu == 0 ? -1 : icmtu;
+                                        else interfacelive[portex].AdmMTU = -1;
+
+                                        if (int.TryParse(omtu, out int iomtu)) interfacelive[portex].RunMTU = iomtu == 0 ? -1 : iomtu;
+                                        else interfacelive[portex].RunMTU = -1;
+                                    }
+
+                                    if (tokens.Length >= (7 + tokenShift))
+                                    {
+                                        string agr = tokens[6 + tokenShift].Trim();
                                         if (agr == "-") interfacelive[portex].Aggr = -1;
                                         else
                                         {
@@ -2095,34 +2120,46 @@
                                                 interfacelive.Add("Ag" + agr, mid);
                                             }
                                         }
-
-                                        if (linex.Length >= 10)
+                                    }
+
+                                    if (tokens.Length >= (9 + tokenShift))
+                                    {
+                                        // mode and encap
+                                        string mode = tokens[7 + tokenShift].Trim().ToUpper();
+                                        string encp = tokens[8 + tokenShift].Trim().ToUpper();
+
+                                        if (mode.Length > 0) interfacelive[portex].Mode = mode[0];
+                                        if (encp.Length > 0) interfacelive[portex].Encapsulation = encp == "NULL" ? '-' : encp[0];
+                                    }
+
+                                    if (tokens.Length >= (10 + tokenShift))
+                                    {
+                                        string typ = tokens[9 + tokenShift].Trim().ToLower();
+
+                                        string ity = null;
+                                        if (typ == "faste") ity = "Fa";
+                                        else if (typ == "xcme") ity = "Gi";
+                                        else if (typ == "xgige") ity = "Te";
+                                        else if (typ == "cgige") ity = "Hu";
+                                        else if (typ == "tdm") ity = "Se";
+
+                                        if (ity != null)
                                         {
-                                            string typ = linex[9].Trim().ToLower();
-
-                                            string ity = null;
-                                            if (typ == "faste") ity = "Fa";
-                                            else if (typ == "xcme") ity = "Gi";
-                                            else if (typ == "xgige") ity = "Te";
-                                            else if (typ == "cgige") ity = "Hu";
-                                            else if (typ == "tdm") ity = "Se";
-
-                                            if (ity != null)
-                                            {
-                                                interfacelive[portex].InterfaceType = ity;
-                                            }
-
-
-                                            //3/1/1       Up    Yes  Up      9212 9212    - accs dotq xcme   GIGE-LX  10KM
-                                            //1234567890123456789012345678901234567890123456789012345678901234567890123456789
-                                            //         1         2         3         4         5         6
-                                            if (line.Length >= 64)
-                                            {
-                                                string endinfo = line.Substring(63).Trim();
-
-                                                if (endinfo.Length > 0)
-                                                    interfacelive[portex].Info = endinfo;
-                                            }
+                                            interfacelive[portex].InterfaceType = ity;
+                                        }
+
+                                        //3/1/1       Up    Yes  Up      9212 9212    - accs dotq xcme   GIGE-LX  10KM
+                                        //4/2/12      Up    Yes  Link Up 9212 9212    2 netw null xcme   GIGE-LX  10KM
+
+                                        //1234567890123456789012345678901234567890123456789012345678901234567890123456789
+                                        //         1         2         3         4         5         6
+
+                                        if (line.Length >= 64)
+                                        {
+                                            string endinfo = line.Substring(63).Trim();
+
+                                            if (endinfo.Length > 0)
+                                                interfacelive[portex].Info = endinfo;
                                         }
                                     }

@@ -2300,9 +2337,7 @@
                         }
                     }
                 }
-
-
-
+
                 if (nodeVersion.StartsWith("TiMOS-B")) // sementara TiMOS-B ga bisa dapet deskripsi
                 {
                     if (Request("show service sap-using", out lines, probe)) return probe;
@@ -2801,11 +2836,11 @@
                 //main interface
                 if (nodeVersion == "5.90" || nodeVersion == "5.70")
                 {
-                    if (Request("display interface | in current state|down time|BW|bandwidth utilization", out lines, probe)) return probe;
+                    if (Request("display interface | in current state|down time|BW|bandwidth utilization|Maximum Transmit Unit", out lines, probe)) return probe;
                 }
                 else
                 {
-                    if (Request("display interface main | in current state|down time|BW|bandwidth utilization", out lines, probe)) return probe;
+                    if (Request("display interface main | in current state|down time|BW|bandwidth utilization|Maximum Transmit Unit", out lines, probe)) return probe;
                 }

                 MEInterfaceToDatabase currentInterfaceToDatabase = null;
@@ -2909,6 +2944,20 @@

                         currentInterfaceToDatabase = null;
                     }
+
+                    if (currentInterfaceToDatabase != null && line.IndexOf("Maximum Transmit Unit") > -1)
+                    {
+                        //,The Maximum Transmit Unit is 1600
+                        //     012345678901234567890123456789
+                        //               1         2
+                        int idx = line.IndexOf("Maximum Transmit");
+                        string cot = line.Substring(idx + 25).Split(new char[] { ' ', ',', '.' })[0].Trim();
+
+                        if (int.TryParse(cot, out int rmtu))
+                        {
+                            currentInterfaceToDatabase.RunMTU = rmtu;
+                        }
+                    }
                 }

                 if (Request("display interface brief", out lines, probe)) return probe;
@@ -2920,20 +2969,20 @@
                 {
                     if (begin)
                     {
-                        string poe = line.Trim().Split(StringSplitTypes.Space)[0].Trim();
+                        string lineTrim = line.Trim();
+                        string[] tokens = lineTrim.Split(StringSplitTypes.Space, StringSplitOptions.RemoveEmptyEntries);
+
+                        string poe = tokens[0].Trim();
+                        NetworkInterface inf = NetworkInterface.Parse(poe);

                         if (aggr > -1 && line.StartsWith(" "))
                         {
                             if (!poe.StartsWith("Eth-Trunk"))
-                            {
-                                NetworkInterface inf = NetworkInterface.Parse(poe);
+                            {
                                 if (inf != null)
                                 {
-                                    string normal = null;
-                                    // fix missing Hu and Te on huawei devices
-                                    if (inf.Type == "Hu") normal = "Gi" + inf.Interface;
-                                    else if (inf.Type == "Te") normal = "Gi" + inf.Interface;
-                                    else normal = inf.Name;
+                                    string normal = NetworkInterface.HuaweiName(inf);
+
                                     interfacelive[normal].Aggr = aggr;
                                 }
                             }
@@ -2950,16 +2999,12 @@
                         // untuk huawei 5.7 dan 5.9
                         if (nodeVersion == "5.70" || nodeVersion == "5.90")
                         {
-                            string lineTrim = line.Trim();
-                            string[] tokens = lineTrim.Split(StringSplitTypes.Space, StringSplitOptions.RemoveEmptyEntries);
-
                             // 0 => interface, 1 => status, 2 => protocol
                             if (tokens.Length >= 3)
                             {
-                                NetworkInterface nif = NetworkInterface.Parse(tokens[0]);
-                                if (nif != null)
-                                {
-                                    string ifname = nif.Name;
+                                if (inf != null)
+                                {
+                                    string ifname = NetworkInterface.HuaweiName(inf);

                                     if (interfacelive.ContainsKey(ifname))
                                     {
@@ -2970,6 +3015,22 @@
                                 }
                             }
                         }
+
+                        // fix interface type yg ga kebaca klo status protocol down
+                        if (inf != null)
+                        {
+                            string ifname = NetworkInterface.HuaweiName(inf);
+
+                            if (interfacelive.ContainsKey(ifname))
+                            {
+                                MEInterfaceToDatabase ive = interfacelive[ifname];
+
+                                if (ive.Status == false && inf.Type != ive.InterfaceType)
+                                {
+                                    ive.InterfaceType = inf.Type;
+                                }
+                            }
+                        }
                     }
                     else
                     {
@@ -3069,7 +3130,7 @@
                 }

                 // qos
-                if (Request("display cur int | in interface |qos-profile |qos\\ car\\ cir|user-queue |vlan-type\\ dot1q", out lines, probe)) return probe;
+                if (Request("display cur int | in interface |qos-profile |qos\\ car\\ cir|user-queue |vlan-type\\ dot1q|mtu ", out lines, probe)) return probe;

                 string currentInterface = null;
                 string currentParent = null;
@@ -3318,6 +3379,18 @@
                                 }
                             }
                         }
+                        else if (lineTrim.StartsWith("mtu"))
+                        {
+                            //mtu 1600
+                            //01234
+                            if (currentParent == null)
+                            {
+                                if (int.TryParse(lineTrim.Substring(4).Trim(), out int cmtu))
+                                {
+                                    interfacelive[currentInterface].AdmMTU = cmtu;
+                                }
+                            }
+                        }
                     }
                 }

@@ -3676,6 +3749,34 @@
                         u.UpdateCircuit = true;
                         u.CircuitID = li.CircuitID;
                         UpdateInfo(updateinfo, "circuit", db["MI_MC"].ToString(), li.CircuitID, true);
+                    }
+                    if (db["MI_Mode"].ToChar('-') != li.Mode)
+                    {
+                        update = true;
+                        u.UpdateMode = true;
+                        u.Mode = li.Mode;
+                        UpdateInfo(updateinfo, "mode", db["MI_Mode"].ToChar('-').NullableInfo(), li.Mode.NullableInfo());
+                    }
+                    if (db["MI_Encapsulation"].ToChar('-') != li.Encapsulation)
+                    {
+                        update = true;
+                        u.UpdateEncapsulation = true;
+                        u.Encapsulation = li.Encapsulation;
+                        UpdateInfo(updateinfo, "encapsulation", db["MI_Encapsulation"].ToChar('-').NullableInfo(), li.Mode.NullableInfo());
+                    }
+                    if (db["MI_MTU"].ToIntShort(-1) != li.RunMTU)
+                    {
+                        update = true;
+                        u.UpdateRunMTU = true;
+                        u.RunMTU = li.RunMTU;
+                        UpdateInfo(updateinfo, "operational-mtu", db["MI_MTU"].ToIntShort(-1).NullableInfo(), li.RunMTU.NullableInfo());
+                    }
+                    if (db["MI_MTU_Config"].ToIntShort(-1) != li.AdmMTU)
+                    {
+                        update = true;
+                        u.UpdateAdmMTU = true;
+                        u.AdmMTU = li.AdmMTU;
+                        UpdateInfo(updateinfo, "config-mtu", db["MI_MTU_Config"].ToIntShort(-1).NullableInfo(), li.AdmMTU.NullableInfo());
                     }
                     if (db["MI_Type"].ToString() != li.InterfaceType)
                     {
@@ -3848,6 +3949,10 @@
                 insert.Value("MI_MQ_Output", s.EgressID);
                 insert.Value("MI_Rate_Input", s.RateInput.Nullable(-1));
                 insert.Value("MI_Rate_Output", s.RateOutput.Nullable(-1));
+                insert.Value("MI_MTU", s.RunMTU.Nullable(-1));
+                insert.Value("MI_MTU_Config", s.AdmMTU.Nullable(-1));
+                insert.Value("MI_Mode", s.Mode.Nullable('-'));
+                insert.Value("MI_Encapsulation", s.Mode.Nullable('-'));
                 insert.Value("MI_Info", s.Info);
                 insert.Value("MI_SE", s.ServiceID);
                 insert.Value("MI_MI", s.ParentID);
@@ -3910,6 +4015,10 @@
                 update.Set("MI_MQ_Output", s.EgressID, s.UpdateEgressID);
                 update.Set("MI_Rate_Input", s.RateInput.Nullable(-1), s.UpdateRateInput);
                 update.Set("MI_Rate_Output", s.RateOutput.Nullable(-1), s.UpdateRateOutput);
+                update.Set("MI_MTU", s.RunMTU.Nullable(-1), s.UpdateRunMTU);
+                update.Set("MI_MTU_Config", s.AdmMTU.Nullable(-1), s.UpdateAdmMTU);
+                update.Set("MI_Mode", s.Mode.Nullable('-'), s.UpdateMode);
+                update.Set("MI_Encapsulation", s.Encapsulation.Nullable('-'), s.UpdateEncapsulation);
                 update.Set("MI_Info", s.Info, s.UpdateInfo);
                 update.Set("MI_LastDown", s.LastDown, s.UpdateLastDown);
                 update.Set("MI_Percentage_TrafficInput", s.TrafficInput.Nullable(-1), s.UpdateTrafficInput);


add licence header to Networking.cs

add licence header to Networking.cs

--- Net/Networking.cs
+++ Net/Networking.cs
@@ -1,4 +1,11 @@
-using System;
+/*
+ *      Copyright (c) 2014-2015, Liam McSherry
+ *      All Rights reserved.
+ *
+ *      Released under BSD 3-Clause licence. See terms in
+ *      /LICENCE, or online: http://opensource.org/licenses/BSD-3-Clause
+ */
+using System;
 using System.Collections.Generic;
 using System.Linq;
 using System.Text;


ウィンドウメッセージを再定義。ほぼすべて網羅。ボタンスタイル、ボタンメッセージを追加。

--- YKToolkit.Controls/Core/User32.cs
+++ YKToolkit.Controls/Core/User32.cs
@@ -468,6 +468,232 @@
         }
         #endregion WindowStyle

+        #region Button Control Style
+        /// <summary>
+        /// Button Control Style に関するパラメータを表します。
+        /// </summary>
+        public enum BSs : long
+        {
+            /// <summary>
+            /// Button Control Style - BS_PUSHBUTTON
+            /// </summary>
+            BS_PUSHBUTTON = 0x00000000L,
+
+            /// <summary>
+            /// Button Control Style - BS_DEFPUSHBUTTON
+            /// </summary>
+            BS_DEFPUSHBUTTON = 0x00000001L,
+
+            /// <summary>
+            /// Button Control Style - BS_CHECKBOX
+            /// </summary>
+            BS_CHECKBOX = 0x00000002L,
+
+            /// <summary>
+            /// Button Control Style - BS_AUTOCHECKBOX
+            /// </summary>
+            BS_AUTOCHECKBOX = 0x00000003L,
+
+            /// <summary>
+            /// Button Control Style - BS_RADIOBUTTON
+            /// </summary>
+            BS_RADIOBUTTON = 0x00000004L,
+
+            /// <summary>
+            /// Button Control Style - BS_3STATE
+            /// </summary>
+            BS_3STATE = 0x00000005L,
+
+            /// <summary>
+            /// Button Control Style - BS_AUTO3STATE
+            /// </summary>
+            BS_AUTO3STATE = 0x00000006L,
+
+            /// <summary>
+            /// Button Control Style - BS_GROUPBOX
+            /// </summary>
+            BS_GROUPBOX = 0x00000007L,
+
+            /// <summary>
+            /// Button Control Style - BS_USERBUTTON
+            /// </summary>
+            BS_USERBUTTON = 0x00000008L,
+
+            /// <summary>
+            /// Button Control Style - BS_AUTORADIOBUTTON
+            /// </summary>
+            BS_AUTORADIOBUTTON = 0x00000009L,
+
+            /// <summary>
+            /// Button Control Style - BS_PUSHBOX
+            /// </summary>
+            BS_PUSHBOX = 0x0000000AL,
+
+            /// <summary>
+            /// Button Control Style - BS_OWNERDRAW
+            /// </summary>
+            BS_OWNERDRAW = 0x0000000BL,
+
+            /// <summary>
+            /// Button Control Style - BS_TYPEMASK
+            /// </summary>
+            BS_TYPEMASK = 0x0000000FL,
+
+            /// <summary>
+            /// Button Control Style - BS_LEFTTEXT
+            /// </summary>
+            BS_LEFTTEXT = 0x00000020L,
+
+            /// <summary>
+            /// Button Control Style - BS_TEXT
+            /// </summary>
+            BS_TEXT = 0x00000000L,
+
+            /// <summary>
+            /// Button Control Style - BS_ICON
+            /// </summary>
+            BS_ICON = 0x00000040L,
+
+            /// <summary>
+            /// Button Control Style - BS_BITMAP
+            /// </summary>
+            BS_BITMAP = 0x00000080L,
+
+            /// <summary>
+            /// Button Control Style - BS_LEFT
+            /// </summary>
+            BS_LEFT = 0x00000100L,
+
+            /// <summary>
+            /// Button Control Style - BS_RIGHT
+            /// </summary>
+            BS_RIGHT = 0x00000200L,
+
+            /// <summary>
+            /// Button Control Style - BS_CENTER
+            /// </summary>
+            BS_CENTER = 0x00000300L,
+
+            /// <summary>
+            /// Button Control Style - BS_TOP
+            /// </summary>
+            BS_TOP = 0x00000400L,
+
+            /// <summary>
+            /// Button Control Style - BS_BOTTOM
+            /// </summary>
+            BS_BOTTOM = 0x00000800L,
+
+            /// <summary>
+            /// Button Control Style - BS_VCENTER
+            /// </summary>
+            BS_VCENTER = 0x00000C00L,
+
+            /// <summary>
+            /// Button Control Style - BS_PUSHLIKE
+            /// </summary>
+            BS_PUSHLIKE = 0x00001000L,
+
+            /// <summary>
+            /// Button Control Style - BS_MULTILINE
+            /// </summary>
+            BS_MULTILINE = 0x00002000L,
+
+            /// <summary>
+            /// Button Control Style - BS_NOTIFY
+            /// </summary>
+            BS_NOTIFY = 0x00004000L,
+
+            /// <summary>
+            /// Button Control Style - BS_FLAT
+            /// </summary>
+            BS_FLAT = 0x00008000L,
+
+            /// <summary>
+            /// Button Control Style - BS_RIGHTBUTTON
+            /// </summary>
+            BS_RIGHTBUTTON = BS_LEFTTEXT,
+        }
+        #endregion Button Control Style
+
+        #region Button Control Message
+        /// <summary>
+        /// Button Control Message に関するパラメータを表します。
+        /// </summary>
+        public enum BMs : long
+        {
+            /// <summary>
+            /// Button Control Message - BM_GETCHECK
+            /// </summary>
+            BM_GETCHECK = 0x00F0,
+
+            /// <summary>
+            /// Button Control Message - BM_SETCHECK
+            /// </summary>
+            BM_SETCHECK = 0x00F1,
+
+            /// <summary>
+            /// Button Control Message - BM_GETSTATE
+            /// </summary>
+            BM_GETSTATE = 0x00F2,
+
+            /// <summary>
+            /// Button Control Message - BM_SETSTATE
+            /// </summary>
+            BM_SETSTATE = 0x00F3,
+
+            /// <summary>
+            /// Button Control Message - BM_SETSTYLE
+            /// </summary>
+            BM_SETSTYLE = 0x00F4,
+
+            /// <summary>
+            /// Button Control Message - BM_CLICK
+            /// </summary>
+            BM_CLICK = 0x00F5,
+
+            /// <summary>
+            /// Button Control Message - BM_GETIMAGE
+            /// </summary>
+            BM_GETIMAGE = 0x00F6,
+
+            /// <summary>
+            /// Button Control Message - BM_SETIMAGE
+            /// </summary>
+            BM_SETIMAGE = 0x00F7,
+
+            /// <summary>
+            /// Button Control Message - BM_SETDONTCLICK
+            /// </summary>
+            BM_SETDONTCLICK = 0x00F8,
+
+            /// <summary>
+            /// Button Control Message - BST_UNCHECKED
+            /// </summary>
+            BST_UNCHECKED = 0x0000,
+
+            /// <summary>
+            /// Button Control Message - BST_CHECKED
+            /// </summary>
+            BST_CHECKED = 0x0001,
+
+            /// <summary>
+            /// Button Control Message - BST_INDETERMINATE
+            /// </summary>
+            BST_INDETERMINATE = 0x0002,
+
+            /// <summary>
+            /// Button Control Message - BST_PUSHED
+            /// </summary>
+            BST_PUSHED = 0x0004,
+
+            /// <summary>
+            /// Button Control Message - BST_FOCUS
+            /// </summary>
+            BST_FOCUS = 0x0008,
+        }
+        #endregion Button Control Message
+
         #region WindowPlacement
         /// <summary>
         /// ウィンドウのサイズや位置などの情報を含む構造体を表します。
@@ -657,16 +883,471 @@
         public enum WMs : int
         {
             /// <summary>
+            /// WindowMessage - WM_NULL
+            /// </summary>
+            WM_NULL = 0x0000,
+
+            /// <summary>
+            /// WindowMessage - WM_CREATE
+            /// </summary>
+            WM_CREATE = 0x0001,
+
+            /// <summary>
+            /// WindowMessage - WM_DESTROY
+            /// </summary>
+            WM_DESTROY = 0x0002,
+
+            /// <summary>
+            /// WindowMessage - WM_MOVE
+            /// </summary>
+            WM_MOVE = 0x0003,
+
+            /// <summary>
+            /// WindowMessage - WM_SIZE
+            /// </summary>
+            WM_SIZE = 0x0005,
+
+            /// <summary>
+            /// WindowMessage - WM_ACTIVATE
+            /// </summary>
+            WM_ACTIVATE = 0x0006,
+
+            /// <summary>
+            /// WindowMessage - WM_SETFOCUS
+            /// </summary>
+            WM_SETFOCUS = 0x0007,
+
+            /// <summary>
+            /// WindowMessage - WM_KILLFOCUS
+            /// </summary>
+            WM_KILLFOCUS = 0x0008,
+
+            /// <summary>
+            /// WindowMessage - WM_ENABLE
+            /// </summary>
+            WM_ENABLE = 0x000A,
+
+            /// <summary>
+            /// WindowMessage - WM_SETREDRAW
+            /// </summary>
+            WM_SETREDRAW = 0x000B,
+
+            /// <summary>
+            /// WindowMessage - WM_SETTEXT
+            /// </summary>
+            WM_SETTEXT = 0x000C,
+
+            /// <summary>
+            /// WindowMessage - WM_GETTEXT
+            /// </summary>
+            WM_GETTEXT = 0x000D,
+
+            /// <summary>
+            /// WindowMessage - WM_GETTEXTLENGTH
+            /// </summary>
+            WM_GETTEXTLENGTH = 0x000E,
+
+            /// <summary>
+            /// WindowMessage - WM_PAINT
+            /// </summary>
+            WM_PAINT = 0x000F,
+
+            /// <summary>
+            /// WindowMessage - WM_CLOSE
+            /// </summary>
+            WM_CLOSE = 0x0010,
+
+            /// <summary>
+            /// WindowMessage - WM_QUERYENDSESSION
+            /// </summary>
+            WM_QUERYENDSESSION = 0x0011,
+
+            /// <summary>
+            /// WindowMessage - WM_QUERYOPEN
+            /// </summary>
+            WM_QUERYOPEN = 0x0013,
+
+            /// <summary>
+            /// WindowMessage - WM_ENDSESSION
+            /// </summary>
+            WM_ENDSESSION = 0x0016,
+
+            /// <summary>
+            /// WindowMessage - WM_QUIT
+            /// </summary>
+            WM_QUIT = 0x0012,
+
+            /// <summary>
+            /// WindowMessage - WM_ERASEBKGND
+            /// </summary>
+            WM_ERASEBKGND = 0x0014,
+
+            /// <summary>
+            /// WindowMessage - WM_SYSCOLORCHANGE
+            /// </summary>
+            WM_SYSCOLORCHANGE = 0x0015,
+
+            /// <summary>
+            /// WindowMessage - WM_SHOWWINDOW
+            /// </summary>
+            WM_SHOWWINDOW = 0x0018,
+
+            /// <summary>
+            /// WindowMessage - WM_WININICHANGE
+            /// </summary>
+            WM_WININICHANGE = 0x001A,
+
+            /// <summary>
+            /// WindowMessage - WM_DEVMODECHANGE
+            /// </summary>
+            WM_DEVMODECHANGE = 0x001B,
+
+            /// <summary>
+            /// WindowMessage - WM_ACTIVATEAPP
+            /// </summary>
+            WM_ACTIVATEAPP = 0x001C,
+
+            /// <summary>
+            /// WindowMessage - WM_FONTCHANGE
+            /// </summary>
+            WM_FONTCHANGE = 0x001D,
+
+            /// <summary>
+            /// WindowMessage - WM_TIMECHANGE
+            /// </summary>
+            WM_TIMECHANGE = 0x001E,
+
+            /// <summary>
+            /// WindowMessage - WM_CANCELMODE
+            /// </summary>
+            WM_CANCELMODE = 0x001F,
+
+            /// <summary>
+            /// WindowMessage - WM_SETCURSOR
+            /// </summary>
+            WM_SETCURSOR = 0x0020,
+
+            /// <summary>
+            /// WindowMessage - WM_MOUSEACTIVATE
+            /// </summary>
+            WM_MOUSEACTIVATE = 0x0021,
+
+            /// <summary>
+            /// WindowMessage - WM_CHILDACTIVATE
+            /// </summary>
+            WM_CHILDACTIVATE = 0x0022,
+
+            /// <summary>
+            /// WindowMessage - WM_QUEUESYNC
+            /// </summary>
+            WM_QUEUESYNC = 0x0023,
+
+            /// <summary>
+            /// WindowMessage - WM_GETMINMAXINFO
+            /// </summary>
+            WM_GETMINMAXINFO = 0x0024,
+
+            /// <summary>
+            /// WindowMessage - WM_PAINTICON
+            /// </summary>
+            WM_PAINTICON = 0x0026,
+
+            /// <summary>
+            /// WindowMessage - WM_ICONERASEBKGND
+            /// </summary>
+            WM_ICONERASEBKGND = 0x0027,
+
+            /// <summary>
+            /// WindowMessage - WM_NEXTDLGCTL
+            /// </summary>
+            WM_NEXTDLGCTL = 0x0028,
+
+            /// <summary>
+            /// WindowMessage - WM_SPOOLERSTATUS
+            /// </summary>
+            WM_SPOOLERSTATUS = 0x002A,
+
+            /// <summary>
+            /// WindowMessage - WM_DRAWITEM
+            /// </summary>
+            WM_DRAWITEM = 0x002B,
+
+            /// <summary>
+            /// WindowMessage - WM_MEASUREITEM
+            /// </summary>
+            WM_MEASUREITEM = 0x002C,
+
+            /// <summary>
+            /// WindowMessage - WM_DELETEITEM
+            /// </summary>
+            WM_DELETEITEM = 0x002D,
+
+            /// <summary>
+            /// WindowMessage - WM_VKEYTOITEM
+            /// </summary>
+            WM_VKEYTOITEM = 0x002E,
+
+            /// <summary>
+            /// WindowMessage - WM_CHARTOITEM
+            /// </summary>
+            WM_CHARTOITEM = 0x002F,
+
+            /// <summary>
+            /// WindowMessage - WM_SETFONT
+            /// </summary>
+            WM_SETFONT = 0x0030,
+
+            /// <summary>
+            /// WindowMessage - WM_GETFONT
+            /// </summary>
+            WM_GETFONT = 0x0031,
+
+            /// <summary>
+            /// WindowMessage - WM_SETHOTKEY
+            /// </summary>
+            WM_SETHOTKEY = 0x0032,
+
+            /// <summary>
+            /// WindowMessage - WM_GETHOTKEY
+            /// </summary>
+            WM_GETHOTKEY = 0x0033,
+
+            /// <summary>
+            /// WindowMessage - WM_QUERYDRAGICON
+            /// </summary>
+            WM_QUERYDRAGICON = 0x0037,
+
+            /// <summary>
+            /// WindowMessage - WM_COMPAREITEM
+            /// </summary>
+            WM_COMPAREITEM = 0x0039,
+
+            /// <summary>
+            /// WindowMessage - WM_GETOBJECT
+            /// </summary>
+            WM_GETOBJECT = 0x003D,
+
+            /// <summary>
+            /// WindowMessage - WM_COMPACTING
+            /// </summary>
+            WM_COMPACTING = 0x0041,
+
+            /// <summary>
+            /// WindowMessage - WM_COMMNOTIFY
+            /// </summary>
+            WM_COMMNOTIFY = 0x0044,
+
+            /// <summary>
+            /// WindowMessage - WM_WINDOWPOSCHANGING
+            /// </summary>
+            WM_WINDOWPOSCHANGING = 0x0046,
+
+            /// <summary>
+            /// WindowMessage - WM_WINDOWPOSCHANGED
+            /// </summary>
+            WM_WINDOWPOSCHANGED = 0x0047,
+
+            /// <summary>
+            /// WindowMessage - WM_POWER
+            /// </summary>
+            WM_POWER = 0x0048,
+
+            /// <summary>
             /// WindowMessage - WM_COPYDATA
             /// </summary>
             WM_COPYDATA = 0x004A,

             /// <summary>
+            /// WindowMessage - WM_CANCELJOURNAL
+            /// </summary>
+            WM_CANCELJOURNAL = 0x004B,
+
+            /// <summary>
+            /// WindowMessage - WM_NOTIFY
+            /// </summary>
+            WM_NOTIFY = 0x004E,
+
+            /// <summary>
+            /// WindowMessage - WM_INPUTLANGCHANGEREQUEST
+            /// </summary>
+            WM_INPUTLANGCHANGEREQUEST = 0x0050,
+
+            /// <summary>
+            /// WindowMessage - WM_INPUTLANGCHANGE
+            /// </summary>
+            WM_INPUTLANGCHANGE = 0x0051,
+
+            /// <summary>
+            /// WindowMessage - WM_TCARD
+            /// </summary>
+            WM_TCARD = 0x0052,
+
+            /// <summary>
+            /// WindowMessage - WM_HELP
+            /// </summary>
+            WM_HELP = 0x0053,
+
+            /// <summary>
+            /// WindowMessage - WM_USERCHANGED
+            /// </summary>
+            WM_USERCHANGED = 0x0054,
+
+            /// <summary>
+            /// WindowMessage - WM_NOTIFYFORMAT
+            /// </summary>
+            WM_NOTIFYFORMAT = 0x0055,
+
+            /// <summary>
+            /// WindowMessage - WM_CONTEXTMENU
+            /// </summary>
+            WM_CONTEXTMENU = 0x007B,
+
+            /// <summary>
+            /// WindowMessage - WM_STYLECHANGING
+            /// </summary>
+            WM_STYLECHANGING = 0x007C,
+
+            /// <summary>
+            /// WindowMessage - WM_STYLECHANGED
+            /// </summary>
+            WM_STYLECHANGED = 0x007D,
+
+            /// <summary>
+            /// WindowMessage - WM_DISPLAYCHANGE
+            /// </summary>
+            WM_DISPLAYCHANGE = 0x007E,
+
+            /// <summary>
+            /// WindowMessage - WM_GETICON
+            /// </summary>
+            WM_GETICON = 0x007F,
+
+            /// <summary>
+            /// WindowMessage - WM_SETICON
+            /// </summary>
+            WM_SETICON = 0x0080,
+
+            /// <summary>
+            /// WindowMessage - WM_NCCREATE
+            /// </summary>
+            WM_NCCREATE = 0x0081,
+
+            /// <summary>
+            /// WindowMessage - WM_NCDESTROY
+            /// </summary>
+            WM_NCDESTROY = 0x0082,
+
+            /// <summary>
+            /// WindowMessage - WM_NCCALCSIZE
+            /// </summary>
+            WM_NCCALCSIZE = 0x0083,
+
+            /// <summary>
+            /// WindowMessage - WM_NCHITTEST
+            /// </summary>
+            WM_NCHITTEST = 0x0084,
+
+            /// <summary>
+            /// WindowMessage - WM_NCPAINT
+            /// </summary>
+            WM_NCPAINT = 0x0085,
+
+            /// <summary>
+            /// WindowMessage - WM_NCACTIVATE
+            /// </summary>
+            WM_NCACTIVATE = 0x0086,
+
+            /// <summary>
+            /// WindowMessage - WM_GETDLGCODE
+            /// </summary>
+            WM_GETDLGCODE = 0x0087,
+
+            /// <summary>
+            /// WindowMessage - WM_SYNCPAINT
+            /// </summary>
+            WM_SYNCPAINT = 0x0088,
+
+            /// <summary>
+            /// WindowMessage - WM_NCMOUSEMOVE
+            /// </summary>
+            WM_NCMOUSEMOVE = 0x00A0,
+
+            /// <summary>
+            /// WindowMessage - WM_NCLBUTTONDOWN
+            /// </summary>
+            WM_NCLBUTTONDOWN = 0x00A1,
+
+            /// <summary>
+            /// WindowMessage - WM_NCLBUTTONUP
+            /// </summary>
+            WM_NCLBUTTONUP = 0x00A2,
+
+            /// <summary>
             /// WindowMessage - WM_NCLBUTTONDBLCLK
             /// </summary>
             WM_NCLBUTTONDBLCLK = 0x00A3,

             /// <summary>
+            /// WindowMessage - WM_NCRBUTTONDOWN
+            /// </summary>
+            WM_NCRBUTTONDOWN = 0x00A4,
+
+            /// <summary>
+            /// WindowMessage - WM_NCRBUTTONUP
+            /// </summary>
+            WM_NCRBUTTONUP = 0x00A5,
+
+            /// <summary>
+            /// WindowMessage - WM_NCRBUTTONDBLCLK
+            /// </summary>
+            WM_NCRBUTTONDBLCLK = 0x00A6,
+
+            /// <summary>
+            /// WindowMessage - WM_NCMBUTTONDOWN
+            /// </summary>
+            WM_NCMBUTTONDOWN = 0x00A7,
+
+            /// <summary>
+            /// WindowMessage - WM_NCMBUTTONUP
+            /// </summary>
+            WM_NCMBUTTONUP = 0x00A8,
+
+            /// <summary>
+            /// WindowMessage - WM_NCMBUTTONDBLCLK
+            /// </summary>
+            WM_NCMBUTTONDBLCLK = 0x00A9,
+
+            /// <summary>
+            /// WindowMessage - WM_NCXBUTTONDOWN
+            /// </summary>
+            WM_NCXBUTTONDOWN = 0x00AB,
+
+            /// <summary>
+            /// WindowMessage - WM_NCXBUTTONUP
+            /// </summary>
+            WM_NCXBUTTONUP = 0x00AC,
+
+            /// <summary>
+            /// WindowMessage - WM_NCXBUTTONDBLCLK
+            /// </summary>
+            WM_NCXBUTTONDBLCLK = 0x00AD,
+
+            /// <summary>
+            /// WindowMessage - WM_INPUT_DEVICE_CHANGE
+            /// </summary>
+            WM_INPUT_DEVICE_CHANGE = 0x00FE,
+
+            /// <summary>
+            /// WindowMessage - WM_INPUT
+            /// </summary>
+            WM_INPUT = 0x00FF,
+
+            /// <summary>
+            /// WindowMessage - WM_KEYFIRST
+            /// </summary>
+            WM_KEYFIRST = 0x0100,
+
+            /// <summary>
             /// WindowMessage - WM_KEYDOWN
             /// </summary>
             WM_KEYDOWN = 0x0100,
@@ -682,6 +1363,11 @@
             WM_CHAR = 0x0102,

             /// <summary>
+            /// WindowMessage - WM_DEADCHAR
+            /// </summary>
+            WM_DEADCHAR = 0x0103,
+
+            /// <summary>
             /// WindowMessage - WM_SYSKEYDOWN
             /// </summary>
             WM_SYSKEYDOWN = 0x0104,
@@ -692,59 +1378,754 @@
             WM_SYSKEYUP = 0x0105,

             /// <summary>
+            /// WindowMessage - WM_SYSCHAR
+            /// </summary>
+            WM_SYSCHAR = 0x0106,
+
+            /// <summary>
+            /// WindowMessage - WM_SYSDEADCHAR
+            /// </summary>
+            WM_SYSDEADCHAR = 0x0107,
+
+            /// <summary>
+            /// WindowMessage - WM_UNICHAR
+            /// </summary>
+            WM_UNICHAR = 0x0109,
+
+            /// <summary>
+            /// WindowMessage - WM_KEYLAST
+            /// </summary>
+            WM_KEYLAST = 0x0108,
+
+            /// <summary>
+            /// WindowMessage - WM_IME_STARTCOMPOSITION
+            /// </summary>
+            WM_IME_STARTCOMPOSITION = 0x010D,
+
+            /// <summary>
+            /// WindowMessage - WM_IME_ENDCOMPOSITION
+            /// </summary>
+            WM_IME_ENDCOMPOSITION = 0x010E,
+
+            /// <summary>
+            /// WindowMessage - WM_IME_COMPOSITION
+            /// </summary>
+            WM_IME_COMPOSITION = 0x010F,
+
+            /// <summary>
+            /// WindowMessage - WM_IME_KEYLAST
+            /// </summary>
+            WM_IME_KEYLAST = 0x010F,
+
+            /// <summary>
+            /// WindowMessage - WM_INITDIALOG
+            /// </summary>
+            WM_INITDIALOG = 0x0110,
+
+            /// <summary>
+            /// WindowMessage - WM_COMMAND
+            /// </summary>
+            WM_COMMAND = 0x0111,
+
+            /// <summary>
             /// WindowMessage - WM_SYSCOMMAND
             /// </summary>
             WM_SYSCOMMAND = 0x0112,

             /// <summary>
+            /// WindowMessage - WM_TIMER
+            /// </summary>
+            WM_TIMER = 0x0113,
+
+            /// <summary>
+            /// WindowMessage - WM_HSCROLL
+            /// </summary>
+            WM_HSCROLL = 0x0114,
+
+            /// <summary>
+            /// WindowMessage - WM_VSCROLL
+            /// </summary>
+            WM_VSCROLL = 0x0115,
+
+            /// <summary>
+            /// WindowMessage - WM_INITMENU
+            /// </summary>
+            WM_INITMENU = 0x0116,
+
+            /// <summary>
+            /// WindowMessage - WM_INITMENUPOPUP
+            /// </summary>
+            WM_INITMENUPOPUP = 0x0117,
+
+            /// <summary>
+            /// WindowMessage - WM_GESTURE
+            /// </summary>
+            WM_GESTURE = 0x0119,
+
+            /// <summary>
+            /// WindowMessage - WM_GESTURENOTIFY
+            /// </summary>
+            WM_GESTURENOTIFY = 0x011A,
+
+            /// <summary>
+            /// WindowMessage - WM_MENUSELECT
+            /// </summary>
+            WM_MENUSELECT = 0x011F,
+
+            /// <summary>
+            /// WindowMessage - WM_MENUCHAR
+            /// </summary>
+            WM_MENUCHAR = 0x0120,
+
+            /// <summary>
+            /// WindowMessage - WM_ENTERIDLE
+            /// </summary>
+            WM_ENTERIDLE = 0x0121,
+
+            /// <summary>
+            /// WindowMessage - WM_MENURBUTTONUP
+            /// </summary>
+            WM_MENURBUTTONUP = 0x0122,
+
+            /// <summary>
+            /// WindowMessage - WM_MENUDRAG
+            /// </summary>
+            WM_MENUDRAG = 0x0123,
+
+            /// <summary>
+            /// WindowMessage - WM_MENUGETOBJECT
+            /// </summary>
+            WM_MENUGETOBJECT = 0x0124,
+
+            /// <summary>
+            /// WindowMessage - WM_UNINITMENUPOPUP
+            /// </summary>
+            WM_UNINITMENUPOPUP = 0x0125,
+
+            /// <summary>
+            /// WindowMessage - WM_MENUCOMMAND
+            /// </summary>
+            WM_MENUCOMMAND = 0x0126,
+
+            /// <summary>
+            /// WindowMessage - WM_CHANGEUISTATE
+            /// </summary>
+            WM_CHANGEUISTATE = 0x0127,
+
+            /// <summary>
+            /// WindowMessage - WM_UPDATEUISTATE
+            /// </summary>
+            WM_UPDATEUISTATE = 0x0128,
+
+            /// <summary>
+            /// WindowMessage - WM_QUERYUISTATE
+            /// </summary>
+            WM_QUERYUISTATE = 0x0129,
+
+            /// <summary>
+            /// WindowMessage - WM_CTLCOLORMSGBOX
+            /// </summary>
+            WM_CTLCOLORMSGBOX = 0x0132,
+
+            /// <summary>
+            /// WindowMessage - WM_CTLCOLOREDIT
+            /// </summary>
+            WM_CTLCOLOREDIT = 0x0133,
+
+            /// <summary>
+            /// WindowMessage - WM_CTLCOLORLISTBOX
+            /// </summary>
+            WM_CTLCOLORLISTBOX = 0x0134,
+
+            /// <summary>
+            /// WindowMessage - WM_CTLCOLORBTN
+            /// </summary>
+            WM_CTLCOLORBTN = 0x0135,
+
+            /// <summary>
+            /// WindowMessage - WM_CTLCOLORDLG
+            /// </summary>
+            WM_CTLCOLORDLG = 0x0136,
+
+            /// <summary>
+            /// WindowMessage - WM_CTLCOLORSCROLLBAR
+            /// </summary>
+            WM_CTLCOLORSCROLLBAR = 0x0137,
+
+            /// <summary>
+            /// WindowMessage - WM_CTLCOLORSTATIC
+            /// </summary>
+            WM_CTLCOLORSTATIC = 0x0138,
+
+            /// <summary>
+            /// WindowMessage - MN_GETHMENU
+            /// </summary>
+            MN_GETHMENU = 0x01E1,
+
+            /// <summary>
+            /// WindowMessage - WM_MOUSEFIRST
+            /// </summary>
+            WM_MOUSEFIRST = 0x0200,
+
+            /// <summary>
+            /// WindowMessage - WM_MOUSEMOVE
+            /// </summary>
+            WM_MOUSEMOVE = 0x0200,
+
+            /// <summary>
+            /// WindowMessage - WM_LBUTTONDOWN
+            /// </summary>
+            WM_LBUTTONDOWN = 0x0201,
+
+            /// <summary>
+            /// WindowMessage - WM_LBUTTONUP
+            /// </summary>
+            WM_LBUTTONUP = 0x0202,
+
+            /// <summary>
+            /// WindowMessage - WM_LBUTTONDBLCLK
+            /// </summary>
+            WM_LBUTTONDBLCLK = 0x0203,
+
+            /// <summary>
+            /// WindowMessage - WM_RBUTTONDOWN
+            /// </summary>
+            WM_RBUTTONDOWN = 0x0204,
+
+            /// <summary>
+            /// WindowMessage - WM_RBUTTONUP
+            /// </summary>
+            WM_RBUTTONUP = 0x0205,
+
+            /// <summary>
+            /// WindowMessage - WM_RBUTTONDBLCLK
+            /// </summary>
+            WM_RBUTTONDBLCLK = 0x0206,
+
+            /// <summary>
+            /// WindowMessage - WM_MBUTTONDOWN
+            /// </summary>
+            WM_MBUTTONDOWN = 0x0207,
+
+            /// <summary>
+            /// WindowMessage - WM_MBUTTONUP
+            /// </summary>
+            WM_MBUTTONUP = 0x0208,
+
+            /// <summary>
+            /// WindowMessage - WM_MBUTTONDBLCLK
+            /// </summary>
+            WM_MBUTTONDBLCLK = 0x0209,
+
+            /// <summary>
+            /// WindowMessage - WM_MOUSEWHEEL
+            /// </summary>
+            WM_MOUSEWHEEL = 0x020A,
+
+            /// <summary>
+            /// WindowMessage - WM_XBUTTONDOWN
+            /// </summary>
+            WM_XBUTTONDOWN = 0x020B,
+
+            /// <summary>
+            /// WindowMessage - WM_XBUTTONUP
+            /// </summary>
+            WM_XBUTTONUP = 0x020C,
+
+            /// <summary>
+            /// WindowMessage - WM_XBUTTONDBLCLK
+            /// </summary>
+            WM_XBUTTONDBLCLK = 0x020D,
+
+            /// <summary>
+            /// WindowMessage - WM_MOUSEHWHEEL
+            /// </summary>
+            WM_MOUSEHWHEEL = 0x020E,
+
+            /// <summary>
+            /// WindowMessage - WM_PARENTNOTIFY
+            /// </summary>
+            WM_PARENTNOTIFY = 0x0210,
+
+            /// <summary>
+            /// WindowMessage - WM_ENTERMENULOOP
+            /// </summary>
+            WM_ENTERMENULOOP = 0x0211,
+
+            /// <summary>
+            /// WindowMessage - WM_EXITMENULOOP
+            /// </summary>
+            WM_EXITMENULOOP = 0x0212,
+
+            /// <summary>
+            /// WindowMessage - WM_NEXTMENU
+            /// </summary>
+            WM_NEXTMENU = 0x0213,
+
+            /// <summary>
+            /// WindowMessage - WM_SIZING
+            /// </summary>
+            WM_SIZING = 0x0214,
+
+            /// <summary>
+            /// WindowMessage - WM_CAPTURECHANGED
+            /// </summary>
+            WM_CAPTURECHANGED = 0x0215,
+
+            /// <summary>
+            /// WindowMessage - WM_MOVING
+            /// </summary>
+            WM_MOVING = 0x0216,
+
+            /// <summary>
+            /// WindowMessage - WM_POWERBROADCAST
+            /// </summary>
+            WM_POWERBROADCAST = 0x0218,
+
+            /// <summary>
+            /// WindowMessage - WM_DEVICECHANGE
+            /// </summary>
+            WM_DEVICECHANGE = 0x0219,
+
+            /// <summary>
+            /// WindowMessage - WM_MDICREATE
+            /// </summary>
+            WM_MDICREATE = 0x0220,
+
+            /// <summary>
+            /// WindowMessage - WM_MDIDESTROY
+            /// </summary>
+            WM_MDIDESTROY = 0x0221,
+
+            /// <summary>
+            /// WindowMessage - WM_MDIACTIVATE
+            /// </summary>
+            WM_MDIACTIVATE = 0x0222,
+
+            /// <summary>
+            /// WindowMessage - WM_MDIRESTORE
+            /// </summary>
+            WM_MDIRESTORE = 0x0223,
+
+            /// <summary>
+            /// WindowMessage - WM_MDINEXT
+            /// </summary>
+            WM_MDINEXT = 0x0224,
+
+            /// <summary>
+            /// WindowMessage - WM_MDIMAXIMIZE
+            /// </summary>
+            WM_MDIMAXIMIZE = 0x0225,
+
+            /// <summary>
+            /// WindowMessage - WM_MDITILE
+            /// </summary>
+            WM_MDITILE = 0x0226,
+
+            /// <summary>
+            /// WindowMessage - WM_MDICASCADE
+            /// </summary>
+            WM_MDICASCADE = 0x0227,
+
+            /// <summary>
+            /// WindowMessage - WM_MDIICONARRANGE
+            /// </summary>
+            WM_MDIICONARRANGE = 0x0228,
+
+            /// <summary>
+            /// WindowMessage - WM_MDIGETACTIVE
+            /// </summary>
+            WM_MDIGETACTIVE = 0x0229,
+
+            /// <summary>
+            /// WindowMessage - WM_MDISETMENU
+            /// </summary>
+            WM_MDISETMENU = 0x0230,
+
+            /// <summary>
+            /// WindowMessage - WM_ENTERSIZEMOVE
+            /// </summary>
+            WM_ENTERSIZEMOVE = 0x0231,
+
+            /// <summary>
+            /// WindowMessage - WM_EXITSIZEMOVE
+            /// </summary>
+            WM_EXITSIZEMOVE = 0x0232,
+
+            /// <summary>
+            /// WindowMessage - WM_DROPFILES
+            /// </summary>
+            WM_DROPFILES = 0x0233,
+
+            /// <summary>
+            /// WindowMessage - WM_MDIREFRESHMENU
+            /// </summary>
+            WM_MDIREFRESHMENU = 0x0234,
+
+            /// <summary>
+            /// WindowMessage - WM_POINTERDEVICECHANGE
+            /// </summary>
+            WM_POINTERDEVICECHANGE = 0x0238,
+
+            /// <summary>
+            /// WindowMessage - WM_POINTERDEVICEINRANGE
+            /// </summary>
+            WM_POINTERDEVICEINRANGE = 0x0239,
+
+            /// <summary>
+            /// WindowMessage - WM_POINTERDEVICEOUTOFRANGE
+            /// </summary>
+            WM_POINTERDEVICEOUTOFRANGE = 0x023A,
+
+            /// <summary>
+            /// WindowMessage - WM_TOUCH
+            /// </summary>
+            WM_TOUCH = 0x0240,
+
+            /// <summary>
+            /// WindowMessage - WM_NCPOINTERUPDATE
+            /// </summary>
+            WM_NCPOINTERUPDATE = 0x0241,
+
+            /// <summary>
+            /// WindowMessage - WM_NCPOINTERDOWN
+            /// </summary>
+            WM_NCPOINTERDOWN = 0x0242,
+
+            /// <summary>
+            /// WindowMessage - WM_NCPOINTERUP
+            /// </summary>
+            WM_NCPOINTERUP = 0x0243,
+
+            /// <summary>
+            /// WindowMessage - WM_POINTERUPDATE
+            /// </summary>
+            WM_POINTERUPDATE = 0x0245,
+
+            /// <summary>
+            /// WindowMessage - WM_POINTERDOWN
+            /// </summary>
+            WM_POINTERDOWN = 0x0246,
+
+            /// <summary>
+            /// WindowMessage - WM_POINTERUP
+            /// </summary>
+            WM_POINTERUP = 0x0247,
+
+            /// <summary>
+            /// WindowMessage - WM_POINTERENTER
+            /// </summary>
+            WM_POINTERENTER = 0x0249,
+
+            /// <summary>
+            /// WindowMessage - WM_POINTERLEAVE
+            /// </summary>
+            WM_POINTERLEAVE = 0x024A,
+
+            /// <summary>
+            /// WindowMessage - WM_POINTERACTIVATE
+            /// </summary>
+            WM_POINTERACTIVATE = 0x024B,
+
+            /// <summary>
+            /// WindowMessage - WM_POINTERCAPTURECHANGED
+            /// </summary>
+            WM_POINTERCAPTURECHANGED = 0x024C,
+
+            /// <summary>
+            /// WindowMessage - WM_TOUCHHITTESTING
+            /// </summary>
+            WM_TOUCHHITTESTING = 0x024D,
+
+            /// <summary>
+            /// WindowMessage - WM_POINTERWHEEL
+            /// </summary>
+            WM_POINTERWHEEL = 0x024E,
+
+            /// <summary>
+            /// WindowMessage - WM_POINTERHWHEEL
+            /// </summary>
+            WM_POINTERHWHEEL = 0x024F,
+
+            /// <summary>
+            /// WindowMessage - DM_POINTERHITTEST
+            /// </summary>
+            DM_POINTERHITTEST = 0x0250,
+
+            /// <summary>
+            /// WindowMessage - WM_IME_SETCONTEXT
+            /// </summary>
+            WM_IME_SETCONTEXT = 0x0281,
+
+            /// <summary>
+            /// WindowMessage - WM_IME_NOTIFY
+            /// </summary>
+            WM_IME_NOTIFY = 0x0282,
+
+            /// <summary>
+            /// WindowMessage - WM_IME_CONTROL
+            /// </summary>
+            WM_IME_CONTROL = 0x0283,
+
+            /// <summary>
+            /// WindowMessage - WM_IME_COMPOSITIONFULL
+            /// </summary>
+            WM_IME_COMPOSITIONFULL = 0x0284,
+
+            /// <summary>
+            /// WindowMessage - WM_IME_SELECT
+            /// </summary>
+            WM_IME_SELECT = 0x0285,
+
+            /// <summary>
+            /// WindowMessage - WM_IME_CHAR
+            /// </summary>
+            WM_IME_CHAR = 0x0286,
+
+            /// <summary>
+            /// WindowMessage - WM_IME_REQUEST
+            /// </summary>
+            WM_IME_REQUEST = 0x0288,
+
+            /// <summary>
+            /// WindowMessage - WM_IME_KEYDOWN
+            /// </summary>
+            WM_IME_KEYDOWN = 0x0290,
+
+            /// <summary>
+            /// WindowMessage - WM_IME_KEYUP
+            /// </summary>
+            WM_IME_KEYUP = 0x0291,
+
+            /// <summary>
+            /// WindowMessage - WM_MOUSEHOVER
+            /// </summary>
+            WM_MOUSEHOVER = 0x02A1,
+
+            /// <summary>
+            /// WindowMessage - WM_MOUSELEAVE
+            /// </summary>
+            WM_MOUSELEAVE = 0x02A3,
+
+            /// <summary>
+            /// WindowMessage - WM_NCMOUSEHOVER
+            /// </summary>
+            WM_NCMOUSEHOVER = 0x02A0,
+
+            /// <summary>
+            /// WindowMessage - WM_NCMOUSELEAVE
+            /// </summary>
+            WM_NCMOUSELEAVE = 0x02A2,
+
+            /// <summary>
+            /// WindowMessage - WM_WTSSESSION_CHANGE
+            /// </summary>
+            WM_WTSSESSION_CHANGE = 0x02B1,
+
+            /// <summary>
+            /// WindowMessage - WM_TABLET_FIRST
+            /// </summary>
+            WM_TABLET_FIRST = 0x02c0,
+
+            /// <summary>
+            /// WindowMessage - WM_TABLET_LAST
+            /// </summary>
+            WM_TABLET_LAST = 0x02df,
+
+            /// <summary>
+            /// WindowMessage - WM_DPICHANGED
+            /// </summary>
+            WM_DPICHANGED = 0x02E0,
+
+            /// <summary>
+            /// WindowMessage - WM_CUT
+            /// </summary>
+            WM_CUT = 0x0300,
+
+            /// <summary>
+            /// WindowMessage - WM_COPY
+            /// </summary>
+            WM_COPY = 0x0301,
+
+            /// <summary>
+            /// WindowMessage - WM_PASTE
+            /// </summary>
+            WM_PASTE = 0x0302,
+
+            /// <summary>
+            /// WindowMessage - WM_CLEAR
+            /// </summary>
+            WM_CLEAR = 0x0303,
+
+            /// <summary>
+            /// WindowMessage - WM_UNDO
+            /// </summary>
+            WM_UNDO = 0x0304,
+
+            /// <summary>
+            /// WindowMessage - WM_RENDERFORMAT
+            /// </summary>
+            WM_RENDERFORMAT = 0x0305,
+
+            /// <summary>
+            /// WindowMessage - WM_RENDERALLFORMATS
+            /// </summary>
+            WM_RENDERALLFORMATS = 0x0306,
+
+            /// <summary>
+            /// WindowMessage - WM_DESTROYCLIPBOARD
+            /// </summary>
+            WM_DESTROYCLIPBOARD = 0x0307,
+
+            /// <summary>
+            /// WindowMessage - WM_DRAWCLIPBOARD
+            /// </summary>
+            WM_DRAWCLIPBOARD = 0x0308,
+
+            /// <summary>
+            /// WindowMessage - WM_PAINTCLIPBOARD
+            /// </summary>
+            WM_PAINTCLIPBOARD = 0x0309,
+
+            /// <summary>
+            /// WindowMessage - WM_VSCROLLCLIPBOARD
+            /// </summary>
+            WM_VSCROLLCLIPBOARD = 0x030A,
+
+            /// <summary>
+            /// WindowMessage - WM_SIZECLIPBOARD
+            /// </summary>
+            WM_SIZECLIPBOARD = 0x030B,
+
+            /// <summary>
+            /// WindowMessage - WM_ASKCBFORMATNAME
+            /// </summary>
+            WM_ASKCBFORMATNAME = 0x030C,
+
+            /// <summary>
+            /// WindowMessage - WM_CHANGECBCHAIN
+            /// </summary>
+            WM_CHANGECBCHAIN = 0x030D,
+
+            /// <summary>
+            /// WindowMessage - WM_HSCROLLCLIPBOARD
+            /// </summary>
+            WM_HSCROLLCLIPBOARD = 0x030E,
+
+            /// <summary>
+            /// WindowMessage - WM_QUERYNEWPALETTE
+            /// </summary>
+            WM_QUERYNEWPALETTE = 0x030F,
+
+            /// <summary>
+            /// WindowMessage - WM_PALETTEISCHANGING
+            /// </summary>
+            WM_PALETTEISCHANGING = 0x0310,
+
+            /// <summary>
+            /// WindowMessage - WM_PALETTECHANGED
+            /// </summary>
+            WM_PALETTECHANGED = 0x0311,
+
+            /// <summary>
             /// WindowMessage - WM_HOTKEY
             /// </summary>
             WM_HOTKEY = 0x0312,

             /// <summary>
-            /// WindowMessage - WM_MOUSEMOVE
-            /// </summary>
-            WM_MOUSEMOVE = 0x0200,
-
-            /// <summary>
-            /// WindowMessage - WM_LBUTTONDOWN
-            /// </summary>
-            WM_LBUTTONDOWN = 0x0201,
-
-            /// <summary>
-            /// WindowMessage - WM_LBUTTONUP
-            /// </summary>
-            WM_LBUTTONUP = 0x0202,
-
-            /// <summary>
-            /// WindowMessage - WM_LBUTTONDBLCLK
-            /// </summary>
-            WM_LBUTTONDBLCLK = 0x0203,
-
-            /// <summary>
-            /// WindowMessage - WM_RBUTTONDOWN
-            /// </summary>
-            WM_RBUTTONDOWN = 0x0204,
-
-            /// <summary>
-            /// WindowMessage - WM_RBUTTONUP
-            /// </summary>
-            WM_RBUTTONUP = 0x0205,
-
-            /// <summary>
-            /// WindowMessage - WM_MBUTTONDOWN
-            /// </summary>
-            WM_MBUTTONDOWN = 0x0207,
-
-            /// <summary>
-            /// WindowMessage - WM_MBUTTONUP
-            /// </summary>
-            WM_MBUTTONUP = 0x0208,
-
-            /// <summary>
-            /// WindowMessage - WM_MOUSEWHEEL
-            /// </summary>
-            WM_MOUSEWHEEL = 0x020A,
+            /// WindowMessage - WM_PRINT
+            /// </summary>
+            WM_PRINT = 0x0317,
+
+            /// <summary>
+            /// WindowMessage - WM_PRINTCLIENT
+            /// </summary>
+            WM_PRINTCLIENT = 0x0318,
+
+            /// <summary>
+            /// WindowMessage - WM_APPCOMMAND
+            /// </summary>
+            WM_APPCOMMAND = 0x0319,
+
+            /// <summary>
+            /// WindowMessage - WM_THEMECHANGED
+            /// </summary>
+            WM_THEMECHANGED = 0x031A,
+
+            /// <summary>
+            /// WindowMessage - WM_CLIPBOARDUPDATE
+            /// </summary>
+            WM_CLIPBOARDUPDATE = 0x031D,
+
+            /// <summary>
+            /// WindowMessage - WM_DWMCOMPOSITIONCHANGED
+            /// </summary>
+            WM_DWMCOMPOSITIONCHANGED = 0x031E,
+
+            /// <summary>
+            /// WindowMessage - WM_DWMNCRENDERINGCHANGED
+            /// </summary>
+            WM_DWMNCRENDERINGCHANGED = 0x031F,
+
+            /// <summary>
+            /// WindowMessage - WM_DWMCOLORIZATIONCOLORCHANGED
+            /// </summary>
+            WM_DWMCOLORIZATIONCOLORCHANGED = 0x0320,
+
+            /// <summary>
+            /// WindowMessage - WM_DWMWINDOWMAXIMIZEDCHANGE
+            /// </summary>
+            WM_DWMWINDOWMAXIMIZEDCHANGE = 0x0321,
+
+            /// <summary>
+            /// WindowMessage - WM_DWMSENDICONICTHUMBNAIL
+            /// </summary>
+            WM_DWMSENDICONICTHUMBNAIL = 0x0323,
+
+            /// <summary>
+            /// WindowMessage - WM_DWMSENDICONICLIVEPREVIEWBITMAP
+            /// </summary>
+            WM_DWMSENDICONICLIVEPREVIEWBITMAP = 0x0326,
+
+            /// <summary>
+            /// WindowMessage - WM_GETTITLEBARINFOEX
+            /// </summary>
+            WM_GETTITLEBARINFOEX = 0x033F,
+
+            /// <summary>
+            /// WindowMessage - WM_HANDHELDFIRST
+            /// </summary>
+            WM_HANDHELDFIRST = 0x0358,
+
+            /// <summary>
+            /// WindowMessage - WM_HANDHELDLAST
+            /// </summary>
+            WM_HANDHELDLAST = 0x035F,
+
+            /// <summary>
+            /// WindowMessage - WM_AFXFIRST
+            /// </summary>
+            WM_AFXFIRST = 0x0360,
+
+            /// <summary>
+            /// WindowMessage - WM_AFXLAST
+            /// </summary>
+            WM_AFXLAST = 0x037F,
+
+            /// <summary>
+            /// WindowMessage - WM_PENWINFIRST
+            /// </summary>
+            WM_PENWINFIRST = 0x0380,
+
+            /// <summary>
+            /// WindowMessage - WM_PENWINLAST
+            /// </summary>
+            WM_PENWINLAST = 0x038F,
+
+            /// <summary>
+            /// WindowMessage - WM_APP
+            /// </summary>
+            WM_APP = 0x8000,

             /// <summary>
             /// WindowMessage - WM_USER


warn when the string table wasn't found (#91)

--- msstyleEditorSharp/Dialogs/MainWindow.cs
+++ msstyleEditorSharp/Dialogs/MainWindow.cs
@@ -164,6 +164,20 @@
             else btFileSave.Style = RibbonButtonStyle.SplitDropDown;

             lbStylePlatform.Text = m_style.Platform.ToDisplayString();
+
+            if (m_style.StringTable.Count == 0)
+            {
+                MessageBox.Show(this,
+                    "Could not locate 'String Table' resource! Some features may not work as expected. " +
+                    "Was the file renamed or moved before initially opening it?\r\n\r\n" +
+                    "- Make sure the '.msstyles' file is next to its multilingual resource files: '[lang-id]/[name].msstyles.mui'.\r\n" +
+                    "- Make sure the names match.\r\n\r\n" +
+                    "Then, reopen the file. After properly loading and saving the style, relocating the file is safe."
+                    , "Warning, resource is missing!",
+                    MessageBoxButtons.OK,
+                    MessageBoxIcon.Warning);
+                return;
+            }
         }

         private void CloseStyle()


Added caching for log sources

Added caching for log sources

--- YuGiOh.Bot/Handlers/LogHandler.cs
+++ YuGiOh.Bot/Handlers/LogHandler.cs
@@ -1,3 +1,4 @@
+using System.Collections.Concurrent;
 using System.Threading.Tasks;
 using Discord;
 using Discord.Interactions;
@@ -9,7 +10,14 @@
     public class LogHandler
     {

+        private static readonly ConcurrentDictionary<string, ILogger> SourceToLogger;
+
         private readonly ILoggerFactory _loggerFactory;
+
+        static LogHandler()
+        {
+            SourceToLogger = new ConcurrentDictionary<string, ILogger>();
+        }

         public LogHandler(ILoggerFactory loggerFactory)
         {
@@ -19,7 +27,9 @@
         public Task HandleLogMessage(LogMessage logMsg)
         {

-            Task.Run(() => _loggerFactory.CreateLogger(logMsg.Source).Log(logMsg));
+            Task.Run(() =>
+                SourceToLogger.GetOrAdd(logMsg.Source, source => _loggerFactory.CreateLogger(source)).Log(logMsg)
+            );

             return Task.CompletedTask;

@@ -31,7 +41,7 @@
             Task.Run(() =>
             {
                 if (!result.IsSuccess)
-                    _loggerFactory.CreateLogger("Interaction").Error(result.ErrorReason);
+                    SourceToLogger.GetOrAdd("Interaction", source => _loggerFactory.CreateLogger(source)).Error(result.ErrorReason);
             });

             return Task.CompletedTask;


selecting different equivalent on add mateiral database view works now

--- WelderCalculator/WelderCalculator/Views/AddMaterialDatabaseView/AddMaterialDatabasePresenters/AddMaterialDatabasePresenter.cs
+++ WelderCalculator/WelderCalculator/Views/AddMaterialDatabaseView/AddMaterialDatabasePresenters/AddMaterialDatabasePresenter.cs
@@ -194,8 +194,21 @@
             var material = GetSelectedMaterial();
             if (material != null)
             {
-                _view.NiEquivalentTextBox = material.NiEqSchaeffler;
-                _view.CrEquivalentTextBox = material.CrEqSchaefflerAndDeLong;
+                if (_view.EquivalentsList[_view.SelectedEquivalent] == "Schaeffler")
+                {
+                    _view.NiEquivalentTextBox = material.NiEqSchaeffler;
+                    _view.CrEquivalentTextBox = material.CrEqSchaefflerAndDeLong;
+                }
+                if (_view.EquivalentsList[_view.SelectedEquivalent] == "DeLong")
+                {
+                    _view.NiEquivalentTextBox = material.NiEqDeLong;
+                    _view.CrEquivalentTextBox = material.CrEqSchaefflerAndDeLong;
+                }
+                if (_view.EquivalentsList[_view.SelectedEquivalent] == "WRC1992")
+                {
+                    _view.NiEquivalentTextBox = material.NiEqWRC1992;
+                    _view.CrEquivalentTextBox = material.CrEqWRC1992;
+                }
             }
         }


Some fixes for being able to run setup

Some fixes for being able to run setup

--- OrchardAppHost.cs
+++ OrchardAppHost.cs
@@ -91,8 +91,13 @@
             {
                 foreach (var defaultShellFeatureState in _settings.DefaultShellFeatureStates)
                 {
-                    Run(scope => scope.Resolve<IFeatureManager>().EnableFeatures(defaultShellFeatureState.EnabledFeatures),
-                        defaultShellFeatureState.ShellName);
+                    Run(scope =>
+                    {
+                        IFeatureManager featureManager;
+                        if (!scope.TryResolve<IFeatureManager>(out featureManager)) return; // Happens for setup shell.
+                        featureManager.EnableFeatures(defaultShellFeatureState.EnabledFeatures);
+                    },
+                    defaultShellFeatureState.ShellName);
                 }
             }
         }
@@ -125,8 +130,7 @@
                     {
                         httpContext = new AppHostHttpContextAccessor.HttpContextPlaceholder();
                     }
-
-                    throw;
+                    else throw;
                 }

                 hca.Set(httpContext);


Made sure AutofacMiddleware can only be registered once.

--- OwinExtensions.cs
+++ OwinExtensions.cs
@@ -40,6 +40,8 @@
     [EditorBrowsable(EditorBrowsableState.Never)]
     public static class OwinExtensions
     {
+        const string MiddlewareRegisteredKey = "AutofacMiddelwareRegistered";
+
         /// <summary>
         /// Adds a component to the OWIN pipeline for using Autofac dependency injection with middleware.
         /// </summary>
@@ -49,6 +51,8 @@
         [SecuritySafeCritical]
         public static IAppBuilder UseAutofacMiddleware(this IAppBuilder app, IContainer container)
         {
+            if (app.Properties.ContainsKey(MiddlewareRegisteredKey)) return app;
+
             app.Use(async (context, next) =>
             {
                 using (var lifetimeScope = container.BeginLifetimeScope(Constants.LifetimeScopeTag,
@@ -59,7 +63,11 @@
                 }
             });

-            return UseMiddlewareFromContainer(app, container);
+            UseMiddlewareFromContainer(app, container);
+
+            app.Properties.Add(MiddlewareRegisteredKey, true);
+
+            return app;
         }

         /// <summary>
@@ -76,7 +84,7 @@
         }

         [SecuritySafeCritical]
-        static IAppBuilder UseMiddlewareFromContainer(this IAppBuilder app, IComponentContext container)
+        static void UseMiddlewareFromContainer(this IAppBuilder app, IComponentContext container)
         {
             var services = container.ComponentRegistry.Registrations.SelectMany(r => r.Services)
                 .OfType<TypedService>()
@@ -85,12 +93,10 @@
                 .Where(serviceType => !container.IsRegistered(serviceType));

             var typedServices = services.ToArray();
-            if (!typedServices.Any()) return app;
+            if (!typedServices.Any()) return;

             foreach (var typedService in typedServices)
                 app.Use(typedService);
-
-            return app;
         }
     }
 }


build

build

--- build.csx
+++ build.csx
@@ -4,12 +4,9 @@
 var Targets = System.Environment.GetEnvironmentVariable("Targets");
 var MsBuildExe = System.Environment.GetEnvironmentVariable("MsBuildExe");

-// EDIT : change to true for local debug
-var local_mode = false;
-
-var msbuild_cmd = local_mode ?
-Path.Combine(System.Environment.GetEnvironmentVariable("ProgramFiles(x86)"), @"Microsoft Visual Studio\Preview\Community\MSBuild\15.0\Bin\MSBuild.exe")
-: MsBuildExe;
+if (string.IsNullOrEmpty(Configuration)) Configuration = "Release";
+if (string.IsNullOrEmpty(Targets)) Targets = "Restore,Rebuild,Pack";
+if (string.IsNullOrEmpty(MsBuildExe)) MsBuildExe = Path.Combine(System.Environment.GetEnvironmentVariable("ProgramFiles(x86)"), @"Microsoft Visual Studio\Preview\Community\MSBuild\15.0\Bin\MSBuild.exe");

 Action<string> hdr = (msg) =>
 {
@@ -21,12 +18,13 @@
 //-------------------------------BUILD
 hdr("BUILD");

-var cmd = new ProcessStartInfo(msbuild_cmd,
+var psi = new ProcessStartInfo(MsBuildExe,
     $"SearchAThing.Sci.sln " +
     $"/t:{Targets} " +
     $"/p:Configuration={Configuration} " +
     $"/m /v:M /fl /flp:LogFile=msbuild.log;Verbosity=Normal /nr:false");
-var p = Process.Start(cmd);
+psi.UseShellExecute = false;
+var p = Process.Start(psi);
 p.WaitForExit();
+
 if (p.ExitCode != 0) System.Environment.Exit(p.ExitCode);
-


Fixed error message with invalid config file


Added C# solution to the HackerRank practice problem 'Day 13 Abstract Classes'.


Whitespace.

Whitespace.

--- ExRam.Gremlinq.Core/Deserialization/GremlinQueryExecutionResultDeserializer.cs
+++ ExRam.Gremlinq.Core/Deserialization/GremlinQueryExecutionResultDeserializer.cs
@@ -147,7 +147,7 @@
                     array.SetValue(recurse.TryDeserialize(jToken, type, env), 0);

                     return array;
-                    }
+                }

                 return overridden(jToken, type, env, recurse);
             })


Optimise loop starting index

Optimise loop starting index

Co-Authored-By: Bartłomiej Dach <809709723693c4e7ecc6f5379a3099c830279741@gmail.com>

--- osu.Framework/Graphics/UserInterface/TextBox.cs
+++ osu.Framework/Graphics/UserInterface/TextBox.cs
@@ -452,7 +452,7 @@
             text = text.Remove(start, count);

             // Reorder characters depth after removal to avoid ordering issues with newly added characters.
-            for (int i = 0; i < TextFlow.Count; i++)
+            for (int i = start; i < TextFlow.Count; i++)
                 TextFlow.ChangeChildDepth(TextFlow[i], -i);

             if (selectionLength > 0)


Don't use parameterful old delegate syntax. Verbose and no formatter agreement.

--- osu.Framework/Graphics/UserInterface/TextBox.cs
+++ osu.Framework/Graphics/UserInterface/TextBox.cs
@@ -171,12 +171,12 @@

             if (textInput != null)
             {
-                textInput.OnNewImeComposition += delegate(string s)
+                textInput.OnNewImeComposition += s =>
                 {
                     textUpdateScheduler.Add(() => onImeComposition(s));
                     cursorAndLayout.Invalidate();
                 };
-                textInput.OnNewImeResult += delegate
+                textInput.OnNewImeResult += s =>
                 {
                     textUpdateScheduler.Add(onImeResult);
                     cursorAndLayout.Invalidate();


Actually set the beatmap difficulty

Actually set the beatmap difficulty

--- osu.Game.Tests/Beatmaps/IO/ImportBeatmapTest.cs
+++ osu.Game.Tests/Beatmaps/IO/ImportBeatmapTest.cs
@@ -246,7 +246,7 @@
         public void TestImportWithDuplicateBeatmapIDs()
         {
             //unfortunately for the time being we need to reference osu.Framework.Desktop for a game host here.
-            using (HeadlessGameHost host = new CleanRunHeadlessGameHost($"TestImportWithDuplicateBeatmapID"))
+            using (HeadlessGameHost host = new CleanRunHeadlessGameHost("TestImportWithDuplicateBeatmapID"))
             {
                 try
                 {
@@ -258,7 +258,7 @@
                         AuthorString = "SomeAuthor"
                     };

-                    BeatmapDifficulty difficulty = null;
+                    var difficulty = new BeatmapDifficulty();

                     var toImport = new BeatmapSetInfo
                     {


Fix incorrect line endings

Fix incorrect line endings

--- osu.Game/Configuration/RandomSelectAlgorithm.cs
+++ osu.Game/Configuration/RandomSelectAlgorithm.cs
@@ -1,15 +1,15 @@
-// Copyright (c) 2007-2017 ppy Pty Ltd <contact@ppy.sh>.
-// Licensed under the MIT Licence - https://raw.githubusercontent.com/ppy/osu/master/LICENCE
-
-using System.ComponentModel;
-
-namespace osu.Game.Configuration
-{
-   public enum RandomSelectAlgorithm
-    {
-        [Description("Never repeat")]
-        RandomPermutation,
-        [Description("Random")]
-        Random
-    }
-}
+// Copyright (c) 2007-2017 ppy Pty Ltd <contact@ppy.sh>.
+// Licensed under the MIT Licence - https://raw.githubusercontent.com/ppy/osu/master/LICENCE
+
+using System.ComponentModel;
+
+namespace osu.Game.Configuration
+{
+   public enum RandomSelectAlgorithm
+    {
+        [Description("Never repeat")]
+        RandomPermutation,
+        [Description("Random")]
+        Random
+    }
+}


Fix one more instance of incorrect playback/frequency set order

--- osu.Game/Graphics/UserInterface/OsuSliderBar.cs
+++ osu.Game/Graphics/UserInterface/OsuSliderBar.cs
@@ -159,12 +159,14 @@
             lastSampleValue = value;
             lastSampleTime = Clock.CurrentTime;

-            var channel = sample.Play();
+            var channel = sample.GetChannel();

             channel.Frequency.Value = 0.99f + RNG.NextDouble(0.02f) + NormalizedValue * 0.2f;

             if (NormalizedValue == 0 || NormalizedValue == 1)
                 channel.Frequency.Value -= 0.5f;
+
+            channel.Play();
         }

         private void updateTooltipText(T value)


Update SpotlightSelector design

Update SpotlightSelector design

--- osu.Game/Overlays/Rankings/SpotlightSelector.cs
+++ osu.Game/Overlays/Rankings/SpotlightSelector.cs
@@ -77,11 +77,11 @@
                             },
                             new FillFlowContainer
                             {
-                                Anchor = Anchor.BottomRight,
-                                Origin = Anchor.BottomRight,
+                                Anchor = Anchor.BottomLeft,
+                                Origin = Anchor.BottomLeft,
                                 AutoSizeAxes = Axes.Both,
                                 Direction = FillDirection.Horizontal,
-                                Spacing = new Vector2(15, 0),
+                                Spacing = new Vector2(20, 0),
                                 Children = new Drawable[]
                                 {
                                     startDateColumn = new InfoColumn(@"Start Date"),


Done CosmosEncodingProvider api docs

Done CosmosEncodingProvider api docs

--- source/Cosmos.System2/Text/CosmosEncodingProvider.cs
+++ source/Cosmos.System2/Text/CosmosEncodingProvider.cs
@@ -4,18 +4,38 @@

 namespace Cosmos.System.ExtendedASCII
 {
+    /// <summary>
+    /// CosmosEncodingProvider class. Used to provide <see cref="Encoder"/>, by using its name or codepage. See also: <seealso cref="EncodingProvider"/>.
+    /// </summary>
     public class CosmosEncodingProvider : EncodingProvider
     {
+        /// <summary>
+        /// Encoding provider.
+        /// </summary>
         private static readonly EncodingProvider s_singleton = new CosmosEncodingProvider();
+        /// <summary>
+        /// Debugger inctanse of the "System" with the "CosmosEncodingProvider" tag.
+        /// </summary>
         private static Debugger myDebugger = new Debugger("System", "CosmosEncodingProvider");

+        /// <summary>
+        /// Create new inctanse of the <see cref="CosmosEncodingProvider"/> class.
+        /// </summary>
         internal CosmosEncodingProvider() { }

+        /// <summary>
+        /// Get CosmosEncodingProvider instance. Returns EncodingProvider.
+        /// </summary>
         public static EncodingProvider Instance
         {
             get { return s_singleton; }
         }

+        /// <summary>
+        /// Get encoding, using its codepage.
+        /// </summary>
+        /// <param name="codepage">Codepage.</param>
+        /// <returns>Encoding value.</returns>
         public override Encoding GetEncoding(int codepage)
         {
             myDebugger.SendInternal($"Getting Encoding for codepage {codepage}");
@@ -26,6 +46,11 @@
             return EncodingTable.GetEncoding(codepage);
         }

+        /// <summary>
+        /// Get encoding, using its name.
+        /// </summary>
+        /// <param name="name">Name.</param>
+        /// <returns>Encoding value.</returns>
         public override Encoding GetEncoding(string name)
         {
             myDebugger.SendInternal($"Getting Encoding for codepage with name {name}");


export files in md.styles. (#574)

export files in md.styles. (#574)

--- src/docfx/SubCommands/BuildCommand.cs
+++ src/docfx/SubCommands/BuildCommand.cs
@@ -475,7 +475,7 @@
             bool created = false;
             try
             {
-                created = _templateManager.TryExportTemplateFiles(pluginFilePath, @"^plugins/.*");
+                created = _templateManager.TryExportTemplateFiles(pluginFilePath, @"^(?:plugins|md\.styles)/.*");
                 if (created)
                 {
                     BuildDocumentWithPlugin(Config, _templateManager, baseDirectory, outputDirectory, pluginBaseFolder, Path.Combine(pluginFilePath, "plugins"), pluginFilePath);