コード例 #1
0
    public void ChangeTab(int tabIndex) // Button callback - params 0,1,2
    {
        window.CloseAllDropdowns();
        vendorSelectionPanel.ClosePanel();
        switch (tabIndex)
        {
        case 0:
            PopulateMyVendorListDropdowns();
            vendorPanel.gameObject.SetActive(true);
            orderPanel.gameObject.SetActive(false);
            newVendorPanel.gameObject.SetActive(false);
            CreateVendorList(string.Empty);
            break;

        case 1:
            PopulateOrdersListDropdowns();
            vendorPanel.gameObject.SetActive(false);
            orderPanel.gameObject.SetActive(true);
            newVendorPanel.gameObject.SetActive(false);
            CreateOrderList(string.Empty);
            orderDisplayPanel.DisplayPresetsList();
            break;

        case 2:
            PopulateNewVendorListDropdowns();
            vendorPanel.gameObject.SetActive(false);
            orderPanel.gameObject.SetActive(false);
            newVendorPanel.gameObject.SetActive(true);
            CreateNewVendorList(string.Empty);
            break;
        }
        UpdateButtonImage(tabIndex);
        currentTabIndex = tabIndex;
    }
コード例 #2
0
    /*public void PopulateDropdowns()
     * {
     *  if (panel.sortByDropdown != null)
     *  {
     *      List<ListMode> modeList = new List<ListMode>();
     *      ListMode.ListModeType modeType = ListMode.ListModeType.SortBy;
     *      modeList.Add(new ListMode("Name ABC", modeType));
     *      modeList.Add(new ListMode("Product ABC", modeType));
     *      modeList.Add(new ListMode("Signing Cost", modeType));
     *      modeList.Add(new ListMode("Delivery Cost", modeType));
     *      panel.sortByDropdown.PopulateDropdownList(modeList);
     *  }
     *  if (panel.viewDropdown != null)
     *  {
     *      List<ListMode> modeList = new List<ListMode>();
     *      ListMode.ListModeType modeType = ListMode.ListModeType.Filter;
     *      modeList.Add(new ListMode("All", modeType));
     *      modeList.Add(new ListMode("Bud", modeType));
     *      modeList.Add(new ListMode("Bowls", modeType));
     *      modeList.Add(new ListMode("Bongs", modeType));
     *      modeList.Add(new ListMode("Edibles", modeType));
     *      modeList.Add(new ListMode("General", modeType));
     *      modeList.Add(new ListMode("Glass Bongs", modeType));
     *      modeList.Add(new ListMode("Glass Pipes", modeType));
     *      modeList.Add(new ListMode("Pipes", modeType));
     *      modeList.Add(new ListMode("Plastic Bongs", modeType));
     *      modeList.Add(new ListMode("Plastic Pipes", modeType));
     *      modeList.Add(new ListMode("Rolling Paper", modeType));
     *      modeList.Add(new ListMode("Seeds", modeType));
     *      panel.viewDropdown.PopulateDropdownList(modeList);
     *  }
     *  if (panel.locationDropdown != null)
     *  {
     *
     *  }
     * }*/

    public void ChangeTab(int tabIndex) // Button callback - params 0,1,2
    {
        //panel.CloseAllDropdowns();
        vendorSelectionPanel.ClosePanel();
        switch (tabIndex)
        {
        case 0:
            vendorPanel.gameObject.SetActive(true);
            orderPanel.gameObject.SetActive(false);
            newVendorPanel.gameObject.SetActive(false);
            CreateVendorList();
            break;

        case 1:
            vendorPanel.gameObject.SetActive(false);
            orderPanel.gameObject.SetActive(true);
            newVendorPanel.gameObject.SetActive(false);
            CreateOrderList();
            break;

        case 2:
            vendorPanel.gameObject.SetActive(false);
            orderPanel.gameObject.SetActive(false);
            newVendorPanel.gameObject.SetActive(true);
            //CreateNewVendorList();
            break;
        }
        UpdateButtonImage(tabIndex);
    }