/// <summary> /// Creates a new remote desktop form for the client or gets the current open form, if there exists one already. /// </summary> /// <param name="client">The client used for the remote desktop form.</param> /// <returns> /// Returns a new remote desktop form for the client if there is none currently open, otherwise creates a new one. /// </returns> public static FrmRemoteDesktop CreateNewOrGetExisting(Client client) { if (OpenedForms.ContainsKey(client)) { return(OpenedForms[client]); } FrmRemoteDesktop r = new FrmRemoteDesktop(client); r.Disposed += (sender, args) => OpenedForms.Remove(client); OpenedForms.Add(client, r); return(r); }
private void ctxtRemoteDesktop_Click(object sender, EventArgs e) { foreach (Client c in GetSelectedClients()) { if (c.Value.FrmRdp != null) { c.Value.FrmRdp.Focus(); return; } FrmRemoteDesktop frmRDP = new FrmRemoteDesktop(c); frmRDP.Show(); } }
private void ctxtRemoteDesktop_Click(object sender, EventArgs e) { if (lstClients.SelectedItems.Count != 0) { Client c = (Client)lstClients.SelectedItems[0].Tag; if (c.Value.FrmRdp != null) { c.Value.FrmRdp.Focus(); return; } FrmRemoteDesktop frmRDP = new FrmRemoteDesktop(c); frmRDP.Show(); } }
private void ctxtRemoteDesktop_Click(object sender, EventArgs e) { if (lstClients.SelectedItems.Count != 0) { Client c = (Client) lstClients.SelectedItems[0].Tag; if (c.Value.FrmRdp != null) { c.Value.FrmRdp.Focus(); return; } FrmRemoteDesktop frmRDP = new FrmRemoteDesktop(c); frmRDP.Show(); } }