private void txtFormula_KeyDown(object sender, KeyEventArgs e)
        {
            if (e.KeyCode == Keys.Enter)
            {
                Dialog.frmDialogFormular r = new Dialog.frmDialogFormular(txtFormula.Text);
                r.StartPosition = FormStartPosition.CenterScreen;
                r.ShowDialog();

                if (r.DialogResult == System.Windows.Forms.DialogResult.OK)
                {
                    txtFormula.Text = "["+r.getFormularId()+"] " + r.getFormularName() + "";
                    label7.Text = r.getUnit();
                }
            }
        }
Exemplo n.º 2
0
        private void txtFormula_KeyDown(object sender, KeyEventArgs e)
        {
            if (e.KeyCode == Keys.Enter)
            {
                Dialog.frmDialogFormular frm = new Dialog.frmDialogFormular(txtFormula.Text);
                frm.dataGridView2.Visible = false;
                frm.dataGridView1.Dock = DockStyle.Fill;
                frm.tableLayoutPanel1.SetColumnSpan(frm.dataGridView1, 2);
                frm.toolStrip1.Enabled = false;
                frm.ShowDialog();

                if (frm.DialogResult == System.Windows.Forms.DialogResult.OK)
                {
                    txtFormula.Text = "[" + frm.getFormularId() + "] " + frm.getFormularName() + "";
                    label7.Text = frm.getUnit();
                }
            }
        }