Exemplo n.º 1
0
    /// -1 = 刷新后的最后一页
    /// Action=ForEach
    public void RefreshTable <T>(int page, Action <T> Action)
    {
        NoHaveResuleLabel.SetActive(false);

        m_table.ClreanTable(true);

        m_table.SetTittleRow(m_TittleNames);

        m_PageCount = ListForPage.GetPageCount(m_AllList, PageRowCount);

        if (m_PageCount == 0)
        {
            NoHaveResuleLabel.SetActive(true);
            m_PageDropdown.options.Clear();
            return;
        }

        m_locList = ListForPage.GetPage(m_AllList, page, PageRowCount);

        List <T> list = new List <T>();

        foreach (var item in m_locList)
        {
            list.Add((T)item);
        }

        list.ForEach(Action);

        RefreshPageButton(page);
    }
Exemplo n.º 2
0
 public void RegistCallBack(RegistUser registG)       //创建读者后无法自动刷新表格 -BUG
 {
     registG.gameObject.SetActive(false);
     if (!gameObject.activeSelf)
     {
         return;
     }
     m_AllList = new ArrayList(UserManager.GetUsers("读者"));
     RefreshTable(ListForPage.GetPageCount(UserManager.GetUsers("读者"), PageRowCount), fore);
 }