Example #1
0
 private void OnUIGridEventDlg(UIEventType eventType, object data, object param)
 {
     if (null == data)
     {
         return;
     }
     switch (eventType)
     {
     case UIEventType.Click:
     {
         if (data is ChangeLineGrid)
         {
             ChangeLineGrid item = data as ChangeLineGrid;
             if (item != null)
             {
                 Client.IPlayer mainPlayer = MainPlayerHelper.GetMainPlayer();
                 if (mainPlayer != null)
                 {
                     mainPlayer.SendMessage(Client.EntityMessage.EntityCommand_StopMove, mainPlayer.GetPos());
                 }
                 stSwitchLineMapScreenUserCmd_C cmd = new stSwitchLineMapScreenUserCmd_C();
                 cmd.line = item.LineNum;
                 NetService.Instance.Send(cmd);
             }
             if (m_ctor_LineScrollView != null)
             {
                 m_ctor_LineScrollView.SetSelect(item);
             }
         }
     }
     break;
     }
 }
Example #2
0
 void OnUpdateUIGrid(UIGridBase grid, int index)
 {
     if (grid is ChangeLineGrid)
     {
         ChangeLineGrid item = grid as ChangeLineGrid;
         if (item != null)
         {
             item.gameObject.SetActive(true);
             if (m_lst_LineInfos != null)
             {
                 item.ShowInfo(m_lst_LineInfos[index]);
             }
         }
     }
 }