public override void OnShow(object param) { base.OnShow(param); m_allChapterInfoList = GlobalInfo.MY_PLAYER_INFO.PlayerChapterSystem.PlayerChapterSet; this.m_buttonRoot.m_chooseAction = ChooseItem; m_gridView.AddDragCallBack(OnDrag); m_gridView.AddDragStartCallBack(OnDragStart); m_gridView.AddDragEndCallBack(OnDragEnd); if (param != null) { if (param is ChapterInfo) { displayChapterIndex = (int)((ChapterInfo)param).ChapterID - 1; } else { displayChapterIndex = Convert.ToInt32(param) - 1; } } else { displayChapterIndex = this.m_allChapterInfoList.FindIndex(chapterInfo => chapterInfo.ChapterStatus == ChapterStatus.UNLOCK); if (displayChapterIndex == -1) { displayChapterIndex = this.m_allChapterInfoList.FindIndex(chapterInfo => chapterInfo.ChapterStatus == ChapterStatus.DONE); } } lastDisplayChapterIndex = displayChapterIndex; RefreshChapterList(); }