Exemple #1
0
 private void addBtn_Click(object sender, EventArgs e)
 {
     addChannel newChannel = new addChannel(channelTree, Channels);
     newChannel.Show();
 }
Exemple #2
0
        private void editBtn_Click(object sender, EventArgs e)
        {
            // First remove the old one

            if (channelTree.SelectedNode.Level == 0)
            {
                Channel ch;
                Channel editCh;

                ch = Channels.Find(
                    delegate(Channel csh)
                    {
                        return (csh.mTitle == channelTree.SelectedNode.Text);
                    });
                editCh = ch;
                if (ch != null)
                {

                    Channels.Remove(ch);
                    refreshAll();
                    SaveXML newXMLSave = new SaveXML();
                    newXMLSave.toXMLDoc(Channels);
                }

                // Now create a new one
                if (editCh != null)
                {
                    addChannel edit = new addChannel(channelTree, Channels, editCh.mTitle, editCh.mDescription);
                    edit.Show();
                }
            }
        }