Exemplo n.º 1
0
    private void InsertMythList(SolComposeListDlg.SOL_LIST_INSERT_TYPE eIndex)
    {
        this.mSortList.Clear();
        this.mCheckList.Clear();
        bool flag  = eIndex == SolComposeListDlg.SOL_LIST_INSERT_TYPE.ALL || eIndex == SolComposeListDlg.SOL_LIST_INSERT_TYPE.BATTLE;
        bool flag2 = eIndex == SolComposeListDlg.SOL_LIST_INSERT_TYPE.ALL || eIndex == SolComposeListDlg.SOL_LIST_INSERT_TYPE.WAIT;

        if (NrTSingleton <NkCharManager> .Instance.m_kMyCharInfo != null)
        {
            NrPersonInfoUser charPersonInfo = NrTSingleton <NkCharManager> .Instance.GetCharPersonInfo(1);

            if (flag && charPersonInfo != null)
            {
                for (int i = 0; i < 6; i++)
                {
                    NkSoldierInfo soldierInfo = charPersonInfo.GetSoldierInfo(i);
                    if (soldierInfo != null)
                    {
                        if (soldierInfo.GetSolID() > 0L)
                        {
                            if (soldierInfo.GetGrade() >= 6 && soldierInfo.GetGrade() < 10)
                            {
                                this.mSortList.Add(soldierInfo);
                            }
                        }
                    }
                }
            }
            if (flag2)
            {
                NkReadySolList readySolList = NrTSingleton <NkCharManager> .Instance.m_kMyCharInfo.GetReadySolList();

                foreach (NkSoldierInfo current in readySolList.GetList().Values)
                {
                    if (current.GetSolID() != NrTSingleton <NkCharManager> .Instance.GetMyCharInfo().GetFaceSolID())
                    {
                        if (current.GetSolPosType() == 0 && current.GetGrade() >= 6 && current.GetGrade() < 10)
                        {
                            this.mSortList.Add(current);
                        }
                    }
                }
            }
        }
        this.ddList1.SetIndex((int)eIndex);
        this.ddList1.RepositionItems();
        this.ChangeSortDDL(null);
    }
Exemplo n.º 2
0
    public void InitExtractList()
    {
        SolComposeListDlg.SOL_LIST_INSERT_TYPE iNSERT_TYPE = this.INSERT_TYPE;
        if (null != this.ddList1)
        {
            this.ddList1.SetViewArea(1);
            this.ddList1.Clear();
            int      num      = 0;
            ListItem listItem = new ListItem();
            listItem.SetColumnStr(0, NrTSingleton <NrTextMgr> .Instance.GetTextFromInterface(this.ddlListKey1[0]));
            listItem.Key = num++;
            this.ddList1.Add(listItem);
            this.ddList1.SetIndex((int)this.INSERT_TYPE);
            this.ddList1.RepositionItems();
        }
        this.ddList1.controlIsEnabled = (this.m_bMainSelect = false);
        NkReadySolList readySolList = NrTSingleton <NkCharManager> .Instance.m_kMyCharInfo.GetReadySolList();

        foreach (NkSoldierInfo current in readySolList.GetList().Values)
        {
            if (current.GetSolID() != NrTSingleton <NkCharManager> .Instance.GetMyCharInfo().GetFaceSolID())
            {
                if (current.GetSolPosType() == 0 && current.GetGrade() == 5)
                {
                    if (!current.IsAtbCommonFlag(1L))
                    {
                        this.mSortList.Add(current);
                    }
                }
            }
        }
        if (!this.m_bMainSelect && SolComposeMainDlg.Instance != null)
        {
            this.mCheckList.AddRange(SolComposeMainDlg.Instance.SUB_EXTRACTARRAY);
        }
        this.ddList1.SetIndex((int)iNSERT_TYPE);
        this.ddList1.RepositionItems();
        this.ChangeSortDDL(null);
    }
Exemplo n.º 3
0
 public void InitDummyList()
 {
     SolComposeListDlg.SOL_LIST_INSERT_TYPE iNSERT_TYPE = base.INSERT_TYPE;
     if (null != this.ddList1)
     {
         this.ddList1.Clear();
         this.ddList1.SetIndex(-1);
         this.ddList1.SetViewArea(0);
         this.ddList1.controlIsEnabled = false;
     }
     if (null != this.ddList2)
     {
         this.ddList2.Clear();
         this.ddList2.SetIndex(-1);
         this.ddList2.SetViewArea(0);
         this.ddList2.controlIsEnabled = false;
     }
     this.mSortList.Add(this.CreateDummySoldier());
     if (base.ShowType == SOLCOMPOSE_TYPE.EXTRACT)
     {
         this.mSortList.Add(this.CreateDummySoldier());
     }
     base.ChangeSortDDL(null);
 }
