浏览代码

添加系统版本获取,添加系统补丁获取

yuzhengyang 7 年之前
父节点
当前提交
f9961fcf28
共有 22 个文件被更改,包括 188 次插入301 次删除
  1. 二进制
      Fork.Net/.vs/Fork.Net/v15/Server/sqlite3/storage.ide
  2. 二进制
      Fork.Net/.vs/Fork.Net/v15/Server/sqlite3/storage.ide-shm
  3. 二进制
      Fork.Net/.vs/Fork.Net/v15/Server/sqlite3/storage.ide-wal
  4. 二进制
      Fork.Net/.vs/Fork.Net/v15/sqlite3/storage.ide
  5. 二进制
      Fork.Net/.vs/Fork.Net/v15/sqlite3/storage.ide-shm
  6. 二进制
      Fork.Net/.vs/Fork.Net/v15/sqlite3/storage.ide-wal
  7. 6 2
      Fork.Net/Azylee.Utils/Azylee.Core/Azylee.Core.csproj
  8. 4 3
      Fork.Net/Azylee.Utils/Azylee.Core/ProcessUtils/ProcessTool.cs
  9. 34 0
      Fork.Net/Azylee.Utils/Azylee.Core/ThreadUtils/SleepUtils/SleepTool.cs
  10. 55 0
      Fork.Net/Azylee.Utils/Azylee.Core/WindowsUtils/InfoUtils/OSInfoTool.cs
  11. 28 0
      Fork.Net/Azylee.Utils/Azylee.Core/WindowsUtils/InfoUtils/OSName.cs
  12. 41 0
      Fork.Net/Azylee.Utils/Azylee.Core/WindowsUtils/InfoUtils/PatchInfoTool.cs
  13. 1 1
      Fork.Net/Azylee.Utils/Azylee.Core/WindowsUtils/SoftInfoUtils/SoftwareInfo.cs
  14. 3 11
      Fork.Net/Azylee.Utils/Azylee.Core/WindowsUtils/SoftInfoUtils/SoftwareTool.cs
  15. 16 26
      Fork.Net/Azylee.Utils/Azylee.WinformSkin/FormUI/NoTitle/NoTitleForm.cs
  16. 0 22
      Fork.Net/Fork.Net.sln
  17. 0 19
      Fork.Net/Test/Test.BaiDuWebAPI/Program.cs
  18. 0 36
      Fork.Net/Test/Test.BaiDuWebAPI/Properties/AssemblyInfo.cs
  19. 0 57
      Fork.Net/Test/Test.BaiDuWebAPI/Test.BaiDuWebAPI.csproj
  20. 0 41
      Fork.Net/Test/Test.CpuTime/Program.cs
  21. 0 36
      Fork.Net/Test/Test.CpuTime/Properties/AssemblyInfo.cs
  22. 0 47
      Fork.Net/Test/Test.CpuTime/Test.CpuTime.csproj

二进制
Fork.Net/.vs/Fork.Net/v15/Server/sqlite3/storage.ide


二进制
Fork.Net/.vs/Fork.Net/v15/Server/sqlite3/storage.ide-shm


二进制
Fork.Net/.vs/Fork.Net/v15/Server/sqlite3/storage.ide-wal


二进制
Fork.Net/.vs/Fork.Net/v15/sqlite3/storage.ide


二进制
Fork.Net/.vs/Fork.Net/v15/sqlite3/storage.ide-shm


二进制
Fork.Net/.vs/Fork.Net/v15/sqlite3/storage.ide-wal


+ 6 - 2
Fork.Net/Azylee.Utils/Azylee.Core/Azylee.Core.csproj

@@ -90,6 +90,7 @@
     <Compile Include="Properties\AssemblyInfo.cs" />
     <Compile Include="Readme.cs" />
     <Compile Include="TaskUtils\TaskSupport.cs" />
