ntminer 4 lat temu
rodzic
commit
2b13ed589d
100 zmienionych plików z 1269 dodań i 1512 usunięć
  1. 1 1
      README.md
  2. 1 1
      src/AppModels/Properties/AssemblyInfo.cs
  3. 2 2
      src/AppViews0/Properties/AssemblyInfo.cs
  4. 0 15
      src/AppViews0/Views/Ucs/ResizeCursor.xaml.cs
  5. 2 2
      src/AppViews0/Views/Ucs/SpeedTable.xaml
  6. 3 1
      src/AppViews0/Views/Ucs/Toolbox.xaml
  7. 3 3
      src/BlankWindow/Properties/AssemblyInfo.cs
  8. 6 6
      src/CalcConfigUpdater/CalcConfigUpdater.csproj
  9. 1 0
      src/CalcConfigUpdater/Program.cs
  10. 1 1
      src/CalcConfigUpdater/Properties/AssemblyInfo.cs
  11. 2 2
      src/CalcConfigUpdater/packages.config
  12. 6 6
      src/DevConsole/DevConsole.csproj
  13. 1 1
      src/DevConsole/Properties/AssemblyInfo.cs
  14. 2 2
      src/DevConsole/packages.config
  15. 1 0
      src/MinerClient/App.xaml.cs
  16. 381 181
      src/MinerClient/Daemon/websocket-sharp.xml
  17. 6 24
      src/MinerClient/MinerClient.csproj
  18. 2 2
      src/MinerClient/Properties/AssemblyInfo.cs
  19. 0 62
      src/MinerClient/Properties/Resources.Designer.cs
  20. 0 117
      src/MinerClient/Properties/Resources.resx
  21. 0 26
      src/MinerClient/Properties/Settings.Designer.cs
  22. 0 7
      src/MinerClient/Properties/Settings.settings
  23. 2 2
      src/MinerClient/packages.config
  24. 1 0
      src/MinerClientFinder/App.xaml.cs
  25. 6 24
      src/MinerClientFinder/MinerClientFinder.csproj
  26. 2 4
      src/MinerClientFinder/Properties/AssemblyInfo.cs
  27. 0 63
      src/MinerClientFinder/Properties/Resources.Designer.cs
  28. 0 117
      src/MinerClientFinder/Properties/Resources.resx
  29. 0 26
      src/MinerClientFinder/Properties/Settings.Designer.cs
  30. 0 7
      src/MinerClientFinder/Properties/Settings.settings
  31. 2 2
      src/MinerClientFinder/packages.config
  32. 1 1
      src/MinerClientSelfHost/Properties/AssemblyInfo.cs
  33. 1 0
      src/MinerStudio/App.xaml.cs
  34. 6 24
      src/MinerStudio/MinerStudio.csproj
  35. 1 1
      src/MinerStudio/Properties/AssemblyInfo.cs
  36. 0 62
      src/MinerStudio/Properties/Resources.Designer.cs
  37. 0 117
      src/MinerStudio/Properties/Resources.resx
  38. 0 26
      src/MinerStudio/Properties/Settings.Designer.cs
  39. 0 7
      src/MinerStudio/Properties/Settings.settings
  40. 2 2
      src/MinerStudio/packages.config
  41. 1 1
      src/MinerStudioSelfHost/Properties/AssemblyInfo.cs
  42. 2 2
      src/NTMiner.Controllers/Properties/AssemblyInfo.cs
  43. 21 22
      src/NTMinerClient/Core/Impl/OverClockDataSet.cs
  44. 7 9
      src/NTMinerClient/Core/Profiles/Impl/WalletSet.cs
  45. 18 2
      src/NTMinerClient/Gpus/Impl/GpuOverClock.cs
  46. 1 1
      src/NTMinerClient/Properties/AssemblyInfo.cs
  47. 10 8
      src/NTMinerDaemon/NTMinerDaemon.csproj
  48. 1 1
      src/NTMinerDaemon/Properties/AssemblyInfo.cs
  49. 3 3
      src/NTMinerDaemon/packages.config
  50. 9 0
      src/NTMinerDataSchemas/Core/IOverClockInput.cs
  51. 1 0
      src/NTMinerDataSchemas/NTKeyword.cs
  52. 2 2
      src/NTMinerDataSchemas/Properties/AssemblyInfo.cs
  53. 0 30
      src/NTMinerGpus/Gpus/Adl/AdlNativeMethods.cs
  54. 0 139
      src/NTMinerGpus/Gpus/Adl/AdlTypes.cs
  55. 42 9
      src/NTMinerGpus/Gpus/AdlHelper.cs
  56. 9 1
      src/NTMinerGpus/Gpus/IGpuHelper.cs
  57. 0 21
      src/NTMinerGpus/Gpus/Nvapi/NvapiNativeMethods.cs
  58. 0 129
      src/NTMinerGpus/Gpus/Nvapi/NvapiTypes.cs
  59. 36 10
      src/NTMinerGpus/Gpus/NvapiHelper.cs
  60. 1 1
      src/NTMinerGpus/Properties/AssemblyInfo.cs
  61. 1 1
      src/NTMinerHub/Properties/AssemblyInfo.cs
  62. 15 1
      src/NTMinerLogging/NTMinerConsole.cs
  63. 7 5
      src/NTMinerLogging/NTMinerLogging.csproj
  64. 1 1
      src/NTMinerLogging/Properties/AssemblyInfo.cs
  65. 1 1
      src/NTMinerLogging/packages.config
  66. 10 8
      src/NTMinerNoDevFee/NTMinerNoDevFee.csproj
  67. 1 1
      src/NTMinerNoDevFee/Properties/AssemblyInfo.cs
  68. 3 3
      src/NTMinerNoDevFee/packages.config
  69. 1 1
      src/NTMinerRpcClient/Properties/AssemblyInfo.cs
  70. 3 1
      src/NTMinerRpcClient/Rpc/Impl/BinaryRequestJsonResponseRpcHelper.cs
  71. 3 1
      src/NTMinerRpcClient/Rpc/Impl/HttpRpcHelper.cs
  72. 6 2
      src/NTMinerRpcClient/Rpc/Impl/JsonRequestBinaryResponseRpcHelper.cs
  73. 3 1
      src/NTMinerRpcClient/Rpc/Impl/JsonRpcHelper.cs
  74. 6 2
      src/NTMinerRpcClient/Rpc/Impl/JsonRpcHelper.partials.cs
  75. 1 1
      src/NTMinerRpcClient/RpcRoot.cs
  76. 22 11
      src/NTMinerRpcClient/Services/Client/MinerStudioService.cs
  77. 58 19
      src/NTMinerRpcClient/Services/Client/NTMinerClientService.cs
  78. 34 6
      src/NTMinerRpcClient/Services/Client/NTMinerDaemonService.cs
  79. 16 4
      src/NTMinerRpcClient/Services/Official/AppSettingService.cs
  80. 21 9
      src/NTMinerRpcClient/Services/Official/CalcConfigService.cs
  81. 16 2
      src/NTMinerRpcClient/Services/Official/ClientDataBinaryService.cs
  82. 28 4
      src/NTMinerRpcClient/Services/Official/ClientDataService.cs
  83. 7 1
      src/NTMinerRpcClient/Services/Official/CoinSnapshotService.cs
  84. 74 18
      src/NTMinerRpcClient/Services/Official/FileUrlService.cs
  85. 8 1
      src/NTMinerRpcClient/Services/Official/GpuNameService.cs
  86. 21 3
      src/NTMinerRpcClient/Services/Official/KernelOutputKeywordService.cs
  87. 21 3
      src/NTMinerRpcClient/Services/Official/NTMinerWalletService.cs
  88. 21 3
      src/NTMinerRpcClient/Services/Official/OverClockDataService.cs
  89. 9 1
      src/NTMinerRpcClient/Services/Official/ReportBinaryService.cs
  90. 17 2
      src/NTMinerRpcClient/Services/Official/ReportService.cs
  91. 21 3
      src/NTMinerRpcClient/Services/Official/ServerMessageService.cs
  92. 7 1
      src/NTMinerRpcClient/Services/Official/UserAppSettingService.cs
  93. 43 6
      src/NTMinerRpcClient/Services/Official/UserMineWorkService.cs
  94. 22 3
      src/NTMinerRpcClient/Services/Official/UserMinerGroupService.cs
  95. 95 32
      src/NTMinerRpcClient/Services/Official/UserService.cs
  96. 7 1
      src/NTMinerRpcClient/Services/Official/WebApiServerNodeService.cs
  97. 22 3
      src/NTMinerRpcClient/Services/Official/WsServerNodeService.cs
  98. 4 3
      src/NTMinerServer/NTMinerServer.csproj
  99. 2 3
      src/NTMinerServer/Properties/AssemblyInfo.cs
  100. 2 2
      src/NTMinerServer/packages.config

+ 1 - 1
README.md

@@ -27,7 +27,7 @@
 
 ### 为什么可以说开源矿工是0抽水?
 1. 只有在使用Claymore内核挖ETH币种时拦截了老外的1%的开发费,没有额外抽水,这正是竞品所说的0抽水;
-2. 永不破解国人开发的内核。像BMiner、NBMiner、HSPMiner、GMiner等这些流行的内核是国人开发的,内核作者有自己的原版开发费基本都是1%左右,开源矿工原则上永远不会去拿国人内核作者的开发费也不会增加矿工的支出。
+2. 永不破解国人开发的内核。像BMiner、NBMiner、HSPMiner等这些流行的内核是国人开发的,内核作者有自己的原版开发费基本都是1%左右,开源矿工原则上永远不会去拿国人内核作者的开发费也不会增加矿工的支出。
 
 ### 为什么可以拦截老外的抽水?
 因为老外从我国市场赚取了内核开发费,但并没有给我们的市场交税,我们的法律保护我们但不保护老外。你我的衣食住行都有税,咱们买的显卡、矿机以及交的电费中都有税,为什么老外的内核抽水不交税?因为老外内核作者不受我国法律保护,所以大家可以合理合法的拦截老外内核作者的开发费,如果不拦截的话它就流出国门跑到外面的市场去了,不如让老外内核作者的开发费留在我们的市场为内需消费做贡献。当然,如果老外在我国市场有代理人、成立了合资或独资公司什么的,也就是说如果老外接受我们的法律约束并为我们的市场交税的话我们是没有理由打劫老外内核作者的开发费的,那个时候开源矿工会立即停止打劫老外内核作者,绝不做违法和破坏规则的事情。

+ 1 - 1
src/AppModels/Properties/AssemblyInfo.cs

@@ -7,7 +7,7 @@ using System.Runtime.InteropServices;
 [assembly: AssemblyTitle("AppModels")]
 [assembly: AssemblyDescription("")]
 [assembly: AssemblyConfiguration("")]
-[assembly: AssemblyCompany("")]
+[assembly: AssemblyCompany(NTMiner.NTKeyword.Company)]
 [assembly: AssemblyProduct("AppModels")]
 [assembly: AssemblyCopyright(NTMiner.NTKeyword.Copyright)]
 [assembly: AssemblyTrademark("")]

+ 2 - 2
src/AppViews0/Properties/AssemblyInfo.cs

@@ -17,10 +17,10 @@ using System.Windows;
 // 方法是按如下所示使用“*”:
 // [assembly: AssemblyVersion("1.0.*")]
 [assembly: AssemblyVersion("1.0.0.*")]
-[assembly: AssemblyDescription("NTMiner")]
+[assembly: AssemblyDescription("")]
 [assembly: AssemblyFileVersion("1.0.0.0")]
 [assembly: AssemblyConfiguration("")]
-[assembly: AssemblyCompany("")]
+[assembly: AssemblyCompany(NTMiner.NTKeyword.Company)]
 [assembly: AssemblyProduct("AppViews0")]
 [assembly: AssemblyCopyright(NTMiner.NTKeyword.Copyright)]
 [assembly: AssemblyTrademark("")]

+ 0 - 15
src/AppViews0/Views/Ucs/ResizeCursor.xaml.cs

