Example #1
0
 public ProductNameChangeForm(ModifiedProducts product, List <ModifiedProducts> productsList)
 {
     InitializeComponent();
     currentProduct    = product;
     this.productsList = productsList;
     currentIndex      = this.productsList.FindIndex(x => x.Id == product.Id);
     initialIndex      = currentIndex;
     LoadProduct();
 }
Example #2
0
 private void PreviousProductBut_Click(object sender, EventArgs e)
 {
     nextProductBut.Enabled = true;
     currentIndex--;
     if (currentIndex == initialIndex)
     {
         previousProductBut.Enabled = false;
     }
     if (currentIndex < 0)
     {
         currentIndex = productsList.Count - 1;
     }
     currentProduct = productsList[currentIndex];
     LoadProduct();
 }