| | |
| | | public int zbgChangFamilyCD;
|
| | | public List<int> cutCntListForTalk = new List<int>();
|
| | | public int familyRecordMaxCount;
|
| | | public const int DefaultEmblemWordCharacterLimit = 1;
|
| | | public Dictionary<string, int> emblemWordCharacterLimitDict = new Dictionary<string, int>();
|
| | |
|
| | | void ParseConfig()
|
| | | {
|
| | |
| | | config = FuncConfigConfig.Get("FamilyBillboardSet");
|
| | | pageCnt = int.Parse(config.Numerical1);
|
| | | queryPointNum = int.Parse(config.Numerical2);
|
| | |
|
| | | config = FuncConfigConfig.Get("FamilyEmblem");
|
| | | emblemWordCharacterLimitDict = JsonMapper.ToObject<Dictionary<string, int>>(config.Numerical1);
|
| | | }
|
| | |
|
| | |
|
| | |
| | | });
|
| | | }
|
| | |
|
| | | public int GetEmblemWordCharacterLimit()
|
| | | {
|
| | | string langId = Language.Id;
|
| | | if (!string.IsNullOrEmpty(langId) && emblemWordCharacterLimitDict.TryGetValue(langId, out int limit) && limit > 0)
|
| | | {
|
| | | return limit;
|
| | | }
|
| | |
|
| | | return DefaultEmblemWordCharacterLimit;
|
| | | }
|
| | |
|
| | | public string LimitEmblemWord(string emblemWord)
|
| | | {
|
| | | if (string.IsNullOrEmpty(emblemWord))
|
| | | {
|
| | | return string.Empty;
|
| | | }
|
| | |
|
| | | int limit = GetEmblemWordCharacterLimit();
|
| | | if (emblemWord.Length <= limit)
|
| | | {
|
| | | return emblemWord;
|
| | | }
|
| | |
|
| | | return emblemWord.Substring(0, limit);
|
| | | }
|
| | |
|
| | | bool CheckEmblemWord(string emblemWord)
|
| | | {
|
| | | if (string.IsNullOrEmpty(emblemWord))
|
| | | {
|
| | | return true;
|
| | | }
|
| | |
|
| | | int limit = GetEmblemWordCharacterLimit();
|
| | | return emblemWord.Length <= limit;
|
| | | }
|
| | |
|
| | |
|
| | |
|
| | |
|
| | |
| | | return;
|
| | | }
|
| | |
|
| | | if (emblemWord.Length > 1)
|
| | | if (!CheckEmblemWord(emblemWord))
|
| | | {
|
| | | //预制体输入框限制,不限任意字符都只能输入1个字
|
| | | return;
|
| | | }
|
| | |
|