Exemple #1
0
 private void systemInformationToolStripMenuItem_Click(object sender, EventArgs e)
 {
     foreach (Client c in GetSelectedClients())
     {
         FrmSystemInformation frmSi = FrmSystemInformation.CreateNewOrGetExisting(c);
         frmSi.Show();
         frmSi.Focus();
     }
 }
        /// <summary>
        /// Creates a new system information form for the client or gets the current open form, if there exists one already.
        /// </summary>
        /// <param name="client">The client used for the system information form.</param>
        /// <returns>
        /// Returns a new system information form for the client if there is none currently open, otherwise creates a new one.
        /// </returns>
        public static FrmSystemInformation CreateNewOrGetExisting(Client client)
        {
            if (OpenedForms.ContainsKey(client))
            {
                return(OpenedForms[client]);
            }
            FrmSystemInformation f = new FrmSystemInformation(client);

            f.Disposed += (sender, args) => OpenedForms.Remove(client);
            OpenedForms.Add(client, f);
            return(f);
        }
Exemple #3
0
 private void ctxtSystemInformation_Click(object sender, EventArgs e)
 {
     foreach (Client c in GetSelectedClients())
     {
         if (c.Value.FrmSi != null)
         {
             c.Value.FrmSi.Focus();
             return;
         }
         FrmSystemInformation frmSI = new FrmSystemInformation(c);
         frmSI.Show();
     }
 }
Exemple #4
0
 private void ctxtSystemInformation_Click(object sender, EventArgs e)
 {
     if (lstClients.SelectedItems.Count != 0)
     {
         Client c = (Client)lstClients.SelectedItems[0].Tag;
         if (c.Value.FrmSi != null)
         {
             c.Value.FrmSi.Focus();
             return;
         }
         FrmSystemInformation frmSI = new FrmSystemInformation(c);
         frmSI.Show();
     }
 }
Exemple #5
0
 private void ctxtSystemInformation_Click(object sender, EventArgs e)
 {
     foreach (Client c in GetSelectedClients())
     {
         if (c.Value.FrmSi != null)
         {
             c.Value.FrmSi.Focus();
             return;
         }
         FrmSystemInformation frmSI = new FrmSystemInformation(c);
         frmSI.Show();
     }
 }
Exemple #6
0
 private void ctxtSystemInformation_Click(object sender, EventArgs e)
 {
     if (lstClients.SelectedItems.Count != 0)
     {
         Client c = (Client) lstClients.SelectedItems[0].Tag;
         if (c.Value.FrmSi != null)
         {
             c.Value.FrmSi.Focus();
             return;
         }
         FrmSystemInformation frmSI = new FrmSystemInformation(c);
         frmSI.Show();
     }
 }