private void newConnectionToolStripMenuItem_Click(object sender, EventArgs e) { rdpClient = new RdpClient(); port = 3389; hostname = "localhost"; username = "******"; domain = ""; password = "******"; rdpClient.Connect(hostname, port, username, domain, password); }
private void newConnectionToolStripMenuItem_Click(object sender, EventArgs e) { ConnectionDialog dialog = new ConnectionDialog(); if (dialog.ShowDialog() == DialogResult.OK) { rdpClient = new RdpClient(); rdpClient.Connect(dialog.GetConnectionSettings()); } dialog.Dispose(); }