<Window x:Class="ServerLauncher.MainWindow"
        xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
        xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
        xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
        xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
        xmlns:local="clr-namespace:ServerLauncher"
        mc:Ignorable="d"
        Title="TslGame 服务器启动器"
        Icon="pack://application:,,,/Resource/Image/MWIcon.ico"
        Height="450"
        Width="800"
        WindowStartupLocation="CenterScreen"
        ResizeMode="NoResize">
    <Window.Background>
        <ImageBrush ImageSource="pack://application:,,,/Resource/Image/TslGameServerBack1.jpg"/>
    </Window.Background>
    <Grid Margin="10,10,0,-5">
        <!-- 定义行和列 -->
        <Grid.RowDefinitions>
            <RowDefinition Height="Auto"/>
            <RowDefinition Height="Auto"/>
            <RowDefinition Height="45.96"/>
            <RowDefinition Height="104.44"/>
            <RowDefinition Height="Auto"/>
            <RowDefinition Height="*"/>
            <!-- 添加一个额外的行用于状态显示 -->
        </Grid.RowDefinitions>
        <Grid.ColumnDefinitions>
            <ColumnDefinition Width="Auto"/>
            <ColumnDefinition Width="*"/>
            <!-- 添加一列用于状态文字 -->
        </Grid.ColumnDefinitions>

        <!-- 按钮 -->
        <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="未运行" 
                   FontSize="20" 
                   FontFamily="Alimama FangYuanTi VF SemiBold" 
                   Foreground="Red"
                   Margin="140,23,-140,21" 
                   Grid.Column="1" Grid.RowSpan="2"/>
        <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="关于我们" 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="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/>
                    <SkewTransform AngleX="0"/>
                    <RotateTransform/>
                    <TranslateTransform X="0"/>
                </TransformGroup>
            </TextBlock.RenderTransform><Run Text="Copyright © 2025 "/><Run Text=" 开发者："/><Run Text="在下王某人 "/><Run Language="zh-cn" Text="（请勿转卖！）"/></TextBlock>
    </Grid>
</Window>