void PardonPlayer(object sender, EventArgs e) { foreach (PlayerListItem i in SelectedItems) { ProxyControl.Pardon(i.Item.Username); } }
void HandleTpPlayerClick(object sender, EventArgs e) { var c = Map.Position.Clone(); c.Y = 100; ProxyControl.Tp("Player", c, Map.Dimension); }
void HandlePardonClick(object sender, EventArgs e) { string u = TextInput.GetInput(this, "Who"); if (u == null) { return; } ProxyControl.Pardon(u); }
protected override void OnShown(EventArgs e) { base.OnShown(e); ProxyControl.Update += PlayersUpdated; #if DEBUG ProxyControl.Connect(25465); ServerCommander.Startup(); #else ProxyControl.Connect(25465); ServerCommander.Startup(); #endif }
void HandleBanClick(object sender, EventArgs e) { string u = TextInput.GetInput(this, "Who"); if (u == null) { return; } string w = TextInput.GetInput(this, "Why"); if (w == null) { return; } ProxyControl.Ban(u, DateTime.MaxValue, w); }
void KickPlayer(object sender, EventArgs e) { string players = ""; foreach (PlayerListItem i in SelectedItems) { players += " " + i.Item.Username; } string reason = TextInput.GetInput(this, "Why Kick" + players); if (reason == null) { return; } foreach (PlayerListItem i in SelectedItems) { ProxyControl.Kick(i.Item, reason); } }
void BanPlayer30(object sender, EventArgs e) { string players = ""; foreach (PlayerListItem i in SelectedItems) { players += " " + i.Item.Username; } string reason = TextInput.GetInput(this, "Why Ban" + players); if (reason == null) { return; } foreach (PlayerListItem i in SelectedItems) { ProxyControl.Ban(i.Item, DateTime.Now.AddMinutes(30), reason); } }
protected override void OnClosing(System.ComponentModel.CancelEventArgs e) { ProxyControl.Stop(); base.OnClosing(e); }