/// <summary> /// チャット内容からChatKbnKindを取得する /// </summary> /// <param name="iCl">チャットライン</param> /// <returns>チャット区分</returns> private ChatKbnKind getChatKbnFromChatline(EliteAPI.ChatEntry iCl, out List <string> oArgs) { oArgs = new List <string>(); foreach (KeyValuePair <ChatKbnKind, string> v in dictionaryChat) { string searchStr = v.Value; if (MiscTool.IsRegexString(iCl.Text, searchStr)) { oArgs = MiscTool.GetRegexString(iCl.Text, searchStr); return(v.Key); } } return(ChatKbnKind.Unknown); }
/// <summary> /// エミネンスを取得する /// </summary> /// <param name="iSearchString">エミネンス名</param> /// <returns>装備の一覧</returns> public List <EminenceDBEminenceModel> SelectEminence(string iSearchString) { logger.Trace("SearchString={0}", iSearchString); List <EminenceDBEminenceModel> ret = new List <EminenceDBEminenceModel>(); EminenceDBModel eminenceDB = getEminenceDB(); if (iSearchString == string.Empty) { ret = eminenceDB.Eminences; } else { foreach (EminenceDBEminenceModel eminences in eminenceDB.Eminences) { if (MiscTool.IsRegexString(eminences.EminenceName, iSearchString)) { ret.Add(eminences); } } } return(ret); }
/// <summary> /// 餌を取得する /// </summary> /// <param name="iSearchString">餌名称(正規表現)</param> /// <returns>餌の一覧</returns> public List <BaitDBBaitModel> SelectBait(string iSearchString) { logger.Trace("SearchString={0}", iSearchString); List <BaitDBBaitModel> ret = new List <BaitDBBaitModel>(); BaitDBModel Baitdb = getBaitDB(); if (iSearchString == string.Empty) { ret = Baitdb.Bait; } else { foreach (BaitDBBaitModel Bait in Baitdb.Bait) { if (MiscTool.IsRegexString(Bait.BaitName, iSearchString)) { ret.Add(Bait); } } } ret.Sort(BaitDBModel.SortTypeName); return(ret); }
/// <summary> /// 竿を取得する /// </summary> /// <param name="iSearchString">竿名称(正規表現)</param> /// <returns>竿の一覧</returns> public List <RodDBRodModel> SelectRod(string iSearchString) { logger.Trace("SearchString={0}", iSearchString); List <RodDBRodModel> ret = new List <RodDBRodModel>(); RodDBModel roddb = getRodDB(); if (iSearchString == string.Empty) { ret = roddb.Rod; } else { foreach (RodDBRodModel rod in roddb.Rod) { if (MiscTool.IsRegexString(rod.RodName, iSearchString)) { ret.Add(rod); } } } ret.Sort(RodDBModel.SortTypeName); return(ret); }
/// <summary> /// 装備を取得する /// </summary> /// <param name="iSearchString">餌名称(正規表現)</param> /// <returns>装備の一覧</returns> public List <GearDBGearModel> SelectGear(string iSearchString, GearDBPositionKind iPosition) { logger.Trace("SearchString={0}", iSearchString); List <GearDBGearModel> ret = new List <GearDBGearModel>(); GearDBModel gearDB = getGearDB(); if (iSearchString == string.Empty && iPosition == GearDBPositionKind.Unknown) { ret = gearDB.Gear; } else { foreach (GearDBGearModel gear in gearDB.Gear) { if ((iSearchString != string.Empty && iPosition != GearDBPositionKind.Unknown && MiscTool.IsRegexString(gear.GearName, iSearchString) && gear.Position == iPosition) || (iSearchString != string.Empty && iPosition == GearDBPositionKind.Unknown && MiscTool.IsRegexString(gear.GearName, iSearchString)) || (iSearchString == string.Empty && iPosition != GearDBPositionKind.Unknown && gear.Position == iPosition)) { ret.Add(gear); } } } ret.Sort(GearDBModel.SortTypeName); return(ret); }