+    <Compile Include="ThreadUtils\SleepUtils\SleepTool.cs" />
     <Compile Include="VersionUtils\VersionTool.cs" />
     <Compile Include="WindowsUtils\APIUtils\ApplicationAPI.cs" />
     <Compile Include="WindowsUtils\APIUtils\ExplorerAPI.cs" />
@@ -101,10 +102,13 @@
     <Compile Include="WindowsUtils\InfoUtils\ComputerInfoTool.cs" />
     <Compile Include="WindowsUtils\InfoUtils\ComputerStatusTool.cs" />
     <Compile Include="WindowsUtils\InfoUtils\NetcardInfoTool.cs" />
+    <Compile Include="WindowsUtils\InfoUtils\PatchInfoTool.cs" />
+    <Compile Include="WindowsUtils\InfoUtils\OSInfoTool.cs" />
+    <Compile Include="WindowsUtils\InfoUtils\OSName.cs" />
     <Compile Include="WindowsUtils\RegisterUtils\RegisterTool.cs" />
     <Compile Include="WindowsUtils\ShortcutUtils\ShortcutTool.cs" />
-    <Compile Include="WindowsUtils\SoftInfoUtils\SoftwareInfo.cs" />
-    <Compile Include="WindowsUtils\SoftInfoUtils\SoftwareTool.cs" />
+    <Compile Include="WindowsUtils\InfoUtils\SoftwareInfo.cs" />
+    <Compile Include="WindowsUtils\InfoUtils\SoftwareTool.cs" />
   </ItemGroup>
   <ItemGroup />
   <ItemGroup>

+ 4 - 3
Fork.Net/Azylee.Utils/Azylee.Core/ProcessUtils/ProcessTool.cs

@@ -21,11 +21,12 @@ namespace Azylee.Core.ProcessUtils
         /// <returns></returns>
         public static bool IsExists(string name)
         {
-            Process[] processes = Process.GetProcessesByName(name);
-            foreach (Process p in processes)
+            try
             {
-                return true;
+                var p = Process.GetProcessesByName(name);
+                if (ListTool.HasElements(p)) return true;
             }
+            catch { }
             return false;
         }
         /// <summary>

+ 34 - 0
Fork.Net/Azylee.Utils/Azylee.Core/ThreadUtils/SleepUtils/SleepTool.cs

@@ -0,0 +1,34 @@
+using System;
+using System.Collections.Generic;
+using System.Diagnostics;
+using System.Linq;
+using System.Text;
+using System.Threading;
+
+namespace Azylee.Core.ThreadUtils.SleepUtils
+{
+    public static class SleepTool
+    {
+        /// <summary>
+        /// 伪精准Sleep(单位:秒)
+        /// </summary>
+        public static void Z(int second)
+        {
+            if (second > 0)
+            {
+                Stopwatch sw = new Stopwatch();
+                sw.Start();
+                int ms = second * 900;
+                Thread.Sleep(ms);
+                sw.Stop();
+
+                ms = second * 100;
+                Thread.Sleep(ms);
+            }
+            else
+            {
+                Thread.Sleep(1000);
+            }
+        }
+    }
+}

+ 55 - 0
Fork.Net/Azylee.Utils/Azylee.Core/WindowsUtils/InfoUtils/OSInfoTool.cs

@@ -0,0 +1,55 @@
+using System;
+using System.Collections.Generic;
+using System.Linq;
+using System.Text;
+
+namespace Azylee.Core.WindowsUtils.InfoUtils
+{
+    public static class OSInfoTool
+    {
+
+        public static OSName Caption()
+        {
+            try
+            {
+                OperatingSystem os = Environment.OSVersion;
+                switch (os.Platform)
+                {
+                    case PlatformID.Win32Windows:
+                        switch (os.Version.Minor)
+                        {
+                            case 0: return OSName.Windows95;
+                            case 10: return OSName.Windows98;
+                            case 90: return OSName.WindowsMe;
+                        }
+                        break;
+                    case PlatformID.Win32NT:
+                        switch (os.Version.Major)
+                        {
+                            case 3: return OSName.WindowsNT351;
+                            case 4: return OSName.WindowsNT40;
+                            case 5:
+                                switch (os.Version.Minor)
+                                {
+                                    case 0: return OSName.Windows2000;
+                                    case 1: return OSName.WindowsXP;
+                                    case 2: return OSName.Windows2003;
+                                }
+                                break;
+                            case 6:
+                                switch (os.Version.Minor)
+                                {
+                                    case 0: return OSName.Windows2008;
+                                    case 1: return OSName.Windows7;
+                                    case 2: return OSName.Windows10;
+                                }
+                                break;
+                        }
+                        break;
+                }
+            }
+            catch { }
+            return OSName.Unknown;
+        }
+    }
+}

