public void GetNoticeData(int type, string scene) { try { INotice service = IApollo.Instance.GetService(5) as INotice; ApolloNoticeInfo info = new ApolloNoticeInfo(); service.GetNoticeData((APOLLO_NOTICETYPE)type, scene, ref info); for (int i = 0; i < info.DataList.Count; i++) { ApolloNoticeData data = info.DataList[i]; } NoticeSys.NOTICE_STATE noticeState = NoticeSys.NOTICE_STATE.LOGIN_Before; if (scene == "1") { noticeState = NoticeSys.NOTICE_STATE.LOGIN_Before; } else if (scene == "2") { noticeState = NoticeSys.NOTICE_STATE.LOGIN_After; } MonoSingleton <NoticeSys> .GetInstance().OnOpenForm(info, noticeState); } catch (Exception exception) { object[] inParameters = new object[] { exception.Message }; DebugHelper.Assert(false, "Error In GetNoticeData, {0}", inParameters); } }
public void GetNoticeData(int type, string scene) { try { INotice notice = IApollo.Instance.GetService(5) as INotice; ApolloNoticeInfo apolloNoticeInfo = new ApolloNoticeInfo(); notice.GetNoticeData((APOLLO_NOTICETYPE)type, scene, ref apolloNoticeInfo); for (int i = 0; i < apolloNoticeInfo.DataList.get_Count(); i++) { ApolloNoticeData apolloNoticeData = apolloNoticeInfo.DataList.get_Item(i); } NoticeSys.NOTICE_STATE noticeState = NoticeSys.NOTICE_STATE.LOGIN_Before; if (scene == "1") { noticeState = NoticeSys.NOTICE_STATE.LOGIN_Before; } else if (scene == "2") { noticeState = NoticeSys.NOTICE_STATE.LOGIN_After; } MonoSingleton <NoticeSys> .GetInstance().OnOpenForm(apolloNoticeInfo, noticeState); } catch (Exception ex) { DebugHelper.Assert(false, "Error In GetNoticeData, {0}", new object[] { ex.get_Message() }); } }
public List <string> GetNoticeUrl(int type, string scene) { List <string> list = new List <string>(); INotice service = IApollo.Instance.GetService(5) as INotice; ApolloNoticeInfo info = new ApolloNoticeInfo(); service.GetNoticeData((APOLLO_NOTICETYPE)type, scene, ref info); for (int i = 0; i < info.DataList.Count; i++) { ApolloNoticeData data = info.DataList[i]; if (data.ContentType == APOLLO_NOTICE_CONTENTTYPE.APO_CONTENTTYPE_WEB) { list.Add(data.ContentUrl); } } return(list); }
public List <string> GetNoticeUrl(int type, string scene) { List <string> list = new List <string>(); if (Singleton <BattleLogic> .GetInstance().isRuning) { return(list); } INotice notice = IApollo.Instance.GetService(5) as INotice; ApolloNoticeInfo apolloNoticeInfo = new ApolloNoticeInfo(); notice.GetNoticeData((APOLLO_NOTICETYPE)type, scene, ref apolloNoticeInfo); for (int i = 0; i < apolloNoticeInfo.DataList.get_Count(); i++) { ApolloNoticeData apolloNoticeData = apolloNoticeInfo.DataList.get_Item(i); if (apolloNoticeData.ContentType == APOLLO_NOTICE_CONTENTTYPE.APO_CONTENTTYPE_WEB) { list.Add(apolloNoticeData.ContentUrl); } } return(list); }
public List <string> GetNoticeUrl(int type, string scene) { List <string> list = new List <string>(); if (Singleton <BattleLogic> .GetInstance().isRuning) { return(list); } INotice notice = IApollo.get_Instance().GetService(5) as INotice; ApolloNoticeInfo apolloNoticeInfo = new ApolloNoticeInfo(); notice.GetNoticeData(type, scene, ref apolloNoticeInfo); for (int i = 0; i < apolloNoticeInfo.get_DataList().get_Count(); i++) { ApolloNoticeData apolloNoticeData = apolloNoticeInfo.get_DataList().get_Item(i); if (apolloNoticeData.get_ContentType() == 2) { list.Add(apolloNoticeData.get_ContentUrl()); } } return(list); }