Example #1
0
    public void SetData(DropDownList dw)
    {
        if (null == dw)
        {
            return;
        }
        if (dw.GetParentCheck() && NrTSingleton <FormsManager> .Instance.IsForm(dw.ParentGID))
        {
            MsgBoxAutoSellUI msgBoxAutoSellUI = NrTSingleton <FormsManager> .Instance.GetForm(dw.ParentGID) as MsgBoxAutoSellUI;

            if (msgBoxAutoSellUI != null)
            {
                base.SetLocation(base.GetLocation().x, base.GetLocationY() + 80f, msgBoxAutoSellUI.GetLocation().z - 2f);
            }
        }
        this.m_kParentDropDownList = dw;
        this.m_kListBox.Clear();
        for (int i = 0; i < dw.Count; i++)
        {
            IUIListObject item = dw.GetItem(i);
            if (item != null)
            {
                ListItem listItem = (ListItem)item.Data;
                if (listItem != null)
                {
                    ListItem listItem2 = new ListItem();
                    listItem2.SetColumnStr(0, listItem.GetColumnStr(0));
                    listItem2.Key = listItem2;
                    this.m_kListBox.Add(listItem2);
                }
            }
        }
        this.m_kListBox.RepositionItems();
    }
    public void OnClickStartBattle(IUIObject obj)
    {
        if (NrTSingleton <NewExplorationManager> .Instance.GetPlayState() == eNEWEXPLORATION_PLAYSTATE.eNEWEXPLORATION_PLAYSTATE_END)
        {
            Main_UI_SystemMessage.ADDMessage(NrTSingleton <NrTextMgr> .Instance.GetTextFromNotify("881"), SYSTEM_MESSAGE_TYPE.NAGATIVE_MESSAGE);
            return;
        }
        if (this.m_cbBox2.IsChecked() && !NewExploration_AutoBattleDlg.CheckBattleSpeedCount())
        {
            Main_UI_SystemMessage.ADDMessage(NrTSingleton <NrTextMgr> .Instance.GetTextFromNotify("775"), SYSTEM_MESSAGE_TYPE.IMPORTANT_MESSAGE);
            return;
        }
        if (this.m_cbBox2.IsChecked())
        {
            MsgBoxAutoSellUI msgBoxAutoSellUI = NrTSingleton <FormsManager> .Instance.LoadForm(G_ID.MSGBOX_AUTOSELL_DLG) as MsgBoxAutoSellUI;

            msgBoxAutoSellUI.SetLoadData(this.m_cbBox1.IsChecked(), this.m_cbBox2.IsChecked(), MsgBoxAutoSellUI.eMODE.NEWEXPLORATION);
            return;
        }
        NrTSingleton <NewExplorationManager> .Instance.SetAutoBattle(true, this.m_cbBox1.IsChecked(), this.m_cbBox2.IsChecked());

        NrTSingleton <NewExplorationManager> .Instance.SetAutoBatch();

        if (!NrTSingleton <NewExplorationManager> .Instance.Send_GS_NEWEXPLORATION_START_REQ())
        {
            Main_UI_SystemMessage.ADDMessage(NrTSingleton <NrTextMgr> .Instance.GetTextFromNotify("889"), SYSTEM_MESSAGE_TYPE.IMPORTANT_MESSAGE);
            return;
        }
    }
Example #3
0
    public static void RepeatBabelStart(object a_oObject)
    {
        if (Scene.CurScene != Scene.Type.BATTLE)
        {
            if (a_oObject == null)
            {
                return;
            }
            if (NrTSingleton <NkBabelMacroManager> .Instance.IsMacro())
            {
                Battle_ResultDlg_Content battle_ResultDlg_Content = (Battle_ResultDlg_Content)NrTSingleton <FormsManager> .Instance.GetForm(G_ID.BATTLE_RESULT_CONTENT_DLG);

                if (battle_ResultDlg_Content != null)
                {
                    battle_ResultDlg_Content.Close();
                }
            }
            MsgBoxTwoCheckUI msgBoxTwoCheckUI = (MsgBoxTwoCheckUI)a_oObject;
            if (msgBoxTwoCheckUI == null)
            {
                return;
            }
            NrMyCharInfo kMyCharInfo = NrTSingleton <NkCharManager> .Instance.m_kMyCharInfo;
            if (kMyCharInfo != null)
            {
                long charSubData = kMyCharInfo.GetCharSubData(eCHAR_SUBDATA.CHAR_SUBDATA_BATTLESPEED_COUNT);
                if (msgBoxTwoCheckUI.IsChecked(2) && charSubData > 0L)
                {
                    MsgBoxAutoSellUI msgBoxAutoSellUI = NrTSingleton <FormsManager> .Instance.LoadForm(G_ID.MSGBOX_AUTOSELL_DLG) as MsgBoxAutoSellUI;

                    msgBoxAutoSellUI.SetLoadData(msgBoxTwoCheckUI.IsChecked(1), msgBoxTwoCheckUI.IsChecked(2), MsgBoxAutoSellUI.eMODE.BABEL_TOWER);
                }
                else
                {
                    NrTSingleton <NkBabelMacroManager> .Instance.Start(msgBoxTwoCheckUI.IsChecked(1), false);
                }
            }
            else
            {
                NrTSingleton <NkBabelMacroManager> .Instance.Start(msgBoxTwoCheckUI.IsChecked(1), false);
            }
        }
    }