aboutsummaryrefslogtreecommitdiff
path: root/NotePad
diff options
context:
space:
mode:
author魏曹先生 <1992414357@qq.com>2026-04-05 16:45:29 +0800
committer魏曹先生 <1992414357@qq.com>2026-04-05 16:45:29 +0800
commit00c5ce748b56c672d2f4e796d3f0b263200f95f8 (patch)
treef38de9716c237f71e5f4b3b39488b4d5727ae20c /NotePad
parentde45aece667af6a25c1840d4cdfc27935fb0b490 (diff)
增加了对 Linux 平台的支持
使用 Mono (mcs) 和 Wine (wine) 的方式让项目能在 Linux 系统上运行 - 增加 `lin_build.sh` 和 `lin_run.sh` 脚本,用于编译和执行 - 修改 `Program.cs`:使 Mono 平台不会调用 Application.SetHighDpiMode(HighDpiMode.SystemAware); 函数 - 最后,谴责 *SmallFox*,居然不选择跨平台的框架 \斜眼笑
Diffstat (limited to 'NotePad')
-rw-r--r--NotePad/NotePad/Program.cs5
1 files changed, 2 insertions, 3 deletions
diff --git a/NotePad/NotePad/Program.cs b/NotePad/NotePad/Program.cs
index c1e3d1e..0f5f1bb 100644
--- a/NotePad/NotePad/Program.cs
+++ b/NotePad/NotePad/Program.cs
@@ -1,7 +1,4 @@
using System;
-using System.Collections.Generic;
-using System.Linq;
-using System.Threading.Tasks;
using System.Windows.Forms;
namespace NotePad
@@ -14,7 +11,9 @@ namespace NotePad
[STAThread]
static void Main()
{
+#if NETFRAMEWORK || NETCOREAPP
Application.SetHighDpiMode(HighDpiMode.SystemAware);
+#endif
Application.EnableVisualStyles();
Application.SetCompatibleTextRenderingDefault(false);
Application.Run(new NotePad());