+ 28 - 0
Fork.Net/Azylee.Utils/Azylee.Core/WindowsUtils/InfoUtils/OSName.cs

@@ -0,0 +1,28 @@
+using System;
+using System.Collections.Generic;
+using System.Linq;
+using System.Text;
+
+namespace Azylee.Core.WindowsUtils.InfoUtils
+{
+    public enum OSName
+    {
+        Unknown,
+
+        Windows95,
+        Windows98Fc,
+        Windows98,
+        WindowsMe,
+
+        WindowsNT351,
+        WindowsNT40,
+
+        Windows2000,
+        WindowsXP,
+        Windows2003,
+        Windows2008,
+        Windows7,
+        Windows8Or81,
+        Windows10,
+    }
+}

+ 41 - 0
Fork.Net/Azylee.Utils/Azylee.Core/WindowsUtils/InfoUtils/PatchInfoTool.cs

@@ -0,0 +1,41 @@
+using Azylee.Core.DataUtils.CollectionUtils;
+using Azylee.Core.DataUtils.StringUtils;
+using System;
+using System.Collections.Generic;
+using System.Linq;
+using System.Management;
+using System.Text;
+
+namespace Azylee.Core.WindowsUtils.InfoUtils
+{
+    public static class PatchInfoTool
+    {
+        public static List<string> Get()
+        {
+            List<string> rs = new List<string>();
+            try
+            {
+                var searchQFE = new ManagementObjectSearcher("Select * from Win32_QuickFixEngineering");
+                foreach (var item in searchQFE.Get())
+                {
+                    string _HotFixID = item.GetPropertyValue("HotFixID").ToString().Trim();
+                    if (!string.IsNullOrWhiteSpace(_HotFixID) && !rs.Contains(_HotFixID))
+                    {
+                        rs.Add(_HotFixID);
+                    }
+                }
+            }
+            catch { }
+            return rs;
+        }
+        public static bool Exist(string name)
+        {
+            List<string> list = Get();
+            if (StringTool.Ok(name) && ListTool.HasElements(list))
+            {
+                if (list.Any(x => x == name.Trim())) return true;
+            }
+            return false;
+        }
+    }
+}

+ 1 - 1
Fork.Net/Azylee.Utils/Azylee.Core/WindowsUtils/SoftInfoUtils/SoftwareInfo.cs

@@ -1,6 +1,6 @@
 using System;
 
