Beispiel #1
0
    public override void SetComponent()
    {
        this.m_strText = NrTSingleton <NrTextMgr> .Instance.GetTextFromInterface("1368");

        string text = string.Empty;

        this.m_dtCostIcon1 = (base.GetControl("Icn_Money01") as DrawTexture);
        this.m_dtCostIcon2 = (base.GetControl("Icn_Money02") as DrawTexture);
        this.m_tbTab       = (base.GetControl("ToolBar") as Toolbar);
        this.m_tbTab.Control_Tab[0].Text = NrTSingleton <NrTextMgr> .Instance.GetTextFromInterface("451");

        this.m_tbTab.Control_Tab[1].Text = NrTSingleton <NrTextMgr> .Instance.GetTextFromInterface("1490");

        UIPanelTab expr_AE = this.m_tbTab.Control_Tab[0];

        expr_AE.ButtonClick = (EZValueChangedDelegate)Delegate.Combine(expr_AE.ButtonClick, new EZValueChangedDelegate(this.OnClickTab));
        UIPanelTab expr_DC = this.m_tbTab.Control_Tab[1];

        expr_DC.ButtonClick = (EZValueChangedDelegate)Delegate.Combine(expr_DC.ButtonClick, new EZValueChangedDelegate(this.OnClickTab));
        this.m_btCost       = (base.GetControl("Button_AuctionCost") as Button);
        this.m_btCost.AddValueChangedDelegate(new EZValueChangedDelegate(this.ClickCost));
        this.m_lbCost       = (base.GetControl("Label_AuctionCost") as Label);
        this.m_btDirectCost = (base.GetControl("Button_DirectCost") as Button);
        this.m_btDirectCost.AddValueChangedDelegate(new EZValueChangedDelegate(this.ClickDirectCost));
        this.m_lbDirectCost = (base.GetControl("Label_DirectCost") as Label);
        this.m_cbHearts     = (base.GetControl("Toggle_MoneyKind01") as CheckBox);
        this.m_cbHearts.SetValueChangedDelegate(new EZValueChangedDelegate(this.ClickPayTypeHearts));
        this.m_cbHearts.SetCheckState(1);
        this.m_cbMoney = (base.GetControl("Toggle_MoneyKind02") as CheckBox);
        this.m_cbMoney.SetValueChangedDelegate(new EZValueChangedDelegate(this.ClickPayTypeMoney));
        this.m_cbMoney.SetCheckState(1);
        this.m_btSearch = (base.GetControl("Button_OK") as Button);
        this.m_btSearch.AddValueChangedDelegate(new EZValueChangedDelegate(this.ClickSearch));
        this.m_dtCostIconHearts = (base.GetControl("Icon_MoneyKindHearts") as DrawTexture);
        this.m_dtCostIconMoney  = (base.GetControl("Icon_MoneyKind_Gold") as DrawTexture);
        this.m_lbCostKind       = (base.GetControl("Label_MoneyKind") as Label);
        this.m_dlItemType       = (base.GetControl("DropDownList_Base01") as DropDownList);
        this.m_dlItemType.AddItem(this.m_strText, eITEM_TYPE.ITEMTYPE_NONE);
        this.m_ItemTypeInfo.Clear();
        for (int i = 1; i <= 20; i++)
        {
            ITEMTYPE_INFO itemTypeInfo = NrTSingleton <NrBaseTableManager> .Instance.GetItemTypeInfo(i.ToString());

            if (itemTypeInfo != null)
            {
                if (0 < itemTypeInfo.AuctionSearch)
                {
                    this.m_ItemTypeInfo.Add(itemTypeInfo.AuctionSearch, itemTypeInfo);
                }
            }
        }
        foreach (ITEMTYPE_INFO current in this.m_ItemTypeInfo.Values)
        {
            text = NrTSingleton <NrTextMgr> .Instance.GetTextFromItem(current.TEXTKEY);

            if (!(string.Empty == text))
            {
                this.m_dlItemType.AddItem(text, current);
            }
        }
        this.m_dlItemType.SetViewArea(this.m_dlItemType.Count);
        this.m_dlItemType.RepositionItems();
        this.m_dlItemType.SetFirstItem();
        this.m_dlItemType.AddValueChangedDelegate(new EZValueChangedDelegate(this.OnChangeItemType));
        this.m_btUseMinLevel = (base.GetControl("Button_EquipLv01") as Button);
        this.m_btUseMinLevel.AddValueChangedDelegate(new EZValueChangedDelegate(this.ClickUseMinLevel));
        this.m_lbUseMinLevel = (base.GetControl("Label_EquipLv01") as Label);
        this.m_btUseMaxLevel = (base.GetControl("Button_EquipLv02") as Button);
        this.m_btUseMaxLevel.AddValueChangedDelegate(new EZValueChangedDelegate(this.ClickUseMaxLevel));
        this.m_lbUseMaxLevel = (base.GetControl("Label_EquipLv02") as Label);
        this.m_dlItemOption  = (base.GetControl("DropDownList_Option01") as DropDownList);
        this.m_dlItemOption.SetViewArea(this.m_dlItemOption.Count);
        this.m_dlItemOption.AddValueChangedDelegate(new EZValueChangedDelegate(this.OnChangeItemOption));
        this.m_btItemSkillLevel = (base.GetControl("Button_Option01") as Button);
        this.m_btItemSkillLevel.AddValueChangedDelegate(new EZValueChangedDelegate(this.ClickItemSkillLevel));
        this.m_lbItemSkillLevel = (base.GetControl("Label_Option01") as Label);
        this.m_btItemTradeCount = (base.GetControl("Button_TradeCount") as Button);
        this.m_btItemTradeCount.AddValueChangedDelegate(new EZValueChangedDelegate(this.ClickItemTradeCount));
        this.m_lbItemTradeCount = (base.GetControl("Label_TradeCount") as Label);
        this.m_dlSolSeason      = (base.GetControl("DropDownList_Base02") as DropDownList);
        this.m_dlSolSeason.AddItem(NrTSingleton <NrTextMgr> .Instance.GetTextFromInterface("1317"), 0);
        this.m_SeasonData.Add(0);
        List <SOL_GUIDE> valueAllSeason = NrTSingleton <NrTableSolGuideManager> .Instance.GetValueAllSeason();

        for (int i = 0; i < valueAllSeason.Count; i++)
        {
            if (0 < valueAllSeason[i].m_bSeason)
            {
                NrTSingleton <CTextParser> .Instance.ReplaceParam(ref text, new object[]
                {
                    NrTSingleton <NrTextMgr> .Instance.GetTextFromInterface("1208"),
                    "count",
                    valueAllSeason[i].m_bSeason
                });

                this.m_dlSolSeason.AddItem(text, valueAllSeason[i].m_bSeason);
                this.m_SeasonData.Add(valueAllSeason[i].m_bSeason);
            }
        }
        this.m_dlSolSeason.SetViewArea(this.m_dlSolSeason.Count);
        this.m_dlSolSeason.RepositionItems();
        this.m_dlSolSeason.SetFirstItem();
        this.m_dlSolSeason.AddValueChangedDelegate(new EZValueChangedDelegate(this.OnChangeSolSeason));
        this.m_btSolLevel = (base.GetControl("Button_EquipLv03") as Button);
        this.m_btSolLevel.AddValueChangedDelegate(new EZValueChangedDelegate(this.ClickSolLevel));
        this.m_lbSolLevel      = (base.GetControl("Label_EquipLv03") as Label);
        this.m_tfSolName       = (base.GetControl("TextField_SearchName") as TextField);
        this.m_btSolTradeCount = (base.GetControl("Button_TradeCount01") as Button);
        this.m_btSolTradeCount.AddValueChangedDelegate(new EZValueChangedDelegate(this.ClickSolTradeCount));
        this.m_lbSolTradeCount = (base.GetControl("Label_TradeCount1") as Label);
        if (!AuctionMainDlg.IsPayTypeHearts())
        {
            this.m_cbHearts.Hide(true);
            this.m_dtCostIconHearts.Hide(true);
            this.m_cbMoney.SetCheckState(1);
            AuctionMainDlg.SetChangePayTexture(this.m_dtCostIcon1, this.m_dtCostIcon2, AuctionDefine.ePAYTYPE.ePAYTYPE_GOLD);
        }
        if (!AuctionMainDlg.IsPayTypeMoney())
        {
            this.m_cbMoney.Hide(true);
            this.m_dtCostIconMoney.Hide(true);
            this.m_cbHearts.SetCheckState(1);
            AuctionMainDlg.SetChangePayTexture(this.m_dtCostIcon1, this.m_dtCostIcon2, AuctionDefine.ePAYTYPE.ePAYTYPE_HEARTS);
        }
        if (!AuctionMainDlg.IsPayTypeHearts() || !AuctionMainDlg.IsPayTypeMoney())
        {
            this.m_lbCostKind.Hide(true);
            this.m_cbHearts.Hide(true);
            this.m_cbMoney.Hide(true);
            this.m_dtCostIconHearts.Hide(true);
            this.m_dtCostIconMoney.Hide(true);
        }
        base.SetScreenCenter();
        base.ShowBlackBG(0.5f);
    }
