How can I share variables between windows forms and windows controls?
I have the following in control:
if (oTcConfig.ShowDialog() == DialogResult.OK){
////Asignamos los valores introducidos por el usuario a las variables internas
ConfData.TcCnf.NormType = (byte)(oTcConfig.comboBoxNormType.SelectedIndex + 1);
}
Then in another way I do the following:
public void grabarEnToolStripMenuItem_Click(object sender, EventArgs e)
{
label1.Text = ConfData.TcCnf.NormType.ToString();
}
I enter the value of the initialization and not the actual value of the combo box. It's as if the variable had not been updated.