public UserAccountsDlg(TeamTalkBase tt) { ttclient = tt; create_cmdid = 0; del_cmdid = 0; InitializeComponent(); this.CenterToScreen(); listView1.Columns.Add("Username"); listView1.Columns.Add("Password"); listView1.Columns.Add("User Type"); listView1.Columns.Add("UserData"); listView1.Columns.Add("Note"); Channel[] channels; if (ttclient.GetServerChannels(out channels)) { foreach (Channel chan in channels) { string channel = ""; //auto-op only works for static channels if (chan.uChannelType.HasFlag(ChannelType.CHANNEL_PERMANENT) && ttclient.GetChannelPath(chan.nChannelID, ref channel)) { availchanListBox.Items.Add(channel); } } } ttclient.OnCmdProcessing += new TeamTalkBase.CommandProcessing(ttclient_OnCmdProcessing); ttclient.OnCmdError += new TeamTalkBase.CommandError(ttclient_OnCmdError); ttclient.OnCmdSuccess += new TeamTalkBase.CommandSuccess(ttclient_OnCmdSuccess); ttclient.OnCmdUserAccount += new TeamTalkBase.ListUserAccount(ttclient_OnCmdUserAccount); //hopefully you have less than 100000 accounts list_cmdid = ttclient.DoListUserAccounts(0, 100000); }