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 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); } }