Example #1
0
        public void ApplyCharacterMap(string mapName)
        {
            var empnamesEnum = from emp in CharacterMapList
                               where emp.Name == mapName select emp;

            CurrentCharacterMaps.Add(empnamesEnum.FirstOrDefault());
        }
Example #2
0
        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;
                }
            }
        }
Example #3
0
 public void RemoveCharacterMap(string mapName)
 {
     CurrentCharacterMaps.Remove(CurrentCharacterMaps.First(cm => cm.Name == mapName));
 }