public void SetConnectionStatusLabel(bool isConnect, string point = null) { if (this.labelStatus.InvokeRequired) { VoidBoolString scsl = SetConnectionStatusLabel; this.labelStatus.Invoke(scsl, isConnect, point); } else { if (isConnect) { this.labelStatus.ForeColor = Color.Green; this.labelStatus.Text = point; } else { this.labelStatus.ForeColor = Color.Red; this.labelStatus.Text = "尚未连接"; } } }
public void SetStatusLabel(bool isConnect, string point = null) { if (this.labelStatus.InvokeRequired) { VoidBoolString ssl = SetStatusLabel; this.labelStatus.Invoke(ssl, isConnect, point); } else { if (isConnect) { this.labelStatus.ForeColor = Color.Green; this.labelStatus.Text = "POŁACZONY"; this.labelInfoIP.Text = point; } else { this.labelStatus.ForeColor = Color.Red; this.labelStatus.Text = "NIEPOŁĄCZONY"; this.labelInfoIP.Text = "BRAK"; } } }