Exemplo n.º 1
0
 /// <summary>
 /// 左侧选中
 /// </summary>
 /// <param name="mailIndex"></param>
 private void SetSelect(uint mailIndex)
 {
     if (null != m_ctor_MailScroll)
     {
         UIMailGrid grid = m_ctor_MailScroll.GetGrid <UIMailGrid>((int)selectedMailIndex);
         if (null != grid)
         {
             grid.SetSelect(false);
         }
         grid = m_ctor_MailScroll.GetGrid <UIMailGrid>((int)mailIndex);
         if (null != grid)
         {
             grid.SetSelect(true);
         }
     }
     this.selectedMailIndex = mailIndex;
     if (selectedMailIndex < mailList.Count)
     {
         if (mailList[(int)selectedMailIndex].state == 0)
         {
             DataManager.Manager <MailManager>().ReadMail(mailList[(int)selectedMailIndex].mailid);
         }
     }
 }
Exemplo n.º 2
0
 private void OnUpdateMailGridData(UIGridBase grid, int index)
 {
     if (grid is UIMailGrid)
     {
         UIMailGrid mailGrid = grid as UIMailGrid;
         if (index < mailList.Count)
         {
             ListMailInfo mail = mailList[index];
             mailGrid.SetGridData(mailList[index]);
             mailGrid.SetMailIndex((uint)index);
             mailGrid.SetSelect(index == selectedMailIndex);
             mailGrid.SetState(mail);
             mailGrid.name = mail.mailid.ToString();
         }
     }
 }