Пример #1
0
 private void btnNextComp_Click(object sender, EventArgs e)
 {
     if (ValidateProductInfo())
     {
         ContractProducts cp = new ContractProducts(contract, product);
         if (!products.Contains(cp))
         {
             products.Add(cp);
             List <SystemComponents> comps = new SystemComponents(product).GetSystemComponents();
             foreach (SystemComponents item in comps)
             {
                 if (item.Status == "Discontinued")
                 {
                     comps.Remove(item);
                 }
             }
             compBind.DataSource     = comps;
             lbComponents.DataSource = compBind;
             pnlProducts.Hide();
             pnlComponents.Show();
         }
         else
         {
             CustomExceptions error = new CustomExceptions("This product has already been added to the contract.", "Duplicate Product");
         }
     }
     else
     {
         CustomExceptions error = new CustomExceptions("Please select a product before you continue.", "No product selected");
     }
 }
Пример #2
0
 public override void OnDestroyingComponent(IComponent component)
 {
     if (components.Remove(component.gameObject, out var zone, out var trigger))
     {
         enterEvents[trigger.onEnter] = null;
         exitEvents[trigger.onExit]   = null;
     }
 }
Пример #3
0
 public override void OnDestroyingComponent(IComponent component)
 {
     components.Remove(component.gameObject);
 }