149 lines
6.2 KiB
Plaintext
149 lines
6.2 KiB
Plaintext
|
|
<UserControl xmlns="https://github.com/avaloniaui"
|
||
|
|
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:viewModels="clr-namespace:Nebula.Launcher.ViewModels"
|
||
|
|
xmlns:asyncImageLoader="clr-namespace:AsyncImageLoader;assembly=AsyncImageLoader.Avalonia"
|
||
|
|
mc:Ignorable="d" d:DesignWidth="800" d:DesignHeight="100"
|
||
|
|
x:Class="Nebula.Launcher.Views.ServerEntryView"
|
||
|
|
x:DataType="viewModels:ServerEntryModelView">
|
||
|
|
<Design.DataContext>
|
||
|
|
<viewModels:ServerEntryModelView />
|
||
|
|
</Design.DataContext>
|
||
|
|
|
||
|
|
<Grid
|
||
|
|
ColumnDefinitions="*,120"
|
||
|
|
Margin="0,5,0,5"
|
||
|
|
RowDefinitions="30,*">
|
||
|
|
<Border
|
||
|
|
BorderThickness="2,0,0,0"
|
||
|
|
CornerRadius="10,0,0,0"
|
||
|
|
Grid.Column="0"
|
||
|
|
Grid.Row="0"
|
||
|
|
Padding="10,0,0,0">
|
||
|
|
<Label VerticalAlignment="Center">
|
||
|
|
<TextBlock Text="{Binding ServerHubInfo.StatusData.Name}" />
|
||
|
|
</Label>
|
||
|
|
</Border>
|
||
|
|
<Border
|
||
|
|
BorderThickness="2,0,2,0"
|
||
|
|
CornerRadius="0,10,0,0"
|
||
|
|
Grid.Column="1"
|
||
|
|
Grid.Row="0"
|
||
|
|
Padding="5">
|
||
|
|
<StackPanel
|
||
|
|
HorizontalAlignment="Center"
|
||
|
|
Orientation="Horizontal"
|
||
|
|
VerticalAlignment="Center">
|
||
|
|
<Label>
|
||
|
|
<TextBlock Text="{Binding ServerHubInfo.StatusData.Players}" />
|
||
|
|
</Label>
|
||
|
|
<Label>/</Label>
|
||
|
|
<Label>
|
||
|
|
<TextBlock Text="{Binding ServerHubInfo.StatusData.SoftMaxPlayers}" />
|
||
|
|
</Label>
|
||
|
|
</StackPanel>
|
||
|
|
</Border>
|
||
|
|
|
||
|
|
<Border
|
||
|
|
BorderThickness="2,0,0,0"
|
||
|
|
CornerRadius="0,0,10,10"
|
||
|
|
Grid.Column="0"
|
||
|
|
Grid.ColumnSpan="2"
|
||
|
|
Grid.Row="1"
|
||
|
|
MinHeight="50">
|
||
|
|
<Border.Background>
|
||
|
|
<ImageBrush Stretch="UniformToFill"
|
||
|
|
asyncImageLoader:ImageBrushLoader.Source="https://t4.ftcdn.net/jpg/00/81/55/69/360_F_81556974_8sF8cKszJaRfBGd5sDt1RXE2QbzDtQqs.jpg" />
|
||
|
|
</Border.Background>
|
||
|
|
<Border
|
||
|
|
BorderThickness="0,2,2,0"
|
||
|
|
CornerRadius="0,0,10,10"
|
||
|
|
IsVisible="True"
|
||
|
|
Margin="0,0,0,0"
|
||
|
|
Opacity="40"
|
||
|
|
Padding="0">
|
||
|
|
<UniformGrid Margin="15,5,15,0">
|
||
|
|
<UniformGrid.Styles>
|
||
|
|
<Style Selector="Label">
|
||
|
|
<Setter Property="FontSize" Value="8" />
|
||
|
|
</Style>
|
||
|
|
</UniformGrid.Styles>
|
||
|
|
<Label>
|
||
|
|
<StackPanel Orientation="Horizontal">
|
||
|
|
<TextBlock Margin="0,0,5,0">RoundStart:</TextBlock>
|
||
|
|
<TextBlock Text="{Binding ServerHubInfo.StatusData.RoundStartTime}" />
|
||
|
|
</StackPanel>
|
||
|
|
</Label>
|
||
|
|
<Label>
|
||
|
|
<StackPanel Orientation="Horizontal">
|
||
|
|
<TextBlock Margin="0,0,5,0">Map:</TextBlock>
|
||
|
|
<TextBlock Text="{Binding ServerHubInfo.StatusData.Map}" />
|
||
|
|
</StackPanel>
|
||
|
|
</Label>
|
||
|
|
<Label>
|
||
|
|
<StackPanel Orientation="Horizontal">
|
||
|
|
<TextBlock Margin="0,0,5,0">Preset:</TextBlock>
|
||
|
|
<TextBlock Text="{Binding ServerHubInfo.StatusData.Preset}" />
|
||
|
|
</StackPanel>
|
||
|
|
</Label>
|
||
|
|
<Label>
|
||
|
|
<StackPanel Orientation="Horizontal">
|
||
|
|
<TextBlock Margin="0,0,5,0">PanicBunker:</TextBlock>
|
||
|
|
<TextBlock Text="{Binding ServerHubInfo.StatusData.PanicBunker}" />
|
||
|
|
</StackPanel>
|
||
|
|
</Label>
|
||
|
|
<Label>
|
||
|
|
<StackPanel Orientation="Horizontal">
|
||
|
|
<TextBlock Margin="0,0,5,0">Round Id:</TextBlock>
|
||
|
|
<TextBlock Text="{Binding ServerHubInfo.StatusData.RoundId}" />
|
||
|
|
</StackPanel>
|
||
|
|
</Label>
|
||
|
|
<Label>
|
||
|
|
<StackPanel Orientation="Horizontal">
|
||
|
|
<TextBlock Margin="0,0,5,0">Run Level:</TextBlock>
|
||
|
|
<TextBlock Text="{Binding ServerHubInfo.StatusData.RunLevel}" />
|
||
|
|
</StackPanel>
|
||
|
|
</Label>
|
||
|
|
</UniformGrid>
|
||
|
|
</Border>
|
||
|
|
</Border>
|
||
|
|
|
||
|
|
<Panel Grid.Column="1" Grid.Row="1">
|
||
|
|
<Button
|
||
|
|
Command="{Binding RunInstance}"
|
||
|
|
CornerRadius="10,0,10,10"
|
||
|
|
HorizontalAlignment="Stretch"
|
||
|
|
IsVisible="{Binding RunVisible}"
|
||
|
|
VerticalAlignment="Stretch">
|
||
|
|
<Label HorizontalAlignment="Center" VerticalAlignment="Center">
|
||
|
|
Play
|
||
|
|
</Label>
|
||
|
|
</Button>
|
||
|
|
<Grid Grid.ColumnDefinitions="*,*" IsVisible="{Binding !RunVisible}">
|
||
|
|
<Button
|
||
|
|
Command="{Binding ReadLog}"
|
||
|
|
CornerRadius="10,0,0,10"
|
||
|
|
HorizontalAlignment="Stretch"
|
||
|
|
Margin="0,0,1,0"
|
||
|
|
VerticalAlignment="Stretch">
|
||
|
|
<Label HorizontalAlignment="Center" VerticalAlignment="Center">
|
||
|
|
Log
|
||
|
|
</Label>
|
||
|
|
</Button>
|
||
|
|
<Button
|
||
|
|
Command="{Binding StopInstance}"
|
||
|
|
CornerRadius="0,0,10,0"
|
||
|
|
Grid.Column="1"
|
||
|
|
HorizontalAlignment="Stretch"
|
||
|
|
Margin="1,0,0,0"
|
||
|
|
VerticalAlignment="Stretch">
|
||
|
|
<Label HorizontalAlignment="Center" VerticalAlignment="Center">
|
||
|
|
Stop
|
||
|
|
</Label>
|
||
|
|
</Button>
|
||
|
|
</Grid>
|
||
|
|
</Panel>
|
||
|
|
</Grid>
|
||
|
|
</UserControl>
|