private void LoadButton_Click(object sender, EventArgs e)
        {
            LoadDialog LoadDialogAdd = new LoadDialog();
            DialogResult dialogResultAddNode = DialogResult.Cancel;
            dialogResultAddNode = LoadDialogAdd.ShowDialog();

            if(dialogResultAddNode == DialogResult.OK)
                if (LoadDialogAdd.DialogResult.Equals(DialogResult.OK))
                {
                    ProtocolNode treeNode = new ProtocolNode(LoadDialogAdd.getProtocolName());
                    DataGridView DGV = LoadDialogAdd.getDGV();
                    tlvProtocol.Nodes.Add(treeNode);
                    DataSets.dsModuleStructure3.dtSavedProtocolRow row;
                    DataSets.dsModuleStructure3.dtStepCompositeRow Compositerow;

                    foreach (DataGridViewRow DGVrow in DGV.Rows)
                    {
                        DataRowView rowView = DGVrow.DataBoundItem as DataRowView;
                        row = rowView.Row as DataSets.dsModuleStructure3.dtSavedProtocolRow;

                        foreach (DataSets.dsModuleStructure3.dtStepCompositeRow CompositeRow in dsModuleStructure.dtStepComposite)
                        {
                            if (row.fk_step_composite == CompositeRow.pk_id)
                            {
                                addNodes(CompositeRow, treeNode);
                            }
                        }
                    }
                }

            //if (result == DialogResult.OK)
            //{
            //    LoadTree(tlvProtocol, dialogue.FileName);
            //}
        }
 private void btnAdd_Click(object sender, EventArgs e)
 {
     frmNewProtocol frmProtocolAdd = new frmNewProtocol();
     DialogResult dialogResultAddNode = DialogResult.Cancel;
     dialogResultAddNode = frmProtocolAdd.ShowDialog();
     if (dialogResultAddNode == DialogResult.OK)
     {
         if (dialogResultAddNode.Equals(DialogResult.OK))
         {
             ProtocolNode treeNode = new ProtocolNode(frmProtocolAdd.getStepName());
             if (tlvProtocol.SelectedNode != null)
             {
                 tlvProtocol.SelectedNode.Nodes.Add(treeNode);
             }
             else
             {
                 tlvProtocol.Nodes.Add(treeNode);
             }
         }
     }
 }