-namespace Azylee.Core.WindowsUtils.SoftInfoUtils
+namespace Azylee.Core.WindowsUtils.InfoUtils
 {
     public class SoftwareInfo
     {

+ 3 - 11
Fork.Net/Azylee.Utils/Azylee.Core/WindowsUtils/SoftInfoUtils/SoftwareTool.cs

@@ -1,4 +1,5 @@
 using Azylee.Core.DataUtils.CollectionUtils;
+using Azylee.Core.ProcessUtils;
 using Microsoft.Win32;
 using System;
 using System.Collections.Generic;
@@ -6,7 +7,7 @@ using System.Diagnostics;
 using System.IO;
 using System.Linq;
 
-namespace Azylee.Core.WindowsUtils.SoftInfoUtils
+namespace Azylee.Core.WindowsUtils.InfoUtils
 {
     public class SoftwareTool
     {
@@ -96,16 +97,7 @@ namespace Azylee.Core.WindowsUtils.SoftInfoUtils
         /// <returns></returns>
         public static bool ExistProcess(string name)
         {
-            try
-            {
-                var p = Process.GetProcessesByName(name);
-                if (p != null && p.Length == 0)
-                    return false;
-                else
-                    return true;
-            }
-            catch { }
-            return false;
+            return ProcessTool.IsExists(name);
         }
         public static bool ExistProcess(string[] names)
         {

+ 16 - 26
Fork.Net/Azylee.Utils/Azylee.WinformSkin/FormUI/NoTitle/NoTitleForm.cs

@@ -168,43 +168,33 @@ namespace Azylee.WinformSkin.FormUI.NoTitle
         //}
         #endregion
         #region Invoke UI操作
-        /// <summary>
-        /// 设置控件是否可用
-        /// </summary>
-        /// <param name="ctrl"></param>
-        /// <param name="enable"></param>
         public void UIEnable(Control ctrl, bool enable = true)
         {
-            try
+            Invoke(new Action(() =>
             {
-                BeginInvoke(new Action(() =>
-                {
-                    ctrl.Enabled = enable;
-                }));
-            }
-            catch (Exception e) { }
+                ctrl.Enabled = enable;
+            }));
         }
         public void UIVisible(Control ctrl, bool enable = true)
         {
-            try
+            Invoke(new Action(() =>
             {
-                BeginInvoke(new Action(() =>
-                {
-                    ctrl.Visible = enable;
-                }));
-            }
-            catch (Exception e) { }
+                ctrl.Visible = enable;
+            }));
+        }
+        public void UILabel(Label label, string s)
+        {
+            Invoke(new Action(() =>
+            {
+                label.Text = s;
+            }));
         }
         public void UIClose()
         {
-            try
+            Invoke(new Action(() =>
             {
-                BeginInvoke(new Action(() =>
-                {
-                    Close();
-                }));
-            }
-            catch (Exception e) { }
+                try { Close(); } catch { }
+            }));
         }
         #endregion
     }

+ 0 - 22
Fork.Net/Fork.Net.sln

@@ -43,16 +43,12 @@ Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Azylee.Core.Plus", "Azylee.
 EndProject
 Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Test.SystemSleep", "Test\Test.SystemSleep\Test.SystemSleep.csproj", "{3936BB3B-244D-4448-9B77-3A7CC0CFBE28}"
 EndProject
-Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Test.BaiDuWebAPI", "Test\Test.BaiDuWebAPI\Test.BaiDuWebAPI.csproj", "{3AB4B914-CCD0-48C9-8106-75A8FE542ACC}"
-EndProject
 Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Test.RaiseOtherApp", "Test\Test.RaiseOtherApp\Test.RaiseOtherApp.csproj", "{79FCD171-33AC-47BF-B8A7-C19D365D2983}"
 EndProject
 Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Test.BlackBox", "Test\Test.BlackBox\Test.BlackBox.csproj", "{6C69CF15-398D-4030-AA90-C617E52DC016}"
 EndProject
 Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Test.CmdTool", "Test\Test.CmdTool\Test.CmdTool.csproj", "{6F974809-DC4F-4490-B6D4-857036A234AB}"
 EndProject
-Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Test.CpuTime", "Test\Test.CpuTime\Test.CpuTime.csproj", "{BB602C66-C94B-4258-B606-004227CC6BA3}"
-EndProject
 Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Test.HttpTool", "Test\Test.HttpTool\Test.HttpTool.csproj", "{8ED17932-7365-42DE-BE9B-ECF2B17155EC}"
 EndProject
 Global
@@ -199,14 +195,6 @@ Global
 		{3936BB3B-244D-4448-9B77-3A7CC0CFBE28}.Release|Any CPU.Build.0 = Release|Any CPU
 		{3936BB3B-244D-4448-9B77-3A7CC0CFBE28}.Release|x86.ActiveCfg = Release|Any CPU
 		{3936BB3B-244D-4448-9B77-3A7CC0CFBE28}.Release|x86.Build.0 = Release|Any CPU
-		{3AB4B914-CCD0-48C9-8106-75A8FE542ACC}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
-		{3AB4B914-CCD0-48C9-8106-75A8FE542ACC}.Debug|Any CPU.Build.0 = Debug|Any CPU
-		{3AB4B914-CCD0-48C9-8106-75A8FE542ACC}.Debug|x86.ActiveCfg = Debug|Any CPU
-		{3AB4B914-CCD0-48C9-8106-75A8FE542ACC}.Debug|x86.Build.0 = Debug|Any CPU
-		{3AB4B914-CCD0-48C9-8106-75A8FE542ACC}.Release|Any CPU.ActiveCfg = Release|Any CPU
-		{3AB4B914-CCD0-48C9-8106-75A8FE542ACC}.Release|Any CPU.Build.0 = Release|Any CPU
-		{3AB4B914-CCD0-48C9-8106-75A8FE542ACC}.Release|x86.ActiveCfg = Release|Any CPU
-		{3AB4B914-CCD0-48C9-8106-75A8FE542ACC}.Release|x86.Build.0 = Release|Any CPU
 		{79FCD171-33AC-47BF-B8A7-C19D365D2983}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
 		{79FCD171-33AC-47BF-B8A7-C19D365D2983}.Debug|Any CPU.Build.0 = Debug|Any CPU
 		{79FCD171-33AC-47BF-B8A7-C19D365D2983}.Debug|x86.ActiveCfg = Debug|Any CPU
@@ -231,14 +219,6 @@ Global
 		{6F974809-DC4F-4490-B6D4-857036A234AB}.Release|Any CPU.Build.0 = Release|Any CPU
 		{6F974809-DC4F-4490-B6D4-857036A234AB}.Release|x86.ActiveCfg = Release|Any CPU
 		{6F974809-DC4F-4490-B6D4-857036A234AB}.Release|x86.Build.0 = Release|Any CPU
-		{BB602C66-C94B-4258-B606-004227CC6BA3}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
-		{BB602C66-C94B-4258-B606-004227CC6BA3}.Debug|Any CPU.Build.0 = Debug|Any CPU
-		{BB602C66-C94B-4258-B606-004227CC6BA3}.Debug|x86.ActiveCfg = Debug|Any CPU
-		{BB602C66-C94B-4258-B606-004227CC6BA3}.Debug|x86.Build.0 = Debug|Any CPU
-		{BB602C66-C94B-4258-B606-004227CC6BA3}.Release|Any CPU.ActiveCfg = Release|Any CPU
-		{BB602C66-C94B-4258-B606-004227CC6BA3}.Release|Any CPU.Build.0 = Release|Any CPU
-		{BB602C66-C94B-4258-B606-004227CC6BA3}.Release|x86.ActiveCfg = Release|Any CPU
-		{BB602C66-C94B-4258-B606-004227CC6BA3}.Release|x86.Build.0 = Release|Any CPU
 		{8ED17932-7365-42DE-BE9B-ECF2B17155EC}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
 		{8ED17932-7365-42DE-BE9B-ECF2B17155EC}.Debug|Any CPU.Build.0 = Debug|Any CPU
 		{8ED17932-7365-42DE-BE9B-ECF2B17155EC}.Debug|x86.ActiveCfg = Debug|Any CPU
@@ -268,11 +248,9 @@ Global
 		{76F92BAE-8C9C-42AA-85E8-51F2EA8A0C91} = {C34A95B5-5F83-46E3-868A-56BDDA2D0B87}
 		{915AE524-7EFD-4ECC-B731-DE1D1F5558F0} = {C34A95B5-5F83-46E3-868A-56BDDA2D0B87}
 		{3936BB3B-244D-4448-9B77-3A7CC0CFBE28} = {A89FC45A-A907-4487-8719-114530A62684}
-		{3AB4B914-CCD0-48C9-8106-75A8FE542ACC} = {A89FC45A-A907-4487-8719-114530A62684}
 		{79FCD171-33AC-47BF-B8A7-C19D365D2983} = {A89FC45A-A907-4487-8719-114530A62684}
 		{6C69CF15-398D-4030-AA90-C617E52DC016} = {A89FC45A-A907-4487-8719-114530A62684}
 		{6F974809-DC4F-4490-B6D4-857036A234AB} = {A89FC45A-A907-4487-8719-114530A62684}
-		{BB602C66-C94B-4258-B606-004227CC6BA3} = {A89FC45A-A907-4487-8719-114530A62684}
 		{8ED17932-7365-42DE-BE9B-ECF2B17155EC} = {A89FC45A-A907-4487-8719-114530A62684}
 	EndGlobalSection
 	GlobalSection(ExtensibilityGlobals) = postSolution

+ 0 - 19
Fork.Net/Test/Test.BaiDuWebAPI/Program.cs

@@ -1,19 +0,0 @@
-using Azylee.YeahWeb.BaiDuWebAPI.IPLocationAPI;
-using System;
-using System.Collections.Generic;
-using System.Linq;
-using System.Text;
-
-namespace Test.BaiDuWebAPI
-{
-    class Program
-    {
-        static void Main(string[] args)
-        {
-            var loc1 = IPLocationTool.GetLocation();
-            var loc2 = IPLocationTool.GetLocation();
-            bool cp = loc1.Like(loc2);
-            Console.WriteLine("");
-        }
-    }
-}

+ 0 - 36
Fork.Net/Test/Test.BaiDuWebAPI/Properties/AssemblyInfo.cs

@@ -1,36 +0,0 @@
-using System.Reflection;
-using System.Runtime.CompilerServices;
-using System.Runtime.InteropServices;
-
-// 有关程序集的一般信息由以下
-// 控制。更改这些特性值可修改
-// 与程序集关联的信息。
-[assembly: AssemblyTitle("Test.BaiDuWebAPI")]
-[assembly: AssemblyDescription("")]
-[assembly: AssemblyConfiguration("")]
-[assembly: AssemblyCompany("")]
-[assembly: AssemblyProduct("Test.BaiDuWebAPI")]
-[assembly: AssemblyCopyright("Copyright ©  2018")]
-[assembly: AssemblyTrademark("")]
-[assembly: AssemblyCulture("")]
-
-// 将 ComVisible 设置为 false 会使此程序集中的类型
-//对 COM 组件不可见。如果需要从 COM 访问此程序集中的类型
-//请将此类型的 ComVisible 特性设置为 true。
-[assembly: ComVisible(false)]
-
-// 如果此项目向 COM 公开,则下列 GUID 用于类型库的 ID
-[assembly: Guid("3ab4b914-ccd0-48c9-8106-75a8fe542acc")]
-
-// 程序集的版本信息由下列四个值组成: 
-//
-//      主版本
-//      次版本
-//      生成号
-//      修订号
-//
-// 可以指定所有值,也可以使用以下所示的 "*" 预置版本号和修订号
-// 方法是按如下所示使用“*”: :
-// [assembly: AssemblyVersion("1.0.*")]
-[assembly: AssemblyVersion("1.0.0.0")]
-[assembly: AssemblyFileVersion("1.0.0.0")]

+ 0 - 57
Fork.Net/Test/Test.BaiDuWebAPI/Test.BaiDuWebAPI.csproj

@@ -1,57 +0,0 @@
-<?xml version="1.0" encoding="utf-8"?>
-<Project ToolsVersion="15.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
-  <Import Project="$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props" Condition="Exists('$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props')" />
-  <PropertyGroup>
-    <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
-    <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
-    <ProjectGuid>{3AB4B914-CCD0-48C9-8106-75A8FE542ACC}</ProjectGuid>
-    <OutputType>Exe</OutputType>
-    <RootNamespace>Test.BaiDuWebAPI</RootNamespace>
-    <AssemblyName>Test.BaiDuWebAPI</AssemblyName>
-    <TargetFrameworkVersion>v4.0</TargetFrameworkVersion>
-    <FileAlignment>512</FileAlignment>
-  </PropertyGroup>
-  <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
-    <PlatformTarget>AnyCPU</PlatformTarget>
-    <DebugSymbols>true</DebugSymbols>
-    <DebugType>full</DebugType>
-    <Optimize>false</Optimize>
-    <OutputPath>bin\Debug\</OutputPath>
-    <DefineConstants>DEBUG;TRACE</DefineConstants>
-    <ErrorReport>prompt</ErrorReport>
-    <WarningLevel>4</WarningLevel>
-  </PropertyGroup>
-  <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
-    <PlatformTarget>AnyCPU</PlatformTarget>
-    <DebugType>pdbonly</DebugType>
-    <Optimize>true</Optimize>
-    <OutputPath>bin\Release\</OutputPath>
-    <DefineConstants>TRACE</DefineConstants>
-    <ErrorReport>prompt</ErrorReport>
-    <WarningLevel>4</WarningLevel>
-  </PropertyGroup>
-  <ItemGroup>
-    <Reference Include="System" />
-    <Reference Include="System.Core" />
-    <Reference Include="System.Xml.Linq" />
-    <Reference Include="System.Data.DataSetExtensions" />
-    <Reference Include="Microsoft.CSharp" />
-    <Reference Include="System.Data" />
-    <Reference Include="System.Xml" />
-  </ItemGroup>
-  <ItemGroup>
-    <Compile Include="Program.cs" />
-    <Compile Include="Properties\AssemblyInfo.cs" />
-  </ItemGroup>
-  <ItemGroup>
-    <ProjectReference Include="..\..\Azylee.Utils\Azylee.Core\Azylee.Core.csproj">
-      <Project>{88dc61fa-95f0-41b7-9d7d-ab0f3cbd169c}</Project>
-      <Name>Azylee.Core</Name>
-    </ProjectReference>
-    <ProjectReference Include="..\..\Azylee.Utils\Azylee.YeahWeb\Azylee.YeahWeb.csproj">
-      <Project>{ccf7a654-b442-4db1-bb3b-0f8014c3237f}</Project>
-      <Name>Azylee.YeahWeb</Name>
-    </ProjectReference>
-  </ItemGroup>
-  <Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
-</Project>

+ 0 - 41
Fork.Net/Test/Test.CpuTime/Program.cs

@@ -1,41 +0,0 @@
-using System;
-using System.Collections.Generic;
-using System.Diagnostics;
-using System.Linq;
-using System.Text;
-using System.Threading;
-
-namespace Test.CpuTime
-{
-    class Program
-    {
-        static void Main(string[] args)
-        {
-            UsingProcess("Marx");
-        }
-        //+ using System.Diagnostics
-        //+ using System.Threading
-        static void UsingProcess(string pname)
-        {
-            using (var pro = Process.GetProcessesByName(pname)[0])
-            {
-                //间隔时间(毫秒)
-                int interval = 1000;
-                //上次记录的CPU时间
-                var prevCpuTime = TimeSpan.Zero;
-                while (true)
-                {
-                    //当前时间
-                    var curTime = pro.TotalProcessorTime;
-                    //间隔时间内的CPU运行时间除以逻辑CPU数量
-                    var value = (curTime - prevCpuTime).TotalMilliseconds / interval / Environment.ProcessorCount * 100;
-                    prevCpuTime = curTime;
-                    //输出
-                    Console.WriteLine($"{curTime}-{prevCpuTime}, CPU: {value} %");
-
-                    Thread.Sleep(interval);
-                }
-            }
-        }
-    }
-}

+ 0 - 36
Fork.Net/Test/Test.CpuTime/Properties/AssemblyInfo.cs

@@ -1,36 +0,0 @@
-using System.Reflection;
-using System.Runtime.CompilerServices;
-using System.Runtime.InteropServices;
-
-// 有关程序集的一般信息由以下
-// 控制。更改这些特性值可修改
-// 与程序集关联的信息。
-[assembly: AssemblyTitle("Test.CpuTime")]
-[assembly: AssemblyDescription("")]
-[assembly: AssemblyConfiguration("")]
-[assembly: AssemblyCompany("")]
-[assembly: AssemblyProduct("Test.CpuTime")]
-[assembly: AssemblyCopyright("Copyright ©  2018")]
-[assembly: AssemblyTrademark("")]
-[assembly: AssemblyCulture("")]
-
-// 将 ComVisible 设置为 false 会使此程序集中的类型
-//对 COM 组件不可见。如果需要从 COM 访问此程序集中的类型
-//请将此类型的 ComVisible 特性设置为 true。
-[assembly: ComVisible(false)]
-
-// 如果此项目向 COM 公开,则下列 GUID 用于类型库的 ID
-[assembly: Guid("bb602c66-c94b-4258-b606-004227cc6ba3")]
-
-// 程序集的版本信息由下列四个值组成: 
-//
-//      主版本
-//      次版本
-//      生成号
-//      修订号
-//
-// 可以指定所有值,也可以使用以下所示的 "*" 预置版本号和修订号
-// 方法是按如下所示使用“*”: :
-// [assembly: AssemblyVersion("1.0.*")]
-[assembly: AssemblyVersion("1.0.0.0")]
-[assembly: AssemblyFileVersion("1.0.0.0")]

+ 0 - 47
Fork.Net/Test/Test.CpuTime/Test.CpuTime.csproj

@@ -1,47 +0,0 @@
-<?xml version="1.0" encoding="utf-8"?>
-<Project ToolsVersion="15.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
-  <Import Project="$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props" Condition="Exists('$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props')" />
-  <PropertyGroup>
-    <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
-    <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
-    <ProjectGuid>{BB602C66-C94B-4258-B606-004227CC6BA3}</ProjectGuid>
-    <OutputType>Exe</OutputType>
-    <RootNamespace>Test.CpuTime</RootNamespace>
-    <AssemblyName>Test.CpuTime</AssemblyName>
-    <TargetFrameworkVersion>v4.0</TargetFrameworkVersion>
-    <FileAlignment>512</FileAlignment>
-  </PropertyGroup>
-  <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
-    <PlatformTarget>AnyCPU</PlatformTarget>
-    <DebugSymbols>true</DebugSymbols>
-    <DebugType>full</DebugType>
-    <Optimize>false</Optimize>
-    <OutputPath>bin\Debug\</OutputPath>
-    <DefineConstants>DEBUG;TRACE</DefineConstants>
-    <ErrorReport>prompt</ErrorReport>
-    <WarningLevel>4</WarningLevel>
-  </PropertyGroup>
-  <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
-    <PlatformTarget>AnyCPU</PlatformTarget>
-    <DebugType>pdbonly</DebugType>
-    <Optimize>true</Optimize>
-    <OutputPath>bin\Release\</OutputPath>
-    <DefineConstants>TRACE</DefineConstants>
-    <ErrorReport>prompt</ErrorReport>
-    <WarningLevel>4</WarningLevel>
-  </PropertyGroup>
-  <ItemGroup>
-    <Reference Include="System" />
-    <Reference Include="System.Core" />
-    <Reference Include="System.Xml.Linq" />
-    <Reference Include="System.Data.DataSetExtensions" />
-    <Reference Include="Microsoft.CSharp" />
-    <Reference Include="System.Data" />
-    <Reference Include="System.Xml" />
-  </ItemGroup>
-  <ItemGroup>
-    <Compile Include="Program.cs" />
-    <Compile Include="Properties\AssemblyInfo.cs" />
-  </ItemGroup>
-  <Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
-</Project>