diff --git a/ServerLauncher.sln b/ServerLauncher.sln
index 439931b..1fdec6d 100644
--- a/ServerLauncher.sln
+++ b/ServerLauncher.sln
@@ -1,34 +1,34 @@
-
-Microsoft Visual Studio Solution File, Format Version 12.00
-# Visual Studio Version 17
-VisualStudioVersion = 17.12.35707.178 d17.12
-MinimumVisualStudioVersion = 10.0.40219.1
-Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "ServerLauncher", "ServerLauncher\ServerLauncher.csproj", "{D8519CE3-2A8B-4B58-A689-EA3B7CB8DA9B}"
-EndProject
-Global
- GlobalSection(SolutionConfigurationPlatforms) = preSolution
- Debug|Any CPU = Debug|Any CPU
- Debug|x64 = Debug|x64
- Debug|x86 = Debug|x86
- Release|Any CPU = Release|Any CPU
- Release|x64 = Release|x64
- Release|x86 = Release|x86
- EndGlobalSection
- GlobalSection(ProjectConfigurationPlatforms) = postSolution
- {D8519CE3-2A8B-4B58-A689-EA3B7CB8DA9B}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
- {D8519CE3-2A8B-4B58-A689-EA3B7CB8DA9B}.Debug|Any CPU.Build.0 = Debug|Any CPU
- {D8519CE3-2A8B-4B58-A689-EA3B7CB8DA9B}.Debug|x64.ActiveCfg = Release|x64
- {D8519CE3-2A8B-4B58-A689-EA3B7CB8DA9B}.Debug|x64.Build.0 = Release|x64
- {D8519CE3-2A8B-4B58-A689-EA3B7CB8DA9B}.Debug|x86.ActiveCfg = Debug|x86
- {D8519CE3-2A8B-4B58-A689-EA3B7CB8DA9B}.Debug|x86.Build.0 = Debug|x86
- {D8519CE3-2A8B-4B58-A689-EA3B7CB8DA9B}.Release|Any CPU.ActiveCfg = Release|Any CPU
- {D8519CE3-2A8B-4B58-A689-EA3B7CB8DA9B}.Release|Any CPU.Build.0 = Release|Any CPU
- {D8519CE3-2A8B-4B58-A689-EA3B7CB8DA9B}.Release|x64.ActiveCfg = Release|x64
- {D8519CE3-2A8B-4B58-A689-EA3B7CB8DA9B}.Release|x64.Build.0 = Release|x64
- {D8519CE3-2A8B-4B58-A689-EA3B7CB8DA9B}.Release|x86.ActiveCfg = Release|x86
- {D8519CE3-2A8B-4B58-A689-EA3B7CB8DA9B}.Release|x86.Build.0 = Release|x86
- EndGlobalSection
- GlobalSection(SolutionProperties) = preSolution
- HideSolutionNode = FALSE
- EndGlobalSection
-EndGlobal
+
+Microsoft Visual Studio Solution File, Format Version 12.00
+# Visual Studio Version 17
+VisualStudioVersion = 17.12.35707.178 d17.12
+MinimumVisualStudioVersion = 10.0.40219.1
+Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "ServerLauncher", "ServerLauncher\ServerLauncher.csproj", "{D8519CE3-2A8B-4B58-A689-EA3B7CB8DA9B}"
+EndProject
+Global
+ GlobalSection(SolutionConfigurationPlatforms) = preSolution
+ Debug|Any CPU = Debug|Any CPU
+ Debug|x64 = Debug|x64
+ Debug|x86 = Debug|x86
+ Release|Any CPU = Release|Any CPU
+ Release|x64 = Release|x64
+ Release|x86 = Release|x86
+ EndGlobalSection
+ GlobalSection(ProjectConfigurationPlatforms) = postSolution
+ {D8519CE3-2A8B-4B58-A689-EA3B7CB8DA9B}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
+ {D8519CE3-2A8B-4B58-A689-EA3B7CB8DA9B}.Debug|Any CPU.Build.0 = Debug|Any CPU
+ {D8519CE3-2A8B-4B58-A689-EA3B7CB8DA9B}.Debug|x64.ActiveCfg = Release|x64
+ {D8519CE3-2A8B-4B58-A689-EA3B7CB8DA9B}.Debug|x64.Build.0 = Release|x64
+ {D8519CE3-2A8B-4B58-A689-EA3B7CB8DA9B}.Debug|x86.ActiveCfg = Debug|x86
+ {D8519CE3-2A8B-4B58-A689-EA3B7CB8DA9B}.Debug|x86.Build.0 = Debug|x86
+ {D8519CE3-2A8B-4B58-A689-EA3B7CB8DA9B}.Release|Any CPU.ActiveCfg = Release|Any CPU
+ {D8519CE3-2A8B-4B58-A689-EA3B7CB8DA9B}.Release|Any CPU.Build.0 = Release|Any CPU
+ {D8519CE3-2A8B-4B58-A689-EA3B7CB8DA9B}.Release|x64.ActiveCfg = Release|x64
+ {D8519CE3-2A8B-4B58-A689-EA3B7CB8DA9B}.Release|x64.Build.0 = Release|x64
+ {D8519CE3-2A8B-4B58-A689-EA3B7CB8DA9B}.Release|x86.ActiveCfg = Release|x86
+ {D8519CE3-2A8B-4B58-A689-EA3B7CB8DA9B}.Release|x86.Build.0 = Release|x86
+ EndGlobalSection
+ GlobalSection(SolutionProperties) = preSolution
+ HideSolutionNode = FALSE
+ EndGlobalSection
+EndGlobal
diff --git a/ServerLauncher/AboutWindow.xaml b/ServerLauncher/AboutWindow.xaml
index 3bf6b21..3126009 100644
--- a/ServerLauncher/AboutWindow.xaml
+++ b/ServerLauncher/AboutWindow.xaml
@@ -1,56 +1,59 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/ServerLauncher/AboutWindow.xaml.cs b/ServerLauncher/AboutWindow.xaml.cs
index 07b2a02..f73319b 100644
--- a/ServerLauncher/AboutWindow.xaml.cs
+++ b/ServerLauncher/AboutWindow.xaml.cs
@@ -1,56 +1,56 @@
-using System.Diagnostics;
-using System.Windows;
-
-namespace ServerLauncher
-{
- ///
- /// Window2.xaml 的交互逻辑
- ///
- public partial class Window2 : Window
- {
- public Window2()
- {
- InitializeComponent();
- }
-
- //加入 Discord 按钮
- private void Button_JoinDC_Click(object sender, RoutedEventArgs e)
- {
- string url = "https://discord.gg/yrcaukyEcw";
- try
- {
- // 使用默认浏览器打开链接
- Process.Start(new ProcessStartInfo
- {
- FileName = url,
- UseShellExecute = true
- });
- }
- catch (System.ComponentModel.Win32Exception ex)
- {
- // 如果系统中没有默认浏览器,会抛出异常
- MessageBox.Show($"An error was encountered while opening the link: {ex.Message}", "Error", MessageBoxButton.OK, MessageBoxImage.Error);
- }
- }
-
- //加入 QQ 群 按钮
- private void Button_JoinQQ_Click(object sender, RoutedEventArgs e)
- {
- string url = "https://qm.qq.com/q/q8dzw0E8Xm";
- try
- {
- // 使用默认浏览器打开链接
- Process.Start(new ProcessStartInfo
- {
- FileName = url,
- UseShellExecute = true
- });
- }
- catch (System.ComponentModel.Win32Exception ex)
- {
- // 如果系统中没有默认浏览器,会抛出异常
- MessageBox.Show($"An error was encountered while opening the link: {ex.Message}", "Error", MessageBoxButton.OK, MessageBoxImage.Error);
- }
- }
- }
+using System.Diagnostics;
+using System.Windows;
+
+namespace ServerLauncher
+{
+ ///
+ /// Window2.xaml 的交互逻辑
+ ///
+ public partial class Window2 : Window
+ {
+ public Window2()
+ {
+ InitializeComponent();
+ }
+
+ //加入 Discord 按钮
+ private void Button_JoinDC_Click(object sender, RoutedEventArgs e)
+ {
+ string url = "https://discord.gg/yrcaukyEcw";
+ try
+ {
+ // 使用默认浏览器打开链接
+ Process.Start(new ProcessStartInfo
+ {
+ FileName = url,
+ UseShellExecute = true
+ });
+ }
+ catch (System.ComponentModel.Win32Exception ex)
+ {
+ // 如果系统中没有默认浏览器,会抛出异常
+ MessageBox.Show($"无法打开链接:{ex.Message}", "错误", MessageBoxButton.OK, MessageBoxImage.Error);
+ }
+ }
+
+ //加入 QQ 群 按钮
+ private void Button_JoinQQ_Click(object sender, RoutedEventArgs e)
+ {
+ string url = "https://qm.qq.com/q/q8dzw0E8Xm";
+ try
+ {
+ // 使用默认浏览器打开链接
+ Process.Start(new ProcessStartInfo
+ {
+ FileName = url,
+ UseShellExecute = true
+ });
+ }
+ catch (System.ComponentModel.Win32Exception ex)
+ {
+ // 如果系统中没有默认浏览器,会抛出异常
+ MessageBox.Show($"无法打开链接:{ex.Message}", "错误", MessageBoxButton.OK, MessageBoxImage.Error);
+ }
+ }
+ }
}
\ No newline at end of file
diff --git a/ServerLauncher/App.xaml b/ServerLauncher/App.xaml
index f649649..909aced 100644
--- a/ServerLauncher/App.xaml
+++ b/ServerLauncher/App.xaml
@@ -1,9 +1,9 @@
-
-
-
-
-
+
+
+
+
+
diff --git a/ServerLauncher/App.xaml.cs b/ServerLauncher/App.xaml.cs
index bda5730..c103031 100644
--- a/ServerLauncher/App.xaml.cs
+++ b/ServerLauncher/App.xaml.cs
@@ -1,14 +1,14 @@
-using System.Configuration;
-using System.Data;
-using System.Windows;
-
-namespace ServerLauncher
-{
- ///
- /// Interaction logic for App.xaml
- ///
- public partial class App : Application
- {
- }
-
-}
+using System.Configuration;
+using System.Data;
+using System.Windows;
+
+namespace ServerLauncher
+{
+ ///
+ /// Interaction logic for App.xaml
+ ///
+ public partial class App : Application
+ {
+ }
+
+}
diff --git a/ServerLauncher/AssemblyInfo.cs b/ServerLauncher/AssemblyInfo.cs
index b0ec827..372e037 100644
--- a/ServerLauncher/AssemblyInfo.cs
+++ b/ServerLauncher/AssemblyInfo.cs
@@ -1,10 +1,10 @@
-using System.Windows;
-
-[assembly: ThemeInfo(
- ResourceDictionaryLocation.None, //where theme specific resource dictionaries are located
- //(used if a resource is not found in the page,
- // or application resource dictionaries)
- ResourceDictionaryLocation.SourceAssembly //where the generic resource dictionary is located
- //(used if a resource is not found in the page,
- // app, or any theme specific resource dictionaries)
-)]
+using System.Windows;
+
+[assembly: ThemeInfo(
+ ResourceDictionaryLocation.None, //where theme specific resource dictionaries are located
+ //(used if a resource is not found in the page,
+ // or application resource dictionaries)
+ ResourceDictionaryLocation.SourceAssembly //where the generic resource dictionary is located
+ //(used if a resource is not found in the page,
+ // app, or any theme specific resource dictionaries)
+)]
diff --git a/ServerLauncher/MainWindow.xaml b/ServerLauncher/MainWindow.xaml
index 884b136..b00cf6a 100644
--- a/ServerLauncher/MainWindow.xaml
+++ b/ServerLauncher/MainWindow.xaml
@@ -1,68 +1,68 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/ServerLauncher/MainWindow.xaml.cs b/ServerLauncher/MainWindow.xaml.cs
index 239d28c..76482eb 100644
--- a/ServerLauncher/MainWindow.xaml.cs
+++ b/ServerLauncher/MainWindow.xaml.cs
@@ -1,206 +1,204 @@
-using System.Diagnostics;
-using System.Windows;
-using System.Windows.Media;
-using System.Windows.Threading;
-
-namespace ServerLauncher
-{
- public partial class MainWindow : Window
- {
- private DispatcherTimer timer;
- public MainWindow()
- {
- InitializeComponent();
-
- // 初始化定时器
- timer = new DispatcherTimer();
- timer.Interval = TimeSpan.FromSeconds(5); // 每 5 秒检测一次
- timer.Tick += Timer_Tick;
- timer.Start();
-
- // 初始检测
- CheckTslGameProcess();
-
- }
-
- //启动服务器进程
- private static void StartTSLServer()
- {
- try
- {
- Process.Start(new ProcessStartInfo
- {
- FileName = "TslGame.exe",
- Arguments = "/Game/Maps/Erangel/Erangel_Main?listen?game=/Game/Blueprints/TSLGameMode.TSLGameMode_C -nullrhi -nosound -AllowJoinAnyMatchState -Server -port=8888 -NoVerifyGC -NoEAC -NoBattleEye",
- UseShellExecute = true,
- });
- }
- catch (Exception ex)
- {
- MessageBox.Show($"An error was encountered while starting TslGame Server:{ex.Message}", "Error", MessageBoxButton.OK, MessageBoxImage.Error);
- }
- }
-
- //结束服务器进程
- private static void KillTSLProcess()
- {
- try
- {
- // 获取所有名为 "TslGame" 的进程
- Process[] processes = Process.GetProcessesByName("TslGame");
-
- if (processes.Length > 0)
- {
- foreach (var process in processes)
- {
- process.Kill(); // 强制结束进程
- process.WaitForExit(); // 等待进程完全退出
- }
-
- MessageBox.Show("TslGame Server was successfully closed.", "Message", MessageBoxButton.OK, MessageBoxImage.Information);
- }
- else
- {
- MessageBox.Show("TslGame Server Not running!", "Message", MessageBoxButton.OK, MessageBoxImage.Warning);
- }
- }
- catch (Exception ex)
- {
- MessageBox.Show($"Failed to end process TslGame Server: {ex.Message}", "Error", MessageBoxButton.OK, MessageBoxImage.Error);
- }
- }
-
- //启动游戏进程
- private static void StartTSLGame()
- {
- try
- {
- Process.Start(new ProcessStartInfo
- {
- FileName = "TslGame.exe",
- Arguments = "127.0.0.1:8888 -NoVerifyGC -NoEAC -NoBattleEye",
- UseShellExecute = true,
- });
- }
- catch (Exception ex)
- {
- MessageBox.Show($"An error was encountered while starting TslGame:{ex.Message}", "Error", MessageBoxButton.OK, MessageBoxImage.Error);
- }
- }
-
- //监测 TslGame Server 是否正在运行(自动逻辑)
- private void Timer_Tick(object sender, EventArgs e)
- {
- // 定时检测进程状态
- CheckTslGameProcess();
- }
- private void CheckTslGameProcess()
- {
- // 获取所有名为 "TslGame" 的进程
- Process[] processes = Process.GetProcessesByName("TslGame");
-
- if (processes.Length > 0)
- {
- // 如果进程存在,更新界面为“运行”
- StatusText.Text = "Running";
- StatusText.Foreground = new SolidColorBrush(Colors.Green);
- }
- else
- {
- // 如果进程不存在,更新界面为“未运行”
- StatusText.Text = "Not running";
- StatusText.Foreground = new SolidColorBrush(Colors.Red);
- }
- }
-
- //界面上的按钮事件
- //启动 TslGame 服务器
- private async void Button_StartTSLServer_Click(object sender, RoutedEventArgs e)
- {
- try
- {
- // 启动TslGame.exe
- MessageBoxResult result = MessageBox.Show(
- "Are you sure?",
- "Message",
- MessageBoxButton.YesNo,
- MessageBoxImage.Question);
-
- if (result == MessageBoxResult.Yes)
- {
- await Task.Delay(3000);
- StartTSLServer();
- }
-
- }
- catch (Exception ex)
- {
- MessageBox.Show($"An error was encountered while starting TslGame Server: {ex.Message}", "Error", MessageBoxButton.OK, MessageBoxImage.Error);
- }
- }
-
-
-
- //结束 TslGame 服务器
- private void Button_KillTSLServer_Click(object sender, RoutedEventArgs e)
- {
- try
- {
- MessageBoxResult result = MessageBox.Show(
- "Are you sure?",
- "Message",
- MessageBoxButton.YesNo,
- MessageBoxImage.Question);
-
- if (result == MessageBoxResult.Yes)
- {
- KillTSLProcess();
- }
-
- }
- catch (Exception ex)
- {
- MessageBox.Show($"Failed to end process TslGame Server: {ex.Message}", "错误", MessageBoxButton.OK, MessageBoxImage.Error);
- }
- }
-
-
- //启动 TslGame
- private void Button_Start_TslGame(object sender, RoutedEventArgs e)
- {
- try
- {
- MessageBoxResult result = MessageBox.Show(
- "Are you sure?",
- "Message",
- MessageBoxButton.YesNo,
- MessageBoxImage.Question);
-
- if (result == MessageBoxResult.Yes)
- {
- StartTSLGame();
- }
-
- }
- catch (Exception ex)
- {
- MessageBox.Show($"An error was encountered while starting TslGame {ex.Message}", "Error", MessageBoxButton.OK, MessageBoxImage.Error);
- }
- }
-
- //退出应用
- private void Button_Exit_Click(object sender, RoutedEventArgs e)
- {
- Application.Current.Shutdown();
- }
-
- //关于我们
- private void Button_OpenNewWindow_Click(object sender, RoutedEventArgs e)
- {
- // 创建新窗口的实例
- Window2 newWindow = new Window2();
- // 显示新窗口
- newWindow.Show();
- }
- }
+using System.Diagnostics;
+using System.Windows;
+using System.Windows.Media;
+using System.Windows.Threading;
+
+namespace ServerLauncher
+{
+ public partial class MainWindow : Window
+ {
+ private DispatcherTimer timer;
+ public MainWindow()
+ {
+ InitializeComponent();
+
+ // 初始化定时器
+ timer = new DispatcherTimer();
+ timer.Interval = TimeSpan.FromSeconds(5); // 每 5 秒检测一次
+ timer.Tick += Timer_Tick;
+ timer.Start();
+
+ // 初始检测
+ CheckTslGameProcess();
+
+ }
+
+ //启动服务器进程
+ private static void StartTSLServer()
+ {
+ try
+ {
+ Process.Start(new ProcessStartInfo
+ {
+ FileName = "TslGame.exe",
+ Arguments = "/Game/Maps/Erangel/Erangel_Main?listen?game=/Game/Blueprints/TSLGameMode.TSLGameMode_C -nullrhi -nosound -AllowJoinAnyMatchState -Server -port=8888 -NoVerifyGC -NoEAC -NoBattleEye",
+ UseShellExecute = true,
+ });
+ }
+ catch (Exception ex)
+ {
+ MessageBox.Show($"无法启动 TslGame Server:{ex.Message}", "错误", MessageBoxButton.OK, MessageBoxImage.Error);
+ }
+ }
+
+ //结束服务器进程
+ private static void KillTSLProcess()
+ {
+ try
+ {
+ // 获取所有名为 "TslGame" 的进程
+ Process[] processes = Process.GetProcessesByName("TslGame");
+
+ if (processes.Length > 0)
+ {
+ foreach (var process in processes)
+ {
+ process.Kill(); // 强制结束进程
+ process.WaitForExit(); // 等待进程完全退出
+ }
+
+ MessageBox.Show("TslGame Server 已成功关闭!", "操作成功", MessageBoxButton.OK, MessageBoxImage.Information);
+ }
+ else
+ {
+ MessageBox.Show("TslGame Server 没有在运行!", "提示", MessageBoxButton.OK, MessageBoxImage.Warning);
+ }
+ }
+ catch (Exception ex)
+ {
+ MessageBox.Show($"无法结束 TslGame Server: {ex.Message}", "错误", MessageBoxButton.OK, MessageBoxImage.Error);
+ }
+ }
+
+ //启动游戏进程
+ private static void StartTSLGame()
+ {
+ try
+ {
+ Process.Start(new ProcessStartInfo
+ {
+ FileName = "TslGame.exe",
+ Arguments = "127.0.0.1:8888 -NoVerifyGC -NoEAC -NoBattleEye",
+ UseShellExecute = true,
+ });
+ }
+ catch (Exception ex)
+ {
+ MessageBox.Show($"无法启动 TslGame:{ex.Message}", "错误", MessageBoxButton.OK, MessageBoxImage.Error);
+ }
+ }
+
+ //监测 TslGame Server 是否正在运行(自动逻辑)
+ private void Timer_Tick(object sender, EventArgs e)
+ {
+ // 定时检测进程状态
+ CheckTslGameProcess();
+ }
+ private void CheckTslGameProcess()
+ {
+ // 获取所有名为 "TslGame" 的进程
+ Process[] processes = Process.GetProcessesByName("TslGame");
+
+ if (processes.Length > 0)
+ {
+ // 如果进程存在,更新界面为“运行”
+ StatusText.Text = "运行";
+ StatusText.Foreground = new SolidColorBrush(Colors.Green);
+ }
+ else
+ {
+ // 如果进程不存在,更新界面为“未运行”
+ StatusText.Text = "未运行";
+ StatusText.Foreground = new SolidColorBrush(Colors.Red);
+ }
+ }
+
+ //界面上的按钮事件
+ //启动 TslGame 服务器
+ private async void Button_StartTSLServer_Click(object sender, RoutedEventArgs e)
+ {
+ try
+ {
+ // 启动TslGame.exe
+ MessageBoxResult result = MessageBox.Show(
+ "你确定要这么做吗?",
+ "提示",
+ MessageBoxButton.YesNo,
+ MessageBoxImage.Question);
+
+ if (result == MessageBoxResult.Yes)
+ {
+ await Task.Delay(3000);
+ StartTSLServer();
+ }
+
+ }
+ catch (Exception ex)
+ {
+ MessageBox.Show($"无法启动 TslGame Server: {ex.Message}", "错误", MessageBoxButton.OK, MessageBoxImage.Error);
+ }
+ }
+
+ //结束 TslGame 服务器
+ private void Button_KillTSLServer_Click(object sender, RoutedEventArgs e)
+ {
+ try
+ {
+ MessageBoxResult result = MessageBox.Show(
+ "你确定要这么做吗?",
+ "提示",
+ MessageBoxButton.YesNo,
+ MessageBoxImage.Question);
+
+ if (result == MessageBoxResult.Yes)
+ {
+ KillTSLProcess();
+ }
+
+ }
+ catch (Exception ex)
+ {
+ MessageBox.Show($"无法结束 TslGame Server: {ex.Message}", "错误", MessageBoxButton.OK, MessageBoxImage.Error);
+ }
+ }
+
+
+ //启动 TslGame
+ private void Button_Start_TslGame(object sender, RoutedEventArgs e)
+ {
+ try
+ {
+ MessageBoxResult result = MessageBox.Show(
+ "你确定要这么做吗?",
+ "提示",
+ MessageBoxButton.YesNo,
+ MessageBoxImage.Question);
+
+ if (result == MessageBoxResult.Yes)
+ {
+ StartTSLGame();
+ }
+
+ }
+ catch (Exception ex)
+ {
+ MessageBox.Show($"无法启动 TslGame {ex.Message}", "提示", MessageBoxButton.OK, MessageBoxImage.Error);
+ }
+ }
+
+ //退出应用
+ private void Button_Exit_Click(object sender, RoutedEventArgs e)
+ {
+ Application.Current.Shutdown();
+ }
+
+ //关于我们
+ private void Button_OpenNewWindow_Click(object sender, RoutedEventArgs e)
+ {
+ // 创建新窗口的实例
+ Window2 newWindow = new Window2();
+ // 显示新窗口
+ newWindow.Show();
+ }
+ }
}
\ No newline at end of file
diff --git a/ServerLauncher/ServerLauncher.csproj b/ServerLauncher/ServerLauncher.csproj
index edd1df5..e97d998 100644
--- a/ServerLauncher/ServerLauncher.csproj
+++ b/ServerLauncher/ServerLauncher.csproj
@@ -1,75 +1,75 @@
-
-
-
- WinExe
- net8.0-windows
- enable
- enable
- true
- AnyCPU;x64;x86
- False
- MWIcon.ico
- False
-
- x86
- TslGame 服务器启动器
- 在下王某人
- zh-CN
- 服务器启动器。
- False
- False
- False
- none
- Copyright © 2025 在下王某人 版权所有.
-
-
-
- none
-
-
-
- none
-
-
-
- none
-
-
-
- none
-
-
-
- none
-
-
-
- none
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
+
+
+
+ WinExe
+ net8.0-windows
+ enable
+ enable
+ true
+ AnyCPU;x64;x86
+ False
+ MWIcon.ico
+ False
+
+ x86
+ TslGame 服务器启动器
+ 在下王某人
+ zh-CN
+ 服务器启动器。
+ False
+ False
+ False
+ none
+ Copyright © 2025 在下王某人 版权所有.
+
+
+
+ none
+
+
+
+ none
+
+
+
+ none
+
+
+
+ none
+
+
+
+ none
+
+
+
+ none
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/ServerLauncher/Window1.xaml b/ServerLauncher/Window1.xaml
index d06dd7b..79b974d 100644
--- a/ServerLauncher/Window1.xaml
+++ b/ServerLauncher/Window1.xaml
@@ -1,21 +1,21 @@
-
-
-
-
-
-
+
+
+
+
+
+
\ No newline at end of file
diff --git a/ServerLauncher/Window1.xaml.cs b/ServerLauncher/Window1.xaml.cs
index 53b1c7f..453eda5 100644
--- a/ServerLauncher/Window1.xaml.cs
+++ b/ServerLauncher/Window1.xaml.cs
@@ -1,51 +1,51 @@
-using System.Diagnostics;
-using System.Windows;
-using System.Windows.Media;
-using System.Windows.Threading;
-
-namespace ServerLauncher
-{
- public partial class NewWindow : Window
- {
- private DispatcherTimer timer;
-
- public NewWindow()
- {
- InitializeComponent();
-
- // 初始化定时器
- timer = new DispatcherTimer();
- timer.Interval = TimeSpan.FromSeconds(5); // 每 5 秒检测一次
- timer.Tick += Timer_Tick;
- timer.Start();
-
- // 初始检测
- CheckTslGameProcess();
- }
-
- private void Timer_Tick(object sender, EventArgs e)
- {
- // 定时检测进程状态
- CheckTslGameProcess();
- }
-
- private void CheckTslGameProcess()
- {
- // 获取所有名为 "TslGame" 的进程
- Process[] processes = Process.GetProcessesByName("TslGame");
-
- if (processes.Length > 0)
- {
- // 如果进程存在,更新界面为“运行”,并设置为绿色
- StatusText.Text = "运行";
- StatusText.Foreground = new SolidColorBrush(Colors.Green);
- }
- else
- {
- // 如果进程不存在,更新界面为“未运行”,并设置为红色
- StatusText.Text = "未运行";
- StatusText.Foreground = new SolidColorBrush(Colors.Red);
- }
- }
- }
+using System.Diagnostics;
+using System.Windows;
+using System.Windows.Media;
+using System.Windows.Threading;
+
+namespace ServerLauncher
+{
+ public partial class NewWindow : Window
+ {
+ private DispatcherTimer timer;
+
+ public NewWindow()
+ {
+ InitializeComponent();
+
+ // 初始化定时器
+ timer = new DispatcherTimer();
+ timer.Interval = TimeSpan.FromSeconds(5); // 每 5 秒检测一次
+ timer.Tick += Timer_Tick;
+ timer.Start();
+
+ // 初始检测
+ CheckTslGameProcess();
+ }
+
+ private void Timer_Tick(object sender, EventArgs e)
+ {
+ // 定时检测进程状态
+ CheckTslGameProcess();
+ }
+
+ private void CheckTslGameProcess()
+ {
+ // 获取所有名为 "TslGame" 的进程
+ Process[] processes = Process.GetProcessesByName("TslGame");
+
+ if (processes.Length > 0)
+ {
+ // 如果进程存在,更新界面为“运行”,并设置为绿色
+ StatusText.Text = "运行";
+ StatusText.Foreground = new SolidColorBrush(Colors.Green);
+ }
+ else
+ {
+ // 如果进程不存在,更新界面为“未运行”,并设置为红色
+ StatusText.Text = "未运行";
+ StatusText.Foreground = new SolidColorBrush(Colors.Red);
+ }
+ }
+ }
}
\ No newline at end of file