示例#1
0
        public async Task <SongsList> FetchAll(GlobalVar.SongMode mode)
        {
            SongsList list = new SongsList();

            if (mode == GlobalVar.SongMode.Audica)
            {
                return(list = await DownloadSongList(GlobalVar.AudicaSongAPI));
            }

            if (mode == GlobalVar.SongMode.SynthRiders)
            {
                return(list = await DownloadSongList(GlobalVar.SRSongAPI));
            }

            return(list);
        }
示例#2
0
 private string GenSongName(string fileName, GlobalVar.SongMode mode)
 {
     return("");
 }
示例#3
0
        public void GetSongFolder(bool overwrite = false, GlobalVar.SongMode mode = GlobalVar.SongMode.Audica)
        {
            //If we already have the folder, and the user doesn't want to overwrite that value, just return.
            if (overwrite == false && Properties.Settings.Default.CustomSongFolder != null)
            {
                return;
            }

            if (mode == GlobalVar.SongMode.Audica)
            {
                //Attempt to automatically find song folder.
                string installFolderSteam = GetSteamLocation(GlobalVar.AudicaSteamAppId);
                if (installFolderSteam != null)
                {
                    SetSongFolder(installFolderSteam);
                    return;
                }

                string installFolderOculus = GetValidOculusLocation(GlobalVar.AudicaOculusSubFolderPath, GlobalVar.AudicaExe);
                if (installFolderOculus != null)
                {
                    SetSongFolder(installFolderOculus);
                    return;
                }

                //Let the user manually select it.
                string installFolderUser = FolderSelectionDialog();
                if (installFolderUser != null)
                {
                    SetSongFolder(installFolderUser);
                    return;
                }

                void SetSongFolder(string installFolder)
                {
                    Properties.Settings.Default.CustomSongFolder = installFolder + GlobalVar.AudicaAddonPath;
                    Properties.Settings.Default.Save();
                }
            }

            if (mode == GlobalVar.SongMode.SynthRiders)
            {
                //Attempt to automatically find song folder.
                string installFolderSteam = GetSteamLocation(GlobalVar.SRSteamAppId);
                if (installFolderSteam != null)
                {
                    SetSongFolder(installFolderSteam);
                    return;
                }

                string installFolderOculus = GetValidOculusLocation(GlobalVar.SROculusSubFolderPath, GlobalVar.SRExe);
                if (installFolderOculus != null)
                {
                    SetSongFolder(installFolderOculus);
                    return;
                }

                //Let the user manually select it.
                string installFolderUser = FolderSelectionDialog();
                if (installFolderUser != null)
                {
                    SetSongFolder(installFolderUser);
                    return;
                }

                void SetSongFolder(string installFolder)
                {
                    Properties.Settings.Default.CustomSongFolder = installFolder + GlobalVar.SRAddonPath;
                    Properties.Settings.Default.Save();
                }
            }


            return;
        }