public void initActiveNotice(Notice notice) { this.activeNotice = notice as LadderHegemoneyActiveNotice; buttonChallenge.ladderNotice = this.activeNotice; if (this.activeNotice == null) { ladderdescLabel.text = LanguageConfigManager.Instance.getLanguage("ladderruleprize5"); return; } if (activeNotice.isTimeLimit()) { int[] time = activeNotice.getShowTimeLimit(); if (time == null) { ladderdescLabel.gameObject.SetActive(true); ladderdescLabel.text = LanguageConfigManager.Instance.getLanguage("s0140"); return; } ladderdescLabel.gameObject.SetActive(true); ladderdescLabel.text = LanguageConfigManager.Instance.getLanguage("ladderruleprize4", TimeKit.dateToFormat(time [0], LanguageConfigManager.Instance.getLanguage("notice04")), TimeKit.dateToFormat(time [1] - 1, LanguageConfigManager.Instance.getLanguage("notice04"))); } else { ladderdescLabel.text = LanguageConfigManager.Instance.getLanguage("notice03"); } }
public override void DoClickEvent() { base.DoClickEvent(); isEnable = UserManager.Instance.self.getUserLevel() >= ladderInfo.RequestMinLevel; if (!isEnable) { MessageWindow.ShowAlert(LanguageConfigManager.Instance.getLanguage("notice_dailyRebate_01", ladderInfo.RequestMinLevel.ToString())); return; } //Notice notice = NoticeManagerment.Instance.getNoticeListByType (NoticeType.LADDER_ACTION_TIME,NoticeEntranceType.LIMIT_NOTICE) ; List <Notice> notices = NoticeManagerment.Instance.getNoticesByType(NoticeType.LADDER_ACTION_TIME, NoticeEntranceType.LIMIT_NOTICE); int flag = 0; int flag1 = 0; if (notices != null) { for (int i = 0; i < notices.Count; i++) { ladderNotice = notices[i] as LadderHegemoneyActiveNotice; if (ladderNotice != null && ladderNotice.isInTimeLimit()) { flag = 1; } if (ladderNotice != null && ladderNotice.isValid()) { flag1 = 1; } } if (flag == 0) { MessageWindow.ShowAlert(LanguageConfigManager.Instance.getLanguage("ladderruleprize5")); return; } if (flag1 == 1) { UiManager.Instance.switchWindow <LaddersWindow>((win) => { win.init(); win.lastPrestigeLevel = LaddersManagement.Instance.M_getCurrentPlayerTitle().index; if (LaddersManagement.Instance.Award.canReceive) { UiManager.Instance.openDialogWindow <LaddersRankRewardWindow>((win1) => { win1.closeCallback = win.showPrestigeLevel; }); } }); } else { MessageWindow.ShowAlert(LanguageConfigManager.Instance.getLanguage("s0171")); } } else { MessageWindow.ShowAlert(LanguageConfigManager.Instance.getLanguage("s0171")); } //if (ladderNotice != null && !ladderNotice.isInTimeLimit ()) { // MessageWindow.ShowAlert(LanguageConfigManager.Instance.getLanguage("ladderruleprize5")); // return; //} //if (ladderNotice != null && ladderNotice.isValid()) { // UiManager.Instance.switchWindow<LaddersWindow> ((win) => { // win.init (); // win.lastPrestigeLevel = LaddersManagement.Instance.M_getCurrentPlayerTitle ().index; // if (LaddersManagement.Instance.Award.canReceive) { // UiManager.Instance.openDialogWindow<LaddersRankRewardWindow> ((win1) => { // win1.closeCallback = win.showPrestigeLevel; // }); // } // }); //} else { // MessageWindow.ShowAlert(LanguageConfigManager.Instance.getLanguage("s0171")); //} }