示例#1
0
    public void ClickOk(IUIObject obj)
    {
        this.m_newName = this.m_UserName.Text;
        this.m_newName = this.m_newName.Trim();
        if (this.m_newName.Length == 0)
        {
            Main_UI_SystemMessage.ADDMessage(NrTSingleton <NrTextMgr> .Instance.GetTextFromNotify("51"));
            return;
        }
        if (this.m_newName.Length > 20)
        {
            Main_UI_SystemMessage.ADDMessage(NrTSingleton <NrTextMgr> .Instance.GetTextFromNotify("126"));
            return;
        }
        if (UIDataManager.IsFilterSpecialCharacters(this.m_newName, this._eCurrentService))
        {
            Main_UI_SystemMessage.ADDMessage(NrTSingleton <NrTextMgr> .Instance.GetTextFromNotify("79"));
            return;
        }
        MsgBoxUI msgBoxUI = NrTSingleton <FormsManager> .Instance.LoadForm(G_ID.MSGBOX_DLG) as MsgBoxUI;

        if (msgBoxUI != null)
        {
            msgBoxUI.SetMsg(new YesDelegate(this._onOK), this, NrTSingleton <NrTextMgr> .Instance.GetTextFromMessageBox("168"), NrTSingleton <NrTextMgr> .Instance.GetTextFromMessageBox("200"), eMsgType.MB_OK_CANCEL, 2);
        }
    }
    public bool IsCheckGitf(string strCharName)
    {
        if (strCharName.Length == 0)
        {
            Main_UI_SystemMessage.ADDMessage(NrTSingleton <NrTextMgr> .Instance.GetTextFromNotify("51"), SYSTEM_MESSAGE_TYPE.IMPORTANT_MESSAGE);
            return(false);
        }
        if (strCharName.Length > 21)
        {
            Main_UI_SystemMessage.ADDMessage(NrTSingleton <NrTextMgr> .Instance.GetTextFromNotify("126"), SYSTEM_MESSAGE_TYPE.IMPORTANT_MESSAGE);
            return(false);
        }
        NrPersonInfoUser charPersonInfo = NrTSingleton <NkCharManager> .Instance.GetCharPersonInfo(1);

        if (charPersonInfo.GetCharName().Equals(strCharName))
        {
            Main_UI_SystemMessage.ADDMessage(NrTSingleton <NrTextMgr> .Instance.GetTextFromNotify("712"), SYSTEM_MESSAGE_TYPE.IMPORTANT_MESSAGE);
            return(false);
        }
        if (UIDataManager.IsFilterSpecialCharacters(strCharName, NrTSingleton <NrGlobalReference> .Instance.GetCurrentServiceArea()))
        {
            Main_UI_SystemMessage.ADDMessage(NrTSingleton <NrTextMgr> .Instance.GetTextFromNotify("79"), SYSTEM_MESSAGE_TYPE.IMPORTANT_MESSAGE);
            return(false);
        }
        return(true);
    }
示例#3
0
    private bool _CheckOverlapNameSupporter()
    {
        this.m_strLocalName = this.m_ctrlCharName.Text;
        if (this.m_strLocalName.Length == 0)
        {
            string textFromNotify = NrTSingleton <NrTextMgr> .Instance.GetTextFromNotify("81");

            Main_UI_SystemMessage.ADDMessage(textFromNotify);
            this.m_bCharCreate = false;
            return(false);
        }
        if (this.m_strLocalName.Length > 20)
        {
            Main_UI_SystemMessage.ADDMessage(NrTSingleton <NrTextMgr> .Instance.GetTextFromNotify("126"));
            return(false);
        }
        if (this.m_strLocalName.Equals(this.m_strUserName))
        {
            return(true);
        }
        if (UIDataManager.IsFilterSpecialCharacters(this.m_strLocalName, this._eCurrentService))
        {
            string textFromNotify2 = NrTSingleton <NrTextMgr> .Instance.GetTextFromNotify("79");

            Main_UI_SystemMessage.ADDMessage(textFromNotify2);
            this.m_bCharCreate = false;
            return(false);
        }
        NrNetworkCustomizing nrNetworkCustomizing = (NrNetworkCustomizing)NrTSingleton <NrNetworkSystem> .Instance.GetNetworkComponent();

        nrNetworkCustomizing.SendPacket_CheckUserName(this.m_strLocalName);
        this.ConfirmCharName(false);
        return(true);
    }
