Rename to Torch, add command system

This commit is contained in:
John Gross
2016-12-17 01:59:03 -08:00
parent 7d51ac9295
commit fb521abbda
85 changed files with 366 additions and 354 deletions

View File

@@ -0,0 +1,53 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Windows;
using System.Windows.Controls;
using System.Windows.Data;
using System.Windows.Documents;
using System.Windows.Input;
using System.Windows.Media;
using System.Windows.Media.Imaging;
using System.Windows.Navigation;
using System.Windows.Shapes;
using Torch;
using Sandbox;
using Sandbox.Engine.Multiplayer;
using Sandbox.Game.Multiplayer;
using Sandbox.Game.World;
using SteamSDK;
namespace Torch.Server
{
/// <summary>
/// Interaction logic for PlayerListControl.xaml
/// </summary>
public partial class PlayerListControl : UserControl
{
public PlayerListControl()
{
InitializeComponent();
PlayerList.ItemsSource = TorchServer.Multiplayer.PlayersView;
}
private void KickButton_Click(object sender, RoutedEventArgs e)
{
var player = PlayerList.SelectedItem as PlayerInfo;
if (player != null)
{
TorchServer.Multiplayer.KickPlayer(player.SteamId);
}
}
private void BanButton_Click(object sender, RoutedEventArgs e)
{
var player = PlayerList.SelectedItem as PlayerInfo;
if (player != null)
{
TorchServer.Multiplayer.BanPlayer(player.SteamId);
}
}
}
}