WingMan

Subversion Repositories:
Compare Path: Rev
With Path: Rev
?path1? @ 2  →  ?path2? @ 3
/trunk/WingMan/WingManForm.cs
@@ -52,7 +52,9 @@
toolStripStatusLabel.Text = Properties.Strings.Server_stopped;
HostButton.BackColor = Color.Empty;
 
// Enable controls.
ConnectButton.Enabled = true;
EnableConnectionControls();
return;
}
 
@@ -64,9 +66,25 @@
toolStripStatusLabel.Text = Properties.Strings.Server_started;
HostButton.BackColor = Color.Aquamarine;
 
// Disable controls
ConnectButton.Enabled = false;
DisableConnectionControls();
}
 
private void DisableConnectionControls()
{
Address.Enabled = false;
Port.Enabled = false;
Nick.Enabled = false;
}
 
private void EnableConnectionControls()
{
Address.Enabled = true;
Port.Enabled = true;
Nick.Enabled = true;
}
 
private bool ValidateAddressPort(out IPAddress address, out int port, out string nick)
{
address = IPAddress.Any;
@@ -146,6 +164,7 @@
ConnectButton.Text = Properties.Strings.Connect;
ConnectButton.BackColor = Color.Empty;
 
EnableConnectionControls();
HostButton.Enabled = true;
return;
}
@@ -160,6 +179,7 @@
ConnectButton.BackColor = Color.Aquamarine;
 
HostButton.Enabled = false;
DisableConnectionControls();
}
 
private async Task StopClient()