private void radioButtonCygterm_CheckedChanged(object sender, EventArgs e)
{
string host = this.textBoxHostname.Text;
bool isLocalShell = this.radioButtonCygterm.Checked || this.radioButtonMintty.Checked;
this.textBoxPort.Enabled = !isLocalShell;
this.textBoxExtraArgs.Enabled = !isLocalShell;
this.textBoxUsername.Enabled = !isLocalShell;
if (isLocalShell)
{
if (String.IsNullOrEmpty(host) || !host.StartsWith(CygtermStartInfo.LocalHost))
{
OldHostname = this.textBoxHostname.Text;
this.textBoxHostname.Text = CygtermStartInfo.LocalHost;
}
}
}