public void AddFavoriteEntry(SfbFileSystemEntry fileSystemEntry)
 {
     if (!favoriteList.ContainsKey(fileSystemEntry.path))
     {
         favoriteList.Add(fileSystemEntry.path, SfbSavedLocationEntry.FromFileSystemEntry(SfbSavedLocationType.Favorite, fileSystemEntry));
     }
 }
 private void CreateWrapper(SfbSavedLocationEntry entry)
 {
     var wrapper = SfbEntryWrapper.CreateEmpty((entryPrefabs.First(a => a.type == entry.type.Convert()).transform as RectTransform).rect.height);
     wrapper.fileSystemEntry = entry;
     wrapper.rectTransform.SetParent(content, false);
     wrapper.parent = this;
     wrappers.Add(wrapper);
 }
        private void CreateWrapper(SfbSavedLocationEntry entry)
        {
            var wrapper = SfbEntryWrapper.CreateEmpty((entryPrefabs.First(a => a.type == entry.type.Convert()).transform as RectTransform).rect.height);

            wrapper.fileSystemEntry = entry;
            wrapper.rectTransform.SetParent(content, false);
            wrapper.parent = this;
            wrappers.Add(wrapper);
        }
        public void AddRecentEntry(SfbFileSystemEntry fileSystemEntry)
        {
            RemoveOldestRecent();

            if (!recentList.ContainsKey(fileSystemEntry.path))
            {
                recentList.Add(fileSystemEntry.path, SfbSavedLocationEntry.FromFileSystemEntry(SfbSavedLocationType.Recent, fileSystemEntry));
            }
        }
 public void AddFavoriteEntry(SfbSavedLocationEntry savedLocationEntry)
 {
     if (savedLocationEntry.locationType != SfbSavedLocationType.Favorite) {
         return;
     }
     if (!favoriteList.ContainsKey(savedLocationEntry.path)) {
         favoriteList.Add(savedLocationEntry.path, savedLocationEntry);
     }
 }
 public void AddEntry(SfbSavedLocationEntry savedLocationEntry)
 {
     if (savedLocationEntry.locationType == SfbSavedLocationType.Recent) {
         AddRecentEntry(savedLocationEntry);
     }
     else {
         AddFavoriteEntry(savedLocationEntry);
     }
 }
 public void RemoveEntry(SfbSavedLocationEntry savedLocationEntry)
 {
     if (savedLocationEntry.locationType == SfbSavedLocationType.Recent)
     {
         RemoveRecentEntry(savedLocationEntry.path);
     }
     else
     {
         RemoveFavoriteEntry(savedLocationEntry.path);
     }
 }
 public void AddEntry(SfbSavedLocationEntry savedLocationEntry)
 {
     if (savedLocationEntry.locationType == SfbSavedLocationType.Recent)
     {
         AddRecentEntry(savedLocationEntry);
     }
     else
     {
         AddFavoriteEntry(savedLocationEntry);
     }
 }
 public void AddFavoriteEntry(SfbSavedLocationEntry savedLocationEntry)
 {
     if (savedLocationEntry.locationType != SfbSavedLocationType.Favorite)
     {
         return;
     }
     if (!favoriteList.ContainsKey(savedLocationEntry.path))
     {
         favoriteList.Add(savedLocationEntry.path, savedLocationEntry);
     }
 }
        public void AddRecentEntry(SfbSavedLocationEntry savedLocationEntry)
        {
            RemoveOldestRecent();

            if (savedLocationEntry.locationType != SfbSavedLocationType.Recent) {
                return;
            }
            if (!recentList.ContainsKey(savedLocationEntry.path)) {
                recentList.Add(savedLocationEntry.path, savedLocationEntry);
            }
        }
        public void AddRecentEntry(SfbSavedLocationEntry savedLocationEntry)
        {
            RemoveOldestRecent();

            if (savedLocationEntry.locationType != SfbSavedLocationType.Recent)
            {
                return;
            }
            if (!recentList.ContainsKey(savedLocationEntry.path))
            {
                recentList.Add(savedLocationEntry.path, savedLocationEntry);
            }
        }
        public void ParseSavedData(string data)
        {
            data = data.Replace("\n", "");

            foreach (Match match in Regex.Matches(data, "(?<=SavedLocationEntry {)(.*?)(?=})"))
            {
                SfbSavedLocationEntry entry = SfbSavedLocationEntry.FromSavedData(match.Groups[1].Value);
                if (entry != null)
                {
                    AddEntry(entry);
                }
            }
        }
 public void RemoveEntry(SfbSavedLocationEntry savedLocationEntry)
 {
     if (savedLocationEntry.locationType == SfbSavedLocationType.Recent) {
         RemoveRecentEntry(savedLocationEntry.path);
     }
     else {
         RemoveFavoriteEntry(savedLocationEntry.path);
     }
 }