Inheritance: System.Windows.Forms.Button
        /// <summary>
        /// Constructor
        /// </summary>
        /// <param name="model"></param>
        public ImagesSelector(NameSpace model)
        {
            InitializeComponent();

            Model = model;

            Point location = new Point(0,0);
            for (int imageIndex = 1; imageIndex<=NameSpaceImages.Instance.Images.Images.Count; imageIndex++)
            {
                Button button= new SelectionButton(model, imageIndex);
                button.Location = location;
                panel.Controls.Add(button);
                if (imageIndex % 6 == 0)
                {
                    location = new Point(0, location.Y + 32);
                }
                else
                {
                    location = new Point(location.X + 32, location.Y);
                }
            }
        }
Esempio n. 2
0
        /// <summary>
        /// Constructor
        /// </summary>
        /// <param name="model"></param>
        public ImagesSelector(NameSpace model)
        {
            InitializeComponent();

            Model = model;

            Point location = new Point(0, 0);

            for (int imageIndex = 1; imageIndex <= NameSpaceImages.Instance.Images.Images.Count; imageIndex++)
            {
                Button button = new SelectionButton(model, imageIndex);
                button.Location = location;
                panel.Controls.Add(button);
                if (imageIndex % 6 == 0)
                {
                    location = new Point(0, location.Y + 32);
                }
                else
                {
                    location = new Point(location.X + 32, location.Y);
                }
            }
        }