public ClientForm(UvncClient uvncClient) { InitializeComponent(); base.Text = uvncClient.Host; remoteDesktop1.GetPassword = () => uvncClient.Password; remoteDesktop1.VncProxyID = uvncClient.ProxyID; remoteDesktop1.VncPort = uvncClient.Port; remoteDesktop1.Connect(uvncClient.Host, uvncClient.Display, uvncClient.ViewOnly, uvncClient.Scaled); }
private void ConnectToPartner() { CheckForError(partnerIDTextBox, "Please put Partner ID"); CheckForError(passwordTextBox, "Please put Password"); if (_errorCount == 0) { errorProvider1.Clear(); partnerIDTextBox.BackColor = Color.White; var client = new UvncClient { Host = partnerIDTextBox.Text, Password = passwordTextBox.Text }; var form = new ClientForm(client); form.Show(); } _errorCount = 0; }