Exemplo n.º 4
0
    private void InsertList(SolComposeListDlg.SOL_LIST_INSERT_TYPE eIndex)
    {
        if (SolComposeMainDlg.Instance == null)
        {
            this.OnClose();
            return;
        }
        this.mSortList.Clear();
        this.mCheckList.Clear();
        bool flag  = eIndex == SolComposeListDlg.SOL_LIST_INSERT_TYPE.ALL || eIndex == SolComposeListDlg.SOL_LIST_INSERT_TYPE.BATTLE;
        bool flag2 = eIndex == SolComposeListDlg.SOL_LIST_INSERT_TYPE.ALL || eIndex == SolComposeListDlg.SOL_LIST_INSERT_TYPE.WAIT;
        bool flag3 = eIndex == SolComposeListDlg.SOL_LIST_INSERT_TYPE.ALL || eIndex == SolComposeListDlg.SOL_LIST_INSERT_TYPE.WAREHOUSE;

        if (!this.m_bMainSelect)
        {
            flag  = false;
            flag2 = true;
            flag3 = false;
        }
        if (NrTSingleton <NkCharManager> .Instance.m_kMyCharInfo != null)
        {
            NrPersonInfoUser charPersonInfo = NrTSingleton <NkCharManager> .Instance.GetCharPersonInfo(1);

            if (flag && charPersonInfo != null)
            {
                for (int i = 0; i < 6; i++)
                {
                    NkSoldierInfo soldierInfo = charPersonInfo.GetSoldierInfo(i);
                    if (soldierInfo != null)
                    {
                        if (soldierInfo.GetSolID() > 0L)
                        {
                            if (this.m_bMainSelect || !soldierInfo.IsLeader())
                            {
                                if (this.m_eShowType == SOLCOMPOSE_TYPE.TRANSCENDENCE)
                                {
                                    if (this.m_bMainSelect)
                                    {
                                        if (soldierInfo.GetGrade() < 6)
                                        {
                                            goto IL_152;
                                        }
                                        if (soldierInfo.GetGrade() == 9 || soldierInfo.GetGrade() >= 13)
                                        {
                                            goto IL_152;
                                        }
                                    }
                                }
                                else if (this.m_eShowType == SOLCOMPOSE_TYPE.COMPOSE && !this.IsAddComposeList(soldierInfo))
                                {
                                    goto IL_152;
                                }
                                this.mSortList.Add(soldierInfo);
                            }
                        }
                    }
                    IL_152 :;
                }
            }
            if (flag2)
            {
                NkReadySolList readySolList = NrTSingleton <NkCharManager> .Instance.m_kMyCharInfo.GetReadySolList();

                foreach (NkSoldierInfo current in readySolList.GetList().Values)
                {
                    if (this.m_bMainSelect && this.m_eShowType == SOLCOMPOSE_TYPE.TRANSCENDENCE)
                    {
                        if (current.GetSolPosType() != 0 && current.GetSolPosType() != 2)
                        {
                            continue;
                        }
                    }
                    else if (current.GetSolPosType() != 0)
                    {
                        continue;
                    }
                    if (this.m_bMainSelect || NrTSingleton <NkCharManager> .Instance.GetMyCharInfo().GetFaceSolID() != current.GetSolID())
                    {
                        switch (this.m_eShowType)
                        {
                        case SOLCOMPOSE_TYPE.COMPOSE:
                            if (!this.IsAddComposeList(current))
                            {
                                continue;
                            }
                            if (!this.m_bMainSelect)
                            {
                                if (current.GetGrade() >= 6)
                                {
                                    continue;
                                }
                                if (current.IsAtbCommonFlag(1L))
                                {
                                    continue;
                                }
                            }
                            break;

                        case SOLCOMPOSE_TYPE.EXTRACT:
                            if (current.GetGrade() < 5)
                            {
                                continue;
                            }
                            if (current.GetGrade() >= 6)
                            {
                                continue;
                            }
                            if (current.IsAtbCommonFlag(1L))
                            {
                                continue;
                            }
                            break;

                        case SOLCOMPOSE_TYPE.TRANSCENDENCE:
                            if (current.GetGrade() < 6)
                            {
                                continue;
                            }
                            if (!this.m_bMainSelect)
                            {
                                if (current.IsAtbCommonFlag(1L))
                                {
                                    continue;
                                }
                            }
                            else if (current.GetGrade() == 9 || current.GetGrade() >= 13)
                            {
                                continue;
                            }
                            break;
                        }
                        this.mSortList.Add(current);
                    }
                }
            }
            if (flag3 && this.m_bMainSelect)
            {
                List <NkSoldierInfo> solWarehouseList = NrTSingleton <NkCharManager> .Instance.m_kMyCharInfo.GetSolWarehouseList();

                foreach (NkSoldierInfo current2 in solWarehouseList)
                {
                    if (current2.GetSolPosType() == 5)
                    {
                        switch (this.m_eShowType)
                        {
                        case SOLCOMPOSE_TYPE.COMPOSE:
                            if (!this.IsAddComposeList(current2))
                            {
                                continue;
                            }
                            if (!this.m_bMainSelect && current2.IsAtbCommonFlag(1L))
                            {
                                continue;
                            }
                            break;

                        case SOLCOMPOSE_TYPE.TRANSCENDENCE:
                            if (current2.GetGrade() < 6)
                            {
                                continue;
                            }
                            if (current2.GetGrade() == 9 || current2.GetGrade() >= 13)
                            {
                                continue;
                            }
                            break;
                        }
                        this.mSortList.Add(current2);
                    }
                }
            }
            if (!this.m_bMainSelect && SolComposeMainDlg.Instance.mBaseSol != null)
            {
                this.mSortList.Remove(SolComposeMainDlg.Instance.mBaseSol);
            }
            if (this.m_bMainSelect)
            {
                List <long> list = new List <long>();
                list.AddRange(SolComposeMainDlg.Instance.SUB_ARRAY);
                if (list.Count != 0)
                {
                    List <NkSoldierInfo> list2 = new List <NkSoldierInfo>();
                    foreach (NkSoldierInfo current3 in this.mSortList)
                    {
                        for (int j = 0; j < list.Count; j++)
                        {
                            if (current3.GetSolID() == list[j])
                            {
                                list2.Add(current3);
                            }
                        }
                    }
                    for (int k = 0; k < list2.Count; k++)
                    {
                        this.mSortList.Remove(list2[k]);
                    }
                    list2.Clear();
                }
            }
            if (!this.m_bMainSelect && SolComposeMainDlg.Instance != null)
            {
                this.mCheckList.AddRange(SolComposeMainDlg.Instance.SUB_ARRAY);
            }
        }
        this.ddList1.SetIndex((int)eIndex);
        this.ddList1.RepositionItems();
        this.ChangeSortDDL(null);
    }
