Files
Torch/Torch.Server/Views/PlayerListControl.xaml
Brant Martin a059d18195 Add promote/demote buttons to player tab.
Add player promoted event to IMultiplayerManagerServer
2019-01-03 15:41:41 -05:00

28 lines
1.5 KiB
XML

<UserControl x:Class="Torch.Server.PlayerListControl"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
mc:Ignorable="d">
<DockPanel>
<StackPanel DockPanel.Dock="Bottom">
<Button x:Name="KickButton" Content="Kick" Margin="5,5,5,5" Click="KickButton_Click"/>
<Button x:Name="BanButton" Content="Ban" Margin="5,5,5,5" Click="BanButton_Click"/>
<Button x:Name="PromoteButton" Content ="Promote" Margin="5,5,5,5" Click="PromoteButton_OnClick"/>
<Button x:Name="DemoteButton" Content ="Demote" Margin="5,5,5,5" Click="DemoteButton_OnClick"/>
</StackPanel>
<ListView x:Name="PlayerList" ItemsSource="{Binding Players}" DockPanel.Dock="Top" Margin="5,5,5,5">
<ListView.ItemTemplate>
<DataTemplate>
<WrapPanel>
<TextBlock Text="{Binding Value.PromotedName}" FontWeight="Bold"/>
<TextBlock Text=" ("/>
<TextBlock Text="{Binding Value.State}"/>
<TextBlock Text=")"/>
</WrapPanel>
</DataTemplate>
</ListView.ItemTemplate>
</ListView>
</DockPanel>
</UserControl>