Ejemplo n.º 1
0
        // Protest on Dr.Smell
        private List <OrderProductTabPageItem> CreateProductTabPageItems()
        {
            var productTabPageItems = new List <OrderProductTabPageItem>();

            for (int i = 0; i < AppDefinition.TAB_PAGE_MAX_PRODUCTS_COUNT; i++)
            {
                OrderProductTabPageItem item = new OrderProductTabPageItem(this, new Button());
                productTabPageItems.Add(item);
            }
            return(productTabPageItems);
        }
Ejemplo n.º 2
0
        // Protest on Dr.Smell
        private void PopulateProductTabPageItems(TableLayoutPanel tabPageLayout, int tabPageIndex)
        {
            int productTabPageItemsCount = 0;

            for (int row = 0; row < AppDefinition.TAB_PAGE_LAYOUT_ROW_COUNT; row++)
            {
                for (int column = 0; column < AppDefinition.TAB_PAGE_LAYOUT_COLUMN_COUNT; column++)
                {
                    OrderProductTabPageItem item = _productTabPageItemsContainers[tabPageIndex][productTabPageItemsCount];
                    tabPageLayout.Controls.Add(item.Button, column, row);
                    item.Button.Dock = DockStyle.Fill; // Make button fill in table cell
                    productTabPageItemsCount++;
                }
            }
        }