Skip to content

Commit

Permalink
.net45
Browse files Browse the repository at this point in the history
  • Loading branch information
ntminer committed Jan 26, 2021
1 parent 7f025f2 commit 3bd46be
Show file tree
Hide file tree
Showing 158 changed files with 4,138 additions and 1,774 deletions.
3 changes: 0 additions & 3 deletions NTMiner.sln
Original file line number Diff line number Diff line change
Expand Up @@ -10,9 +10,6 @@ EndProject
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Client", "Client", "{E66C9F7C-617A-4E97-978A-A06E3A95BEE8}"
EndProject
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Server", "Server", "{43C57D59-9DC7-45AE-9D09-5D3D413E41EC}"
ProjectSection(SolutionItems) = preProject
docs\Server\README.md = docs\Server\README.md
EndProjectSection
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "DevConsole", "src\DevConsole\DevConsole.csproj", "{56216641-FA69-46BD-AD32-C31F9FA735C8}"
EndProject
Expand Down
24 changes: 21 additions & 3 deletions src/AppModels/AppModels.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -9,9 +9,12 @@
<AppDesignerFolder>Properties</AppDesignerFolder>
<RootNamespace>NTMiner</RootNamespace>
<AssemblyName>AppModels</AssemblyName>
<TargetFrameworkVersion>v4.0</TargetFrameworkVersion>
<TargetFrameworkVersion>v4.5</TargetFrameworkVersion>
<FileAlignment>512</FileAlignment>
<Deterministic>false</Deterministic>
<TargetFrameworkProfile />
<NuGetPackageImportStamp>
</NuGetPackageImportStamp>
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
<DebugSymbols>true</DebugSymbols>
Expand All @@ -21,6 +24,7 @@
<DefineConstants>DEBUG;TRACE</DefineConstants>
<ErrorReport>prompt</ErrorReport>
<WarningLevel>4</WarningLevel>
<Prefer32Bit>false</Prefer32Bit>
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
<DebugType>pdbonly</DebugType>
Expand All @@ -29,6 +33,7 @@
<DefineConstants>TRACE</DefineConstants>
<ErrorReport>prompt</ErrorReport>
<WarningLevel>4</WarningLevel>
<Prefer32Bit>false</Prefer32Bit>
</PropertyGroup>
<ItemGroup>
<Reference Include="Interop.NetFwTypeLib">
Expand All @@ -48,6 +53,13 @@
<Reference Include="System.Net.Http">
<HintPath>..\..\packages\Microsoft.Net.Http.2.0.20710.0\lib\net40\System.Net.Http.dll</HintPath>
</Reference>
<Reference Include="System.Net.Http.Extensions, Version=2.2.29.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a, processorArchitecture=MSIL">
<HintPath>..\..\packages\Microsoft.Net.Http.2.2.29\lib\net45\System.Net.Http.Extensions.dll</HintPath>
</Reference>
<Reference Include="System.Net.Http.Primitives, Version=4.2.29.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a, processorArchitecture=MSIL">
<HintPath>..\..\packages\Microsoft.Net.Http.2.2.29\lib\net45\System.Net.Http.Primitives.dll</HintPath>
</Reference>
<Reference Include="System.Net.Http.WebRequest" />
<Reference Include="System.Windows.Forms" />
<Reference Include="System.Xaml" />
<Reference Include="WindowsBase" />
Expand Down Expand Up @@ -153,7 +165,6 @@
<Compile Include="Vms\KernelOutputSelectViewModel.cs" />
<Compile Include="Vms\KernelInputSelectViewModel.cs" />
<Compile Include="Vms\MinerProfileViewModel.cs" />
<Compile Include="Vms\SignUpPageViewModel.cs" />
<Compile Include="Vms\SpeedTableViewModel.cs" />
<Compile Include="Vms\StartStopMineButtonViewModel.cs" />
<Compile Include="Vms\SysDicItemSelectViewModel.cs" />
Expand Down Expand Up @@ -267,10 +278,17 @@
</ProjectReference>
</ItemGroup>
<ItemGroup>
<None Include="app.config" />
<Compile Include="MinerStudio\MinerStudioRoot.partials.MinerClientMessagesViewModel.cs" />
<Compile Include="MinerStudio\MinerStudioRoot.partials.MinerClientOperationResultsViewModel.cs" />
<None Include="app.config" />
<None Include="packages.config" />
</ItemGroup>
<Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
<Import Project="..\..\packages\Microsoft.Bcl.Build.1.0.21\build\Microsoft.Bcl.Build.targets" Condition="Exists('..\..\packages\Microsoft.Bcl.Build.1.0.21\build\Microsoft.Bcl.Build.targets')" />
<Target Name="EnsureNuGetPackageBuildImports" BeforeTargets="PrepareForBuild">
<PropertyGroup>
<ErrorText>这台计算机上缺少此项目引用的 NuGet 程序包。使用“NuGet 程序包还原”可下载这些程序包。有关更多信息,请参见 http://go.microsoft.com/fwlink/?LinkID=322105。缺少的文件是 {0}。</ErrorText>
</PropertyGroup>
<Error Condition="!Exists('..\..\packages\Microsoft.Bcl.Build.1.0.21\build\Microsoft.Bcl.Build.targets')" Text="$([System.String]::Format('$(ErrorText)', '..\..\packages\Microsoft.Bcl.Build.1.0.21\build\Microsoft.Bcl.Build.targets'))" />
</Target>
</Project>
16 changes: 0 additions & 16 deletions src/AppModels/Messages.cs
Original file line number Diff line number Diff line change
Expand Up @@ -6,17 +6,6 @@
using System.Windows;

