public void SetEventReflash(BUNNING_EVENT_REFLASH_INFO a_cValue)
 {
     if (this.m_sdCollection.ContainsKey(a_cValue.m_eEventType))
     {
         this.m_sdCollection[a_cValue.m_eEventType] = a_cValue;
     }
     else
     {
         this.m_sdCollection.Add(a_cValue.m_eEventType, a_cValue);
     }
 }
示例#2
0
    public void SetSelectInfoItem(int nEventType, bool bCurrentEvent)
    {
        string text = string.Empty;

        if (bCurrentEvent)
        {
            EVENT_INFO eventInfoFromType = NrTSingleton <NrTable_BurnningEvent_Manager> .Instance.GetEventInfoFromType(nEventType);

            if (eventInfoFromType == null)
            {
                return;
            }
            BUNNING_EVENT_INFO value = NrTSingleton <NrTable_BurnningEvent_Manager> .Instance.GetValue((eBUNNING_EVENT)nEventType);

            if (value == null)
            {
                return;
            }
            int num = eventInfoFromType.m_nStartTime + eventInfoFromType.m_nEndDurationTime / 60;
            if (num >= 0 && num > 24)
            {
                num -= 24;
            }
            string text2 = this.EventWeek((int)eventInfoFromType.m_nEventInfoWeek);
            if (nEventType == 15)
            {
                text = NrTSingleton <NrTextMgr> .Instance.GetTextFromInterface("2550");
            }
            else if (nEventType == 16)
            {
                text = NrTSingleton <NrTextMgr> .Instance.GetTextFromInterface("2560");
            }
            else if (nEventType == 17)
            {
                text = NrTSingleton <NrTextMgr> .Instance.GetTextFromInterface("2561");
            }
            else if (value.m_nYear > 0)
            {
                NrTSingleton <CTextParser> .Instance.ReplaceParam(ref text, new object[]
                {
                    NrTSingleton <NrTextMgr> .Instance.GetTextFromInterface("2307"),
                    "month",
                    value.m_nMonth.ToString(),
                    "day",
                    value.m_nDay.ToString(),
                    "starttime",
                    eventInfoFromType.m_nStartTime.ToString(),
                    "endmonth",
                    value.m_nEndMonth.ToString(),
                    "endday",
                    value.m_nEndDay.ToString(),
                    "endtime",
                    num.ToString()
                });
            }
            else if (eventInfoFromType.m_nEventType == 4)
            {
                text2 = this.EventWeek(-1);
                NrTSingleton <CTextParser> .Instance.ReplaceParam(ref text, new object[]
                {
                    NrTSingleton <NrTextMgr> .Instance.GetTextFromInterface("1794"),
                    "day",
                    text2,
                    "starttime",
                    eventInfoFromType.m_nStartTime.ToString(),
                    "endtime",
                    num.ToString()
                });
            }
            else if (eventInfoFromType.m_nEventType == 19 || eventInfoFromType.m_nEventType == 20 || eventInfoFromType.m_nEventType == 21 || eventInfoFromType.m_nEventType == 22 || eventInfoFromType.m_nEventType == 23 || eventInfoFromType.m_nEventType == 24)
            {
                string textFromInterface = NrTSingleton <NrTextMgr> .Instance.GetTextFromInterface("2543");

                NrTSingleton <CTextParser> .Instance.ReplaceParam(ref text, new object[]
                {
                    NrTSingleton <NrTextMgr> .Instance.GetTextFromInterface("1794"),
                    "day",
                    textFromInterface,
                    "starttime",
                    eventInfoFromType.m_nStartTime.ToString(),
                    "endtime",
                    num.ToString()
                });
            }
            else
            {
                NrTSingleton <CTextParser> .Instance.ReplaceParam(ref text, new object[]
                {
                    NrTSingleton <NrTextMgr> .Instance.GetTextFromInterface("1794"),
                    "day",
                    text2,
                    "starttime",
                    eventInfoFromType.m_nStartTime.ToString(),
                    "endtime",
                    num.ToString()
                });
            }
            this.m_lbTitle.SetText(NrTSingleton <NrTextMgr> .Instance.GetTextFromInterface(eventInfoFromType.m_nTitleText.ToString()));
            this.m_lbEventDetail.SetText(NrTSingleton <NrTextMgr> .Instance.GetTextFromInterface(eventInfoFromType.m_nExplain.ToString()));
        }
        else
        {
            BUNNING_EVENT_REFLASH_INFO bUNNING_EVENT_REFLASH_INFO = NrTSingleton <NrTable_BurnningEvent_Manager> .Instance.Get_Value((eBUNNING_EVENT)nEventType);

            if (bUNNING_EVENT_REFLASH_INFO == null)
            {
                return;
            }
            BUNNING_EVENT_INFO value = NrTSingleton <NrTable_BurnningEvent_Manager> .Instance.GetValue((eBUNNING_EVENT)nEventType);

            if (value == null)
            {
                return;
            }
            int num2 = bUNNING_EVENT_REFLASH_INFO.m_nStartTime + bUNNING_EVENT_REFLASH_INFO.m_nEndTime / 60;
            if (num2 >= 0 && num2 > 24)
            {
                num2 -= 24;
            }
            string text3 = this.EventWeek((int)value.m_nWeek);
            if (nEventType == 15)
            {
                text = NrTSingleton <NrTextMgr> .Instance.GetTextFromInterface("2550");
            }
            else if (nEventType == 16)
            {
                text = NrTSingleton <NrTextMgr> .Instance.GetTextFromInterface("2560");
            }
            else if (nEventType == 17)
            {
                text = NrTSingleton <NrTextMgr> .Instance.GetTextFromInterface("2561");
            }
            else if (value.m_nYear > 0)
            {
                NrTSingleton <CTextParser> .Instance.ReplaceParam(ref text3, new object[]
                {
                    NrTSingleton <NrTextMgr> .Instance.GetTextFromInterface("2307"),
                    "month",
                    value.m_nMonth.ToString(),
                    "day",
                    value.m_nDay.ToString(),
                    "starttime",
                    bUNNING_EVENT_REFLASH_INFO.m_nStartTime.ToString(),
                    "endmonth",
                    value.m_nEndMonth.ToString(),
                    "endday",
                    value.m_nEndDay.ToString(),
                    "endtime",
                    num2.ToString()
                });

                NrTSingleton <CTextParser> .Instance.ReplaceParam(ref text, new object[]
                {
                    NrTSingleton <NrTextMgr> .Instance.GetTextFromInterface("1794"),
                    "day",
                    text3,
                    "starttime",
                    bUNNING_EVENT_REFLASH_INFO.m_nStartTime.ToString(),
                    "endtime",
                    num2.ToString()
                });
            }
            else if (bUNNING_EVENT_REFLASH_INFO.m_eEventType == eBUNNING_EVENT.eBUNNING_EVENT_BUFFDAMAGE)
            {
                text3 = this.EventWeek(-1);
                NrTSingleton <CTextParser> .Instance.ReplaceParam(ref text, new object[]
                {
                    NrTSingleton <NrTextMgr> .Instance.GetTextFromInterface("1794"),
                    "day",
                    text3,
                    "starttime",
                    bUNNING_EVENT_REFLASH_INFO.m_nStartTime.ToString(),
                    "endtime",
                    num2.ToString()
                });
            }
            else if (bUNNING_EVENT_REFLASH_INFO.m_eEventType == eBUNNING_EVENT.eBUNNING_EVENT_GMBUFF1 || bUNNING_EVENT_REFLASH_INFO.m_eEventType == eBUNNING_EVENT.eBUNNING_EVENT_GMBUFF2 || bUNNING_EVENT_REFLASH_INFO.m_eEventType == eBUNNING_EVENT.eBUNNING_EVENT_GMBUFF3 || bUNNING_EVENT_REFLASH_INFO.m_eEventType == eBUNNING_EVENT.eBUNNING_EVENT_GMBUFF4 || bUNNING_EVENT_REFLASH_INFO.m_eEventType == eBUNNING_EVENT.eBUNNING_EVENT_GMBUFF5 || bUNNING_EVENT_REFLASH_INFO.m_eEventType == eBUNNING_EVENT.eBUNNING_EVENT_GMBUFF6)
            {
                string textFromInterface2 = NrTSingleton <NrTextMgr> .Instance.GetTextFromInterface("2543");

                NrTSingleton <CTextParser> .Instance.ReplaceParam(ref text, new object[]
                {
                    NrTSingleton <NrTextMgr> .Instance.GetTextFromInterface("1794"),
                    "day",
                    textFromInterface2,
                    "starttime",
                    bUNNING_EVENT_REFLASH_INFO.m_nStartTime.ToString(),
                    "endtime",
                    num2.ToString()
                });
            }
            else
            {
                NrTSingleton <CTextParser> .Instance.ReplaceParam(ref text, new object[]
                {
                    NrTSingleton <NrTextMgr> .Instance.GetTextFromInterface("1794"),
                    "day",
                    text3,
                    "starttime",
                    bUNNING_EVENT_REFLASH_INFO.m_nStartTime.ToString(),
                    "endtime",
                    num2.ToString()
                });
            }
            this.m_lbTitle.SetText(NrTSingleton <NrTextMgr> .Instance.GetTextFromInterface(bUNNING_EVENT_REFLASH_INFO.m_nTitleText.ToString()));
            this.m_lbEventDetail.SetText(NrTSingleton <NrTextMgr> .Instance.GetTextFromInterface(bUNNING_EVENT_REFLASH_INFO.m_nExplain.ToString()));
        }
        this.m_lbTime.SetText(text);
    }