Skip to content

Commit 9dc196d

Browse files
author
ntminer
committed
test
1 parent a4f080e commit 9dc196d

File tree

262 files changed

+2041
-1227
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

262 files changed

+2041
-1227
lines changed

NTMiner.sln

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -110,6 +110,8 @@ Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "WsServer", "src\WsServer\Ws
110110
EndProject
111111
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Tools", "Tools", "{E0B0D173-418C-49D0-9018-99BC6C526CF5}"
112112
EndProject
113+
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "MinerGpu", "src\MinerGpu\MinerGpu.csproj", "{AB085388-E970-491F-ABFC-27D556C27332}"
114+
EndProject
113115
Global
114116
GlobalSection(SolutionConfigurationPlatforms) = preSolution
115117
Debug|Any CPU = Debug|Any CPU
@@ -432,6 +434,18 @@ Global
432434
{637E9AD8-6410-419B-8FEE-2528130F871A}.Release|x64.Build.0 = Release|Any CPU
433435
{637E9AD8-6410-419B-8FEE-2528130F871A}.Release|x86.ActiveCfg = Release|Any CPU
434436
{637E9AD8-6410-419B-8FEE-2528130F871A}.Release|x86.Build.0 = Release|Any CPU
437+
{AB085388-E970-491F-ABFC-27D556C27332}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
438+
{AB085388-E970-491F-ABFC-27D556C27332}.Debug|Any CPU.Build.0 = Debug|Any CPU
439+
{AB085388-E970-491F-ABFC-27D556C27332}.Debug|x64.ActiveCfg = Debug|Any CPU
440+
{AB085388-E970-491F-ABFC-27D556C27332}.Debug|x64.Build.0 = Debug|Any CPU
441+
{AB085388-E970-491F-ABFC-27D556C27332}.Debug|x86.ActiveCfg = Debug|Any CPU
442+
{AB085388-E970-491F-ABFC-27D556C27332}.Debug|x86.Build.0 = Debug|Any CPU
443+
{AB085388-E970-491F-ABFC-27D556C27332}.Release|Any CPU.ActiveCfg = Release|Any CPU
444+
{AB085388-E970-491F-ABFC-27D556C27332}.Release|Any CPU.Build.0 = Release|Any CPU
445+
{AB085388-E970-491F-ABFC-27D556C27332}.Release|x64.ActiveCfg = Release|Any CPU
446+
{AB085388-E970-491F-ABFC-27D556C27332}.Release|x64.Build.0 = Release|Any CPU
447+
{AB085388-E970-491F-ABFC-27D556C27332}.Release|x86.ActiveCfg = Release|Any CPU
448+
{AB085388-E970-491F-ABFC-27D556C27332}.Release|x86.Build.0 = Release|Any CPU
435449
EndGlobalSection
436450
GlobalSection(SolutionProperties) = preSolution
437451
HideSolutionNode = FALSE
@@ -465,6 +479,7 @@ Global
465479
{E7B88637-7704-4701-98E0-7875BB6E8C98} = {2C8C5FC2-8B81-4228-8EBD-6B491216FBC1}
466480
{637E9AD8-6410-419B-8FEE-2528130F871A} = {2C8C5FC2-8B81-4228-8EBD-6B491216FBC1}
467481
{E0B0D173-418C-49D0-9018-99BC6C526CF5} = {B8FD9576-411F-4634-89D9-806FFD21DBA3}
482+
{AB085388-E970-491F-ABFC-27D556C27332} = {B8FD9576-411F-4634-89D9-806FFD21DBA3}
468483
EndGlobalSection
469484
GlobalSection(ExtensibilityGlobals) = postSolution
470485
SolutionGuid = {A5D14B0A-73FF-46E8-87F3-7E83FFC1DBDD}

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
2. 开源矿工永远开源;
55
3. 开源矿工永远不会去破解国人开发的内核;
66

7-
## [下载地址1](https://zhuanlan.zhihu.com/p/138095293)
7+
## [下载地址1](https://www.cnblogs.com/ntminer/p/11923722.html)
88
### 从源码编译:Visual Studio 2019
99

1010
## 开源软件

