diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml
new file mode 100644
index 0000000..c69f777
--- /dev/null
+++ b/.github/workflows/build.yml
@@ -0,0 +1,36 @@
+name: Build
+
+on:
+ push:
+ paths-ignore:
+ - '.github/*'
+ - '*.md'
+ pull_request:
+ paths-ignore:
+ - '.github/*'
+ - '*.md'
+
+jobs:
+ build:
+ runs-on: windows-latest
+ env:
+ POWERSHELL_TELEMETRY_OPTOUT: 1
+ steps:
+ - uses: actions/checkout@v2
+ - uses: microsoft/setup-msbuild@v1
+ - name: Restore nuget package
+ run: nuget restore
+ - name: Build all targets
+ run: msbuild -m BuildAllTargets.proj
+ - name: Generate release tag
+ id: tag
+ run: echo "::set-output name=release_tag::NetDebugger_$(Get-Date -Format "yyyy.MM.dd_HH_mm")"
+ - name: Release bin files
+ uses: softprops/action-gh-release@v1
+ with:
+ tag_name: ${{ steps.tag.outputs.release_tag }}
+ files: |
+ Bin/NetDebugger_Debug_x86.exe
+ Bin/NetDebugger_Debug_x64.exe
+ Bin/NetDebugger_Release_x86.exe
+ Bin/NetDebugger_Release_x64.exe
\ No newline at end of file
diff --git a/.gitignore b/.gitignore
index a37e302..ebd76fd 100644
--- a/.gitignore
+++ b/.gitignore
@@ -1,4 +1,13 @@
.vs
NetDebugger/Debug
NetDebugger/Release
-NetDebugger/x64
\ No newline at end of file
+NetDebugger/x64
+
+# Ignore NuGet Packages
+*.nupkg
+# Ignore the packages folder
+**/packages/*
+# except build/, which is used as an MSBuild target.
+!**/packages/build/
+# Uncomment if necessary however generally it will be regenerated when needed
+#!**/packages/repositories.config
\ No newline at end of file
diff --git a/BuildAllTargets.proj b/BuildAllTargets.proj
new file mode 100644
index 0000000..2f50563
--- /dev/null
+++ b/BuildAllTargets.proj
@@ -0,0 +1,51 @@
+
+
+
+ $(MSBuildThisFileDirectory)*.sln
+
+
+
+ Configuration=Debug;Platform=x86
+
+
+ Configuration=Release;Platform=x86
+
+
+ Configuration=Debug;Platform=x64
+
+
+ Configuration=Release;Platform=x64
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/NetDebugger/CRealTimeStatusCtrl.cpp b/NetDebugger/CRealTimeStatusCtrl.cpp
index 672c915..46ea53b 100644
--- a/NetDebugger/CRealTimeStatusCtrl.cpp
+++ b/NetDebugger/CRealTimeStatusCtrl.cpp
@@ -1,4 +1,4 @@
-#include "pch.h"
+#include "pch.h"
#include "NetDebugger.h"
#include "CRealTimeStatusCtrl.h"
#include "GdiplusAux.hpp"
@@ -105,7 +105,7 @@ int CRealTimeStatusCtrl::DrawStatisicsString(Gdiplus::Graphics& graphics,const G
{
graphics.SetSmoothingMode(Gdiplus::SmoothingMode::SmoothingModeAntiAlias);
graphics.SetTextRenderingHint(Gdiplus::TextRenderingHint::TextRenderingHintClearTypeGridFit);
-
+
auto fontFamily = CreateUIFontFamily();
Gdiplus::Font font(fontFamily.get(), 16.0f, Gdiplus::FontStyleRegular, Gdiplus::UnitPixel);
CString statisticsRXC;
@@ -157,28 +157,28 @@ int CRealTimeStatusCtrl::DrawStatisicsString(Gdiplus::Graphics& graphics,const G
textBrush.SetColor(Gdiplus::Color::White);
textRectRXC.Offset(-1.0f, -1.0f);
graphics.DrawString(statisticsRXC.GetString(), statisticsRXC.GetLength(), &font, textRectRXC, &sf, &textBrush);
-
+
textBrush.SetColor(Gdiplus::Color::Black);
textRectTXC.Offset(1.0f, 1.0f);
graphics.DrawString(statisticsTXC.GetString(), statisticsTXC.GetLength(), &font, textRectTXC, &sf, &textBrush);
textBrush.SetColor(Gdiplus::Color::White);
textRectTXC.Offset(-1.0f, -1.0f);
graphics.DrawString(statisticsTXC.GetString(), statisticsTXC.GetLength(), &font, textRectTXC, &sf, &textBrush);
-
+
textBrush.SetColor(Gdiplus::Color::Black);
textRectRXS.Offset(1.0f, 1.0f);
graphics.DrawString(statisticsRXS.GetString(), statisticsRXS.GetLength(), &font, textRectRXS, &sf, &textBrush);
textBrush.SetColor(Gdiplus::Color(204, 255, 153));
textRectRXS.Offset(-1.0f, -1.0f);
graphics.DrawString(statisticsRXS.GetString(), statisticsRXS.GetLength(), &font, textRectRXS, &sf, &textBrush);
-
+
textBrush.SetColor(Gdiplus::Color::Black);
textRectTXS.Offset(1.0f, 1.0f);
graphics.DrawString(statisticsTXS.GetString(), statisticsTXS.GetLength(), &font, textRectTXS, &sf, &textBrush);
textBrush.SetColor(Gdiplus::Color(255, 102, 102));
textRectTXS.Offset(-1.0f, -1.0f);
graphics.DrawString(statisticsTXS.GetString(), statisticsTXS.GetLength(), &font, textRectTXS, &sf, &textBrush);
-
+
return (int)bottom;
}
@@ -208,7 +208,7 @@ void CRealTimeStatusCtrl::DrawSpeedCurve(Gdiplus::Graphics& graphics, const Gdip
x += kXSTEP_LENGTH;
}
path.AddCurve(points.data(), (int)points.size());
- points.clear();
+ points.clear();
points.push_back(Gdiplus::Point(x - kXSTEP_LENGTH, b));
points.push_back(Gdiplus::Point(0, b));
path.AddLines(points.data(), (int)points.size());
@@ -247,7 +247,7 @@ void CRealTimeStatusCtrl::DrawSpeedCurve(Gdiplus::Graphics& graphics, const Gdip
void CRealTimeStatusCtrl::DrawDisconnectedStatus(Gdiplus::Graphics& graphics, const Gdiplus::RectF& clientRect)
{
- CString str = L"δ";
+ CString str = L"未连接";
auto fontFamily = CreateUIFontFamily();
Gdiplus::Font font(fontFamily.get(), 22.0f, Gdiplus::FontStyleRegular, Gdiplus::UnitPixel);
Gdiplus::SolidBrush brush(Gdiplus::Color(255, 255, 255));
diff --git a/NetDebugger/GdiplusAux.hpp b/NetDebugger/GdiplusAux.hpp
index 0e54fde..272eb8d 100644
--- a/NetDebugger/GdiplusAux.hpp
+++ b/NetDebugger/GdiplusAux.hpp
@@ -1,4 +1,4 @@
-#pragma once
+#pragma once
inline Gdiplus::REAL MeasureStringHeight(Gdiplus::Graphics& graphics, const CString& str, const Gdiplus::Font& font, int width)
{
@@ -17,7 +17,7 @@ inline std::shared_ptr CreateUIFontFamily()
if (fontFamily->GetLastStatus() != Gdiplus::Status::Ok)
fontFamily.reset(new Gdiplus::FontFamily(L"Arial"));
if (fontFamily->GetLastStatus() != Gdiplus::Status::Ok)
- fontFamily.reset(new Gdiplus::FontFamily(L""));
+ fontFamily.reset(new Gdiplus::FontFamily(L"宋体"));
if (fontFamily->GetLastStatus() != Gdiplus::Status::Ok)
{
LOGFONT logfont;
diff --git a/NetDebugger/NetDebugger.vcxproj b/NetDebugger/NetDebugger.vcxproj
index 8de3333..b475a05 100644
--- a/NetDebugger/NetDebugger.vcxproj
+++ b/NetDebugger/NetDebugger.vcxproj
@@ -77,20 +77,22 @@
true
$(SolutionDir)Bin\
+ $(ProjectName)_Debug_x86
true
$(SolutionDir)Bin\
- $(ProjectName)64
+ $(ProjectName)_Debug_x64
false
$(SolutionDir)Bin\
+ $(ProjectName)_Release_x86
false
$(SolutionDir)Bin\
- $(ProjectName)64
+ $(ProjectName)_Release_x64
@@ -100,13 +102,13 @@
true
WIN32;_WINDOWS;_DEBUG;%(PreprocessorDefinitions)
pch.h
- D:\boost_1_68_0;%(AdditionalIncludeDirectories)
+ %(AdditionalIncludeDirectories)
MultiThreadedDebugDLL
Windows
Imm32.lib;gdiplus.lib;IPHLPAPI.lib
- D:\boost_1_68_0\Windows\msvc14.1\lib;%(AdditionalLibraryDirectories)
+ %(AdditionalLibraryDirectories)
false
@@ -130,13 +132,13 @@
true
_WINDOWS;_DEBUG;%(PreprocessorDefinitions)
pch.h
- D:\boost_1_68_0;%(AdditionalIncludeDirectories)
+ %(AdditionalIncludeDirectories)
MultiThreadedDebugDLL
Windows
Imm32.lib;gdiplus.lib;IPHLPAPI.lib
- D:\boost_1_68_0\Windows\msvc14.1\lib;%(AdditionalLibraryDirectories)
+ %(AdditionalLibraryDirectories)
false
@@ -162,7 +164,7 @@
true
WIN32;_WINDOWS;NDEBUG;%(PreprocessorDefinitions)
pch.h
- D:\boost_1_68_0;%(AdditionalIncludeDirectories)
+ %(AdditionalIncludeDirectories)
MultiThreadedDLL
@@ -170,7 +172,7 @@
true
true
Imm32.lib;gdiplus.lib;IPHLPAPI.lib
- D:\boost_1_68_0\Windows\msvc14.1\lib;%(AdditionalLibraryDirectories)
+ %(AdditionalLibraryDirectories)
false
@@ -201,7 +203,7 @@ del $(OutDir)*.pdb
true
_WINDOWS;NDEBUG;%(PreprocessorDefinitions)
pch.h
- D:\boost_1_68_0;%(AdditionalIncludeDirectories)
+ %(AdditionalIncludeDirectories)
MultiThreadedDLL
@@ -209,7 +211,7 @@ del $(OutDir)*.pdb
true
true
Imm32.lib;gdiplus.lib;IPHLPAPI.lib
- D:\boost_1_68_0\Windows\msvc14.1\lib;%(AdditionalLibraryDirectories)
+ %(AdditionalLibraryDirectories)
false
@@ -303,6 +305,7 @@ del $(OutDir)*.pdb
+
@@ -314,10 +317,101 @@ del $(OutDir)*.pdb
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ 这台计算机上缺少此项目引用的 NuGet 程序包。使用“NuGet 程序包还原”可下载这些程序包。有关更多信息,请参见 http://go.microsoft.com/fwlink/?LinkID=322105。缺少的文件是 {0}。
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/NetDebugger/NetDebugger.vcxproj.filters b/NetDebugger/NetDebugger.vcxproj.filters
index 5390f3e..2b7275e 100644
--- a/NetDebugger/NetDebugger.vcxproj.filters
+++ b/NetDebugger/NetDebugger.vcxproj.filters
@@ -213,6 +213,7 @@
资源文件
+
diff --git a/NetDebugger/packages.config b/NetDebugger/packages.config
new file mode 100644
index 0000000..d2d9b98
--- /dev/null
+++ b/NetDebugger/packages.config
@@ -0,0 +1,46 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file