Delete ServerLauncher/AboutWindow.xaml.cs

This commit is contained in:
才羽青空 2025-03-21 13:11:02 +08:00 committed by GitHub
parent 7dbfaa13ea
commit 27459246bd
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -1,56 +0,0 @@
using System.Diagnostics;
using System.Windows;
namespace ServerLauncher
{
/// <summary>
/// Window2.xaml 的交互逻辑
/// </summary>
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);
}
}
}
}