示例#4
0
    public void ClickOK(IUIObject obj)
    {
        if (!this.IsCheckGuildCreate())
        {
            return;
        }
        string text = this.m_tfGuildName.GetText();

        if (UIDataManager.IsFilterSpecialCharacters(text, NrTSingleton <NrGlobalReference> .Instance.GetCurrentServiceArea()))
        {
            Main_UI_SystemMessage.ADDMessage(NrTSingleton <NrTextMgr> .Instance.GetTextFromNotify("79"), SYSTEM_MESSAGE_TYPE.IMPORTANT_MESSAGE);
            return;
        }
        GS_NEWGUILD_CREATE_REQ gS_NEWGUILD_CREATE_REQ = new GS_NEWGUILD_CREATE_REQ();

        TKString.StringChar(text, ref gS_NEWGUILD_CREATE_REQ.strGuildName);
        SendPacket.GetInstance().SendObject(eGAME_PACKET_ID.GS_NEWGUILD_CREATE_REQ, gS_NEWGUILD_CREATE_REQ);
    }
示例#5
0
    public bool IsCheckChangeGuildName()
    {
        string text = this.m_tfGuildName.GetText();

        if (text.Length == 0)
        {
            Main_UI_SystemMessage.ADDMessage(NrTSingleton <NrTextMgr> .Instance.GetTextFromNotify("264"), SYSTEM_MESSAGE_TYPE.IMPORTANT_MESSAGE);
            return(false);
        }
        if (text.Length > 10)
        {
            Main_UI_SystemMessage.ADDMessage(NrTSingleton <NrTextMgr> .Instance.GetTextFromNotify("262"), SYSTEM_MESSAGE_TYPE.IMPORTANT_MESSAGE);
            return(false);
        }
        if (UIDataManager.IsFilterSpecialCharacters(text, NrTSingleton <NrGlobalReference> .Instance.GetCurrentServiceArea()))
        {
            Main_UI_SystemMessage.ADDMessage(NrTSingleton <NrTextMgr> .Instance.GetTextFromNotify("79"), SYSTEM_MESSAGE_TYPE.IMPORTANT_MESSAGE);
            return(false);
        }
        return(true);
    }
示例#6
0
    public bool IsCheckGuildCreate()
    {
        string text = this.m_tfGuildName.GetText();

        if (text.Length == 0)
        {
            Main_UI_SystemMessage.ADDMessage(NrTSingleton <NrTextMgr> .Instance.GetTextFromNotify("264"), SYSTEM_MESSAGE_TYPE.IMPORTANT_MESSAGE);
            return(false);
        }
        if (text.Length > 10)
        {
            Main_UI_SystemMessage.ADDMessage(NrTSingleton <NrTextMgr> .Instance.GetTextFromNotify("262"), SYSTEM_MESSAGE_TYPE.IMPORTANT_MESSAGE);
            return(false);
        }
        if (UIDataManager.IsFilterSpecialCharacters(text, NrTSingleton <NrGlobalReference> .Instance.GetCurrentServiceArea()))
        {
            Main_UI_SystemMessage.ADDMessage(NrTSingleton <NrTextMgr> .Instance.GetTextFromNotify("79"), SYSTEM_MESSAGE_TYPE.IMPORTANT_MESSAGE);
            return(false);
        }
        if (NrTSingleton <NewGuildManager> .Instance.GetCreateMoney() > NrTSingleton <NkCharManager> .Instance.m_kMyCharInfo.m_Money)
        {
            Main_UI_SystemMessage.ADDMessage(NrTSingleton <NrTextMgr> .Instance.GetTextFromNotify("89"), SYSTEM_MESSAGE_TYPE.IMPORTANT_MESSAGE);
            return(false);
        }
        if ((int)NrTSingleton <NewGuildManager> .Instance.GetLevelForCreate() > NrTSingleton <NkCharManager> .Instance.m_kMyCharInfo.GetLevel())
        {
            string empty = string.Empty;
            NrTSingleton <CTextParser> .Instance.ReplaceParam(ref empty, new object[]
            {
                NrTSingleton <NrTextMgr> .Instance.GetTextFromNotify("88"),
                "count",
                NrTSingleton <NewGuildManager> .Instance.GetLevelForCreate()
            });

            Main_UI_SystemMessage.ADDMessage(empty, SYSTEM_MESSAGE_TYPE.IMPORTANT_MESSAGE);
            return(false);
        }
        return(true);
    }