public ConfigForm()
{
InitializeComponent();
}
public void InitialiseFields(StreamConfiguration config)
{
if (config != null)
{
txtAddress.Text = config.Address;
txtUsername.Text = config.Username;
txtPassword.Text = config.Password;
cbxProtocol.SelectedItem = config.Protocol.ToString();
}
else
{
cbxProtocol.SelectedItem = "TCP";
}
}
void FormAMethod()
{
if (formB.InvokeRequired)
{
formB.Invoke( () => formB.Text = "data" );
}
else
{
formB.Text = "data";
}
}