public void ApplyCharacterMap(string mapName) { var empnamesEnum = from emp in CharacterMapList where emp.Name == mapName select emp; CurrentCharacterMaps.Add(empnamesEnum.FirstOrDefault()); }
private void FindMapChar(int folder, int file, out int targetFolder, out int targetFile) { targetFolder = folder; targetFile = file; if (!CurrentCharacterMaps.Any()) { return; } //Search for the element starting from the last character map for (int i = CurrentCharacterMaps.Count - 1; i >= 0; i--) { var map = CurrentCharacterMaps[i].Maps.FirstOrDefault(cm => cm.Folder == folder && cm.File == file); if (map != null) { targetFolder = map.TargetFolder; targetFile = map.TargetFile; break; } } }
public void RemoveCharacterMap(string mapName) { CurrentCharacterMaps.Remove(CurrentCharacterMaps.First(cm => cm.Name == mapName)); }