Exemple #1
0
    public void ClickPayType()
    {
        if (null == this.m_cbHearts || null == this.m_cbMoney)
        {
            return;
        }
        if (this.m_cbHearts.IsChecked())
        {
            this.m_SearchOption.m_ePayType         = AuctionDefine.ePAYTYPE.ePAYTYPE_HEARTS;
            this.m_SearchOption.m_lCostMoney       = 0L;
            this.m_SearchOption.m_lDirectCostMoney = 0L;
            this.m_lbCost.SetText(ANNUALIZED.Convert(this.m_SearchOption.m_iCostHearts));
            this.m_lbDirectCost.SetText(ANNUALIZED.Convert(this.m_SearchOption.m_iCostDirectHearts));
            AuctionMainDlg.SetChangePayTexture(this.m_dtCostIcon1, this.m_dtCostIcon2, AuctionDefine.ePAYTYPE.ePAYTYPE_HEARTS);
        }
        else if (this.m_cbMoney.IsChecked())
        {
            this.m_SearchOption.m_ePayType          = AuctionDefine.ePAYTYPE.ePAYTYPE_GOLD;
            this.m_SearchOption.m_iCostHearts       = 0;
            this.m_SearchOption.m_iCostDirectHearts = 0;
            this.m_lbCost.SetText(ANNUALIZED.Convert(this.m_SearchOption.m_lCostMoney));
            this.m_lbDirectCost.SetText(ANNUALIZED.Convert(this.m_SearchOption.m_lDirectCostMoney));
            AuctionMainDlg.SetChangePayTexture(this.m_dtCostIcon1, this.m_dtCostIcon2, AuctionDefine.ePAYTYPE.ePAYTYPE_GOLD);
        }
        bool flag = false;

        if (this.m_cbHearts.IsChecked() && this.m_cbMoney.IsChecked())
        {
            flag = true;
        }
        if (!this.m_cbHearts.IsChecked() && !this.m_cbMoney.IsChecked())
        {
            flag = true;
        }
        if (flag)
        {
            this.m_SearchOption.m_ePayType          = AuctionDefine.ePAYTYPE.ePAYTYPE_ALL;
            this.m_SearchOption.m_lCostMoney        = 0L;
            this.m_SearchOption.m_lDirectCostMoney  = 0L;
            this.m_SearchOption.m_iCostHearts       = 0;
            this.m_SearchOption.m_iCostDirectHearts = 0;
            this.m_lbCost.SetText(ANNUALIZED.Convert(this.m_SearchOption.m_lCostMoney));
            this.m_lbDirectCost.SetText(ANNUALIZED.Convert(this.m_SearchOption.m_lDirectCostMoney));
        }
    }
Exemple #2
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);
    }