コード例 #1
0
ファイル: frmNewContract.cs プロジェクト: tansdj/SEN
 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
ファイル: BenchmarkSystem.cs プロジェクト: r2d2m/gocs
 public override void OnDestroyingComponent(IComponent component)
 {
     components.Remove(component.gameObject);
 }