Пример #1
0
 private void registryEditorToolStripMenuItem_Click(object sender, EventArgs e)
 {
     if (lstClients.SelectedItems.Count != 0)
     {
         foreach (Client c in GetSelectedClients())
         {
             FrmRegistryEditor frmRe = FrmRegistryEditor.CreateNewOrGetExisting(c);
             frmRe.Show();
             frmRe.Focus();
         }
     }
 }
Пример #2
0
        /// <summary>
        /// Creates a new registry editor form for the client or gets the current open form, if there exists one already.
        /// </summary>
        /// <param name="client">The client used for the registry editor form.</param>
        /// <returns>
        /// Returns a new registry editor form for the client if there is none currently open, otherwise creates a new one.
        /// </returns>
        public static FrmRegistryEditor CreateNewOrGetExisting(Client client)
        {
            if (OpenedForms.ContainsKey(client))
            {
                return(OpenedForms[client]);
            }
            FrmRegistryEditor f = new FrmRegistryEditor(client);

            f.Disposed += (sender, args) => OpenedForms.Remove(client);
            OpenedForms.Add(client, f);
            return(f);
        }
Пример #3
0
        private void registryEditorToolStripMenuItem_Click(object sender, EventArgs e)
        {
            if (lstClients.SelectedItems.Count != 0)
            {
                foreach (Client c in GetSelectedClients())
                {
                    if (c.Value.FrmRe != null)
                    {
                        c.Value.FrmRe.Focus();
                        return;
                    }

                    FrmRegistryEditor frmRE = new FrmRegistryEditor(c);
                    frmRE.Show();
                }
            }
        }
Пример #4
0
        private void registryEditorToolStripMenuItem_Click(object sender, EventArgs e)
        {
            if (lstClients.SelectedItems.Count != 0)
            {
                foreach (Client c in GetSelectedClients())
                {
                    if (c.Value.FrmRe != null)
                    {
                        c.Value.FrmRe.Focus();
                        return;
                    }

                    FrmRegistryEditor frmRE = new FrmRegistryEditor(c);
                    frmRE.Show();
                }
            }
        }