示例#1
0
        public int Initialise(FileBrowserEntry separator)
        {
            _entrySeparator = separator;

            // populate the drive list
            _drives.Clear();
            _localFileSystemEntries.Clear();
            _userFolders.Clear();
            foreach (var driveInfo in DriveInfo.GetDrives().Where(d => d.IsReady))
            {
                _drives.Add(new FileBrowserEntry
                {
                    Path      = driveInfo.RootDirectory.FullName,
                    EntryType = FileBrowserEntryType.Directory | FileBrowserEntryType.Drive | FileBrowserEntryType.Special,
                    Name      = string.IsNullOrWhiteSpace(driveInfo.VolumeLabel) ? driveInfo.Name : string.Format("{1} ({0})", driveInfo.Name, driveInfo.VolumeLabel)
                });
            }

            return(EnterPath(_drives.First().Path));
        }
示例#2
0
        public int Initialise(FileBrowserEntry separator)
        {
            _entrySeparator = separator;

            //setup soundcloud connection
            _sconnector = new SoundCloudConnector();

            _scclient = _sconnector.UnauthorizedConnect(clientID, clientSecret);

            //Get tracks
            Task.Run(() =>
            {
                lock (_lock )
                {
                    //_scCategories = _scclient.Explore.GetExploreCategories().ToList();
                    _scCategories = GetSoundcloudCategories();
                    ShowCategories();
                }
            });

            return(0);
        }
示例#3
0
        public DirectoryBrowser(SceneManager parentSceneManager, ChooseSongScene parentScene)
        {
            _parentManager        = parentSceneManager;
            _parentScene          = parentScene;
            _fileSystemCollection = new List <IFileSystem>();
            _fileSystemEntries    = new List <FileBrowserEntry>();

            _unselectedFont = _parentManager.GameFontLibrary.GetFirstOrDefault(GameFontType.Body);
            _selectedFont   = _parentManager.GameFontLibrary.GetFirstOrDefault("selected");
            _searchFont     = _parentManager.GameFontLibrary.GetFirstOrDefault(GameFontType.Heading);

            _qfontDrawing = new QFontDrawing();

            Resize(_parentManager.Width, _parentManager.Height);

            EntrySeparator = new FileBrowserEntry
            {
                Path      = "./",
                Name      = "--------------------",
                EntryType = FileBrowserEntryType.Separator
            };
        }
示例#4
0
 public int Initialise(FileBrowserEntry separator)
 {
     BuildRecentSongList();
     return(0);
 }