Beispiel #1
0
        /// <summary>
        /// Returns the added Picturebox
        /// </summary>
        /// <param name="prod"></param>
        /// <param name="lane"></param>
        /// <returns></returns>
        private PictureBox AddToLane(Product prod, FlowLayoutPanel lane)
        {
            Image im = productIcons[prod];

            im = ExtraGraphics.AddTextOverlay(im, prod);
            PictureBox pb = ExtraGraphics.GeneratePictureBox(im);

            lane.Controls.Add(pb);
            return(pb);
        }
Beispiel #2
0
        ///Pasting barcode deemed not useful in current version

        /*private void PasteItem()
         * {
         *  long barcode=-1;
         *  long.TryParse(Clipboard.GetText(TextDataFormat.Text),out barcode);
         *  if (barcode > 0)
         *  {
         *      AddItem(barcode);
         *  }
         * }*/


        /// <summary>
        /// Adds the image to the visual list
        /// </summary>
        private PictureBox AddPictureBox(Image image)
        {
            if (labelHelp.Visible)
            {
                labelHelp.Visible = false;
                labelHelp.Enabled = false;
            }

            var pictureBox = ExtraGraphics.GeneratePictureBox(image);

            pictureBox.Name   = "pictureBox" + pictureBoxes.Count;
            pictureBox.Click += new System.EventHandler(this.PictureBox_Click);
            pictureBoxes.Add(pictureBox);

            this.flowLayoutPanelMain.ResumeLayout(false);

            return(pictureBox);
        }