namespace NTMiner {
[MessageType(description: "升级")]
public class UpgradeCommand : Cmd {
public UpgradeCommand(string fileName, Action callback) {
this.FileName = fileName;
this.Callback = callback;
}

public string FileName { get; private set; }
public Action Callback { get; private set; }
}

[MessageType(description: "启用windows远程桌面")]
public class EnableRemoteDesktopCommand : Cmd {
public EnableRemoteDesktopCommand() {
Expand Down Expand Up @@ -350,11 +339,6 @@ public ShowKernelOutputKeywordsCommand() {
}
}

[MessageType(description: "打开用户注册页")]
public class ShowSignUpPageCommand : Cmd {
public ShowSignUpPageCommand() { }
}

[MessageType(description: "打开钱包地址编辑界面")]
public class EditWalletCommand : EditCommand<WalletViewModel> {
public EditWalletCommand(FormType formType, WalletViewModel source) : base(formType, source) {
Expand Down
2 changes: 1 addition & 1 deletion src/AppModels/Vms/StateBarViewModel.cs
Original file line number Diff line number Diff line change
Expand Up @@ -79,7 +79,7 @@ public string RemoteDesktopToolTip {
if (IsRemoteDesktopEnabled) {
return "Windows远程桌面已启用";
}
return "Windows远程桌面已禁用";
return "未启用Windows远程桌面";
}
}

Expand Down
7 changes: 5 additions & 2 deletions src/AppModels/packages.config
Original file line number Diff line number Diff line change
@@ -1,5 +1,8 @@
<?xml version="1.0" encoding="utf-8"?>
<packages>
<package id="LiveCharts" version="0.9.7" targetFramework="net40" />
<package id="LiveCharts.Wpf" version="0.9.7" targetFramework="net40" />
<package id="LiveCharts" version="0.9.7" targetFramework="net40" requireReinstallation="true" />
<package id="LiveCharts.Wpf" version="0.9.7" targetFramework="net40" requireReinstallation="true" />
<package id="Microsoft.Bcl" version="1.1.10" targetFramework="net45" />
<package id="Microsoft.Bcl.Build" version="1.0.21" targetFramework="net45" />
<package id="Microsoft.Net.Http" version="2.2.29" targetFramework="net45" />
</packages>
5 changes: 0 additions & 5 deletions src/AppViews0/AppViewFactory.cs
Original file line number Diff line number Diff line change
Expand Up @@ -224,11 +224,6 @@ public override void BuildPaths() {
KernelOutputKeywords.ShowWindow();
});
}, location: location);
VirtualRoot.BuildCmdPath<ShowSignUpPageCommand>(path: message => {
UIThread.Execute(() => {
SignUpPage.ShowWindow();
});
}, location: location);
VirtualRoot.BuildCmdPath<EditWalletCommand>(path: message => {
UIThread.Execute(() => {
WalletEdit.ShowWindow(message.FormType, message.Source);
Expand Down
28 changes: 16 additions & 12 deletions src/AppViews0/AppViews0.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
<AppDesignerFolder>Properties</AppDesignerFolder>
<RootNamespace>NTMiner</RootNamespace>
<AssemblyName>AppViews0</AssemblyName>
<TargetFrameworkVersion>v4.0</TargetFrameworkVersion>
<TargetFrameworkVersion>v4.5</TargetFrameworkVersion>
<TargetFrameworkProfile>
</TargetFrameworkProfile>
<FileAlignment>512</FileAlignment>
Expand Down Expand Up @@ -83,6 +83,14 @@
<HintPath>..\..\packages\LiveCharts.Wpf.0.9.7\lib\net40\LiveCharts.Wpf.dll</HintPath>
</Reference>
<Reference Include="System" />
<Reference Include="System.Net.Http" />
<Reference Include="System.Net.Http.Extensions, Version=2.2.29.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a, processorArchitecture=MSIL">
<HintPath>..\..\packages\Microsoft.Net.Http.2.2.29\lib\net45\System.Net.Http.Extensions.dll</HintPath>
</Reference>
<Reference Include="System.Net.Http.Primitives, Version=4.2.29.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a, processorArchitecture=MSIL">
<HintPath>..\..\packages\Microsoft.Net.Http.2.2.29\lib\net45\System.Net.Http.Primitives.dll</HintPath>
</Reference>
<Reference Include="System.Net.Http.WebRequest" />
<Reference Include="System.Windows.Forms" />
<Reference Include="System.Xaml">
<RequiredTargetFramework>4.0</RequiredTargetFramework>
Expand Down Expand Up @@ -145,9 +153,6 @@
<Compile Include="Views\Ucs\WindowsAutoLogon.xaml.cs">
<DependentUpon>WindowsAutoLogon.xaml</DependentUpon>
</Compile>
<Compile Include="Views\Ucs\SignUpPage.xaml.cs">
<DependentUpon>SignUpPage.xaml</DependentUpon>
</Compile>
<Compile Include="MinerStudio\Views\Ucs\MinerClients.xaml.cs">
<DependentUpon>MinerClients.xaml</DependentUpon>
</Compile>
Expand Down Expand Up @@ -536,10 +541,6 @@
<Generator>MSBuild:Compile</Generator>
<SubType>Designer</SubType>
</Page>
<Page Include="Views\Design\SignUpPageViewModel.xaml">
<Generator>MSBuild:Compile</Generator>
<SubType>Designer</SubType>
</Page>
<Page Include="Views\Design\RestartWindowsViewModel.xaml">
<Generator>MSBuild:Compile</Generator>
<SubType>Designer</SubType>
Expand Down Expand Up @@ -732,10 +733,6 @@
<Generator>MSBuild:Compile</Generator>
<SubType>Designer</SubType>
</Page>
<Page Include="Views\Ucs\SignUpPage.xaml">
<Generator>MSBuild:Compile</Generator>
<SubType>Designer</SubType>
</Page>
<Page Include="MinerStudio\Views\Ucs\MinerClients.xaml">
<Generator>MSBuild:Compile</Generator>
<SubType>Designer</SubType>
Expand Down Expand Up @@ -1209,6 +1206,13 @@
<PostBuildEvent>
</PostBuildEvent>
</PropertyGroup>
<Import Project="..\..\packages\Microsoft.Bcl.Build.1.0.21\build\Microsoft.Bcl.Build.targets" Condition="Exists('..\..\packages\Microsoft.Bcl.Build.1.0.21\build\Microsoft.Bcl.Build.targets')" />
<Target Name="EnsureNuGetPackageBuildImports" BeforeTargets="PrepareForBuild">
<PropertyGroup>
<ErrorText>这台计算机上缺少此项目引用的 NuGet 程序包。使用“NuGet 程序包还原”可下载这些程序包。有关更多信息,请参见 http://go.microsoft.com/fwlink/?LinkID=322105。缺少的文件是 {0}。</ErrorText>
</PropertyGroup>
<Error Condition="!Exists('..\..\packages\Microsoft.Bcl.Build.1.0.21\build\Microsoft.Bcl.Build.targets')" Text="$([System.String]::Format('$(ErrorText)', '..\..\packages\Microsoft.Bcl.Build.1.0.21\build\Microsoft.Bcl.Build.targets'))" />
</Target>
<!-- To modify your build process, add your task inside one of the targets below and uncomment it.
Other similar extension points exist, see Microsoft.Common.targets.
<Target Name="BeforeBuild">
Expand Down
26 changes: 19 additions & 7 deletions src/AppViews0/MinerStudio/Views/Ucs/WsServerNodePage.xaml
Original file line number Diff line number Diff line change
Expand Up @@ -34,9 +34,9 @@
<TextBlock Style="{StaticResource TextBlock}" Text="{Binding WebApiServerStateVm.Address}"></TextBlock>
<TextBlock Style="{StaticResource LblTb}">进程内存</TextBlock>
<TextBlock Style="{StaticResource TextBlock}" Text="{Binding WebApiServerStateVm.ProcessMemoryMbText}"></TextBlock>
<TextBlock Style="{StaticResource LblTb}">线程数</TextBlock>
<TextBlock Style="{StaticResource LblTb}">进程线程数</TextBlock>
<TextBlock Style="{StaticResource TextBlock}" Text="{Binding WebApiServerStateVm.ThreadCount}"></TextBlock>
<TextBlock Style="{StaticResource LblTb}">句柄数</TextBlock>
<TextBlock Style="{StaticResource LblTb}">进程句柄数</TextBlock>
<TextBlock Style="{StaticResource TextBlock}" Text="{Binding WebApiServerStateVm.HandleCount}"></TextBlock>
<TextBlock Style="{StaticResource LblTb}">总内存</TextBlock>
<TextBlock Style="{StaticResource TextBlock}" Text="{Binding WebApiServerStateVm.TotalPhysicalMemory,Converter={StaticResource ByteToGbConverter}}"></TextBlock>
Expand Down Expand Up @@ -105,15 +105,27 @@
</DataGridTextColumn>
<DataGridTextColumn IsReadOnly="True" Width="70" Header="进程内存" Binding="{Binding ProcessMemoryMbText}">
</DataGridTextColumn>
<DataGridTextColumn IsReadOnly="True" Width="50" Header="线程数" Binding="{Binding ThreadCount}">
<DataGridTextColumn IsReadOnly="True" Width="50" Binding="{Binding ThreadCount}">
<DataGridTextColumn.Header>
<TextBlock TextWrapping="Wrap">进程线程数</TextBlock>
</DataGridTextColumn.Header>
</DataGridTextColumn>
<DataGridTextColumn IsReadOnly="True" Width="50" Header="句柄数" Binding="{Binding HandleCount}">
<DataGridTextColumn IsReadOnly="True" Width="50" Binding="{Binding HandleCount}">
<DataGridTextColumn.Header>
<TextBlock TextWrapping="Wrap">进程句柄数</TextBlock>
</DataGridTextColumn.Header>
</DataGridTextColumn>
<DataGridTextColumn IsReadOnly="True" Width="60" Header="总内存" Binding="{Binding TotalPhysicalMemory,Converter={StaticResource ByteToGbConverter}}">
<DataGridTextColumn IsReadOnly="True" Width="60" Header="机器内存" Binding="{Binding TotalPhysicalMemory,Converter={StaticResource ByteToGbConverter}}">
</DataGridTextColumn>
<DataGridTextColumn IsReadOnly="True" Width="60" Header="剩余内存" Binding="{Binding AvailablePhysicalMemory,Converter={StaticResource ByteToGbConverter}}">
<DataGridTextColumn IsReadOnly="True" Width="60" Binding="{Binding AvailablePhysicalMemory,Converter={StaticResource ByteToGbConverter}}">
<DataGridTextColumn.Header>
<TextBlock TextWrapping="Wrap">剩余机器内存</TextBlock>
</DataGridTextColumn.Header>
</DataGridTextColumn>
<DataGridTextColumn IsReadOnly="True" Width="70" Header="CPU使用率" Binding="{Binding CpuPerformanceText}">
<DataGridTextColumn IsReadOnly="True" Width="70" Binding="{Binding CpuPerformanceText}">
<DataGridTextColumn.Header>
<TextBlock TextWrapping="Wrap">机器CPU使用率</TextBlock>
</DataGridTextColumn.Header>
</DataGridTextColumn>
<DataGridTextColumn IsReadOnly="True" Width="306" Header="CPU名称" Binding="{Binding CpuVm.Name}">
</DataGridTextColumn>
Expand Down
24 changes: 12 additions & 12 deletions src/AppViews0/Properties/Resources.Designer.cs

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

10 changes: 5 additions & 5 deletions src/AppViews0/Properties/Settings.Designer.cs

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 0 additions & 2 deletions src/AppViews0/Views/Design/SignUpPageViewModel.xaml

This file was deleted.

5 changes: 5 additions & 0 deletions src/AppViews0/Views/Ucs/MinerProfileOption.xaml.cs
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,11 @@ public MinerProfileOption() {
InitializeComponent();
_outerUserGroupBg = OuterUserGroup.BorderBrush;
_automationGroupBg = AutomationGroup.BorderBrush;
this.OnLoaded(window => {
VirtualRoot.BuildEventPath<SignUpedEvent>("注册了新外网群控用户后自动填入外网群控用户名", LogEnum.None, path: message => {
this.Vm.OuterUserId = message.LoginName;
}, this.GetType());
});
}

private void ButtonHotKey_KeyDown(object sender, System.Windows.Input.KeyEventArgs e) {
Expand Down
7 changes: 5 additions & 2 deletions src/AppViews0/packages.config
Original file line number Diff line number Diff line change
@@ -1,5 +1,8 @@
<?xml version="1.0" encoding="utf-8"?>
<packages>
<package id="LiveCharts" version="0.9.7" targetFramework="net40" />
<package id="LiveCharts.Wpf" version="0.9.7" targetFramework="net40" />
<package id="LiveCharts" version="0.9.7" targetFramework="net40" requireReinstallation="true" />
<package id="LiveCharts.Wpf" version="0.9.7" targetFramework="net40" requireReinstallation="true" />
<package id="Microsoft.Bcl" version="1.1.10" targetFramework="net45" />
<package id="Microsoft.Bcl.Build" version="1.0.21" targetFramework="net45" />
<package id="Microsoft.Net.Http" version="2.2.29" targetFramework="net45" />
</packages>
Loading

0 comments on commit 3bd46be

Please sign in to comment.