Ejemplo n.º 1
0
        private void tvButtonModel_Click(object sender, EventArgs e)
        {
            MessageBox.Show("Object Id: " + boundTreeView1.SelectedNode.Tag);

            if (string.IsNullOrEmpty(textboxModel.Text))
            {
                return;
            }

            var leaf = LeafList.FindLeafByLeafId((int)boundTreeView1.SelectedNode.Tag);

            leaf.LeafName = textboxModel.Text;

            leafName.Text = leaf.LeafName;
        }
Ejemplo n.º 2
0
        private void dgvButtonModel_Click(object sender, EventArgs e)
        {
            if (dataGridView1.CurrentRow == null || string.IsNullOrEmpty(dgvTextboxModel.Text))
            {
                return;
            }

            var leaf = LeafList.FindLeafByLeafId((int)dataGridView1.CurrentRow.Cells[0].Value);

            leaf.LeafName = dgvTextboxModel.Text;
            RedrawForm();

            leafName.Text = leaf.LeafName;
        }