public void On_ClickOK(IUIObject a_cObject) { if (this.m_TextField_NameInput.Text.Length <= 0) { return; } NrCharUser nrCharUser = NrTSingleton <NkCharManager> .Instance.GetChar(1) as NrCharUser; if (this.m_TextField_NameInput.Text == nrCharUser.GetCharName()) { Main_UI_SystemMessage.ADDMessage(NrTSingleton <NrTextMgr> .Instance.GetTextFromNotify("51"), SYSTEM_MESSAGE_TYPE.NORMAL_MESSAGE); return; } if (COMMON_CONSTANT_Manager.GetInstance() == null) { TsLog.LogWarning("!!!!!!!!!!!!!!!!!!!!! NOT Error Common_Constant", new object[0]); return; } SupporterDlg supporterDlg = NrTSingleton <FormsManager> .Instance.LoadForm(G_ID.SUPPORTER_DLG) as SupporterDlg; if (supporterDlg != null) { string charName = supporterDlg.GetCharName(); if (charName != string.Empty) { WS_SUPPORTER_ADD_REQ wS_SUPPORTER_ADD_REQ = new WS_SUPPORTER_ADD_REQ(); TKString.StringChar(this.m_TextField_NameInput.Text, ref wS_SUPPORTER_ADD_REQ.szCharName_Target); SendPacket.GetInstance().SendObject(16777287, wS_SUPPORTER_ADD_REQ); } } }
private void ClickGroupList(eWHISPERMENU _type) { if (_type != eWHISPERMENU.eEWHISPERMENU_FRIEND_ADD) { if (_type != eWHISPERMENU.eWHISPERMENU_USER_KICK) { if (_type == eWHISPERMENU.eEWHISPERMENU_SHOW_DETAIL_INFO) { GS_OTHERCHAR_INFO_PERMIT_REQ gS_OTHERCHAR_INFO_PERMIT_REQ = new GS_OTHERCHAR_INFO_PERMIT_REQ(); gS_OTHERCHAR_INFO_PERMIT_REQ.nPersonID = this.m_WhisperUser.PersonID; SendPacket.GetInstance().SendObject(eGAME_PACKET_ID.GS_OTHERCHAR_INFO_PERMIT_REQ, gS_OTHERCHAR_INFO_PERMIT_REQ); } } } else { NrCharUser nrCharUser = NrTSingleton <NkCharManager> .Instance.GetChar(1) as NrCharUser; if (nrCharUser.GetCharName().CompareTo(this.m_WhisperUser.Name) != 0) { GS_FRIEND_APPLY_REQ gS_FRIEND_APPLY_REQ = new GS_FRIEND_APPLY_REQ(); gS_FRIEND_APPLY_REQ.i32WorldID = 0; TKString.StringChar(this.m_WhisperUser.Name, ref gS_FRIEND_APPLY_REQ.name); SendPacket.GetInstance().SendObject(904, gS_FRIEND_APPLY_REQ); } } }
public override void SetComponent() { this.m_UserName = (base.GetControl("TextField_TextField1") as TextField); this.m_UserName.ClearDefaultText(this.m_UserName); this.m_UserName.Text = string.Empty; this.m_lbMessage = (base.GetControl("Label_Label01") as Label); this.m_lbMessage.SetText(NrTSingleton <NrTextMgr> .Instance.GetTextFromMessageBox("199")); this.m_btOk = (base.GetControl("Button_Button01") as Button); this.m_btOk.AddValueChangedDelegate(new EZValueChangedDelegate(this.ClickOk)); NrCharUser nrCharUser = NrTSingleton <NkCharManager> .Instance.GetChar(1) as NrCharUser; this.m_originName = nrCharUser.GetCharName(); base.SetScreenCenter(); }
private void CheckCharName() { if (this.m_UserName.Text.Length <= 0) { Main_UI_SystemMessage.ADDMessage(NrTSingleton <NrTextMgr> .Instance.GetTextFromNotify("98"), SYSTEM_MESSAGE_TYPE.NORMAL_MESSAGE); return; } NrCharUser nrCharUser = NrTSingleton <NkCharManager> .Instance.GetChar(1) as NrCharUser; if (this.m_UserName.Text == nrCharUser.GetCharName()) { string title = string.Empty; string message = string.Empty; title = NrTSingleton <NrTextMgr> .Instance.GetTextFromInterface("1111"); message = NrTSingleton <NrTextMgr> .Instance.GetTextFromMessageBox("122"); MsgBoxUI msgBoxUI = NrTSingleton <FormsManager> .Instance.LoadForm(G_ID.MSGBOX_DLG) as MsgBoxUI; msgBoxUI.SetMsg(null, null, title, message, eMsgType.MB_OK, 2); return; } bool flag = false; foreach (USER_FRIEND_INFO uSER_FRIEND_INFO in this.m_pkMyChar.m_kFriendInfo.GetFriendInfoValues()) { string text = TKString.NEWString(uSER_FRIEND_INFO.szName); if (text.Equals(this.m_UserName.Text)) { flag = true; this.m_nFriendPersonID = uSER_FRIEND_INFO.nPersonID; break; } } if (!flag) { TsLog.Log("CheckCharName : {0}", new object[] { this.m_UserName.Text }); this.m_UserName.Text = string.Empty; this.m_nFriendPersonID = 0L; Main_UI_SystemMessage.ADDMessage(NrTSingleton <NrTextMgr> .Instance.GetTextFromNotify("98"), SYSTEM_MESSAGE_TYPE.NORMAL_MESSAGE); } }
public void ClickUser(IUIObject obj) { if (obj == null) { return; } string text = (string)obj.Data; NrCharUser nrCharUser = NrTSingleton <NkCharManager> .Instance.GetChar(1) as NrCharUser; if (nrCharUser == null) { return; } if (text == nrCharUser.GetCharName()) { return; } NrTSingleton <CRightClickMenu> .Instance.CreateUI(0L, 0, text, CRightClickMenu.KIND.CHAT_USER_LINK_TEXT, CRightClickMenu.TYPE.NAME_SECTION_2, false); }
public void MakeChatText(Form form, CHAT_TYPE type, short colosseumGrade, string strText, ITEM linkItem) { if (type == CHAT_TYPE.SYSTEM) { type = CHAT_TYPE.NORMAL; } NrCharUser nrCharUser = NrTSingleton <NkCharManager> .Instance.GetChar(1) as NrCharUser; if (nrCharUser != null) { char c = TKString.StringChar("/")[0]; if (!string.IsNullOrEmpty(strText)) { char[] array = strText.ToCharArray(0, 1); if (c.CompareTo(array[0]) == 0) { return; } } ChatLabel chatLabel = null; ChatLabel chatLabel2 = null; if (TsPlatform.IsWeb) { MainChatDlg mainChatDlg = form as MainChatDlg; if (mainChatDlg != null) { chatLabel = mainChatDlg.GetChatLable(type); chatLabel2 = mainChatDlg.GetChatLable(CHAT_TYPE.ALL); } } else { ChatMobile_Sub_Dlg chatMobile_Sub_Dlg = form as ChatMobile_Sub_Dlg; if (chatMobile_Sub_Dlg != null) { chatLabel = chatMobile_Sub_Dlg.GetChatLable(type); chatLabel2 = chatMobile_Sub_Dlg.GetChatLable(CHAT_TYPE.ALL); } } string name = string.Empty; if (chatLabel2 != null) { name = ChatManager.GetChatFrontString(nrCharUser.GetCharName(), colosseumGrade, type, false); chatLabel2.PushText(name, strText, ChatManager.GetChatColorKey(type), linkItem); if (null != chatLabel && type != CHAT_TYPE.NORMAL) { chatLabel.PushText(name, strText, ChatManager.GetChatColorKey(type), linkItem); } } if (TsPlatform.IsMobile) { ChatMobileDlg chatMobileDlg = NrTSingleton <FormsManager> .Instance.GetForm(G_ID.CHAT_MAIN_DLG) as ChatMobileDlg; if (chatMobileDlg != null) { chatLabel2 = chatMobileDlg.GetChatLable(CHAT_TYPE.ALL); if (chatLabel2 != null) { chatLabel2.PushText(name, strText, ChatManager.GetChatColorKey(type), linkItem); } if (80 <= this.ChatMsgList.Count) { this.ChatMsgList.Dequeue(); } this.ChatMsgList.Enqueue(new MainChatMsg(type, ChatManager.GetChatNameStr(nrCharUser.GetCharName(), colosseumGrade, false), strText, linkItem, ChatManager.GetChatColorKey(type))); } TournamentLobbyDlg tournamentLobbyDlg = NrTSingleton <FormsManager> .Instance.GetForm(G_ID.TOURNAMENT_LOBBY_DLG) as TournamentLobbyDlg; if (tournamentLobbyDlg != null) { chatLabel2 = tournamentLobbyDlg.GetChatLable(CHAT_TYPE.ALL); if (chatLabel2 != null) { chatLabel2.PushText(name, strText, ChatManager.GetChatColorKey(type), linkItem); } } } nrCharUser.MakeChatText(strText, true); } }
private void ReplaceName(ref int m_iTextCount, ref StringBuilder refReplaceText, string szContent) { int num = 0; int i = m_iTextCount + 1; int length = szContent.Length; if (i >= length) { TsLog.LogWarning("TextParser.ReplaceName({0},$ReplaceText,\"{1}\") => szContent size over!", new object[] { m_iTextCount, szContent }); return; } this.ParamTypeBuilder.Length = 0; while (i < length) { num++; if (szContent[i] == this.m_szTag[15]) { break; } this.ParamTypeBuilder.Append(szContent[i]); i++; } this.ParamCodeBuilder.Length = 0; while (i < length) { num++; if (szContent[i] == this.m_szTag[14]) { break; } this.ParamCodeBuilder.Append(szContent[i]); i++; } string text = this.ParamTypeBuilder.ToString(); string text2 = this.ParamCodeBuilder.ToString(); string text3 = string.Empty; string text4 = text; switch (text4) { case "CHARCODE": { NrCharKindInfo charKindInfoFromCode = NrTSingleton <NrCharKindInfoManager> .Instance.GetCharKindInfoFromCode(text2); if (charKindInfoFromCode == null) { text3 = string.Empty; } else { text3 = charKindInfoFromCode.GetName(); } break; } case "CHARCODEMONSTER": { NrCharKindInfo charKindInfoFromCode2 = NrTSingleton <NrCharKindInfoManager> .Instance.GetCharKindInfoFromCode(text2); if (charKindInfoFromCode2 == null) { text3 = string.Empty; } else { string textColor = this.GetTextColor("1108"); text3 = NrTSingleton <UIDataManager> .Instance.GetString(textColor, charKindInfoFromCode2.GetName()); } break; } case "CHARCODENPC": { NrCharKindInfo charKindInfoFromCode3 = NrTSingleton <NrCharKindInfoManager> .Instance.GetCharKindInfoFromCode(text2); if (charKindInfoFromCode3 == null) { text3 = string.Empty; } else { string textColor2 = this.GetTextColor("1105"); text3 = NrTSingleton <UIDataManager> .Instance.GetString(textColor2, charKindInfoFromCode3.GetName()); } break; } case "ITEM": { int itemunique; int.TryParse(text2, out itemunique); text3 = NrTSingleton <ItemManager> .Instance.GetItemNameByItemUnique(itemunique); break; } case "USERNAME": { NrCharUser nrCharUser = NrTSingleton <NkCharManager> .Instance.GetChar(1) as NrCharUser; if (nrCharUser != null) { string charName = nrCharUser.GetCharName(); text3 = charName; } else { text3 = "NoName"; } break; } case "ITEMUNIQUE": { int itemunique2; int.TryParse(text2, out itemunique2); text3 = NrTSingleton <ItemManager> .Instance.GetItemNameByItemUnique(itemunique2); string textColor3 = this.GetTextColor("1104"); text3 = NrTSingleton <UIDataManager> .Instance.GetString(textColor3, text3); break; } } refReplaceText.Append(text3); m_iTextCount += num - 1; }