ntminer 4 vuotta sitten
vanhempi
sitoutus
9dc196d694
100 muutettua tiedostoa jossa 637 lisäystä ja 521 poistoa
  1. 15 0
      NTMiner.sln
  2. 1 1
      README.md
  3. 0 1
      src/AppModels/AppModels.csproj
  4. 4 4
      src/AppModels/AppRoot.cs
  5. 8 8
      src/AppModels/AppRoot.partials.CoinGroupViewModels.cs
  6. 10 10
      src/AppModels/AppRoot.partials.CoinKernelViewModels.cs
  7. 6 6
      src/AppModels/AppRoot.partials.CoinProfileViewModels.cs
  8. 14 14
      src/AppModels/AppRoot.partials.CoinViewModels.cs
  9. 10 10
      src/AppModels/AppRoot.partials.FileWriterViewModels.cs
  10. 10 10
      src/AppModels/AppRoot.partials.FragmentWriterViewModels.cs
  11. 4 4
      src/AppModels/AppRoot.partials.GpuProfileViewModels.cs
  12. 14 14
      src/AppModels/AppRoot.partials.GpuSpeedViewModels.cs
  13. 8 8
      src/AppModels/AppRoot.partials.GpuViewModels.cs
  14. 10 10
      src/AppModels/AppRoot.partials.GroupViewModels.cs
  15. 10 10
      src/AppModels/AppRoot.partials.KernelInputViewModels.cs
  16. 8 8
      src/AppModels/AppRoot.partials.KernelOutputKeywordViewModels.cs
  17. 10 10
      src/AppModels/AppRoot.partials.KernelOutputTranslaterViewModels.cs
  18. 10 10
      src/AppModels/AppRoot.partials.KernelOutputViewModels.cs
  19. 10 10
      src/AppModels/AppRoot.partials.KernelViewModels.cs
  20. 10 10
      src/AppModels/AppRoot.partials.PackageViewModels.cs
  21. 10 10
      src/AppModels/AppRoot.partials.PoolKernelViewModels.cs
  22. 4 4
      src/AppModels/AppRoot.partials.PoolProfileViewModels.cs
  23. 10 10
      src/AppModels/AppRoot.partials.PoolViewModels.cs
  24. 2 2
      src/AppModels/AppRoot.partials.ShareViewModels.cs
  25. 10 10
      src/AppModels/AppRoot.partials.SysDicItemViewModels.cs
  26. 10 10
      src/AppModels/AppRoot.partials.SysDicViewModels.cs
  27. 8 8
      src/AppModels/AppRoot.partials.WalletViewModels.cs
  28. 1 1
      src/AppModels/AppStatic.cs
  29. 1 1
      src/AppModels/ExtendedNotifyIcon.cs
  30. 18 18
      src/AppModels/MinerStudio/Impl/LocalMinerStudioService.cs
  31. 3 3
      src/AppModels/MinerStudio/MinerStudioRoot.partials.ColumnsShowViewModels.cs
  32. 6 6
      src/AppModels/MinerStudio/MinerStudioRoot.partials.MineWorkViewModels.cs
  33. 4 4
      src/AppModels/MinerStudio/MinerStudioRoot.partials.MinerClientConsoleViewModel.cs
  34. 4 4
      src/AppModels/MinerStudio/MinerStudioRoot.partials.MinerClientMessagesViewModel.cs
  35. 6 6
      src/AppModels/MinerStudio/MinerStudioRoot.partials.MinerClientOperationResultsViewModel.cs
  36. 6 6
      src/AppModels/MinerStudio/MinerStudioRoot.partials.MinerGroupViewModels.cs
  37. 8 8
      src/AppModels/MinerStudio/MinerStudioRoot.partials.NTMinerWalletViewModels.cs
  38. 8 8
      src/AppModels/MinerStudio/MinerStudioRoot.partials.OverClockDataViewModels.cs
  39. 1 1
      src/AppModels/MinerStudio/Vms/MineWorkViewModel.cs
  40. 5 5
      src/AppModels/MinerStudio/Vms/MinerClientsWindowViewModel.cs
  41. 33 0
      src/AppModels/MinerStudio/Vms/WebApiServerStateViewModel.cs
  42. 33 0
      src/AppModels/MinerStudio/Vms/WsServerNodeStateViewModel.cs
  43. 1 1
      src/AppModels/View/AbstractAppViewFactory.cs
  44. 2 2
      src/AppModels/Vms/KernelOutputKeywordsViewModel.cs
  45. 6 6
      src/AppModels/Vms/LocalMessagesViewModel.cs
  46. 1 1
      src/AppModels/Vms/MainMenuViewModel.cs
  47. 0 11
      src/AppModels/Vms/MainWindowViewModel.cs
  48. 54 14
      src/AppModels/Vms/MinerProfileViewModel.cs
  49. 23 15
      src/AppModels/Vms/PoolViewModel.cs
  50. 6 6
      src/AppModels/Vms/ServerMessagesViewModel.cs
  51. 10 13
      src/AppModels/Vms/StartStopMineButtonViewModel.cs
  52. 70 67
      src/AppViews0/AppViewFactory.cs
  53. 0 11
      src/AppViews0/AppViews0.csproj
  54. 2 2
      src/AppViews0/MinerStudio/Views/ChartsWindow.xaml.cs
  55. 2 2
      src/AppViews0/MinerStudio/Views/MinerClientsWindow.xaml.cs
  56. 3 3
      src/AppViews0/MinerStudio/Views/Ucs/CalcConfig.xaml.cs
  57. 1 1
      src/AppViews0/MinerStudio/Views/Ucs/ChangePassword.xaml.cs
  58. 1 1
      src/AppViews0/MinerStudio/Views/Ucs/ColumnsShowEdit.xaml.cs
  59. 2 2
      src/AppViews0/MinerStudio/Views/Ucs/GpuProfilesPage.xaml.cs
  60. 2 2
      src/AppViews0/MinerStudio/Views/Ucs/LocalIpConfig.xaml.cs
  61. 2 2
      src/AppViews0/MinerStudio/Views/Ucs/MinerClient.xaml.cs
  62. 1 1
      src/AppViews0/MinerStudio/Views/Ucs/MinerClientAdd.xaml.cs
  63. 1 1
      src/AppViews0/MinerStudio/Views/Ucs/MinerClientFinderConfig.xaml.cs
  64. 1 1
      src/AppViews0/MinerStudio/Views/Ucs/MinerClientSetting.xaml.cs
  65. 1 1
      src/AppViews0/MinerStudio/Views/Ucs/MinerGroupEdit.xaml.cs
  66. 1 1
      src/AppViews0/MinerStudio/Views/Ucs/MinerNamesSeter.xaml.cs
  67. 1 1
      src/AppViews0/MinerStudio/Views/Ucs/NTMinerUpdaterConfig.xaml.cs
  68. 1 1
      src/AppViews0/MinerStudio/Views/Ucs/NTMinerWalletEdit.xaml.cs
  69. 1 1
      src/AppViews0/MinerStudio/Views/Ucs/OverClockDataEdit.xaml.cs
  70. 2 2
      src/AppViews0/MinerStudio/Views/Ucs/RemoteDesktopLogin.xaml
  71. 1 1
      src/AppViews0/MinerStudio/Views/Ucs/RemoteDesktopLogin.xaml.cs
  72. 3 3
      src/AppViews0/MinerStudio/Views/Ucs/UserPage.xaml.cs
  73. 1 1
      src/AppViews0/MinerStudio/Views/Ucs/VirtualMemory.xaml.cs
  74. 1 1
      src/AppViews0/MinerStudio/Views/Ucs/WsServerNodePage.xaml.cs
  75. 4 4
      src/AppViews0/Views/KernelsWindow.xaml.cs
  76. 9 13
      src/AppViews0/Views/MainWindow.xaml
  77. 5 7
      src/AppViews0/Views/MainWindow.xaml.cs
  78. 2 1
      src/AppViews0/Views/NotificationSample.xaml.cs
  79. 4 4
      src/AppViews0/Views/Ucs/Calc.xaml.cs
  80. 1 1
      src/AppViews0/Views/Ucs/CoinEdit.xaml.cs
  81. 1 1
      src/AppViews0/Views/Ucs/CoinKernelEdit.xaml.cs
  82. 2 2
      src/AppViews0/Views/Ucs/CoinKernelSelect.xaml.cs
  83. 2 2
      src/AppViews0/Views/Ucs/CoinSelect.xaml.cs
  84. 1 1
      src/AppViews0/Views/Ucs/EnvironmentVariableEdit.xaml.cs
  85. 5 3
      src/AppViews0/Views/Ucs/FileWriterEdit.xaml
  86. 1 1
      src/AppViews0/Views/Ucs/FileWriterEdit.xaml.cs
  87. 4 2
      src/AppViews0/Views/Ucs/FragmentWriterEdit.xaml
  88. 1 1
      src/AppViews0/Views/Ucs/FragmentWriterEdit.xaml.cs
  89. 1 1
      src/AppViews0/Views/Ucs/GroupEdit.xaml.cs
  90. 1 1
      src/AppViews0/Views/Ucs/InnerProperty.xaml.cs
  91. 1 1
      src/AppViews0/Views/Ucs/InputSegmentEdit.xaml.cs
  92. 0 1
      src/AppViews0/Views/Ucs/KernelEdit.xaml
  93. 1 1
      src/AppViews0/Views/Ucs/KernelEdit.xaml.cs
  94. 1 1
      src/AppViews0/Views/Ucs/KernelInputEdit.xaml
  95. 1 1
      src/AppViews0/Views/Ucs/KernelInputEdit.xaml.cs
  96. 1 1
      src/AppViews0/Views/Ucs/KernelOutputEdit.xaml.cs
  97. 1 1
      src/AppViews0/Views/Ucs/KernelOutputKeywordEdit.xaml.cs
  98. 1 1
      src/AppViews0/Views/Ucs/KernelOutputTranslaterEdit.xaml.cs
  99. 17 5
      src/AppViews0/Views/Ucs/MainMenu.xaml
  100. 2 2
      src/AppViews0/Views/Ucs/MinerProfileDual.xaml.cs

+ 15 - 0
NTMiner.sln

@@ -110,6 +110,8 @@ Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "WsServer", "src\WsServer\Ws
 EndProject
 Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Tools", "Tools", "{E0B0D173-418C-49D0-9018-99BC6C526CF5}"
 EndProject
+Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "MinerGpu", "src\MinerGpu\MinerGpu.csproj", "{AB085388-E970-491F-ABFC-27D556C27332}"
+EndProject
 Global
 	GlobalSection(SolutionConfigurationPlatforms) = preSolution
 		Debug|Any CPU = Debug|Any CPU
@@ -432,6 +434,18 @@ Global
 		{637E9AD8-6410-419B-8FEE-2528130F871A}.Release|x64.Build.0 = Release|Any CPU
 		{637E9AD8-6410-419B-8FEE-2528130F871A}.Release|x86.ActiveCfg = Release|Any CPU
 		{637E9AD8-6410-419B-8FEE-2528130F871A}.Release|x86.Build.0 = Release|Any CPU
+		{AB085388-E970-491F-ABFC-27D556C27332}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
+		{AB085388-E970-491F-ABFC-27D556C27332}.Debug|Any CPU.Build.0 = Debug|Any CPU
+		{AB085388-E970-491F-ABFC-27D556C27332}.Debug|x64.ActiveCfg = Debug|Any CPU
+		{AB085388-E970-491F-ABFC-27D556C27332}.Debug|x64.Build.0 = Debug|Any CPU
+		{AB085388-E970-491F-ABFC-27D556C27332}.Debug|x86.ActiveCfg = Debug|Any CPU
+		{AB085388-E970-491F-ABFC-27D556C27332}.Debug|x86.Build.0 = Debug|Any CPU
+		{AB085388-E970-491F-ABFC-27D556C27332}.Release|Any CPU.ActiveCfg = Release|Any CPU
+		{AB085388-E970-491F-ABFC-27D556C27332}.Release|Any CPU.Build.0 = Release|Any CPU
+		{AB085388-E970-491F-ABFC-27D556C27332}.Release|x64.ActiveCfg = Release|Any CPU
+		{AB085388-E970-491F-ABFC-27D556C27332}.Release|x64.Build.0 = Release|Any CPU
+		{AB085388-E970-491F-ABFC-27D556C27332}.Release|x86.ActiveCfg = Release|Any CPU
+		{AB085388-E970-491F-ABFC-27D556C27332}.Release|x86.Build.0 = Release|Any CPU
 	EndGlobalSection
 	GlobalSection(SolutionProperties) = preSolution
 		HideSolutionNode = FALSE
@@ -465,6 +479,7 @@ Global
 		{E7B88637-7704-4701-98E0-7875BB6E8C98} = {2C8C5FC2-8B81-4228-8EBD-6B491216FBC1}
 		{637E9AD8-6410-419B-8FEE-2528130F871A} = {2C8C5FC2-8B81-4228-8EBD-6B491216FBC1}
 		{E0B0D173-418C-49D0-9018-99BC6C526CF5} = {B8FD9576-411F-4634-89D9-806FFD21DBA3}
+		{AB085388-E970-491F-ABFC-27D556C27332} = {B8FD9576-411F-4634-89D9-806FFD21DBA3}
 	EndGlobalSection
 	GlobalSection(ExtensibilityGlobals) = postSolution
 		SolutionGuid = {A5D14B0A-73FF-46E8-87F3-7E83FFC1DBDD}

+ 1 - 1
README.md

@@ -4,7 +4,7 @@
 2. 开源矿工永远开源;
 3. 开源矿工永远不会去破解国人开发的内核;
 
-## [下载地址1](https://zhuanlan.zhihu.com/p/138095293)
+## [下载地址1](https://www.cnblogs.com/ntminer/p/11923722.html)
 ### 从源码编译:Visual Studio 2019
 
 ## 开源软件

+ 0 - 1
src/AppModels/AppModels.csproj

@@ -136,7 +136,6 @@
     <Compile Include="Vms\LocalMessageDtoViewModel.cs" />
     <Compile Include="Vms\LogFilesViewModel.cs" />
     <Compile Include="Vms\MainMenuViewModel.cs" />
-    <Compile Include="Vms\MessagePathIdsViewModel.cs" />
     <Compile Include="Vms\MessageTypeItem`1.cs" />
     <Compile Include="MinerStudio\Vms\MinerClientFinderConfigViewModel.cs" />
     <Compile Include="MinerStudio\Vms\MinerGroupSelectViewModel.cs" />

+ 4 - 4
src/AppModels/AppRoot.cs

