Ejemplo n.º 1
0
        private void CreateProductButtons()
        {
            this.PrepareUIForCreateButtons();
            List <ProductEntry> productEntries = InterplayStorage.GetProductEntries();

            this.CreateProductButtons(productEntries);
        }
Ejemplo n.º 2
0
        private void Article_Mouse_Down(object sender, MouseEventArgs e)
        {
            try
            {
                InterplayStorage.SetSelectedSimpleArticle(((InterplayPOSArticleButton)sender).simpleArticle);

                mouseUp = false;
                Stopwatch stopWatch = new Stopwatch();
                stopWatch.Start();

                while (e.Button == MouseButtons.Left && e.Clicks == 1 && (mouseUp == false && stopWatch.ElapsedMilliseconds < holdButtonDuration))
                {
                    Application.DoEvents();
                }

                if (stopWatch.ElapsedMilliseconds < holdButtonDuration)
                {
                    Cart.CartInstance.UpdateItems(new Items {
                        articleId = InterplayStorage.SelectedSimpleArticle.referenceArticleId, quantity = 1
                    });
                }

                else
                {
                    Quantity quantityForm = new Quantity();
                    quantityForm.ShowDialog();
                }
            }
            catch (Exception ex)
            {
                this.HandleException(ex);
            }
        }
Ejemplo n.º 3
0
 private void txtSearch_TextChanged(object sender, EventArgs e)
 {
     try
     {
         this.PrepareUIForCreateButtons();
         this.CreateProductButtons(InterplayStorage.GetProductEntries(txtSearch.Text));
     }
     catch (Exception ex)
     {
         this.HandleException(ex);
     }
 }
Ejemplo n.º 4
0
 private void Product_Button_Click(object sender, EventArgs e)
 {
     try
     {
         InterplayStorage.SetSelectedProductEntry(((InterPlayPOSProductEntryButton)sender).productEntry);
         this.FormatSelectedItem((Button)sender);
         this.CreateArticlebuttons();
     }
     catch (Exception ex)
     {
         this.HandleException(ex);
     }
 }
Ejemplo n.º 5
0
 private void Catalogue_Button_Click(object sender, EventArgs e)
 {
     try
     {
         InterplayStorage.SetSelectedCatalog(((InterPlayPOSCatalogueButton)sender).Text);
         this.FormatSelectedItem((Button)sender);
         this.CreateProductButtons();
     }
     catch (Exception ex)
     {
         this.HandleException(ex);
     }
 }
Ejemplo n.º 6
0
        private void CreateArticlebuttons()
        {
            flowLayoutPanelArticle.Controls.Clear();

            foreach (SimpleArticle article in InterplayStorage.GetSimpleArticles())
            {
                InterplayPOSArticleButton button = new InterplayPOSArticleButton();
                button.Text          = article.name;
                button.simpleArticle = article;
                button.MouseDown    += Article_Mouse_Down;
                button.MouseUp      += Article_Mouse_Up;
                flowLayoutPanelArticle.Controls.Add(button);
            }
        }
Ejemplo n.º 7
0
 private void SetDefaultCatalogue(Catalogue catalog)
 {
     InterplayStorage.SetSelectedCatalog(catalog.name);
     this.CreateProductButtons();
 }