public void OnInputMyCost(InputNumberDlg a_cForm, object a_oObject)
    {
        long num = a_cForm.GetNum();

        if (AuctionMainDlg.GetCostMax(this.m_ePayType) < num)
        {
            num = AuctionMainDlg.GetCostMax(this.m_ePayType);
        }
        MsgBoxUI msgBoxUI = NrTSingleton <FormsManager> .Instance.LoadForm(G_ID.MSGBOX_DLG) as MsgBoxUI;

        if (msgBoxUI == null)
        {
            return;
        }
        string empty     = string.Empty;
        string textColor = NrTSingleton <CTextParser> .Instance.GetTextColor("1002");

        NrTSingleton <CTextParser> .Instance.ReplaceParam(ref empty, new object[]
        {
            NrTSingleton <NrTextMgr> .Instance.GetTextFromMessageBox("258"),
            "targetname",
            this.m_lbItemName.GetText() + textColor,
            "count",
            num
        });

        msgBoxUI.SetMsg(new YesDelegate(this.MessageBoxMyCost), num, NrTSingleton <NrTextMgr> .Instance.GetTextFromInterface("1104"), empty, eMsgType.MB_OK_CANCEL, 2);
        msgBoxUI.Show();
    }
Esempio n. 2
0
    public void ClickDirectCost(IUIObject obj)
    {
        if (this.m_SearchOption.m_ePayType == AuctionDefine.ePAYTYPE.ePAYTYPE_GOLD)
        {
            InputNumberDlg inputNumberDlg = NrTSingleton <FormsManager> .Instance.LoadForm(G_ID.DLG_INPUTNUMBER) as InputNumberDlg;

            inputNumberDlg.SetCallback(new Action <InputNumberDlg, object>(this.OnInputDirectCostMoney), null, new Action <InputNumberDlg, object>(this.OnCloseInputNumber), null);
            inputNumberDlg.SetMinMax(1L, AuctionMainDlg.GetCostMax(this.m_SearchOption.m_ePayType));
            inputNumberDlg.SetNum(this.m_SearchOption.m_lCostMoney);
            inputNumberDlg.SetInputNum(0L);
        }
        else if (this.m_SearchOption.m_ePayType == AuctionDefine.ePAYTYPE.ePAYTYPE_HEARTS)
        {
            InputNumberDlg inputNumberDlg2 = NrTSingleton <FormsManager> .Instance.LoadForm(G_ID.DLG_INPUTNUMBER) as InputNumberDlg;

            inputNumberDlg2.SetCallback(new Action <InputNumberDlg, object>(this.OnInputDirectCostHearts), null, new Action <InputNumberDlg, object>(this.OnCloseInputNumber), null);
            inputNumberDlg2.SetMinMax(1L, AuctionMainDlg.GetCostMax(this.m_SearchOption.m_ePayType));
            inputNumberDlg2.SetNum(this.m_SearchOption.m_lDirectCostMoney);
            inputNumberDlg2.SetInputNum(0L);
        }
        else if (this.m_SearchOption.m_ePayType == AuctionDefine.ePAYTYPE.ePAYTYPE_ALL)
        {
            Main_UI_SystemMessage.ADDMessage(NrTSingleton <NrTextMgr> .Instance.GetTextFromNotify("307"), SYSTEM_MESSAGE_TYPE.IMPORTANT_MESSAGE);
            return;
        }
    }
    public void ClickMyCost(IUIObject obj)
    {
        InputNumberDlg inputNumberDlg = NrTSingleton <FormsManager> .Instance.LoadForm(G_ID.DLG_INPUTNUMBER) as InputNumberDlg;

        inputNumberDlg.SetCallback(new Action <InputNumberDlg, object>(this.OnInputMyCost), null, new Action <InputNumberDlg, object>(this.OnCloseInputNumber), null);
        long costMax       = AuctionMainDlg.GetCostMax(this.m_ePayType);
        long tenderCostMin = this.GetTenderCostMin(this.m_lCost);

        inputNumberDlg.SetMinMax(tenderCostMin, costMax);
        inputNumberDlg.SetNum(this.m_lTenderCost);
        inputNumberDlg.SetInputNum(0L);
    }