コード例 #1
0
 public void AddFavoriteEntry(SfbFileSystemEntry fileSystemEntry)
 {
     if (!favoriteList.ContainsKey(fileSystemEntry.path))
     {
         favoriteList.Add(fileSystemEntry.path, SfbSavedLocationEntry.FromFileSystemEntry(SfbSavedLocationType.Favorite, fileSystemEntry));
     }
 }
コード例 #2
0
 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);
 }
コード例 #3
0
        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);
        }
コード例 #4
0
        public void AddRecentEntry(SfbFileSystemEntry fileSystemEntry)
        {
            RemoveOldestRecent();

            if (!recentList.ContainsKey(fileSystemEntry.path))
            {
                recentList.Add(fileSystemEntry.path, SfbSavedLocationEntry.FromFileSystemEntry(SfbSavedLocationType.Recent, fileSystemEntry));
            }
        }
コード例 #5
0
 public void AddFavoriteEntry(SfbSavedLocationEntry savedLocationEntry)
 {
     if (savedLocationEntry.locationType != SfbSavedLocationType.Favorite) {
         return;
     }
     if (!favoriteList.ContainsKey(savedLocationEntry.path)) {
         favoriteList.Add(savedLocationEntry.path, savedLocationEntry);
     }
 }
コード例 #6
0
 public void AddEntry(SfbSavedLocationEntry savedLocationEntry)
 {
     if (savedLocationEntry.locationType == SfbSavedLocationType.Recent) {
         AddRecentEntry(savedLocationEntry);
     }
     else {
         AddFavoriteEntry(savedLocationEntry);
     }
 }
コード例 #7
0
 public void RemoveEntry(SfbSavedLocationEntry savedLocationEntry)
 {
     if (savedLocationEntry.locationType == SfbSavedLocationType.Recent)
     {
         RemoveRecentEntry(savedLocationEntry.path);
     }
     else
     {
         RemoveFavoriteEntry(savedLocationEntry.path);
     }
 }
コード例 #8
0
 public void AddEntry(SfbSavedLocationEntry savedLocationEntry)
 {
     if (savedLocationEntry.locationType == SfbSavedLocationType.Recent)
     {
         AddRecentEntry(savedLocationEntry);
     }
     else
     {
         AddFavoriteEntry(savedLocationEntry);
     }
 }
コード例 #9
0
 public void AddFavoriteEntry(SfbSavedLocationEntry savedLocationEntry)
 {
     if (savedLocationEntry.locationType != SfbSavedLocationType.Favorite)
     {
         return;
     }
     if (!favoriteList.ContainsKey(savedLocationEntry.path))
     {
         favoriteList.Add(savedLocationEntry.path, savedLocationEntry);
     }
 }
コード例 #10
0
        public void AddRecentEntry(SfbSavedLocationEntry savedLocationEntry)
        {
            RemoveOldestRecent();

            if (savedLocationEntry.locationType != SfbSavedLocationType.Recent) {
                return;
            }
            if (!recentList.ContainsKey(savedLocationEntry.path)) {
                recentList.Add(savedLocationEntry.path, savedLocationEntry);
            }
        }
コード例 #11
0
        public void AddRecentEntry(SfbSavedLocationEntry savedLocationEntry)
        {
            RemoveOldestRecent();

            if (savedLocationEntry.locationType != SfbSavedLocationType.Recent)
            {
                return;
            }
            if (!recentList.ContainsKey(savedLocationEntry.path))
            {
                recentList.Add(savedLocationEntry.path, savedLocationEntry);
            }
        }
コード例 #12
0
        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);
                }
            }
        }
コード例 #13
0
 public void RemoveEntry(SfbSavedLocationEntry savedLocationEntry)
 {
     if (savedLocationEntry.locationType == SfbSavedLocationType.Recent) {
         RemoveRecentEntry(savedLocationEntry.path);
     }
     else {
         RemoveFavoriteEntry(savedLocationEntry.path);
     }
 }