private void button21_Click(object sender, System.EventArgs e)
 {
     AntivirusIdsFirewall antivirusForm = new AntivirusIdsFirewall();
     antivirusForm.unixSupport.Text = "Максимальные настройки";
     antivirusForm.windowsSupport.Text = "Стандартные настройки";
     if (antivirusForm.ShowDialog() == DialogResult.OK)
     {
         Firewall firewall = new Firewall()
         {
             Name = antivirusForm.NameObject,
             Price = antivirusForm.PriceObject,
             Support = antivirusForm.SuppotObject,
             ClassId = antivirusForm.ClassObject
         };
         _baseWorker.AddObject(firewall, "Firewalls");
         RefreshFirewalls();
     }
 }
        private void button20_Click(object sender, System.EventArgs e)
        {
            Firewall oldFirewall = firewallsListBox.SelectedItem as Firewall;

            if (oldFirewall == null)
            {
                return;
            }
            AntivirusIdsFirewall antivirusForm = new AntivirusIdsFirewall(oldFirewall);
            antivirusForm.unixSupport.Text = "Максимальные настройки";
            antivirusForm.windowsSupport.Text = "Стандартные настройки";
            if (antivirusForm.ShowDialog() == DialogResult.OK)
            {
                Firewall newFirewall = new Firewall()
                {
                    Name = antivirusForm.NameObject,
                    Price = antivirusForm.PriceObject,
                    Support = antivirusForm.SuppotObject,
                    ClassId = antivirusForm.ClassObject
                };
                _baseWorker.ChangeObject(oldFirewall, newFirewall, "Firewalls");
                RefreshFirewalls();
            }
        }
 private void button18_Click(object sender, System.EventArgs e)
 {
     AntivirusIdsFirewall antivirusForm = new AntivirusIdsFirewall();
     if (antivirusForm.ShowDialog() == DialogResult.OK)
     {
         IDS ids = new IDS()
         {
             Name = antivirusForm.NameObject,
             Price = antivirusForm.PriceObject,
             Support = antivirusForm.SuppotObject,
             ClassId = antivirusForm.ClassObject
         };
         _baseWorker.AddObject(ids, "IDS");
         RefreshIdes();
     }
 }
 private void button17_Click(object sender, System.EventArgs e)
 {
     IDS oldIds = idsListBox.SelectedItem as IDS;
     if (oldIds == null)
     {
         return;
     }
     AntivirusIdsFirewall antivirusForm = new AntivirusIdsFirewall(oldIds);
     if (antivirusForm.ShowDialog() == DialogResult.OK)
     {
         IDS newIds = new IDS()
         {
             Name = antivirusForm.NameObject,
             Price = antivirusForm.PriceObject,
             Support = antivirusForm.SuppotObject,
             ClassId = antivirusForm.ClassObject
         };
         _baseWorker.ChangeObject(oldIds, newIds, "IDS");
         RefreshIdes();
     }
 }
 private void button14_Click(object sender, System.EventArgs e)
 {
     Antivirus oldAntivirus = antivirusListBox.SelectedItem as Antivirus;
     if (oldAntivirus == null)
     {
         return;
     }
     AntivirusIdsFirewall antivirusForm = new AntivirusIdsFirewall(oldAntivirus);
     antivirusForm.unixSupport.Text = "Unix";
     antivirusForm.windowsSupport.Text = "Windows";
     if (antivirusForm.ShowDialog() == DialogResult.OK)
     {
         Antivirus newAntivirus = new Antivirus()
         {
             Name = antivirusForm.NameObject,
             Price = antivirusForm.PriceObject,
             Support = antivirusForm.SuppotObject,
             ClassId = antivirusForm.ClassObject
         };
         _baseWorker.ChangeObject(oldAntivirus, newAntivirus, "Antiviruses");
         RefreshAntiviruses();
     }
 }
 private void button13_Click(object sender, System.EventArgs e)
 {
     AntivirusIdsFirewall antivirusForm = new AntivirusIdsFirewall();
     antivirusForm.unixSupport.Text = "Unix";
     antivirusForm.windowsSupport.Text = "Windows";
     if (antivirusForm.ShowDialog() == DialogResult.OK)
     {
         Antivirus antivirus = new Antivirus()
         {
             Name = antivirusForm.NameObject,
             Price = antivirusForm.PriceObject,
             Support = antivirusForm.SuppotObject,
             ClassId = antivirusForm.ClassObject
         };
         _baseWorker.AddObject(antivirus, "Antiviruses");
         RefreshAntiviruses();
     }
 }