@@ -23,16 +23,16 @@ namespace NTMiner {
 
         #region methods
         // 因为是上下文路径,无需返回路径标识
-        public static void AddCmdPath<TCmd>(string description, LogEnum logType, Action<TCmd> action, Type location)
+        public static void BuildCmdPath<TCmd>(string description, LogEnum logType, Action<TCmd> path, Type location)
             where TCmd : ICmd {
-            var messagePathId = VirtualRoot.AddMessagePath(description, logType, action, location);
+            var messagePathId = VirtualRoot.BuildMessagePath(description, logType, path, location);
             _contextPathIds.Add(messagePathId);
         }
 
         // 因为是上下文路径,无需返回路径标识
-        public static void AddEventPath<TEvent>(string description, LogEnum logType, Action<TEvent> action, Type location)
+        public static void BuildEventPath<TEvent>(string description, LogEnum logType, Action<TEvent> path, Type location)
             where TEvent : IEvent {
-            var messagePathId = VirtualRoot.AddMessagePath(description, logType, action, location);
+            var messagePathId = VirtualRoot.BuildMessagePath(description, logType, path, location);
             _contextPathIds.Add(messagePathId);
         }
 

+ 8 - 8
src/AppModels/AppRoot.partials.CoinGroupViewModels.cs

@@ -13,18 +13,18 @@ namespace NTMiner {
                 if (WpfUtil.IsInDesignMode) {
                     return;
                 }
-                VirtualRoot.AddEventPath<ServerContextReInitedEvent>("ServerContext刷新后刷新VM内存", LogEnum.DevConsole,
-                    action: message => {
+                VirtualRoot.BuildEventPath<ServerContextReInitedEvent>("ServerContext刷新后刷新VM内存", LogEnum.DevConsole,
+                    path: message => {
                         _dicById.Clear();
                         _listByGroupId.Clear();
                         Init();
                     }, location: this.GetType());
-                VirtualRoot.AddEventPath<ServerContextReInitedEventHandledEvent>("ServerContext的VM集刷新后刷新视图界面", LogEnum.DevConsole,
-                    action: message => {
+                VirtualRoot.BuildEventPath<ServerContextReInitedEventHandledEvent>("ServerContext的VM集刷新后刷新视图界面", LogEnum.DevConsole,
+                    path: message => {
                         // 什么也不做,因为该集合没有什么属性
                     }, location: this.GetType());
-                AddEventPath<CoinGroupAddedEvent>("添加了币组后调整VM内存", LogEnum.DevConsole,
-                    action: (message) => {
+                BuildEventPath<CoinGroupAddedEvent>("添加了币组后调整VM内存", LogEnum.DevConsole,
+                    path: (message) => {
                         if (!_dicById.ContainsKey(message.Source.GetId())) {
                             CoinGroupViewModel coinGroupVm = new CoinGroupViewModel(message.Source);
                             _dicById.Add(message.Source.GetId(), coinGroupVm);
@@ -35,8 +35,8 @@ namespace NTMiner {
                             OnGroupPropertyChanged(coinGroupVm.GroupId);
                         }
                     }, location: this.GetType());
-                AddEventPath<CoinGroupRemovedEvent>("删除了币组后调整VM内存", LogEnum.DevConsole,
-                    action: (message) => {
+                BuildEventPath<CoinGroupRemovedEvent>("删除了币组后调整VM内存", LogEnum.DevConsole,
+                    path: (message) => {
                         if (_dicById.ContainsKey(message.Source.GetId())) {
                             var entity = _dicById[message.Source.GetId()];
                             _dicById.Remove(message.Source.GetId());

+ 10 - 10
src/AppModels/AppRoot.partials.CoinKernelViewModels.cs

@@ -13,17 +13,17 @@ namespace NTMiner {
                 if (WpfUtil.IsInDesignMode) {
                     return;
                 }
-                VirtualRoot.AddEventPath<ServerContextReInitedEvent>("ServerContext刷新后刷新VM内存", LogEnum.DevConsole,
-                    action: message => {
+                VirtualRoot.BuildEventPath<ServerContextReInitedEvent>("ServerContext刷新后刷新VM内存", LogEnum.DevConsole,
+                    path: message => {
                         _dicById.Clear();
                         Init();
                     }, location: this.GetType());
-                VirtualRoot.AddEventPath<ServerContextReInitedEventHandledEvent>("ServerContext的VM集刷新后刷新视图界面", LogEnum.DevConsole,
-                    action: message => {
+                VirtualRoot.BuildEventPath<ServerContextReInitedEventHandledEvent>("ServerContext的VM集刷新后刷新视图界面", LogEnum.DevConsole,
+                    path: message => {
                         OnPropertyChanged(nameof(AllCoinKernels));
                     }, location: this.GetType());
-                AddEventPath<CoinKernelAddedEvent>("添加了币种内核后刷新VM内存", LogEnum.DevConsole,
-                    action: (message) => {
+                BuildEventPath<CoinKernelAddedEvent>("添加了币种内核后刷新VM内存", LogEnum.DevConsole,
+                    path: (message) => {
                         var coinKernelVm = new CoinKernelViewModel(message.Source);
                         _dicById.Add(message.Source.GetId(), coinKernelVm);
                         OnPropertyChanged(nameof(AllCoinKernels));
@@ -36,8 +36,8 @@ namespace NTMiner {
                         }
                         VirtualRoot.RaiseEvent(new CoinKernelVmAddedEvent(message));
                     }, location: this.GetType());
-                AddEventPath<CoinKernelUpdatedEvent>("更新了币种内核后刷新VM内存", LogEnum.DevConsole,
-                    action: (message) => {
+                BuildEventPath<CoinKernelUpdatedEvent>("更新了币种内核后刷新VM内存", LogEnum.DevConsole,
+                    path: (message) => {
                         if (_dicById.TryGetValue(message.Source.GetId(), out CoinKernelViewModel vm)) {
                             var supportedGpu = vm.SupportedGpu;
                             Guid dualCoinGroupId = vm.DualCoinGroupId;
@@ -55,8 +55,8 @@ namespace NTMiner {
                             }
                         }
                     }, location: this.GetType());
-                AddEventPath<CoinKernelRemovedEvent>("移除了币种内核后刷新VM内存", LogEnum.DevConsole,
-                    action: (message) => {
+                BuildEventPath<CoinKernelRemovedEvent>("移除了币种内核后刷新VM内存", LogEnum.DevConsole,
+                    path: (message) => {
                         if (_dicById.TryGetValue(message.Source.GetId(), out CoinKernelViewModel coinKernelVm)) {
                             _dicById.Remove(message.Source.GetId());
                             OnPropertyChanged(nameof(AllCoinKernels));

+ 6 - 6
src/AppModels/AppRoot.partials.CoinProfileViewModels.cs

@@ -15,20 +15,20 @@ namespace NTMiner {
                 if (WpfUtil.IsInDesignMode) {
                     return;
                 }
-                AddEventPath<CoinKernelProfilePropertyChangedEvent>("币种内核设置变更后刷新VM内存", LogEnum.DevConsole,
-                    action: message => {
+                BuildEventPath<CoinKernelProfilePropertyChangedEvent>("币种内核设置变更后刷新VM内存", LogEnum.DevConsole,
+                    path: message => {
                         if (_coinKernelProfileDicById.ContainsKey(message.CoinKernelId)) {
                             _coinKernelProfileDicById[message.CoinKernelId].OnPropertyChanged(message.PropertyName);
                         }
                     }, location: this.GetType());
-                AddEventPath<CoinProfilePropertyChangedEvent>("币种设置变更后刷新VM内存", LogEnum.DevConsole,
-                    action: message => {
+                BuildEventPath<CoinProfilePropertyChangedEvent>("币种设置变更后刷新VM内存", LogEnum.DevConsole,
+                    path: message => {
                         if (_coinProfileDicById.ContainsKey(message.CoinId)) {
                             _coinProfileDicById[message.CoinId].OnPropertyChanged(message.PropertyName);
                         }
                     }, location: this.GetType());
-                VirtualRoot.AddEventPath<LocalContextReInitedEvent>("LocalContext刷新后刷新VM内存", LogEnum.DevConsole,
-                    action: message => {
+                VirtualRoot.BuildEventPath<LocalContextReInitedEvent>("LocalContext刷新后刷新VM内存", LogEnum.DevConsole,
+                    path: message => {
                         _coinKernelProfileDicById.Clear();
                         _coinProfileDicById.Clear();
                     }, location: this.GetType());

+ 14 - 14
src/AppModels/AppRoot.partials.CoinViewModels.cs

@@ -16,43 +16,43 @@ namespace NTMiner {
                 if (WpfUtil.IsInDesignMode) {
                     return;
                 }
-                VirtualRoot.AddEventPath<ServerContextReInitedEvent>("ServerContext刷新后刷新VM内存", LogEnum.DevConsole,
-                    action: message => {
+                VirtualRoot.BuildEventPath<ServerContextReInitedEvent>("ServerContext刷新后刷新VM内存", LogEnum.DevConsole,
+                    path: message => {
                         _dicById.Clear();
                         Init();
                     }, location: this.GetType());
-                VirtualRoot.AddEventPath<ServerContextReInitedEventHandledEvent>("ServerContext的VM集刷新后刷新视图界面", LogEnum.DevConsole,
-                    action: message => {
+                VirtualRoot.BuildEventPath<ServerContextReInitedEventHandledEvent>("ServerContext的VM集刷新后刷新视图界面", LogEnum.DevConsole,
+                    path: message => {
                         AllPropertyChanged();
                     }, location: this.GetType());
-                AddEventPath<CoinAddedEvent>("添加了币种后刷新VM内存", LogEnum.DevConsole,
-                    action: (message) => {
+                BuildEventPath<CoinAddedEvent>("添加了币种后刷新VM内存", LogEnum.DevConsole,
+                    path: (message) => {
                         _dicById.Add(message.Source.GetId(), new CoinViewModel(message.Source));
                         AllPropertyChanged();
                         VirtualRoot.RaiseEvent(new CoinVmAddedEvent(message));
                     }, location: this.GetType());
-                AddEventPath<CoinRemovedEvent>("移除了币种后刷新VM内存", LogEnum.DevConsole,
-                    action: message => {
+                BuildEventPath<CoinRemovedEvent>("移除了币种后刷新VM内存", LogEnum.DevConsole,
+                    path: message => {
                         _dicById.Remove(message.Source.GetId());
                         AllPropertyChanged();
                         VirtualRoot.RaiseEvent(new CoinVmRemovedEvent(message));
                     }, location: this.GetType());
-                AddEventPath<CoinKernelVmAddedEvent>("币种内核Vm集添加了新Vm后刷新币种Vm集的关联内存", LogEnum.DevConsole, action: message => {
+                BuildEventPath<CoinKernelVmAddedEvent>("币种内核Vm集添加了新Vm后刷新币种Vm集的关联内存", LogEnum.DevConsole, path: message => {
                     if (_dicById.TryGetValue(message.Event.Source.CoinId, out CoinViewModel coinVm)) {
                         coinVm.OnPropertyChanged(nameof(CoinViewModel.CoinKernel));
                         coinVm.OnPropertyChanged(nameof(CoinViewModel.CoinKernels));
                         coinVm.OnPropertyChanged(nameof(CoinViewModel.IsSupported));
                     }
                 }, this.GetType());
-                AddEventPath<CoinKernelVmRemovedEvent>("币种内核Vm集删除了新Vm后刷新币种Vm集的关联内存", LogEnum.DevConsole, action: message => {
+                BuildEventPath<CoinKernelVmRemovedEvent>("币种内核Vm集删除了新Vm后刷新币种Vm集的关联内存", LogEnum.DevConsole, path: message => {
                     if (_dicById.TryGetValue(message.Event.Source.CoinId, out CoinViewModel coinVm)) {
                         coinVm.OnPropertyChanged(nameof(CoinViewModel.CoinKernel));
                         coinVm.OnPropertyChanged(nameof(CoinViewModel.CoinKernels));
                         coinVm.OnPropertyChanged(nameof(CoinViewModel.IsSupported));
                     }
                 }, this.GetType());
-                AddEventPath<CoinUpdatedEvent>("更新了币种后刷新VM内存", LogEnum.DevConsole,
-                    action: message => {
+                BuildEventPath<CoinUpdatedEvent>("更新了币种后刷新VM内存", LogEnum.DevConsole,
+                    path: message => {
                         if (_dicById.TryGetValue(message.Source.GetId(), out CoinViewModel vm)) {
                             bool justAsDualCoin = vm.JustAsDualCoin;
                             vm.Update(message.Source);
@@ -73,8 +73,8 @@ namespace NTMiner {
                             }
                         }
                     }, location: this.GetType());
-                AddEventPath<CoinIconDownloadedEvent>("下载了币种图标后", LogEnum.DevConsole,
-                    action: message => {
+                BuildEventPath<CoinIconDownloadedEvent>("下载了币种图标后", LogEnum.DevConsole,
+                    path: message => {
                         try {
                             if (string.IsNullOrEmpty(message.Source.Icon)) {
                                 return;

+ 10 - 10
src/AppModels/AppRoot.partials.FileWriterViewModels.cs

@@ -17,31 +17,31 @@ namespace NTMiner {
                 this.Add = new DelegateCommand(() => {
                     new FileWriterViewModel(Guid.NewGuid()).Edit.Execute(FormType.Add);
                 });
-                VirtualRoot.AddEventPath<ServerContextReInitedEvent>("ServerContext刷新后刷新VM内存", LogEnum.DevConsole,
-                    action: message => {
+                VirtualRoot.BuildEventPath<ServerContextReInitedEvent>("ServerContext刷新后刷新VM内存", LogEnum.DevConsole,
+                    path: message => {
                         _dicById.Clear();
                         Init();
                     }, location: this.GetType());
-                VirtualRoot.AddEventPath<ServerContextReInitedEventHandledEvent>("ServerContext的VM集刷新后刷新视图界面", LogEnum.DevConsole,
-                    action: message => {
+                VirtualRoot.BuildEventPath<ServerContextReInitedEventHandledEvent>("ServerContext的VM集刷新后刷新视图界面", LogEnum.DevConsole,
+                    path: message => {
                         OnPropertyChangeds();
                     }, location: this.GetType());
-                AddEventPath<FileWriterAddedEvent>("添加了文件书写器后调整VM内存", LogEnum.DevConsole,
-                    action: (message) => {
+                BuildEventPath<FileWriterAddedEvent>("添加了文件书写器后调整VM内存", LogEnum.DevConsole,
+                    path: (message) => {
                         if (!_dicById.ContainsKey(message.Source.GetId())) {
                             FileWriterViewModel groupVm = new FileWriterViewModel(message.Source);
                             _dicById.Add(message.Source.GetId(), groupVm);
                             OnPropertyChangeds();
                         }
                     }, location: this.GetType());
-                AddEventPath<FileWriterUpdatedEvent>("更新了文件书写器后调整VM内存", LogEnum.DevConsole,
-                    action: (message) => {
+                BuildEventPath<FileWriterUpdatedEvent>("更新了文件书写器后调整VM内存", LogEnum.DevConsole,
+                    path: (message) => {
                         if (_dicById.TryGetValue(message.Source.GetId(), out FileWriterViewModel vm)) {
                             vm.Update(message.Source);
                         }
                     }, location: this.GetType());
-                AddEventPath<FileWriterRemovedEvent>("删除了文件书写器后调整VM内存", LogEnum.DevConsole,
-                    action: (message) => {
+                BuildEventPath<FileWriterRemovedEvent>("删除了文件书写器后调整VM内存", LogEnum.DevConsole,
+                    path: (message) => {
                         _dicById.Remove(message.Source.GetId());
                         OnPropertyChangeds();
                     }, location: this.GetType());

+ 10 - 10
src/AppModels/AppRoot.partials.FragmentWriterViewModels.cs

@@ -17,31 +17,31 @@ namespace NTMiner {
                 this.Add = new DelegateCommand(() => {
                     new FragmentWriterViewModel(Guid.NewGuid()).Edit.Execute(FormType.Add);
                 });
-                VirtualRoot.AddEventPath<ServerContextReInitedEvent>("ServerContext刷新后刷新VM内存", LogEnum.DevConsole,
-                    action: message => {
+                VirtualRoot.BuildEventPath<ServerContextReInitedEvent>("ServerContext刷新后刷新VM内存", LogEnum.DevConsole,
+                    path: message => {
                         _dicById.Clear();
                         Init();
                     }, location: this.GetType());
-                VirtualRoot.AddEventPath<ServerContextReInitedEventHandledEvent>("ServerContext的VM集刷新后刷新视图界面", LogEnum.DevConsole,
-                    action: message => {
+                VirtualRoot.BuildEventPath<ServerContextReInitedEventHandledEvent>("ServerContext的VM集刷新后刷新视图界面", LogEnum.DevConsole,
+                    path: message => {
                         OnPropertyChangeds();
                     }, location: this.GetType());
-                AddEventPath<FragmentWriterAddedEvent>("添加了命令行片段书写器后调整VM内存", LogEnum.DevConsole,
-                    action: (message) => {
+                BuildEventPath<FragmentWriterAddedEvent>("添加了命令行片段书写器后调整VM内存", LogEnum.DevConsole,
+                    path: (message) => {
                         if (!_dicById.ContainsKey(message.Source.GetId())) {
                             FragmentWriterViewModel vm = new FragmentWriterViewModel(message.Source);
                             _dicById.Add(message.Source.GetId(), vm);
                             OnPropertyChangeds();
                         }
                     }, location: this.GetType());
-                AddEventPath<FragmentWriterUpdatedEvent>("更新了命令行片段书写器后调整VM内存", LogEnum.DevConsole,
-                    action: (message) => {
+                BuildEventPath<FragmentWriterUpdatedEvent>("更新了命令行片段书写器后调整VM内存", LogEnum.DevConsole,
+                    path: (message) => {
                         if (_dicById.TryGetValue(message.Source.GetId(), out FragmentWriterViewModel vm)) {
                             vm.Update(message.Source);
                         }
                     }, location: this.GetType());
-                AddEventPath<FragmentWriterRemovedEvent>("删除了命令行片段书写器后调整VM内存", LogEnum.DevConsole,
-                    action: (message) => {
+                BuildEventPath<FragmentWriterRemovedEvent>("删除了命令行片段书写器后调整VM内存", LogEnum.DevConsole,
+                    path: (message) => {
                         _dicById.Remove(message.Source.GetId());
                         OnPropertyChangeds();
                     }, location: this.GetType());

+ 4 - 4
src/AppModels/AppRoot.partials.GpuProfileViewModels.cs

@@ -16,8 +16,8 @@ namespace NTMiner {
                 if (WpfUtil.IsInDesignMode) {
                     return;
                 }
-                VirtualRoot.AddEventPath<GpuProfileSetRefreshedEvent>("Gpu超频集合刷新后刷新附着在当前币种上的超频数据", LogEnum.DevConsole,
-                    action: message => {
+                VirtualRoot.BuildEventPath<GpuProfileSetRefreshedEvent>("Gpu超频集合刷新后刷新附着在当前币种上的超频数据", LogEnum.DevConsole,
+                    path: message => {
                         lock (_locker) {
                             _listByCoinId.Clear();
                             _gpuAllVmDicByCoinId.Clear();
@@ -28,8 +28,8 @@ namespace NTMiner {
                             VirtualRoot.Execute(new CoinOverClockCommand(coinVm.Id));
                         }
                     }, location: this.GetType());
-                AddEventPath<GpuProfileAddedOrUpdatedEvent>("添加或更新了Gpu超频数据后刷新VM内存", LogEnum.DevConsole,
-                    action: message => {
+                BuildEventPath<GpuProfileAddedOrUpdatedEvent>("添加或更新了Gpu超频数据后刷新VM内存", LogEnum.DevConsole,
+                    path: message => {
                         lock (_locker) {
                             if (_listByCoinId.TryGetValue(message.Source.CoinId, out List<GpuProfileViewModel> list)) {
                                 var vm = list.FirstOrDefault(a => a.Index == message.Source.Index);

+ 14 - 14
src/AppModels/AppRoot.partials.GpuSpeedViewModels.cs

@@ -49,8 +49,8 @@ namespace NTMiner {
                     this._list.Add(new GpuSpeedViewModel(item));
                 }
                 _totalSpeedVm = this._list.FirstOrDefault(a => a.GpuVm.Index == NTMinerContext.GpuAllId);
-                AddEventPath<GpuShareChangedEvent>("显卡份额变更后刷新VM内存", LogEnum.DevConsole,
-                    action: message => {
+                BuildEventPath<GpuShareChangedEvent>("显卡份额变更后刷新VM内存", LogEnum.DevConsole,
+                    path: message => {
                         ResetIfMainCoinSwitched();
                         int index = message.Source.Gpu.Index;
                         GpuSpeedViewModel gpuSpeedVm = _list.FirstOrDefault(a => a.GpuVm.Index == index);
@@ -60,8 +60,8 @@ namespace NTMiner {
                             gpuSpeedVm.MainCoinSpeed.RejectShare = message.Source.MainCoinSpeed.RejectShare;
                         }
                     }, location: this.GetType());
-                AddEventPath<FoundShareIncreasedEvent>("找到一个份额后刷新VM内存", LogEnum.DevConsole,
-                    action: message => {
+                BuildEventPath<FoundShareIncreasedEvent>("找到一个份额后刷新VM内存", LogEnum.DevConsole,
+                    path: message => {
                         ResetIfMainCoinSwitched();
                         int index = message.Source.Gpu.Index;
                         GpuSpeedViewModel gpuSpeedVm = _list.FirstOrDefault(a => a.GpuVm.Index == index);
@@ -69,8 +69,8 @@ namespace NTMiner {
                             gpuSpeedVm.MainCoinSpeed.FoundShare = message.Source.MainCoinSpeed.FoundShare;
                         }
                     }, location: this.GetType());
-                AddEventPath<AcceptShareIncreasedEvent>("接受一个份额后刷新VM内存", LogEnum.DevConsole,
-                    action: message => {
+                BuildEventPath<AcceptShareIncreasedEvent>("接受一个份额后刷新VM内存", LogEnum.DevConsole,
+                    path: message => {
                         ResetIfMainCoinSwitched();
                         int index = message.Source.Gpu.Index;
                         GpuSpeedViewModel gpuSpeedVm = _list.FirstOrDefault(a => a.GpuVm.Index == index);
@@ -78,8 +78,8 @@ namespace NTMiner {
                             gpuSpeedVm.MainCoinSpeed.AcceptShare = message.Source.MainCoinSpeed.AcceptShare;
                         }
                     }, location: this.GetType());
-                AddEventPath<RejectShareIncreasedEvent>("拒绝一个份额后刷新VM内存", LogEnum.DevConsole,
-                    action: message => {
+                BuildEventPath<RejectShareIncreasedEvent>("拒绝一个份额后刷新VM内存", LogEnum.DevConsole,
+                    path: message => {
                         ResetIfMainCoinSwitched();
                         int index = message.Source.Gpu.Index;
                         GpuSpeedViewModel gpuSpeedVm = _list.FirstOrDefault(a => a.GpuVm.Index == index);
@@ -87,8 +87,8 @@ namespace NTMiner {
                             gpuSpeedVm.MainCoinSpeed.RejectShare = message.Source.MainCoinSpeed.RejectShare;
                         }
                     }, location: this.GetType());
-                AddEventPath<IncorrectShareIncreasedEvent>("产生一个错误份额后刷新VM内存", LogEnum.DevConsole,
-                    action: message => {
+                BuildEventPath<IncorrectShareIncreasedEvent>("产生一个错误份额后刷新VM内存", LogEnum.DevConsole,
+                    path: message => {
                         ResetIfMainCoinSwitched();
                         int index = message.Source.Gpu.Index;
                         GpuSpeedViewModel gpuSpeedVm = _list.FirstOrDefault(a => a.GpuVm.Index == index);
@@ -96,8 +96,8 @@ namespace NTMiner {
                             gpuSpeedVm.MainCoinSpeed.IncorrectShare = message.Source.MainCoinSpeed.IncorrectShare;
                         }
                     }, location: this.GetType());
-                AddEventPath<GpuSpeedChangedEvent>("显卡算力变更后刷新VM内存", LogEnum.None,
-                    action: (message) => {
+                BuildEventPath<GpuSpeedChangedEvent>("显卡算力变更后刷新VM内存", LogEnum.None,
+                    path: (message) => {
                         ResetIfMainCoinSwitched();
                         int index = message.Source.Gpu.Index;
                         GpuSpeedViewModel gpuSpeedVm = _list.FirstOrDefault(a => a.GpuVm.Index == index);
@@ -139,8 +139,8 @@ namespace NTMiner {
                             }
                         }
                     }, location: this.GetType());
-                AddEventPath<Per1SecondEvent>("每秒钟更新算力活动时间", LogEnum.None,
-                    action: message => {
+                BuildEventPath<Per1SecondEvent>("每秒钟更新算力活动时间", LogEnum.None,
+                    path: message => {
                         TotalSpeedVm.MainCoinSpeed.OnPropertyChanged(nameof(SpeedViewModel.LastSpeedOnText));
                         TotalSpeedVm.DualCoinSpeed.OnPropertyChanged(nameof(SpeedViewModel.LastSpeedOnText));
                     }, location: this.GetType());

+ 8 - 8
src/AppModels/AppRoot.partials.GpuViewModels.cs

@@ -29,28 +29,28 @@ namespace NTMiner {
                 else {
                     _gpuAllVm = new GpuViewModel(Gpu.GpuAll);
                 }
-                AddEventPath<EPriceChangedEvent>("电价变更后更新电费显示", LogEnum.DevConsole,
-                    action: message => {
+                BuildEventPath<EPriceChangedEvent>("电价变更后更新电费显示", LogEnum.DevConsole,
+                    path: message => {
                         foreach (var gpuVm in _gpuVms.Values) {
                             gpuVm.OnPropertyChanged(nameof(GpuViewModel.EChargeText));
                         }
                         GpuSpeedVms.OnPropertyChanged(nameof(GpuSpeedViewModels.ProfitCnyPerDayText));
                     }, location: this.GetType());
-                AddEventPath<MaxTempChangedEvent>("高温红色阈值变更后更新显卡温度颜色", LogEnum.DevConsole,
-                    action: message => {
+                BuildEventPath<MaxTempChangedEvent>("高温红色阈值变更后更新显卡温度颜色", LogEnum.DevConsole,
+                    path: message => {
                         foreach (var gpuVm in _gpuVms.Values) {
                             gpuVm.OnPropertyChanged(nameof(GpuViewModel.TemperatureForeground));
                         }
                     }, location: this.GetType());
-                AddEventPath<PowerAppendChangedEvent>("功耗补偿变更后更新功耗显示", LogEnum.DevConsole,
-                    action: message => {
+                BuildEventPath<PowerAppendChangedEvent>("功耗补偿变更后更新功耗显示", LogEnum.DevConsole,
+                    path: message => {
                         foreach (var gpuVm in _gpuVms.Values) {
                             gpuVm.OnPropertyChanged(nameof(GpuViewModel.PowerUsageWText));
                         }
                         GpuSpeedVms.OnPropertyChanged(nameof(GpuSpeedViewModels.ProfitCnyPerDayText));
                     }, location: this.GetType());
-                AddEventPath<GpuStateChangedEvent>("显卡状态变更后刷新VM内存", LogEnum.None,
-                    action: message => {
+                BuildEventPath<GpuStateChangedEvent>("显卡状态变更后刷新VM内存", LogEnum.None,
+                    path: message => {
                         if (_gpuVms.ContainsKey(message.Source.Index)) {
                             GpuViewModel vm = _gpuVms[message.Source.Index];
                             vm.Temperature = message.Source.Temperature;

+ 10 - 10
src/AppModels/AppRoot.partials.GroupViewModels.cs

@@ -19,25 +19,25 @@ namespace NTMiner {
                         SortNumber = Count + 1
                     }.Edit.Execute(FormType.Add);
                 });
-                VirtualRoot.AddEventPath<ServerContextReInitedEvent>("ServerContext刷新后刷新VM内存", LogEnum.DevConsole,
-                    action: message => {
+                VirtualRoot.BuildEventPath<ServerContextReInitedEvent>("ServerContext刷新后刷新VM内存", LogEnum.DevConsole,
+                    path: message => {
                         _dicById.Clear();
                         Init();
                     }, location: this.GetType());
-                VirtualRoot.AddEventPath<ServerContextReInitedEventHandledEvent>("ServerContext的VM集刷新后刷新视图界面", LogEnum.DevConsole,
-                    action: message => {
+                VirtualRoot.BuildEventPath<ServerContextReInitedEventHandledEvent>("ServerContext的VM集刷新后刷新视图界面", LogEnum.DevConsole,
+                    path: message => {
                         OnPropertyChangeds();
                     }, location: this.GetType());
-                AddEventPath<GroupAddedEvent>("添加了组后调整VM内存", LogEnum.DevConsole,
-                    action: (message) => {
+                BuildEventPath<GroupAddedEvent>("添加了组后调整VM内存", LogEnum.DevConsole,
+                    path: (message) => {
                         if (!_dicById.ContainsKey(message.Source.GetId())) {
                             GroupViewModel groupVm = new GroupViewModel(message.Source);
                             _dicById.Add(message.Source.GetId(), groupVm);
                             OnPropertyChangeds();
                         }
                     }, location: this.GetType());
-                AddEventPath<GroupUpdatedEvent>("更新了组后调整VM内存", LogEnum.DevConsole,
-                    action: (message) => {
+                BuildEventPath<GroupUpdatedEvent>("更新了组后调整VM内存", LogEnum.DevConsole,
+                    path: (message) => {
                         if (_dicById.TryGetValue(message.Source.GetId(), out GroupViewModel vm)) {
                             int sortNumber = vm.SortNumber;
                             vm.Update(message.Source);
@@ -47,8 +47,8 @@ namespace NTMiner {
                             }
                         }
                     }, location: this.GetType());
-                AddEventPath<GroupRemovedEvent>("删除了组后调整VM内存", LogEnum.DevConsole,
-                    action: (message) => {
+                BuildEventPath<GroupRemovedEvent>("删除了组后调整VM内存", LogEnum.DevConsole,
+                    path: (message) => {
                         _dicById.Remove(message.Source.GetId());
                         OnPropertyChangeds();
                     }, location: this.GetType());

+ 10 - 10
src/AppModels/AppRoot.partials.KernelInputViewModels.cs

@@ -13,23 +13,23 @@ namespace NTMiner {
                 if (WpfUtil.IsInDesignMode) {
                     return;
                 }
-                VirtualRoot.AddEventPath<ServerContextReInitedEvent>("ServerContext刷新后刷新VM内存", LogEnum.DevConsole,
-                    action: message => {
+                VirtualRoot.BuildEventPath<ServerContextReInitedEvent>("ServerContext刷新后刷新VM内存", LogEnum.DevConsole,
+                    path: message => {
                         _dicById.Clear();
                         Init();
                     }, location: this.GetType());
-                VirtualRoot.AddEventPath<ServerContextReInitedEventHandledEvent>("ServerContext的VM集刷新后刷新视图界面", LogEnum.DevConsole,
-                    action: message => {
+                VirtualRoot.BuildEventPath<ServerContextReInitedEventHandledEvent>("ServerContext的VM集刷新后刷新视图界面", LogEnum.DevConsole,
+                    path: message => {
                         OnPropertyChangeds();
                     }, location: this.GetType());
-                AddEventPath<KernelInputAddedEvent>("添加了内核输入后刷新VM内存", LogEnum.DevConsole,
-                    action: message => {
+                BuildEventPath<KernelInputAddedEvent>("添加了内核输入后刷新VM内存", LogEnum.DevConsole,
+                    path: message => {
                         var vm = new KernelInputViewModel(message.Source);
                         _dicById.Add(message.Source.GetId(), vm);
                         OnPropertyChangeds();
                     }, location: this.GetType());
-                AddEventPath<KernelInputUpdatedEvent>("更新了内核输入后刷新VM内存", LogEnum.DevConsole,
-                    action: message => {
+                BuildEventPath<KernelInputUpdatedEvent>("更新了内核输入后刷新VM内存", LogEnum.DevConsole,
+                    path: message => {
                         if (_dicById.TryGetValue(message.Source.GetId(), out KernelInputViewModel vm)) {
                             if (vm != null) {
                                 bool isSupportDualMine = vm.IsSupportDualMine;
@@ -49,8 +49,8 @@ namespace NTMiner {
                             }
                         }
                     }, location: this.GetType());
-                AddEventPath<KernelInputRemovedEvent>("移除了内核输入后刷新VM内存", LogEnum.DevConsole,
-                    action: message => {
+                BuildEventPath<KernelInputRemovedEvent>("移除了内核输入后刷新VM内存", LogEnum.DevConsole,
+                    path: message => {
                         if (_dicById.ContainsKey(message.Source.GetId())) {
                             _dicById.Remove(message.Source.GetId());
                             OnPropertyChangeds();

+ 8 - 8
src/AppModels/AppRoot.partials.KernelOutputKeywordViewModels.cs

@@ -14,8 +14,8 @@ namespace NTMiner {
                 if (WpfUtil.IsInDesignMode) {
                     return;
                 }
-                AddEventPath<KernelOutputKeywordLoadedEvent>("从服务器加载了内核输入关键字后刷新Vm集", LogEnum.DevConsole,
-                    action: message => {
+                BuildEventPath<KernelOutputKeywordLoadedEvent>("从服务器加载了内核输入关键字后刷新Vm集", LogEnum.DevConsole,
+                    path: message => {
                         KernelOutputKeywordViewModel[] toRemoves = _dicById.Where(a => a.Value.GetDataLevel() == DataLevel.Global).Select(a => a.Value).ToArray();
                         foreach (var item in toRemoves) {
                             _dicById.Remove(item.Id);
@@ -43,8 +43,8 @@ namespace NTMiner {
                             }
                         }
                     }, location: this.GetType());
-                AddEventPath<UserKernelOutputKeywordAddedEvent>("添加了内核输出过滤器后刷新VM内存", LogEnum.DevConsole,
-                    action: message => {
+                BuildEventPath<UserKernelOutputKeywordAddedEvent>("添加了内核输出过滤器后刷新VM内存", LogEnum.DevConsole,
+                    path: message => {
                         if (!_dicById.ContainsKey(message.Source.GetId())) {
                             KernelOutputKeywordViewModel vm = new KernelOutputKeywordViewModel(message.Source);
                             _dicById.Add(vm.Id, vm);
@@ -57,14 +57,14 @@ namespace NTMiner {
                             }
                         }
                     }, location: this.GetType());
-                AddEventPath<UserKernelOutputKeywordUpdatedEvent>("更新了内核输出过滤器后刷新VM内存", LogEnum.DevConsole,
-                    action: message => {
+                BuildEventPath<UserKernelOutputKeywordUpdatedEvent>("更新了内核输出过滤器后刷新VM内存", LogEnum.DevConsole,
+                    path: message => {
                         if (_dicById.TryGetValue(message.Source.GetId(), out KernelOutputKeywordViewModel vm)) {
                             vm.Update(message.Source);
                         }
                     }, location: this.GetType());
-                AddEventPath<UserKernelOutputKeywordRemovedEvent>("删除了内核输出过滤器后刷新VM内存", LogEnum.DevConsole,
-                    action: message => {
+                BuildEventPath<UserKernelOutputKeywordRemovedEvent>("删除了内核输出过滤器后刷新VM内存", LogEnum.DevConsole,
+                    path: message => {
                         if (_dicById.TryGetValue(message.Source.GetId(), out KernelOutputKeywordViewModel vm)) {
                             _dicById.Remove(vm.Id);
                             _dicByKernelOutputId[vm.KernelOutputId].Remove(vm);

+ 10 - 10
src/AppModels/AppRoot.partials.KernelOutputTranslaterViewModels.cs

@@ -14,18 +14,18 @@ namespace NTMiner {
                 if (WpfUtil.IsInDesignMode) {
                     return;
                 }
-                VirtualRoot.AddEventPath<ServerContextReInitedEvent>("ServerContext刷新后刷新VM内存", LogEnum.DevConsole,
-                    action: message => {
+                VirtualRoot.BuildEventPath<ServerContextReInitedEvent>("ServerContext刷新后刷新VM内存", LogEnum.DevConsole,
+                    path: message => {
                         _dicById.Clear();
                         _dicByKernelOutputId.Clear();
                         Init();
                     }, location: this.GetType());
-                VirtualRoot.AddEventPath<ServerContextReInitedEventHandledEvent>("ServerContext的VM集刷新后刷新视图界面", LogEnum.DevConsole,
-                    action: message => {
+                VirtualRoot.BuildEventPath<ServerContextReInitedEventHandledEvent>("ServerContext的VM集刷新后刷新视图界面", LogEnum.DevConsole,
+                    path: message => {
                         OnPropertyChanged(nameof(AllKernelOutputTranslaterVms));
                     }, location: this.GetType());
-                AddEventPath<KernelOutputTranslaterAddedEvent>("添加了内核输出翻译器后刷新VM内存", LogEnum.DevConsole,
-                    action: message => {
+                BuildEventPath<KernelOutputTranslaterAddedEvent>("添加了内核输出翻译器后刷新VM内存", LogEnum.DevConsole,
+                    path: message => {
                         if (KernelOutputVms.TryGetKernelOutputVm(message.Source.KernelOutputId, out KernelOutputViewModel kernelOutputVm)) {
                             if (!_dicByKernelOutputId.ContainsKey(message.Source.KernelOutputId)) {
                                 _dicByKernelOutputId.Add(message.Source.KernelOutputId, new List<KernelOutputTranslaterViewModel>());
@@ -36,8 +36,8 @@ namespace NTMiner {
                             kernelOutputVm.OnPropertyChanged(nameof(kernelOutputVm.KernelOutputTranslaters));
                         }
                     }, location: this.GetType());
-                AddEventPath<KernelOutputTranslaterUpdatedEvent>("更新了内核输出翻译器后刷新VM内存", LogEnum.DevConsole,
-                    action: message => {
+                BuildEventPath<KernelOutputTranslaterUpdatedEvent>("更新了内核输出翻译器后刷新VM内存", LogEnum.DevConsole,
+                    path: message => {
                         if (_dicByKernelOutputId.TryGetValue(message.Source.KernelOutputId, out List<KernelOutputTranslaterViewModel> vms)) {
                             var vm = vms.FirstOrDefault(a => a.Id == message.Source.GetId());
                             if (vm != null) {
@@ -45,8 +45,8 @@ namespace NTMiner {
                             }
                         }
                     }, location: this.GetType());
-                AddEventPath<KernelOutputTranslaterRemovedEvent>("移除了内核输出翻译器后刷新VM内存", LogEnum.DevConsole,
-                    action: message => {
+                BuildEventPath<KernelOutputTranslaterRemovedEvent>("移除了内核输出翻译器后刷新VM内存", LogEnum.DevConsole,
+                    path: message => {
                         if (_dicByKernelOutputId.ContainsKey(message.Source.KernelOutputId)) {
                             var item = _dicByKernelOutputId[message.Source.KernelOutputId].FirstOrDefault(a => a.Id == message.Source.GetId());
                             if (item != null) {

+ 10 - 10
src/AppModels/AppRoot.partials.KernelOutputViewModels.cs

@@ -13,32 +13,32 @@ namespace NTMiner {
                 if (WpfUtil.IsInDesignMode) {
                     return;
                 }
-                VirtualRoot.AddEventPath<ServerContextReInitedEvent>("ServerContext刷新后刷新VM内存", LogEnum.DevConsole,
-                    action: message => {
+                VirtualRoot.BuildEventPath<ServerContextReInitedEvent>("ServerContext刷新后刷新VM内存", LogEnum.DevConsole,
+                    path: message => {
                         _dicById.Clear();
                         Init();
                     }, location: this.GetType());
-                VirtualRoot.AddEventPath<ServerContextReInitedEventHandledEvent>("ServerContext的VM集刷新后刷新视图界面", LogEnum.DevConsole,
-                    action: message => {
+                VirtualRoot.BuildEventPath<ServerContextReInitedEventHandledEvent>("ServerContext的VM集刷新后刷新视图界面", LogEnum.DevConsole,
+                    path: message => {
                         AllPropertyChanged();
                     }, location: this.GetType());
-                AddEventPath<KernelOutputAddedEvent>("添加了内核输出组后刷新VM内存", LogEnum.DevConsole,
-                    action: message => {
+                BuildEventPath<KernelOutputAddedEvent>("添加了内核输出组后刷新VM内存", LogEnum.DevConsole,
+                    path: message => {
                         var vm = new KernelOutputViewModel(message.Source);
                         _dicById.Add(message.Source.GetId(), vm);
                         OnPropertyChanged(nameof(AllKernelOutputVms));
                         OnPropertyChanged(nameof(PleaseSelectVms));
                     }, location: this.GetType());
-                AddEventPath<KernelOutputUpdatedEvent>("更新了内核输出组后刷新VM内存", LogEnum.DevConsole,
-                    action: message => {
+                BuildEventPath<KernelOutputUpdatedEvent>("更新了内核输出组后刷新VM内存", LogEnum.DevConsole,
+                    path: message => {
                         if (_dicById.TryGetValue(message.Source.GetId(), out KernelOutputViewModel vm)) {
                             if (vm != null) {
                                 vm.Update(message.Source);
                             }
                         }
                     }, location: this.GetType());
-                AddEventPath<KernelOutputRemovedEvent>("移除了内核输出组后刷新VM内存", LogEnum.DevConsole,
-                    action: message => {
+                BuildEventPath<KernelOutputRemovedEvent>("移除了内核输出组后刷新VM内存", LogEnum.DevConsole,
+                    path: message => {
                         if (_dicById.ContainsKey(message.Source.GetId())) {
                             _dicById.Remove(message.Source.GetId());
                             OnPropertyChanged(nameof(AllKernelOutputVms));

+ 10 - 10
src/AppModels/AppRoot.partials.KernelViewModels.cs

@@ -19,33 +19,33 @@ namespace NTMiner {
                 if (WpfUtil.IsInDesignMode) {
                     return;
                 }
-                VirtualRoot.AddEventPath<ServerContextReInitedEvent>("ServerContext刷新后刷新VM内存", LogEnum.DevConsole,
-                    action: message => {
+                VirtualRoot.BuildEventPath<ServerContextReInitedEvent>("ServerContext刷新后刷新VM内存", LogEnum.DevConsole,
+                    path: message => {
                         _dicById.Clear();
                         Init();
                     }, location: this.GetType());
-                VirtualRoot.AddEventPath<ServerContextReInitedEventHandledEvent>("ServerContext的VM集刷新后刷新视图界面", LogEnum.DevConsole,
-                    action: message => {
+                VirtualRoot.BuildEventPath<ServerContextReInitedEventHandledEvent>("ServerContext的VM集刷新后刷新视图界面", LogEnum.DevConsole,
+                    path: message => {
                         OnPropertyChanged(nameof(AllKernels));
                     }, location: this.GetType());
-                AddEventPath<KernelAddedEvent>("添加了内核后调整VM内存", LogEnum.DevConsole,
-                    action: (message) => {
+                BuildEventPath<KernelAddedEvent>("添加了内核后调整VM内存", LogEnum.DevConsole,
+                    path: (message) => {
                         _dicById.Add(message.Source.GetId(), new KernelViewModel(message.Source));
                         OnPropertyChanged(nameof(AllKernels));
                         foreach (var coinKernelVm in CoinKernelVms.AllCoinKernels.Where(a => a.KernelId == message.Source.GetId())) {
                             coinKernelVm.OnPropertyChanged(nameof(coinKernelVm.IsSupportDualMine));
                         }
                     }, location: this.GetType());
-                AddEventPath<KernelRemovedEvent>("删除了内核后调整VM内存", LogEnum.DevConsole,
-                    action: message => {
+                BuildEventPath<KernelRemovedEvent>("删除了内核后调整VM内存", LogEnum.DevConsole,
+                    path: message => {
                         _dicById.Remove(message.Source.GetId());
                         OnPropertyChanged(nameof(AllKernels));
                         foreach (var coinKernelVm in CoinKernelVms.AllCoinKernels.Where(a => a.KernelId == message.Source.GetId())) {
                             coinKernelVm.OnPropertyChanged(nameof(coinKernelVm.IsSupportDualMine));
                         }
                     }, location: this.GetType());
-                AddEventPath<KernelUpdatedEvent>("更新了内核后调整VM内存", LogEnum.DevConsole,
-                    action: message => {
+                BuildEventPath<KernelUpdatedEvent>("更新了内核后调整VM内存", LogEnum.DevConsole,
+                    path: message => {
                         if (_dicById.TryGetValue(message.Source.GetId(), out KernelViewModel vm)) {
                             PublishStatus publishStatus = vm.PublishState;
                             Guid kernelInputId = vm.KernelInputId;

+ 10 - 10
src/AppModels/AppRoot.partials.PackageViewModels.cs

@@ -13,33 +13,33 @@ namespace NTMiner {
                 if (WpfUtil.IsInDesignMode) {
                     return;
                 }
-                VirtualRoot.AddEventPath<ServerContextReInitedEvent>("ServerContext刷新后刷新VM内存", LogEnum.DevConsole,
-                    action: message => {
+                VirtualRoot.BuildEventPath<ServerContextReInitedEvent>("ServerContext刷新后刷新VM内存", LogEnum.DevConsole,
+                    path: message => {
                         _dicById.Clear();
                         Init();
                     }, location: this.GetType());
-                VirtualRoot.AddEventPath<ServerContextReInitedEventHandledEvent>("ServerContext的VM集刷新后刷新视图界面", LogEnum.DevConsole,
-                    action: message => {
+                VirtualRoot.BuildEventPath<ServerContextReInitedEventHandledEvent>("ServerContext的VM集刷新后刷新视图界面", LogEnum.DevConsole,
+                    path: message => {
                         OnPropertyChanged(nameof(AllPackages));
                     }, location: this.GetType());
-                AddEventPath<PackageAddedEvent>("添加了包后调整VM内存", LogEnum.DevConsole,
-                    action: (message) => {
+                BuildEventPath<PackageAddedEvent>("添加了包后调整VM内存", LogEnum.DevConsole,
+                    path: (message) => {
                         _dicById.Add(message.Source.GetId(), new PackageViewModel(message.Source));
                         OnPropertyChanged(nameof(AllPackages));
                         foreach (var item in KernelVms.AllKernels) {
                             item.OnPropertyChanged(nameof(item.IsPackageValid));
                         }
                     }, location: this.GetType());
-                AddEventPath<PackageRemovedEvent>("删除了包后调整VM内存", LogEnum.DevConsole,
-                    action: message => {
+                BuildEventPath<PackageRemovedEvent>("删除了包后调整VM内存", LogEnum.DevConsole,
+                    path: message => {
                         _dicById.Remove(message.Source.GetId());
                         OnPropertyChanged(nameof(AllPackages));
                         foreach (var item in KernelVms.AllKernels) {
                             item.OnPropertyChanged(nameof(item.IsPackageValid));
                         }
                     }, location: this.GetType());
-                AddEventPath<PackageUpdatedEvent>("更新了包后调整VM内存", LogEnum.DevConsole,
-                    action: message => {
+                BuildEventPath<PackageUpdatedEvent>("更新了包后调整VM内存", LogEnum.DevConsole,
+                    path: message => {
                         if (_dicById.TryGetValue(message.Source.GetId(), out PackageViewModel vm)) {
                             vm.Update(message.Source);
                             foreach (var item in KernelVms.AllKernels) {

+ 10 - 10
src/AppModels/AppRoot.partials.PoolKernelViewModels.cs

@@ -14,17 +14,17 @@ namespace NTMiner {
                 if (WpfUtil.IsInDesignMode) {
                     return;
                 }
-                VirtualRoot.AddEventPath<ServerContextReInitedEvent>("ServerContext刷新后刷新VM内存", LogEnum.DevConsole,
-                    action: message => {
+                VirtualRoot.BuildEventPath<ServerContextReInitedEvent>("ServerContext刷新后刷新VM内存", LogEnum.DevConsole,
+                    path: message => {
                         _dicById.Clear();
                         Init();
                     }, location: this.GetType());
-                VirtualRoot.AddEventPath<ServerContextReInitedEventHandledEvent>("ServerContext的VM集刷新后刷新视图界面", LogEnum.DevConsole,
-                    action: message => {
+                VirtualRoot.BuildEventPath<ServerContextReInitedEventHandledEvent>("ServerContext的VM集刷新后刷新视图界面", LogEnum.DevConsole,
+                    path: message => {
                         OnPropertyChanged(nameof(AllPoolKernels));
                     }, location: this.GetType());
-                AddEventPath<PoolKernelAddedEvent>("新添了矿池内核后刷新矿池内核VM内存", LogEnum.DevConsole,
-                    action: (message) => {
+                BuildEventPath<PoolKernelAddedEvent>("新添了矿池内核后刷新矿池内核VM内存", LogEnum.DevConsole,
+                    path: (message) => {
                         if (!_dicById.ContainsKey(message.Source.GetId())) {
                             if (PoolVms.TryGetPoolVm(message.Source.PoolId, out PoolViewModel poolVm)) {
                                 _dicById.Add(message.Source.GetId(), new PoolKernelViewModel(message.Source));
@@ -32,8 +32,8 @@ namespace NTMiner {
                             }
                         }
                     }, location: this.GetType());
-                AddEventPath<PoolKernelRemovedEvent>("移除了币种内核后刷新矿池内核VM内存", LogEnum.DevConsole,
-                    action: (message) => {
+                BuildEventPath<PoolKernelRemovedEvent>("移除了币种内核后刷新矿池内核VM内存", LogEnum.DevConsole,
+                    path: (message) => {
                         if (_dicById.ContainsKey(message.Source.GetId())) {
                             var vm = _dicById[message.Source.GetId()];
                             _dicById.Remove(message.Source.GetId());
@@ -42,8 +42,8 @@ namespace NTMiner {
                             }
                         }
                     }, location: this.GetType());
-                AddEventPath<PoolKernelUpdatedEvent>("更新了矿池内核后刷新VM内存", LogEnum.DevConsole,
-                    action: (message) => {
+                BuildEventPath<PoolKernelUpdatedEvent>("更新了矿池内核后刷新VM内存", LogEnum.DevConsole,
+                    path: (message) => {
                         if (_dicById.TryGetValue(message.Source.GetId(), out PoolKernelViewModel vm)) {
                             vm.Update(message.Source);
                         }

+ 4 - 4
src/AppModels/AppRoot.partials.PoolProfileViewModels.cs

@@ -12,14 +12,14 @@ namespace NTMiner {
                 if (WpfUtil.IsInDesignMode) {
                     return;
                 }
-                AddEventPath<PoolProfilePropertyChangedEvent>("矿池设置变更后刷新VM内存", LogEnum.DevConsole,
-                    action: message => {
+                BuildEventPath<PoolProfilePropertyChangedEvent>("矿池设置变更后刷新VM内存", LogEnum.DevConsole,
+                    path: message => {
                         if (_dicById.TryGetValue(message.PoolId, out PoolProfileViewModel vm)) {
                             vm.OnPropertyChanged(message.PropertyName);
                         }
                     }, location: this.GetType());
-                VirtualRoot.AddEventPath<LocalContextReInitedEvent>("LocalContext刷新后刷新VM内存", LogEnum.DevConsole,
-                    action: message => {
+                VirtualRoot.BuildEventPath<LocalContextReInitedEvent>("LocalContext刷新后刷新VM内存", LogEnum.DevConsole,
+                    path: message => {
                         _dicById.Clear();
                     }, location: this.GetType());
             }

+ 10 - 10
src/AppModels/AppRoot.partials.PoolViewModels.cs

@@ -12,17 +12,17 @@ namespace NTMiner {
                 if (WpfUtil.IsInDesignMode) {
                     return;
                 }
-                VirtualRoot.AddEventPath<ServerContextReInitedEvent>("ServerContext刷新后刷新VM内存", LogEnum.DevConsole,
-                    action: message => {
+                VirtualRoot.BuildEventPath<ServerContextReInitedEvent>("ServerContext刷新后刷新VM内存", LogEnum.DevConsole,
+                    path: message => {
                         _dicById.Clear();
                         Init();
                     }, location: this.GetType());
-                VirtualRoot.AddEventPath<ServerContextReInitedEventHandledEvent>("ServerContext的VM集刷新后刷新视图界面", LogEnum.DevConsole,
-                    action: message => {
+                VirtualRoot.BuildEventPath<ServerContextReInitedEventHandledEvent>("ServerContext的VM集刷新后刷新视图界面", LogEnum.DevConsole,
+                    path: message => {
                         OnPropertyChanged(nameof(AllPools));
                     }, location: this.GetType());
-                AddEventPath<PoolAddedEvent>("添加矿池后刷新VM内存", LogEnum.DevConsole,
-                    action: (message) => {
+                BuildEventPath<PoolAddedEvent>("添加矿池后刷新VM内存", LogEnum.DevConsole,
+                    path: (message) => {
                         _dicById.Add(message.Source.GetId(), new PoolViewModel(message.Source));
                         OnPropertyChanged(nameof(AllPools));
                         if (CoinVms.TryGetCoinVm(message.Source.CoinId, out CoinViewModel coinVm)) {
@@ -32,8 +32,8 @@ namespace NTMiner {
                             coinVm.OnPropertyChanged(nameof(CoinViewModel.OptionPools));
                         }
                     }, location: this.GetType());
-                AddEventPath<PoolRemovedEvent>("删除矿池后刷新VM内存", LogEnum.DevConsole,
-                    action: (message) => {
+                BuildEventPath<PoolRemovedEvent>("删除矿池后刷新VM内存", LogEnum.DevConsole,
+                    path: (message) => {
                         _dicById.Remove(message.Source.GetId());
                         OnPropertyChanged(nameof(AllPools));
                         if (CoinVms.TryGetCoinVm(message.Source.CoinId, out CoinViewModel coinVm)) {
@@ -43,8 +43,8 @@ namespace NTMiner {
                             coinVm.OnPropertyChanged(nameof(CoinViewModel.OptionPools));
                         }
                     }, location: this.GetType());
-                AddEventPath<PoolUpdatedEvent>("更新矿池后刷新VM内存", LogEnum.DevConsole,
-                    action: (message) => {
+                BuildEventPath<PoolUpdatedEvent>("更新矿池后刷新VM内存", LogEnum.DevConsole,
+                    path: (message) => {
                         if (_dicById.TryGetValue(message.Source.GetId(), out PoolViewModel vm)) {
                             vm.Update(message.Source);
                         }

+ 2 - 2
src/AppModels/AppRoot.partials.ShareViewModels.cs

@@ -12,8 +12,8 @@ namespace NTMiner {
                 if (WpfUtil.IsInDesignMode) {
                     return;
                 }
-                AddEventPath<ShareChangedEvent>("收益变更后调整VM内存", LogEnum.DevConsole,
-                    action: message => {
+                BuildEventPath<ShareChangedEvent>("收益变更后调整VM内存", LogEnum.DevConsole,
+                    path: message => {
                         if (_dicByCoinId.TryGetValue(message.Source.CoinId, out ShareViewModel shareVm)) {
                             shareVm.Update(message.Source);
                         }

+ 10 - 10
src/AppModels/AppRoot.partials.SysDicItemViewModels.cs

@@ -13,17 +13,17 @@ namespace NTMiner {
                 if (WpfUtil.IsInDesignMode) {
                     return;
                 }
-                VirtualRoot.AddEventPath<ServerContextReInitedEvent>("ServerContext刷新后刷新VM内存", LogEnum.DevConsole,
-                    action: message => {
+                VirtualRoot.BuildEventPath<ServerContextReInitedEvent>("ServerContext刷新后刷新VM内存", LogEnum.DevConsole,
+                    path: message => {
                         _dicById.Clear();
                         Init();
                     }, location: this.GetType());
-                VirtualRoot.AddEventPath<ServerContextReInitedEventHandledEvent>("ServerContext的VM集刷新后刷新视图界面", LogEnum.DevConsole,
-                    action: message => {
+                VirtualRoot.BuildEventPath<ServerContextReInitedEventHandledEvent>("ServerContext的VM集刷新后刷新视图界面", LogEnum.DevConsole,
+                    path: message => {
                         AllPropertyChanged();
                     }, location: this.GetType());
-                AddEventPath<SysDicItemAddedEvent>("添加了系统字典项后调整VM内存", LogEnum.DevConsole,
-                    action: (message) => {
+                BuildEventPath<SysDicItemAddedEvent>("添加了系统字典项后调整VM内存", LogEnum.DevConsole,
+                    path: (message) => {
                         if (!_dicById.ContainsKey(message.Source.GetId())) {
                             _dicById.Add(message.Source.GetId(), new SysDicItemViewModel(message.Source));
                             AllPropertyChanged();
@@ -33,8 +33,8 @@ namespace NTMiner {
                             }
                         }
                     }, location: this.GetType());
-                AddEventPath<SysDicItemUpdatedEvent>("更新了系统字典项后调整VM内存", LogEnum.DevConsole,
-                    action: (message) => {
+                BuildEventPath<SysDicItemUpdatedEvent>("更新了系统字典项后调整VM内存", LogEnum.DevConsole,
+                    path: (message) => {
                         if (_dicById.TryGetValue(message.Source.GetId(), out SysDicItemViewModel vm)) {
                             int sortNumber = vm.SortNumber;
                             vm.Update(message.Source);
@@ -46,8 +46,8 @@ namespace NTMiner {
                             }
                         }
                     }, location: this.GetType());
-                AddEventPath<SysDicItemRemovedEvent>("删除了系统字典项后调整VM内存", LogEnum.DevConsole,
-                    action: (message) => {
+                BuildEventPath<SysDicItemRemovedEvent>("删除了系统字典项后调整VM内存", LogEnum.DevConsole,
+                    path: (message) => {
                         _dicById.Remove(message.Source.GetId());
                         AllPropertyChanged();
                         if (SysDicVms.TryGetSysDicVm(message.Source.DicId, out SysDicViewModel sysDicVm)) {

+ 10 - 10
src/AppModels/AppRoot.partials.SysDicViewModels.cs

@@ -16,21 +16,21 @@ namespace NTMiner {
                 if (WpfUtil.IsInDesignMode) {
                     return;
                 }
-                VirtualRoot.AddEventPath<ServerContextReInitedEvent>("ServerContext刷新后刷新VM内存", LogEnum.DevConsole,
-                    action: message => {
+                VirtualRoot.BuildEventPath<ServerContextReInitedEvent>("ServerContext刷新后刷新VM内存", LogEnum.DevConsole,
+                    path: message => {
                         _dicByCode.Clear();
                         _dicById.Clear();
                         Init();
                     }, location: this.GetType());
-                VirtualRoot.AddEventPath<ServerContextReInitedEventHandledEvent>("ServerContext的VM集刷新后刷新视图界面", LogEnum.DevConsole,
-                    action: message => {
+                VirtualRoot.BuildEventPath<ServerContextReInitedEventHandledEvent>("ServerContext的VM集刷新后刷新视图界面", LogEnum.DevConsole,
+                    path: message => {
                         OnPropertyChangeds();
                     }, location: this.GetType());
                 this.Add = new DelegateCommand(() => {
                     new SysDicViewModel(Guid.NewGuid()).Edit.Execute(null);
                 });
-                AddEventPath<SysDicAddedEvent>("添加了系统字典后调整VM内存", LogEnum.DevConsole,
-                    action: (message) => {
+                BuildEventPath<SysDicAddedEvent>("添加了系统字典后调整VM内存", LogEnum.DevConsole,
+                    path: (message) => {
                         if (!_dicById.ContainsKey(message.Source.GetId())) {
                             SysDicViewModel sysDicVm = new SysDicViewModel(message.Source);
                             _dicById.Add(message.Source.GetId(), sysDicVm);
@@ -40,8 +40,8 @@ namespace NTMiner {
                             OnPropertyChangeds();
                         }
                     }, location: this.GetType());
-                AddEventPath<SysDicUpdatedEvent>("更新了系统字典后调整VM内存", LogEnum.DevConsole,
-                    action: (message) => {
+                BuildEventPath<SysDicUpdatedEvent>("更新了系统字典后调整VM内存", LogEnum.DevConsole,
+                    path: (message) => {
                         if (_dicById.TryGetValue(message.Source.GetId(), out SysDicViewModel vm)) {
                             int sortNumber = vm.SortNumber;
                             vm.Update(message.Source);
@@ -50,8 +50,8 @@ namespace NTMiner {
                             }
                         }
                     }, location: this.GetType());
-                AddEventPath<SysDicRemovedEvent>("删除了系统字典后调整VM内存", LogEnum.DevConsole,
-                    action: (message) => {
+                BuildEventPath<SysDicRemovedEvent>("删除了系统字典后调整VM内存", LogEnum.DevConsole,
+                    path: (message) => {
                         _dicById.Remove(message.Source.GetId());
                         _dicByCode.Remove(message.Source.Code);
                         OnPropertyChangeds();

+ 8 - 8
src/AppModels/AppRoot.partials.WalletViewModels.cs

@@ -12,13 +12,13 @@ namespace NTMiner {
                 if (WpfUtil.IsInDesignMode) {
                     return;
                 }
-                VirtualRoot.AddEventPath<LocalContextReInitedEvent>("LocalContext刷新后刷新钱包Vm内存", LogEnum.None,
-                    action: message=> {
+                VirtualRoot.BuildEventPath<LocalContextReInitedEvent>("LocalContext刷新后刷新钱包Vm内存", LogEnum.None,
+                    path: message=> {
                         _dicById.Clear();
                         Init();
                     }, location: this.GetType());
-                AddEventPath<WalletAddedEvent>("添加了钱包后调整VM内存", LogEnum.DevConsole,
-                    action: (message) => {
+                BuildEventPath<WalletAddedEvent>("添加了钱包后调整VM内存", LogEnum.DevConsole,
+                    path: (message) => {
                         _dicById.Add(message.Source.GetId(), new WalletViewModel(message.Source));
                         OnPropertyChanged(nameof(WalletList));
                         if (CoinVms.TryGetCoinVm(message.Source.CoinId, out CoinViewModel coin)) {
@@ -28,8 +28,8 @@ namespace NTMiner {
                         }
                         VirtualRoot.RaiseEvent(new WalletVmAddedEvent(message));
                     }, location: this.GetType());
-                AddEventPath<WalletRemovedEvent>("删除了钱包后调整VM内存", LogEnum.DevConsole,
-                    action: (message) => {
+                BuildEventPath<WalletRemovedEvent>("删除了钱包后调整VM内存", LogEnum.DevConsole,
+                    path: (message) => {
                         _dicById.Remove(message.Source.GetId());
                         OnPropertyChanged(nameof(WalletList));
                         if (CoinVms.TryGetCoinVm(message.Source.CoinId, out CoinViewModel coin)) {
@@ -40,8 +40,8 @@ namespace NTMiner {
                         }
                         VirtualRoot.RaiseEvent(new WalletVmRemovedEvent(message));
                     }, location: this.GetType());
-                AddEventPath<WalletUpdatedEvent>("更新了钱包后调整VM内存", LogEnum.DevConsole,
-                    action: (message) => {
+                BuildEventPath<WalletUpdatedEvent>("更新了钱包后调整VM内存", LogEnum.DevConsole,
+                    path: (message) => {
                         if (_dicById.TryGetValue(message.Source.GetId(), out WalletViewModel vm)) {
                             vm.Update(message.Source);
                         }

+ 1 - 1
src/AppModels/AppStatic.cs

@@ -844,7 +844,7 @@ namespace NTMiner {
         });
 
         public static ICommand DownloadMinerStudio { get; private set; } = new DelegateCommand(() => {
-            string url = "https://zhuanlan.zhihu.com/p/138095293";
+            string url = "https://www.cnblogs.com/ntminer/p/11923722.html";
             url = NTMinerContext.Instance.ServerContext.SysDicItemSet.TryGetDicItemValue(NTKeyword.ThisSystemSysDicCode, "DownloadMinerStudio", url);
             VirtualRoot.Execute(new UnTopmostCommand());
             Process.Start(url);

+ 1 - 1
src/AppModels/ExtendedNotifyIcon.cs

@@ -38,7 +38,7 @@ namespace NTMiner {
                     VirtualRoot.Execute(new ShowMainWindowCommand(isToggle: true));
                 }
             };
-            VirtualRoot.AddEventPath<AppExitEvent>("退出托盘图标", LogEnum.None, action: message => {
+            VirtualRoot.BuildEventPath<AppExitEvent>("退出托盘图标", LogEnum.None, path: message => {
                 _targetNotifyIcon.Dispose();
             }, typeof(ExtendedNotifyIcon));
         }

+ 18 - 18
src/AppModels/MinerStudio/Impl/LocalMinerStudioService.cs

@@ -115,7 +115,7 @@ namespace NTMiner.MinerStudio.Impl {
 
         #region EnableRemoteDesktopAsync
         public void EnableRemoteDesktopAsync(IMinerData client) {
-            JsonRpcRoot.PostAsync<ResponseBase>(client.GetLocalIp(), NTKeyword.NTMinerDaemonPort, _daemonControllerName, nameof(INTMinerDaemonController.EnableRemoteDesktop), null, null, timeountMilliseconds: 3000);
+            RpcRoot.JsonRpc.PostAsync<ResponseBase>(client.GetLocalIp(), NTKeyword.NTMinerDaemonPort, _daemonControllerName, nameof(INTMinerDaemonController.EnableRemoteDesktop), null, null, timeountMilliseconds: 3000);
         }
         #endregion
 
@@ -141,13 +141,13 @@ namespace NTMiner.MinerStudio.Impl {
 
         #region BlockWAUAsync
         public void BlockWAUAsync(IMinerData client) {
-            JsonRpcRoot.PostAsync<ResponseBase>(client.GetLocalIp(), NTKeyword.NTMinerDaemonPort, _daemonControllerName, nameof(INTMinerDaemonController.BlockWAU), null, null, timeountMilliseconds: 3000);
+            RpcRoot.JsonRpc.PostAsync<ResponseBase>(client.GetLocalIp(), NTKeyword.NTMinerDaemonPort, _daemonControllerName, nameof(INTMinerDaemonController.BlockWAU), null, null, timeountMilliseconds: 3000);
         }
         #endregion
 
         #region SwitchRadeonGpuAsync
         public void SwitchRadeonGpuAsync(IMinerData client, bool on) {
-            JsonRpcRoot.PostAsync<ResponseBase>(client.GetLocalIp(), NTKeyword.NTMinerDaemonPort, _daemonControllerName, nameof(INTMinerDaemonController.SwitchRadeonGpu), new Dictionary<string, string> {
+            RpcRoot.JsonRpc.PostAsync<ResponseBase>(client.GetLocalIp(), NTKeyword.NTMinerDaemonPort, _daemonControllerName, nameof(INTMinerDaemonController.SwitchRadeonGpu), new Dictionary<string, string> {
                 ["on"] = on.ToString()
             }, null, null, timeountMilliseconds: 3000);
         }
@@ -155,13 +155,13 @@ namespace NTMiner.MinerStudio.Impl {
 
         #region RestartWindowsAsync
         public void RestartWindowsAsync(IMinerData client) {
-            JsonRpcRoot.PostAsync<ResponseBase>(client.GetLocalIp(), NTKeyword.NTMinerDaemonPort, _daemonControllerName, nameof(INTMinerDaemonController.RestartWindows), new object(), null, timeountMilliseconds: 3000);
+            RpcRoot.JsonRpc.PostAsync<ResponseBase>(client.GetLocalIp(), NTKeyword.NTMinerDaemonPort, _daemonControllerName, nameof(INTMinerDaemonController.RestartWindows), new object(), null, timeountMilliseconds: 3000);
         }
         #endregion
 
         #region ShutdownWindowsAsync
         public void ShutdownWindowsAsync(IMinerData client) {
-            JsonRpcRoot.PostAsync<ResponseBase>(client.GetLocalIp(), NTKeyword.NTMinerDaemonPort, _daemonControllerName, nameof(INTMinerDaemonController.ShutdownWindows), new object(), null, timeountMilliseconds: 3000);
+            RpcRoot.JsonRpc.PostAsync<ResponseBase>(client.GetLocalIp(), NTKeyword.NTMinerDaemonPort, _daemonControllerName, nameof(INTMinerDaemonController.ShutdownWindows), new object(), null, timeountMilliseconds: 3000);
         }
         #endregion
 
@@ -171,13 +171,13 @@ namespace NTMiner.MinerStudio.Impl {
             UpgradeNTMinerRequest request = new UpgradeNTMinerRequest {
                 NTMinerFileName = ntminerFileName
             };
-            JsonRpcRoot.PostAsync<ResponseBase>(client.GetLocalIp(), NTKeyword.NTMinerDaemonPort, _daemonControllerName, nameof(INTMinerDaemonController.UpgradeNTMiner), request, null, timeountMilliseconds: 3000);
+            RpcRoot.JsonRpc.PostAsync<ResponseBase>(client.GetLocalIp(), NTKeyword.NTMinerDaemonPort, _daemonControllerName, nameof(INTMinerDaemonController.UpgradeNTMiner), request, null, timeountMilliseconds: 3000);
         }
         #endregion
 
         #region SetAutoBootStartAsync
         public void SetAutoBootStartAsync(IMinerData client, SetAutoBootStartRequest request) {
-            JsonRpcRoot.FirePostAsync(client.GetLocalIp(), NTKeyword.NTMinerDaemonPort, _daemonControllerName, nameof(INTMinerDaemonController.SetAutoBootStart), new Dictionary<string, string> {
+            RpcRoot.JsonRpc.FirePostAsync(client.GetLocalIp(), NTKeyword.NTMinerDaemonPort, _daemonControllerName, nameof(INTMinerDaemonController.SetAutoBootStart), new Dictionary<string, string> {
                 ["autoBoot"] = request.AutoBoot.ToString(),
                 ["autoStart"] = request.AutoStart.ToString()
             }, data: null, callback: null, timeountMilliseconds: 3000);
@@ -197,19 +197,19 @@ namespace NTMiner.MinerStudio.Impl {
                 LocalJson = localJson,
                 ServerJson = serverJson
             };
-            JsonRpcRoot.PostAsync<ResponseBase>(client.GetLocalIp(), NTKeyword.NTMinerDaemonPort, _daemonControllerName, nameof(INTMinerDaemonController.StartMine), request, null, timeountMilliseconds: 3000);
+            RpcRoot.JsonRpc.PostAsync<ResponseBase>(client.GetLocalIp(), NTKeyword.NTMinerDaemonPort, _daemonControllerName, nameof(INTMinerDaemonController.StartMine), request, null, timeountMilliseconds: 3000);
         }
         #endregion
 
         #region StopMineAsync
         public void StopMineAsync(IMinerData client) {
-            JsonRpcRoot.PostAsync<ResponseBase>(client.GetLocalIp(), NTKeyword.NTMinerDaemonPort, _daemonControllerName, nameof(INTMinerDaemonController.StopMine), new object(), null, timeountMilliseconds: 3000);
+            RpcRoot.JsonRpc.PostAsync<ResponseBase>(client.GetLocalIp(), NTKeyword.NTMinerDaemonPort, _daemonControllerName, nameof(INTMinerDaemonController.StopMine), new object(), null, timeountMilliseconds: 3000);
         }
         #endregion
 
         #region GetDrivesAsync
         public void GetDrivesAsync(IMinerData client) {
-            JsonRpcRoot.PostAsync<List<DriveDto>>(client.GetLocalIp(), NTKeyword.NTMinerDaemonPort, _daemonControllerName, nameof(INTMinerDaemonController.GetDrives), null, (data, e) => {
+            RpcRoot.JsonRpc.PostAsync<List<DriveDto>>(client.GetLocalIp(), NTKeyword.NTMinerDaemonPort, _daemonControllerName, nameof(INTMinerDaemonController.GetDrives), null, (data, e) => {
                 VirtualRoot.RaiseEvent(new GetDrivesResponsedEvent(client.ClientId, data));
             }, timeountMilliseconds: 3000);
         }
@@ -217,7 +217,7 @@ namespace NTMiner.MinerStudio.Impl {
 
         #region SetVirtualMemoryAsync
         public void SetVirtualMemoryAsync(IMinerData client, Dictionary<string, int> data) {
-            JsonRpcRoot.PostAsync<ResponseBase>(client.GetLocalIp(), NTKeyword.NTMinerDaemonPort, _daemonControllerName, nameof(INTMinerDaemonController.SetVirtualMemory), new DataRequest<Dictionary<string, int>> {
+            RpcRoot.JsonRpc.PostAsync<ResponseBase>(client.GetLocalIp(), NTKeyword.NTMinerDaemonPort, _daemonControllerName, nameof(INTMinerDaemonController.SetVirtualMemory), new DataRequest<Dictionary<string, int>> {
                 Data = data
             }, null, timeountMilliseconds: 3000);
         }
@@ -225,7 +225,7 @@ namespace NTMiner.MinerStudio.Impl {
 
         #region GetLocalIpsAsync
         public void GetLocalIpsAsync(IMinerData client) {
-            JsonRpcRoot.PostAsync<List<LocalIpDto>>(client.GetLocalIp(), NTKeyword.NTMinerDaemonPort, _daemonControllerName, nameof(INTMinerDaemonController.GetLocalIps), null, (data, e) => {
+            RpcRoot.JsonRpc.PostAsync<List<LocalIpDto>>(client.GetLocalIp(), NTKeyword.NTMinerDaemonPort, _daemonControllerName, nameof(INTMinerDaemonController.GetLocalIps), null, (data, e) => {
                 VirtualRoot.RaiseEvent(new GetLocalIpsResponsedEvent(client.ClientId, data));
             }, timeountMilliseconds: 3000);
         }
@@ -233,7 +233,7 @@ namespace NTMiner.MinerStudio.Impl {
 
         #region SetLocalIpsAsync
         public void SetLocalIpsAsync(IMinerData client, List<LocalIpInput> data) {
-            JsonRpcRoot.PostAsync<ResponseBase>(client.GetLocalIp(), NTKeyword.NTMinerDaemonPort, _daemonControllerName, nameof(INTMinerDaemonController.SetLocalIps), new DataRequest<List<LocalIpInput>> {
+            RpcRoot.JsonRpc.PostAsync<ResponseBase>(client.GetLocalIp(), NTKeyword.NTMinerDaemonPort, _daemonControllerName, nameof(INTMinerDaemonController.SetLocalIps), new DataRequest<List<LocalIpInput>> {
                 Data = data
             }, null, timeountMilliseconds: 3000);
         }
@@ -241,7 +241,7 @@ namespace NTMiner.MinerStudio.Impl {
 
         #region GetOperationResultsAsync
         public void GetOperationResultsAsync(IMinerData client, long afterTime) {
-            JsonRpcRoot.GetAsync<List<OperationResultData>>(client.GetLocalIp(), NTKeyword.NTMinerDaemonPort, _daemonControllerName, nameof(INTMinerDaemonController.GetOperationResults), new Dictionary<string, string> {
+            RpcRoot.JsonRpc.GetAsync<List<OperationResultData>>(client.GetLocalIp(), NTKeyword.NTMinerDaemonPort, _daemonControllerName, nameof(INTMinerDaemonController.GetOperationResults), new Dictionary<string, string> {
                 ["afterTime"] = afterTime.ToString()
             }, (data, e) => {
                 if (data != null && data.Count > 0) {
@@ -253,7 +253,7 @@ namespace NTMiner.MinerStudio.Impl {
 
         #region GetSelfWorkLocalJsonAsync
         public void GetSelfWorkLocalJsonAsync(IMinerData client) {
-            JsonRpcRoot.PostAsync<string>(client.GetLocalIp(), NTKeyword.NTMinerDaemonPort, _daemonControllerName, nameof(INTMinerDaemonController.GetSelfWorkLocalJson), null, (json, e) => {
+            RpcRoot.JsonRpc.PostAsync<string>(client.GetLocalIp(), NTKeyword.NTMinerDaemonPort, _daemonControllerName, nameof(INTMinerDaemonController.GetSelfWorkLocalJson), null, (json, e) => {
                 VirtualRoot.RaiseEvent(new GetSelfWorkLocalJsonResponsedEvent(client.ClientId, json));
             }, timeountMilliseconds: 3000);
         }
@@ -270,13 +270,13 @@ namespace NTMiner.MinerStudio.Impl {
                 LocalJson = localJson.Replace(NTKeyword.MinerNameParameterName, client.WorkerName),
                 ServerJson = serverJson
             };
-            JsonRpcRoot.FirePostAsync(client.GetLocalIp(), NTKeyword.NTMinerDaemonPort, _daemonControllerName, nameof(INTMinerDaemonController.SaveSelfWorkLocalJson), null, request, timeountMilliseconds: 3000);
+            RpcRoot.JsonRpc.FirePostAsync(client.GetLocalIp(), NTKeyword.NTMinerDaemonPort, _daemonControllerName, nameof(INTMinerDaemonController.SaveSelfWorkLocalJson), null, request, timeountMilliseconds: 3000);
         }
         #endregion
 
         #region GetGpuProfilesJsonAsync
         public void GetGpuProfilesJsonAsync(IMinerData client) {
-            JsonRpcRoot.PostAsync<string>(client.GetLocalIp(), NTKeyword.NTMinerDaemonPort, _daemonControllerName, nameof(INTMinerDaemonController.GetGpuProfilesJson), null, (json, e) => {
+            RpcRoot.JsonRpc.PostAsync<string>(client.GetLocalIp(), NTKeyword.NTMinerDaemonPort, _daemonControllerName, nameof(INTMinerDaemonController.GetGpuProfilesJson), null, (json, e) => {
                 GpuProfilesJsonDb data = VirtualRoot.JsonSerializer.Deserialize<GpuProfilesJsonDb>(json) ?? new GpuProfilesJsonDb();
                 VirtualRoot.RaiseEvent(new GetGpuProfilesResponsedEvent(client.ClientId, data));
             }, timeountMilliseconds: 3000);
@@ -286,7 +286,7 @@ namespace NTMiner.MinerStudio.Impl {
         #region SaveGpuProfilesJsonAsync
         public void SaveGpuProfilesJsonAsync(IMinerData client, string json) {
             HttpContent content = new StringContent(json);
-            HttpRpcRoot.FirePostAsync(client.GetLocalIp(), NTKeyword.NTMinerDaemonPort, _daemonControllerName, nameof(INTMinerDaemonController.SaveGpuProfilesJson), null, content, null, timeountMilliseconds: 3000);
+            RpcRoot.HttpRpcHelper.FirePostAsync(client.GetLocalIp(), NTKeyword.NTMinerDaemonPort, _daemonControllerName, nameof(INTMinerDaemonController.SaveGpuProfilesJson), null, content, null, timeountMilliseconds: 3000);
         }
         #endregion
     }

+ 3 - 3
src/AppModels/MinerStudio/MinerStudioRoot.partials.ColumnsShowViewModels.cs

@@ -45,8 +45,8 @@ namespace NTMiner.MinerStudio {
                         NTMinerContext.MinerStudioContext.ColumnsShowSet.AddOrUpdate(entity);
                     });
                 });
-                AppRoot.AddEventPath<ColumnsShowAddedOrUpdatedEvent>("添加或修改了列分组后刷新VM内存", LogEnum.DevConsole,
-                    action: message => {
+                AppRoot.BuildEventPath<ColumnsShowAddedOrUpdatedEvent>("添加或修改了列分组后刷新VM内存", LogEnum.DevConsole,
+                    path: message => {
                         if (!_dicById.TryGetValue(message.Source.GetId(), out ColumnsShowViewModel vm)) {
                             vm = new ColumnsShowViewModel(message.Source);
                             _dicById.Add(message.Source.GetId(), vm);
@@ -57,7 +57,7 @@ namespace NTMiner.MinerStudio {
                             vm.Update(message.Source);
                         }
                     }, location: this.GetType());
-                AppRoot.AddEventPath<ColumnsRemovedEvent>("删除了列分组后刷新Vm内存", LogEnum.DevConsole, action: message => {
+                AppRoot.BuildEventPath<ColumnsRemovedEvent>("删除了列分组后刷新Vm内存", LogEnum.DevConsole, path: message => {
                     if (_dicById.ContainsKey(message.Source.Id)) {
                         _dicById.Remove(message.Source.Id);
                         OnPropertyChanged(nameof(List));

+ 6 - 6
src/AppModels/MinerStudio/MinerStudioRoot.partials.MineWorkViewModels.cs

@@ -22,7 +22,7 @@ namespace NTMiner.MinerStudio {
                         _dicById.Add(item.Id, new MineWorkViewModel(item));
                     }
                 }
-                AppRoot.AddEventPath<MineWorkSetInitedEvent>("作业集初始化后初始化Vm内存", LogEnum.DevConsole, action: message => {
+                AppRoot.BuildEventPath<MineWorkSetInitedEvent>("作业集初始化后初始化Vm内存", LogEnum.DevConsole, path: message => {
                     _dicById.Clear();
                     foreach (var item in NTMinerContext.MinerStudioContext.MineWorkSet.AsEnumerable()) {
                         if (!_dicById.ContainsKey(item.Id)) {
@@ -35,8 +35,8 @@ namespace NTMiner.MinerStudio {
                 this.Add = new DelegateCommand(() => {
                     new MineWorkViewModel(Guid.NewGuid()).Edit.Execute(FormType.Add);
                 });
-                AppRoot.AddEventPath<MineWorkAddedEvent>("添加作业后刷新VM内存", LogEnum.DevConsole,
-                    action: message => {
+                AppRoot.BuildEventPath<MineWorkAddedEvent>("添加作业后刷新VM内存", LogEnum.DevConsole,
+                    path: message => {
                         if (!_dicById.TryGetValue(message.Source.GetId(), out MineWorkViewModel vm)) {
                             vm = new MineWorkViewModel(message.Source);
                             _dicById.Add(message.Source.GetId(), vm);
@@ -46,13 +46,13 @@ namespace NTMiner.MinerStudio {
                             }
                         }
                     }, location: this.GetType());
-                AppRoot.AddEventPath<MineWorkUpdatedEvent>("添加作业后刷新VM内存", LogEnum.DevConsole,
-                    action: message => {
+                AppRoot.BuildEventPath<MineWorkUpdatedEvent>("添加作业后刷新VM内存", LogEnum.DevConsole,
+                    path: message => {
                         if (_dicById.TryGetValue(message.Source.GetId(), out MineWorkViewModel vm)) {
                             vm.Update(message.Source);
                         }
                     }, location: this.GetType());
-                AppRoot.AddEventPath<MineWorkRemovedEvent>("移除了作业后刷新Vm内存", LogEnum.DevConsole, action: message => {
+                AppRoot.BuildEventPath<MineWorkRemovedEvent>("移除了作业后刷新Vm内存", LogEnum.DevConsole, path: message => {
                     if (_dicById.TryGetValue(message.Source.Id, out MineWorkViewModel vm)) {
                         _dicById.Remove(vm.Id);
                         OnPropertyChangeds();

+ 4 - 4
src/AppModels/MinerStudio/MinerStudioRoot.partials.MinerClientConsoleViewModel.cs

@@ -34,7 +34,7 @@ namespace NTMiner.MinerStudio {
 
             public MinerClientConsoleViewModel() {
                 if (ClientAppType.IsMinerStudio) {
-                    VirtualRoot.AddEventPath<MinerClientSelectionChangedEvent>("矿机列表页选中了和上次选中的不同的矿机时刷新矿机控制台输出", LogEnum.DevConsole, action: message => {
+                    VirtualRoot.BuildEventPath<MinerClientSelectionChangedEvent>("矿机列表页选中了和上次选中的不同的矿机时刷新矿机控制台输出", LogEnum.DevConsole, path: message => {
                         bool isChanged = true;
                         if (message.MinerClientVm != null && this._minerClientVm != null && this._minerClientVm.ClientId == message.MinerClientVm.ClientId) {
                             isChanged = false;
@@ -53,7 +53,7 @@ namespace NTMiner.MinerStudio {
                             SendGetConsoleOutLinesMqMessage();
                         }
                     }, this.GetType());
-                    VirtualRoot.AddEventPath<ClientConsoleOutLinesEvent>("收到了挖矿端控制台消息", LogEnum.DevConsole, action: message => {
+                    VirtualRoot.BuildEventPath<ClientConsoleOutLinesEvent>("收到了挖矿端控制台消息", LogEnum.DevConsole, path: message => {
                         if (this._minerClientVm == null
                             || this._minerClientVm.ClientId != message.ClientId
                             || message.Data == null
@@ -69,10 +69,10 @@ namespace NTMiner.MinerStudio {
                             LatestTimestamp = DateTime.Now;
                         }
                     }, this.GetType());
-                    VirtualRoot.AddEventPath<Per5SecondEvent>("周期获取当前选中的那台矿机的控制台输出", LogEnum.DevConsole, action: message => {
+                    VirtualRoot.BuildEventPath<Per5SecondEvent>("周期获取当前选中的那台矿机的控制台输出", LogEnum.DevConsole, path: message => {
                         SendGetConsoleOutLinesMqMessage();
                     }, this.GetType());
-                    VirtualRoot.AddEventPath<Per1SecondEvent>("客户端控制台输出倒计时秒表", LogEnum.None, action: message => {
+                    VirtualRoot.BuildEventPath<Per1SecondEvent>("客户端控制台输出倒计时秒表", LogEnum.None, path: message => {
                         if (this._minerClientVm == null || this._latestTimestamp == Timestamp.UnixBaseTime) {
                             return;
                         }

+ 4 - 4
src/AppModels/MinerStudio/MinerStudioRoot.partials.MinerClientMessagesViewModel.cs

@@ -22,7 +22,7 @@ namespace NTMiner.MinerStudio {
                     return;
                 }
                 if (ClientAppType.IsMinerStudio) {
-                    VirtualRoot.AddEventPath<MinerClientSelectionChangedEvent>("矿机列表页选中了和上次选中的不同的矿机时刷新矿机消息列表", LogEnum.DevConsole, action: message => {
+                    VirtualRoot.BuildEventPath<MinerClientSelectionChangedEvent>("矿机列表页选中了和上次选中的不同的矿机时刷新矿机消息列表", LogEnum.DevConsole, path: message => {
                         bool isChanged = true;
                         if (message.MinerClientVm != null && this._minerClientVm != null && this._minerClientVm.ClientId == message.MinerClientVm.ClientId) {
                             isChanged = false;
@@ -36,8 +36,8 @@ namespace NTMiner.MinerStudio {
                             SendGetLocalMessagesMqMessage();
                         }
                     }, this.GetType());
-                    VirtualRoot.AddEventPath<ClientLocalMessagesEvent>("收到了挖矿端本地消息", LogEnum.DevConsole,
-                        action: message => {
+                    VirtualRoot.BuildEventPath<ClientLocalMessagesEvent>("收到了挖矿端本地消息", LogEnum.DevConsole,
+                        path: message => {
                             if (this._minerClientVm == null || this._minerClientVm.ClientId != message.ClientId) {
                                 return;
                             }
@@ -51,7 +51,7 @@ namespace NTMiner.MinerStudio {
                                 OnPropertyChanged(nameof(IsNoRecord));
                             });
                         }, location: this.GetType());
-                    VirtualRoot.AddEventPath<Per5SecondEvent>("周期获取当前选中的那台矿机的本地消息", LogEnum.DevConsole, action: message => {
+                    VirtualRoot.BuildEventPath<Per5SecondEvent>("周期获取当前选中的那台矿机的本地消息", LogEnum.DevConsole, path: message => {
                         SendGetLocalMessagesMqMessage();
                     }, this.GetType());
                 }

+ 6 - 6
src/AppModels/MinerStudio/MinerStudioRoot.partials.MinerClientOperationResultsViewModel.cs

@@ -26,7 +26,7 @@ namespace NTMiner.MinerStudio {
                     return;
                 }
                 if (ClientAppType.IsMinerStudio) {
-                    VirtualRoot.AddEventPath<MinerClientSelectionChangedEvent>("矿机列表页选中了和上次选中的不同的矿机时刷新矿机本地群控响应消息列表", LogEnum.DevConsole, action: message => {
+                    VirtualRoot.BuildEventPath<MinerClientSelectionChangedEvent>("矿机列表页选中了和上次选中的不同的矿机时刷新矿机本地群控响应消息列表", LogEnum.DevConsole, path: message => {
                         bool isChanged = true;
                         if (message.MinerClientVm != null && this._minerClientVm != null && this._minerClientVm.ClientId == message.MinerClientVm.ClientId) {
                             isChanged = false;
@@ -46,8 +46,8 @@ namespace NTMiner.MinerStudio {
                             SendGetOperationResultsMqMessage();
                         }
                     }, this.GetType());
-                    VirtualRoot.AddEventPath<ClientOperationResultsEvent>("收到了挖矿端本地群控响应消息", LogEnum.DevConsole,
-                        action: message => {
+                    VirtualRoot.BuildEventPath<ClientOperationResultsEvent>("收到了挖矿端本地群控响应消息", LogEnum.DevConsole,
+                        path: message => {
                             if (this._minerClientVm == null || this._minerClientVm.ClientId != message.ClientId) {
                                 return;
                             }
@@ -63,13 +63,13 @@ namespace NTMiner.MinerStudio {
                                 OnPropertyChanged(nameof(IsNoRecord));
                             });
                         }, location: this.GetType());
-                    VirtualRoot.AddEventPath<ClientOperationReceivedEvent>("收到了挖矿端群控响应了群控操作的通知", LogEnum.DevConsole,
-                        action: message => {
+                    VirtualRoot.BuildEventPath<ClientOperationReceivedEvent>("收到了挖矿端群控响应了群控操作的通知", LogEnum.DevConsole,
+                        path: message => {
                             if (_minerClientVm != null && _minerClientVm.ClientId == message.ClientId) {
                                 SendGetOperationResultsMqMessage();
                             }
                         }, location: this.GetType());
-                    VirtualRoot.AddEventPath<Per5SecondEvent>("周期获取当前选中的那台矿机的本地群控响应消息", LogEnum.DevConsole, action: message => {
+                    VirtualRoot.BuildEventPath<Per5SecondEvent>("周期获取当前选中的那台矿机的本地群控响应消息", LogEnum.DevConsole, path: message => {
                         SendGetOperationResultsMqMessage();
                     }, this.GetType());
                 }

+ 6 - 6
src/AppModels/MinerStudio/MinerStudioRoot.partials.MinerGroupViewModels.cs

@@ -22,7 +22,7 @@ namespace NTMiner.MinerStudio {
                         _dicById.Add(item.Id, new MinerGroupViewModel(item));
                     }
                 }
-                AppRoot.AddEventPath<MinerGroupSetInitedEvent>("矿工组集初始化后初始化Vm内存", LogEnum.DevConsole, action: message => {
+                AppRoot.BuildEventPath<MinerGroupSetInitedEvent>("矿工组集初始化后初始化Vm内存", LogEnum.DevConsole, path: message => {
                     _dicById.Clear();
                     foreach (var item in NTMinerContext.MinerStudioContext.MinerGroupSet.AsEnumerable()) {
                         if (!_dicById.ContainsKey(item.Id)) {
@@ -35,8 +35,8 @@ namespace NTMiner.MinerStudio {
                 this.Add = new DelegateCommand(() => {
                     new MinerGroupViewModel(Guid.NewGuid()).Edit.Execute(FormType.Add);
                 });
-                AppRoot.AddEventPath<MinerGroupAddedEvent>("添加矿机分组后刷新VM内存", LogEnum.DevConsole,
-                    action: message => {
+                AppRoot.BuildEventPath<MinerGroupAddedEvent>("添加矿机分组后刷新VM内存", LogEnum.DevConsole,
+                    path: message => {
                         if (!_dicById.TryGetValue(message.Source.GetId(), out MinerGroupViewModel vm)) {
                             vm = new MinerGroupViewModel(message.Source);
                             _dicById.Add(message.Source.GetId(), vm);
@@ -44,13 +44,13 @@ namespace NTMiner.MinerStudio {
                             MinerClientsWindowVm.OnPropertyChanged(nameof(MinerClientsWindowViewModel.SelectedMinerGroup));
                         }
                     }, location: this.GetType());
-                AppRoot.AddEventPath<MinerGroupUpdatedEvent>("添加矿机分组后刷新VM内存", LogEnum.DevConsole,
-                    action: message => {
+                AppRoot.BuildEventPath<MinerGroupUpdatedEvent>("添加矿机分组后刷新VM内存", LogEnum.DevConsole,
+                    path: message => {
                         if (_dicById.TryGetValue(message.Source.GetId(), out MinerGroupViewModel vm)) {
                             vm.Update(message.Source);
                         }
                     }, location: this.GetType());
-                AppRoot.AddEventPath<MinerGroupRemovedEvent>("移除了矿机组后刷新Vm内容", LogEnum.DevConsole, action: message => {
+                AppRoot.BuildEventPath<MinerGroupRemovedEvent>("移除了矿机组后刷新Vm内容", LogEnum.DevConsole, path: message => {
                     if (_dicById.TryGetValue(message.Source.Id, out MinerGroupViewModel vm)) {
                         _dicById.Remove(vm.Id);
                         OnPropertyChangeds();

+ 8 - 8
src/AppModels/MinerStudio/MinerStudioRoot.partials.NTMinerWalletViewModels.cs

@@ -17,15 +17,15 @@ namespace NTMiner.MinerStudio {
                     return;
                 }
                 Init(refresh: false);
-                AppRoot.AddEventPath<NTMinerWalletSetInitedEvent>("NTMiner钱包集初始化后", LogEnum.DevConsole,
-                    action: message => {
+                AppRoot.BuildEventPath<NTMinerWalletSetInitedEvent>("NTMiner钱包集初始化后", LogEnum.DevConsole,
+                    path: message => {
                         Init(refresh: true);
                     }, location: this.GetType());
                 this.Add = new DelegateCommand(() => {
                     new NTMinerWalletViewModel(Guid.NewGuid()).Edit.Execute(FormType.Add);
                 });
-                AppRoot.AddEventPath<NTMinerWalletAddedEvent>("添加NTMiner钱包后刷新VM内存", LogEnum.DevConsole,
-                    action: message => {
+                AppRoot.BuildEventPath<NTMinerWalletAddedEvent>("添加NTMiner钱包后刷新VM内存", LogEnum.DevConsole,
+                    path: message => {
                         if (!_dicById.ContainsKey(message.Source.GetId())) {
                             _dicById.Add(message.Source.GetId(), new NTMinerWalletViewModel(message.Source));
                             if (AppRoot.CoinVms.TryGetCoinVm(message.Source.CoinCode, out CoinViewModel coinVm)) {
@@ -33,14 +33,14 @@ namespace NTMiner.MinerStudio {
                             }
                         }
                     }, location: this.GetType());
-                AppRoot.AddEventPath<NTMinerWalletUpdatedEvent>("更新NTMiner钱包后刷新VM内存", LogEnum.DevConsole,
-                    action: message => {
+                AppRoot.BuildEventPath<NTMinerWalletUpdatedEvent>("更新NTMiner钱包后刷新VM内存", LogEnum.DevConsole,
+                    path: message => {
                         if (_dicById.TryGetValue(message.Source.GetId(), out NTMinerWalletViewModel vm)) {
                             vm.Update(message.Source);
                         }
                     }, location: this.GetType());
-                AppRoot.AddEventPath<NTMinerWalletRemovedEvent>("删除NTMiner钱包后刷新VM内存", LogEnum.DevConsole,
-                    action: message => {
+                AppRoot.BuildEventPath<NTMinerWalletRemovedEvent>("删除NTMiner钱包后刷新VM内存", LogEnum.DevConsole,
+                    path: message => {
                         _dicById.Remove(message.Source.GetId());
                         if (AppRoot.CoinVms.TryGetCoinVm(message.Source.CoinCode, out CoinViewModel coinVm)) {
                             coinVm.OnPropertyChanged(nameof(coinVm.NTMinerWallets));

+ 8 - 8
src/AppModels/MinerStudio/MinerStudioRoot.partials.OverClockDataViewModels.cs

@@ -14,12 +14,12 @@ namespace NTMiner.MinerStudio {
                     return;
                 }
                 Init(refresh: false);
-                AppRoot.AddEventPath<OverClockDataSetInitedEvent>("超频菜谱集初始化后", LogEnum.DevConsole,
-                    action: message => {
+                AppRoot.BuildEventPath<OverClockDataSetInitedEvent>("超频菜谱集初始化后", LogEnum.DevConsole,
+                    path: message => {
                         Init(refresh: true);
                     }, location: this.GetType());
-                AppRoot.AddEventPath<OverClockDataAddedEvent>("添加超频菜谱后刷新VM内存", LogEnum.DevConsole,
-                    action: message => {
+                AppRoot.BuildEventPath<OverClockDataAddedEvent>("添加超频菜谱后刷新VM内存", LogEnum.DevConsole,
+                    path: message => {
                         if (!_dicById.ContainsKey(message.Source.GetId())) {
                             _dicById.Add(message.Source.GetId(), new OverClockDataViewModel(message.Source));
                             if (AppRoot.CoinVms.TryGetCoinVm(message.Source.CoinId, out CoinViewModel coinVm)) {
@@ -27,14 +27,14 @@ namespace NTMiner.MinerStudio {
                             }
                         }
                     }, location: this.GetType());
-                AppRoot.AddEventPath<OverClockDataUpdatedEvent>("更新超频菜谱后刷新VM内存", LogEnum.DevConsole,
-                    action: message => {
+                AppRoot.BuildEventPath<OverClockDataUpdatedEvent>("更新超频菜谱后刷新VM内存", LogEnum.DevConsole,
+                    path: message => {
                         if (_dicById.TryGetValue(message.Source.GetId(), out OverClockDataViewModel vm)) {
                             vm.Update(message.Source);
                         }
                     }, location: this.GetType());
-                AppRoot.AddEventPath<OverClockDataRemovedEvent>("删除超频菜谱后刷新VM内存", LogEnum.DevConsole,
-                    action: message => {
+                AppRoot.BuildEventPath<OverClockDataRemovedEvent>("删除超频菜谱后刷新VM内存", LogEnum.DevConsole,
+                    path: message => {
                         _dicById.Remove(message.Source.GetId());
                         if (AppRoot.CoinVms.TryGetCoinVm(message.Source.CoinId, out CoinViewModel coinVm)) {
                             coinVm.OnPropertyChanged(nameof(coinVm.OverClockDatas));

+ 1 - 1
src/AppModels/MinerStudio/Vms/MineWorkViewModel.cs

@@ -104,7 +104,7 @@ namespace NTMiner.MinerStudio.Vms {
                             VirtualRoot.Out.ShowError("无法操作,因为选中的矿机未开启外网群控。", autoHideSeconds: 6);
                             return;
                         }
-                        VirtualRoot.AddOnecePath<GetSelfWorkLocalJsonResponsedEvent>("获取到响应结果后填充Vm内存", LogEnum.DevConsole, action: message => {
+                        VirtualRoot.BuildOnecePath<GetSelfWorkLocalJsonResponsedEvent>("获取到响应结果后填充Vm内存", LogEnum.DevConsole, path: message => {
                             if (message.ClientId == _minerClientVm.ClientId) {
                                 string data = message.Data;
                                 EditJson(formType, WorkType.SelfWork, data);

+ 5 - 5
src/AppModels/MinerStudio/Vms/MinerClientsWindowViewModel.cs

@@ -175,7 +175,7 @@ namespace NTMiner.MinerStudio.Vms {
         }
 
         private void AddEventPath() {
-            VirtualRoot.AddEventPath<QueryClientsResponseEvent>("收到QueryClientsResponse响应后刷新界面", LogEnum.DevConsole, action: message => {
+            VirtualRoot.BuildEventPath<QueryClientsResponseEvent>("收到QueryClientsResponse响应后刷新界面", LogEnum.DevConsole, path: message => {
                 this.CountDown = 10;
                 this.IsLoading = false;
                 var response = message.Response;
@@ -800,18 +800,18 @@ namespace NTMiner.MinerStudio.Vms {
                     RpcRoot.SetIsOuterNet(false);
                 }
             });
-            VirtualRoot.AddEventPath<MinerStudioServiceSwitchedEvent>("切换了群控后台客户端服务类型后刷新矿机列表", LogEnum.DevConsole, action: message => {
+            VirtualRoot.BuildEventPath<MinerStudioServiceSwitchedEvent>("切换了群控后台客户端服务类型后刷新矿机列表", LogEnum.DevConsole, path: message => {
                 this.OnPropertyChanged(nameof(NetTypeToolTip));
                 this.OnPropertyChanged(nameof(NetTypeText));
                 this.QueryMinerClients();
             }, this.GetType());
-            VirtualRoot.AddCmdPath<UpdateMinerClientVmCommand>(action: message => {
+            VirtualRoot.BuildCmdPath<UpdateMinerClientVmCommand>(path: message => {
                 var vm = _minerClients.FirstOrDefault(a => a.Id == message.ClientData.Id);
                 if (vm != null) {
                     vm.Update(message.ClientData);
                 }
             }, this.GetType(), LogEnum.DevConsole);
-            VirtualRoot.AddCmdPath<RefreshWsStateCommand>(message => {
+            VirtualRoot.BuildCmdPath<RefreshWsStateCommand>(message => {
                 #region
                 if (message.WsClientState != null) {
                     this.IsWsOnline = message.WsClientState.Status == WsClientStatus.Open;
@@ -835,7 +835,7 @@ namespace NTMiner.MinerStudio.Vms {
             if (RpcRoot.IsOuterNet) {
                 VirtualRoot.Execute(new RefreshWsStateCommand(MinerStudioRoot.WsClient.GetState()));
             }
-            VirtualRoot.AddEventPath<Per1SecondEvent>("外网群控重试秒表倒计时", LogEnum.None, action: message => {
+            VirtualRoot.BuildEventPath<Per1SecondEvent>("外网群控重试秒表倒计时", LogEnum.None, path: message => {
                 if (!IsWsOnline) {
                     if (WsNextTrySecondsDelay > 0) {
                         WsNextTrySecondsDelay--;

+ 33 - 0
src/AppModels/MinerStudio/Vms/WebApiServerStateViewModel.cs

@@ -11,7 +11,9 @@ namespace NTMiner.MinerStudio.Vms {
         private ulong _totalPhysicalMemory;
         private string _address;
         private double _cpuPerformance;
+        private double _processPerformance;
         private ulong _availablePhysicalMemory;
+        private ulong _workingSet;
         private CpuData _cpu;
         private CpuDataViewModel _cpuVm;
         private List<WsServerNodeState> _wsServerNodes;
@@ -23,7 +25,9 @@ namespace NTMiner.MinerStudio.Vms {
             _totalPhysicalMemory = data.TotalPhysicalMemory;
             _address = data.Address;
             _cpuPerformance = data.CpuPerformance;
+            _processPerformance = data.ProcessPerformance;
             _availablePhysicalMemory = data.AvailablePhysicalMemory;
+            _workingSet = data.WorkingSet;
             _cpu = data.Cpu;
             _cpuVm = new CpuDataViewModel(data.Cpu);
             _wsServerNodes = data.WsServerNodes;
@@ -36,7 +40,9 @@ namespace NTMiner.MinerStudio.Vms {
             this.TotalPhysicalMemory = data.TotalPhysicalMemory;
             this.Address = data.Address;
             this.CpuPerformance = data.CpuPerformance;
+            this.ProcessPerformance = data.ProcessPerformance;
             this.AvailablePhysicalMemory = data.AvailablePhysicalMemory;
+            this.WorkingSet = data.WorkingSet;
             this.Cpu = data.Cpu;
             this.WsServerNodes = data.WsServerNodes;
         }
@@ -156,6 +162,23 @@ namespace NTMiner.MinerStudio.Vms {
             }
         }
 
+        public double ProcessPerformance {
+            get => _processPerformance;
+            set {
+                if (_processPerformance != value) {
+                    _processPerformance = value;
+                    OnPropertyChanged(nameof(ProcessPerformance));
+                    OnPropertyChanged(nameof(ProcessPerformanceText));
+                }
+            }
+        }
+
+        public string ProcessPerformanceText {
+            get {
+                return this.ProcessPerformance.ToString("f1") + " %";
+            }
+        }
+
         public ulong AvailablePhysicalMemory {
             get => _availablePhysicalMemory;
             set {
@@ -165,5 +188,15 @@ namespace NTMiner.MinerStudio.Vms {
                 }
             }
         }
+
+        public ulong WorkingSet {
+            get => _workingSet;
+            set {
+                if (_workingSet != value) {
+                    _workingSet = value;
+                    OnPropertyChanged(nameof(WorkingSet));
+                }
+            }
+        }
     }
 }

+ 33 - 0
src/AppModels/MinerStudio/Vms/WsServerNodeStateViewModel.cs

@@ -13,7 +13,9 @@ namespace NTMiner.MinerStudio.Vms {
         private string _osInfo;
         private ulong _totalPhysicalMemory;
         private double _cpuPerformance;
+        private double _processPerformance;
         private ulong _availablePhysicalMemory;
+        private ulong _workingSet;
         private CpuData _cpu;
         private CpuDataViewModel _cpuVm;
 
@@ -35,6 +37,8 @@ namespace NTMiner.MinerStudio.Vms {
             _totalPhysicalMemory = data.TotalPhysicalMemory;
             _availablePhysicalMemory = data.AvailablePhysicalMemory;
             _cpuPerformance = data.CpuPerformance;
+            _processPerformance = data.ProcessPerformance;
+            _workingSet = data.WorkingSet;
             _cpu = data.Cpu;
             _cpuVm = new CpuDataViewModel(data.Cpu);
         }
@@ -48,7 +52,9 @@ namespace NTMiner.MinerStudio.Vms {
             this.MinerClientSessionCount = data.MinerClientSessionCount;
             this.MinerStudioSessionCount = data.MinerStudioSessionCount;
             this.CpuPerformance = data.CpuPerformance;
+            this.ProcessPerformance = data.ProcessPerformance;
             this.AvailablePhysicalMemory = data.AvailablePhysicalMemory;
+            this.WorkingSet = data.WorkingSet;
         }
 
         public string Address {
@@ -170,6 +176,23 @@ namespace NTMiner.MinerStudio.Vms {
             }
         }
 
+        public double ProcessPerformance {
+            get => _processPerformance;
+            set {
+                if (_processPerformance != value) {
+                    _processPerformance = value;
+                    OnPropertyChanged(nameof(ProcessPerformance));
+                    OnPropertyChanged(nameof(ProcessPerformanceText));
+                }
+            }
+        }
+
+        public string ProcessPerformanceText {
+            get {
+                return this.ProcessPerformance.ToString("f1") + " %";
+            }
+        }
+
         public ulong AvailablePhysicalMemory {
             get => _availablePhysicalMemory;
             set {
@@ -179,5 +202,15 @@ namespace NTMiner.MinerStudio.Vms {
                 }
             }
         }
+
+        public ulong WorkingSet {
+            get => _workingSet;
+            set {
+                if (_workingSet != value) {
+                    _workingSet = value;
+                    OnPropertyChanged(nameof(WorkingSet));
+                }
+            }
+        }
     }
 }

+ 1 - 1
src/AppModels/View/AbstractAppViewFactory.cs

@@ -8,7 +8,7 @@ namespace NTMiner.View {
         private static Window _mainWindow = null;
 
         public AbstractAppViewFactory() {
-            VirtualRoot.AddCmdPath<CloseNTMinerCommand>(action: message => {
+            VirtualRoot.BuildCmdPath<CloseNTMinerCommand>(path: message => {
                 // 不能推迟这个日志记录的时机,因为推迟会有windows异常日志
                 VirtualRoot.ThisLocalInfo(nameof(AbstractAppViewFactory), $"退出{VirtualRoot.AppName}。原因:{message.Reason}");
                 UIThread.Execute(() => {

+ 2 - 2
src/AppModels/Vms/KernelOutputKeywordsViewModel.cs

@@ -12,8 +12,8 @@ namespace NTMiner.Vms {
             if (WpfUtil.IsInDesignMode) {
                 return;
             }
-            VirtualRoot.AddEventPath<CurrentMineContextChangedEvent>("挖矿上下文变更后刷新内核输出关键字Vm视图集", LogEnum.DevConsole,
-                action: message => {
+            VirtualRoot.BuildEventPath<CurrentMineContextChangedEvent>("挖矿上下文变更后刷新内核输出关键字Vm视图集", LogEnum.DevConsole,
+                path: message => {
                     OnPropertyChanged(nameof(KernelOutputVm));
                 }, location: this.GetType());
             this.Add = new DelegateCommand(() => {

+ 6 - 6
src/AppModels/Vms/LocalMessagesViewModel.cs

@@ -70,12 +70,12 @@
                     VirtualRoot.Execute(new ClearLocalMessageSetCommand());
                 }));
             });
-            VirtualRoot.AddEventPath<LocalMessageSetClearedEvent>("清空本地消息集后刷新VM内存", LogEnum.DevConsole,
-                action: message => {
+            VirtualRoot.BuildEventPath<LocalMessageSetClearedEvent>("清空本地消息集后刷新VM内存", LogEnum.DevConsole,
+                path: message => {
                     Init();
                 }, location: this.GetType());
-            VirtualRoot.AddEventPath<LocalMessageAddedEvent>("发生了本地消息后刷新Vm内存", LogEnum.DevConsole,
-                action: message => {
+            VirtualRoot.BuildEventPath<LocalMessageAddedEvent>("发生了本地消息后刷新Vm内存", LogEnum.DevConsole,
+                path: message => {
                     UIThread.Execute(() => {
                         var vm = new LocalMessageViewModel(message.Source);
                         _localMessageVms.Insert(0, vm);
@@ -99,8 +99,8 @@
                         OnPropertyChanged(nameof(IsNoRecord));
                     });
                 }, location: this.GetType());
-            VirtualRoot.AddEventPath<NewDayEvent>("新的一天到来时刷新消息集中的可读性时间戳展示", LogEnum.DevConsole,
-                action: message => {
+            VirtualRoot.BuildEventPath<NewDayEvent>("新的一天到来时刷新消息集中的可读性时间戳展示", LogEnum.DevConsole,
+                path: message => {
                     if (QueryResults == null) {
                         return;
                     }

+ 1 - 1
src/AppModels/Vms/MainMenuViewModel.cs

@@ -10,7 +10,7 @@ namespace NTMiner.Vms {
             if (WpfUtil.IsInDesignMode) {
                 return;
             }
-            VirtualRoot.AddEventPath<MinerStudioServiceSwitchedEvent>("群控后台客户端服务类型切换后刷新菜单的展示状态", LogEnum.DevConsole, action: message => {
+            VirtualRoot.BuildEventPath<MinerStudioServiceSwitchedEvent>("群控后台客户端服务类型切换后刷新菜单的展示状态", LogEnum.DevConsole, path: message => {
                 this.OnPropertyChanged(nameof(LoginName));
                 this.OnPropertyChanged(nameof(IsMinerStudioLocalOrOuterAdminVisible));
                 this.OnPropertyChanged(nameof(IsMinerStudioOuterAdmin));

+ 0 - 11
src/AppModels/Vms/MainWindowViewModel.cs

@@ -5,7 +5,6 @@ using System.Windows.Input;
 
 namespace NTMiner.Vms {
     public class MainWindowViewModel : ViewModelBase {
-        public ICommand UseThisPcName { get; private set; }
         public ICommand CloseMainWindow { get; private set; }
 
         public MainWindowViewModel() {
@@ -15,16 +14,6 @@ namespace NTMiner.Vms {
             this.CloseMainWindow = new DelegateCommand(() => {
                 VirtualRoot.Execute(new CloseMainWindowCommand(isAutoNoUi: false));
             });
-            this.UseThisPcName = new DelegateCommand(() => {
-                if (MinerProfile.IsMining) {
-                    VirtualRoot.Out.ShowWarn("请先停止挖矿", header: "提示", autoHideSeconds: 3);
-                    return;
-                }
-                string thisPcName = NTMinerContext.ThisPcName;
-                this.ShowSoftDialog(new DialogWindowViewModel(message: $"确定使用本机名{thisPcName}作为矿机名吗?", title: "确认", onYes: () => {
-                    MinerProfile.MinerName = thisPcName;
-                }));
-            });
         }
 
         public bool IsTestHost {

+ 54 - 14
src/AppModels/Vms/MinerProfileViewModel.cs

@@ -48,17 +48,20 @@ namespace NTMiner.Vms {
                 IsConnecting = true;
             });
             if (ClientAppType.IsMinerClient) {
-                VirtualRoot.AddCmdPath<SetAutoStartCommand>(message => {
+                if (this.IsSystemName) {
+                    this.MinerName = NTKeyword.GetSafeMinerName(NTMinerContext.ThisPcName);
+                }
+                VirtualRoot.BuildCmdPath<SetAutoStartCommand>(message => {
                     this.IsAutoStart = message.IsAutoStart;
                     this.IsAutoBoot = message.IsAutoBoot;
                 }, this.GetType(), LogEnum.None);
-                VirtualRoot.AddEventPath<StartingMineFailedEvent>("开始挖矿失败", LogEnum.DevConsole,
-                    action: message => {
+                VirtualRoot.BuildEventPath<StartingMineFailedEvent>("开始挖矿失败", LogEnum.DevConsole,
+                    path: message => {
                         IsMining = false;
                         NTMinerConsole.UserError(message.Message);
                     }, location: this.GetType());
                 // 群控客户端已经有一个执行RefreshWsStateCommand命令的路径了
-                VirtualRoot.AddCmdPath<RefreshWsStateCommand>(message => {
+                VirtualRoot.BuildCmdPath<RefreshWsStateCommand>(message => {
                     #region
                     if (message.WsClientState != null) {
                         this.IsWsOnline = message.WsClientState.Status == WsClientStatus.Open;
@@ -79,7 +82,7 @@ namespace NTMiner.Vms {
                     }
                     #endregion
                 }, this.GetType(), LogEnum.DevConsole);
-                VirtualRoot.AddEventPath<Per1SecondEvent>("外网群控重试秒表倒计时", LogEnum.None, action: message => {
+                VirtualRoot.BuildEventPath<Per1SecondEvent>("外网群控重试秒表倒计时", LogEnum.None, path: message => {
                     if (IsOuterUserEnabled && !IsWsOnline) {
                         if (WsNextTrySecondsDelay > 0) {
                             WsNextTrySecondsDelay--;
@@ -90,7 +93,7 @@ namespace NTMiner.Vms {
                         OnPropertyChanged(nameof(WsLastTryOnText));
                     }
                 }, this.GetType());
-                VirtualRoot.AddEventPath<WsServerOkEvent>("服务器Ws服务已可用", LogEnum.DevConsole, action: message => {
+                VirtualRoot.BuildEventPath<WsServerOkEvent>("服务器Ws服务已可用", LogEnum.DevConsole, path: message => {
                     if (IsOuterUserEnabled && !IsWsOnline) {
                         StartOrStopWs();
                     }
@@ -123,18 +126,18 @@ namespace NTMiner.Vms {
                     this.ArgsAssembly = string.Empty;
                 }
             });
-            AppRoot.AddCmdPath<RefreshAutoBootStartCommand>("刷新开机启动和自动挖矿的展示", LogEnum.DevConsole,
-                action: message => {
+            AppRoot.BuildCmdPath<RefreshAutoBootStartCommand>("刷新开机启动和自动挖矿的展示", LogEnum.DevConsole,
+                path: message => {
                     this.OnPropertyChanged(nameof(IsAutoBoot));
                     this.OnPropertyChanged(nameof(IsAutoStart));
                 }, location: this.GetType());
-            AppRoot.AddEventPath<MinerProfilePropertyChangedEvent>("MinerProfile设置变更后刷新VM内存", LogEnum.DevConsole,
-                action: message => {
+            AppRoot.BuildEventPath<MinerProfilePropertyChangedEvent>("MinerProfile设置变更后刷新VM内存", LogEnum.DevConsole,
+                path: message => {
                     OnPropertyChanged(message.PropertyName);
                 }, location: this.GetType());
 
-            VirtualRoot.AddEventPath<LocalContextReInitedEventHandledEvent>("本地上下文视图模型集刷新后刷新界面", LogEnum.DevConsole,
-                action: message => {
+            VirtualRoot.BuildEventPath<LocalContextReInitedEventHandledEvent>("本地上下文视图模型集刷新后刷新界面", LogEnum.DevConsole,
+                path: message => {
                     AllPropertyChanged();
                     if (CoinVm != null) {
                         CoinVm.OnPropertyChanged(nameof(CoinVm.Wallets));
@@ -143,10 +146,10 @@ namespace NTMiner.Vms {
                         CoinVm.CoinKernel?.CoinKernelProfile.SelectedDualCoin?.CoinProfile?.OnPropertyChanged(nameof(CoinVm.CoinProfile.SelectedDualCoinWallet));
                     }
                 }, location: this.GetType());
-            VirtualRoot.AddEventPath<CoinVmAddedEvent>("Vm集添加了新币种后刷新MinerProfileVm内存", LogEnum.DevConsole, action: message => {
+            VirtualRoot.BuildEventPath<CoinVmAddedEvent>("Vm集添加了新币种后刷新MinerProfileVm内存", LogEnum.DevConsole, path: message => {
                 OnPropertyChanged(nameof(CoinVm));
             }, this.GetType());
-            VirtualRoot.AddEventPath<CoinVmRemovedEvent>("Vm集删除了新币种后刷新MinerProfileVm内存", LogEnum.DevConsole, action: message => {
+            VirtualRoot.BuildEventPath<CoinVmRemovedEvent>("Vm集删除了新币种后刷新MinerProfileVm内存", LogEnum.DevConsole, path: message => {
                 OnPropertyChanged(nameof(CoinVm));
             }, this.GetType());
         }
@@ -403,6 +406,23 @@ namespace NTMiner.Vms {
             }
         }
 
+        public bool IsSystemName {
+            get { return NTMinerContext.Instance.MinerProfile.IsSystemName; }
+            set {
+                if (IsMining) {
+                    VirtualRoot.Out.ShowWarn("请先停止挖矿", header: "提示", autoHideSeconds: 3);
+                    return;
+                }
+                if (NTMinerContext.Instance.MinerProfile.IsSystemName != value) {
+                    NTMinerContext.Instance.MinerProfile.SetMinerProfileProperty(nameof(IsSystemName), value);
+                    OnPropertyChanged(nameof(IsSystemName));
+                }
+                if (value) {
+                    this.MinerName = NTMinerContext.ThisPcName;
+                }
+            }
+        }
+
         public bool IsShowInTaskbar {
             get => NTMinerContext.Instance.MinerProfile.IsShowInTaskbar;
             set {
@@ -413,6 +433,16 @@ namespace NTMiner.Vms {
             }
         }
 
+        public bool IsPreventDisplaySleep {
+            get => NTMinerContext.Instance.MinerProfile.IsPreventDisplaySleep;
+            set {
+                if (NTMinerContext.Instance.MinerProfile.IsPreventDisplaySleep != value) {
+                    NTMinerContext.Instance.MinerProfile.SetMinerProfileProperty(nameof(IsPreventDisplaySleep), value);
+                    OnPropertyChanged(nameof(IsPreventDisplaySleep));
+                }
+            }
+        }
+
         public bool IsNoUi {
             get { return NTMinerRegistry.GetIsNoUi(); }
             set {
@@ -464,6 +494,16 @@ namespace NTMiner.Vms {
             }
         }
 
+        public bool Is1080PillEnabled {
+            get => NTMinerContext.Instance.MinerProfile.Is1080PillEnabled;
+            set {
+                if (NTMinerContext.Instance.MinerProfile.Is1080PillEnabled != value) {
+                    NTMinerContext.Instance.MinerProfile.SetMinerProfileProperty(nameof(Is1080PillEnabled), value);
+                    OnPropertyChanged(nameof(Is1080PillEnabled));
+                }
+            }
+        }
+
         public string HotKey {
             get { return HotKeyUtil.GetHotKey(); }
             set {

+ 23 - 15
src/AppModels/Vms/PoolViewModel.cs

@@ -131,30 +131,38 @@ namespace NTMiner.Vms {
                 }
             });
             this.ViewPoolIncome = new DelegateCommand(() => {
+                bool openWebsite = string.IsNullOrEmpty(this.Url);
                 var wallet = Wallet;
-                if (wallet == null) {
-                    return;
+                if (!openWebsite) {
+                    if (this.IsUserMode) {
+                        var poolProfile = this.PoolProfileVm;
+                        if (poolProfile == null || string.IsNullOrEmpty(poolProfile.UserName)) {
+                            openWebsite = true;
+                        }
+                    }
+                    else {
+                        if (wallet == null || string.IsNullOrEmpty(wallet.Address)) {
+                            openWebsite = true;
+                        }
+                    }
                 }
-                if ((!this.IsUserMode && (wallet == null || string.IsNullOrEmpty(wallet.Address))) ||
-                    (this.IsUserMode && string.IsNullOrEmpty(this.PoolProfileVm.UserName))) {
+                if (openWebsite) {
                     if (!string.IsNullOrEmpty(Website)) {
                         VirtualRoot.Execute(new UnTopmostCommand());
                         Process.Start(Website);
                     }
                     return;
                 }
-                if (!string.IsNullOrEmpty(this.Url)) {
-                    string url = this.Url;
-                    if (this.IsUserMode) {
-                        url = url.Replace("{userName}", this.PoolProfileVm.UserName);
-                    }
-                    else {
-                        url = url.Replace("{wallet}", wallet.Address);
-                    }
-                    url = url.Replace("{worker}", NTMinerContext.Instance.MinerProfile.MinerName);
-                    VirtualRoot.Execute(new UnTopmostCommand());
-                    Process.Start(url);
+                string url = this.Url;
+                if (this.IsUserMode) {
+                    url = url.Replace("{userName}", this.PoolProfileVm.UserName);
+                }
+                else {
+                    url = url.Replace("{wallet}", wallet.Address);
                 }
+                url = url.Replace("{worker}", NTMinerContext.Instance.MinerProfile.MinerName);
+                VirtualRoot.Execute(new UnTopmostCommand());
+                Process.Start(url);
             });
         }
 

+ 6 - 6
src/AppModels/Vms/ServerMessagesViewModel.cs

@@ -49,12 +49,12 @@ namespace NTMiner.Vms {
                     VirtualRoot.Execute(new LoadNewServerMessageCommand());
                 }));
             });
-            VirtualRoot.AddEventPath<ServerMessagesClearedEvent>("清空了本地存储的服务器消息后刷新Vm内存", LogEnum.DevConsole,
-                action: message => {
+            VirtualRoot.BuildEventPath<ServerMessagesClearedEvent>("清空了本地存储的服务器消息后刷新Vm内存", LogEnum.DevConsole,
+                path: message => {
                     Init();
                 }, location: this.GetType());
-            VirtualRoot.AddEventPath<NewServerMessageLoadedEvent>("从服务器加载了新消息后刷新Vm内存", LogEnum.DevConsole,
-                action: message => {
+            VirtualRoot.BuildEventPath<NewServerMessageLoadedEvent>("从服务器加载了新消息后刷新Vm内存", LogEnum.DevConsole,
+                path: message => {
                     UIThread.Execute(() => {
                         foreach (var item in message.Data) {
                             var vm = new ServerMessageViewModel(item);
@@ -89,8 +89,8 @@ namespace NTMiner.Vms {
                         OnPropertyChanged(nameof(IsNoRecord));
                     });
                 }, location: this.GetType());
-            VirtualRoot.AddEventPath<NewDayEvent>("新的一天到来时刷新消息集中的可读性时间戳展示", LogEnum.DevConsole,
-                action: message => {
+            VirtualRoot.BuildEventPath<NewDayEvent>("新的一天到来时刷新消息集中的可读性时间戳展示", LogEnum.DevConsole,
+                path: message => {
                     if (QueryResults == null) {
                         return;
                     }

+ 10 - 13
src/AppModels/Vms/StartStopMineButtonViewModel.cs

@@ -12,7 +12,7 @@ namespace NTMiner.Vms {
             if (WpfUtil.IsInDesignMode) {
                 return;
             }
-            VirtualRoot.AddCmdPath<StopMineCommand>(action: message => {
+            VirtualRoot.BuildCmdPath<StopMineCommand>(path: message => {
                 if (!NTMinerContext.Instance.IsMining) {
                     this.MinerProfile.IsMining = false;
                 }
@@ -39,13 +39,10 @@ namespace NTMiner.Vms {
                 NTMinerConsole.UserInfo($"{MinerProfile.AutoStartDelaySeconds.ToString()}秒后开始挖矿");
                 this.MinerProfile.IsMining = true;
                 IMessagePathId pathId = null;
-                pathId = VirtualRoot.AddViaTimesLimitPath<Per1SecondEvent>("挖矿倒计时", LogEnum.None,
-                    action: message => {
-                        if (NTMinerContext.IsAutoStartCanceled) {
-                            BtnStopText = $"尚未开始";
-                        }
-                        else {
-                            BtnStopText = $"倒计时{pathId.ViaTimesLimit.ToString()}";
+                pathId = VirtualRoot.BuildViaTimesLimitPath<Per1SecondEvent>("挖矿倒计时", LogEnum.None,
+                    path: message => {
+                        if (!NTMinerContext.IsAutoStartCanceled) {
+                            MineBtnText = $"倒计时{pathId.ViaTimesLimit.ToString()}";
                         }
                         if (pathId.ViaTimesLimit == 0) {
                             if (!NTMinerContext.IsAutoStartCanceled) {
@@ -57,12 +54,12 @@ namespace NTMiner.Vms {
             }
         }
 
-        private string _btnStopText = "正在挖矿";
-        public string BtnStopText {
-            get => _btnStopText;
+        private string _mineBtnText = "正在挖矿";
+        public string MineBtnText {
+            get => _mineBtnText;
             set {
-                _btnStopText = value;
-                OnPropertyChanged(nameof(BtnStopText));
+                _mineBtnText = value;
+                OnPropertyChanged(nameof(MineBtnText));
             }
         }
 

+ 70 - 67
src/AppViews0/AppViewFactory.cs

@@ -13,42 +13,45 @@ namespace NTMiner {
         public AppViewFactory() { }
 
         public override Window CreateMainWindow() {
-            return new MainWindow();
+            ConsoleWindow.Instance.Show();
+            return new MainWindow {
+                Owner = ConsoleWindow.Instance
+            };
         }
 
         public override void BuildPaths() {
             var location = this.GetType();
-            VirtualRoot.AddCmdPath<ShowDialogWindowCommand>(action: message => {
+            VirtualRoot.BuildCmdPath<ShowDialogWindowCommand>(path: message => {
                 UIThread.Execute(() => {
                     DialogWindow.ShowSoftDialog(new DialogWindowViewModel(message: message.Message, title: message.Title, onYes: message.OnYes, icon: message.Icon));
                 });
             }, location: location);
-            VirtualRoot.AddCmdPath<ShowCalcCommand>(action: message => {
+            VirtualRoot.BuildCmdPath<ShowCalcCommand>(path: message => {
                 UIThread.Execute(() => {
                     Calc.ShowWindow(message.CoinVm);
                 });
             }, location: location);
-            VirtualRoot.AddCmdPath<ShowLocalIpsCommand>(action: message => {
+            VirtualRoot.BuildCmdPath<ShowLocalIpsCommand>(path: message => {
                 UIThread.Execute(() => {
                     MinerClientUcs.LocalIpConfig.ShowWindow();
                 });
             }, location: location);
-            VirtualRoot.AddCmdPath<ShowAboutPageCommand>(action: message => {
+            VirtualRoot.BuildCmdPath<ShowAboutPageCommand>(path: message => {
                 UIThread.Execute(() => {
                     AboutPage.ShowWindow();
                 });
             }, location: location);
-            VirtualRoot.AddCmdPath<ShowKernelOutputPageCommand>(action: message => {
+            VirtualRoot.BuildCmdPath<ShowKernelOutputPageCommand>(path: message => {
                 UIThread.Execute(() => {
                     KernelOutputPage.ShowWindow(message.SelectedKernelOutputVm);
                 });
             }, location: location);
-            VirtualRoot.AddCmdPath<ShowKernelInputPageCommand>(action: message => {
+            VirtualRoot.BuildCmdPath<ShowKernelInputPageCommand>(path: message => {
                 UIThread.Execute(() => {
                     KernelInputPage.ShowWindow();
                 });
             }, location: location);
-            VirtualRoot.AddCmdPath<ShowTagBrandCommand>(action: message => {
+            VirtualRoot.BuildCmdPath<ShowTagBrandCommand>(path: message => {
                 if (NTMinerContext.IsBrandSpecified) {
                     return;
                 }
@@ -56,299 +59,299 @@ namespace NTMiner {
                     BrandTag.ShowWindow();
                 });
             }, location: location);
-            VirtualRoot.AddCmdPath<ShowCoinPageCommand>(action: message => {
+            VirtualRoot.BuildCmdPath<ShowCoinPageCommand>(path: message => {
                 UIThread.Execute(() => {
                     CoinPage.ShowWindow(message.CurrentCoin, message.TabType);
                 });
             }, location: location);
-            VirtualRoot.AddCmdPath<ShowCoinGroupsCommand>(action: message => {
+            VirtualRoot.BuildCmdPath<ShowCoinGroupsCommand>(path: message => {
                 UIThread.Execute(() => {
                     CoinGroupPage.ShowWindow();
                 });
             }, location: location);
-            VirtualRoot.AddCmdPath<ShowSysDicPageCommand>(action: message => {
+            VirtualRoot.BuildCmdPath<ShowSysDicPageCommand>(path: message => {
                 UIThread.Execute(() => {
                     SysDicPage.ShowWindow();
                 });
             }, location: location);
-            VirtualRoot.AddCmdPath<ShowVirtualMemoryCommand>(action: message => {
+            VirtualRoot.BuildCmdPath<ShowVirtualMemoryCommand>(path: message => {
                 UIThread.Execute(() => {
                     MinerClientUcs.VirtualMemory.ShowWindow();
                 });
             }, location: location);
-            VirtualRoot.AddCmdPath<ShowRestartWindowsCommand>(action: message => {
+            VirtualRoot.BuildCmdPath<ShowRestartWindowsCommand>(path: message => {
                 UIThread.Execute(() => {
                     RestartWindows.ShowDialog(new RestartWindowsViewModel(message.CountDownSeconds));
                 });
             }, location: location);
-            VirtualRoot.AddCmdPath<ShowNotificationSampleCommand>(action: message => {
+            VirtualRoot.BuildCmdPath<ShowNotificationSampleCommand>(path: message => {
                 UIThread.Execute(() => {
                     NotificationSample.ShowWindow();
                 });
             }, location: location);
-            VirtualRoot.AddCmdPath<ShowPropertyCommand>(action: message => {
+            VirtualRoot.BuildCmdPath<ShowPropertyCommand>(path: message => {
                 UIThread.Execute(() => {
                     Property.ShowWindow();
                 });
             }, location: location);
-            VirtualRoot.AddCmdPath<ShowMessagePathIdsCommand>(action: message => {
+            VirtualRoot.BuildCmdPath<ShowMessagePathIdsCommand>(path: message => {
                 UIThread.Execute(() => {
                     MessagePathIds.ShowWindow();
                 });
             }, location: location);
-            VirtualRoot.AddCmdPath<ShowKernelsWindowCommand>(action: message => {
+            VirtualRoot.BuildCmdPath<ShowKernelsWindowCommand>(path: message => {
                 UIThread.Execute(() => {
                     KernelsWindow.ShowWindow();
                 });
             }, location: location);
-            VirtualRoot.AddCmdPath<ShowKernelDownloaderCommand>(action: message => {
+            VirtualRoot.BuildCmdPath<ShowKernelDownloaderCommand>(path: message => {
                 UIThread.Execute(() => {
                     KernelDownloading.ShowWindow(message.KernelId, message.DownloadComplete);
                 });
             }, location: location);
-            VirtualRoot.AddCmdPath<EditEnvironmentVariableCommand>(action: message => {
+            VirtualRoot.BuildCmdPath<EditEnvironmentVariableCommand>(path: message => {
                 UIThread.Execute(() => {
                     EnvironmentVariableEdit.ShowWindow(message.CoinKernelVm, message.EnvironmentVariable);
                 });
             }, location: location);
-            VirtualRoot.AddCmdPath<EditInputSegmentCommand>(action: message => {
+            VirtualRoot.BuildCmdPath<EditInputSegmentCommand>(path: message => {
                 UIThread.Execute(() => {
                     InputSegmentEdit.ShowWindow(message.CoinKernelVm, message.Segment);
                 });
             }, location: location);
-            VirtualRoot.AddCmdPath<EditCoinKernelCommand>(action: message => {
+            VirtualRoot.BuildCmdPath<EditCoinKernelCommand>(path: message => {
                 UIThread.Execute(() => {
                     CoinKernelEdit.ShowWindow(message.FormType, message.Source);
                 });
             }, location: location);
-            VirtualRoot.AddCmdPath<EditCoinCommand>(action: message => {
+            VirtualRoot.BuildCmdPath<EditCoinCommand>(path: message => {
                 UIThread.Execute(() => {
                     CoinEdit.ShowWindow(message.FormType, message.Source);
                 });
             }, location: location);
-            VirtualRoot.AddCmdPath<ShowSpeedChartsCommand>(action: message => {
+            VirtualRoot.BuildCmdPath<ShowSpeedChartsCommand>(path: message => {
                 UIThread.Execute(() => {
                     SpeedCharts.ShowWindow(message.GpuSpeedVm);
                 });
             }, location: location);
-            VirtualRoot.AddCmdPath<ShowFileWriterPageCommand>(action: message => {
+            VirtualRoot.BuildCmdPath<ShowFileWriterPageCommand>(path: message => {
                 UIThread.Execute(() => {
                     FileWriterPage.ShowWindow();
                 });
             }, location: location);
-            VirtualRoot.AddCmdPath<EditFileWriterCommand>(action: message => {
+            VirtualRoot.BuildCmdPath<EditFileWriterCommand>(path: message => {
                 UIThread.Execute(() => {
                     FileWriterEdit.ShowWindow(message.FormType, message.Source);
                 });
             }, location: location);
-            VirtualRoot.AddCmdPath<ShowFragmentWriterPageCommand>(action: message => {
+            VirtualRoot.BuildCmdPath<ShowFragmentWriterPageCommand>(path: message => {
                 UIThread.Execute(() => {
                     FragmentWriterPage.ShowWindow();
                 });
             }, location: location);
-            VirtualRoot.AddCmdPath<EditFragmentWriterCommand>(action: message => {
+            VirtualRoot.BuildCmdPath<EditFragmentWriterCommand>(path: message => {
                 UIThread.Execute(() => {
                     FragmentWriterEdit.ShowWindow(message.FormType, message.Source);
                 });
             }, location: location);
-            VirtualRoot.AddCmdPath<EditGroupCommand>(action: message => {
+            VirtualRoot.BuildCmdPath<EditGroupCommand>(path: message => {
                 UIThread.Execute(() => {
                     GroupEdit.ShowWindow(message.FormType, message.Source);
                 });
             }, location: location);
-            VirtualRoot.AddCmdPath<EditServerMessageCommand>(action: message => {
+            VirtualRoot.BuildCmdPath<EditServerMessageCommand>(path: message => {
                 UIThread.Execute(() => {
                     ServerMessageEdit.ShowWindow(message.FormType, message.Source);
                 });
             }, location: location);
-            VirtualRoot.AddCmdPath<EditKernelInputCommand>(action: message => {
+            VirtualRoot.BuildCmdPath<EditKernelInputCommand>(path: message => {
                 UIThread.Execute(() => {
                     KernelInputEdit.ShowWindow(message.FormType, message.Source);
                 });
             }, location: location);
-            VirtualRoot.AddCmdPath<EditKernelOutputKeywordCommand>(action: message => {
+            VirtualRoot.BuildCmdPath<EditKernelOutputKeywordCommand>(path: message => {
                 UIThread.Execute(() => {
                     KernelOutputKeywordEdit.ShowWindow(message.FormType, message.Source);
                 });
             }, location: location);
-            VirtualRoot.AddCmdPath<EditKernelOutputTranslaterCommand>(action: message => {
+            VirtualRoot.BuildCmdPath<EditKernelOutputTranslaterCommand>(path: message => {
                 UIThread.Execute(() => {
                     KernelOutputTranslaterEdit.ShowWindow(message.FormType, message.Source);
                 });
             }, location: location);
-            VirtualRoot.AddCmdPath<EditKernelOutputCommand>(action: message => {
+            VirtualRoot.BuildCmdPath<EditKernelOutputCommand>(path: message => {
                 UIThread.Execute(() => {
                     KernelOutputEdit.ShowWindow(message.FormType, message.Source);
                 });
             }, location: location);
-            VirtualRoot.AddCmdPath<ShowPackagesWindowCommand>(action: message => {
+            VirtualRoot.BuildCmdPath<ShowPackagesWindowCommand>(path: message => {
                 UIThread.Execute(() => {
                     PackagesWindow.ShowWindow();
                 });
             }, location: location);
-            VirtualRoot.AddCmdPath<EditKernelCommand>(action: message => {
+            VirtualRoot.BuildCmdPath<EditKernelCommand>(path: message => {
                 UIThread.Execute(() => {
                     KernelEdit.ShowWindow(message.FormType, message.Source);
                 });
             }, location: location);
-            VirtualRoot.AddCmdPath<EditPackageCommand>(action: message => {
+            VirtualRoot.BuildCmdPath<EditPackageCommand>(path: message => {
                 UIThread.Execute(() => {
                     PackageEdit.ShowWindow(message.FormType, message.Source);
                 });
             }, location: location);
-            VirtualRoot.AddCmdPath<EditPoolKernelCommand>(action: message => {
+            VirtualRoot.BuildCmdPath<EditPoolKernelCommand>(path: message => {
                 UIThread.Execute(() => {
                     PoolKernelEdit.ShowWindow(message.FormType, message.Source);
                 });
             }, location: location);
-            VirtualRoot.AddCmdPath<EditPoolCommand>(action: message => {
+            VirtualRoot.BuildCmdPath<EditPoolCommand>(path: message => {
                 UIThread.Execute(() => {
                     PoolEdit.ShowWindow(message.FormType, message.Source);
                 });
             }, location: location);
-            VirtualRoot.AddCmdPath<EditSysDicItemCommand>(action: message => {
+            VirtualRoot.BuildCmdPath<EditSysDicItemCommand>(path: message => {
                 UIThread.Execute(() => {
                     SysDicItemEdit.ShowWindow(message.FormType, message.Source);
                 });
             }, location: location);
-            VirtualRoot.AddCmdPath<EditSysDicCommand>(action: message => {
+            VirtualRoot.BuildCmdPath<EditSysDicCommand>(path: message => {
                 UIThread.Execute(() => {
                     SysDicEdit.ShowWindow(message.FormType, message.Source);
                 });
             }, location: location);
-            VirtualRoot.AddCmdPath<ShowKernelOutputKeywordsCommand>(action: message => {
+            VirtualRoot.BuildCmdPath<ShowKernelOutputKeywordsCommand>(path: message => {
                 UIThread.Execute(() => {
                     KernelOutputKeywords.ShowWindow();
                 });
             }, location: location);
-            VirtualRoot.AddCmdPath<ShowSignUpPageCommand>(action: message => {
+            VirtualRoot.BuildCmdPath<ShowSignUpPageCommand>(path: message => {
                 UIThread.Execute(() => {
                     SignUpPage.ShowWindow();
                 });
             }, location: location);
-            VirtualRoot.AddCmdPath<EditWalletCommand>(action: message => {
+            VirtualRoot.BuildCmdPath<EditWalletCommand>(path: message => {
                 UIThread.Execute(() => {
                     WalletEdit.ShowWindow(message.FormType, message.Source);
                 });
             }, location: location);
 
             #region MinerStudio
-            VirtualRoot.AddCmdPath<ShowQQGroupQrCodeCommand>(action: message => {
+            VirtualRoot.BuildCmdPath<ShowQQGroupQrCodeCommand>(path: message => {
                 UIThread.Execute(() => {
                     MinerStudioUcs.QQGroupQrCode.ShowWindow();
                 });
             }, location: location);
-            VirtualRoot.AddCmdPath<ShowCalcConfigCommand>(action: message => {
+            VirtualRoot.BuildCmdPath<ShowCalcConfigCommand>(path: message => {
                 UIThread.Execute(() => {
                     MinerStudioUcs.CalcConfig.ShowWindow();
                 });
             }, location: location);
-            VirtualRoot.AddCmdPath<ShowMinerClientsWindowCommand>(action: message => {
+            VirtualRoot.BuildCmdPath<ShowMinerClientsWindowCommand>(path: message => {
                 UIThread.Execute(() => {
                     MinerStudioViews.MinerClientsWindow.ShowWindow(message.IsToggle);
                 });
             }, location: location);
-            VirtualRoot.AddCmdPath<ShowNTMinerUpdaterConfigCommand>(action: message => {
+            VirtualRoot.BuildCmdPath<ShowNTMinerUpdaterConfigCommand>(path: message => {
                 UIThread.Execute(() => {
                     MinerStudioUcs.NTMinerUpdaterConfig.ShowWindow();
                 });
             }, location: location);
-            VirtualRoot.AddCmdPath<ShowMinerClientFinderConfigCommand>(action: message => {
+            VirtualRoot.BuildCmdPath<ShowMinerClientFinderConfigCommand>(path: message => {
                 UIThread.Execute(() => {
                     MinerStudioUcs.MinerClientFinderConfig.ShowWindow();
                 });
             }, location: location);
-            VirtualRoot.AddCmdPath<ShowChartsWindowCommand>(action: message => {
+            VirtualRoot.BuildCmdPath<ShowChartsWindowCommand>(path: message => {
                 UIThread.Execute(() => {
                     MinerStudioViews.ChartsWindow.ShowWindow();
                 });
             }, location: location);
-            VirtualRoot.AddCmdPath<ShowOverClockDataPageCommand>(action: message => {
+            VirtualRoot.BuildCmdPath<ShowOverClockDataPageCommand>(path: message => {
                 UIThread.Execute(() => {
                     MinerStudioUcs.OverClockDataPage.ShowWindow();
                 });
             }, location: location);
-            VirtualRoot.AddCmdPath<ShowMinerStudioVirtualMemoryCommand>(action: message => {
+            VirtualRoot.BuildCmdPath<ShowMinerStudioVirtualMemoryCommand>(path: message => {
                 UIThread.Execute(() => {
                     MinerStudioUcs.VirtualMemory.ShowWindow(message.Vm);
                 });
             }, location: location);
-            VirtualRoot.AddCmdPath<ShowMinerStudioLocalIpsCommand>(action: message => {
+            VirtualRoot.BuildCmdPath<ShowMinerStudioLocalIpsCommand>(path: message => {
                 UIThread.Execute(() => {
                     MinerStudioUcs.LocalIpConfig.ShowWindow(message.Vm);
                 });
             }, location: location);
-            VirtualRoot.AddCmdPath<ShowNTMinerWalletPageCommand>(action: message => {
+            VirtualRoot.BuildCmdPath<ShowNTMinerWalletPageCommand>(path: message => {
                 UIThread.Execute(() => {
                     MinerStudioUcs.NTMinerWalletPage.ShowWindow();
                 });
             }, location: location);
-            VirtualRoot.AddCmdPath<ShowUserPageCommand>(action: message => {
+            VirtualRoot.BuildCmdPath<ShowUserPageCommand>(path: message => {
                 UIThread.Execute(() => {
                     MinerStudioUcs.UserPage.ShowWindow();
                 });
             }, location: location);
-            VirtualRoot.AddCmdPath<ShowGpuNamePageCommand>(action: message => {
+            VirtualRoot.BuildCmdPath<ShowGpuNamePageCommand>(path: message => {
                 UIThread.Execute(() => {
                     MinerStudioUcs.GpuNameCounts.ShowWindow();
                 });
             }, location: location);
-            VirtualRoot.AddCmdPath<ShowChangePassword>(action: message => {
+            VirtualRoot.BuildCmdPath<ShowChangePassword>(path: message => {
                 UIThread.Execute(() => {
                     MinerStudioUcs.ChangePassword.ShowWindow();
                 });
             }, location: location);
-            VirtualRoot.AddCmdPath<ShowWsServerNodePageCommand>(action: message => {
+            VirtualRoot.BuildCmdPath<ShowWsServerNodePageCommand>(path: message => {
                 UIThread.Execute(() => {
                     MinerStudioUcs.WsServerNodePage.ShowWindow();
                 });
             }, location: location);
-            VirtualRoot.AddCmdPath<ShowRemoteDesktopLoginDialogCommand>(action: message => {
+            VirtualRoot.BuildCmdPath<ShowRemoteDesktopLoginDialogCommand>(path: message => {
                 UIThread.Execute(() => {
                     MinerStudioUcs.RemoteDesktopLogin.ShowWindow(message.Vm);
                 });
             }, location: location);
-            VirtualRoot.AddCmdPath<ShowMinerClientSettingCommand>(action: message => {
+            VirtualRoot.BuildCmdPath<ShowMinerClientSettingCommand>(path: message => {
                 UIThread.Execute(() => {
                     MinerStudioUcs.MinerClientSetting.ShowWindow(message.Vm);
                 });
             }, location: location);
-            VirtualRoot.AddCmdPath<ShowMinerNamesSeterCommand>(action: message => {
+            VirtualRoot.BuildCmdPath<ShowMinerNamesSeterCommand>(path: message => {
                 UIThread.Execute(() => {
                     MinerStudioUcs.MinerNamesSeter.ShowWindow(message.Vm);
                 });
             }, location: location);
-            VirtualRoot.AddCmdPath<ShowGpuProfilesPageCommand>(action: message => {
+            VirtualRoot.BuildCmdPath<ShowGpuProfilesPageCommand>(path: message => {
                 UIThread.Execute(() => {
                     MinerStudioUcs.GpuProfilesPage.ShowWindow(message.MinerClientsWindowVm);
                 });
             }, location: location);
-            VirtualRoot.AddCmdPath<ShowMinerClientAddCommand>(action: message => {
+            VirtualRoot.BuildCmdPath<ShowMinerClientAddCommand>(path: message => {
                 UIThread.Execute(() => {
                     MinerStudioUcs.MinerClientAdd.ShowWindow();
                 });
             }, location: location);
-            VirtualRoot.AddCmdPath<EditMinerGroupCommand>(action: message => {
+            VirtualRoot.BuildCmdPath<EditMinerGroupCommand>(path: message => {
                 UIThread.Execute(() => {
                     MinerStudioUcs.MinerGroupEdit.ShowWindow(message.FormType, message.Source);
                 });
             }, location: location);
-            VirtualRoot.AddCmdPath<EditNTMinerWalletCommand>(action: message => {
+            VirtualRoot.BuildCmdPath<EditNTMinerWalletCommand>(path: message => {
                 UIThread.Execute(() => {
                     MinerStudioUcs.NTMinerWalletEdit.ShowWindow(message.FormType, message.Source);
                 });
             }, location: location);
-            VirtualRoot.AddCmdPath<EditMineWorkCommand>(action: message => {
+            VirtualRoot.BuildCmdPath<EditMineWorkCommand>(path: message => {
                 UIThread.Execute(() => {
                     MinerStudioUcs.MineWorkEdit.ShowWindow(message.FormType, message.Source);
                 });
             }, location: location);
-            VirtualRoot.AddCmdPath<EditOverClockDataCommand>(action: message => {
+            VirtualRoot.BuildCmdPath<EditOverClockDataCommand>(path: message => {
                 UIThread.Execute(() => {
                     MinerStudioUcs.OverClockDataEdit.ShowWindow(message.FormType, message.Source);
                 });
             }, location: location);
-            VirtualRoot.AddCmdPath<EditColumnsShowCommand>(action: message => {
+            VirtualRoot.BuildCmdPath<EditColumnsShowCommand>(path: message => {
                 UIThread.Execute(() => {
                     MinerStudioUcs.ColumnsShowEdit.ShowWindow(message.Source);
                 });

+ 0 - 11
src/AppViews0/AppViews0.csproj

@@ -217,9 +217,6 @@
     <Compile Include="Views\Ucs\Property.xaml.cs">
       <DependentUpon>Property.xaml</DependentUpon>
     </Compile>
-    <Compile Include="Views\Ucs\MessagePathIds.xaml.cs">
-      <DependentUpon>MessagePathIds.xaml</DependentUpon>
-    </Compile>
     <Compile Include="Views\Ucs\ServerMessages.xaml.cs">
       <DependentUpon>ServerMessages.xaml</DependentUpon>
     </Compile>
@@ -505,10 +502,6 @@
       <Generator>MSBuild:Compile</Generator>
       <SubType>Designer</SubType>
     </Page>
-    <Page Include="Views\Design\MessagePathIdsViewModel.xaml">
-      <Generator>MSBuild:Compile</Generator>
-      <SubType>Designer</SubType>
-    </Page>
     <Page Include="Views\Design\LogFilesViewModel.xaml">
       <Generator>MSBuild:Compile</Generator>
       <SubType>Designer</SubType>
@@ -845,10 +838,6 @@
       <Generator>MSBuild:Compile</Generator>
       <SubType>Designer</SubType>
     </Page>
-    <Page Include="Views\Ucs\MessagePathIds.xaml">
-      <Generator>MSBuild:Compile</Generator>
-      <SubType>Designer</SubType>
-    </Page>
     <Page Include="Views\Ucs\ServerMessages.xaml">
       <Generator>MSBuild:Compile</Generator>
       <SubType>Designer</SubType>

+ 2 - 2
src/AppViews0/MinerStudio/Views/ChartsWindow.xaml.cs

@@ -36,8 +36,8 @@ namespace NTMiner.MinerStudio.Views {
             this.TbUcName.Text = nameof(ChartsWindow);
             NotiCenterWindow.Bind(this);
             #region 总算力
-            this.AddEventPath<Per10SecondEvent>("周期刷新总算力图", LogEnum.DevConsole,
-                action: message => {
+            this.BuildEventPath<Per10SecondEvent>("周期刷新总算力图", LogEnum.DevConsole,
+                path: message => {
                     RefreshTotalSpeedChart(limit: 1);
                 }, location: this.GetType());
             RefreshTotalSpeedChart(limit: 60);

+ 2 - 2
src/AppViews0/MinerStudio/Views/MinerClientsWindow.xaml.cs

@@ -133,8 +133,8 @@ namespace NTMiner.MinerStudio.Views {
             this.LocationChanged += (sender, e) => {
                 MoveConsoleWindow();
             };
-            this.AddEventPath<Per1SecondEvent>("刷新倒计时秒表", LogEnum.None,
-                action: message => {
+            this.BuildEventPath<Per1SecondEvent>("刷新倒计时秒表", LogEnum.None,
+                path: message => {
                     #region
                     var minerClients = Vm.MinerClients.ToArray();
                     if (Vm.CountDown > 0) {

+ 3 - 3
src/AppViews0/MinerStudio/Views/Ucs/CalcConfig.xaml.cs

@@ -18,7 +18,7 @@ namespace NTMiner.MinerStudio.Views.Ucs {
                 CloseVisible = Visibility.Visible
             }, ucFactory: (window) => {
                 var uc = new CalcConfig();
-                window.AddCloseWindowOnecePath(uc.Vm.Id);
+                window.BuildCloseWindowOnecePath(uc.Vm.Id);
                 uc.ItemsControl.MouseDown += (object sender, MouseButtonEventArgs e)=> {
                     if (e.LeftButton == MouseButtonState.Pressed) {
                         window.DragMove();
@@ -38,8 +38,8 @@ namespace NTMiner.MinerStudio.Views.Ucs {
             this.DataContext = this.Vm;
             InitializeComponent();
             this.OnLoaded((window) => {
-                window.AddEventPath<CalcConfigSetInitedEvent>("收益计算器数据集刷新后刷新VM", LogEnum.DevConsole,
-                    action: message => {
+                window.BuildEventPath<CalcConfigSetInitedEvent>("收益计算器数据集刷新后刷新VM", LogEnum.DevConsole,
+                    path: message => {
                         Vm.Refresh();
                     }, location: this.GetType());
             });

+ 1 - 1
src/AppViews0/MinerStudio/Views/Ucs/ChangePassword.xaml.cs

@@ -16,7 +16,7 @@ namespace NTMiner.MinerStudio.Views.Ucs {
                 IconName = "Icon_Password"
             }, ucFactory: (window) => {
                 var uc = new ChangePassword();
-                window.AddCloseWindowOnecePath(uc.Vm.Id);
+                window.BuildCloseWindowOnecePath(uc.Vm.Id);
                 return uc;
             }, beforeShow: (window, uc)=> {
                 uc.DoFocus();

+ 1 - 1
src/AppViews0/MinerStudio/Views/Ucs/ColumnsShowEdit.xaml.cs

@@ -18,7 +18,7 @@ namespace NTMiner.MinerStudio.Views.Ucs {
                 IconName = "Icon_ColumnsShow"
             }, ucFactory: (window) => {
                 // 这里没有深拷贝传入的vm,因为在矿机DataGrid的列头上也可以隐藏列,所以两个地方操作的需要是同一个vm。
-                window.AddCloseWindowOnecePath(vm.Id);
+                window.BuildCloseWindowOnecePath(vm.Id);
                 return new ColumnsShowEdit(vm);
             }, fixedSize: false);
         }

+ 2 - 2
src/AppViews0/MinerStudio/Views/Ucs/GpuProfilesPage.xaml.cs

@@ -26,7 +26,7 @@ namespace NTMiner.MinerStudio.Views.Ucs {
                 FooterVisible = Visibility.Collapsed
             }, ucFactory: (window) => {
                 var vm = new GpuProfilesPageViewModel(minerClientsWindowVm);
-                window.AddCloseWindowOnecePath(vm.Id);
+                window.BuildCloseWindowOnecePath(vm.Id);
                 var uc = new GpuProfilesPage(vm);
                 var client = minerClientsWindowVm.SelectedMinerClients[0];
                 void handler(object sender, PropertyChangedEventArgs e) {
@@ -60,7 +60,7 @@ namespace NTMiner.MinerStudio.Views.Ucs {
                 uc.Unloaded += (object sender, RoutedEventArgs e) => {
                     minerClientsWindowVm.PropertyChanged -= handler;
                 };
-                window.AddEventPath<GetGpuProfilesResponsedEvent>("收到GetGpuProfilesJson的响应", LogEnum.DevConsole, action: message => {
+                window.BuildEventPath<GetGpuProfilesResponsedEvent>("收到GetGpuProfilesJson的响应", LogEnum.DevConsole, path: message => {
                     if (message.ClientId != minerClientVm.ClientId) {
                         return;
                     }

+ 2 - 2
src/AppViews0/MinerStudio/Views/Ucs/LocalIpConfig.xaml.cs

@@ -17,13 +17,13 @@ namespace NTMiner.MinerStudio.Views.Ucs {
                 CloseVisible = Visibility.Visible
             }, ucFactory: (window) => {
                 var uc = new LocalIpConfig(vm);
-                window.AddCloseWindowOnecePath(uc.Vm.Id);
+                window.BuildCloseWindowOnecePath(uc.Vm.Id);
                 uc.ItemsControl.MouseDown += (object sender, MouseButtonEventArgs e) => {
                     if (e.LeftButton == MouseButtonState.Pressed) {
                         window.DragMove();
                     }
                 };
-                window.AddEventPath<GetLocalIpsResponsedEvent>("收到了获取挖矿端Ip的响应", LogEnum.DevConsole, action: message => {
+                window.BuildEventPath<GetLocalIpsResponsedEvent>("收到了获取挖矿端Ip的响应", LogEnum.DevConsole, path: message => {
                     if (message.ClientId != vm.MinerClientVm.ClientId) {
                         return;
                     }

+ 2 - 2
src/AppViews0/MinerStudio/Views/Ucs/MinerClient.xaml.cs

@@ -16,8 +16,8 @@ namespace NTMiner.MinerStudio.Views.Ucs {
             InitializeComponent();
             this.TbDateTime.Text = DateTime.Now.ToString("yyyy-MM-dd HH:mm");
             this.OnLoaded((window) => {
-                window.AddEventPath<MinutePartChangedEvent>("整分钟时更新MinerClient上的日期时间计时器", LogEnum.None,
-                    action: message => {
+                window.BuildEventPath<MinutePartChangedEvent>("整分钟时更新MinerClient上的日期时间计时器", LogEnum.None,
+                    path: message => {
                         this.TbDateTime.Text = DateTime.Now.ToString("yyyy-MM-dd HH:mm");
                     }, location: this.GetType());
             });

+ 1 - 1
src/AppViews0/MinerStudio/Views/Ucs/MinerClientAdd.xaml.cs

@@ -6,7 +6,7 @@ namespace NTMiner.MinerStudio.Views.Ucs {
         public static void ShowWindow() {
             MinerClientAddViewModel vm = new MinerClientAddViewModel();
             Window window = new MinerClientAdd(vm);
-            window.AddCloseWindowOnecePath(vm.Id);
+            window.BuildCloseWindowOnecePath(vm.Id);
             window.MousePosition();
             window.ShowSoftDialog();
         }

+ 1 - 1
src/AppViews0/MinerStudio/Views/Ucs/MinerClientFinderConfig.xaml.cs

@@ -16,7 +16,7 @@ namespace NTMiner.MinerStudio.Views.Ucs {
                 CloseVisible = System.Windows.Visibility.Visible
             }, ucFactory: (window) => {
                 var uc = new MinerClientFinderConfig();
-                window.AddCloseWindowOnecePath(uc.Vm.Id);
+                window.BuildCloseWindowOnecePath(uc.Vm.Id);
                 return uc;
             }, fixedSize: true);
         }

+ 1 - 1
src/AppViews0/MinerStudio/Views/Ucs/MinerClientSetting.xaml.cs

@@ -5,7 +5,7 @@ namespace NTMiner.MinerStudio.Views.Ucs {
     public partial class MinerClientSetting : BlankWindow {
         public static void ShowWindow(MinerClientSettingViewModel vm) {
             Window window = new MinerClientSetting(vm);
-            window.AddCloseWindowOnecePath(vm.Id);
+            window.BuildCloseWindowOnecePath(vm.Id);
             window.MousePosition();
             window.ShowSoftDialog();
         }

+ 1 - 1
src/AppViews0/MinerStudio/Views/Ucs/MinerGroupEdit.xaml.cs

@@ -15,7 +15,7 @@ namespace NTMiner.MinerStudio.Views.Ucs {
                 IconName = "Icon_MinerGroup"
             }, ucFactory: (window) => {
                 MinerGroupViewModel vm = new MinerGroupViewModel(source);
-                window.AddCloseWindowOnecePath(vm.Id);
+                window.BuildCloseWindowOnecePath(vm.Id);
                 return new MinerGroupEdit(vm);
             }, beforeShow: (window, uc) => {
                 uc.DoFocus();

+ 1 - 1
src/AppViews0/MinerStudio/Views/Ucs/MinerNamesSeter.xaml.cs

@@ -13,7 +13,7 @@ namespace NTMiner.MinerStudio.Views.Ucs {
                 CloseVisible = System.Windows.Visibility.Visible,
                 IconName = "Icon_MinerName"
             }, ucFactory: (window) => {
-                window.AddCloseWindowOnecePath(vm.Id);
+                window.BuildCloseWindowOnecePath(vm.Id);
                 return new MinerNamesSeter(vm);
             }, fixedSize: true);
         }

+ 1 - 1
src/AppViews0/MinerStudio/Views/Ucs/NTMinerUpdaterConfig.xaml.cs

@@ -16,7 +16,7 @@ namespace NTMiner.MinerStudio.Views.Ucs {
                 CloseVisible = System.Windows.Visibility.Visible
             }, ucFactory: (window) => {
                 var uc = new NTMinerUpdaterConfig();
-                window.AddCloseWindowOnecePath(uc.Vm.Id);
+                window.BuildCloseWindowOnecePath(uc.Vm.Id);
                 return uc;
             }, fixedSize: true);
         }

+ 1 - 1
src/AppViews0/MinerStudio/Views/Ucs/NTMinerWalletEdit.xaml.cs

@@ -15,7 +15,7 @@ namespace NTMiner.MinerStudio.Views.Ucs {
                 IconName = "Icon_Wallet"
             }, ucFactory: (window) => {
                 NTMinerWalletViewModel vm = new NTMinerWalletViewModel(source);
-                window.AddCloseWindowOnecePath(vm.Id);
+                window.BuildCloseWindowOnecePath(vm.Id);
                 return new NTMinerWalletEdit(vm);
             }, fixedSize: true);
         }

+ 1 - 1
src/AppViews0/MinerStudio/Views/Ucs/OverClockDataEdit.xaml.cs

@@ -15,7 +15,7 @@ namespace NTMiner.MinerStudio.Views.Ucs {
                 IconName = "Icon_OverClock"
             }, ucFactory: (window) => {
                 OverClockDataViewModel vm = new OverClockDataViewModel(source);
-                window.AddCloseWindowOnecePath(vm.Id);
+                window.BuildCloseWindowOnecePath(vm.Id);
                 return new OverClockDataEdit(vm);
             }, fixedSize: true);
         }

+ 2 - 2
src/AppViews0/MinerStudio/Views/Ucs/RemoteDesktopLogin.xaml

@@ -24,7 +24,7 @@
         </Grid.ColumnDefinitions>
         <TextBlock 
 			Grid.Row="0" Grid.Column="0" Margin="0 2" 
-			Text="登录名" Style="{StaticResource LblTbBase}"></TextBlock>
+			Text="Windows登录名" Style="{StaticResource LblTbBase}"></TextBlock>
         <TextBox 
             x:Name="TbLoginName"
 			Grid.Row="0" Grid.Column="1" Margin="0 2"
@@ -34,7 +34,7 @@
 
         <TextBlock 
 			Grid.Row="1" Grid.Column="0" Margin="0 2" 
-			Text="密码" Style="{StaticResource LblTbBase}"></TextBlock>
+			Text="Windows密码" Style="{StaticResource LblTbBase}"></TextBlock>
         <PasswordBox 
             x:Name="PbPassword"
 			Grid.Row="1" Grid.Column="1" Margin="0 2" Height="26"

+ 1 - 1
src/AppViews0/MinerStudio/Views/Ucs/RemoteDesktopLogin.xaml.cs

@@ -15,7 +15,7 @@ namespace NTMiner.MinerStudio.Views.Ucs {
                 CloseVisible = System.Windows.Visibility.Visible,
                 FooterVisible = System.Windows.Visibility.Collapsed
             }, ucFactory: (window) => {
-                window.AddCloseWindowOnecePath(vm.Id);
+                window.BuildCloseWindowOnecePath(vm.Id);
                 return new RemoteDesktopLogin(vm);
             }, beforeShow: (window, uc)=> {
                 uc.DoFocus();

+ 3 - 3
src/AppViews0/MinerStudio/Views/Ucs/UserPage.xaml.cs

@@ -30,10 +30,10 @@ namespace NTMiner.MinerStudio.Views.Ucs {
             this.DataContext = this.Vm;
             InitializeComponent();
             this.OnLoaded(window => {
-                window.AddEventPath<Per20SecondEvent>("外网群控用户列表页面打开着时周期刷新", LogEnum.DevConsole, action: message => {
+                window.BuildEventPath<Per20SecondEvent>("外网群控用户列表页面打开着时周期刷新", LogEnum.DevConsole, path: message => {
                     Vm.Refresh();
                 }, this.GetType());
-                window.AddEventPath<UserEnabledEvent>("外网群控用户列表页面打开着时,用户启用后刷新Vm内存", LogEnum.DevConsole, action: message => {
+                window.BuildEventPath<UserEnabledEvent>("外网群控用户列表页面打开着时,用户启用后刷新Vm内存", LogEnum.DevConsole, path: message => {
                     UIThread.Execute(() => {
                         var userVm = Vm.QueryResults.FirstOrDefault(a => a.LoginName == message.Source.LoginName);
                         if (userVm != null) {
@@ -41,7 +41,7 @@ namespace NTMiner.MinerStudio.Views.Ucs {
                         }
                     });
                 }, this.GetType());
-                window.AddEventPath<UserDisabledEvent>("外网群控用户列表页面打开着时,用户禁用后刷新Vm内存", LogEnum.DevConsole, action: message => {
+                window.BuildEventPath<UserDisabledEvent>("外网群控用户列表页面打开着时,用户禁用后刷新Vm内存", LogEnum.DevConsole, path: message => {
                     UIThread.Execute(() => {
                         var userVm = Vm.QueryResults.FirstOrDefault(a => a.LoginName == message.Source.LoginName);
                         if (userVm != null) {

+ 1 - 1
src/AppViews0/MinerStudio/Views/Ucs/VirtualMemory.xaml.cs

@@ -21,7 +21,7 @@ namespace NTMiner.MinerStudio.Views.Ucs {
                 FooterVisible = Visibility.Collapsed
             }, ucFactory: (window) => {
                 MinerStudioService.Instance.GetDrivesAsync(vm.MinerClientVm);
-                window.AddEventPath<GetDrivesResponsedEvent>("收到了GetDrives的响应时绑定到界面", LogEnum.DevConsole, action: message => {
+                window.BuildEventPath<GetDrivesResponsedEvent>("收到了GetDrives的响应时绑定到界面", LogEnum.DevConsole, path: message => {
                     if (message.ClientId != vm.MinerClientVm.ClientId) {
                         return;
                     }

+ 1 - 1
src/AppViews0/MinerStudio/Views/Ucs/WsServerNodePage.xaml.cs

@@ -29,7 +29,7 @@ namespace NTMiner.MinerStudio.Views.Ucs {
             this.DataContext = this.Vm;
             InitializeComponent();
             this.OnLoaded(window => {
-                window.AddEventPath<Per20SecondEvent>("外网群控服务器节点列表页面打开着时周期刷新", LogEnum.None, action: message => {
+                window.BuildEventPath<Per20SecondEvent>("外网群控服务器节点列表页面打开着时周期刷新", LogEnum.None, path: message => {
                     Vm.Refresh();
                 }, this.GetType());
             });

+ 4 - 4
src/AppViews0/Views/KernelsWindow.xaml.cs

@@ -42,14 +42,14 @@ namespace NTMiner.Views {
                 this.Width += 600;
             }
             this.TbUcName.Text = nameof(KernelsWindow);
-            this.AddEventPath<MineStopedEvent>("当内核宝库窗口开着时如果是本地手动停止的挖矿则引发UserActionEvent事件", LogEnum.DevConsole,
-                action: message => {
+            this.BuildEventPath<MineStopedEvent>("当内核宝库窗口开着时如果是本地手动停止的挖矿则引发UserActionEvent事件", LogEnum.DevConsole,
+                path: message => {
                     if (message.StopReason == StopMineReason.LocalUserAction) {
                         VirtualRoot.RaiseEvent(new UserActionEvent());
                     }
                 }, location: this.GetType());
-            this.AddEventPath<LocalContextReInitedEventHandledEvent>("ServerContext的Vm集刷新后刷新内核宝库", LogEnum.DevConsole,
-                action: message => {
+            this.BuildEventPath<LocalContextReInitedEventHandledEvent>("ServerContext的Vm集刷新后刷新内核宝库", LogEnum.DevConsole,
+                path: message => {
                     Vm.OnPropertyChanged(nameof(Vm.QueryResults));
                 }, location: this.GetType());
             AppRoot.KernelVms.PropertyChanged += Current_PropertyChanged;

+ 9 - 13
src/AppViews0/Views/MainWindow.xaml

@@ -401,23 +401,19 @@
 								            Padding="3 0 0 0"
                                             ToolTip="1. 尽量别使用中文,因为有些矿池不支持中文矿工名;2. 点号、空格、减号、下划线将被去除。"
                                             IsReadOnly="{Binding MinerProfile.IsMining}"
+                                            IsEnabled="{Binding MinerProfile.IsSystemName,Converter={StaticResource BoolInvertConverter}}"
 								            Background="{Binding MinerProfile.IsMining,Converter={StaticResource TrueTransparentElseWhiteConverter}}"
 								            Text="{Binding MinerProfile.MinerName, UpdateSourceTrigger=LostFocus}" 
 								            VerticalContentAlignment="Center">
                                         </TextBox>
-                                        <controls:KbButton 
-								            BorderThickness="0"
-								            ToolTip="使用本机名作为矿工名"
-								            Command="{Binding UseThisPcName}"
-								            Background="Transparent"
-								            CornerRadius="2">
-                                            <Path
-									            Width="16"
-									            Height="14"
-									            Data="{StaticResource Icon_Windows}"
-									            Fill="{StaticResource BtnBackground}"
-									            Stretch="Fill" />
-                                        </controls:KbButton>
+                                        <CheckBox
+                                            Margin="2 0 0 0"
+                                            VerticalAlignment="Center"
+								            Padding="0"
+                                            ToolTip="使用本机名作为矿工名"
+								            FocusVisualStyle="{x:Null}"
+								            IsChecked="{Binding MinerProfile.IsSystemName}">
+                                        </CheckBox>
                                     </WrapPanel>
                                     <uc:StartStopMineButton Margin="10 -2 0 0" StartButtonBackground="{StaticResource BtnBackground}" StartButtonForeground="White">
                                     </uc:StartStopMineButton>

+ 5 - 7
src/AppViews0/Views/MainWindow.xaml.cs

@@ -34,11 +34,9 @@ namespace NTMiner.Views {
 #if DEBUG
             NTStopwatch.Start();
 #endif
-            ConsoleWindow.Instance.Show();
             ConsoleWindow.Instance.MouseDown += (sender, e) => {
                 MoveConsoleWindow();
             };
-            this.Owner = ConsoleWindow.Instance;
             SystemEvents.SessionSwitch += SystemEvents_SessionSwitch;
             this.Loaded += (sender, e) => {
                 ConsoleTabItemTopBorder.Margin = new Thickness(0, ConsoleTabItem.ActualHeight - 1, 0, 0);
@@ -161,21 +159,21 @@ namespace NTMiner.Views {
             this.LocationChanged += (sender, e) => {
                 MoveConsoleWindow();
             };
-            VirtualRoot.AddCmdPath<TopmostCommand>(action: message => {
+            VirtualRoot.BuildCmdPath<TopmostCommand>(path: message => {
                 UIThread.Execute(() => {
                     if (!this.Topmost) {
                         this.Topmost = true;
                     }
                 });
             }, this.GetType());
-            VirtualRoot.AddCmdPath<UnTopmostCommand>(action: message => {
+            VirtualRoot.BuildCmdPath<UnTopmostCommand>(path: message => {
                 UIThread.Execute(() => {
                     if (this.Topmost) {
                         this.Topmost = false;
                     }
                 });
             }, this.GetType());
-            VirtualRoot.AddCmdPath<CloseMainWindowCommand>(action: message => {
+            VirtualRoot.BuildCmdPath<CloseMainWindowCommand>(path: message => {
                 UIThread.Execute(() => {
                     if (message.IsAutoNoUi) {
                         SwitchToNoUi();
@@ -185,8 +183,8 @@ namespace NTMiner.Views {
                     }
                 });
             }, location: this.GetType());
-            this.AddEventPath<Per1MinuteEvent>("挖矿中时自动切换为无界面模式", LogEnum.DevConsole,
-                action: message => {
+            this.BuildEventPath<Per1MinuteEvent>("挖矿中时自动切换为无界面模式", LogEnum.DevConsole,
+                path: message => {
                     if (NTMinerContext.IsUiVisible && NTMinerContext.Instance.MinerProfile.IsAutoNoUi && NTMinerContext.Instance.IsMining) {
                         if (NTMinerContext.MainWindowRendedOn.AddMinutes(NTMinerContext.Instance.MinerProfile.AutoNoUiMinutes) < message.BornOn) {
                             VirtualRoot.ThisLocalInfo(nameof(MainWindow), $"挖矿中界面展示{NTMinerContext.Instance.MinerProfile.AutoNoUiMinutes}分钟后自动切换为无界面模式,可在选项页调整配置");

+ 2 - 1
src/AppViews0/Views/NotificationSample.xaml.cs

@@ -13,7 +13,8 @@ namespace NTMiner.Views {
                     Title = "通知示例",
                     Width = 800,
                     Height = 500,
-                    CloseVisible = Visibility.Visible
+                    CloseVisible = Visibility.Visible,
+                    IsChildWindow = true
                 }, ucFactory: (window) => {
                     var uc = new NotificationSample();
                     return uc;

+ 4 - 4
src/AppViews0/Views/Ucs/Calc.xaml.cs

@@ -33,14 +33,14 @@ namespace NTMiner.Views.Ucs {
             this.DataContext = this.Vm;
             InitializeComponent();
             this.OnLoaded((window) => {
-                window.AddEventPath<CalcConfigSetInitedEvent>("收益计算器数据集刷新后刷新VM", LogEnum.DevConsole,
-                    action: message => {
+                window.BuildEventPath<CalcConfigSetInitedEvent>("收益计算器数据集刷新后刷新VM", LogEnum.DevConsole,
+                    path: message => {
                         foreach (var coinVm in Vm.CoinVms.AllCoins) {
                             coinVm.CoinIncomeVm.Refresh();
                         }
                     }, location: this.GetType());
-                window.AddEventPath<Per1MinuteEvent>("当收益计算器页面打开着的时候周期刷新", LogEnum.None,
-                    action: message => {
+                window.BuildEventPath<Per1MinuteEvent>("当收益计算器页面打开着的时候周期刷新", LogEnum.None,
+                    path: message => {
                         if (Vm.CoinVms.AllCoins.Count == 0) {
                             return;
                         }

+ 1 - 1
src/AppViews0/Views/Ucs/CoinEdit.xaml.cs

@@ -15,7 +15,7 @@ namespace NTMiner.Views.Ucs {
             }, ucFactory: (window) =>
             {
                 CoinViewModel vm = new CoinViewModel(source);
-                window.AddCloseWindowOnecePath(vm.Id);
+                window.BuildCloseWindowOnecePath(vm.Id);
                 return new CoinEdit(vm);
             }, fixedSize: true);
         }

+ 1 - 1
src/AppViews0/Views/Ucs/CoinKernelEdit.xaml.cs

@@ -19,7 +19,7 @@ namespace NTMiner.Views.Ucs {
             }, ucFactory: (window) =>
             {
                 CoinKernelViewModel vm = new CoinKernelViewModel(source);
-                window.AddCloseWindowOnecePath(vm.Id);
+                window.BuildCloseWindowOnecePath(vm.Id);
                 return new CoinKernelEdit(vm);
             }, fixedSize: true);
         }

+ 2 - 2
src/AppViews0/Views/Ucs/CoinKernelSelect.xaml.cs

@@ -9,12 +9,12 @@ namespace NTMiner.Views.Ucs {
             this.Init(vm);
             InitializeComponent();
             this.OnLoaded(window => {
-                window.AddEventPath<CoinKernelVmAddedEvent>("添加了币种内核后,如果添加的币种内核是当前选中的币种的币种内核则刷新币种内核选择下拉列表的Vm内存", LogEnum.DevConsole, action: message => {
+                window.BuildEventPath<CoinKernelVmAddedEvent>("添加了币种内核后,如果添加的币种内核是当前选中的币种的币种内核则刷新币种内核选择下拉列表的Vm内存", LogEnum.DevConsole, path: message => {
                     if (message.Event.Source.CoinId == vm.Coin.Id) {
                         vm.OnPropertyChanged(nameof(vm.QueryResults));
                     }
                 }, this.GetType());
-                window.AddEventPath<CoinKernelVmRemovedEvent>("删除了币种内核后,如果删除的币种内核是当前选中的币种的币种内核则刷新币种内核选择下拉列表的Vm内存", LogEnum.DevConsole, action: message => {
+                window.BuildEventPath<CoinKernelVmRemovedEvent>("删除了币种内核后,如果删除的币种内核是当前选中的币种的币种内核则刷新币种内核选择下拉列表的Vm内存", LogEnum.DevConsole, path: message => {
                     if (message.Event.Source.CoinId == vm.Coin.Id) {
                         vm.OnPropertyChanged(nameof(vm.QueryResults));
                     }

+ 2 - 2
src/AppViews0/Views/Ucs/CoinSelect.xaml.cs

@@ -9,11 +9,11 @@ namespace NTMiner.Views.Ucs {
             this.Init(vm);
             InitializeComponent();
             this.OnLoaded(window => {
-                window.AddEventPath<CoinVmAddedEvent>("添加了币种后,刷新币种选择下拉列表的Vm内存", LogEnum.DevConsole, action: message => {
+                window.BuildEventPath<CoinVmAddedEvent>("添加了币种后,刷新币种选择下拉列表的Vm内存", LogEnum.DevConsole, path: message => {
                     vm.OnPropertyChanged(nameof(vm.QueryResults));
                     vm.OnPropertyChanged(nameof(vm.HotCoins));
                 }, this.GetType());
-                window.AddEventPath<CoinVmRemovedEvent>("删除了币种后,刷新币种选择下拉列表的Vm内存", LogEnum.DevConsole, action: message => {
+                window.BuildEventPath<CoinVmRemovedEvent>("删除了币种后,刷新币种选择下拉列表的Vm内存", LogEnum.DevConsole, path: message => {
                     vm.OnPropertyChanged(nameof(vm.QueryResults));
                     vm.OnPropertyChanged(nameof(vm.HotCoins));
                 }, this.GetType());

+ 1 - 1
src/AppViews0/Views/Ucs/EnvironmentVariableEdit.xaml.cs

@@ -13,7 +13,7 @@ namespace NTMiner.Views.Ucs {
             }, ucFactory: (window) =>
             {
                 EnvironmentVariableEditViewModel vm = new EnvironmentVariableEditViewModel(coinKernelVm, environmentVariable);
-                window.AddCloseWindowOnecePath(vm.Id);
+                window.BuildCloseWindowOnecePath(vm.Id);
                 return new EnvironmentVariableEdit(vm);
             }, fixedSize: true);
         }

+ 5 - 3
src/AppViews0/Views/Ucs/FileWriterEdit.xaml

@@ -8,6 +8,7 @@
     xmlns:vm="clr-namespace:NTMiner.Vms;assembly=AppModels"
     xmlns:controls="clr-namespace:NTMiner.Controls;assembly=NTMinerWpf"
     xmlns:local="clr-namespace:NTMiner.Views.Ucs" 
+	xmlns:app="clr-namespace:NTMiner;assembly=AppModels"
     mc:Ignorable="d"
     d:DesignWidth="950"
     d:DataContext="{d:DesignData Source=../Design/FileWriterViewModel.xaml}"
@@ -20,24 +21,25 @@
     <StackPanel Margin="10">
         <WrapPanel Margin="0 2">
             <TextBlock Text="名称" Width="100" Style="{StaticResource LblTb}"></TextBlock>
-            <TextBox Width="400" VerticalContentAlignment="Center" Text="{Binding Name, ValidatesOnExceptions=True}">
+            <TextBox Width="400" VerticalContentAlignment="Center" Text="{Binding Name, ValidatesOnExceptions=True}" IsReadOnly="{x:Static app:AppStatic.IsNotDevMode}">
             </TextBox>
         </WrapPanel>
         <WrapPanel Margin="0 2">
             <TextBlock Text="写入位置" Width="100" Style="{StaticResource LblTb}"></TextBlock>
-            <TextBox Width="400" VerticalContentAlignment="Center" Text="{Binding FileUrl, ValidatesOnExceptions=True}">
+            <TextBox Width="400" VerticalContentAlignment="Center" Text="{Binding FileUrl, ValidatesOnExceptions=True}" IsReadOnly="{x:Static app:AppStatic.IsNotDevMode}">
             </TextBox>
             <TextBlock Foreground="Red" VerticalAlignment="Center">(相对路径)</TextBlock>
         </WrapPanel>
         <WrapPanel Margin="0 2">
             <TextBlock Text="写入的内容" Width="100" Style="{StaticResource LblTb}" VerticalAlignment="Top"></TextBlock>
-            <controls:KbMuiltilineTextBox Width="800" Height="100" Text="{Binding Body, ValidatesOnExceptions=True}">
+            <controls:KbMuiltilineTextBox Width="800" Height="100" Text="{Binding Body, ValidatesOnExceptions=True}" IsReadOnly="{x:Static app:AppStatic.IsNotDevMode}">
             </controls:KbMuiltilineTextBox>
         </WrapPanel>
         <WrapPanel Margin="0 10 0 0" HorizontalAlignment="Center" VerticalAlignment="Center">
             <controls:KbButton
                 Command="{Binding Save}" 
                 Padding="15 2"
+                Visibility="{x:Static app:AppStatic.IsDevModeVisible}"
                 Background="{StaticResource BtnBackground}"
                 Foreground="{StaticResource BtnForeground}"
                 CornerRadius="2">

+ 1 - 1
src/AppViews0/Views/Ucs/FileWriterEdit.xaml.cs

@@ -14,7 +14,7 @@ namespace NTMiner.Views.Ucs {
             }, ucFactory: (window) =>
             {
                 FileWriterViewModel vm = new FileWriterViewModel(source);
-                window.AddCloseWindowOnecePath(vm.Id);
+                window.BuildCloseWindowOnecePath(vm.Id);
                 return new FileWriterEdit(vm);
             }, fixedSize: true);
         }

+ 4 - 2
src/AppViews0/Views/Ucs/FragmentWriterEdit.xaml

@@ -8,6 +8,7 @@
     xmlns:vm="clr-namespace:NTMiner.Vms;assembly=AppModels"
     xmlns:controls="clr-namespace:NTMiner.Controls;assembly=NTMinerWpf"
     xmlns:local="clr-namespace:NTMiner.Views.Ucs" 
+	xmlns:app="clr-namespace:NTMiner;assembly=AppModels"
     mc:Ignorable="d"
     d:DesignWidth="950"
     d:DataContext="{d:DesignData Source=../Design/FragmentWriterViewModel.xaml}"
@@ -20,18 +21,19 @@
     <StackPanel Margin="10">
         <WrapPanel Margin="0 2">
             <TextBlock Text="名称" Width="100" Style="{StaticResource LblTb}"></TextBlock>
-            <TextBox Width="400" VerticalContentAlignment="Center" Text="{Binding Name, ValidatesOnExceptions=True}">
+            <TextBox Width="400" VerticalContentAlignment="Center" Text="{Binding Name, ValidatesOnExceptions=True}" IsReadOnly="{x:Static app:AppStatic.IsNotDevMode}">
             </TextBox>
         </WrapPanel>
         <WrapPanel Margin="0 2">
             <TextBlock Text="写入的内容" Width="100" Style="{StaticResource LblTb}" VerticalAlignment="Top"></TextBlock>
-            <controls:KbMuiltilineTextBox Width="800" Height="100" Text="{Binding Body, ValidatesOnExceptions=True}">
+            <controls:KbMuiltilineTextBox Width="800" Height="100" Text="{Binding Body, ValidatesOnExceptions=True}" IsReadOnly="{x:Static app:AppStatic.IsNotDevMode}">
             </controls:KbMuiltilineTextBox>
         </WrapPanel>
         <WrapPanel Margin="0 10 0 0" HorizontalAlignment="Center" VerticalAlignment="Center">
             <controls:KbButton
                 Command="{Binding Save}" 
                 Padding="15 2"
+                Visibility="{x:Static app:AppStatic.IsDevModeVisible}"
                 Background="{StaticResource BtnBackground}"
                 Foreground="{StaticResource BtnForeground}"
                 CornerRadius="2">

+ 1 - 1
src/AppViews0/Views/Ucs/FragmentWriterEdit.xaml.cs

@@ -14,7 +14,7 @@ namespace NTMiner.Views.Ucs {
             }, ucFactory: (window) =>
             {
                 FragmentWriterViewModel vm = new FragmentWriterViewModel(source);
-                window.AddCloseWindowOnecePath(vm.Id);
+                window.BuildCloseWindowOnecePath(vm.Id);
                 return new FragmentWriterEdit(vm);
             }, fixedSize: true);
         }

+ 1 - 1
src/AppViews0/Views/Ucs/GroupEdit.xaml.cs

@@ -14,7 +14,7 @@ namespace NTMiner.Views.Ucs {
             }, ucFactory: (window) =>
             {
                 GroupViewModel vm = new GroupViewModel(source);
-                window.AddCloseWindowOnecePath(vm.Id);
+                window.BuildCloseWindowOnecePath(vm.Id);
                 return new GroupEdit(vm);
             }, fixedSize: true);
         }

+ 1 - 1
src/AppViews0/Views/Ucs/InnerProperty.xaml.cs

@@ -14,7 +14,7 @@ namespace NTMiner.Views.Ucs {
             this.DataContext = this.Vm;
             InitializeComponent();
             this.OnLoaded(window => {
-                window.AddEventPath<ServerJsonVersionChangedEvent>("刷新展示的ServerJsonVersion", LogEnum.DevConsole, action: message => {
+                window.BuildEventPath<ServerJsonVersionChangedEvent>("刷新展示的ServerJsonVersion", LogEnum.DevConsole, path: message => {
                     Vm.ServerJsonVersion = NTMinerContext.Instance.GetServerJsonVersion();
                 }, location: this.GetType());
             });

+ 1 - 1
src/AppViews0/Views/Ucs/InputSegmentEdit.xaml.cs

@@ -12,7 +12,7 @@ namespace NTMiner.Views.Ucs {
             }, ucFactory: (window) =>
             {
                 InputSegmentEditViewModel vm = new InputSegmentEditViewModel(coinKernelVm, segment);
-                window.AddCloseWindowOnecePath(vm.Id);
+                window.BuildCloseWindowOnecePath(vm.Id);
                 return new InputSegmentEdit(vm);
             }, fixedSize: true);
         }

+ 0 - 1
src/AppViews0/Views/Ucs/KernelEdit.xaml

@@ -212,7 +212,6 @@
 					</StackPanel>
 
 					<StackPanel Grid.Row="1">
-						<TextBlock Visibility="{x:Static app:AppStatic.IsDevModeVisible}" Foreground="Red" HorizontalAlignment="Center">不要覆盖OSS上已有的文件,防止OSS缓存文件</TextBlock>
 						<controls:KbButton
 							Command="{Binding Save}" 
 							Visibility="{x:Static app:AppStatic.IsDevModeVisible}"

+ 1 - 1
src/AppViews0/Views/Ucs/KernelEdit.xaml.cs

@@ -18,7 +18,7 @@ namespace NTMiner.Views.Ucs {
                 FooterVisible = Visibility.Collapsed
             }, ucFactory: (window) => {
                 KernelViewModel vm = new KernelViewModel(source);
-                window.AddCloseWindowOnecePath(vm.Id);
+                window.BuildCloseWindowOnecePath(vm.Id);
                 return new KernelEdit(vm);
             }, fixedSize: false);
         }

+ 1 - 1
src/AppViews0/Views/Ucs/KernelInputEdit.xaml

@@ -38,7 +38,7 @@
 		<StackPanel Margin="0 0 10 10">
 			<WrapPanel Margin="0 2">
 				<TextBlock Style="{StaticResource LblTb}" Text="名称"></TextBlock>
-				<TextBox Width="450" VerticalContentAlignment="Center" Text="{Binding Name, ValidatesOnExceptions=True}">
+                <TextBox Width="450" VerticalContentAlignment="Center" Text="{Binding Name, ValidatesOnExceptions=True}" IsReadOnly="{x:Static app:AppStatic.IsNotDevMode}">
 				</TextBox>
 			</WrapPanel>
 			<WrapPanel Margin="0 2">

+ 1 - 1
src/AppViews0/Views/Ucs/KernelInputEdit.xaml.cs

@@ -13,7 +13,7 @@ namespace NTMiner.Views.Ucs {
                 CloseVisible = System.Windows.Visibility.Visible
             }, ucFactory: (window) => {
                 KernelInputViewModel vm = new KernelInputViewModel(source);
-                window.AddCloseWindowOnecePath(vm.Id);
+                window.BuildCloseWindowOnecePath(vm.Id);
                 return new KernelInputEdit(vm);
             }, fixedSize: true);
         }

+ 1 - 1
src/AppViews0/Views/Ucs/KernelOutputEdit.xaml.cs

@@ -14,7 +14,7 @@ namespace NTMiner.Views.Ucs {
             }, ucFactory: (window) =>
             {
                 KernelOutputViewModel vm = new KernelOutputViewModel(source);
-                window.AddCloseWindowOnecePath(vm.Id);
+                window.BuildCloseWindowOnecePath(vm.Id);
                 return new KernelOutputEdit(vm);
             }, fixedSize: true);
         }

+ 1 - 1
src/AppViews0/Views/Ucs/KernelOutputKeywordEdit.xaml.cs

@@ -13,7 +13,7 @@ namespace NTMiner.Views.Ucs {
             }, ucFactory: (window) =>
             {
                 KernelOutputKeywordViewModel vm = new KernelOutputKeywordViewModel(data);
-                window.AddCloseWindowOnecePath(vm.Id);
+                window.BuildCloseWindowOnecePath(vm.Id);
                 return new KernelOutputKeywordEdit(vm);
             }, fixedSize: true);
         }

+ 1 - 1
src/AppViews0/Views/Ucs/KernelOutputTranslaterEdit.xaml.cs

@@ -15,7 +15,7 @@ namespace NTMiner.Views.Ucs {
             }, ucFactory: (window) =>
             {
                 KernelOutputTranslaterViewModel vm = new KernelOutputTranslaterViewModel(source);
-                window.AddCloseWindowOnecePath(vm.Id);
+                window.BuildCloseWindowOnecePath(vm.Id);
                 return new KernelOutputTranslaterEdit(vm);
             }, fixedSize: true);
         }

+ 17 - 5
src/AppViews0/Views/Ucs/MainMenu.xaml

@@ -75,7 +75,7 @@
 						Stretch="Fill" />
                 </MenuItem.Icon>
             </MenuItem>
-            <MenuItem Width="26" Height="26" Visibility="{x:Static app:AppStatic.IsDevModeVisible}">
+            <MenuItem Width="26" Height="26" ToolTip="这是开发者菜单,对矿工无用">
 				<MenuItem.Icon>
 					<Path
 						Width="14"
@@ -94,7 +94,10 @@
 							Stretch="Fill" />
                     </MenuItem.Icon>
                 </MenuItem>
-                <MenuItem Header="{x:Static app:AppStatic.ExportServerJsonMenuName}" Command="{x:Static app:AppStatic.ExportServerJson}">
+                <MenuItem 
+                    Header="{x:Static app:AppStatic.ExportServerJsonMenuName}" 
+                    Command="{x:Static app:AppStatic.ExportServerJson}" 
+                    Visibility="{x:Static app:AppStatic.IsDevModeVisible}">
 					<MenuItem.Icon>
 						<Path
 							Width="14"
@@ -104,7 +107,10 @@
 							Stretch="Fill" />
 					</MenuItem.Icon>
                 </MenuItem>
-                <MenuItem Header="server db" Command="{x:Static app:AppStatic.OpenServerLiteDb}">
+                <MenuItem 
+                    Header="server db" 
+                    Command="{x:Static app:AppStatic.OpenServerLiteDb}" 
+                    Visibility="{x:Static app:AppStatic.IsDevModeVisible}">
                     <MenuItem.Icon>
                         <Path
 							Width="14"
@@ -114,7 +120,10 @@
 							Stretch="Fill" />
                     </MenuItem.Icon>
                 </MenuItem>
-                <MenuItem Header="local db" Command="{x:Static app:AppStatic.OpenLocalLiteDb}">
+                <MenuItem 
+                    Header="local db" 
+                    Command="{x:Static app:AppStatic.OpenLocalLiteDb}" 
+                    Visibility="{x:Static app:AppStatic.IsDevModeVisible}">
 					<MenuItem.Icon>
 						<Path
 							Width="14"
@@ -174,7 +183,10 @@
 							Stretch="Fill" />
 					</MenuItem.Icon>
 				</MenuItem>
-				<MenuItem Header="通知中心Demo" Command="{x:Static app:AppStatic.ShowNotificationSample}">
+				<MenuItem 
+                    Header="通知中心Demo" 
+                    Command="{x:Static app:AppStatic.ShowNotificationSample}" 
+                    Visibility="{x:Static app:AppStatic.IsDevModeVisible}">
 					<MenuItem.Icon>
 						<Path
 							Width="14"

+ 2 - 2
src/AppViews0/Views/Ucs/MinerProfileDual.xaml.cs

@@ -14,8 +14,8 @@ namespace NTMiner.Views.Ucs {
             this.DataContext = MinerProfileViewModel.Instance;
             InitializeComponent();
             this.OnLoaded((window) => {
-                window.AddEventPath<LocalContextReInitedEventHandledEvent>("本地上下文视图模型集刷新后刷新界面上的popup", LogEnum.DevConsole,
-                    action: message => {
+                window.BuildEventPath<LocalContextReInitedEventHandledEvent>("本地上下文视图模型集刷新后刷新界面上的popup", LogEnum.DevConsole,
+                    path: message => {
                         UIThread.Execute(() => {
                             if (Vm.MineWork != null) {
                                 return;

Kaikkia tiedostoja ei voida näyttää, sillä liian monta tiedostoa muuttui tässä diffissä