private void b_save_Click(object sender, EventArgs e) { protocol = new Protocol(tb_title.Text, tb_source.Text, tb_description.Text); tv = new TreeView(); tv.Size = p_newlayers.Size; tv.Location = p_newlayers.Location; tv.HideSelection = false; tv.Nodes.Add("block", protocol.getName(), protocol.getSource(), protocol.getDescription()); tv.SelectedNode = tv.Nodes[0]; tv.BackColor = SystemColors.ActiveCaption; tv.BorderStyle = BorderStyle.Fixed3D; p_newlayers.Controls.Add(tv); p_newprotocol.Hide(); p_newlayers.Show(); l_protocolName.Text = protocol.getName(); l_protocolDesc.Text = protocol.getDescription(); p_add_new_data.Show(); }