예제 #1
0
        public void addFile(List <string> file_path, DetectedFile file)
        {
            foreach (FileTreeViewItem item in _children)
            {
                if (file_path[0] == item.Name)
                {
                    file_path.RemoveAt(0);
                    item.addFile(file_path, file);
                    return;
                }
            }

            FileTreeViewItem new_item = new FileTreeViewItem(this);

            if (file_path.Count > 0)
            {
                new_item.Name = file_path[0];
                if (file_path.Count > 1)
                {
                    file_path.RemoveAt(0);
                    new_item.addFile(file_path, file);
                }
                else
                {
                    new_item.file = file;
                }
                _children.Add(new_item);
            }
        }
예제 #2
0
        public ArchiveID(GameID game, DetectedFile first_file)
        {
            this.Game = game;
            this.Owner = first_file.owner;
            this.Type = first_file.Type;
            DetectedLocationPathHolder loc = first_file.OriginalLocation;

            OriginalLocation = loc.FullDirPath;
            OriginalEV = loc.EV;
            OriginalRelativePath = loc.Path;
        }
예제 #3
0
        public ArchiveID(GameID game, DetectedFile first_file)
        {
            this.Game  = game;
            this.Owner = first_file.owner;
            this.Type  = first_file.Type;
            DetectedLocationPathHolder loc = first_file.OriginalLocation;


            OriginalLocation     = loc.FullDirPath;
            OriginalEV           = loc.EV;
            OriginalRelativePath = loc.Path;
        }
예제 #4
0
        public void addFile(List<string> file_path, DetectedFile file)
        {
            foreach (FileTreeViewItem item in _children) {
                if (file_path[0] == item.Name) {
                    file_path.RemoveAt(0);
                    item.addFile(file_path, file);
                    return;
                }
            }

            FileTreeViewItem new_item = new FileTreeViewItem(this);

            if (file_path.Count > 0) {
                new_item.Name = file_path[0];
                if (file_path.Count > 1) {
                    file_path.RemoveAt(0);
                    new_item.addFile(file_path, file);
                } else {
                    new_item.file = file;
                }
                _children.Add(new_item);
            }
        }
예제 #5
0
        public static Archive GetArchive(GameID id, DetectedFile file)
        {
            ArchiveID find_me = new ArchiveID(id, file);

            return(model.get(find_me));
        }