Exemple #1
0
        private void button3_Click(object sender, EventArgs e)
        {
            DataRow row = CreateTarget.Show(current_project.project);

            if (row != null)
            {
                current_project.Nodes.Add(new TargetNode(row));
            }
        }
Exemple #2
0
        public static DataRow Show(DataRow project)
        {
            CreateTarget ct = new CreateTarget();

            ct.textBox1.Text = project["name"] as String;
            ct.ShowDialog();
            if (ct.DialogResult == DialogResult.OK)
            {
                DataRow newrow = ProjectData.project_data_set.NewTarget(project, ct.textBox1.Text);
                newrow["target_type"] = ct.comboBox1.SelectedItem;
                newrow.Table.AcceptChanges();
                return(newrow);
            }
            return(null);
        }