src/AppModels/AppModels.csproj

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -136,7 +136,6 @@
136136
<Compile Include="Vms\LocalMessageDtoViewModel.cs" />
137137
<Compile Include="Vms\LogFilesViewModel.cs" />
138138
<Compile Include="Vms\MainMenuViewModel.cs" />
139-
<Compile Include="Vms\MessagePathIdsViewModel.cs" />
140139
<Compile Include="Vms\MessageTypeItem`1.cs" />
141140
<Compile Include="MinerStudio\Vms\MinerClientFinderConfigViewModel.cs" />
142141
<Compile Include="MinerStudio\Vms\MinerGroupSelectViewModel.cs" />

src/AppModels/AppRoot.cs

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -23,16 +23,16 @@ static AppRoot() {
2323

2424
#region methods
2525
// 因为是上下文路径,无需返回路径标识
26-
public static void AddCmdPath<TCmd>(string description, LogEnum logType, Action<TCmd> action, Type location)
26+
public static void BuildCmdPath<TCmd>(string description, LogEnum logType, Action<TCmd> path, Type location)
2727
where TCmd : ICmd {
28-
var messagePathId = VirtualRoot.AddMessagePath(description, logType, action, location);
28+
var messagePathId = VirtualRoot.BuildMessagePath(description, logType, path, location);
2929
_contextPathIds.Add(messagePathId);
3030
}
3131

3232
// 因为是上下文路径,无需返回路径标识
33-
public static void AddEventPath<TEvent>(string description, LogEnum logType, Action<TEvent> action, Type location)
33+
public static void BuildEventPath<TEvent>(string description, LogEnum logType, Action<TEvent> path, Type location)
3434
where TEvent : IEvent {
35-
var messagePathId = VirtualRoot.AddMessagePath(description, logType, action, location);
35+
var messagePathId = VirtualRoot.BuildMessagePath(description, logType, path, location);
3636
_contextPathIds.Add(messagePathId);
3737
}
3838

src/AppModels/AppRoot.partials.CoinGroupViewModels.cs

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -13,18 +13,18 @@ private CoinGroupViewModels() {
1313
if (WpfUtil.IsInDesignMode) {
1414
return;
1515
}
16-
VirtualRoot.AddEventPath<ServerContextReInitedEvent>("ServerContext刷新后刷新VM内存", LogEnum.DevConsole,
17-
action: message => {
16+
VirtualRoot.BuildEventPath<ServerContextReInitedEvent>("ServerContext刷新后刷新VM内存", LogEnum.DevConsole,
17+
path: message => {
1818
_dicById.Clear();
1919
_listByGroupId.Clear();
2020
Init();
2121
}, location: this.GetType());
22-
VirtualRoot.AddEventPath<ServerContextReInitedEventHandledEvent>("ServerContext的VM集刷新后刷新视图界面", LogEnum.DevConsole,
23-
action: message => {
22+
VirtualRoot.BuildEventPath<ServerContextReInitedEventHandledEvent>("ServerContext的VM集刷新后刷新视图界面", LogEnum.DevConsole,
23+
path: message => {
2424
// 什么也不做,因为该集合没有什么属性
2525
}, location: this.GetType());
26-
AddEventPath<CoinGroupAddedEvent>("添加了币组后调整VM内存", LogEnum.DevConsole,
27-
action: (message) => {
26+
BuildEventPath<CoinGroupAddedEvent>("添加了币组后调整VM内存", LogEnum.DevConsole,
27+
path: (message) => {
2828
if (!_dicById.ContainsKey(message.Source.GetId())) {
2929
CoinGroupViewModel coinGroupVm = new CoinGroupViewModel(message.Source);
3030
_dicById.Add(message.Source.GetId(), coinGroupVm);
@@ -35,8 +35,8 @@ private CoinGroupViewModels() {
3535
OnGroupPropertyChanged(coinGroupVm.GroupId);
3636
}
3737
}, location: this.GetType());
38-
AddEventPath<CoinGroupRemovedEvent>("删除了币组后调整VM内存", LogEnum.DevConsole,
39-
action: (message) => {
38+
BuildEventPath<CoinGroupRemovedEvent>("删除了币组后调整VM内存", LogEnum.DevConsole,
39+
path: (message) => {
4040
if (_dicById.ContainsKey(message.Source.GetId())) {
4141
var entity = _dicById[message.Source.GetId()];
4242
_dicById.Remove(message.Source.GetId());

src/AppModels/AppRoot.partials.CoinKernelViewModels.cs

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -13,17 +13,17 @@ private CoinKernelViewModels() {
1313
if (WpfUtil.IsInDesignMode) {
1414
return;
1515
}
16-
VirtualRoot.AddEventPath<ServerContextReInitedEvent>("ServerContext刷新后刷新VM内存", LogEnum.DevConsole,
17-
action: message => {
16+
VirtualRoot.BuildEventPath<ServerContextReInitedEvent>("ServerContext刷新后刷新VM内存", LogEnum.DevConsole,
17+
path: message => {
1818
_dicById.Clear();
1919
Init();
2020
}, location: this.GetType());
21-
VirtualRoot.AddEventPath<ServerContextReInitedEventHandledEvent>("ServerContext的VM集刷新后刷新视图界面", LogEnum.DevConsole,
22-
action: message => {
21+
VirtualRoot.BuildEventPath<ServerContextReInitedEventHandledEvent>("ServerContext的VM集刷新后刷新视图界面", LogEnum.DevConsole,
22+
path: message => {
2323
OnPropertyChanged(nameof(AllCoinKernels));
2424
}, location: this.GetType());
25-
AddEventPath<CoinKernelAddedEvent>("添加了币种内核后刷新VM内存", LogEnum.DevConsole,
26-
action: (message) => {
25+
BuildEventPath<CoinKernelAddedEvent>("添加了币种内核后刷新VM内存", LogEnum.DevConsole,
26+
path: (message) => {
2727
var coinKernelVm = new CoinKernelViewModel(message.Source);
2828
_dicById.Add(message.Source.GetId(), coinKernelVm);
2929
OnPropertyChanged(nameof(AllCoinKernels));
@@ -36,8 +36,8 @@ private CoinKernelViewModels() {
3636
}
3737
VirtualRoot.RaiseEvent(new CoinKernelVmAddedEvent(message));
3838
}, location: this.GetType());
39-
AddEventPath<CoinKernelUpdatedEvent>("更新了币种内核后刷新VM内存", LogEnum.DevConsole,
40-
action: (message) => {
39+
BuildEventPath<CoinKernelUpdatedEvent>("更新了币种内核后刷新VM内存", LogEnum.DevConsole,
40+
path: (message) => {
4141
if (_dicById.TryGetValue(message.Source.GetId(), out CoinKernelViewModel vm)) {
4242
var supportedGpu = vm.SupportedGpu;
4343
Guid dualCoinGroupId = vm.DualCoinGroupId;
@@ -55,8 +55,8 @@ private CoinKernelViewModels() {
5555
}
5656
}
5757
}, location: this.GetType());
58-
AddEventPath<CoinKernelRemovedEvent>("移除了币种内核后刷新VM内存", LogEnum.DevConsole,
59-
action: (message) => {
58+
BuildEventPath<CoinKernelRemovedEvent>("移除了币种内核后刷新VM内存", LogEnum.DevConsole,
59+
path: (message) => {
6060
if (_dicById.TryGetValue(message.Source.GetId(), out CoinKernelViewModel coinKernelVm)) {
6161
_dicById.Remove(message.Source.GetId());
6262
OnPropertyChanged(nameof(AllCoinKernels));

src/AppModels/AppRoot.partials.CoinProfileViewModels.cs

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -15,20 +15,20 @@ private CoinProfileViewModels() {
1515
if (WpfUtil.IsInDesignMode) {
1616
return;
1717
}
18-
AddEventPath<CoinKernelProfilePropertyChangedEvent>("币种内核设置变更后刷新VM内存", LogEnum.DevConsole,
19-
action: message => {
18+
BuildEventPath<CoinKernelProfilePropertyChangedEvent>("币种内核设置变更后刷新VM内存", LogEnum.DevConsole,
19+
path: message => {
2020
if (_coinKernelProfileDicById.ContainsKey(message.CoinKernelId)) {
2121
_coinKernelProfileDicById[message.CoinKernelId].OnPropertyChanged(message.PropertyName);
2222
}
2323
}, location: this.GetType());
24-
AddEventPath<CoinProfilePropertyChangedEvent>("币种设置变更后刷新VM内存", LogEnum.DevConsole,
25-
action: message => {
24+
BuildEventPath<CoinProfilePropertyChangedEvent>("币种设置变更后刷新VM内存", LogEnum.DevConsole,
25+
path: message => {
2626
if (_coinProfileDicById.ContainsKey(message.CoinId)) {
2727
_coinProfileDicById[message.CoinId].OnPropertyChanged(message.PropertyName);
2828
}
2929
}, location: this.GetType());
30-
VirtualRoot.AddEventPath<LocalContextReInitedEvent>("LocalContext刷新后刷新VM内存", LogEnum.DevConsole,
31-
action: message => {
30+
VirtualRoot.BuildEventPath<LocalContextReInitedEvent>("LocalContext刷新后刷新VM内存", LogEnum.DevConsole,
31+
path: message => {
3232
_coinKernelProfileDicById.Clear();
3333
_coinProfileDicById.Clear();
3434
}, location: this.GetType());

src/AppModels/AppRoot.partials.CoinViewModels.cs

Lines changed: 14 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -16,43 +16,43 @@ private CoinViewModels() {
1616
if (WpfUtil.IsInDesignMode) {
1717
return;
1818
}
19-
VirtualRoot.AddEventPath<ServerContextReInitedEvent>("ServerContext刷新后刷新VM内存", LogEnum.DevConsole,
20-
action: message => {
19+
VirtualRoot.BuildEventPath<ServerContextReInitedEvent>("ServerContext刷新后刷新VM内存", LogEnum.DevConsole,
20+
path: message => {
2121
_dicById.Clear();
2222
Init();
2323
}, location: this.GetType());
24-
VirtualRoot.AddEventPath<ServerContextReInitedEventHandledEvent>("ServerContext的VM集刷新后刷新视图界面", LogEnum.DevConsole,
25-
action: message => {
24+
VirtualRoot.BuildEventPath<ServerContextReInitedEventHandledEvent>("ServerContext的VM集刷新后刷新视图界面", LogEnum.DevConsole,
25+
path: message => {
2626
AllPropertyChanged();
2727
}, location: this.GetType());
28-
AddEventPath<CoinAddedEvent>("添加了币种后刷新VM内存", LogEnum.DevConsole,
29-
action: (message) => {
28+
BuildEventPath<CoinAddedEvent>("添加了币种后刷新VM内存", LogEnum.DevConsole,
29+
path: (message) => {
3030
_dicById.Add(message.Source.GetId(), new CoinViewModel(message.Source));
3131
AllPropertyChanged();
3232
VirtualRoot.RaiseEvent(new CoinVmAddedEvent(message));
3333
}, location: this.GetType());
34-
AddEventPath<CoinRemovedEvent>("移除了币种后刷新VM内存", LogEnum.DevConsole,
35-
action: message => {
34+
BuildEventPath<CoinRemovedEvent>("移除了币种后刷新VM内存", LogEnum.DevConsole,
35+
path: message => {
3636
_dicById.Remove(message.Source.GetId());
3737
AllPropertyChanged();
3838
VirtualRoot.RaiseEvent(new CoinVmRemovedEvent(message));
3939
}, location: this.GetType());
40-
AddEventPath<CoinKernelVmAddedEvent>("币种内核Vm集添加了新Vm后刷新币种Vm集的关联内存", LogEnum.DevConsole, action: message => {
40+
BuildEventPath<CoinKernelVmAddedEvent>("币种内核Vm集添加了新Vm后刷新币种Vm集的关联内存", LogEnum.DevConsole, path: message => {
4141
if (_dicById.TryGetValue(message.Event.Source.CoinId, out CoinViewModel coinVm)) {
4242
coinVm.OnPropertyChanged(nameof(CoinViewModel.CoinKernel));
4343
coinVm.OnPropertyChanged(nameof(CoinViewModel.CoinKernels));
4444
coinVm.OnPropertyChanged(nameof(CoinViewModel.IsSupported));
4545
}
4646
}, this.GetType());
47-
AddEventPath<CoinKernelVmRemovedEvent>("币种内核Vm集删除了新Vm后刷新币种Vm集的关联内存", LogEnum.DevConsole, action: message => {
47+
BuildEventPath<CoinKernelVmRemovedEvent>("币种内核Vm集删除了新Vm后刷新币种Vm集的关联内存", LogEnum.DevConsole, path: message => {
4848
if (_dicById.TryGetValue(message.Event.Source.CoinId, out CoinViewModel coinVm)) {
4949
coinVm.OnPropertyChanged(nameof(CoinViewModel.CoinKernel));
5050
coinVm.OnPropertyChanged(nameof(CoinViewModel.CoinKernels));
5151
coinVm.OnPropertyChanged(nameof(CoinViewModel.IsSupported));
5252
}
5353
}, this.GetType());
54-
AddEventPath<CoinUpdatedEvent>("更新了币种后刷新VM内存", LogEnum.DevConsole,
55-
action: message => {
54+
BuildEventPath<CoinUpdatedEvent>("更新了币种后刷新VM内存", LogEnum.DevConsole,
55+
path: message => {
5656
if (_dicById.TryGetValue(message.Source.GetId(), out CoinViewModel vm)) {
5757
bool justAsDualCoin = vm.JustAsDualCoin;
5858
vm.Update(message.Source);
@@ -73,8 +73,8 @@ private CoinViewModels() {
7373
}
7474
}
7575
}, location: this.GetType());
76-
AddEventPath<CoinIconDownloadedEvent>("下载了币种图标后", LogEnum.DevConsole,
77-
action: message => {
76+
BuildEventPath<CoinIconDownloadedEvent>("下载了币种图标后", LogEnum.DevConsole,
77+
path: message => {
7878
try {
7979
if (string.IsNullOrEmpty(message.Source.Icon)) {
8080
return;

src/AppModels/AppRoot.partials.FileWriterViewModels.cs

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -17,31 +17,31 @@ private FileWriterViewModels() {
1717
this.Add = new DelegateCommand(() => {
1818
new FileWriterViewModel(Guid.NewGuid()).Edit.Execute(FormType.Add);
1919
});
20-
VirtualRoot.AddEventPath<ServerContextReInitedEvent>("ServerContext刷新后刷新VM内存", LogEnum.DevConsole,
21-
action: message => {
20+
VirtualRoot.BuildEventPath<ServerContextReInitedEvent>("ServerContext刷新后刷新VM内存", LogEnum.DevConsole,
21+
path: message => {
2222
_dicById.Clear();
2323
Init();
2424
}, location: this.GetType());
25-
VirtualRoot.AddEventPath<ServerContextReInitedEventHandledEvent>("ServerContext的VM集刷新后刷新视图界面", LogEnum.DevConsole,
26-
action: message => {
25+
VirtualRoot.BuildEventPath<ServerContextReInitedEventHandledEvent>("ServerContext的VM集刷新后刷新视图界面", LogEnum.DevConsole,
26+
path: message => {
2727
OnPropertyChangeds();
2828
}, location: this.GetType());
29-
AddEventPath<FileWriterAddedEvent>("添加了文件书写器后调整VM内存", LogEnum.DevConsole,
30-
action: (message) => {
29+
BuildEventPath<FileWriterAddedEvent>("添加了文件书写器后调整VM内存", LogEnum.DevConsole,
30+
path: (message) => {
3131
if (!_dicById.ContainsKey(message.Source.GetId())) {
3232
FileWriterViewModel groupVm = new FileWriterViewModel(message.Source);
3333
_dicById.Add(message.Source.GetId(), groupVm);
3434
OnPropertyChangeds();
3535
}
3636
}, location: this.GetType());
37-
AddEventPath<FileWriterUpdatedEvent>("更新了文件书写器后调整VM内存", LogEnum.DevConsole,
38-
action: (message) => {
37+
BuildEventPath<FileWriterUpdatedEvent>("更新了文件书写器后调整VM内存", LogEnum.DevConsole,
38+
path: (message) => {
3939
if (_dicById.TryGetValue(message.Source.GetId(), out FileWriterViewModel vm)) {
4040
vm.Update(message.Source);
4141
}
4242
}, location: this.GetType());
43-
AddEventPath<FileWriterRemovedEvent>("删除了文件书写器后调整VM内存", LogEnum.DevConsole,
44-
action: (message) => {
43+
BuildEventPath<FileWriterRemovedEvent>("删除了文件书写器后调整VM内存", LogEnum.DevConsole,
44+
path: (message) => {
4545
_dicById.Remove(message.Source.GetId());
4646
OnPropertyChangeds();
4747
}, location: this.GetType());

0 commit comments

Comments
 (0)