void ListBoxUsernames_MouseDoubleClick(object sender, MouseEventArgs e) { UserOptions options = new UserOptions(); ListBox lb = (sender as ListBox); List <TSPlayer> tsplrs = TShock.Utils.FindPlayer(lb.Items[lb.SelectedIndex].ToString()); if (tsplrs.Count == 0) { return; } options.TSPlayer = tsplrs[0]; options.ShowDialog(); }
void ListBoxUsernames_MouseDoubleClick(object sender, MouseEventArgs e) { UserOptions options = new UserOptions(); ListBox lb = (sender as ListBox); List<TSPlayer> tsplrs = TShock.Utils.FindPlayer(lb.Items[lb.SelectedIndex].ToString()); if (tsplrs.Count == 0) return; options.TSPlayer = tsplrs[0]; options.ShowDialog(); }