public void OnBtnClickResearch(IUIObject obj)
    {
        string message = string.Empty;
        EXPEDITION_CREATE_DATA expeditionCreateDataFromID = BASE_EXPEDITION_CREATE_DATA.GetExpeditionCreateDataFromID(this.m_expeditionSearch_info.ui8ExpeditionGrade, (int)this.m_expeditionSearch_info.i16xpeditionCreateDataID);

        if (expeditionCreateDataFromID == null)
        {
            return;
        }
        EXPEDITION_DATA expeditionDataFromGrade = BASE_EXPEDITION_DATA.GetExpeditionDataFromGrade(expeditionCreateDataFromID.GetGrade());

        if (expeditionDataFromGrade == null)
        {
            return;
        }
        NrMyCharInfo kMyCharInfo = NrTSingleton <NkCharManager> .Instance.m_kMyCharInfo;

        if (expeditionDataFromGrade.Expedition_SEARCH_MONEY > kMyCharInfo.m_Money)
        {
            message = NrTSingleton <NrTextMgr> .Instance.GetTextFromNotify("89");

            Main_UI_SystemMessage.ADDMessage(message, SYSTEM_MESSAGE_TYPE.NAGATIVE_MESSAGE);
            return;
        }
        long num = 0L;
        EXPEDITION_CONSTANT_MANAGER instance = EXPEDITION_CONSTANT_MANAGER.GetInstance();

        if (instance != null)
        {
            num = (long)instance.GetValue(eEXPEDITION_CONSTANT.eEXPEDITION_DAY_COUNT);
        }
        if (num > 0L && kMyCharInfo.GetCharDetail(10) >= num)
        {
            message = NrTSingleton <NrTextMgr> .Instance.GetTextFromNotify("405");

            Main_UI_SystemMessage.ADDMessage(message, SYSTEM_MESSAGE_TYPE.NAGATIVE_MESSAGE);
            return;
        }
        if (!this.IsStartBattle())
        {
            message = NrTSingleton <NrTextMgr> .Instance.GetTextFromNotify("528");

            Main_UI_SystemMessage.ADDMessage(message, SYSTEM_MESSAGE_TYPE.NAGATIVE_MESSAGE);
            return;
        }
        GS_EXPEDITION_SERACH_REQ gS_EXPEDITION_SERACH_REQ = new GS_EXPEDITION_SERACH_REQ();

        gS_EXPEDITION_SERACH_REQ.i8Grade = expeditionCreateDataFromID.GetGrade();
        SendPacket.GetInstance().SendObject(eGAME_PACKET_ID.GS_EXPEDITION_SERACH_REQ, gS_EXPEDITION_SERACH_REQ);
    }
    public void Expedition_ModeCheck(eExpeditionSearchDetailInfo_Mode eMode)
    {
        string str  = string.Empty;
        string text = string.Empty;

        if (eMode == eExpeditionSearchDetailInfo_Mode.eEXPEDITION_DETAILDLG_SEARCH)
        {
            this.SetEcoMoninfo(eMode);
        }
        else
        {
            EXPEDITION_CREATE_DATA expedtionCreateData = BASE_EXPEDITION_CREATE_DATA.GetExpedtionCreateData(this.m_expeditiondetailinfo.i16ExpeditionCreateDataID);
            if (expedtionCreateData == null)
            {
                return;
            }
            EXPEDITION_DATA expeditionDataFromGrade = BASE_EXPEDITION_DATA.GetExpeditionDataFromGrade(expedtionCreateData.GetGrade());
            if (expeditionDataFromGrade == null)
            {
                return;
            }
            if (this.m_expeditiondetailinfo.ui8ExpeditionState == 2 || this.m_expeditiondetailinfo.ui8ExpeditionState == 1 || this.m_expeditiondetailinfo.ui8ExpeditionState == 4)
            {
                if (this.m_bHaveMilitary)
                {
                    this.SetOccupySolInfo(eMode);
                    text = NrTSingleton <NrTextMgr> .Instance.GetTextFromInterface("2734");

                    this.m_lTitle.SetText(text);
                    str = expeditionDataFromGrade.Expedition_BG1_NAME;
                }
                else
                {
                    this.SetEcoMoninfo(eMode);
                    text = NrTSingleton <NrTextMgr> .Instance.GetTextFromInterface("2735");

                    this.m_lTitle.SetText(text);
                    str = expeditionDataFromGrade.Expedition_BG_NAME;
                }
                this.m_laOccExpeditionNum.SetText(this.m_expeditiondetailinfo.i32ExpeditionMonPlunderItemNum.ToString());
            }
            else if (this.m_expeditiondetailinfo.ui8ExpeditionState == 3)
            {
                if (this.m_bHaveMilitary)
                {
                    this.SetOccupySolInfo(eMode);
                    text = NrTSingleton <NrTextMgr> .Instance.GetTextFromInterface("2734");

                    this.m_lTitle.SetText(text);
                    str = expeditionDataFromGrade.Expedition_BG_NAME;
                }
                else
                {
                    this.SetEcoMoninfo(eMode);
                    text = NrTSingleton <NrTextMgr> .Instance.GetTextFromInterface("2735");

                    this.m_lTitle.SetText(text);
                    str = expeditionDataFromGrade.Expedition_BG1_NAME;
                }
                this.m_laOccExpeditionNum.SetText(this.m_expeditiondetailinfo.i32ExpeditionRewardItemNum.ToString());
            }
        }
        this.m_dtBG.SetTextureFromBundle("UI/Mine/" + str);
    }
    public bool IsStartBattle()
    {
        int num = 0;
        EXPEDITION_CREATE_DATA expeditionCreateDataFromID = BASE_EXPEDITION_CREATE_DATA.GetExpeditionCreateDataFromID(this.m_expeditionSearch_info.ui8ExpeditionGrade, (int)this.m_expeditionSearch_info.i16xpeditionCreateDataID);

        if (expeditionCreateDataFromID == null)
        {
            return(false);
        }
        EXPEDITION_DATA expeditionDataFromGrade = BASE_EXPEDITION_DATA.GetExpeditionDataFromGrade(expeditionCreateDataFromID.GetGrade());

        if (expeditionDataFromGrade == null)
        {
            return(false);
        }
        NkReadySolList readySolList = NrTSingleton <NkCharManager> .Instance.m_kMyCharInfo.GetReadySolList();

        if (readySolList == null)
        {
            return(false);
        }
        foreach (NkSoldierInfo current in readySolList.GetList().Values)
        {
            if (current.GetSolID() > 0L)
            {
                if (current.GetSolPosType() != 6)
                {
                    if (current.GetSolPosType() != 2)
                    {
                        int expeditionMoneyFromSolPossibleLevel = BASE_EXPEDITION_DATA.GetExpeditionMoneyFromSolPossibleLevel(expeditionDataFromGrade.GetGrade());
                        if ((int)current.GetLevel() >= expeditionMoneyFromSolPossibleLevel)
                        {
                            num++;
                        }
                    }
                }
            }
        }
        return(num > 0);
    }
    public void ShowExpeditionInfo(eExpeditionSearchDetailInfo_Mode eMode)
    {
        string text  = string.Empty;
        string text2 = string.Empty;
        string str   = string.Empty;

        if (eMode == eExpeditionSearchDetailInfo_Mode.eEXPEDITION_DETAILDLG_SEARCH)
        {
            EXPEDITION_CREATE_DATA expeditionCreateDataFromID = BASE_EXPEDITION_CREATE_DATA.GetExpeditionCreateDataFromID(this.m_expeditionSearch_info.ui8ExpeditionGrade, (int)this.m_expeditionSearch_info.i16xpeditionCreateDataID);
            if (expeditionCreateDataFromID == null)
            {
                return;
            }
            EXPEDITION_DATA expeditionDataFromGrade = BASE_EXPEDITION_DATA.GetExpeditionDataFromGrade(expeditionCreateDataFromID.GetGrade());
            if (expeditionDataFromGrade == null)
            {
                return;
            }
            if (eMode == eExpeditionSearchDetailInfo_Mode.eEXPEDITION_DETAILDLG_SEARCH)
            {
                DirectionDLG directionDLG = NrTSingleton <FormsManager> .Instance.LoadForm(G_ID.DLG_DIRECTION) as DirectionDLG;

                if (directionDLG != null)
                {
                    directionDLG.ShowDirection(DirectionDLG.eDIRECTIONTYPE.eDIRECTION_MINESEARCH, (int)expeditionCreateDataFromID.GetGrade());
                }
            }
            this.Expedition_ModeCheck(eMode);
            string text3 = string.Empty;
            str   = expeditionDataFromGrade.Expedition_BG_NAME;
            text3 = NrTSingleton <NrTextMgr> .Instance.GetTextFromInterface("1322");

            this.m_lTitle.SetText(text3);
            this.m_dtBG.SetTextureFromBundle("UI/Mine/" + str);
            this.m_dtMineIcon2.SetTexture(expeditionDataFromGrade.Expedition_UI_ICON);
            this.m_laExpeditionCurNum.SetText(this.m_expeditionSearch_info.i32ExpeditionNum.ToString());
            this.m_laOccExpeditionNum.SetText(this.m_expeditionSearch_info.i32MonPlunderItemNum.ToString());
            if (100 <= NrTSingleton <NkCharManager> .Instance.m_kCharAccountInfo.m_nMasterLevel)
            {
                text2 = text2 + " " + this.m_expeditionSearch_info.i16xpeditionCreateDataID.ToString();
            }
            text = NrTSingleton <NrTextMgr> .Instance.GetTextFromInterface("1775");

            NrTSingleton <CTextParser> .Instance.ReplaceParam(ref text2, new object[]
            {
                text,
                "gold",
                expeditionDataFromGrade.Expedition_SEARCH_MONEY
            });

            this.m_laSearchMoney.SetText(text2);
        }
        else
        {
            EXPEDITION_CREATE_DATA expedtionCreateData = BASE_EXPEDITION_CREATE_DATA.GetExpedtionCreateData(this.m_expeditiondetailinfo.i16ExpeditionCreateDataID);
            if (expedtionCreateData == null)
            {
                return;
            }
            EXPEDITION_DATA expeditionDataFromGrade2 = BASE_EXPEDITION_DATA.GetExpeditionDataFromGrade(expedtionCreateData.GetGrade());
            if (expeditionDataFromGrade2 == null)
            {
                return;
            }
            this.m_dtMineIcon2.SetTexture(expeditionDataFromGrade2.Expedition_UI_ICON);
            this.m_laExpeditionCurNum.SetText(this.m_expeditiondetailinfo.i32ExpeditionTotalItemNum.ToString());
            this.Expedition_ModeCheck(eMode);
        }
        this.Show();
    }