예제 #1
0
 public bool checkSimilarAddedTvs(TvsControl TvsItem)
 {
     if (getTvsInBasket().Count != 0)
     {
         for (int i = 0; i < getTvsInBasket().Count; i++)
         {
             if (getTvsInBasket()[i].Title == TvsItem.Title)
             {
                 changeTvsControlsInBasket(TvsItem, getTvsInBasket()[i]);
                 return(true);
             }
         }
     }
     return(false);
 }
예제 #2
0
        public void changeTvsControlsInBasket(TvsControl newTvsItem, TvsControl deleteTvs)
        {
            int newQuantityCombo = newTvsItem.infoComboQuantitySelected() + deleteTvs.infoComboQuantitySelected();

            if (newQuantityCombo > newTvsItem.infoComboQuantityAmount())
            {
                tvsControlsInBasket.Remove(deleteTvs);
                flowLayoutPanelBasket.Controls.Remove(deleteTvs);
                tvsControlsInBasket.Add(newTvsItem);
            }
            else
            {
                newTvsItem.setSelectedQuantity(newQuantityCombo);
                tvsControlsInBasket.Remove(deleteTvs);
                flowLayoutPanelBasket.Controls.Remove(deleteTvs);
                tvsControlsInBasket.Add(newTvsItem);
            }
        }
예제 #3
0
 public void addTvs(TvsControl tvs)
 {
     tvsControlsInBasket.Add(tvs);
 }