Exemplo n.º 5
0
    public void InitList(bool bMainSelect)
    {
        SolComposeListDlg.SOL_LIST_INSERT_TYPE eIndex = this.INSERT_TYPE;
        if (null != this.ddList1)
        {
            if (bMainSelect && this.ShowType == SOLCOMPOSE_TYPE.COMPOSE)
            {
                this.ddList1.SetViewArea(this.ddlListKey1.Length);
                this.ddList1.Clear();
                int      num   = 0;
                string[] array = this.ddlListKey1;
                for (int i = 0; i < array.Length; i++)
                {
                    string   strTextKey = array[i];
                    ListItem listItem   = new ListItem();
                    listItem.SetColumnStr(0, NrTSingleton <NrTextMgr> .Instance.GetTextFromInterface(strTextKey));
                    listItem.Key = num++;
                    this.ddList1.Add(listItem);
                }
                this.ddList1.SetIndex((int)this.INSERT_TYPE);
                this.ddList1.RepositionItems();
            }
            else if (bMainSelect && this.ShowType == SOLCOMPOSE_TYPE.TRANSCENDENCE)
            {
                this.ddList1.SetViewArea(this.ddlListKey1.Length);
                this.ddList1.Clear();
                int      num2   = 0;
                string[] array2 = this.ddlListKey1;
                for (int j = 0; j < array2.Length; j++)
                {
                    string   strTextKey2 = array2[j];
                    ListItem listItem2   = new ListItem();
                    listItem2.SetColumnStr(0, NrTSingleton <NrTextMgr> .Instance.GetTextFromInterface(strTextKey2));
                    listItem2.Key = num2++;
                    this.ddList1.Add(listItem2);
                }
                this.ddList1.SetIndex((int)this.INSERT_TYPE);
                this.ddList1.RepositionItems();
            }
            else
            {
                this.ddList1.SetViewArea(1);
                this.ddList1.Clear();
                int      num3      = 0;
                ListItem listItem3 = new ListItem();
                listItem3.SetColumnStr(0, NrTSingleton <NrTextMgr> .Instance.GetTextFromInterface(this.ddlListKey1[0]));
                listItem3.Key = num3++;
                this.ddList1.Add(listItem3);
                this.ddList1.SetIndex((int)this.INSERT_TYPE);
                this.ddList1.RepositionItems();
            }
        }
        if (!bMainSelect || this.ShowType == SOLCOMPOSE_TYPE.EXTRACT)
        {
            eIndex = SolComposeListDlg.SOL_LIST_INSERT_TYPE.WAIT;
        }
        if (bMainSelect && this.ShowType == SOLCOMPOSE_TYPE.TRANSCENDENCE)
        {
            eIndex = SolComposeListDlg.SOL_LIST_INSERT_TYPE.ALL;
        }
        UIScrollList arg_231_0 = this.ddList1;

        this.m_bMainSelect         = bMainSelect;
        arg_231_0.controlIsEnabled = bMainSelect;
        this.InsertList(eIndex);
    }