@@ -10,20 +10,6 @@ namespace NTMiner.Views.Ucs {
     public partial class ResizeCursor : UserControl {
         #region SafeNativeMethods
         private static class SafeNativeMethods {
-            #region enum struct class
-            [StructLayout(LayoutKind.Sequential, CharSet = CharSet.Auto)]
-            public class MONITORINFO {
-                public int cbSize = Marshal.SizeOf(typeof(MONITORINFO));
-                public RECT rcMonitor = new RECT();
-                public RECT rcWork = new RECT();
-                public int dwFlags = 0;
-            }
-
-            [StructLayout(LayoutKind.Sequential)]
-            public struct RECT {
-                public int Left, Top, Right, Bottom;
-            }
-
             public enum ResizeDirection {
                 Left = 1,
                 Right = 2,
@@ -34,7 +20,6 @@ namespace NTMiner.Views.Ucs {
                 BottomLeft = 7,
                 BottomRight = 8,
             }
-            #endregion
 
             [DllImport(DllName.User32Dll, CharSet = CharSet.Auto)]
             internal static extern IntPtr SendMessage(IntPtr hWnd, uint Msg, IntPtr wParam, IntPtr lParam);

+ 2 - 2
src/AppViews0/Views/Ucs/SpeedTable.xaml

@@ -112,7 +112,7 @@
                         </DataTemplate>
                     </DataGridTemplateColumn.CellTemplate>
                 </DataGridTemplateColumn>
-                <DataGridTemplateColumn MinWidth="60" Width="*" IsReadOnly="True">
+                <DataGridTemplateColumn MinWidth="60" Width="3*" IsReadOnly="True">
 					<DataGridTemplateColumn.Header>
 						<TextBlock Text="名称"></TextBlock>
 					</DataGridTemplateColumn.Header>
@@ -169,7 +169,7 @@
                     </DataGridTemplateColumn.CellTemplate>
                 </DataGridTemplateColumn>
                 <DataGridTemplateColumn 
-                    MinWidth="30" Width="30" IsReadOnly="True"
+                    MinWidth="30" Width="1.2*" IsReadOnly="True"
                     Visibility="{Binding Data.GpuSpeedVms.MinerProfile.CoinVm.CoinKernel.Kernel.KernelOutputVm.IsFoundOneGpuShare,Source={StaticResource proxy},Converter={StaticResource BoolToVisibilityConverter}}">
                     <DataGridTemplateColumn.Header>
                         <controls:KbLinkButton 

+ 3 - 1
src/AppViews0/Views/Ucs/Toolbox.xaml

@@ -28,6 +28,7 @@
 					Height="{StaticResource ItemHeight}" 
 					Width="{StaticResource ItemWidth}"
 					Margin="4"
+                    ToolTip="当较老的A卡比如580/590算力较低时,开启计算模式算力可翻倍。"
                     KbButtonHoverBackground="{StaticResource KbButtonHoverBackground}"
                     IsEnabled="{x:Static app:AppStatic.IsHasATIGpu}"
 					Command="{Binding SwitchRadeonGpu}"
@@ -50,6 +51,7 @@
 					Height="{StaticResource ItemHeight}" 
 					Width="{StaticResource ItemWidth}"
 					Margin="4"
+                    ToolTip="AMD官方驱动无需签名"
                     KbButtonHoverBackground="{StaticResource KbButtonHoverBackground}"
                     IsEnabled="{x:Static app:AppStatic.IsHasATIGpu}"
 					Command="{Binding AtikmdagPatcher}"
@@ -95,6 +97,7 @@
 					Width="{StaticResource ItemWidth}"
 					Margin="4"
                     Padding="20 0 0 0"
+                    ToolTip="10系列卡比如1080等,建议使用3xx驱动。"
 					Background="Transparent">
 					<WrapPanel VerticalAlignment="Center">
 						<Path 
@@ -137,7 +140,6 @@
 								Command="{x:Static app:AppStatic.ViewUrl}"
                                 CommandParameter="{Binding NvidiaDriverMore.Value}"
 								Padding="0"
-					            ToolTip="如果没有20系列的卡,挖矿建议使用3xx驱动。"
 								HorizontalAlignment="Right"
 								KbDisplayLine="False"
 								Background="Transparent">

+ 3 - 3
src/BlankWindow/Properties/AssemblyInfo.cs

@@ -3,11 +3,11 @@ using System.Runtime.InteropServices;
 using System.Windows;
 using System.Windows.Markup;
 
-[assembly: AssemblyTitle("NTMiner")]
+[assembly: AssemblyTitle("BlankWindow")]
 [assembly: AssemblyDescription("")]
 [assembly: AssemblyConfiguration("")]
-[assembly: AssemblyCompany("")]
-[assembly: AssemblyProduct("NTMiner")]
+[assembly: AssemblyCompany(NTMiner.NTKeyword.Company)]
+[assembly: AssemblyProduct("BlankWindow")]
 [assembly: AssemblyCopyright(NTMiner.NTKeyword.Copyright)]
 [assembly: AssemblyTrademark("")]
 [assembly: AssemblyCulture("")]

+ 6 - 6
src/CalcConfigUpdater/CalcConfigUpdater.csproj

@@ -1,6 +1,6 @@
 <?xml version="1.0" encoding="utf-8"?>
 <Project ToolsVersion="15.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
-  <Import Project="..\..\packages\Costura.Fody.4.0.0\build\Costura.Fody.props" Condition="Exists('..\..\packages\Costura.Fody.4.0.0\build\Costura.Fody.props')" />
+  <Import Project="..\..\packages\Costura.Fody.4.1.0\build\Costura.Fody.props" Condition="Exists('..\..\packages\Costura.Fody.4.1.0\build\Costura.Fody.props')" />
   <Import Project="$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props" Condition="Exists('$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props')" />
   <PropertyGroup>
     <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
@@ -39,8 +39,8 @@
     <StartupObject>NTMiner.Program</StartupObject>
   </PropertyGroup>
   <ItemGroup>
-    <Reference Include="Costura, Version=4.0.0.0, Culture=neutral, PublicKeyToken=9919ef960d84173d, processorArchitecture=MSIL">
-      <HintPath>..\..\packages\Costura.Fody.4.0.0\lib\net40\Costura.dll</HintPath>
+    <Reference Include="Costura, Version=4.1.0.0, Culture=neutral, PublicKeyToken=9919ef960d84173d, processorArchitecture=MSIL">
+      <HintPath>..\..\packages\Costura.Fody.4.1.0\lib\net40\Costura.dll</HintPath>
     </Reference>
     <Reference Include="System" />
     <Reference Include="System.Net.Http" />
@@ -86,12 +86,12 @@
     </ProjectReference>
   </ItemGroup>
   <Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
-  <Import Project="..\..\packages\Fody.5.0.0\build\Fody.targets" Condition="Exists('..\..\packages\Fody.5.0.0\build\Fody.targets')" />
   <Target Name="EnsureNuGetPackageBuildImports" BeforeTargets="PrepareForBuild">
     <PropertyGroup>
       <ErrorText>这台计算机上缺少此项目引用的 NuGet 程序包。使用“NuGet 程序包还原”可下载这些程序包。有关更多信息,请参见 http://go.microsoft.com/fwlink/?LinkID=322105。缺少的文件是 {0}。</ErrorText>
     </PropertyGroup>
-    <Error Condition="!Exists('..\..\packages\Fody.5.0.0\build\Fody.targets')" Text="$([System.String]::Format('$(ErrorText)', '..\..\packages\Fody.5.0.0\build\Fody.targets'))" />
-    <Error Condition="!Exists('..\..\packages\Costura.Fody.4.0.0\build\Costura.Fody.props')" Text="$([System.String]::Format('$(ErrorText)', '..\..\packages\Costura.Fody.4.0.0\build\Costura.Fody.props'))" />
+    <Error Condition="!Exists('..\..\packages\Fody.6.3.0\build\Fody.targets')" Text="$([System.String]::Format('$(ErrorText)', '..\..\packages\Fody.6.3.0\build\Fody.targets'))" />
+    <Error Condition="!Exists('..\..\packages\Costura.Fody.4.1.0\build\Costura.Fody.props')" Text="$([System.String]::Format('$(ErrorText)', '..\..\packages\Costura.Fody.4.1.0\build\Costura.Fody.props'))" />
   </Target>
+  <Import Project="..\..\packages\Fody.6.3.0\build\Fody.targets" Condition="Exists('..\..\packages\Fody.6.3.0\build\Fody.targets')" />
 </Project>

+ 1 - 0
src/CalcConfigUpdater/Program.cs

@@ -12,6 +12,7 @@ using System.Threading.Tasks;
 namespace NTMiner {
     public class Program {
         static void Main() {
+            NTMinerConsole.SetIsMainUiOk(true);
             NTMinerConsole.DisbleQuickEditMode();
             try {
                 VirtualRoot.StartTimer();

+ 1 - 1
src/CalcConfigUpdater/Properties/AssemblyInfo.cs

@@ -7,7 +7,7 @@ using System.Runtime.InteropServices;
 [assembly: AssemblyTitle("CalcConfigUpdater")]
 [assembly: AssemblyDescription("")]
 [assembly: AssemblyConfiguration("")]
-[assembly: AssemblyCompany("")]
+[assembly: AssemblyCompany(NTMiner.NTKeyword.Company)]
 [assembly: AssemblyProduct("CalcConfigUpdater")]
 [assembly: AssemblyCopyright(NTMiner.NTKeyword.Copyright)]
 [assembly: AssemblyTrademark("")]

+ 2 - 2
src/CalcConfigUpdater/packages.config

@@ -1,5 +1,5 @@
 <?xml version="1.0" encoding="utf-8"?>
 <packages>
-  <package id="Costura.Fody" version="4.0.0" targetFramework="net45" />
-  <package id="Fody" version="5.0.0" targetFramework="net45" developmentDependency="true" />
+  <package id="Costura.Fody" version="4.1.0" targetFramework="net452" />
+  <package id="Fody" version="6.3.0" targetFramework="net452" developmentDependency="true" />
 </packages>

+ 6 - 6
src/DevConsole/DevConsole.csproj

@@ -1,6 +1,6 @@
 <?xml version="1.0" encoding="utf-8"?>
 <Project ToolsVersion="15.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
-  <Import Project="..\..\packages\Costura.Fody.4.0.0\build\Costura.Fody.props" Condition="Exists('..\..\packages\Costura.Fody.4.0.0\build\Costura.Fody.props')" />
+  <Import Project="..\..\packages\Costura.Fody.4.1.0\build\Costura.Fody.props" Condition="Exists('..\..\packages\Costura.Fody.4.1.0\build\Costura.Fody.props')" />
   <Import Project="$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props" Condition="Exists('$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props')" />
   <PropertyGroup>
     <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
@@ -40,8 +40,8 @@
     <StartupObject>NTMiner.Program</StartupObject>
   </PropertyGroup>
   <ItemGroup>
-    <Reference Include="Costura, Version=4.0.0.0, Culture=neutral, PublicKeyToken=9919ef960d84173d, processorArchitecture=MSIL">
-      <HintPath>..\..\packages\Costura.Fody.4.0.0\lib\net40\Costura.dll</HintPath>
+    <Reference Include="Costura, Version=4.1.0.0, Culture=neutral, PublicKeyToken=9919ef960d84173d, processorArchitecture=MSIL">
+      <HintPath>..\..\packages\Costura.Fody.4.1.0\lib\net40\Costura.dll</HintPath>
     </Reference>
     <Reference Include="System" />
   </ItemGroup>
@@ -77,12 +77,12 @@
     </EmbeddedResource>
   </ItemGroup>
   <Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
-  <Import Project="..\..\packages\Fody.5.0.0\build\Fody.targets" Condition="Exists('..\..\packages\Fody.5.0.0\build\Fody.targets')" />
   <Target Name="EnsureNuGetPackageBuildImports" BeforeTargets="PrepareForBuild">
     <PropertyGroup>
       <ErrorText>这台计算机上缺少此项目引用的 NuGet 程序包。使用“NuGet 程序包还原”可下载这些程序包。有关更多信息,请参见 http://go.microsoft.com/fwlink/?LinkID=322105。缺少的文件是 {0}。</ErrorText>
     </PropertyGroup>
-    <Error Condition="!Exists('..\..\packages\Fody.5.0.0\build\Fody.targets')" Text="$([System.String]::Format('$(ErrorText)', '..\..\packages\Fody.5.0.0\build\Fody.targets'))" />
-    <Error Condition="!Exists('..\..\packages\Costura.Fody.4.0.0\build\Costura.Fody.props')" Text="$([System.String]::Format('$(ErrorText)', '..\..\packages\Costura.Fody.4.0.0\build\Costura.Fody.props'))" />
+    <Error Condition="!Exists('..\..\packages\Fody.6.3.0\build\Fody.targets')" Text="$([System.String]::Format('$(ErrorText)', '..\..\packages\Fody.6.3.0\build\Fody.targets'))" />
+    <Error Condition="!Exists('..\..\packages\Costura.Fody.4.1.0\build\Costura.Fody.props')" Text="$([System.String]::Format('$(ErrorText)', '..\..\packages\Costura.Fody.4.1.0\build\Costura.Fody.props'))" />
   </Target>
+  <Import Project="..\..\packages\Fody.6.3.0\build\Fody.targets" Condition="Exists('..\..\packages\Fody.6.3.0\build\Fody.targets')" />
 </Project>

+ 1 - 1
src/DevConsole/Properties/AssemblyInfo.cs

@@ -7,7 +7,7 @@ using System.Runtime.InteropServices;
 [assembly: AssemblyTitle("DevConsole")]
 [assembly: AssemblyDescription("")]
 [assembly: AssemblyConfiguration("")]
-[assembly: AssemblyCompany("")]
+[assembly: AssemblyCompany(NTMiner.NTKeyword.Company)]
 [assembly: AssemblyProduct("DevConsole")]
 [assembly: AssemblyCopyright(NTMiner.NTKeyword.Copyright)]
 [assembly: AssemblyTrademark("")]

+ 2 - 2
src/DevConsole/packages.config

@@ -1,5 +1,5 @@
 <?xml version="1.0" encoding="utf-8"?>
 <packages>
-  <package id="Costura.Fody" version="4.0.0" targetFramework="net40" />
-  <package id="Fody" version="5.0.0" targetFramework="net40" developmentDependency="true" />
+  <package id="Costura.Fody" version="4.1.0" targetFramework="net40" />
+  <package id="Fody" version="6.3.0" targetFramework="net40" developmentDependency="true" />
 </packages>

+ 1 - 0
src/MinerClient/App.xaml.cs

@@ -120,6 +120,7 @@ namespace NTMiner {
                         if (CommandLineArgs.Action.TryParse(out MinerClientActionType resourceType)) {
                             VirtualRoot.Execute(new MinerClientActionCommand(resourceType));
                         }
+                        NTMinerConsole.SetIsMainUiOk(true);
                     });
                     Task.Factory.StartNew(() => {
                         var minerProfile = NTMinerContext.Instance.MinerProfile;

Plik diff jest za duży
+ 381 - 181
src/MinerClient/Daemon/websocket-sharp.xml


+ 6 - 24
src/MinerClient/MinerClient.csproj

@@ -1,6 +1,6 @@
 <?xml version="1.0" encoding="utf-8"?>
 <Project ToolsVersion="4.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
-  <Import Project="..\..\packages\Costura.Fody.4.0.0\build\Costura.Fody.props" Condition="Exists('..\..\packages\Costura.Fody.4.0.0\build\Costura.Fody.props')" />
+  <Import Project="..\..\packages\Costura.Fody.4.1.0\build\Costura.Fody.props" Condition="Exists('..\..\packages\Costura.Fody.4.1.0\build\Costura.Fody.props')" />
   <PropertyGroup>
     <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
     <Platform Condition=" '$(Platform)' == '' ">x86</Platform>
@@ -77,8 +77,8 @@
     <ApplicationManifest>app.manifest</ApplicationManifest>
   </PropertyGroup>
   <ItemGroup>
-    <Reference Include="Costura, Version=4.0.0.0, Culture=neutral, PublicKeyToken=9919ef960d84173d, processorArchitecture=MSIL">
-      <HintPath>..\..\packages\Costura.Fody.4.0.0\lib\net40\Costura.dll</HintPath>
+    <Reference Include="Costura, Version=4.1.0.0, Culture=neutral, PublicKeyToken=9919ef960d84173d, processorArchitecture=MSIL">
+      <HintPath>..\..\packages\Costura.Fody.4.1.0\lib\net40\Costura.dll</HintPath>
     </Reference>
     <Reference Include="LiveCharts, Version=0.9.7.0, Culture=neutral, PublicKeyToken=0bc1f845d1ebb8df, processorArchitecture=MSIL">
       <HintPath>..\..\packages\LiveCharts.0.9.7\lib\net40\LiveCharts.dll</HintPath>
@@ -123,20 +123,6 @@
     <Compile Include="Properties\AssemblyInfo.cs">
       <SubType>Code</SubType>
     </Compile>
-    <Compile Include="Properties\Resources.Designer.cs">
-      <AutoGen>True</AutoGen>
-      <DesignTime>True</DesignTime>
-      <DependentUpon>Resources.resx</DependentUpon>
-    </Compile>
-    <Compile Include="Properties\Settings.Designer.cs">
-      <AutoGen>True</AutoGen>
-      <DependentUpon>Settings.settings</DependentUpon>
-      <DesignTimeSharedInput>True</DesignTimeSharedInput>
-    </Compile>
-    <EmbeddedResource Include="Properties\Resources.resx">
-      <Generator>ResXFileCodeGenerator</Generator>
-      <LastGenOutput>Resources.Designer.cs</LastGenOutput>
-    </EmbeddedResource>
     <None Include="app.config" />
     <None Include="app.manifest" />
     <EmbeddedResource Include="Brand\KernelBrandId" />
@@ -144,10 +130,6 @@
     <EmbeddedResource Include="Brand\PoolBrandId" />
     <EmbeddedResource Include="NoDevFee\sha1" />
     <None Include="packages.config" />
-    <None Include="Properties\Settings.settings">
-      <Generator>SettingsSingleFileGenerator</Generator>
-      <LastGenOutput>Settings.Designer.cs</LastGenOutput>
-    </None>
     <AppDesigner Include="Properties\" />
     <EmbeddedResource Include="Windows\BlockWAU.bat" />
     <EmbeddedResource Include="Windows\Win10Optimize.reg" />
@@ -228,14 +210,14 @@
     <EmbeddedResource Include="NoDevFee\NTMinerNoDevFee.exe" />
   </ItemGroup>
   <Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
-  <Import Project="..\..\packages\Fody.5.0.0\build\Fody.targets" Condition="Exists('..\..\packages\Fody.5.0.0\build\Fody.targets')" />
   <Target Name="EnsureNuGetPackageBuildImports" BeforeTargets="PrepareForBuild">
     <PropertyGroup>
       <ErrorText>这台计算机上缺少此项目引用的 NuGet 程序包。使用“NuGet 程序包还原”可下载这些程序包。有关更多信息,请参见 http://go.microsoft.com/fwlink/?LinkID=322105。缺少的文件是 {0}。</ErrorText>
     </PropertyGroup>
-    <Error Condition="!Exists('..\..\packages\Fody.5.0.0\build\Fody.targets')" Text="$([System.String]::Format('$(ErrorText)', '..\..\packages\Fody.5.0.0\build\Fody.targets'))" />
-    <Error Condition="!Exists('..\..\packages\Costura.Fody.4.0.0\build\Costura.Fody.props')" Text="$([System.String]::Format('$(ErrorText)', '..\..\packages\Costura.Fody.4.0.0\build\Costura.Fody.props'))" />
+    <Error Condition="!Exists('..\..\packages\Fody.6.3.0\build\Fody.targets')" Text="$([System.String]::Format('$(ErrorText)', '..\..\packages\Fody.6.3.0\build\Fody.targets'))" />
+    <Error Condition="!Exists('..\..\packages\Costura.Fody.4.1.0\build\Costura.Fody.props')" Text="$([System.String]::Format('$(ErrorText)', '..\..\packages\Costura.Fody.4.1.0\build\Costura.Fody.props'))" />
   </Target>
+  <Import Project="..\..\packages\Fody.6.3.0\build\Fody.targets" Condition="Exists('..\..\packages\Fody.6.3.0\build\Fody.targets')" />
   <!-- To modify your build process, add your task inside one of the targets below and uncomment it. 
        Other similar extension points exist, see Microsoft.Common.targets.
   <Target Name="BeforeBuild">

+ 2 - 2
src/MinerClient/Properties/AssemblyInfo.cs

@@ -21,8 +21,8 @@ using System.Windows;
 [assembly: AssemblyDescription(NTKeyword.ManJiTag)]
 [assembly: AssemblyFileVersion(NTKeyword.Version)]
 [assembly: AssemblyConfiguration("")]
-[assembly: AssemblyCompany("")]
-[assembly: AssemblyProduct("NTMiner")]
+[assembly: AssemblyCompany(NTKeyword.Company)]
+[assembly: AssemblyProduct("MinerClient")]
 [assembly: AssemblyCopyright(NTKeyword.Copyright)]
 [assembly: AssemblyTrademark("")]
 [assembly: AssemblyCulture("")]

+ 0 - 62
src/MinerClient/Properties/Resources.Designer.cs

@@ -1,62 +0,0 @@
-//------------------------------------------------------------------------------
-// <auto-generated>
-//     此代码由工具生成。
-//     运行时版本:4.0.30319.42000
-//
-//     对此文件的更改可能会导致不正确的行为,并且如果
-//     重新生成代码,这些更改将会丢失。
-// </auto-generated>
-//------------------------------------------------------------------------------
-
-namespace NTMiner.Properties {
-
-
-    /// <summary>
-    ///   一个强类型的资源类,用于查找本地化的字符串等。
-    /// </summary>
-    // 此类是由 StronglyTypedResourceBuilder
-    // 类通过类似于 ResGen 或 Visual Studio 的工具自动生成的。
-    // 若要添加或移除成员,请编辑 .ResX 文件,然后重新运行 ResGen
-    // (以 /str 作为命令选项),或重新生成 VS 项目。
-    [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Resources.Tools.StronglyTypedResourceBuilder", "15.0.0.0")]
-    [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
-    [global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()]
-    internal class Resources {
-        
-        private static global::System.Resources.ResourceManager resourceMan;
-        
-        private static global::System.Globalization.CultureInfo resourceCulture;
-        
-        [global::System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Performance", "CA1811:AvoidUncalledPrivateCode")]
-        internal Resources() {
-        }
-        
-        /// <summary>
-        ///   返回此类使用的缓存的 ResourceManager 实例。
-        /// </summary>
-        [global::System.ComponentModel.EditorBrowsableAttribute(global::System.ComponentModel.EditorBrowsableState.Advanced)]
-        internal static global::System.Resources.ResourceManager ResourceManager {
-            get {
-                if (object.ReferenceEquals(resourceMan, null)) {
-                    global::System.Resources.ResourceManager temp = new global::System.Resources.ResourceManager("NTMiner.Properties.Resources", typeof(Resources).Assembly);
-                    resourceMan = temp;
-                }
-                return resourceMan;
-            }
-        }
-        
-        /// <summary>
-        ///   重写当前线程的 CurrentUICulture 属性
-        ///   重写当前线程的 CurrentUICulture 属性。
-        /// </summary>
-        [global::System.ComponentModel.EditorBrowsableAttribute(global::System.ComponentModel.EditorBrowsableState.Advanced)]
-        internal static global::System.Globalization.CultureInfo Culture {
-            get {
-                return resourceCulture;
-            }
-            set {
-                resourceCulture = value;
-            }
-        }
-    }
-}

+ 0 - 117
src/MinerClient/Properties/Resources.resx

@@ -1,117 +0,0 @@
-<?xml version="1.0" encoding="utf-8"?>
-<root>
-  <!-- 
-    Microsoft ResX Schema 
-    
-    Version 2.0
-    
-    The primary goals of this format is to allow a simple XML format 
-    that is mostly human readable. The generation and parsing of the 
-    various data types are done through the TypeConverter classes 
-    associated with the data types.
-    
-    Example:
-    
-    ... ado.net/XML headers & schema ...
-    <resheader name="resmimetype">text/microsoft-resx</resheader>
-    <resheader name="version">2.0</resheader>
-    <resheader name="reader">System.Resources.ResXResourceReader, System.Windows.Forms, ...</resheader>
-    <resheader name="writer">System.Resources.ResXResourceWriter, System.Windows.Forms, ...</resheader>
-    <data name="Name1"><value>this is my long string</value><comment>this is a comment</comment></data>
-    <data name="Color1" type="System.Drawing.Color, System.Drawing">Blue</data>
-    <data name="Bitmap1" mimetype="application/x-microsoft.net.object.binary.base64">
-        <value>[base64 mime encoded serialized .NET Framework object]</value>
-    </data>
-    <data name="Icon1" type="System.Drawing.Icon, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
-        <value>[base64 mime encoded string representing a byte array form of the .NET Framework object]</value>
-        <comment>This is a comment</comment>
-    </data>
-                
-    There are any number of "resheader" rows that contain simple 
-    name/value pairs.
-    
-    Each data row contains a name, and value. The row also contains a 
-    type or mimetype. Type corresponds to a .NET class that support 
-    text/value conversion through the TypeConverter architecture. 
-    Classes that don't support this are serialized and stored with the 
-    mimetype set.
-    
-    The mimetype is used for serialized objects, and tells the 
-    ResXResourceReader how to depersist the object. This is currently not 
-    extensible. For a given mimetype the value must be set accordingly:
-    
-    Note - application/x-microsoft.net.object.binary.base64 is the format 
-    that the ResXResourceWriter will generate, however the reader can 
-    read any of the formats listed below.
-    
-    mimetype: application/x-microsoft.net.object.binary.base64
-    value   : The object must be serialized with 
-            : System.Serialization.Formatters.Binary.BinaryFormatter
-            : and then encoded with base64 encoding.
-    
-    mimetype: application/x-microsoft.net.object.soap.base64
-    value   : The object must be serialized with 
-            : System.Runtime.Serialization.Formatters.Soap.SoapFormatter
-            : and then encoded with base64 encoding.
-
-    mimetype: application/x-microsoft.net.object.bytearray.base64
-    value   : The object must be serialized into a byte array 
-            : using a System.ComponentModel.TypeConverter
-            : and then encoded with base64 encoding.
-    -->
-  <xsd:schema id="root" xmlns="" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:msdata="urn:schemas-microsoft-com:xml-msdata">
-    <xsd:element name="root" msdata:IsDataSet="true">
-      <xsd:complexType>
-        <xsd:choice maxOccurs="unbounded">
-          <xsd:element name="metadata">
-            <xsd:complexType>
-              <xsd:sequence>
-                <xsd:element name="value" type="xsd:string" minOccurs="0" />
-              </xsd:sequence>
-              <xsd:attribute name="name" type="xsd:string" />
-              <xsd:attribute name="type" type="xsd:string" />
-              <xsd:attribute name="mimetype" type="xsd:string" />
-            </xsd:complexType>
-          </xsd:element>
-          <xsd:element name="assembly">
-            <xsd:complexType>
-              <xsd:attribute name="alias" type="xsd:string" />
-              <xsd:attribute name="name" type="xsd:string" />
-            </xsd:complexType>
-          </xsd:element>
-          <xsd:element name="data">
-            <xsd:complexType>
-              <xsd:sequence>
-                <xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
-                <xsd:element name="comment" type="xsd:string" minOccurs="0" msdata:Ordinal="2" />
-              </xsd:sequence>
-              <xsd:attribute name="name" type="xsd:string" msdata:Ordinal="1" />
-              <xsd:attribute name="type" type="xsd:string" msdata:Ordinal="3" />
-              <xsd:attribute name="mimetype" type="xsd:string" msdata:Ordinal="4" />
-            </xsd:complexType>
-          </xsd:element>
-          <xsd:element name="resheader">
-            <xsd:complexType>
-              <xsd:sequence>
-                <xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
-              </xsd:sequence>
-              <xsd:attribute name="name" type="xsd:string" use="required" />
-            </xsd:complexType>
-          </xsd:element>
-        </xsd:choice>
-      </xsd:complexType>
-    </xsd:element>
-  </xsd:schema>
-  <resheader name="resmimetype">
-    <value>text/microsoft-resx</value>
-  </resheader>
-  <resheader name="version">
-    <value>2.0</value>
-  </resheader>
-  <resheader name="reader">
-    <value>System.Resources.ResXResourceReader, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
-  </resheader>
-  <resheader name="writer">
-    <value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
-  </resheader>
-</root>

+ 0 - 26
src/MinerClient/Properties/Settings.Designer.cs

@@ -1,26 +0,0 @@
-//------------------------------------------------------------------------------
-// <auto-generated>
-//     此代码由工具生成。
-//     运行时版本:4.0.30319.42000
-//
-//     对此文件的更改可能会导致不正确的行为,并且如果
-//     重新生成代码,这些更改将会丢失。
-// </auto-generated>
-//------------------------------------------------------------------------------
-
-namespace NTMiner.Properties {
-
-
-    [global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()]
-    [global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.VisualStudio.Editors.SettingsDesigner.SettingsSingleFileGenerator", "15.8.0.0")]
-    internal sealed partial class Settings : global::System.Configuration.ApplicationSettingsBase {
-        
-        private static Settings defaultInstance = ((Settings)(global::System.Configuration.ApplicationSettingsBase.Synchronized(new Settings())));
-        
-        public static Settings Default {
-            get {
-                return defaultInstance;
-            }
-        }
-    }
-}

+ 0 - 7
src/MinerClient/Properties/Settings.settings

@@ -1,7 +0,0 @@
-<?xml version='1.0' encoding='utf-8'?>
-<SettingsFile xmlns="uri:settings" CurrentProfile="(Default)">
-  <Profiles>
-    <Profile Name="(Default)" />
-  </Profiles>
-  <Settings />
-</SettingsFile>

+ 2 - 2
src/MinerClient/packages.config

@@ -1,7 +1,7 @@
 <?xml version="1.0" encoding="utf-8"?>
 <packages>
-  <package id="Costura.Fody" version="4.0.0" targetFramework="net40" />
-  <package id="Fody" version="5.0.0" targetFramework="net40" developmentDependency="true" />
+  <package id="Costura.Fody" version="4.1.0" targetFramework="net40" />
+  <package id="Fody" version="6.3.0" targetFramework="net40" developmentDependency="true" />
   <package id="LiveCharts" version="0.9.7" targetFramework="net40" />
   <package id="LiveCharts.Wpf" version="0.9.7" targetFramework="net40" />
   <package id="Microsoft.AspNet.WebApi.Client" version="4.0.30506.0" targetFramework="net40" />

+ 1 - 0
src/MinerClientFinder/App.xaml.cs

@@ -27,6 +27,7 @@ namespace NTMiner {
                 MainWindow = new MainWindow();
                 MainWindow.Show();
                 VirtualRoot.StartTimer(new WpfTimingEventProducer());
+                NTMinerConsole.SetIsMainUiOk(true);
             }
             else {
                 Process thatProcess = null;

+ 6 - 24
src/MinerClientFinder/MinerClientFinder.csproj

@@ -1,6 +1,6 @@
 <?xml version="1.0" encoding="utf-8"?>
 <Project ToolsVersion="15.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
-  <Import Project="..\..\packages\Costura.Fody.4.0.0\build\Costura.Fody.props" Condition="Exists('..\..\packages\Costura.Fody.4.0.0\build\Costura.Fody.props')" />
+  <Import Project="..\..\packages\Costura.Fody.4.1.0\build\Costura.Fody.props" Condition="Exists('..\..\packages\Costura.Fody.4.1.0\build\Costura.Fody.props')" />
   <Import Project="$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props" Condition="Exists('$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props')" />
   <PropertyGroup>
     <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
@@ -44,8 +44,8 @@
     <StartupObject>NTMiner.App</StartupObject>
   </PropertyGroup>
   <ItemGroup>
-    <Reference Include="Costura, Version=4.0.0.0, Culture=neutral, PublicKeyToken=9919ef960d84173d, processorArchitecture=MSIL">
-      <HintPath>..\..\packages\Costura.Fody.4.0.0\lib\net40\Costura.dll</HintPath>
+    <Reference Include="Costura, Version=4.1.0.0, Culture=neutral, PublicKeyToken=9919ef960d84173d, processorArchitecture=MSIL">
+      <HintPath>..\..\packages\Costura.Fody.4.1.0\lib\net40\Costura.dll</HintPath>
     </Reference>
     <Reference Include="System" />
     <Reference Include="System.Core" />
@@ -84,25 +84,7 @@
     <Compile Include="Properties\AssemblyInfo.cs">
       <SubType>Code</SubType>
     </Compile>
-    <Compile Include="Properties\Resources.Designer.cs">
-      <AutoGen>True</AutoGen>
-      <DesignTime>True</DesignTime>
-      <DependentUpon>Resources.resx</DependentUpon>
-    </Compile>
-    <Compile Include="Properties\Settings.Designer.cs">
-      <AutoGen>True</AutoGen>
-      <DependentUpon>Settings.settings</DependentUpon>
-      <DesignTimeSharedInput>True</DesignTimeSharedInput>
-    </Compile>
-    <EmbeddedResource Include="Properties\Resources.resx">
-      <Generator>ResXFileCodeGenerator</Generator>
-      <LastGenOutput>Resources.Designer.cs</LastGenOutput>
-    </EmbeddedResource>
     <None Include="packages.config" />
-    <None Include="Properties\Settings.settings">
-      <Generator>SettingsSingleFileGenerator</Generator>
-      <LastGenOutput>Settings.Designer.cs</LastGenOutput>
-    </None>
   </ItemGroup>
   <ItemGroup>
     <None Include="App.config" />
@@ -137,12 +119,12 @@
     <Resource Include="logo.ico" />
   </ItemGroup>
   <Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
-  <Import Project="..\..\packages\Fody.5.0.0\build\Fody.targets" Condition="Exists('..\..\packages\Fody.5.0.0\build\Fody.targets')" />
   <Target Name="EnsureNuGetPackageBuildImports" BeforeTargets="PrepareForBuild">
     <PropertyGroup>
       <ErrorText>这台计算机上缺少此项目引用的 NuGet 程序包。使用“NuGet 程序包还原”可下载这些程序包。有关更多信息,请参见 http://go.microsoft.com/fwlink/?LinkID=322105。缺少的文件是 {0}。</ErrorText>
     </PropertyGroup>
-    <Error Condition="!Exists('..\..\packages\Fody.5.0.0\build\Fody.targets')" Text="$([System.String]::Format('$(ErrorText)', '..\..\packages\Fody.5.0.0\build\Fody.targets'))" />
-    <Error Condition="!Exists('..\..\packages\Costura.Fody.4.0.0\build\Costura.Fody.props')" Text="$([System.String]::Format('$(ErrorText)', '..\..\packages\Costura.Fody.4.0.0\build\Costura.Fody.props'))" />
+    <Error Condition="!Exists('..\..\packages\Fody.6.3.0\build\Fody.targets')" Text="$([System.String]::Format('$(ErrorText)', '..\..\packages\Fody.6.3.0\build\Fody.targets'))" />
+    <Error Condition="!Exists('..\..\packages\Costura.Fody.4.1.0\build\Costura.Fody.props')" Text="$([System.String]::Format('$(ErrorText)', '..\..\packages\Costura.Fody.4.1.0\build\Costura.Fody.props'))" />
   </Target>
+  <Import Project="..\..\packages\Fody.6.3.0\build\Fody.targets" Condition="Exists('..\..\packages\Fody.6.3.0\build\Fody.targets')" />
 </Project>

+ 2 - 4
src/MinerClientFinder/Properties/AssemblyInfo.cs

@@ -1,6 +1,4 @@
 using System.Reflection;
-using System.Resources;
-using System.Runtime.CompilerServices;
 using System.Runtime.InteropServices;
 using System.Windows;
 
@@ -10,9 +8,9 @@ using System.Windows;
 [assembly: AssemblyTitle("MinerClientFinder")]
 [assembly: AssemblyDescription("")]
 [assembly: AssemblyConfiguration("")]
-[assembly: AssemblyCompany("")]
+[assembly: AssemblyCompany(NTMiner.NTKeyword.Company)]
 [assembly: AssemblyProduct("MinerClientFinder")]
-[assembly: AssemblyCopyright("Copyright ©  2019")]
+[assembly: AssemblyCopyright(NTMiner.NTKeyword.Copyright)]
 [assembly: AssemblyTrademark("")]
 [assembly: AssemblyCulture("")]
 

+ 0 - 63
src/MinerClientFinder/Properties/Resources.Designer.cs

@@ -1,63 +0,0 @@
-//------------------------------------------------------------------------------
-// <auto-generated>
-//     此代码由工具生成。
-//     运行时版本:4.0.30319.42000
-//
-//     对此文件的更改可能会导致不正确的行为,并且如果
-//     重新生成代码,这些更改将会丢失。
-// </auto-generated>
-//------------------------------------------------------------------------------
-
-namespace NTMner.Properties {
-    using System;
-    
-    
-    /// <summary>
-    ///   一个强类型的资源类,用于查找本地化的字符串等。
-    /// </summary>
-    // 此类是由 StronglyTypedResourceBuilder
-    // 类通过类似于 ResGen 或 Visual Studio 的工具自动生成的。
-    // 若要添加或移除成员,请编辑 .ResX 文件,然后重新运行 ResGen
-    // (以 /str 作为命令选项),或重新生成 VS 项目。
-    [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Resources.Tools.StronglyTypedResourceBuilder", "16.0.0.0")]
-    [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
-    [global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()]
-    internal class Resources {
-        
-        private static global::System.Resources.ResourceManager resourceMan;
-        
-        private static global::System.Globalization.CultureInfo resourceCulture;
-        
-        [global::System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Performance", "CA1811:AvoidUncalledPrivateCode")]
-        internal Resources() {
-        }
-        
-        /// <summary>
-        ///   返回此类使用的缓存的 ResourceManager 实例。
-        /// </summary>
-        [global::System.ComponentModel.EditorBrowsableAttribute(global::System.ComponentModel.EditorBrowsableState.Advanced)]
-        internal static global::System.Resources.ResourceManager ResourceManager {
-            get {
-                if (object.ReferenceEquals(resourceMan, null)) {
-                    global::System.Resources.ResourceManager temp = new global::System.Resources.ResourceManager("NTMner.Properties.Resources", typeof(Resources).Assembly);
-                    resourceMan = temp;
-                }
-                return resourceMan;
-            }
-        }
-        
-        /// <summary>
-        ///   重写当前线程的 CurrentUICulture 属性
-        ///   重写当前线程的 CurrentUICulture 属性。
-        /// </summary>
-        [global::System.ComponentModel.EditorBrowsableAttribute(global::System.ComponentModel.EditorBrowsableState.Advanced)]
-        internal static global::System.Globalization.CultureInfo Culture {
-            get {
-                return resourceCulture;
-            }
-            set {
-                resourceCulture = value;
-            }
-        }
-    }
-}

+ 0 - 117
src/MinerClientFinder/Properties/Resources.resx

@@ -1,117 +0,0 @@
-<?xml version="1.0" encoding="utf-8"?>
-<root>
-  <!-- 
-    Microsoft ResX Schema 
-    
-    Version 2.0
-    
-    The primary goals of this format is to allow a simple XML format 
-    that is mostly human readable. The generation and parsing of the 
-    various data types are done through the TypeConverter classes 
-    associated with the data types.
-    
-    Example:
-    
-    ... ado.net/XML headers & schema ...
-    <resheader name="resmimetype">text/microsoft-resx</resheader>
-    <resheader name="version">2.0</resheader>
-    <resheader name="reader">System.Resources.ResXResourceReader, System.Windows.Forms, ...</resheader>
-    <resheader name="writer">System.Resources.ResXResourceWriter, System.Windows.Forms, ...</resheader>
-    <data name="Name1"><value>this is my long string</value><comment>this is a comment</comment></data>
-    <data name="Color1" type="System.Drawing.Color, System.Drawing">Blue</data>
-    <data name="Bitmap1" mimetype="application/x-microsoft.net.object.binary.base64">
-        <value>[base64 mime encoded serialized .NET Framework object]</value>
-    </data>
-    <data name="Icon1" type="System.Drawing.Icon, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
-        <value>[base64 mime encoded string representing a byte array form of the .NET Framework object]</value>
-        <comment>This is a comment</comment>
-    </data>
-                
-    There are any number of "resheader" rows that contain simple 
-    name/value pairs.
-    
-    Each data row contains a name, and value. The row also contains a 
-    type or mimetype. Type corresponds to a .NET class that support 
-    text/value conversion through the TypeConverter architecture. 
-    Classes that don't support this are serialized and stored with the 
-    mimetype set.
-    
-    The mimetype is used for serialized objects, and tells the 
-    ResXResourceReader how to depersist the object. This is currently not 
-    extensible. For a given mimetype the value must be set accordingly:
-    
-    Note - application/x-microsoft.net.object.binary.base64 is the format 
-    that the ResXResourceWriter will generate, however the reader can 
-    read any of the formats listed below.
-    
-    mimetype: application/x-microsoft.net.object.binary.base64
-    value   : The object must be serialized with 
-            : System.Serialization.Formatters.Binary.BinaryFormatter
-            : and then encoded with base64 encoding.
-    
-    mimetype: application/x-microsoft.net.object.soap.base64
-    value   : The object must be serialized with 
-            : System.Runtime.Serialization.Formatters.Soap.SoapFormatter
-            : and then encoded with base64 encoding.
-
-    mimetype: application/x-microsoft.net.object.bytearray.base64
-    value   : The object must be serialized into a byte array 
-            : using a System.ComponentModel.TypeConverter
-            : and then encoded with base64 encoding.
-    -->
-  <xsd:schema id="root" xmlns="" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:msdata="urn:schemas-microsoft-com:xml-msdata">
-    <xsd:element name="root" msdata:IsDataSet="true">
-      <xsd:complexType>
-        <xsd:choice maxOccurs="unbounded">
-          <xsd:element name="metadata">
-            <xsd:complexType>
-              <xsd:sequence>
-                <xsd:element name="value" type="xsd:string" minOccurs="0" />
-              </xsd:sequence>
-              <xsd:attribute name="name" type="xsd:string" />
-              <xsd:attribute name="type" type="xsd:string" />
-              <xsd:attribute name="mimetype" type="xsd:string" />
-            </xsd:complexType>
-          </xsd:element>
-          <xsd:element name="assembly">
-            <xsd:complexType>
-              <xsd:attribute name="alias" type="xsd:string" />
-              <xsd:attribute name="name" type="xsd:string" />
-            </xsd:complexType>
-          </xsd:element>
-          <xsd:element name="data">
-            <xsd:complexType>
-              <xsd:sequence>
-                <xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
-                <xsd:element name="comment" type="xsd:string" minOccurs="0" msdata:Ordinal="2" />
-              </xsd:sequence>
-              <xsd:attribute name="name" type="xsd:string" msdata:Ordinal="1" />
-              <xsd:attribute name="type" type="xsd:string" msdata:Ordinal="3" />
-              <xsd:attribute name="mimetype" type="xsd:string" msdata:Ordinal="4" />
-            </xsd:complexType>
-          </xsd:element>
-          <xsd:element name="resheader">
-            <xsd:complexType>
-              <xsd:sequence>
-                <xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
-              </xsd:sequence>
-              <xsd:attribute name="name" type="xsd:string" use="required" />
-            </xsd:complexType>
-          </xsd:element>
-        </xsd:choice>
-      </xsd:complexType>
-    </xsd:element>
-  </xsd:schema>
-  <resheader name="resmimetype">
-    <value>text/microsoft-resx</value>
-  </resheader>
-  <resheader name="version">
-    <value>2.0</value>
-  </resheader>
-  <resheader name="reader">
-    <value>System.Resources.ResXResourceReader, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
-  </resheader>
-  <resheader name="writer">
-    <value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
-  </resheader>
-</root>

+ 0 - 26
src/MinerClientFinder/Properties/Settings.Designer.cs

@@ -1,26 +0,0 @@
-//------------------------------------------------------------------------------
-// <auto-generated>
-//     此代码由工具生成。
-//     运行时版本:4.0.30319.42000
-//
-//     对此文件的更改可能会导致不正确的行为,并且如果
-//     重新生成代码,这些更改将会丢失。
-// </auto-generated>
-//------------------------------------------------------------------------------
-
-namespace NTMner.Properties {
-    
-    
-    [global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()]
-    [global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.VisualStudio.Editors.SettingsDesigner.SettingsSingleFileGenerator", "16.3.0.0")]
-    internal sealed partial class Settings : global::System.Configuration.ApplicationSettingsBase {
-        
-        private static Settings defaultInstance = ((Settings)(global::System.Configuration.ApplicationSettingsBase.Synchronized(new Settings())));
-        
-        public static Settings Default {
-            get {
-                return defaultInstance;
-            }
-        }
-    }
-}

+ 0 - 7
src/MinerClientFinder/Properties/Settings.settings

@@ -1,7 +0,0 @@
-<?xml version='1.0' encoding='utf-8'?>
-<SettingsFile xmlns="uri:settings" CurrentProfile="(Default)">
-  <Profiles>
-    <Profile Name="(Default)" />
-  </Profiles>
-  <Settings />
-</SettingsFile>

+ 2 - 2
src/MinerClientFinder/packages.config

@@ -1,5 +1,5 @@
 <?xml version="1.0" encoding="utf-8"?>
 <packages>
-  <package id="Costura.Fody" version="4.0.0" targetFramework="net40" />
-  <package id="Fody" version="5.0.0" targetFramework="net40" developmentDependency="true" />
+  <package id="Costura.Fody" version="4.1.0" targetFramework="net40" />
+  <package id="Fody" version="6.3.0" targetFramework="net40" developmentDependency="true" />
 </packages>

+ 1 - 1
src/MinerClientSelfHost/Properties/AssemblyInfo.cs

@@ -7,7 +7,7 @@ using System.Runtime.InteropServices;
 [assembly: AssemblyTitle("MinerClientSelfHost")]
 [assembly: AssemblyDescription("")]
 [assembly: AssemblyConfiguration("")]
-[assembly: AssemblyCompany("")]
+[assembly: AssemblyCompany(NTMiner.NTKeyword.Company)]
 [assembly: AssemblyProduct("MinerClientSelfHost")]
 [assembly: AssemblyCopyright(NTMiner.NTKeyword.Copyright)]
 [assembly: AssemblyTrademark("")]

+ 1 - 0
src/MinerStudio/App.xaml.cs

@@ -60,6 +60,7 @@ namespace NTMiner {
                             }
                             AppRoot.NotifyIcon = ExtendedNotifyIcon.Create("群控客户端", isMinerStudio: true);
                             VirtualRoot.Execute(new ShowMinerClientsWindowCommand(isToggle: false));
+                            NTMinerConsole.SetIsMainUiOk(true);
                         });
                     });
                 }, btnCloseClick: () => {

+ 6 - 24
src/MinerStudio/MinerStudio.csproj

@@ -1,6 +1,6 @@
 <?xml version="1.0" encoding="utf-8"?>
 <Project ToolsVersion="4.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
-  <Import Project="..\..\packages\Costura.Fody.4.0.0\build\Costura.Fody.props" Condition="Exists('..\..\packages\Costura.Fody.4.0.0\build\Costura.Fody.props')" />
+  <Import Project="..\..\packages\Costura.Fody.4.1.0\build\Costura.Fody.props" Condition="Exists('..\..\packages\Costura.Fody.4.1.0\build\Costura.Fody.props')" />
   <PropertyGroup>
     <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
     <Platform Condition=" '$(Platform)' == '' ">x86</Platform>
@@ -80,8 +80,8 @@
     <Reference Include="AxMSTSCLib">
       <HintPath>..\ThirdPartyDlls\AxMSTSCLib.dll</HintPath>
     </Reference>
-    <Reference Include="Costura, Version=4.0.0.0, Culture=neutral, PublicKeyToken=9919ef960d84173d, processorArchitecture=MSIL">
-      <HintPath>..\..\packages\Costura.Fody.4.0.0\lib\net40\Costura.dll</HintPath>
+    <Reference Include="Costura, Version=4.1.0.0, Culture=neutral, PublicKeyToken=9919ef960d84173d, processorArchitecture=MSIL">
+      <HintPath>..\..\packages\Costura.Fody.4.1.0\lib\net40\Costura.dll</HintPath>
     </Reference>
     <Reference Include="LiveCharts, Version=0.9.7.0, Culture=neutral, PublicKeyToken=0bc1f845d1ebb8df, processorArchitecture=MSIL">
       <HintPath>..\..\packages\LiveCharts.0.9.7\lib\net40\LiveCharts.dll</HintPath>
@@ -136,29 +136,11 @@
     <Compile Include="Properties\AssemblyInfo.cs">
       <SubType>Code</SubType>
     </Compile>
-    <Compile Include="Properties\Resources.Designer.cs">
-      <AutoGen>True</AutoGen>
-      <DesignTime>True</DesignTime>
-      <DependentUpon>Resources.resx</DependentUpon>
-    </Compile>
-    <Compile Include="Properties\Settings.Designer.cs">
-      <AutoGen>True</AutoGen>
-      <DependentUpon>Settings.settings</DependentUpon>
-      <DesignTimeSharedInput>True</DesignTimeSharedInput>
-    </Compile>
     <Compile Include="Ws\MinerStudioWsClient.cs" />
     <Compile Include="Ws\MinerStudioWsMessageHandler.cs" />
-    <EmbeddedResource Include="Properties\Resources.resx">
-      <Generator>ResXFileCodeGenerator</Generator>
-      <LastGenOutput>Resources.Designer.cs</LastGenOutput>
-    </EmbeddedResource>
     <None Include="app.config" />
     <None Include="app.manifest" />
     <None Include="packages.config" />
-    <None Include="Properties\Settings.settings">
-      <Generator>SettingsSingleFileGenerator</Generator>
-      <LastGenOutput>Settings.Designer.cs</LastGenOutput>
-    </None>
     <AppDesigner Include="Properties\" />
   </ItemGroup>
   <ItemGroup>
@@ -218,14 +200,14 @@
     </ApplicationDefinition>
   </ItemGroup>
   <Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
-  <Import Project="..\..\packages\Fody.5.0.0\build\Fody.targets" Condition="Exists('..\..\packages\Fody.5.0.0\build\Fody.targets')" />
   <Target Name="EnsureNuGetPackageBuildImports" BeforeTargets="PrepareForBuild">
     <PropertyGroup>
       <ErrorText>这台计算机上缺少此项目引用的 NuGet 程序包。使用“NuGet 程序包还原”可下载这些程序包。有关更多信息,请参见 http://go.microsoft.com/fwlink/?LinkID=322105。缺少的文件是 {0}。</ErrorText>
     </PropertyGroup>
-    <Error Condition="!Exists('..\..\packages\Fody.5.0.0\build\Fody.targets')" Text="$([System.String]::Format('$(ErrorText)', '..\..\packages\Fody.5.0.0\build\Fody.targets'))" />
-    <Error Condition="!Exists('..\..\packages\Costura.Fody.4.0.0\build\Costura.Fody.props')" Text="$([System.String]::Format('$(ErrorText)', '..\..\packages\Costura.Fody.4.0.0\build\Costura.Fody.props'))" />
+    <Error Condition="!Exists('..\..\packages\Fody.6.3.0\build\Fody.targets')" Text="$([System.String]::Format('$(ErrorText)', '..\..\packages\Fody.6.3.0\build\Fody.targets'))" />
+    <Error Condition="!Exists('..\..\packages\Costura.Fody.4.1.0\build\Costura.Fody.props')" Text="$([System.String]::Format('$(ErrorText)', '..\..\packages\Costura.Fody.4.1.0\build\Costura.Fody.props'))" />
   </Target>
+  <Import Project="..\..\packages\Fody.6.3.0\build\Fody.targets" Condition="Exists('..\..\packages\Fody.6.3.0\build\Fody.targets')" />
   <!-- To modify your build process, add your task inside one of the targets below and uncomment it. 
        Other similar extension points exist, see Microsoft.Common.targets.
   <Target Name="BeforeBuild">

+ 1 - 1
src/MinerStudio/Properties/AssemblyInfo.cs

@@ -21,7 +21,7 @@ using System.Windows;
 [assembly: AssemblyDescription(NTKeyword.ManXiaoManTag)]
 [assembly: AssemblyFileVersion(NTKeyword.Version)]
 [assembly: AssemblyConfiguration("")]
-[assembly: AssemblyCompany("")]
+[assembly: AssemblyCompany(NTKeyword.Company)]
 [assembly: AssemblyProduct("MinerStudio")]
 [assembly: AssemblyCopyright(NTKeyword.Copyright)]
 [assembly: AssemblyTrademark("")]

+ 0 - 62
src/MinerStudio/Properties/Resources.Designer.cs

@@ -1,62 +0,0 @@
-//------------------------------------------------------------------------------
-// <auto-generated>
-//     此代码由工具生成。
-//     运行时版本:4.0.30319.42000
-//
-//     对此文件的更改可能会导致不正确的行为,并且如果
-//     重新生成代码,这些更改将会丢失。
-// </auto-generated>
-//------------------------------------------------------------------------------
-
-namespace NTMiner.Properties {
-
-
-    /// <summary>
-    ///   一个强类型的资源类,用于查找本地化的字符串等。
-    /// </summary>
-    // 此类是由 StronglyTypedResourceBuilder
-    // 类通过类似于 ResGen 或 Visual Studio 的工具自动生成的。
-    // 若要添加或移除成员,请编辑 .ResX 文件,然后重新运行 ResGen
-    // (以 /str 作为命令选项),或重新生成 VS 项目。
-    [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Resources.Tools.StronglyTypedResourceBuilder", "15.0.0.0")]
-    [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
-    [global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()]
-    internal class Resources {
-        
-        private static global::System.Resources.ResourceManager resourceMan;
-        
-        private static global::System.Globalization.CultureInfo resourceCulture;
-        
-        [global::System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Performance", "CA1811:AvoidUncalledPrivateCode")]
-        internal Resources() {
-        }
-        
-        /// <summary>
-        ///   返回此类使用的缓存的 ResourceManager 实例。
-        /// </summary>
-        [global::System.ComponentModel.EditorBrowsableAttribute(global::System.ComponentModel.EditorBrowsableState.Advanced)]
-        internal static global::System.Resources.ResourceManager ResourceManager {
-            get {
-                if (object.ReferenceEquals(resourceMan, null)) {
-                    global::System.Resources.ResourceManager temp = new global::System.Resources.ResourceManager("NTMiner.Properties.Resources", typeof(Resources).Assembly);
-                    resourceMan = temp;
-                }
-                return resourceMan;
-            }
-        }
-        
-        /// <summary>
-        ///   重写当前线程的 CurrentUICulture 属性
-        ///   重写当前线程的 CurrentUICulture 属性。
-        /// </summary>
-        [global::System.ComponentModel.EditorBrowsableAttribute(global::System.ComponentModel.EditorBrowsableState.Advanced)]
-        internal static global::System.Globalization.CultureInfo Culture {
-            get {
-                return resourceCulture;
-            }
-            set {
-                resourceCulture = value;
-            }
-        }
-    }
-}

+ 0 - 117
src/MinerStudio/Properties/Resources.resx

@@ -1,117 +0,0 @@
-<?xml version="1.0" encoding="utf-8"?>
-<root>
-  <!-- 
-    Microsoft ResX Schema 
-    
-    Version 2.0
-    
-    The primary goals of this format is to allow a simple XML format 
-    that is mostly human readable. The generation and parsing of the 
-    various data types are done through the TypeConverter classes 
-    associated with the data types.
-    
-    Example:
-    
-    ... ado.net/XML headers & schema ...
-    <resheader name="resmimetype">text/microsoft-resx</resheader>
-    <resheader name="version">2.0</resheader>
-    <resheader name="reader">System.Resources.ResXResourceReader, System.Windows.Forms, ...</resheader>
-    <resheader name="writer">System.Resources.ResXResourceWriter, System.Windows.Forms, ...</resheader>
-    <data name="Name1"><value>this is my long string</value><comment>this is a comment</comment></data>
-    <data name="Color1" type="System.Drawing.Color, System.Drawing">Blue</data>
-    <data name="Bitmap1" mimetype="application/x-microsoft.net.object.binary.base64">
-        <value>[base64 mime encoded serialized .NET Framework object]</value>
-    </data>
-    <data name="Icon1" type="System.Drawing.Icon, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
-        <value>[base64 mime encoded string representing a byte array form of the .NET Framework object]</value>
-        <comment>This is a comment</comment>
-    </data>
-                
-    There are any number of "resheader" rows that contain simple 
-    name/value pairs.
-    
-    Each data row contains a name, and value. The row also contains a 
-    type or mimetype. Type corresponds to a .NET class that support 
-    text/value conversion through the TypeConverter architecture. 
-    Classes that don't support this are serialized and stored with the 
-    mimetype set.
-    
-    The mimetype is used for serialized objects, and tells the 
-    ResXResourceReader how to depersist the object. This is currently not 
-    extensible. For a given mimetype the value must be set accordingly:
-    
-    Note - application/x-microsoft.net.object.binary.base64 is the format 
-    that the ResXResourceWriter will generate, however the reader can 
-    read any of the formats listed below.
-    
-    mimetype: application/x-microsoft.net.object.binary.base64
-    value   : The object must be serialized with 
-            : System.Serialization.Formatters.Binary.BinaryFormatter
-            : and then encoded with base64 encoding.
-    
-    mimetype: application/x-microsoft.net.object.soap.base64
-    value   : The object must be serialized with 
-            : System.Runtime.Serialization.Formatters.Soap.SoapFormatter
-            : and then encoded with base64 encoding.
-
-    mimetype: application/x-microsoft.net.object.bytearray.base64
-    value   : The object must be serialized into a byte array 
-            : using a System.ComponentModel.TypeConverter
-            : and then encoded with base64 encoding.
-    -->
-  <xsd:schema id="root" xmlns="" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:msdata="urn:schemas-microsoft-com:xml-msdata">
-    <xsd:element name="root" msdata:IsDataSet="true">
-      <xsd:complexType>
-        <xsd:choice maxOccurs="unbounded">
-          <xsd:element name="metadata">
-            <xsd:complexType>
-              <xsd:sequence>
-                <xsd:element name="value" type="xsd:string" minOccurs="0" />
-              </xsd:sequence>
-              <xsd:attribute name="name" type="xsd:string" />
-              <xsd:attribute name="type" type="xsd:string" />
-              <xsd:attribute name="mimetype" type="xsd:string" />
-            </xsd:complexType>
-          </xsd:element>
-          <xsd:element name="assembly">
-            <xsd:complexType>
-              <xsd:attribute name="alias" type="xsd:string" />
-              <xsd:attribute name="name" type="xsd:string" />
-            </xsd:complexType>
-          </xsd:element>
-          <xsd:element name="data">
-            <xsd:complexType>
-              <xsd:sequence>
-                <xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
-                <xsd:element name="comment" type="xsd:string" minOccurs="0" msdata:Ordinal="2" />
-              </xsd:sequence>
-              <xsd:attribute name="name" type="xsd:string" msdata:Ordinal="1" />
-              <xsd:attribute name="type" type="xsd:string" msdata:Ordinal="3" />
-              <xsd:attribute name="mimetype" type="xsd:string" msdata:Ordinal="4" />
-            </xsd:complexType>
-          </xsd:element>
-          <xsd:element name="resheader">
-            <xsd:complexType>
-              <xsd:sequence>
-                <xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
-              </xsd:sequence>
-              <xsd:attribute name="name" type="xsd:string" use="required" />
-            </xsd:complexType>
-          </xsd:element>
-        </xsd:choice>
-      </xsd:complexType>
-    </xsd:element>
-  </xsd:schema>
-  <resheader name="resmimetype">
-    <value>text/microsoft-resx</value>
-  </resheader>
-  <resheader name="version">
-    <value>2.0</value>
-  </resheader>
-  <resheader name="reader">
-    <value>System.Resources.ResXResourceReader, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
-  </resheader>
-  <resheader name="writer">
-    <value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
-  </resheader>
-</root>

+ 0 - 26
src/MinerStudio/Properties/Settings.Designer.cs

@@ -1,26 +0,0 @@
-//------------------------------------------------------------------------------
-// <auto-generated>
-//     此代码由工具生成。
-//     运行时版本:4.0.30319.42000
-//
-//     对此文件的更改可能会导致不正确的行为,并且如果
-//     重新生成代码,这些更改将会丢失。
-// </auto-generated>
-//------------------------------------------------------------------------------
-
-namespace NTMiner.Properties {
-
-
-    [global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()]
-    [global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.VisualStudio.Editors.SettingsDesigner.SettingsSingleFileGenerator", "15.8.0.0")]
-    internal sealed partial class Settings : global::System.Configuration.ApplicationSettingsBase {
-        
-        private static Settings defaultInstance = ((Settings)(global::System.Configuration.ApplicationSettingsBase.Synchronized(new Settings())));
-        
-        public static Settings Default {
-            get {
-                return defaultInstance;
-            }
-        }
-    }
-}

+ 0 - 7
src/MinerStudio/Properties/Settings.settings

@@ -1,7 +0,0 @@
-<?xml version='1.0' encoding='utf-8'?>
-<SettingsFile xmlns="uri:settings" CurrentProfile="(Default)">
-  <Profiles>
-    <Profile Name="(Default)" />
-  </Profiles>
-  <Settings />
-</SettingsFile>

+ 2 - 2
src/MinerStudio/packages.config

@@ -1,7 +1,7 @@
 <?xml version="1.0" encoding="utf-8"?>
 <packages>
-  <package id="Costura.Fody" version="4.0.0" targetFramework="net40" />
-  <package id="Fody" version="5.0.0" targetFramework="net40" developmentDependency="true" />
+  <package id="Costura.Fody" version="4.1.0" targetFramework="net40" />
+  <package id="Fody" version="6.3.0" targetFramework="net40" developmentDependency="true" />
   <package id="LiveCharts" version="0.9.7" targetFramework="net40" />
   <package id="LiveCharts.Wpf" version="0.9.7" targetFramework="net40" />
   <package id="Microsoft.AspNet.WebApi.Client" version="4.0.30506.0" targetFramework="net40" />

+ 1 - 1
src/MinerStudioSelfHost/Properties/AssemblyInfo.cs

@@ -7,7 +7,7 @@ using System.Runtime.InteropServices;
 [assembly: AssemblyTitle("MinerStudioSelfHost")]
 [assembly: AssemblyDescription("")]
 [assembly: AssemblyConfiguration("")]
-[assembly: AssemblyCompany("")]
+[assembly: AssemblyCompany(NTMiner.NTKeyword.Company)]
 [assembly: AssemblyProduct("MinerStudioSelfHost")]
 [assembly: AssemblyCopyright(NTMiner.NTKeyword.Copyright)]
 [assembly: AssemblyTrademark("")]

+ 2 - 2
src/NTMiner.Controllers/Properties/AssemblyInfo.cs

@@ -7,9 +7,9 @@ using System.Runtime.InteropServices;
 [assembly: AssemblyTitle("NTMiner.Controllers")]
 [assembly: AssemblyDescription("")]
 [assembly: AssemblyConfiguration("")]
-[assembly: AssemblyCompany("")]
+[assembly: AssemblyCompany(NTMiner.NTKeyword.Company)]
 [assembly: AssemblyProduct("NTMiner.Controllers")]
-[assembly: AssemblyCopyright("Copyright ©  NTMiner")]
+[assembly: AssemblyCopyright(NTMiner.NTKeyword.Copyright)]
 [assembly: AssemblyTrademark("")]
 [assembly: AssemblyCulture("")]
 

+ 21 - 22
src/NTMinerClient/Core/Impl/OverClockDataSet.cs

@@ -74,39 +74,38 @@ namespace NTMiner.Core.Impl {
         }
 
         private bool _isInited = false;
-        private void Init() {
-            if (_isInited) {
-                return;
-            }
-            _isInited = true;
-            RpcRoot.OfficialServer.OverClockDataService.GetOverClockDatasAsync((response, e) => {
-                if (response.IsSuccess()) {
-                    IEnumerable<OverClockData> query;
-                    if (_root.GpuSet.GpuType == GpuType.Empty) {
-                        query = response.Data;
-                    }
-                    else {
-                        query = response.Data.Where(a => a.GpuType == _root.GpuSet.GpuType);
-                    }
-                    foreach (var item in query) {
-                        if (!_dicById.ContainsKey(item.GetId())) {
-                            _dicById.Add(item.GetId(), item);
+        private void InitOnece() {
+            if (!_isInited) {
+                RpcRoot.OfficialServer.OverClockDataService.GetOverClockDatasAsync((response, e) => {
+                    if (response.IsSuccess()) {
+                        IEnumerable<OverClockData> query;
+                        if (_root.GpuSet.GpuType == GpuType.Empty) {
+                            query = response.Data;
+                        }
+                        else {
+                            query = response.Data.Where(a => a.GpuType == _root.GpuSet.GpuType);
+                        }
+                        foreach (var item in query) {
+                            if (!_dicById.ContainsKey(item.GetId())) {
+                                _dicById.Add(item.GetId(), item);
+                            }
                         }
                     }
-                }
-                VirtualRoot.RaiseEvent(new OverClockDataSetInitedEvent());
-            });
+                    VirtualRoot.RaiseEvent(new OverClockDataSetInitedEvent());
+                });
+                _isInited = true;
+            }
         }
 
         public bool TryGetOverClockData(Guid id, out IOverClockData data) {
-            Init();
+            InitOnece();
             var r = _dicById.TryGetValue(id, out OverClockData temp);
             data = temp;
             return r;
         }
 
         public IEnumerable<IOverClockData> AsEnumerable() {
-            Init();
+            InitOnece();
             return _dicById.Values;
         }
     }

+ 7 - 9
src/NTMinerClient/Core/Profiles/Impl/WalletSet.cs

@@ -85,17 +85,15 @@ namespace NTMiner.Core.Profiles.Impl {
         }
 
         private void Init() {
-            if (!_isInited) {
-                var repository = _root.ServerContext.CreateLocalRepository<WalletData>();
-                lock (_locker) {
-                    if (!_isInited) {
-                        foreach (var item in repository.GetAll()) {
-                            if (!_dicById.ContainsKey(item.Id)) {
-                                _dicById.Add(item.Id, item);
-                            }
+            lock (_locker) {
+                if (!_isInited) {
+                    var repository = _root.ServerContext.CreateLocalRepository<WalletData>();
+                    foreach (var item in repository.GetAll()) {
+                        if (!_dicById.ContainsKey(item.Id)) {
+                            _dicById.Add(item.Id, item);
                         }
-                        _isInited = true;
                     }
+                    _isInited = true;
                 }
             }
         }

+ 18 - 2
src/NTMinerClient/Gpus/Impl/GpuOverClock.cs

@@ -29,14 +29,30 @@ namespace NTMiner.Gpus.Impl {
                     if (gpu.Index == NTMinerContext.GpuAllId) {
                         continue;
                     }
-                    _gpuHelper.OverClock(gpu, coreClockMHz, coreClockVoltage, memoryClockMHz, memoryClockVoltage, powerLimit, tempLimit, fanSpeed);
+                    _gpuHelper.OverClock(
+                        gpu, 
+                        coreClockMHz, 
+                        coreClockVoltage, 
+                        memoryClockMHz, 
+                        memoryClockVoltage, 
+                        powerLimit, 
+                        tempLimit, 
+                        fanSpeed);
                 }
             }
             else {
                 if (!NTMinerContext.Instance.GpuSet.TryGetGpu(gpuIndex, out IGpu gpu)) {
                     return;
                 }
-                _gpuHelper.OverClock(gpu, coreClockMHz, coreClockVoltage, memoryClockMHz, memoryClockVoltage, powerLimit, tempLimit, fanSpeed);
+                _gpuHelper.OverClock(
+                    gpu, 
+                    coreClockMHz, 
+                    coreClockVoltage, 
+                    memoryClockMHz, 
+                    memoryClockVoltage, 
+                    powerLimit, 
+                    tempLimit, 
+                    fanSpeed);
             }
         }
 

+ 1 - 1
src/NTMinerClient/Properties/AssemblyInfo.cs

@@ -7,7 +7,7 @@ using System.Runtime.InteropServices;
 [assembly: AssemblyTitle("NTMinerClient")]
 [assembly: AssemblyDescription("")]
 [assembly: AssemblyConfiguration("")]
-[assembly: AssemblyCompany("")]
+[assembly: AssemblyCompany(NTMiner.NTKeyword.Company)]
 [assembly: AssemblyProduct("NTMinerClient")]
 [assembly: AssemblyCopyright(NTMiner.NTKeyword.Copyright)]
 [assembly: AssemblyTrademark("")]

+ 10 - 8
src/NTMinerDaemon/NTMinerDaemon.csproj

@@ -1,6 +1,6 @@
 <?xml version="1.0" encoding="utf-8"?>
 <Project ToolsVersion="15.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
-  <Import Project="..\..\packages\Costura.Fody.4.0.0\build\Costura.Fody.props" Condition="Exists('..\..\packages\Costura.Fody.4.0.0\build\Costura.Fody.props')" />
+  <Import Project="..\..\packages\Costura.Fody.4.1.0\build\Costura.Fody.props" Condition="Exists('..\..\packages\Costura.Fody.4.1.0\build\Costura.Fody.props')" />
   <Import Project="$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props" Condition="Exists('$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props')" />
   <PropertyGroup>
     <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
@@ -44,8 +44,8 @@
     <ApplicationIcon>logo.ico</ApplicationIcon>
   </PropertyGroup>
   <ItemGroup>
-    <Reference Include="Costura, Version=4.0.0.0, Culture=neutral, PublicKeyToken=9919ef960d84173d, processorArchitecture=MSIL">
-      <HintPath>..\..\packages\Costura.Fody.4.0.0\lib\net40\Costura.dll</HintPath>
+    <Reference Include="Costura, Version=4.1.0.0, Culture=neutral, PublicKeyToken=9919ef960d84173d, processorArchitecture=MSIL">
+      <HintPath>..\..\packages\Costura.Fody.4.1.0\lib\net40\Costura.dll</HintPath>
     </Reference>
     <Reference Include="Interop.NetFwTypeLib">
       <HintPath>..\ThirdPartyDlls\Interop.NetFwTypeLib.dll</HintPath>
@@ -54,13 +54,14 @@
     <Reference Include="LiteDB, Version=4.1.4.0, Culture=neutral, PublicKeyToken=4ee40123013c9f27, processorArchitecture=MSIL">
       <HintPath>..\..\packages\LiteDB.4.1.4\lib\net40\LiteDB.dll</HintPath>
     </Reference>
-    <Reference Include="log4net, Version=2.0.8.0, Culture=neutral, PublicKeyToken=669e0ddf0bb1aa2a, processorArchitecture=MSIL">
-      <HintPath>..\..\packages\log4net.2.0.8\lib\net40-full\log4net.dll</HintPath>
+    <Reference Include="log4net, Version=2.0.12.0, Culture=neutral, PublicKeyToken=669e0ddf0bb1aa2a, processorArchitecture=MSIL">
+      <HintPath>..\..\packages\log4net.2.0.12\lib\net40\log4net.dll</HintPath>
     </Reference>
     <Reference Include="Newtonsoft.Json, Version=12.0.0.0, Culture=neutral, PublicKeyToken=30ad4fe6b2a6aeed, processorArchitecture=MSIL">
       <HintPath>..\..\packages\Newtonsoft.Json.12.0.3\lib\net40\Newtonsoft.Json.dll</HintPath>
     </Reference>
     <Reference Include="System" />
+    <Reference Include="System.Configuration" />
     <Reference Include="System.Management" />
     <Reference Include="System.Net.Http, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a, processorArchitecture=MSIL">
       <HintPath>..\..\packages\Microsoft.Net.Http.2.0.20710.0\lib\net40\System.Net.Http.dll</HintPath>
@@ -71,6 +72,7 @@
     <Reference Include="System.Net.Http.WebRequest, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a, processorArchitecture=MSIL">
       <HintPath>..\..\packages\Microsoft.Net.Http.2.0.20710.0\lib\net40\System.Net.Http.WebRequest.dll</HintPath>
     </Reference>
+    <Reference Include="System.Web" />
     <Reference Include="System.Web.Http, Version=4.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35, processorArchitecture=MSIL">
       <HintPath>..\..\packages\Microsoft.AspNet.WebApi.Core.4.0.30506.0\lib\net40\System.Web.Http.dll</HintPath>
     </Reference>
@@ -209,12 +211,12 @@
   <PropertyGroup>
     <PostBuildEvent>$(TargetName) --sha1</PostBuildEvent>
   </PropertyGroup>
-  <Import Project="..\..\packages\Fody.5.0.0\build\Fody.targets" Condition="Exists('..\..\packages\Fody.5.0.0\build\Fody.targets')" />
   <Target Name="EnsureNuGetPackageBuildImports" BeforeTargets="PrepareForBuild">
     <PropertyGroup>
       <ErrorText>这台计算机上缺少此项目引用的 NuGet 程序包。使用“NuGet 程序包还原”可下载这些程序包。有关更多信息,请参见 http://go.microsoft.com/fwlink/?LinkID=322105。缺少的文件是 {0}。</ErrorText>
     </PropertyGroup>
-    <Error Condition="!Exists('..\..\packages\Fody.5.0.0\build\Fody.targets')" Text="$([System.String]::Format('$(ErrorText)', '..\..\packages\Fody.5.0.0\build\Fody.targets'))" />
-    <Error Condition="!Exists('..\..\packages\Costura.Fody.4.0.0\build\Costura.Fody.props')" Text="$([System.String]::Format('$(ErrorText)', '..\..\packages\Costura.Fody.4.0.0\build\Costura.Fody.props'))" />
+    <Error Condition="!Exists('..\..\packages\Fody.6.3.0\build\Fody.targets')" Text="$([System.String]::Format('$(ErrorText)', '..\..\packages\Fody.6.3.0\build\Fody.targets'))" />
+    <Error Condition="!Exists('..\..\packages\Costura.Fody.4.1.0\build\Costura.Fody.props')" Text="$([System.String]::Format('$(ErrorText)', '..\..\packages\Costura.Fody.4.1.0\build\Costura.Fody.props'))" />
   </Target>
+  <Import Project="..\..\packages\Fody.6.3.0\build\Fody.targets" Condition="Exists('..\..\packages\Fody.6.3.0\build\Fody.targets')" />
 </Project>

+ 1 - 1
src/NTMinerDaemon/Properties/AssemblyInfo.cs

@@ -10,7 +10,7 @@ using System.Runtime.InteropServices;
 [assembly: AssemblyTitle("NTMinerDaemon")]
 [assembly: AssemblyDescription("")]
 [assembly: AssemblyConfiguration("")]
-[assembly: AssemblyCompany("")]
+[assembly: AssemblyCompany(NTKeyword.Company)]
 [assembly: AssemblyProduct("NTMinerDaemon")]
 [assembly: AssemblyCopyright(NTKeyword.Copyright)]
 [assembly: AssemblyTrademark("")]

+ 3 - 3
src/NTMinerDaemon/packages.config

@@ -1,9 +1,9 @@
 <?xml version="1.0" encoding="utf-8"?>
 <packages>
-  <package id="Costura.Fody" version="4.0.0" targetFramework="net40" />
-  <package id="Fody" version="5.0.0" targetFramework="net40" developmentDependency="true" />
+  <package id="Costura.Fody" version="4.1.0" targetFramework="net40" />
+  <package id="Fody" version="6.3.0" targetFramework="net40" developmentDependency="true" />
   <package id="LiteDB" version="4.1.4" targetFramework="net40" />
-  <package id="log4net" version="2.0.8" targetFramework="net40" />
+  <package id="log4net" version="2.0.12" targetFramework="net40" />
   <package id="Microsoft.AspNet.WebApi.Client" version="4.0.30506.0" targetFramework="net40" />
   <package id="Microsoft.AspNet.WebApi.Core" version="4.0.30506.0" targetFramework="net40" />
   <package id="Microsoft.AspNet.WebApi.SelfHost" version="4.0.30506.0" targetFramework="net40" />

+ 9 - 0
src/NTMinerDataSchemas/Core/IOverClockInput.cs

@@ -1,7 +1,13 @@
 namespace NTMiner.Core {
     public interface IOverClockInput : ICanUpdateByReflection {
+        /// <summary>
+        /// 对于N卡来说是Delta,对于A卡来说是绝对值。
+        /// </summary>
         int CoreClockDelta { get; set; }
 
+        /// <summary>
+        /// 对于N卡来说是Delta,对于A卡来说是绝对值。
+        /// </summary>
         int MemoryClockDelta { get; set; }
 
         int CoreVoltage { get; set; }
@@ -15,6 +21,9 @@
 
         int TempLimit { get; set; }
 
+        /// <summary>
+        /// 百分比,FanSpeed
+        /// </summary>
         int Cool { get; }
     }
 }

+ 1 - 0
src/NTMinerDataSchemas/NTKeyword.cs

@@ -16,6 +16,7 @@ namespace NTMiner {
         public const string ManJiTag = "蛮吉";
         public const string ManXiaoManTag = "蛮小满";
         public const string Copyright = "Copyright ©  NTMiner";
+        public const string Company = "开源矿工";
 
         public const string TempDirName = "NTMiner";
         public const string RootLockFileName = "home.lock";

+ 2 - 2
src/NTMinerDataSchemas/Properties/AssemblyInfo.cs

@@ -7,9 +7,9 @@ using System.Runtime.InteropServices;
 [assembly: AssemblyTitle("NTMinerDataSchemas")]
 [assembly: AssemblyDescription("")]
 [assembly: AssemblyConfiguration("")]
-[assembly: AssemblyCompany("")]
+[assembly: AssemblyCompany(NTMiner.NTKeyword.Company)]
 [assembly: AssemblyProduct("NTMinerDataSchemas")]
-[assembly: AssemblyCopyright("Copyright ©  NTMiner")]
+[assembly: AssemblyCopyright(NTMiner.NTKeyword.Copyright)]
 [assembly: AssemblyTrademark("")]
 [assembly: AssemblyCulture("")]
 

+ 0 - 30
src/NTMinerGpus/Gpus/Adl/AdlNativeMethods.cs

@@ -16,31 +16,21 @@ namespace NTMiner.Gpus.Adl {
         internal delegate AdlStatus ADL_Main_Control_CreateDelegate(ADL_Main_Memory_AllocCallback callback, int enumConnectedAdapters);
         internal delegate AdlStatus ADL2_Main_Control_CreateDelegate(ADL_Main_Memory_AllocCallback callback, int enumConnectedAdapters, out IntPtr context);
         internal delegate AdlStatus ADL_Adapter_AdapterInfo_GetDelegate(IntPtr info, int size);
-        internal delegate AdlStatus ADL2_Adapter_AdapterInfo_GetDelegate(IntPtr context, ref IntPtr info, int size);
 
         public delegate AdlStatus ADL_Main_Control_DestroyDelegate();
         public delegate AdlStatus ADL2_Main_Control_DestroyDelegate(IntPtr context);
         internal delegate AdlStatus ADL_Adapter_NumberOfAdapters_GetDelegate(ref int numAdapters);
-        internal delegate AdlStatus ADL2_Adapter_NumberOfAdapters_GetDelegate(IntPtr context, ref int numAdapters);
-        internal delegate AdlStatus ADL_Adapter_Active_GetDelegate(int adapterIndex, out int status);
-        internal delegate AdlStatus ADL_Overdrive5_CurrentActivity_GetDelegate(int iAdapterIndex, ref ADLPMActivity activity);
         internal delegate AdlStatus ADL_Overdrive5_Temperature_GetDelegate(int adapterIndex, int thermalControllerIndex, ref ADLTemperature temperature);
         internal delegate AdlStatus ADL2_OverdriveN_Temperature_GetDelegate(IntPtr context, int adapterIndex, ADLODNTemperatureType temperatureType, out int temperature);
         internal delegate AdlStatus ADL_Overdrive5_FanSpeed_GetDelegate(int adapterIndex, int thermalControllerIndex, ref ADLFanSpeedValue fanSpeedValue);
         internal delegate AdlStatus ADL_Overdrive5_FanSpeed_SetDelegate(int adapterIndex, int thermalControllerIndex, ref ADLFanSpeedValue fanSpeedValue);
         internal delegate AdlStatus ADL_Overdrive5_FanSpeedToDefault_SetDelegate(int adapterIndex, int thermalControllerIndex);
         internal delegate AdlStatus ADL2_Overdrive5_FanSpeedToDefault_SetDelegate(IntPtr context, int adapterIndex, int thermalControllerIndex);
-        internal delegate AdlStatus ADL2_OverdriveN_FanControl_GetDelegate(IntPtr context, int adapterIndex, out ADLOverdriveFanControl fanControl);
-        internal delegate AdlStatus ADL2_OverdriveN_FanControl_SetDelegate(IntPtr context, int iAdapterIndex, ref ADLOverdriveFanControl fanControl);
         internal delegate AdlStatus ADL_Overdrive_CapsDelegate(int adapterIndex, out int supported, out int enabled, out int version);
-        internal delegate AdlStatus ADL2_Overdrive_CapsDelegate(IntPtr context, int adapterIndex, out int supported, out int enabled, out int version);
         internal delegate AdlStatus ADL2_OverdriveN_PowerLimit_GetDelegate(IntPtr context, int iAdapterIndex, out ADLODNPowerLimitSetting lpODPowerLimit);
         internal delegate AdlStatus ADL2_OverdriveN_PowerLimit_SetDelegate(IntPtr context, int iAdapterIndex, ref ADLODNPowerLimitSetting lpODPowerLimit);
         internal delegate AdlStatus ADL2_Overdrive6_CurrentPower_GetDelegate(IntPtr context, int iAdapterIndex, ADLODNCurrentPowerType powerType, out int lpCurrentValue);
         internal delegate AdlStatus ADL2_New_QueryPMLogData_GetDelegate(IntPtr context, int adapterIndex, ref ADLPMLogDataOutput dataOutput);
-        internal delegate AdlStatus ADL_Overdrive5_ODParameters_GetDelegate(int adapterIndex, out ADLODParameters parameters);
-        internal delegate AdlStatus ADL2_OverdriveN_PerformanceStatus_GetDelegate(IntPtr context, int adapterIndex, out ADLODNPerformanceStatus performanceStatus);
-        internal delegate AdlStatus ADL_Graphics_Versions_GetDelegate(out ADLVersionsInfo versionInfo);
         internal delegate AdlStatus ADL_Adapter_MemoryInfo_GetDelegate(int iAdapterIndex, ref ADLMemoryInfo lpMemoryInfo);
         internal delegate AdlStatus ADL2_Graphics_VersionsX2_GetDelegate(IntPtr context, ref ADLVersionsInfoX2 lpVersionsInfo);
         internal delegate AdlStatus ADL2_OverdriveN_MemoryClocksX2_GetDelegate(IntPtr context, int iAdapterIndex, ref ADLODNPerformanceLevelsX2 lpODPerformanceLevels);
@@ -62,20 +52,12 @@ namespace NTMiner.Gpus.Adl {
         [Adl]
         internal static ADL_Adapter_AdapterInfo_GetDelegate ADL_Adapter_AdapterInfo_Get { get; private set; }
         [Adl]
-        internal static ADL2_Adapter_AdapterInfo_GetDelegate ADL2_Adapter_AdapterInfo_Get { get; set; }
-        [Adl]
         internal static ADL_Main_Control_DestroyDelegate ADL_Main_Control_Destroy { get; private set; }
         [Adl]
         internal static ADL2_Main_Control_DestroyDelegate ADL2_Main_Control_Destroy { get; private set; }
         [Adl]
         internal static ADL_Adapter_NumberOfAdapters_GetDelegate ADL_Adapter_NumberOfAdapters_Get { get; private set; }
         [Adl]
-        internal static ADL2_Adapter_NumberOfAdapters_GetDelegate ADL2_Adapter_NumberOfAdapters_Get { get; private set; }
-        [Adl]
-        internal static ADL_Adapter_Active_GetDelegate ADL_Adapter_Active_Get { get; private set; }
-        [Adl]
-        internal static ADL_Overdrive5_CurrentActivity_GetDelegate ADL_Overdrive5_CurrentActivity_Get { get; private set; }
-        [Adl]
         internal static ADL_Overdrive5_Temperature_GetDelegate ADL_Overdrive5_Temperature_Get { get; private set; }
         [Adl]
         internal static ADL2_OverdriveN_Temperature_GetDelegate ADL2_OverdriveN_Temperature_Get { get; private set; }
@@ -88,26 +70,14 @@ namespace NTMiner.Gpus.Adl {
         [Adl]
         internal static ADL2_Overdrive5_FanSpeedToDefault_SetDelegate ADL2_Overdrive5_FanSpeedToDefault_Set { get; private set; }
         [Adl]
-        internal static ADL2_OverdriveN_FanControl_GetDelegate ADL2_OverdriveN_FanControl_Get { get; private set; }
-        [Adl]
-        internal static ADL2_OverdriveN_FanControl_SetDelegate ADL2_OverdriveN_FanControl_Set { get; private set; }
-        [Adl]
         internal static ADL_Overdrive_CapsDelegate ADL_Overdrive_Caps { get; private set; }
         [Adl]
-        internal static ADL2_Overdrive_CapsDelegate ADL2_Overdrive_Caps { get; private set; }
-        [Adl]
         internal static ADL2_OverdriveN_PowerLimit_GetDelegate ADL2_OverdriveN_PowerLimit_Get { get; private set; }
         [Adl]
         internal static ADL2_Overdrive6_CurrentPower_GetDelegate ADL2_Overdrive6_CurrentPower_Get { get; private set; }
         [Adl]
         internal static ADL2_New_QueryPMLogData_GetDelegate ADL2_New_QueryPMLogData_Get { get; private set; }
         [Adl]
-        internal static ADL_Overdrive5_ODParameters_GetDelegate ADL_Overdrive5_ODParameters_Get { get; private set; }
-        [Adl]
-        internal static ADL2_OverdriveN_PerformanceStatus_GetDelegate ADL2_OverdriveN_PerformanceStatus_Get { get; private set; }
-        [Adl]
-        internal static ADL_Graphics_Versions_GetDelegate ADL_Graphics_Versions_Get { get; private set; }
-        [Adl]
         internal static ADL2_OverdriveN_PowerLimit_SetDelegate ADL2_OverdriveN_PowerLimit_Set { get; private set; }
         [Adl]
         internal static ADL_Adapter_MemoryInfo_GetDelegate ADL_Adapter_MemoryInfo_Get { get; private set; }

+ 0 - 139
src/NTMinerGpus/Gpus/Adl/AdlTypes.cs

@@ -77,24 +77,6 @@ namespace NTMiner.Gpus.Adl {
         }
     }
 
-    [StructLayout(LayoutKind.Sequential)]
-    internal struct ADLPMActivity {
-        public int Size;
-        public int EngineClock;
-        public int MemoryClock;
-        public int Vddc;
-        public int ActivityPercent;
-        public int CurrentPerformanceLevel;
-        public int CurrentBusSpeed;
-        public int CurrentBusLanes;
-        public int MaximumBusLanes;
-        public int Reserved;
-
-        public override string ToString() {
-            return VirtualRoot.JsonSerializer.Serialize(this);
-        }
-    }
-
     [StructLayout(LayoutKind.Sequential)]
     internal struct ADLTemperature {
         public int Size;
@@ -127,22 +109,6 @@ namespace NTMiner.Gpus.Adl {
         }
     }
 
-    [StructLayout(LayoutKind.Sequential)]
-    public struct ADLOverdriveFanControl {
-        public int iMode;
-        public int iFanControlMode;
-        public int iCurrentFanSpeedMode;
-        public int iCurrentFanSpeed;
-        public int iTargetFanSpeed;
-        public int iTargetTemperature;
-        public int iMinPerformanceClock;
-        public int iMinFanLimit;
-
-        public override string ToString() {
-            return VirtualRoot.JsonSerializer.Serialize(this);
-        }
-    }
-
     [StructLayout(LayoutKind.Sequential)]
     internal struct ADLMemoryInfo {
         public ulong MemorySize;
@@ -248,76 +214,6 @@ namespace NTMiner.Gpus.Adl {
         PMLOG_MAX_SENSORS_REAL
     }
 
-    [StructLayout(LayoutKind.Sequential)]
-    internal struct ADLODParameterRange {
-        public int Min;
-        public int Max;
-        public int Step;
-
-        public override string ToString() {
-            return VirtualRoot.JsonSerializer.Serialize(this);
-        }
-    }
-
-    [StructLayout(LayoutKind.Sequential)]
-    internal struct ADLODParameters {
-        public int Size;
-        public int NumberOfPerformanceLevels;
-        public int ActivityReportingSupported;
-        public int DiscretePerformanceLevels;
-        public int Reserved;
-        public ADLODParameterRange EngineClock;
-        public ADLODParameterRange MemoryClock;
-        public ADLODParameterRange Vddc;
-
-        public override string ToString() {
-            return VirtualRoot.JsonSerializer.Serialize(this);
-        }
-    }
-
-    [StructLayout(LayoutKind.Sequential)]
-    internal struct ADLODNPerformanceStatus {
-        public int CoreClock;
-        public int MemoryClock;
-        public int DCEFClock;
-        public int GFXClock;
-        public int UVDClock;
-        public int VCEClock;
-        public int GPUActivityPercent;
-        public int CurrentCorePerformanceLevel;
-        public int CurrentMemoryPerformanceLevel;
-        public int CurrentDCEFPerformanceLevel;
-        public int CurrentGFXPerformanceLevel;
-        public int UVDPerformanceLevel;
-        public int VCEPerformanceLevel;
-        public int CurrentBusSpeed;
-        public int CurrentBusLanes;
-        public int MaximumBusLanes;
-        public int VDDC;
-        public int VDDCI;
-
-        public override string ToString() {
-            return VirtualRoot.JsonSerializer.Serialize(this);
-        }
-    }
-
-    [StructLayout(LayoutKind.Sequential)]
-    internal struct ADLVersionsInfo {
-        // 形如19.50.29.27-200421a-354308E-RadeonSoftwareAdrenalin2020,经验证这个不是版本号
-        [MarshalAs(UnmanagedType.ByValTStr, SizeConst = 256)]
-        public string DriverVersion;
-
-        [MarshalAs(UnmanagedType.ByValTStr, SizeConst = 256)]
-        public string CatalystVersion;
-
-        [MarshalAs(UnmanagedType.ByValTStr, SizeConst = 256)]
-        public string CatalystWebLink;
-
-        public override string ToString() {
-            return VirtualRoot.JsonSerializer.Serialize(this);
-        }
-    }
-
     [StructLayout(LayoutKind.Sequential)]
     internal struct ADLVersionsInfoX2 {
         [MarshalAs(UnmanagedType.ByValTStr, SizeConst = AdlConst.ADL_MAX_PATH)]
@@ -406,41 +302,6 @@ namespace NTMiner.Gpus.Adl {
         }
     }
 
-    [StructLayout(LayoutKind.Sequential)]
-    internal struct ADLODNFanCurvePoint {
-        public int Temp;
-        public int Percentage;
-
-        public override string ToString() {
-            return VirtualRoot.JsonSerializer.Serialize(this);
-        }
-    }
-
-    [StructLayout(LayoutKind.Sequential)]
-    internal struct ADLODNExtSettings {
-        public int MemTimingLevel;
-        public int ZeroRPM;
-        public int AutoUVEngine;
-        public int AutoOCEngine;
-        public int AutoOCMemory;
-        [MarshalAs(UnmanagedType.ByValArray, SizeConst = 5)]
-        public ADLODNFanCurvePoint[] Point;
-
-        public static ADLODNExtSettings Create() {
-            var r = new ADLODNExtSettings {
-                Point = new ADLODNFanCurvePoint[5]
-            };
-            for (int i = 0; i < r.Point.Length; i++) {
-                r.Point[i] = new ADLODNFanCurvePoint();
-            }
-            return r;
-        }
-
-        public override string ToString() {
-            return VirtualRoot.JsonSerializer.Serialize(this);
-        }
-    }
-
     //OD8 Capability features bits
     enum ADLOD8FeatureControl {
         ADL_OD8_GFXCLK_LIMITS = 1 << 0,

+ 42 - 9
src/NTMinerGpus/Gpus/AdlHelper.cs

@@ -272,9 +272,16 @@ namespace NTMiner.Gpus {
         }
 
         #region IGpuHelper成员
+        #region OverClock
         public void OverClock(
-            IGpu gpu, int coreClockMHz, int coreClockVoltage, int memoryClockMHz, 
-            int memoryClockVoltage, int powerLimit, int tempLimit, int fanSpeed) {
+            IGpu gpu, 
+            int coreClockMHz, 
+            int coreClockVoltage, 
+            int memoryClockMHz, 
+            int memoryClockVoltage, 
+            int powerLimit, 
+            int tempLimit, 
+            int fanSpeed) {
             int gpuIndex = gpu.GetOverClockId();
             // A卡的超频不会为负
             if (coreClockMHz < 0) {
@@ -343,7 +350,9 @@ namespace NTMiner.Gpus {
                 return;
             }
         }
+        #endregion
 
+        #region SetFanSpeed
         public void SetFanSpeed(IGpu gpu, int value) {
             int gpuIndex = gpu.GetOverClockId();
             try {
@@ -366,6 +375,7 @@ namespace NTMiner.Gpus {
                 return;
             }
         }
+        #endregion
 
         #region GetClockRange
         public OverClockRange GetClockRange(IGpu gpu) {
@@ -421,7 +431,11 @@ namespace NTMiner.Gpus {
         }
         #endregion
 
-        private static void SetCoreClockNew(ATIGPU atiGpu, int coreClockMHz, int coreClockVoltage, ref ADLOD8SetSetting odSetSetting) {
+        private static void SetCoreClockNew(
+            ATIGPU atiGpu, 
+            int coreClockMHz, 
+            int coreClockVoltage, 
+            ref ADLOD8SetSetting odSetSetting) {
             try {
                 bool isResetCoreClock = coreClockMHz == 0;
                 bool isResetCoreClockVoltage = coreClockVoltage == 0;
@@ -503,7 +517,11 @@ namespace NTMiner.Gpus {
             }
         }
 
-        private static void SetMemoryClockNew(ATIGPU atiGpu, int memoryClockMHz, int memoryClockVoltage, ref ADLOD8SetSetting odSetSetting) {
+        private static void SetMemoryClockNew(
+            ATIGPU atiGpu, 
+            int memoryClockMHz, 
+            int memoryClockVoltage, 
+            ref ADLOD8SetSetting odSetSetting) {
             try {
                 bool isResetMemoryClock = memoryClockMHz == 0;
                 bool isResetMemoryClockVoltage = memoryClockVoltage == 0;
@@ -957,7 +975,10 @@ namespace NTMiner.Gpus {
             }
         }
 
-        private static void GetTempLimitAndPowerLimitNew(out int powerLimit, out int tempLimit, ADLOD8CurrentSetting aDLOD8CurrentSetting) {
+        private static void GetTempLimitAndPowerLimitNew(
+            out int powerLimit, 
+            out int tempLimit, 
+            ADLOD8CurrentSetting aDLOD8CurrentSetting) {
             powerLimit = 0;
             tempLimit = 0;
             try {
@@ -969,7 +990,12 @@ namespace NTMiner.Gpus {
             }
         }
 
-        private static void GetClockAndVoltOld(ATIGPU atiGpu, out int memoryClock, out int memoryiVddc, out int coreClock, out int coreiVddc) {
+        private static void GetClockAndVoltOld(
+            ATIGPU atiGpu, 
+            out int memoryClock, 
+            out int memoryiVddc, 
+            out int coreClock, 
+            out int coreiVddc) {
             memoryClock = 0;
             memoryiVddc = 0;
             coreClock = 0;
@@ -1006,7 +1032,12 @@ namespace NTMiner.Gpus {
             }
         }
 
-        private static void GetClockAndVoltNew(out int memoryClock, out int memoryiVddc, out int coreClock, out int coreiVddc, ADLOD8CurrentSetting aDLOD8CurrentSetting) {
+        private static void GetClockAndVoltNew(
+            out int memoryClock, 
+            out int memoryiVddc, 
+            out int coreClock, 
+            out int coreiVddc, 
+            ADLOD8CurrentSetting aDLOD8CurrentSetting) {
             memoryClock = 0;
             memoryiVddc = 0;
             coreClock = 0;
@@ -1022,7 +1053,10 @@ namespace NTMiner.Gpus {
             }
         }
 
-        private static bool SetOD8Range(ADLOD8CurrentSetting aDLOD8CurrentSetting, int adapterIndex, ADLOD8SetSetting odSetSetting) {
+        private static bool SetOD8Range(
+            ADLOD8CurrentSetting aDLOD8CurrentSetting, 
+            int adapterIndex, 
+            ADLOD8SetSetting odSetSetting) {
             try {
                 var r = AdlNativeMethods.ADL2_Overdrive8_Setting_Set(_context, adapterIndex, ref odSetSetting, ref aDLOD8CurrentSetting);
                 if (r != AdlStatus.ADL_OK) {
@@ -1035,7 +1069,6 @@ namespace NTMiner.Gpus {
                 return false;
             }
         }
-
         #endregion
     }
 }

+ 9 - 1
src/NTMinerGpus/Gpus/IGpuHelper.cs

@@ -2,6 +2,14 @@
     public interface IGpuHelper {
         OverClockRange GetClockRange(IGpu gpu);
         void SetFanSpeed(IGpu gpu, int value);
-        void OverClock(IGpu gpu, int coreClockMHz, int coreClockVoltage, int memoryClockMHz, int memoryClockVoltage, int powerLimit, int tempLimit, int fanSpeed);
+        void OverClock(
+            IGpu gpu, 
+            int coreClockMHz, 
+            int coreClockVoltage, 
+            int memoryClockMHz, 
+            int memoryClockVoltage, 
+            int powerLimit, 
+            int tempLimit, 
+            int fanSpeed);
     }
 }

+ 0 - 21
src/NTMinerGpus/Gpus/Nvapi/NvapiNativeMethods.cs

@@ -19,17 +19,12 @@ namespace NTMiner.Gpus.Nvapi {
         internal delegate NvStatus NvEnumPhysicalGPUsDelegate([Out] NvPhysicalGpuHandle[] physicalGpus, out int gpuCount);
         internal delegate NvStatus NvEnumTCCPhysicalGPUsDelegate([Out] NvPhysicalGpuHandle[] physicalGpus, out int gpuCount);
         internal delegate NvStatus NvGetBusIdDelegate(NvPhysicalGpuHandle physicalGpu, out int busID);
-        internal delegate NvStatus NvGetTachReadingDelegate(NvPhysicalGpuHandle physicalGpu, out int value);
-        internal delegate NvStatus NvGetPStatesDelegate(NvPhysicalGpuHandle physicalGpu, ref NvPStates nvPStates);
 
         internal delegate NvStatus NvPowerPoliciesGetStatusDelegate(NvPhysicalGpuHandle physicalGpu, ref NvGpuPowerStatus status);
         internal delegate NvStatus NvPowerPoliciesSetStatusDelegate(NvPhysicalGpuHandle physicalGpu, ref NvGpuPowerStatus status);
 
-        internal delegate NvStatus NvGetPStateV1Delegate(NvPhysicalGpuHandle physicalGpu, ref NvGpuPerfPStates20InfoV1 pstate);
         internal delegate NvStatus NvGetPStateV2Delegate(NvPhysicalGpuHandle physicalGpu, ref NvGpuPerfPStates20InfoV2 pstate);
-        internal delegate NvStatus NvSetPStateV1Delegate(NvPhysicalGpuHandle physicalGpu, ref NvGpuPerfPStates20InfoV1 pstate);
         internal delegate NvStatus NvSetPStateV2Delegate(NvPhysicalGpuHandle physicalGpu, ref NvGpuPerfPStates20InfoV2 pstate);
-        internal delegate NvStatus NvGetAllClockFrequenciesV2Delegate(NvPhysicalGpuHandle physicalGpu, ref NvGpuClockFrequenciesV2 freq);
 
         internal delegate NvStatus NvThermalPoliciesGetInfoDelegate(NvPhysicalGpuHandle physicalGpu, ref NvGpuThermalInfo outThermalInfo);
         internal delegate NvStatus NvThermalPoliciesGetSetLimitDelegate(NvPhysicalGpuHandle physicalGpu, ref NvGpuThermalLimit outThermalLimit);
@@ -37,10 +32,8 @@ namespace NTMiner.Gpus.Nvapi {
         internal delegate NvStatus NvPowerPoliciesGetInfoDelegate(NvPhysicalGpuHandle physicalGpu, ref NvGpuPowerInfo outPowerInfo);
 
         internal delegate NvStatus NvGetCoolerSettingsDelegate(NvPhysicalGpuHandle physicalGpu, NvCoolerTarget targetId, ref NvCoolerSettings outCoolerInfo);
-        internal delegate NvStatus NvRestoreCoolerSettingsDelegate(NvPhysicalGpuHandle physicalGpu, IntPtr pCoolerIndex, NvCoolerTarget targetId);
         internal delegate NvStatus NvSetCoolerLevelsDelegate(NvPhysicalGpuHandle physicalGpu, NvCoolerTarget coolerIndex, ref NvCoolerLevel level);
 
-        internal delegate NvStatus NvFanCoolersGetInfoDelegate(NvPhysicalGpuHandle physicalGpu, ref PrivateFanCoolersInfoV1 info);
         internal delegate NvStatus NvFanCoolersGetStatusDelegate(NvPhysicalGpuHandle physicalGpu, ref PrivateFanCoolersStatusV1 status);
         internal delegate NvStatus NvFanCoolersGetControlDelegate(NvPhysicalGpuHandle physicalGpu, ref PrivateFanCoolersControlV1 control);
         internal delegate NvStatus NvFanCoolersSetControlDelegate(NvPhysicalGpuHandle physicalGpu, ref PrivateFanCoolersControlV1 control);
@@ -56,24 +49,14 @@ namespace NTMiner.Gpus.Nvapi {
         internal static NvEnumTCCPhysicalGPUsDelegate NvEnumTCCPhysicalGPUs { get; private set; }
         [Id(0x1BE0B8E5)]
         internal static NvGetBusIdDelegate NvGetBusID { get; private set; }
-        [Id(0x5F608315)]
-        internal static NvGetTachReadingDelegate NvGetTachReading { get; private set; }
-        [Id(0x60DED2ED)]
-        internal static NvGetPStatesDelegate NvGetPStates { get; private set; }
         [Id(0x70916171)]
         internal static NvPowerPoliciesGetStatusDelegate NvPowerPoliciesGetStatus { get; private set; }
         [Id(0xAD95F5ED)]
         internal static NvPowerPoliciesSetStatusDelegate NvPowerPoliciesSetStatus { get; private set; }
         [Id(0x6FF81213)]
-        internal static NvGetPStateV1Delegate NvGetPStateV1 { get; private set; }
-        [Id(0x6FF81213)]
         internal static NvGetPStateV2Delegate NvGetPStateV2 { get; private set; }
         [Id(0x0F4DAE6B)]
-        internal static NvSetPStateV1Delegate NvSetPStateV1 { get; private set; }
-        [Id(0x0F4DAE6B)]
         internal static NvSetPStateV2Delegate NvSetPStateV2 { get; private set; }
-        [Id(0xDCB616C3)]
-        internal static NvGetAllClockFrequenciesV2Delegate NvGetAllClockFrequenciesV2 { get; private set; }
         [Id(0x0D258BB5)]
         internal static NvThermalPoliciesGetInfoDelegate NvThermalPoliciesGetInfo { get; private set; }
         [Id(0xE9C425A1)]
@@ -86,10 +69,6 @@ namespace NTMiner.Gpus.Nvapi {
         internal static NvGetCoolerSettingsDelegate NvGetCoolerSettings { get; private set; }
         [Id(0x891FA0AE)]
         internal static NvSetCoolerLevelsDelegate NvSetCoolerLevels { get; private set; }
-        [Id(0x8F6ED0FB)]
-        internal static NvRestoreCoolerSettingsDelegate NvRestoreCoolerSettings { get; private set; }
-        [Id(0xFB85B01E)]
-        internal static NvFanCoolersGetInfoDelegate NvFanCoolersGetInfo { get; private set; }
         [Id(0x35AED5E8)]
         internal static NvFanCoolersGetStatusDelegate NvFanCoolersGetStatus { get; private set; }
         [Id(0x814B209F)]

+ 0 - 129
src/NTMinerGpus/Gpus/Nvapi/NvapiTypes.cs

@@ -180,30 +180,6 @@ namespace NTMiner.Gpus.Nvapi {
         NVAPI_REQUIRE_FURTHER_HDCP_ACTION = -223,
         NVAPI_DISPLAY_MUX_TRANSITION_FAILED = -224
     }
-    internal enum NvThermalController {
-        NONE = 0,
-        GPU_INTERNAL,
-        ADM1032,
-        MAX6649,
-        MAX1617,
-        LM99,
-        LM89,
-        LM64,
-        ADT7473,
-        SBMAX6649,
-        VBIOSEVT,
-        OS,
-        UNKNOWN = -1,
-    }
-    internal enum NvThermalTarget {
-        NONE = 0,
-        GPU = 1,
-        MEMORY = 2,
-        POWER_SUPPLY = 4,
-        BOARD = 8,
-        ALL = 15,
-        UNKNOWN = -1
-    };
     internal enum NvGpuPublicClockId : NvU32 {
         NVAPI_GPU_PUBLIC_CLOCK_GRAPHICS = 0,
         NVAPI_GPU_PUBLIC_CLOCK_MEMORY = 4,
@@ -304,27 +280,6 @@ namespace NTMiner.Gpus.Nvapi {
     internal struct NvPhysicalGpuHandle {
         private readonly IntPtr ptr;
     }
-    [StructLayout(LayoutKind.Sequential, Pack = 8)]
-    internal struct NvPState {
-        public bool Present;
-        public int Percentage;
-    }
-    [StructLayout(LayoutKind.Sequential, Pack = 8)]
-    internal struct NvPStates {
-        public uint Version;
-        public uint Flags;
-        [MarshalAs(UnmanagedType.ByValArray, SizeConst = NvapiConst.MAX_PSTATES_PER_GPU)]
-        public NvPState[] PStates;
-
-        public static NvPStates Create() {
-            NvPStates r = new NvPStates {
-                Version = (uint)(NvapiConst.VERSION2 | (Marshal.SizeOf(typeof(NvPStates)))),
-                PStates = new NvPState[NvapiConst.MAX_PSTATES_PER_GPU]
-            };
-
-            return r;
-        }
-    }
 
     [StructLayout(LayoutKind.Sequential)]
     internal struct NvGpuPerfPStates20ParamDelta {
@@ -427,64 +382,6 @@ namespace NTMiner.Gpus.Nvapi {
         }
     }
 
-    [StructLayout(LayoutKind.Sequential)]
-    internal struct NvGpuPerfPStates20InfoV1 {
-        public NvU32 version;
-        public NvU32 bIsEditable_reserved;
-        public NvU32 numPStates;
-        public NvU32 numClocks;
-        public NvU32 numBaseVoltages;
-        [MarshalAs(UnmanagedType.ByValArray, SizeConst = NvapiConst.NVAPI_MAX_GPU_PERF_PSTATES)]
-        public PStatesArray16[] pstates;
-
-        public static NvGpuPerfPStates20InfoV1 Create() {
-            var r = new NvGpuPerfPStates20InfoV1 {
-                version = (uint)(NvapiConst.VERSION1 | (Marshal.SizeOf(typeof(NvGpuPerfPStates20InfoV1)))),
-                pstates = new PStatesArray16[NvapiConst.NVAPI_MAX_GPU_PERF_PSTATES]
-            };
-            for (int i = 0; i < r.pstates.Length; i++) {
-                r.pstates[i] = PStatesArray16.Create();
-            }
-
-            return r;
-        }
-    }
-
-    [StructLayout(LayoutKind.Sequential)]
-    internal struct NvGpuClockRrequenciesDomain {
-        public NvU32 bIsPresent_reserved;
-        public NvU32 frequency;
-        public NvU32 bIsPresent {
-            get {
-                return bIsPresent_reserved & 0x01;
-            }
-        }
-    }
-    [StructLayout(LayoutKind.Sequential)]
-    internal struct NvGpuClockFrequenciesV2 {
-        public NvU32 version;
-        public NvU32 ClockType_reserved_reserved1;
-        [MarshalAs(UnmanagedType.ByValArray, SizeConst = NvapiConst.NVAPI_MAX_GPU_PUBLIC_CLOCKS)]
-        public NvGpuClockRrequenciesDomain[] domain;
-        public NvU32 ClockType {
-            set {
-                NvU32 tmp = ClockType_reserved_reserved1 & ~(NvU32)0x03;
-                tmp |= value & 0x03;
-                ClockType_reserved_reserved1 = tmp;
-            }
-            get {
-                return ClockType_reserved_reserved1 & 0x03;
-            }
-        }
-
-        public static NvGpuClockFrequenciesV2 Create() {
-            var r = new NvGpuClockFrequenciesV2 {
-                version = (uint)(NvapiConst.VERSION2 | (Marshal.SizeOf(typeof(NvGpuClockFrequenciesV2)))),
-                domain = new NvGpuClockRrequenciesDomain[NvapiConst.NVAPI_MAX_GPU_PUBLIC_CLOCKS]
-            };
-            return r;
-        }
-    }
     [StructLayout(LayoutKind.Sequential)]
     internal struct NvGpuThermalInfoEntries {
         public NvU32 controller;
@@ -680,32 +577,6 @@ namespace NTMiner.Gpus.Nvapi {
         }
     }
 
-    [StructLayout(LayoutKind.Sequential)]
-    internal struct PrivateFanCoolersInfoV1 {
-        public NvU32 version;
-        internal uint UnknownUInt1;
-        internal uint FanCoolersInfoCount;
-
-        [MarshalAs(UnmanagedType.ByValArray, SizeConst = 8)]
-        internal uint[] Reserved;
-
-        [MarshalAs(UnmanagedType.ByValArray, SizeConst = NvapiConst.MaxNumberOfFanCoolerInfoEntries)]
-        internal FanCoolersInfoEntry[] FanCoolersInfoEntries;
-
-        public static PrivateFanCoolersInfoV1 Create() {
-            var r = new PrivateFanCoolersInfoV1 {
-                version = (uint)(NvapiConst.VERSION1 | (Marshal.SizeOf(typeof(PrivateFanCoolersInfoV1)))),
-                Reserved = new NvU32[8],
-                FanCoolersInfoEntries = new FanCoolersInfoEntry[NvapiConst.MaxNumberOfFanCoolerInfoEntries]
-            };
-            for (int i = 0; i < r.FanCoolersInfoEntries.Length; i++) {
-                r.FanCoolersInfoEntries[i] = FanCoolersInfoEntry.Create();
-            }
-
-            return r;
-        }
-    }
-
     [StructLayout(LayoutKind.Sequential)]
     internal struct FanCoolersStatusEntry {
         internal uint CoolerId;

+ 36 - 10
src/NTMinerGpus/Gpus/NvapiHelper.cs

@@ -52,9 +52,16 @@ namespace NTMiner.Gpus {
         }
 
         #region IGpuHelper成员
+        #region OverClock
         public void OverClock(
-            IGpu gpu, int coreClockMHz, int coreClockVoltage, int memoryClockMHz,
-            int memoryClockVoltage, int powerLimit, int tempLimit, int fanSpeed) {
+            IGpu gpu, 
+            int coreClockMHz, 
+            int coreClockVoltage, 
+            int memoryClockMHz,
+            int memoryClockVoltage, 
+            int powerLimit, 
+            int tempLimit, 
+            int fanSpeed) {
             if (coreClockVoltage < 0) {
                 coreClockVoltage = 0;
             }
@@ -83,7 +90,9 @@ namespace NTMiner.Gpus {
                 SetFanSpeed(gpu, fanSpeed);
             }
         }
+        #endregion
 
+        #region GetClockRange
         public OverClockRange GetClockRange(IGpu gpu) {
             int busId = gpu.GetOverClockId();
             OverClockRange result = new OverClockRange(busId);
@@ -127,7 +136,9 @@ namespace NTMiner.Gpus {
             }
             return result;
         }
+        #endregion
 
+        #region SetFanSpeed
         public void SetFanSpeed(IGpu gpu, int fanSpeed) {
             bool isAutoMode = fanSpeed == 0;
             uint value = (uint)fanSpeed;
@@ -180,8 +191,9 @@ namespace NTMiner.Gpus {
             }
             #endregion
         }
+        #endregion
 
-        private void SetCoreClock(int busId, int mHz, int voltage) {
+        private static void SetCoreClock(int busId, int mHz, int voltage) {
             int kHz = mHz * 1000;
             try {
                 if (NvGetPStateV2(busId, out NvGpuPerfPStates20InfoV2 info)) {
@@ -200,7 +212,7 @@ namespace NTMiner.Gpus {
             }
         }
 
-        private void SetMemoryClock(int busId, int mHz, int voltage) {
+        private static void SetMemoryClock(int busId, int mHz, int voltage) {
             int kHz = mHz * 1000;
             try {
                 if (NvGetPStateV2(busId, out NvGpuPerfPStates20InfoV2 info)) {
@@ -222,7 +234,7 @@ namespace NTMiner.Gpus {
             }
         }
 
-        private void SetTempLimit(int busId, int value) {
+        private static void SetTempLimit(int busId, int value) {
             value <<= 8;
             try {
                 if (!NvThermalPoliciesGetInfo(busId, out NvGpuThermalInfo info)) {
@@ -248,7 +260,7 @@ namespace NTMiner.Gpus {
             }
         }
 
-        private void SetPowerLimit(int busId, int powerValue) {
+        private static void SetPowerLimit(int busId, int powerValue) {
             powerValue *= 1000;
             uint percentInt = (uint)powerValue;
             try {
@@ -275,7 +287,12 @@ namespace NTMiner.Gpus {
         }
         #endregion
 
-        public bool GetPowerLimit(int busId, out uint outCurrPower, out uint outMinPower, out uint outDefPower, out uint outMaxPower) {
+        public bool GetPowerLimit(
+            int busId, 
+            out uint outCurrPower, 
+            out uint outMinPower, 
+            out uint outDefPower, 
+            out uint outMaxPower) {
             outCurrPower = 0;
             outMinPower = 0;
             outDefPower = 0;
@@ -343,8 +360,12 @@ namespace NTMiner.Gpus {
         }
 
         private static bool GetClockDelta(int busId,
-            out int outCoreCurrFreqDelta, out int outCoreMinFreqDelta, out int outCoreMaxFreqDelta,
-            out int outMemoryCurrFreqDelta, out int outMemoryMinFreqDelta, out int outMemoryMaxFreqDelta) {
+            out int outCoreCurrFreqDelta, 
+            out int outCoreMinFreqDelta, 
+            out int outCoreMaxFreqDelta,
+            out int outMemoryCurrFreqDelta, 
+            out int outMemoryMinFreqDelta, 
+            out int outMemoryMaxFreqDelta) {
             outCoreCurrFreqDelta = 0;
             outCoreMinFreqDelta = 0;
             outCoreMaxFreqDelta = 0;
@@ -509,7 +530,12 @@ namespace NTMiner.Gpus {
             }
         }
 
-        private static bool GetTempLimit(int busId, out int outCurrTemp, out int outMinTemp, out int outDefTemp, out int outMaxTemp) {
+        private static bool GetTempLimit(
+            int busId, 
+            out int outCurrTemp, 
+            out int outMinTemp, 
+            out int outDefTemp, 
+            out int outMaxTemp) {
             outCurrTemp = 0;
             outMinTemp = 0;
             outDefTemp = 0;

+ 1 - 1
src/NTMinerGpus/Properties/AssemblyInfo.cs

@@ -7,7 +7,7 @@ using System.Runtime.InteropServices;
 [assembly: AssemblyTitle("NTMinerGpus")]
 [assembly: AssemblyDescription("")]
 [assembly: AssemblyConfiguration("")]
-[assembly: AssemblyCompany("")]
+[assembly: AssemblyCompany(NTMiner.NTKeyword.Company)]
 [assembly: AssemblyProduct("NTMinerGpus")]
 [assembly: AssemblyCopyright(NTMiner.NTKeyword.Copyright)]
 [assembly: AssemblyTrademark("")]

+ 1 - 1
src/NTMinerHub/Properties/AssemblyInfo.cs

@@ -7,7 +7,7 @@ using System.Runtime.InteropServices;
 [assembly: AssemblyTitle("NTMinerHub")]
 [assembly: AssemblyDescription("")]
 [assembly: AssemblyConfiguration("")]
-[assembly: AssemblyCompany("")]
+[assembly: AssemblyCompany(NTMiner.NTKeyword.Company)]
 [assembly: AssemblyProduct("NTMinerHub")]
 [assembly: AssemblyCopyright(NTMiner.NTKeyword.Copyright)]
 [assembly: AssemblyTrademark("")]

+ 15 - 1
src/NTMinerLogging/NTMinerConsole.cs

@@ -102,8 +102,22 @@ namespace NTMiner {
             _isEnabled = false;
         }
 
+        private static bool _isMainUiOk = false;
+        private static bool IsMainUiOk {
+            get {
+                if (DevMode.IsDevMode) {
+                    return true;
+                }
+                return _isMainUiOk;
+            }
+        }
+
+        public static void SetIsMainUiOk(bool isOk) {
+            _isMainUiOk = isOk;
+        }
+
         private static readonly Action<string, ConsoleColor> _userLineMethod = (line, color) => {
-            if (!_isEnabled) {
+            if (!_isEnabled || !IsMainUiOk) {
                 return;
             }
             InitOnece();

+ 7 - 5
src/NTMinerLogging/NTMinerLogging.csproj

@@ -31,10 +31,12 @@
     <WarningLevel>4</WarningLevel>
   </PropertyGroup>
   <ItemGroup>
-    <Reference Include="log4net, Version=2.0.8.0, Culture=neutral, PublicKeyToken=669e0ddf0bb1aa2a, processorArchitecture=MSIL">
-      <HintPath>..\..\packages\log4net.2.0.8\lib\net40-full\log4net.dll</HintPath>
+    <Reference Include="log4net, Version=2.0.12.0, Culture=neutral, PublicKeyToken=669e0ddf0bb1aa2a, processorArchitecture=MSIL">
+      <HintPath>..\..\packages\log4net.2.0.12\lib\net40\log4net.dll</HintPath>
     </Reference>
     <Reference Include="System" />
+    <Reference Include="System.Configuration" />
+    <Reference Include="System.Web" />
     <Reference Include="System.XML" />
   </ItemGroup>
   <ItemGroup>
@@ -54,14 +56,14 @@
     <Compile Include="NTStopwatch.cs" />
     <Compile Include="Properties\AssemblyInfo.cs" />
   </ItemGroup>
-  <ItemGroup>
-    <None Include="packages.config" />
-  </ItemGroup>
   <ItemGroup>
     <ProjectReference Include="..\NTMinerDataSchemas\NTMinerDataSchemas.csproj">
       <Project>{defc7387-f9fa-4651-a281-6612efb7fbb6}</Project>
       <Name>NTMinerDataSchemas</Name>
     </ProjectReference>
   </ItemGroup>
+  <ItemGroup>
+    <None Include="packages.config" />
+  </ItemGroup>
   <Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
 </Project>

+ 1 - 1
src/NTMinerLogging/Properties/AssemblyInfo.cs

@@ -7,7 +7,7 @@ using System.Runtime.InteropServices;
 [assembly: AssemblyTitle("NTMinerLogging")]
 [assembly: AssemblyDescription("")]
 [assembly: AssemblyConfiguration("")]
-[assembly: AssemblyCompany("")]
+[assembly: AssemblyCompany(NTMiner.NTKeyword.Company)]
 [assembly: AssemblyProduct("NTMinerLogging")]
 [assembly: AssemblyCopyright(NTMiner.NTKeyword.Copyright)]
 [assembly: AssemblyTrademark("")]

+ 1 - 1
src/NTMinerLogging/packages.config

@@ -1,4 +1,4 @@
 <?xml version="1.0" encoding="utf-8"?>
 <packages>
-  <package id="log4net" version="2.0.8" targetFramework="net40" />
+  <package id="log4net" version="2.0.12" targetFramework="net40" />
 </packages>

+ 10 - 8
src/NTMinerNoDevFee/NTMinerNoDevFee.csproj

@@ -1,6 +1,6 @@
 <?xml version="1.0" encoding="utf-8"?>
 <Project ToolsVersion="15.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
-  <Import Project="..\..\packages\Costura.Fody.4.0.0\build\Costura.Fody.props" Condition="Exists('..\..\packages\Costura.Fody.4.0.0\build\Costura.Fody.props')" />
+  <Import Project="..\..\packages\Costura.Fody.4.1.0\build\Costura.Fody.props" Condition="Exists('..\..\packages\Costura.Fody.4.1.0\build\Costura.Fody.props')" />
   <Import Project="$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props" Condition="Exists('$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props')" />
   <PropertyGroup>
     <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
@@ -45,16 +45,17 @@
     </ApplicationIcon>
   </PropertyGroup>
   <ItemGroup>
-    <Reference Include="Costura, Version=4.0.0.0, Culture=neutral, PublicKeyToken=9919ef960d84173d, processorArchitecture=MSIL">
-      <HintPath>..\..\packages\Costura.Fody.4.0.0\lib\net40\Costura.dll</HintPath>
+    <Reference Include="Costura, Version=4.1.0.0, Culture=neutral, PublicKeyToken=9919ef960d84173d, processorArchitecture=MSIL">
+      <HintPath>..\..\packages\Costura.Fody.4.1.0\lib\net40\Costura.dll</HintPath>
     </Reference>
-    <Reference Include="log4net, Version=2.0.8.0, Culture=neutral, PublicKeyToken=669e0ddf0bb1aa2a, processorArchitecture=MSIL">
-      <HintPath>..\..\packages\log4net.2.0.8\lib\net40-full\log4net.dll</HintPath>
+    <Reference Include="log4net, Version=2.0.12.0, Culture=neutral, PublicKeyToken=669e0ddf0bb1aa2a, processorArchitecture=MSIL">
+      <HintPath>..\..\packages\log4net.2.0.12\lib\net40\log4net.dll</HintPath>
     </Reference>
     <Reference Include="Newtonsoft.Json, Version=12.0.0.0, Culture=neutral, PublicKeyToken=30ad4fe6b2a6aeed, processorArchitecture=MSIL">
       <HintPath>..\..\packages\Newtonsoft.Json.12.0.3\lib\net40\Newtonsoft.Json.dll</HintPath>
     </Reference>
     <Reference Include="System" />
+    <Reference Include="System.Configuration" />
     <Reference Include="System.Management" />
     <Reference Include="System.Net.Http, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a, processorArchitecture=MSIL">
       <HintPath>..\..\packages\Microsoft.Net.Http.2.0.20710.0\lib\net40\System.Net.Http.dll</HintPath>
@@ -65,6 +66,7 @@
     <Reference Include="System.Net.Http.WebRequest, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a, processorArchitecture=MSIL">
       <HintPath>..\..\packages\Microsoft.Net.Http.2.0.20710.0\lib\net40\System.Net.Http.WebRequest.dll</HintPath>
     </Reference>
+    <Reference Include="System.Web" />
   </ItemGroup>
   <ItemGroup>
     <Compile Include="..\NTMiner.Controllers\INTMinerWalletController.cs">
@@ -178,12 +180,12 @@
   <PropertyGroup>
     <PostBuildEvent>$(TargetName) --sha1</PostBuildEvent>
   </PropertyGroup>
-  <Import Project="..\..\packages\Fody.5.0.0\build\Fody.targets" Condition="Exists('..\..\packages\Fody.5.0.0\build\Fody.targets')" />
   <Target Name="EnsureNuGetPackageBuildImports" BeforeTargets="PrepareForBuild">
     <PropertyGroup>
       <ErrorText>这台计算机上缺少此项目引用的 NuGet 程序包。使用“NuGet 程序包还原”可下载这些程序包。有关更多信息,请参见 http://go.microsoft.com/fwlink/?LinkID=322105。缺少的文件是 {0}。</ErrorText>
     </PropertyGroup>
-    <Error Condition="!Exists('..\..\packages\Fody.5.0.0\build\Fody.targets')" Text="$([System.String]::Format('$(ErrorText)', '..\..\packages\Fody.5.0.0\build\Fody.targets'))" />
-    <Error Condition="!Exists('..\..\packages\Costura.Fody.4.0.0\build\Costura.Fody.props')" Text="$([System.String]::Format('$(ErrorText)', '..\..\packages\Costura.Fody.4.0.0\build\Costura.Fody.props'))" />
+    <Error Condition="!Exists('..\..\packages\Fody.6.3.0\build\Fody.targets')" Text="$([System.String]::Format('$(ErrorText)', '..\..\packages\Fody.6.3.0\build\Fody.targets'))" />
+    <Error Condition="!Exists('..\..\packages\Costura.Fody.4.1.0\build\Costura.Fody.props')" Text="$([System.String]::Format('$(ErrorText)', '..\..\packages\Costura.Fody.4.1.0\build\Costura.Fody.props'))" />
   </Target>
+  <Import Project="..\..\packages\Fody.6.3.0\build\Fody.targets" Condition="Exists('..\..\packages\Fody.6.3.0\build\Fody.targets')" />
 </Project>

+ 1 - 1
src/NTMinerNoDevFee/Properties/AssemblyInfo.cs

@@ -7,7 +7,7 @@ using System.Runtime.InteropServices;
 [assembly: AssemblyTitle("NTMinerNoDevFee")]
 [assembly: AssemblyDescription("")]
 [assembly: AssemblyConfiguration("")]
-[assembly: AssemblyCompany("")]
+[assembly: AssemblyCompany(NTMiner.NTKeyword.Company)]
 [assembly: AssemblyProduct("NTMinerNoDevFee")]
 [assembly: AssemblyCopyright(NTMiner.NTKeyword.Copyright)]
 [assembly: AssemblyTrademark("")]

+ 3 - 3
src/NTMinerNoDevFee/packages.config

@@ -1,8 +1,8 @@
 <?xml version="1.0" encoding="utf-8"?>
 <packages>
-  <package id="Costura.Fody" version="4.0.0" targetFramework="net40" />
-  <package id="Fody" version="5.0.0" targetFramework="net40" developmentDependency="true" />
-  <package id="log4net" version="2.0.8" targetFramework="net40" />
+  <package id="Costura.Fody" version="4.1.0" targetFramework="net40" />
+  <package id="Fody" version="6.3.0" targetFramework="net40" developmentDependency="true" />
+  <package id="log4net" version="2.0.12" targetFramework="net40" />
   <package id="Microsoft.AspNet.WebApi.Client" version="4.0.30506.0" targetFramework="net40" />
   <package id="Microsoft.Net.Http" version="2.0.20710.0" targetFramework="net40" />
   <package id="Newtonsoft.Json" version="12.0.3" targetFramework="net40" />

+ 1 - 1
src/NTMinerRpcClient/Properties/AssemblyInfo.cs

@@ -7,7 +7,7 @@ using System.Runtime.InteropServices;
 [assembly: AssemblyTitle("NTMinerRpcClient")]
 [assembly: AssemblyDescription("")]
 [assembly: AssemblyConfiguration("")]
-[assembly: AssemblyCompany("")]
+[assembly: AssemblyCompany(NTMiner.NTKeyword.Company)]
 [assembly: AssemblyProduct("NTMinerRpcClient")]
 [assembly: AssemblyCopyright(NTMiner.NTKeyword.Copyright)]
 [assembly: AssemblyTrademark("")]

+ 3 - 1
src/NTMinerRpcClient/Rpc/Impl/BinaryRequestJsonResponseRpcHelper.cs

@@ -31,7 +31,9 @@ namespace NTMiner.Rpc.Impl {
             Task.Factory.StartNew(() => {
                 try {
                     using (HttpClient client = RpcRoot.CreateHttpClient()) {
-                        client.SetTimeout(timeountMilliseconds);
+                        if (timeountMilliseconds > 0) {
+                            client.SetTimeout(timeountMilliseconds);
+                        }
                         byte[] bytes = VirtualRoot.BinarySerializer.Serialize(data);
                         if (bytes == null) {
                             bytes = new byte[0];

+ 3 - 1
src/NTMinerRpcClient/Rpc/Impl/HttpRpcHelper.cs

@@ -30,7 +30,9 @@ namespace NTMiner.Rpc.Impl {
             Task.Factory.StartNew(() => {
                 try {
                     using (HttpClient client = RpcRoot.CreateHttpClient()) {
-                        client.SetTimeout(timeountMilliseconds);
+                        if (timeountMilliseconds > 0) {
+                            client.SetTimeout(timeountMilliseconds);
+                        }
                         Task<HttpResponseMessage> getHttpResponse = client.PostAsync(RpcRoot.GetUrl(host, port, controller, action, query), content);
                         if (!getHttpResponse.Result.IsSuccessStatusCode) {
                             NTMinerConsole.DevDebug($"{action} http response {getHttpResponse.Result.StatusCode.ToString()} {getHttpResponse.Result.ReasonPhrase}");

+ 6 - 2
src/NTMinerRpcClient/Rpc/Impl/JsonRequestBinaryResponseRpcHelper.cs

@@ -28,7 +28,9 @@ namespace NTMiner.Rpc.Impl {
             Task.Factory.StartNew(() => {
                 try {
                     using (HttpClient client = RpcRoot.CreateHttpClient()) {
-                        client.SetTimeout(timeountMilliseconds);
+                        if (timeountMilliseconds > 0) {
+                            client.SetTimeout(timeountMilliseconds);
+                        }
                         Task<HttpResponseMessage> getHttpResponse = client.GetAsync(RpcRoot.GetUrl(host, port, controller, action, query));
                         if (getHttpResponse.Result.IsSuccessStatusCode) {
                             getHttpResponse.Result.Content.ReadAsByteArrayAsync().ContinueWith(t => {
@@ -135,7 +137,9 @@ namespace NTMiner.Rpc.Impl {
             Task.Factory.StartNew(() => {
                 try {
                     using (HttpClient client = RpcRoot.CreateHttpClient()) {
-                        client.SetTimeout(timeountMilliseconds);
+                        if (timeountMilliseconds > 0) {
+                            client.SetTimeout(timeountMilliseconds);
+                        }
                         Task<HttpResponseMessage> getHttpResponse = client.PostAsJsonAsync(RpcRoot.GetUrl(host, port, controller, action, query), data);
                         if (getHttpResponse.Result.IsSuccessStatusCode) {
                             getHttpResponse.Result.Content.ReadAsByteArrayAsync().ContinueWith(t => {

+ 3 - 1
src/NTMinerRpcClient/Rpc/Impl/JsonRpcHelper.cs

@@ -28,7 +28,9 @@ namespace NTMiner.Rpc.Impl {
             Task.Factory.StartNew(() => {
                 try {
                     using (HttpClient client = RpcRoot.CreateHttpClient()) {
-                        client.SetTimeout(timeountMilliseconds);
+                        if (timeountMilliseconds > 0) {
+                            client.SetTimeout(timeountMilliseconds);
+                        }
                         Task<HttpResponseMessage> getHttpResponse = client.GetAsync(RpcRoot.GetUrl(host, port, controller, action, query));
                         if (getHttpResponse.Result.IsSuccessStatusCode) {
                             getHttpResponse.Result.Content.ReadAsAsync<TResponse>().ContinueWith(t => {

+ 6 - 2
src/NTMinerRpcClient/Rpc/Impl/JsonRpcHelper.partials.cs

@@ -94,7 +94,9 @@ namespace NTMiner.Rpc.Impl {
             Task.Factory.StartNew(() => {
                 try {
                     using (HttpClient client = RpcRoot.CreateHttpClient()) {
-                        client.SetTimeout(timeountMilliseconds);
+                        if (timeountMilliseconds > 0) {
+                            client.SetTimeout(timeountMilliseconds);
+                        }
                         Task<HttpResponseMessage> getHttpResponse = client.PostAsJsonAsync(RpcRoot.GetUrl(host, port, controller, action, query), data);
                         if (getHttpResponse.Result.IsSuccessStatusCode) {
                             getHttpResponse.Result.Content.ReadAsAsync<TResponse>().ContinueWith(t => {
@@ -125,7 +127,9 @@ namespace NTMiner.Rpc.Impl {
             Task.Factory.StartNew(() => {
                 try {
                     using (HttpClient client = RpcRoot.CreateHttpClient()) {
-                        client.SetTimeout(timeountMilliseconds);
+                        if (timeountMilliseconds > 0) {
+                            client.SetTimeout(timeountMilliseconds);
+                        }
                         Task<HttpResponseMessage> getHttpResponse = client.PostAsJsonAsync(RpcRoot.GetUrl(host, port, controller, action, query), data);
                         NTMinerConsole.DevDebug($"{action} {getHttpResponse.Result.ReasonPhrase}");
                         if (!getHttpResponse.Result.IsSuccessStatusCode) {

+ 1 - 1
src/NTMinerRpcClient/RpcRoot.cs

@@ -68,7 +68,7 @@ namespace NTMiner {
 
         public static HttpClient CreateHttpClient() {
             return new HttpClient {
-                Timeout = TimeSpan.FromSeconds(20)
+                Timeout = TimeSpan.FromSeconds(10)
             };
         }
 

+ 22 - 11
src/NTMinerRpcClient/Services/Client/MinerStudioService.cs

@@ -14,7 +14,12 @@ namespace NTMiner.Services.Client {
         /// </summary>
         /// <param name="callback"></param>
         public void ShowMainWindowAsync(Action<bool, Exception> callback) {
-            RpcRoot.JsonRpc.PostAsync<bool>(NTKeyword.Localhost, NTKeyword.MinerStudioPort, _controllerName, nameof(IMinerStudioController.ShowMainWindow), callback);
+            RpcRoot.JsonRpc.PostAsync<bool>(
+                NTKeyword.Localhost,
+                NTKeyword.MinerStudioPort,
+                _controllerName,
+                nameof(IMinerStudioController.ShowMainWindow),
+                callback);
         }
 
         /// <summary>
@@ -31,17 +36,23 @@ namespace NTMiner.Services.Client {
                 callback?.Invoke();
                 return;
             }
-            RpcRoot.JsonRpc.PostAsync<ResponseBase>(NTKeyword.Localhost, NTKeyword.MinerStudioPort, _controllerName, nameof(IMinerStudioController.CloseMinerStudio), new object(), (response, e) => {
-                if (!response.IsSuccess()) {
-                    try {
-                        Windows.TaskKill.Kill(processName, waitForExit: true);
+            RpcRoot.JsonRpc.PostAsync<ResponseBase>(
+                NTKeyword.Localhost,
+                NTKeyword.MinerStudioPort,
+                _controllerName,
+                nameof(IMinerStudioController.CloseMinerStudio),
+                new object(),
+                callback: (response, e) => {
+                    if (!response.IsSuccess()) {
+                        try {
+                            Windows.TaskKill.Kill(processName, waitForExit: true);
+                        }
+                        catch (Exception ex) {
+                            Logger.ErrorDebugLine(ex);
+                        }
                     }
-                    catch (Exception ex) {
-                        Logger.ErrorDebugLine(ex);
-                    }
-                }
-                callback?.Invoke();
-            }, timeountMilliseconds: 2000);
+                    callback?.Invoke();
+                }, timeountMilliseconds: 2000);
         }
     }
 }

+ 58 - 19
src/NTMinerRpcClient/Services/Client/NTMinerClientService.cs

@@ -17,7 +17,12 @@ namespace NTMiner.Services.Client {
         /// 本机网络调用
         /// </summary>
         public void ShowMainWindowAsync(Action<bool, Exception> callback) {
-            RpcRoot.JsonRpc.PostAsync(NTKeyword.Localhost, NTKeyword.MinerClientPort, _controllerName, nameof(IMinerClientController.ShowMainWindow), callback);
+            RpcRoot.JsonRpc.PostAsync(
+                NTKeyword.Localhost,
+                NTKeyword.MinerClientPort,
+                _controllerName,
+                nameof(IMinerClientController.ShowMainWindow),
+                callback);
         }
 
         /// <summary>
@@ -34,37 +39,71 @@ namespace NTMiner.Services.Client {
                 callback?.Invoke();
                 return;
             }
-            RpcRoot.JsonRpc.PostAsync(NTKeyword.Localhost, NTKeyword.MinerClientPort, _controllerName, nameof(IMinerClientController.CloseNTMiner), new object { }, (ResponseBase response, Exception e) => {
-                if (!response.IsSuccess()) {
-                    try {
-                        Windows.TaskKill.Kill(processName, waitForExit: true);
+            RpcRoot.JsonRpc.PostAsync(
+                NTKeyword.Localhost,
+                NTKeyword.MinerClientPort,
+                _controllerName,
+                nameof(IMinerClientController.CloseNTMiner),
+                new object { },
+                callback: (ResponseBase response, Exception e) => {
+                    if (!response.IsSuccess()) {
+                        try {
+                            Windows.TaskKill.Kill(processName, waitForExit: true);
+                        }
+                        catch (Exception ex) {
+                            Logger.ErrorDebugLine(ex);
+                        }
                     }
-                    catch (Exception ex) {
-                        Logger.ErrorDebugLine(ex);
-                    }
-                }
-                callback?.Invoke();
-            }, timeountMilliseconds: 2000);
+                    callback?.Invoke();
+                }, timeountMilliseconds: 2000);
         }
 
         public void GetSpeedAsync(IMinerData client, Action<SpeedDto, Exception> callback) {
-            RpcRoot.JsonRpc.GetAsync(client.GetLocalIp(), NTKeyword.MinerClientPort, _controllerName, nameof(IMinerClientController.GetSpeed), null, callback, timeountMilliseconds: 3000);
+            RpcRoot.JsonRpc.GetAsync(
+                client.GetLocalIp(),
+                NTKeyword.MinerClientPort,
+                _controllerName,
+                nameof(IMinerClientController.GetSpeed),
+                null,
+                callback,
+                timeountMilliseconds: 3000);
         }
 
         public void WsGetSpeedAsync(Action<SpeedDto, Exception> callback) {
-            RpcRoot.JsonRpc.GetAsync(NTKeyword.Localhost, NTKeyword.MinerClientPort, _controllerName, nameof(IMinerClientController.WsGetSpeed), null, callback, timeountMilliseconds: 3000);
+            RpcRoot.JsonRpc.GetAsync(
+                NTKeyword.Localhost,
+                NTKeyword.MinerClientPort,
+                _controllerName,
+                nameof(IMinerClientController.WsGetSpeed),
+                null,
+                callback,
+                timeountMilliseconds: 3000);
         }
 
         public void GetConsoleOutLinesAsync(string clientIp, long afterTime, Action<List<ConsoleOutLine>, Exception> callback) {
-            RpcRoot.JsonRpc.GetAsync(clientIp, NTKeyword.MinerClientPort, _controllerName, nameof(IMinerClientController.GetConsoleOutLines), new Dictionary<string, string> {
-                ["afterTime"] = afterTime.ToString()
-            }, callback, timeountMilliseconds: 3000);
+            RpcRoot.JsonRpc.GetAsync(
+                clientIp,
+                NTKeyword.MinerClientPort,
+                _controllerName,
+                nameof(IMinerClientController.GetConsoleOutLines),
+                new Dictionary<string, string> {
+                    ["afterTime"] = afterTime.ToString()
+                },
+                callback,
+                timeountMilliseconds: 3000);
         }
 
         public void GetLocalMessagesAsync(string clientIp, long afterTime, Action<List<LocalMessageDto>, Exception> callback) {
-            RpcRoot.JsonRpc.GetAsync(clientIp, NTKeyword.MinerClientPort, _controllerName, nameof(IMinerClientController.GetLocalMessages), new Dictionary<string, string> {
-                ["afterTime"] = afterTime.ToString()
-            }, callback, timeountMilliseconds: 3000);
+            RpcRoot.JsonRpc.GetAsync(
+                clientIp,
+                NTKeyword.MinerClientPort,
+                _controllerName,
+                nameof(IMinerClientController.GetLocalMessages),
+                new Dictionary<string, string> {
+                    ["afterTime"] = afterTime.ToString()
+                },
+                callback,
+                timeountMilliseconds: 3000);
         }
     }
 }

+ 34 - 6
src/NTMinerRpcClient/Services/Client/NTMinerDaemonService.cs

@@ -10,7 +10,13 @@ namespace NTMiner.Services.Client {
         internal NTMinerDaemonService() { }
 
         public void GetSelfWorkLocalJsonAsync(IMinerData client, Action<string, Exception> callback) {
-            RpcRoot.JsonRpc.PostAsync(client.GetLocalIp(), NTKeyword.NTMinerDaemonPort, _controllerName, nameof(INTMinerDaemonController.GetSelfWorkLocalJson), callback, timeountMilliseconds: 3000);
+            RpcRoot.JsonRpc.PostAsync(
+                client.GetLocalIp(),
+                NTKeyword.NTMinerDaemonPort,
+                _controllerName,
+                nameof(INTMinerDaemonController.GetSelfWorkLocalJson),
+                callback,
+                timeountMilliseconds: 3000);
         }
 
         #region Localhost
@@ -18,23 +24,45 @@ namespace NTMiner.Services.Client {
         /// 本机网络调用
         /// </summary>
         public void CloseDaemonAsync(Action callback) {
-            RpcRoot.JsonRpc.FirePostAsync(NTKeyword.Localhost, NTKeyword.NTMinerDaemonPort, _controllerName, nameof(INTMinerDaemonController.CloseDaemon), null, data: null, callback, timeountMilliseconds: 3000);
+            RpcRoot.JsonRpc.FirePostAsync(
+                NTKeyword.Localhost,
+                NTKeyword.NTMinerDaemonPort,
+                _controllerName,
+                nameof(INTMinerDaemonController.CloseDaemon),
+                null,
+                data: null,
+                callback,
+                timeountMilliseconds: 3000);
         }
 
         /// <summary>
         /// 本机网络调用
         /// </summary>
         public void StartOrStopWsAsync(bool isResetFailCount) {
-            RpcRoot.JsonRpc.FirePostAsync(NTKeyword.Localhost, NTKeyword.NTMinerDaemonPort, _controllerName, nameof(INTMinerDaemonController.StartOrCloseWs), new Dictionary<string, string> {
-                ["isResetFailCount"] = isResetFailCount.ToString()
-            }, data: null, timeountMilliseconds: 3000);
+            RpcRoot.JsonRpc.FirePostAsync(
+                NTKeyword.Localhost,
+                NTKeyword.NTMinerDaemonPort,
+                _controllerName,
+                nameof(INTMinerDaemonController.StartOrCloseWs),
+                new Dictionary<string, string> {
+                    ["isResetFailCount"] = isResetFailCount.ToString()
+                }, 
+                data: null, 
+                timeountMilliseconds: 3000);
         }
 
         /// <summary>
         /// 本机网络调用
         /// </summary>
         public void GetWsDaemonStateAsync(Action<WsClientState, Exception> callback) {
-            RpcRoot.JsonRpc.GetAsync(NTKeyword.Localhost, NTKeyword.NTMinerDaemonPort, _controllerName, nameof(INTMinerDaemonController.GetWsDaemonState), null, callback, timeountMilliseconds: 3000);
+            RpcRoot.JsonRpc.GetAsync(
+                NTKeyword.Localhost, 
+                NTKeyword.NTMinerDaemonPort, 
+                _controllerName, 
+                nameof(INTMinerDaemonController.GetWsDaemonState), 
+                null, 
+                callback, 
+                timeountMilliseconds: 3000);
         }
         #endregion
     }

+ 16 - 4
src/NTMinerRpcClient/Services/Official/AppSettingService.cs

@@ -16,9 +16,15 @@ namespace NTMiner.Services.Official {
             AppSettingRequest request = new AppSettingRequest {
                 Key = key
             };
-            RpcRoot.JsonRpc.PostAsync(RpcRoot.OfficialServerHost, RpcRoot.OfficialServerPort, _controllerName, nameof(IAppSettingController.GetJsonFileVersion), request, (string line, Exception e) => {
-                callback?.Invoke(ServerStateResponse.FromLine(line));
-            }, timeountMilliseconds: 10 * 1000);
+            RpcRoot.JsonRpc.PostAsync(
+                RpcRoot.OfficialServerHost,
+                RpcRoot.OfficialServerPort,
+                _controllerName,
+                nameof(IAppSettingController.GetJsonFileVersion),
+                request,
+                callback: (string line, Exception e) => {
+                    callback?.Invoke(ServerStateResponse.FromLine(line));
+                }, timeountMilliseconds: 10 * 1000);
         }
         #endregion
 
@@ -27,7 +33,13 @@ namespace NTMiner.Services.Official {
             DataRequest<AppSettingData> request = new DataRequest<AppSettingData>() {
                 Data = entity
             };
-            RpcRoot.JsonRpc.SignPostAsync(RpcRoot.OfficialServerHost, RpcRoot.OfficialServerPort, _controllerName, nameof(IAppSettingController.SetAppSetting), data: request, callback);
+            RpcRoot.JsonRpc.SignPostAsync(
+                RpcRoot.OfficialServerHost, 
+                RpcRoot.OfficialServerPort, 
+                _controllerName, 
+                nameof(IAppSettingController.SetAppSetting), 
+                data: request, 
+                callback);
         }
         #endregion
     }

+ 21 - 9
src/NTMinerRpcClient/Services/Official/CalcConfigService.cs

@@ -12,14 +12,20 @@ namespace NTMiner.Services.Official {
 
         #region GetCalcConfigsAsync
         public void GetCalcConfigsAsync(Action<List<CalcConfigData>> callback) {
-            RpcRoot.JsonRpc.PostAsync(RpcRoot.OfficialServerHost, RpcRoot.OfficialServerPort, _controllerName, nameof(ICalcConfigController.CalcConfigs), null, (DataResponse<List<CalcConfigData>> response, Exception e) => {
-                if (response.IsSuccess()) {
-                    callback?.Invoke(response.Data);
-                }
-                else {
-                    callback?.Invoke(new List<CalcConfigData>());
-                }
-            }, timeountMilliseconds: 10 * 1000);
+            RpcRoot.JsonRpc.PostAsync(
+                RpcRoot.OfficialServerHost,
+                RpcRoot.OfficialServerPort,
+                _controllerName,
+                nameof(ICalcConfigController.CalcConfigs),
+                null,
+                callback: (DataResponse<List<CalcConfigData>> response, Exception e) => {
+                    if (response.IsSuccess()) {
+                        callback?.Invoke(response.Data);
+                    }
+                    else {
+                        callback?.Invoke(new List<CalcConfigData>());
+                    }
+                }, timeountMilliseconds: 10 * 1000);
         }
         #endregion
 
@@ -31,7 +37,13 @@ namespace NTMiner.Services.Official {
             SaveCalcConfigsRequest request = new SaveCalcConfigsRequest {
                 Data = configs
             };
-            RpcRoot.JsonRpc.SignPostAsync(RpcRoot.OfficialServerHost, RpcRoot.OfficialServerPort, _controllerName, nameof(ICalcConfigController.SaveCalcConfigs), data: request, callback);
+            RpcRoot.JsonRpc.SignPostAsync(
+                RpcRoot.OfficialServerHost,
+                RpcRoot.OfficialServerPort,
+                _controllerName,
+                nameof(ICalcConfigController.SaveCalcConfigs),
+                data: request,
+                callback);
         }
         #endregion
     }

+ 16 - 2
src/NTMinerRpcClient/Services/Official/ClientDataBinaryService.cs

@@ -12,13 +12,27 @@ namespace NTMiner.Services.Official {
 
         #region QueryClientsAsync
         public void QueryClientsAsync(QueryClientsRequest query, Action<QueryClientsResponse, Exception> callback) {
-            RpcRoot.JsonRequestBinaryResponseRpcHelper.SignPostAsync(RpcRoot.OfficialServerHost, RpcRoot.OfficialServerPort, _controllerName, nameof(IClientDataBinaryController<HttpResponseMessage>.QueryClients), data: query, callback);
+            RpcRoot.JsonRequestBinaryResponseRpcHelper.SignPostAsync(
+                RpcRoot.OfficialServerHost, 
+                RpcRoot.OfficialServerPort, 
+                _controllerName, 
+                nameof(IClientDataBinaryController<HttpResponseMessage>.QueryClients), 
+                data: query, 
+                callback,
+                timeountMilliseconds: 3000);
         }
         #endregion
 
         #region QueryClientsForWsAsync
         public void QueryClientsForWsAsync(QueryClientsForWsRequest query, Action<QueryClientsResponse, Exception> callback) {
-            RpcRoot.JsonRequestBinaryResponseRpcHelper.SignPostAsync(RpcRoot.OfficialServerHost, RpcRoot.OfficialServerPort, _controllerName, nameof(IClientDataBinaryController<HttpResponseMessage>.QueryClientsForWs), data: query, callback);
+            RpcRoot.JsonRequestBinaryResponseRpcHelper.SignPostAsync(
+                RpcRoot.OfficialServerHost, 
+                RpcRoot.OfficialServerPort, 
+                _controllerName, 
+                nameof(IClientDataBinaryController<HttpResponseMessage>.QueryClientsForWs), 
+                data: query, 
+                callback,
+                timeountMilliseconds: 3000);
         }
         #endregion
     }

+ 28 - 4
src/NTMinerRpcClient/Services/Official/ClientDataService.cs

@@ -13,7 +13,13 @@ namespace NTMiner.Services.Official {
         #region QueryClientsAsync
         // 去调ClientDataBinaryService的方法了所以这个没人调了
         public void QueryClientsAsync(QueryClientsRequest query, Action<QueryClientsResponse, Exception> callback) {
-            RpcRoot.JsonRpc.SignPostAsync(RpcRoot.OfficialServerHost, RpcRoot.OfficialServerPort, _controllerName, nameof(IClientDataController.QueryClients), data: query, callback);
+            RpcRoot.JsonRpc.SignPostAsync(
+                RpcRoot.OfficialServerHost, 
+                RpcRoot.OfficialServerPort, 
+                _controllerName, 
+                nameof(IClientDataController.QueryClients), 
+                data: query, 
+                callback);
         }
         #endregion
 
@@ -24,7 +30,13 @@ namespace NTMiner.Services.Official {
                 PropertyName = propertyName,
                 Value = value
             };
-            RpcRoot.JsonRpc.SignPostAsync(RpcRoot.OfficialServerHost, RpcRoot.OfficialServerPort, _controllerName, nameof(IClientDataController.UpdateClient), data: request, callback);
+            RpcRoot.JsonRpc.SignPostAsync(
+                RpcRoot.OfficialServerHost, 
+                RpcRoot.OfficialServerPort, 
+                _controllerName, 
+                nameof(IClientDataController.UpdateClient), 
+                data: request, 
+                callback);
         }
         #endregion
 
@@ -34,7 +46,13 @@ namespace NTMiner.Services.Official {
                 PropertyName = propertyName,
                 Values = values
             };
-            RpcRoot.JsonRpc.SignPostAsync(RpcRoot.OfficialServerHost, RpcRoot.OfficialServerPort, _controllerName, nameof(IClientDataController.UpdateClients), data: request, callback);
+            RpcRoot.JsonRpc.SignPostAsync(
+                RpcRoot.OfficialServerHost, 
+                RpcRoot.OfficialServerPort, 
+                _controllerName, 
+                nameof(IClientDataController.UpdateClients), 
+                data: request, 
+                callback);
         }
         #endregion
 
@@ -43,7 +61,13 @@ namespace NTMiner.Services.Official {
             var request = new MinerIdsRequest {
                 ObjectIds = objectIds
             };
-            RpcRoot.JsonRpc.SignPostAsync(RpcRoot.OfficialServerHost, RpcRoot.OfficialServerPort, _controllerName, nameof(IClientDataController.RemoveClients), data: request, callback);
+            RpcRoot.JsonRpc.SignPostAsync(
+                RpcRoot.OfficialServerHost, 
+                RpcRoot.OfficialServerPort, 
+                _controllerName, 
+                nameof(IClientDataController.RemoveClients), 
+                data: request, 
+                callback);
         }
         #endregion
     }

+ 7 - 1
src/NTMinerRpcClient/Services/Official/CoinSnapshotService.cs

@@ -14,7 +14,13 @@ namespace NTMiner.Services.Official {
             GetCoinSnapshotsRequest request = new GetCoinSnapshotsRequest {
                 Limit = limit
             };
-            RpcRoot.JsonRpc.SignPostAsync(RpcRoot.OfficialServerHost, RpcRoot.OfficialServerPort, _controllerName, nameof(ICoinSnapshotController.LatestSnapshots), data: request, callback);
+            RpcRoot.JsonRpc.SignPostAsync(
+                RpcRoot.OfficialServerHost, 
+                RpcRoot.OfficialServerPort, 
+                _controllerName, 
+                nameof(ICoinSnapshotController.LatestSnapshots), 
+                data: request, 
+                callback);
         }
         #endregion
     }

+ 74 - 18
src/NTMinerRpcClient/Services/Official/FileUrlService.cs

@@ -17,22 +17,33 @@ namespace NTMiner.Services.Official {
             NTMinerUrlRequest request = new NTMinerUrlRequest {
                 FileName = fileName
             };
-            RpcRoot.JsonRpc.PostAsync(RpcRoot.OfficialServerHost, RpcRoot.OfficialServerPort, _controllerName, nameof(IFileUrlController.NTMinerUrl), request, callback);
+            RpcRoot.JsonRpc.PostAsync(
+                RpcRoot.OfficialServerHost,
+                RpcRoot.OfficialServerPort,
+                _controllerName,
+                nameof(IFileUrlController.NTMinerUrl),
+                request,
+                callback);
         }
         #endregion
 
         #region GetNTMinerFilesAsync
         // ReSharper disable once InconsistentNaming
         public void GetNTMinerFilesAsync(NTMinerAppType appType, Action<List<NTMinerFileData>> callback) {
-            RpcRoot.JsonRpc.PostAsync(RpcRoot.OfficialServerHost, RpcRoot.OfficialServerPort, _controllerName, nameof(IFileUrlController.NTMinerFiles), callback: (List<NTMinerFileData> data, Exception e) => {
-                if (data != null) {
-                    data = data.Where(a => a.AppType == appType).ToList();
-                }
-                else {
-                    data = new List<NTMinerFileData>();
-                }
-                callback?.Invoke(data);
-            });
+            RpcRoot.JsonRpc.PostAsync(
+                RpcRoot.OfficialServerHost,
+                RpcRoot.OfficialServerPort,
+                _controllerName,
+                nameof(IFileUrlController.NTMinerFiles),
+                callback: (List<NTMinerFileData> data, Exception e) => {
+                    if (data != null) {
+                        data = data.Where(a => a.AppType == appType).ToList();
+                    }
+                    else {
+                        data = new List<NTMinerFileData>();
+                    }
+                    callback?.Invoke(data);
+                });
         }
         #endregion
 
@@ -42,7 +53,13 @@ namespace NTMiner.Services.Official {
             DataRequest<NTMinerFileData> request = new DataRequest<NTMinerFileData>() {
                 Data = entity
             };
-            RpcRoot.JsonRpc.SignPostAsync(RpcRoot.OfficialServerHost, RpcRoot.OfficialServerPort, _controllerName, nameof(IFileUrlController.AddOrUpdateNTMinerFile), data: request, callback);
+            RpcRoot.JsonRpc.SignPostAsync(
+                RpcRoot.OfficialServerHost, 
+                RpcRoot.OfficialServerPort, 
+                _controllerName, 
+                nameof(IFileUrlController.AddOrUpdateNTMinerFile), 
+                data: request, 
+                callback);
         }
         #endregion
 
@@ -52,38 +69,71 @@ namespace NTMiner.Services.Official {
             DataRequest<Guid> request = new DataRequest<Guid>() {
                 Data = id
             };
-            RpcRoot.JsonRpc.SignPostAsync(RpcRoot.OfficialServerHost, RpcRoot.OfficialServerPort, _controllerName, nameof(IFileUrlController.RemoveNTMinerFile), data: request, callback);
+            RpcRoot.JsonRpc.SignPostAsync(
+                RpcRoot.OfficialServerHost, 
+                RpcRoot.OfficialServerPort, 
+                _controllerName, 
+                nameof(IFileUrlController.RemoveNTMinerFile), 
+                data: request, 
+                callback);
         }
         #endregion
 
         #region GetLiteDbExplorerUrlAsync
         public void GetLiteDbExplorerUrlAsync(Action<string, Exception> callback) {
-            RpcRoot.JsonRpc.PostAsync(RpcRoot.OfficialServerHost, RpcRoot.OfficialServerPort, _controllerName, nameof(IFileUrlController.LiteDbExplorerUrl), callback);
+            RpcRoot.JsonRpc.PostAsync(
+                RpcRoot.OfficialServerHost, 
+                RpcRoot.OfficialServerPort, 
+                _controllerName, 
+                nameof(IFileUrlController.LiteDbExplorerUrl), 
+                callback);
         }
         #endregion
 
         #region GetAtikmdagPatcherUrlAsync
         public void GetAtikmdagPatcherUrlAsync(Action<string, Exception> callback) {
-            RpcRoot.JsonRpc.PostAsync(RpcRoot.OfficialServerHost, RpcRoot.OfficialServerPort, _controllerName, nameof(IFileUrlController.AtikmdagPatcherUrl), callback);
+            RpcRoot.JsonRpc.PostAsync(
+                RpcRoot.OfficialServerHost, 
+                RpcRoot.OfficialServerPort, 
+                _controllerName, 
+                nameof(IFileUrlController.AtikmdagPatcherUrl), 
+                callback);
         }
         #endregion
 
         #region GetSwitchRadeonGpuUrlAsync
         public void GetSwitchRadeonGpuUrlAsync(Action<string, Exception> callback) {
-            RpcRoot.JsonRpc.PostAsync(RpcRoot.OfficialServerHost, RpcRoot.OfficialServerPort, _controllerName, nameof(IFileUrlController.SwitchRadeonGpuUrl), callback);
+            RpcRoot.JsonRpc.PostAsync(
+                RpcRoot.OfficialServerHost, 
+                RpcRoot.OfficialServerPort, 
+                _controllerName, 
+                nameof(IFileUrlController.SwitchRadeonGpuUrl), 
+                callback);
         }
         #endregion
 
         #region GetNTMinerUpdaterUrlAsync
         // ReSharper disable once InconsistentNaming
         public void GetNTMinerUpdaterUrlAsync(Action<string, Exception> callback) {
-            RpcRoot.JsonRpc.PostAsync(RpcRoot.OfficialServerHost, RpcRoot.OfficialServerPort, _controllerName, nameof(IFileUrlController.NTMinerUpdaterUrl), callback, timeountMilliseconds: 5000);
+            RpcRoot.JsonRpc.PostAsync(
+                RpcRoot.OfficialServerHost, 
+                RpcRoot.OfficialServerPort, 
+                _controllerName, 
+                nameof(IFileUrlController.NTMinerUpdaterUrl), 
+                callback, 
+                timeountMilliseconds: 5000);
         }
         #endregion
 
         #region GetMinerClientFinderUrlAsync
         public void GetMinerClientFinderUrlAsync(Action<string, Exception> callback) {
-            RpcRoot.JsonRpc.PostAsync(RpcRoot.OfficialServerHost, RpcRoot.OfficialServerPort, _controllerName, nameof(IFileUrlController.MinerClientFinderUrl), callback, timeountMilliseconds: 5000);
+            RpcRoot.JsonRpc.PostAsync(
+                RpcRoot.OfficialServerHost, 
+                RpcRoot.OfficialServerPort, 
+                _controllerName, 
+                nameof(IFileUrlController.MinerClientFinderUrl), 
+                callback, 
+                timeountMilliseconds: 5000);
         }
         #endregion
 
@@ -92,7 +142,13 @@ namespace NTMiner.Services.Official {
             PackageUrlRequest request = new PackageUrlRequest {
                 Package = package
             };
-            RpcRoot.JsonRpc.PostAsync(RpcRoot.OfficialServerHost, RpcRoot.OfficialServerPort, _controllerName, nameof(IFileUrlController.PackageUrl), request, callback);
+            RpcRoot.JsonRpc.PostAsync(
+                RpcRoot.OfficialServerHost, 
+                RpcRoot.OfficialServerPort, 
+                _controllerName, 
+                nameof(IFileUrlController.PackageUrl), 
+                request, 
+                callback);
         }
         #endregion
     }

+ 8 - 1
src/NTMinerRpcClient/Services/Official/GpuNameService.cs

@@ -9,7 +9,14 @@ namespace NTMiner.Services.Official {
         internal GpuNameService() { }
 
         public void QueryGpuNameCountsAsync(QueryGpuNameCountsRequest request, Action<QueryGpuNameCountsResponse, Exception> callback) {
-            RpcRoot.JsonRpc.SignPostAsync(RpcRoot.OfficialServerHost, RpcRoot.OfficialServerPort, _controllerName, nameof(IGpuNameController.QueryGpuNameCounts), request, callback, timeountMilliseconds: 5 * 1000);
+            RpcRoot.JsonRpc.SignPostAsync(
+                RpcRoot.OfficialServerHost, 
+                RpcRoot.OfficialServerPort, 
+                _controllerName, 
+                nameof(IGpuNameController.QueryGpuNameCounts), 
+                request, 
+                callback, 
+                timeountMilliseconds: 5 * 1000);
         }
     }
 }

+ 21 - 3
src/NTMinerRpcClient/Services/Official/KernelOutputKeywordService.cs

@@ -13,7 +13,13 @@ namespace NTMiner.Services.Official {
         #region GetKernelOutputKeywords
         public void GetKernelOutputKeywords(Action<KernelOutputKeywordsResponse, Exception> callback) {
             object request = new object();
-            RpcRoot.JsonRpc.PostAsync(RpcRoot.OfficialServerHost, RpcRoot.OfficialServerPort, _controllerName, nameof(IKernelOutputKeywordController.KernelOutputKeywords), request, callback);
+            RpcRoot.JsonRpc.PostAsync(
+                RpcRoot.OfficialServerHost, 
+                RpcRoot.OfficialServerPort, 
+                _controllerName, 
+                nameof(IKernelOutputKeywordController.KernelOutputKeywords), 
+                request, 
+                callback);
         }
         #endregion
 
@@ -22,7 +28,13 @@ namespace NTMiner.Services.Official {
             DataRequest<KernelOutputKeywordData> request = new DataRequest<KernelOutputKeywordData>() {
                 Data = entity
             };
-            RpcRoot.JsonRpc.SignPostAsync(RpcRoot.OfficialServerHost, RpcRoot.OfficialServerPort, _controllerName, nameof(IKernelOutputKeywordController.AddOrUpdateKernelOutputKeyword), data: request, callback);
+            RpcRoot.JsonRpc.SignPostAsync(
+                RpcRoot.OfficialServerHost, 
+                RpcRoot.OfficialServerPort, 
+                _controllerName, 
+                nameof(IKernelOutputKeywordController.AddOrUpdateKernelOutputKeyword), 
+                data: request, 
+                callback);
         }
         #endregion
 
@@ -31,7 +43,13 @@ namespace NTMiner.Services.Official {
             DataRequest<Guid> request = new DataRequest<Guid>() {
                 Data = id
             };
-            RpcRoot.JsonRpc.SignPostAsync(RpcRoot.OfficialServerHost, RpcRoot.OfficialServerPort, _controllerName, nameof(IKernelOutputKeywordController.RemoveKernelOutputKeyword), data: request, callback);
+            RpcRoot.JsonRpc.SignPostAsync(
+                RpcRoot.OfficialServerHost, 
+                RpcRoot.OfficialServerPort, 
+                _controllerName, 
+                nameof(IKernelOutputKeywordController.RemoveKernelOutputKeyword), 
+                data: request, 
+                callback);
         }
         #endregion
     }

+ 21 - 3
src/NTMinerRpcClient/Services/Official/NTMinerWalletService.cs

@@ -12,7 +12,13 @@ namespace NTMiner.Services.Official {
 
         #region GetNTMinerWalletsAsync
         public void GetNTMinerWalletsAsync(Action<DataResponse<List<NTMinerWalletData>>, Exception> callback) {
-            RpcRoot.JsonRpc.PostAsync(RpcRoot.OfficialServerHost, RpcRoot.OfficialServerPort, _controllerName, nameof(INTMinerWalletController.NTMinerWallets), null, callback);
+            RpcRoot.JsonRpc.PostAsync(
+                RpcRoot.OfficialServerHost, 
+                RpcRoot.OfficialServerPort, 
+                _controllerName, 
+                nameof(INTMinerWalletController.NTMinerWallets), 
+                null, 
+                callback);
         }
         #endregion
 
@@ -21,7 +27,13 @@ namespace NTMiner.Services.Official {
             DataRequest<NTMinerWalletData> request = new DataRequest<NTMinerWalletData>() {
                 Data = entity
             };
-            RpcRoot.JsonRpc.SignPostAsync(RpcRoot.OfficialServerHost, RpcRoot.OfficialServerPort, _controllerName, nameof(INTMinerWalletController.AddOrUpdateNTMinerWallet), data: request, callback);
+            RpcRoot.JsonRpc.SignPostAsync(
+                RpcRoot.OfficialServerHost, 
+                RpcRoot.OfficialServerPort, 
+                _controllerName, 
+                nameof(INTMinerWalletController.AddOrUpdateNTMinerWallet), 
+                data: request, 
+                callback);
         }
         #endregion
 
@@ -30,7 +42,13 @@ namespace NTMiner.Services.Official {
             DataRequest<Guid> request = new DataRequest<Guid>() {
                 Data = id
             };
-            RpcRoot.JsonRpc.SignPostAsync(RpcRoot.OfficialServerHost, RpcRoot.OfficialServerPort, _controllerName, nameof(INTMinerWalletController.RemoveNTMinerWallet), data: request, callback);
+            RpcRoot.JsonRpc.SignPostAsync(
+                RpcRoot.OfficialServerHost, 
+                RpcRoot.OfficialServerPort, 
+                _controllerName, 
+                nameof(INTMinerWalletController.RemoveNTMinerWallet), 
+                data: request, 
+                callback);
         }
         #endregion
     }

+ 21 - 3
src/NTMinerRpcClient/Services/Official/OverClockDataService.cs

@@ -13,7 +13,13 @@ namespace NTMiner.Services.Official {
         #region GetOverClockDatasAsync
         public void GetOverClockDatasAsync(Action<DataResponse<List<OverClockData>>, Exception> callback) {
             object request = new object();
-            RpcRoot.JsonRpc.PostAsync(RpcRoot.OfficialServerHost, RpcRoot.OfficialServerPort, _controllerName, nameof(IOverClockDataController.OverClockDatas), request, callback);
+            RpcRoot.JsonRpc.PostAsync(
+                RpcRoot.OfficialServerHost, 
+                RpcRoot.OfficialServerPort, 
+                _controllerName, 
+                nameof(IOverClockDataController.OverClockDatas), 
+                request, 
+                callback);
         }
         #endregion
 
@@ -22,7 +28,13 @@ namespace NTMiner.Services.Official {
             DataRequest<OverClockData> request = new DataRequest<OverClockData>() {
                 Data = entity
             };
-            RpcRoot.JsonRpc.SignPostAsync(RpcRoot.OfficialServerHost, RpcRoot.OfficialServerPort, _controllerName, nameof(IOverClockDataController.AddOrUpdateOverClockData), data: request, callback);
+            RpcRoot.JsonRpc.SignPostAsync(
+                RpcRoot.OfficialServerHost, 
+                RpcRoot.OfficialServerPort, 
+                _controllerName, 
+                nameof(IOverClockDataController.AddOrUpdateOverClockData), 
+                data: request, 
+                callback);
         }
         #endregion
 
@@ -31,7 +43,13 @@ namespace NTMiner.Services.Official {
             DataRequest<Guid> request = new DataRequest<Guid>() {
                 Data = id
             };
-            RpcRoot.JsonRpc.SignPostAsync(RpcRoot.OfficialServerHost, RpcRoot.OfficialServerPort, _controllerName, nameof(IOverClockDataController.RemoveOverClockData), data: request, callback);
+            RpcRoot.JsonRpc.SignPostAsync(
+                RpcRoot.OfficialServerHost, 
+                RpcRoot.OfficialServerPort, 
+                _controllerName, 
+                nameof(IOverClockDataController.RemoveOverClockData), 
+                data: request, 
+                callback);
         }
         #endregion
     }

+ 9 - 1
src/NTMinerRpcClient/Services/Official/ReportBinaryService.cs

@@ -10,7 +10,15 @@ namespace NTMiner.Services.Official {
         }
 
         public void ReportSpeedAsync(SpeedDto speedDto, Action<ReportResponse, Exception> callback) {
-            RpcRoot.BinaryRequestJsonResponseRpcHelper.PostAsync(RpcRoot.OfficialServerHost, RpcRoot.OfficialServerPort, _controllerName, nameof(IReportBinaryController.ReportSpeed), query: null, speedDto, callback, timeountMilliseconds: 5000);
+            RpcRoot.BinaryRequestJsonResponseRpcHelper.PostAsync(
+                RpcRoot.OfficialServerHost, 
+                RpcRoot.OfficialServerPort, 
+                _controllerName, 
+                nameof(IReportBinaryController.ReportSpeed), 
+                query: null, 
+                speedDto, 
+                callback, 
+                timeountMilliseconds: 5000);
         }
     }
 }

+ 17 - 2
src/NTMinerRpcClient/Services/Official/ReportService.cs

@@ -10,7 +10,14 @@ namespace NTMiner.Services.Official {
         }
 
         public void ReportSpeedAsync(SpeedDto speedDto, Action<ReportResponse, Exception> callback) {
-            RpcRoot.JsonRpc.PostAsync(RpcRoot.OfficialServerHost, RpcRoot.OfficialServerPort, _controllerName, nameof(IReportController.ReportSpeed), speedDto, callback, timeountMilliseconds: 5000);
+            RpcRoot.JsonRpc.PostAsync(
+                RpcRoot.OfficialServerHost, 
+                RpcRoot.OfficialServerPort, 
+                _controllerName, 
+                nameof(IReportController.ReportSpeed), 
+                speedDto, 
+                callback, 
+                timeountMilliseconds: 5000);
         }
 
         public void ReportStateAsync(Guid clientId, bool isMining) {
@@ -18,7 +25,15 @@ namespace NTMiner.Services.Official {
                 ClientId = clientId,
                 IsMining = isMining
             };
-            RpcRoot.JsonRpc.FirePostAsync(RpcRoot.OfficialServerHost, RpcRoot.OfficialServerPort, _controllerName, nameof(IReportController.ReportState), null, request, null, 5000);
+            RpcRoot.JsonRpc.FirePostAsync(
+                RpcRoot.OfficialServerHost, 
+                RpcRoot.OfficialServerPort, 
+                _controllerName, 
+                nameof(IReportController.ReportState), 
+                null, 
+                request, 
+                null, 
+                5000);
         }
     }
 }

+ 21 - 3
src/NTMinerRpcClient/Services/Official/ServerMessageService.cs

@@ -15,7 +15,13 @@ namespace NTMiner.Services.Official {
             ServerMessagesRequest request = new ServerMessagesRequest {
                 Timestamp = Timestamp.GetTimestamp(timestamp)
             };
-            RpcRoot.JsonRpc.PostAsync(RpcRoot.OfficialServerHost, RpcRoot.OfficialServerPort, _controllerName, nameof(IServerMessageController.ServerMessages), request, callback);
+            RpcRoot.JsonRpc.PostAsync(
+                RpcRoot.OfficialServerHost, 
+                RpcRoot.OfficialServerPort, 
+                _controllerName, 
+                nameof(IServerMessageController.ServerMessages), 
+                request, 
+                callback);
         }
         #endregion
 
@@ -24,7 +30,13 @@ namespace NTMiner.Services.Official {
             DataRequest<ServerMessageData> request = new DataRequest<ServerMessageData>() {
                 Data = entity
             };
-            RpcRoot.JsonRpc.SignPostAsync(RpcRoot.OfficialServerHost, RpcRoot.OfficialServerPort, _controllerName, nameof(IServerMessageController.AddOrUpdateServerMessage), data: request, callback);
+            RpcRoot.JsonRpc.SignPostAsync(
+                RpcRoot.OfficialServerHost, 
+                RpcRoot.OfficialServerPort, 
+                _controllerName, 
+                nameof(IServerMessageController.AddOrUpdateServerMessage), 
+                data: request, 
+                callback);
         }
         #endregion
 
@@ -33,7 +45,13 @@ namespace NTMiner.Services.Official {
             DataRequest<Guid> request = new DataRequest<Guid>() {
                 Data = id
             };
-            RpcRoot.JsonRpc.SignPostAsync(RpcRoot.OfficialServerHost, RpcRoot.OfficialServerPort, _controllerName, nameof(IServerMessageController.MarkDeleteServerMessage), data: request, callback);
+            RpcRoot.JsonRpc.SignPostAsync(
+                RpcRoot.OfficialServerHost, 
+                RpcRoot.OfficialServerPort, 
+                _controllerName, 
+                nameof(IServerMessageController.MarkDeleteServerMessage), 
+                data: request, 
+                callback);
         }
         #endregion
     }

+ 7 - 1
src/NTMinerRpcClient/Services/Official/UserAppSettingService.cs

@@ -14,7 +14,13 @@ namespace NTMiner.Services.Official {
             DataRequest<UserAppSettingData> request = new DataRequest<UserAppSettingData>() {
                 Data = entity
             };
-            RpcRoot.JsonRpc.SignPostAsync(RpcRoot.OfficialServerHost, RpcRoot.OfficialServerPort, _controllerName, nameof(IUserAppSettingController.SetAppSetting), data: request, callback);
+            RpcRoot.JsonRpc.SignPostAsync(
+                RpcRoot.OfficialServerHost, 
+                RpcRoot.OfficialServerPort, 
+                _controllerName, 
+                nameof(IUserAppSettingController.SetAppSetting), 
+                data: request, 
+                callback);
         }
         #endregion
     }

+ 43 - 6
src/NTMinerRpcClient/Services/Official/UserMineWorkService.cs

@@ -15,7 +15,14 @@ namespace NTMiner.Services.Official {
         #region GetMineWorksAsync
         public void GetMineWorksAsync(Action<DataResponse<List<UserMineWorkData>>, Exception> callback) {
             object request = new object();
-            RpcRoot.JsonRpc.SignPostAsync(RpcRoot.OfficialServerHost, RpcRoot.OfficialServerPort, _controllerName, nameof(IUserMineWorkController.MineWorks), data: request, callback, timeountMilliseconds: 5000);
+            RpcRoot.JsonRpc.SignPostAsync(
+                RpcRoot.OfficialServerHost, 
+                RpcRoot.OfficialServerPort, 
+                _controllerName, 
+                nameof(IUserMineWorkController.MineWorks), 
+                data: request, 
+                callback, 
+                timeountMilliseconds: 5000);
         }
         #endregion
 
@@ -25,7 +32,13 @@ namespace NTMiner.Services.Official {
             DataRequest<MineWorkData> request = new DataRequest<MineWorkData> {
                 Data = entity
             };
-            RpcRoot.JsonRpc.SignPostAsync(RpcRoot.OfficialServerHost, RpcRoot.OfficialServerPort, _controllerName, nameof(IUserMineWorkController.AddOrUpdateMineWork), data: request, callback);
+            RpcRoot.JsonRpc.SignPostAsync(
+                RpcRoot.OfficialServerHost, 
+                RpcRoot.OfficialServerPort, 
+                _controllerName, 
+                nameof(IUserMineWorkController.AddOrUpdateMineWork), 
+                data: request, 
+                callback);
         }
         #endregion
 
@@ -34,7 +47,13 @@ namespace NTMiner.Services.Official {
             DataRequest<Guid> request = new DataRequest<Guid> {
                 Data = id
             };
-            RpcRoot.JsonRpc.SignPostAsync(RpcRoot.OfficialServerHost, RpcRoot.OfficialServerPort, _controllerName, nameof(IUserMineWorkController.RemoveMineWork), data: request, callback);
+            RpcRoot.JsonRpc.SignPostAsync(
+                RpcRoot.OfficialServerHost, 
+                RpcRoot.OfficialServerPort, 
+                _controllerName, 
+                nameof(IUserMineWorkController.RemoveMineWork), 
+                data: request, 
+                callback);
         }
         #endregion
 
@@ -45,7 +64,13 @@ namespace NTMiner.Services.Official {
                 LocalJson = localJson,
                 ServerJson = serverJson
             };
-            RpcRoot.JsonRpc.SignPostAsync(RpcRoot.OfficialServerHost, RpcRoot.OfficialServerPort, _controllerName, nameof(IUserMineWorkController.ExportMineWork), data: request, callback);
+            RpcRoot.JsonRpc.SignPostAsync(
+                RpcRoot.OfficialServerHost, 
+                RpcRoot.OfficialServerPort, 
+                _controllerName, 
+                nameof(IUserMineWorkController.ExportMineWork), 
+                data: request, 
+                callback);
         }
         #endregion
 
@@ -54,7 +79,13 @@ namespace NTMiner.Services.Official {
             DataRequest<Guid> request = new DataRequest<Guid>() {
                 Data = workId
             };
-            RpcRoot.JsonRpc.SignPostAsync(RpcRoot.OfficialServerHost, RpcRoot.OfficialServerPort, _controllerName, nameof(IUserMineWorkController.GetLocalJson), data: request, callback);
+            RpcRoot.JsonRpc.SignPostAsync(
+                RpcRoot.OfficialServerHost, 
+                RpcRoot.OfficialServerPort, 
+                _controllerName, 
+                nameof(IUserMineWorkController.GetLocalJson), 
+                data: request, 
+                callback);
         }
         #endregion
 
@@ -64,7 +95,13 @@ namespace NTMiner.Services.Official {
                 WorkId = workId,
                 ClientId = clientId
             };
-            RpcRoot.JsonRpc.SignPostAsync(RpcRoot.OfficialServerHost, RpcRoot.OfficialServerPort, _controllerName, nameof(IUserMineWorkController.GetWorkJson), data: request, callback);
+            RpcRoot.JsonRpc.SignPostAsync(
+                RpcRoot.OfficialServerHost, 
+                RpcRoot.OfficialServerPort, 
+                _controllerName, 
+                nameof(IUserMineWorkController.GetWorkJson), 
+                data: request, 
+                callback);
         }
         #endregion
     }

+ 22 - 3
src/NTMinerRpcClient/Services/Official/UserMinerGroupService.cs

@@ -13,7 +13,14 @@ namespace NTMiner.Services.Official {
 
         #region GetMinerGroupsAsync
         public void GetMinerGroupsAsync(Action<DataResponse<List<UserMinerGroupData>>, Exception> callback) {
-            RpcRoot.JsonRpc.SignPostAsync(RpcRoot.OfficialServerHost, RpcRoot.OfficialServerPort, _controllerName, nameof(IUserMinerGroupController.MinerGroups), data: new object(), callback, timeountMilliseconds: 5000);
+            RpcRoot.JsonRpc.SignPostAsync(
+                RpcRoot.OfficialServerHost, 
+                RpcRoot.OfficialServerPort, 
+                _controllerName, 
+                nameof(IUserMinerGroupController.MinerGroups), 
+                data: new object(), 
+                callback, 
+                timeountMilliseconds: 5000);
         }
         #endregion
 
@@ -23,7 +30,13 @@ namespace NTMiner.Services.Official {
             DataRequest<MinerGroupData> request = new DataRequest<MinerGroupData> {
                 Data = entity
             };
-            RpcRoot.JsonRpc.SignPostAsync(RpcRoot.OfficialServerHost, RpcRoot.OfficialServerPort, _controllerName, nameof(IUserMinerGroupController.AddOrUpdateMinerGroup), data: request, callback);
+            RpcRoot.JsonRpc.SignPostAsync(
+                RpcRoot.OfficialServerHost, 
+                RpcRoot.OfficialServerPort, 
+                _controllerName, 
+                nameof(IUserMinerGroupController.AddOrUpdateMinerGroup), 
+                data: request, 
+                callback);
         }
         #endregion
 
@@ -32,7 +45,13 @@ namespace NTMiner.Services.Official {
             DataRequest<Guid> request = new DataRequest<Guid>() {
                 Data = id
             };
-            RpcRoot.JsonRpc.SignPostAsync(RpcRoot.OfficialServerHost, RpcRoot.OfficialServerPort, _controllerName, nameof(IUserMinerGroupController.RemoveMinerGroup), data: request, callback);
+            RpcRoot.JsonRpc.SignPostAsync(
+                RpcRoot.OfficialServerHost, 
+                RpcRoot.OfficialServerPort, 
+                _controllerName, 
+                nameof(IUserMinerGroupController.RemoveMinerGroup), 
+                data: request, 
+                callback);
         }
         #endregion
     }

+ 95 - 32
src/NTMinerRpcClient/Services/Official/UserService.cs

@@ -12,89 +12,152 @@ namespace NTMiner.Services.Official {
 
         #region LoginAsync
         public void LoginAsync(string loginName, string password, Action<DataResponse<LoginedUser>, Exception> callback) {
-            RpcRoot.JsonRpc.PostAsync(RpcRoot.OfficialServerHost, RpcRoot.OfficialServerPort, _controllerName, nameof(IUserController.Login), RpcUser.GetSignData(loginName, password), new object(), callback);
+            RpcRoot.JsonRpc.PostAsync(
+                RpcRoot.OfficialServerHost,
+                RpcRoot.OfficialServerPort,
+                _controllerName,
+                nameof(IUserController.Login),
+                RpcUser.GetSignData(loginName, password),
+                new object(),
+                callback);
         }
         #endregion
 
         #region IsLoginNameExistAsync
         public void IsLoginNameExistAsync(string loginName, Action<bool> callback) {
-            RpcRoot.JsonRpc.GetAsync(RpcRoot.OfficialServerHost, RpcRoot.OfficialServerPort, _controllerName, nameof(IUserController.IsLoginNameExist), new Dictionary<string, string> {
-                ["loginName"] = loginName
-            }, (DataResponse<bool> response, Exception e) => {
-                callback?.Invoke(response.IsSuccess() && response.Data);
-            }, timeountMilliseconds: 5000);
+            RpcRoot.JsonRpc.GetAsync(
+                RpcRoot.OfficialServerHost,
+                RpcRoot.OfficialServerPort,
+                _controllerName,
+                nameof(IUserController.IsLoginNameExist),
+                new Dictionary<string, string> {
+                    ["loginName"] = loginName
+                },
+                callback: (DataResponse<bool> response, Exception e) => {
+                    callback?.Invoke(response.IsSuccess() && response.Data);
+                }, timeountMilliseconds: 5000);
         }
         #endregion
 
         #region QueryUsersAsync
         public void QueryUsersAsync(QueryUsersRequest request, Action<QueryUsersResponse, Exception> callback) {
-            RpcRoot.JsonRpc.SignPostAsync(RpcRoot.OfficialServerHost, RpcRoot.OfficialServerPort, _controllerName, nameof(IUserController.QueryUsers), data: request, callback: (QueryUsersResponse response, Exception e) => {
-                if (response != null && response.Data != null && response.Data.Count != 0) {
-                    foreach (var user in response.Data) {
-                        user.Password = Cryptography.QuickUtil.TextDecrypt(Convert.FromBase64String(user.Password), RpcRoot.RpcUser.Password);
-                        user.PrivateKey = Cryptography.QuickUtil.TextDecrypt(Convert.FromBase64String(user.PrivateKey), RpcRoot.RpcUser.Password);
+            RpcRoot.JsonRpc.SignPostAsync(
+                RpcRoot.OfficialServerHost,
+                RpcRoot.OfficialServerPort,
+                _controllerName,
+                nameof(IUserController.QueryUsers),
+                data: request,
+                callback: (QueryUsersResponse response, Exception e) => {
+                    if (response != null && response.Data != null && response.Data.Count != 0) {
+                        foreach (var user in response.Data) {
+                            user.Password = Cryptography.QuickUtil.TextDecrypt(Convert.FromBase64String(user.Password), RpcRoot.RpcUser.Password);
+                            user.PrivateKey = Cryptography.QuickUtil.TextDecrypt(Convert.FromBase64String(user.PrivateKey), RpcRoot.RpcUser.Password);
+                        }
                     }
-                }
-                callback?.Invoke(response, e);
-            }, timeountMilliseconds: 5000);
+                    callback?.Invoke(response, e);
+                },
+                timeountMilliseconds: 5000);
         }
         #endregion
 
         #region RemoveUserAsync
         public void RemoveUserAsync(string loginName, Action<ResponseBase, Exception> callback) {
-            RpcRoot.JsonRpc.SignPostAsync(RpcRoot.OfficialServerHost, RpcRoot.OfficialServerPort, _controllerName, nameof(IUserController.RemoveUser), new DataRequest<string> {
-                Data = loginName
-            }, callback);
+            RpcRoot.JsonRpc.SignPostAsync(
+                RpcRoot.OfficialServerHost,
+                RpcRoot.OfficialServerPort,
+                _controllerName,
+                nameof(IUserController.RemoveUser),
+                new DataRequest<string> {
+                    Data = loginName
+                }, callback);
         }
         #endregion
 
         #region EnableUserAsync
         public void EnableUserAsync(string loginName, Action<ResponseBase, Exception> callback) {
-            RpcRoot.JsonRpc.SignPostAsync(RpcRoot.OfficialServerHost, RpcRoot.OfficialServerPort, _controllerName, nameof(IUserController.EnableUser), new DataRequest<string> {
-                Data = loginName
-            }, callback);
+            RpcRoot.JsonRpc.SignPostAsync(
+                RpcRoot.OfficialServerHost,
+                RpcRoot.OfficialServerPort,
+                _controllerName,
+                nameof(IUserController.EnableUser),
+                new DataRequest<string> {
+                    Data = loginName
+                }, callback);
         }
         #endregion
 
         #region DisableUserAsync
         public void DisableUserAsync(string loginName, Action<ResponseBase, Exception> callback) {
-            RpcRoot.JsonRpc.SignPostAsync(RpcRoot.OfficialServerHost, RpcRoot.OfficialServerPort, _controllerName, nameof(IUserController.DisableUser), new DataRequest<string> {
-                Data = loginName
-            }, callback);
+            RpcRoot.JsonRpc.SignPostAsync(
+                RpcRoot.OfficialServerHost,
+                RpcRoot.OfficialServerPort,
+                _controllerName,
+                nameof(IUserController.DisableUser),
+                new DataRequest<string> {
+                    Data = loginName
+                }, callback);
         }
         #endregion
 
         #region AddAdminRoleAsync
         public void AddAdminRoleAsync(string loginName, Action<ResponseBase, Exception> callback) {
-            RpcRoot.JsonRpc.SignPostAsync(RpcRoot.OfficialServerHost, RpcRoot.OfficialServerPort, _controllerName, nameof(IUserController.AddAdminRole), new DataRequest<string> {
-                Data = loginName
-            }, callback);
+            RpcRoot.JsonRpc.SignPostAsync(
+                RpcRoot.OfficialServerHost,
+                RpcRoot.OfficialServerPort,
+                _controllerName,
+                nameof(IUserController.AddAdminRole),
+                new DataRequest<string> {
+                    Data = loginName
+                }, callback);
         }
         #endregion
 
         #region RemoveAdminRoleAsync
         public void RemoveAdminRoleAsync(string loginName, Action<ResponseBase, Exception> callback) {
-            RpcRoot.JsonRpc.SignPostAsync(RpcRoot.OfficialServerHost, RpcRoot.OfficialServerPort, _controllerName, nameof(IUserController.RemoveAdminRole), new DataRequest<string> {
-                Data = loginName
-            }, callback);
+            RpcRoot.JsonRpc.SignPostAsync(
+                RpcRoot.OfficialServerHost,
+                RpcRoot.OfficialServerPort,
+                _controllerName,
+                nameof(IUserController.RemoveAdminRole),
+                new DataRequest<string> {
+                    Data = loginName
+                }, callback);
         }
         #endregion
 
         #region SignUpAsync
         public void SignUpAsync(SignUpRequest data, Action<ResponseBase, Exception> callback) {
-            RpcRoot.JsonRpc.PostAsync(RpcRoot.OfficialServerHost, RpcRoot.OfficialServerPort, _controllerName, nameof(IUserController.SignUp), data, callback);
+            RpcRoot.JsonRpc.PostAsync(
+                RpcRoot.OfficialServerHost,
+                RpcRoot.OfficialServerPort,
+                _controllerName,
+                nameof(IUserController.SignUp),
+                data,
+                callback);
         }
         #endregion
 
         #region UpdateUserAsync
         public void UpdateUserAsync(UserUpdateData data, Action<ResponseBase, Exception> callback) {
-            RpcRoot.JsonRpc.SignPostAsync(RpcRoot.OfficialServerHost, RpcRoot.OfficialServerPort, _controllerName, nameof(IUserController.UpdateUser), data, callback);
+            RpcRoot.JsonRpc.SignPostAsync(
+                RpcRoot.OfficialServerHost,
+                RpcRoot.OfficialServerPort,
+                _controllerName,
+                nameof(IUserController.UpdateUser),
+                data,
+                callback);
         }
         #endregion
 
         #region ChangePasswordAsync
         public void ChangePasswordAsync(ChangePasswordRequest request, Action<ResponseBase, Exception> callback) {
-            RpcRoot.JsonRpc.SignPostAsync(RpcRoot.OfficialServerHost, RpcRoot.OfficialServerPort, _controllerName, nameof(IUserController.ChangePassword), request, callback);
+            RpcRoot.JsonRpc.SignPostAsync(
+                RpcRoot.OfficialServerHost,
+                RpcRoot.OfficialServerPort,
+                _controllerName,
+                nameof(IUserController.ChangePassword),
+                request,
+                callback);
         }
         #endregion
     }

+ 7 - 1
src/NTMinerRpcClient/Services/Official/WebApiServerNodeService.cs

@@ -10,7 +10,13 @@ namespace NTMiner.Services.Official {
         }
 
         public void GetServerStateAsync(Action<DataResponse<WebApiServerState>, Exception> callback) {
-            RpcRoot.JsonRpc.SignPostAsync(RpcRoot.OfficialServerHost, RpcRoot.OfficialServerPort, _controllerName, nameof(IWebApiServerNodeController.GetServerState), new object(), callback);
+            RpcRoot.JsonRpc.SignPostAsync(
+                RpcRoot.OfficialServerHost, 
+                RpcRoot.OfficialServerPort, 
+                _controllerName, 
+                nameof(IWebApiServerNodeController.GetServerState), 
+                new object(), 
+                callback);
         }
     }
 }

+ 22 - 3
src/NTMinerRpcClient/Services/Official/WsServerNodeService.cs

@@ -11,11 +11,23 @@ namespace NTMiner.Services.Official {
         }
 
         public void GetNodesAsync(Action<DataResponse<List<WsServerNodeState>>, Exception> callback) {
-            RpcRoot.JsonRpc.SignPostAsync(RpcRoot.OfficialServerHost, RpcRoot.OfficialServerPort, _controllerName, nameof(IWsServerNodeController.Nodes), new object(), callback);
+            RpcRoot.JsonRpc.SignPostAsync(
+                RpcRoot.OfficialServerHost, 
+                RpcRoot.OfficialServerPort, 
+                _controllerName, 
+                nameof(IWsServerNodeController.Nodes), 
+                new object(), 
+                callback);
         }
 
         public void GetNodeAddressesAsync(Action<DataResponse<string[]>, Exception> callback) {
-            RpcRoot.JsonRpc.SignPostAsync(RpcRoot.OfficialServerHost, RpcRoot.OfficialServerPort, _controllerName, nameof(IWsServerNodeController.NodeAddresses), new object(), callback);
+            RpcRoot.JsonRpc.SignPostAsync(
+                RpcRoot.OfficialServerHost, 
+                RpcRoot.OfficialServerPort, 
+                _controllerName, 
+                nameof(IWsServerNodeController.NodeAddresses), 
+                new object(), 
+                callback);
         }
 
         public void GetNodeAddressAsync(Guid clientId, string outerUserId, Action<DataResponse<string>, Exception> callback) {
@@ -23,7 +35,14 @@ namespace NTMiner.Services.Official {
                 ClientId = clientId,
                 UserId = outerUserId
             };
-            RpcRoot.JsonRpc.PostAsync(RpcRoot.OfficialServerHost, RpcRoot.OfficialServerPort, _controllerName, nameof(IWsServerNodeController.GetNodeAddress), data, callback, timeountMilliseconds: 8000);
+            RpcRoot.JsonRpc.PostAsync(
+                RpcRoot.OfficialServerHost, 
+                RpcRoot.OfficialServerPort, 
+                _controllerName, 
+                nameof(IWsServerNodeController.GetNodeAddress), 
+                data, 
+                callback, 
+                timeountMilliseconds: 8000);
         }
     }
 }

+ 4 - 3
src/NTMinerServer/NTMinerServer.csproj

@@ -34,14 +34,15 @@
     <Reference Include="LiteDB, Version=4.1.4.0, Culture=neutral, PublicKeyToken=4ee40123013c9f27, processorArchitecture=MSIL">
       <HintPath>..\..\packages\LiteDB.4.1.4\lib\net40\LiteDB.dll</HintPath>
     </Reference>
+    <Reference Include="Microsoft.CSharp" />
     <Reference Include="Microsoft.Diagnostics.Tracing.EventSource, Version=1.1.28.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a, processorArchitecture=MSIL">
       <HintPath>..\..\packages\Microsoft.Diagnostics.Tracing.EventSource.Redist.1.1.28\lib\net40\Microsoft.Diagnostics.Tracing.EventSource.dll</HintPath>
     </Reference>
     <Reference Include="RabbitMQ.Client, Version=5.0.0.0, Culture=neutral, PublicKeyToken=89e7d7c5feba84ce, processorArchitecture=MSIL">
-      <HintPath>..\..\packages\RabbitMQ.Client.5.1.2\lib\net451\RabbitMQ.Client.dll</HintPath>
+      <HintPath>..\..\packages\RabbitMQ.Client.5.2.0\lib\net451\RabbitMQ.Client.dll</HintPath>
     </Reference>
-    <Reference Include="StackExchange.Redis, Version=1.2.1.0, Culture=neutral, processorArchitecture=MSIL">
-      <HintPath>..\..\packages\StackExchange.Redis.1.2.1\lib\net45\StackExchange.Redis.dll</HintPath>
+    <Reference Include="StackExchange.Redis, Version=1.2.6.0, Culture=neutral, processorArchitecture=MSIL">
+      <HintPath>..\..\packages\StackExchange.Redis.1.2.6\lib\net45\StackExchange.Redis.dll</HintPath>
     </Reference>
     <Reference Include="System" />
     <Reference Include="System.IO.Compression" />

+ 2 - 3
src/NTMinerServer/Properties/AssemblyInfo.cs

@@ -1,5 +1,4 @@
 using System.Reflection;
-using System.Runtime.CompilerServices;
 using System.Runtime.InteropServices;
 
 // 有关程序集的一般信息由以下
@@ -8,9 +7,9 @@ using System.Runtime.InteropServices;
 [assembly: AssemblyTitle("NTMinerServer")]
 [assembly: AssemblyDescription("")]
 [assembly: AssemblyConfiguration("")]
-[assembly: AssemblyCompany("")]
+[assembly: AssemblyCompany(NTMiner.NTKeyword.Company)]
 [assembly: AssemblyProduct("NTMinerServer")]
-[assembly: AssemblyCopyright("Copyright ©  2020")]
+[assembly: AssemblyCopyright(NTMiner.NTKeyword.Copyright)]
 [assembly: AssemblyTrademark("")]
 [assembly: AssemblyCulture("")]
 

+ 2 - 2
src/NTMinerServer/packages.config

@@ -2,6 +2,6 @@
 <packages>
   <package id="LiteDB" version="4.1.4" targetFramework="net452" />
   <package id="Microsoft.Diagnostics.Tracing.EventSource.Redist" version="1.1.28" targetFramework="net452" />
-  <package id="RabbitMQ.Client" version="5.1.2" targetFramework="net452" />
-  <package id="StackExchange.Redis" version="1.2.1" targetFramework="net452" />
+  <package id="RabbitMQ.Client" version="5.2.0" targetFramework="net452" />
+  <package id="StackExchange.Redis" version="1.2.6" targetFramework="net452" />
 </packages>

Niektóre pliki nie zostały wyświetlone z powodu dużej ilości zmienionych plików