Compare commits
14 commits
Author | SHA1 | Date | |
---|---|---|---|
1067ff8e71 | |||
56a8b4b3ad | |||
ab4b7397a2 | |||
32f5b23ef1 | |||
4ce580e264 | |||
354301b9ce | |||
1a6ebaf12e | |||
20d9dc34f3 | |||
2b6c8d58c8 | |||
9d0a834e47 | |||
024e1f284c | |||
2bd31b6bd2 | |||
27459246bd | |||
7dbfaa13ea |
11 changed files with 596 additions and 595 deletions
|
@ -5,7 +5,7 @@
|
|||
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
|
||||
xmlns:local="clr-namespace:ServerLauncher"
|
||||
mc:Ignorable="d"
|
||||
Title="TslGame Server Launcher - About US"
|
||||
Title="TslGame 服务器启动器 - 关于我们"
|
||||
Icon="pack://application:,,,/Resource/Image/MWIcon.ico"
|
||||
Height="450"
|
||||
Width="800"
|
||||
|
@ -15,18 +15,21 @@
|
|||
<ImageBrush ImageSource="pack://application:,,,/Resource/Image/TslGameServerBack1.jpg"/>
|
||||
</Window.Background> -->
|
||||
<Grid Margin="10,10,10,-5">
|
||||
<!-- 定义行和列 -->
|
||||
<!-- 添加一列用于状态文字 -->
|
||||
<!-- 状态文字 -->
|
||||
<TextBlock
|
||||
Foreground="Black"
|
||||
HorizontalAlignment="Center"
|
||||
FontSize="20"
|
||||
FontFamily="Alimama FangYuanTi VF SemiBold"
|
||||
Margin="0,10,0,359"><Run Text="S"/><Run Text="ocial "/><Run Language="zh-cn" Text="M"/><Run Text="edia"/></TextBlock>
|
||||
Margin="0,10,0,359"><Run Language="zh-cn" Text="社交媒体"/></TextBlock>
|
||||
<TextBlock
|
||||
Foreground="Black"
|
||||
HorizontalAlignment="Center"
|
||||
FontSize="14"
|
||||
FontFamily="Alimama FangYuanTi VF SemiBold"
|
||||
Margin="0,34,0,289"><Run Text="Don't be deceived! This project and other related contents are completely open source"/><Run Language="zh-cn" Text="."/></TextBlock>
|
||||
Margin="0,34,0,289"><Run Language="zh-cn" Text="切勿上当受骗!本项目及其他有关内容是完全开源的。"/></TextBlock>
|
||||
<Image Margin="392,-680,360,-458" Source="/Resource/Image/Line1.png" Stretch="Fill" RenderTransformOrigin="2.111,0.505">
|
||||
<Image.RenderTransform>
|
||||
<TransformGroup>
|
||||
|
@ -49,8 +52,8 @@
|
|||
<RotateTransform/>
|
||||
<TranslateTransform X="0"/>
|
||||
</TransformGroup>
|
||||
</TextBlock.RenderTransform><Run Text="Copyright © 2025 "/><Run Text=" DEV:"/><Run Text="Land "/><Run Text="(Please do not sell!)"/></TextBlock>
|
||||
<Button Content="Join Discord" FontFamily="Alimama FangYuanTi VF SemiBold" Background="Yellow" Padding="9,0" HorizontalAlignment="Center" Click="Button_JoinDC_Click" RenderTransformOrigin="0.368,0.386" Width="136" VerticalAlignment="Top" Height="27" Margin="0,164,0,0"/>
|
||||
<Button Content="Join QQ Group" FontFamily="Alimama FangYuanTi VF SemiBold" Padding="9,0" HorizontalAlignment="Center" Click="Button_JoinQQ_Click" RenderTransformOrigin="0.368,0.386" Width="136" Background="Yellow" VerticalAlignment="Top" Height="27" Margin="0,215,0,0"/>
|
||||
</TextBlock.RenderTransform><Run Text="Copyright © 2025 "/><Run Text=" 开发者:"/><Run Text="在下王某人 "/><Run Language="zh-cn" Text="(请勿转卖!)"/></TextBlock>
|
||||
<Button Content="加入 Discord" FontFamily="Alimama FangYuanTi VF SemiBold" Background="Yellow" Padding="9,0" HorizontalAlignment="Center" Click="Button_JoinDC_Click" RenderTransformOrigin="0.368,0.386" Width="136" VerticalAlignment="Top" Height="27" Margin="0,164,0,0"/>
|
||||
<Button Content="加入 QQ 群" FontFamily="Alimama FangYuanTi VF SemiBold" Padding="9,0" HorizontalAlignment="Center" Click="Button_JoinQQ_Click" RenderTransformOrigin="0.368,0.386" Width="136" Background="Yellow" VerticalAlignment="Top" Height="27" Margin="0,215,0,0"/>
|
||||
</Grid>
|
||||
</Window>
|
||||
|
|
|
@ -29,7 +29,7 @@ namespace ServerLauncher
|
|||
catch (System.ComponentModel.Win32Exception ex)
|
||||
{
|
||||
// 如果系统中没有默认浏览器,会抛出异常
|
||||
MessageBox.Show($"An error was encountered while opening the link: {ex.Message}", "Error", MessageBoxButton.OK, MessageBoxImage.Error);
|
||||
MessageBox.Show($"无法打开链接:{ex.Message}", "错误", MessageBoxButton.OK, MessageBoxImage.Error);
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -49,7 +49,7 @@ namespace ServerLauncher
|
|||
catch (System.ComponentModel.Win32Exception ex)
|
||||
{
|
||||
// 如果系统中没有默认浏览器,会抛出异常
|
||||
MessageBox.Show($"An error was encountered while opening the link: {ex.Message}", "Error", MessageBoxButton.OK, MessageBoxImage.Error);
|
||||
MessageBox.Show($"无法打开链接:{ex.Message}", "错误", MessageBoxButton.OK, MessageBoxImage.Error);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -5,7 +5,7 @@
|
|||
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
|
||||
xmlns:local="clr-namespace:ServerLauncher"
|
||||
mc:Ignorable="d"
|
||||
Title="TslGame Server Launcher"
|
||||
Title="TslGame 服务器启动器"
|
||||
Icon="pack://application:,,,/Resource/Image/MWIcon.ico"
|
||||
Height="450"
|
||||
Width="800"
|
||||
|
@ -32,30 +32,30 @@
|
|||
</Grid.ColumnDefinitions>
|
||||
|
||||
<!-- 按钮 -->
|
||||
<Button Content="Start Server" FontFamily="Alimama FangYuanTi VF SemiBold" Background="Yellow" Padding="9,4" HorizontalAlignment="Center" Grid.Row="0" Margin="0,5,0,5" Click="Button_StartTSLServer_Click"/>
|
||||
<Button Content="End Server" FontFamily="Alimama FangYuanTi VF SemiBold" Background="Yellow" Padding="9,4" HorizontalAlignment="Center" Grid.Row="1" Margin="0,1,0,9" Click="Button_KillTSLServer_Click"/>
|
||||
<Button Content="Start Game" FontFamily="Alimama FangYuanTi VF SemiBold" Background="Yellow" Padding="9,4" HorizontalAlignment="Center" Grid.Row="2" Margin="0,23,0,103" Click="Button_Start_TslGame" Grid.RowSpan="2"/>
|
||||
<Button Content="Exit" FontFamily="Alimama FangYuanTi VF SemiBold" Background="Yellow" Padding="9,0" HorizontalAlignment="Center" Grid.Row="3" Margin="0,6,0,71" Click="Button_Exit_Click" RenderTransformOrigin="0.368,0.386"/>
|
||||
<Button Content="启动服务器" FontFamily="Alimama FangYuanTi VF SemiBold" Background="Yellow" Padding="9,4" HorizontalAlignment="Center" Grid.Row="0" Margin="0,5,0,5" Click="Button_StartTSLServer_Click"/>
|
||||
<Button Content="结束服务器" FontFamily="Alimama FangYuanTi VF SemiBold" Background="Yellow" Padding="9,4" HorizontalAlignment="Center" Grid.Row="1" Margin="0,1,0,9" Click="Button_KillTSLServer_Click"/>
|
||||
<Button Content="开始游戏" FontFamily="Alimama FangYuanTi VF SemiBold" Background="Yellow" Padding="9,4" HorizontalAlignment="Center" Grid.Row="2" Margin="0,23,0,103" Click="Button_Start_TslGame" Grid.RowSpan="2"/>
|
||||
<Button Content="退出程序" FontFamily="Alimama FangYuanTi VF SemiBold" Background="Yellow" Padding="9,0" HorizontalAlignment="Center" Grid.Row="3" Margin="0,6,0,71" Click="Button_Exit_Click" RenderTransformOrigin="0.368,0.386"/>
|
||||
<!-- 状态文字 -->
|
||||
<TextBlock x:Name="StatusText"
|
||||
Text="Not running"
|
||||
Text="未运行"
|
||||
FontSize="20"
|
||||
FontFamily="Alimama FangYuanTi VF SemiBold"
|
||||
Foreground="Red"
|
||||
Margin="178,23,-178,21"
|
||||
Margin="140,23,-140,21"
|
||||
Grid.Column="1" Grid.RowSpan="2"/>
|
||||
<TextBlock Text="Server Status:"
|
||||
<TextBlock Text="服务器状态:"
|
||||
Foreground="White"
|
||||
HorizontalAlignment="Left"
|
||||
FontSize="20"
|
||||
FontFamily="Alimama FangYuanTi VF SemiBold"
|
||||
Margin="20,23,0,21" Grid.Column="1" Grid.RowSpan="2"/>
|
||||
<Button Content="About US" FontFamily="Alimama FangYuanTi VF SemiBold" Background="Yellow" Padding="9,0" HorizontalAlignment="Center" Grid.Row="3" Margin="0,65,0,12" Click="Button_OpenNewWindow_Click" RenderTransformOrigin="0.368,0.386"/>
|
||||
<Button Content="关于我们" FontFamily="Alimama FangYuanTi VF SemiBold" Background="Yellow" Padding="9,0" HorizontalAlignment="Center" Grid.Row="3" Margin="0,65,0,12" Click="Button_OpenNewWindow_Click" RenderTransformOrigin="0.368,0.386"/>
|
||||
<TextBlock
|
||||
Foreground="White"
|
||||
FontSize="14"
|
||||
FontFamily="Alimama FangYuanTi VF SemiBold"
|
||||
Margin="120,164,0,0" Width="367" ScrollViewer.HorizontalScrollBarVisibility="Visible" Grid.Row="5" RenderTransformOrigin="0.5,0.5" VerticalAlignment="Top" HorizontalAlignment="Left" Height="17" Grid.Column="1" Background="Black">
|
||||
Margin="121,123,0,0" Width="388" ScrollViewer.HorizontalScrollBarVisibility="Visible" Grid.Row="4" RenderTransformOrigin="0.5,0.5" VerticalAlignment="Top" HorizontalAlignment="Left" Height="17" Grid.RowSpan="2" Grid.Column="1">
|
||||
<TextBlock.RenderTransform>
|
||||
<TransformGroup>
|
||||
<ScaleTransform/>
|
||||
|
@ -63,6 +63,6 @@
|
|||
<RotateTransform/>
|
||||
<TranslateTransform X="0"/>
|
||||
</TransformGroup>
|
||||
</TextBlock.RenderTransform><Run Text="Copyright © 2025 "/><Run Text=" DEV:"/><Run Text="Land "/><Run Language="zh-cn" Text="(Please do not sell!)"/></TextBlock>
|
||||
</TextBlock.RenderTransform><Run Text="Copyright © 2025 "/><Run Text=" 开发者:"/><Run Text="在下王某人 "/><Run Language="zh-cn" Text="(请勿转卖!)"/></TextBlock>
|
||||
</Grid>
|
||||
</Window>
|
|
@ -37,7 +37,7 @@ namespace ServerLauncher
|
|||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
MessageBox.Show($"An error was encountered while starting TslGame Server:{ex.Message}", "Error", MessageBoxButton.OK, MessageBoxImage.Error);
|
||||
MessageBox.Show($"无法启动 TslGame Server:{ex.Message}", "错误", MessageBoxButton.OK, MessageBoxImage.Error);
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -57,16 +57,16 @@ namespace ServerLauncher
|
|||
process.WaitForExit(); // 等待进程完全退出
|
||||
}
|
||||
|
||||
MessageBox.Show("TslGame Server was successfully closed.", "Message", MessageBoxButton.OK, MessageBoxImage.Information);
|
||||
MessageBox.Show("TslGame Server 已成功关闭!", "操作成功", MessageBoxButton.OK, MessageBoxImage.Information);
|
||||
}
|
||||
else
|
||||
{
|
||||
MessageBox.Show("TslGame Server Not running!", "Message", MessageBoxButton.OK, MessageBoxImage.Warning);
|
||||
MessageBox.Show("TslGame Server 没有在运行!", "提示", MessageBoxButton.OK, MessageBoxImage.Warning);
|
||||
}
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
MessageBox.Show($"Failed to end process TslGame Server: {ex.Message}", "Error", MessageBoxButton.OK, MessageBoxImage.Error);
|
||||
MessageBox.Show($"无法结束 TslGame Server: {ex.Message}", "错误", MessageBoxButton.OK, MessageBoxImage.Error);
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -84,7 +84,7 @@ namespace ServerLauncher
|
|||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
MessageBox.Show($"An error was encountered while starting TslGame:{ex.Message}", "Error", MessageBoxButton.OK, MessageBoxImage.Error);
|
||||
MessageBox.Show($"无法启动 TslGame:{ex.Message}", "错误", MessageBoxButton.OK, MessageBoxImage.Error);
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -102,13 +102,13 @@ namespace ServerLauncher
|
|||
if (processes.Length > 0)
|
||||
{
|
||||
// 如果进程存在,更新界面为“运行”
|
||||
StatusText.Text = "Running";
|
||||
StatusText.Text = "运行";
|
||||
StatusText.Foreground = new SolidColorBrush(Colors.Green);
|
||||
}
|
||||
else
|
||||
{
|
||||
// 如果进程不存在,更新界面为“未运行”
|
||||
StatusText.Text = "Not running";
|
||||
StatusText.Text = "未运行";
|
||||
StatusText.Foreground = new SolidColorBrush(Colors.Red);
|
||||
}
|
||||
}
|
||||
|
@ -121,8 +121,8 @@ namespace ServerLauncher
|
|||
{
|
||||
// 启动TslGame.exe
|
||||
MessageBoxResult result = MessageBox.Show(
|
||||
"Are you sure?",
|
||||
"Message",
|
||||
"你确定要这么做吗?",
|
||||
"提示",
|
||||
MessageBoxButton.YesNo,
|
||||
MessageBoxImage.Question);
|
||||
|
||||
|
@ -135,20 +135,18 @@ namespace ServerLauncher
|
|||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
MessageBox.Show($"An error was encountered while starting TslGame Server: {ex.Message}", "Error", MessageBoxButton.OK, MessageBoxImage.Error);
|
||||
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(
|
||||
"Are you sure?",
|
||||
"Message",
|
||||
"你确定要这么做吗?",
|
||||
"提示",
|
||||
MessageBoxButton.YesNo,
|
||||
MessageBoxImage.Question);
|
||||
|
||||
|
@ -160,7 +158,7 @@ namespace ServerLauncher
|
|||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
MessageBox.Show($"Failed to end process TslGame Server: {ex.Message}", "错误", MessageBoxButton.OK, MessageBoxImage.Error);
|
||||
MessageBox.Show($"无法结束 TslGame Server: {ex.Message}", "错误", MessageBoxButton.OK, MessageBoxImage.Error);
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -171,8 +169,8 @@ namespace ServerLauncher
|
|||
try
|
||||
{
|
||||
MessageBoxResult result = MessageBox.Show(
|
||||
"Are you sure?",
|
||||
"Message",
|
||||
"你确定要这么做吗?",
|
||||
"提示",
|
||||
MessageBoxButton.YesNo,
|
||||
MessageBoxImage.Question);
|
||||
|
||||
|
@ -184,7 +182,7 @@ namespace ServerLauncher
|
|||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
MessageBox.Show($"An error was encountered while starting TslGame {ex.Message}", "Error", MessageBoxButton.OK, MessageBoxImage.Error);
|
||||
MessageBox.Show($"无法启动 TslGame {ex.Message}", "提示", MessageBoxButton.OK, MessageBoxImage.Error);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue