Пример #1
0
        public void Confirm()
        {
            Config.ThreadNum((ThreadNum + 1).ToString());
            Config.SearchNum(((SearchNum + 1) * 10).ToString());
            Config.OnlyM4a(OnlyM4a.ToString());
            Config.AddExplicitTag(AddExplicitTag.ToString());
            Config.SaveCovers(SaveCovers.ToString());
            Config.IncludeEP(IncludeEPSingle.ToString());
            Config.ToChinese(ToChinese.ToString());
            Config.CheckExist(CheckExist.ToString());
            Config.ArtistBeforeTitle(ArtistBeforeTitle.ToString());
            Config.AddHyphen(AddHyphen.ToString());
            Config.AddYear(AddYearIndex);
            Config.Quality(QualityList[SelectQualityIndex].ToLower());
            Config.Resolution(ResolutionList[SelectResolutionIndex]);
            Config.OutputDir(OutputDir);
            Config.UseTrackNumber(UseTrackNumber.ToString());
            Config.MaxFileName(CheckMaxName(MaxFileName));
            Config.MaxDirName(CheckMaxName(MaxDirName));
            Config.AddAlbumIDBeforeFolder(AddAlbumIDBeforeFolder.ToString());

            TidalTool.SetSearchMaxNum(int.Parse(Config.SearchNum()));
            ThreadTool.SetThreadNum(ThreadNum + 1);
            RequestClose();
        }
Пример #2
0
        public void Confim()
        {
            Config.ThreadNum(ThreadNum.ToString());
            Config.SearchNum(SearchNum.ToString());
            Config.OnlyM4a(OnlyM4a.ToString());
            Config.AddExplicitTag(AddExplicitTag.ToString());
            Config.SaveCovers(SaveCovers.ToString());
            Config.IncludeEP(IncludeEPSingle.ToString());
            Config.CheckExist(CheckExist.ToString());
            Config.ArtistBeforeTitle(ArtistBeforeTitle.ToString());
            Config.AddHyphen(AddHyphen.ToString());
            Config.AddYear(AddYearIndex);
            Config.OutputDir(OutputDir);
            Config.UseTrackNumber(UseTrackNumber.ToString());
            Config.MaxFileName(MaxFileName.ToString());
            Config.MaxDirName(MaxDirName.ToString());
            Config.AddAlbumIDBeforeFolder(AddAlbumIDBeforeFolder.ToString());
            Config.ThemeIndex(ThemeIndex.ToString());

            TidalTool.SetSearchMaxNum(int.Parse(Config.SearchNum()));
            ThreadTool.SetThreadNum(ThreadNum);
            ChangeTheme(ThemeIndex);

            if (AccessToken.IsNotBlank())
            {
                if (TidalTool.loginByAccesstoken(AccessToken))
                {
                    Config.Accesstoken(AccessToken);
                }
                else
                {
                    Growl.Warning("Accesstoken is not valid!", "SettingsMsg");
                    return;
                }
            }
            Growl.Success("Refresh settings success!", "SettingsMsg");
        }