private async void OpenAForm(object sender, EventArgs e) { RemoteForm rm = new RemoteForm((string)sender, this.txtPassword.Text); rm.setManager(Manager); rm.Show(); }
private void openForm(String systemId) { RemoteForm rm = new RemoteForm(systemId, this.txtPassword.Text); rm.setManager(Manager); rm.Show(); rm.Start(); }
private void OnClientConnected(object sender, ClientConnectedEventArgs e) { if (e.PasswordOk) { if (this.InvokeRequired) { ShowFormCallback d = new ShowFormCallback(openForm); this.Invoke(d, new object[] { e.SystemId }); } else { RemoteForm rm = new RemoteForm(e.SystemId, this.txtPassword.Text); rm.setManager(Manager); rm.Show(); } this.lblStatus.Text = "Passwort Ok Verbunden mit: " + e.SystemId; } else { this.lblStatus.Text = "Passwort Falsch Verbindung abgebrochen von: " + e.SystemId; } }