示例#1
0
        /// <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);
        }
示例#2
0
 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();
     }
 }
示例#3
0
文件: FrmMain.cs 项目: yhz9999/xRAT
 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();
     }
 }
示例#4
0
文件: FrmMain.cs 项目: Nusec/xRAT
 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();
     }
 }
示例#5
0
 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();
     }
 }