private void StartTransmitsAfterAuthentication() { Register(); curstate.SetServerInUse(ircCore1.ServerName); try { //this means the server authenticated and ready to join channels. Good place to join favorites. StartupAndJoins.JoinFavorites(ircCore1, curstate.activeChannelList); TreeNode thisTN = null; foreach (TreeNode tnn in tvChans.Nodes) { if (tnn.Text == ircCore1.ServerName) { thisTN = tnn; } } thisTN.Nodes.Clear(); TreeNode tnn2 = null; for (int i = 0; i < connectionNodes.Count; i++) { tnn2 = connectionNodes[i]; if (tnn2.Text == ircCore1.ServerName) { break; } } if (tnn2 == null) { return; } foreach (KeyValuePair <string, ChanMessageList> chans in curstate.activeChannelList) { TreeNode n = new TreeNode(chans.Key); tnn2.Nodes.Add(n); n.Tag = chans.Value; //clbChannels.Items.Add(chans.Value.Channel); } AddChannelList(); tnn2.ExpandAll(); } catch (Exception e2) { MessageBox.Show(e2.Message); } }
private void btnJoinFavs_Click(object sender, EventArgs e) { StartupAndJoins.JoinFavorites(ircCore1, curstate.activeChannelList); }