Beispiel #2
0
    public void SetSearchOption(AuctionSearchOption SearchOption)
    {
        this.m_SearchOption.Set(SearchOption);
        this.m_lbUseMinLevel.SetText(this.m_SearchOption.m_iUseMinLevel.ToString());
        this.m_lbUseMaxLevel.SetText(this.m_SearchOption.m_iUseMaxLevel.ToString());
        this.m_lbItemSkillLevel.SetText(this.m_SearchOption.m_iItemSkillLevel.ToString());
        this.m_lbItemTradeCount.SetText(this.m_SearchOption.m_iItemTradeCount.ToString());
        this.m_lbSolLevel.SetText(this.m_SearchOption.m_iSolLevel.ToString());
        this.m_tfSolName.SetText(this.m_SearchOption.m_strSolName);
        this.m_lbSolTradeCount.SetText(this.m_SearchOption.m_iSolTradeCount.ToString());
        if (this.m_SearchOption.m_ePayType == AuctionDefine.ePAYTYPE.ePAYTYPE_GOLD)
        {
            this.m_lbCost.SetText(ANNUALIZED.Convert(this.m_SearchOption.m_lCostMoney));
            this.m_lbDirectCost.SetText(ANNUALIZED.Convert(this.m_SearchOption.m_lDirectCostMoney));
            this.m_cbMoney.SetCheckState(1);
            this.m_cbHearts.SetCheckState(0);
        }
        else if (this.m_SearchOption.m_ePayType == AuctionDefine.ePAYTYPE.ePAYTYPE_HEARTS)
        {
            this.m_lbCost.SetText(ANNUALIZED.Convert(this.m_SearchOption.m_iCostHearts));
            this.m_lbDirectCost.SetText(ANNUALIZED.Convert(this.m_SearchOption.m_iCostDirectHearts));
            this.m_cbMoney.SetCheckState(0);
            this.m_cbHearts.SetCheckState(1);
        }
        else
        {
            long num  = 0L;
            long num2 = 0L;
            if (AuctionMainDlg.IsPayTypeMoney())
            {
                this.m_SearchOption.m_ePayType = AuctionDefine.ePAYTYPE.ePAYTYPE_GOLD;
                num  = this.m_SearchOption.m_lCostMoney;
                num2 = this.m_SearchOption.m_lDirectCostMoney;
            }
            else if (AuctionMainDlg.IsPayTypeHearts())
            {
                this.m_SearchOption.m_ePayType = AuctionDefine.ePAYTYPE.ePAYTYPE_HEARTS;
                num  = (long)this.m_SearchOption.m_iCostHearts;
                num2 = (long)this.m_SearchOption.m_iCostDirectHearts;
            }
            this.m_lbCost.SetText(ANNUALIZED.Convert(num));
            this.m_lbDirectCost.SetText(ANNUALIZED.Convert(num2));
            this.m_cbMoney.SetCheckState(1);
            this.m_cbHearts.SetCheckState(1);
        }
        int num3 = 0;

        if (eITEM_TYPE.ITEMTYPE_NONE < this.m_SearchOption.m_eItemType)
        {
            num3 = (int)this.m_SearchOption.m_eItemType;
            this.m_dlItemType.SetIndex(num3);
        }
        ITEMTYPE_INFO itemTypeInfo = null;

        if (0 < num3)
        {
            itemTypeInfo = NrTSingleton <NrBaseTableManager> .Instance.GetItemTypeInfo(num3.ToString());
        }
        this.SetItemOption(itemTypeInfo, this.m_SearchOption.m_iItemSkillUnique);
        for (int i = 0; i < this.m_SeasonData.Count; i++)
        {
            if (this.m_SeasonData[i] == this.m_SearchOption.m_bySolSeason)
            {
                this.m_dlSolSeason.SetIndex(i);
                break;
            }
        }
        this.SelectTab();
    }