コード例 #1
0
        async Task setPreset(EqualizerPreset preset)
        {
            try
            {
                if (CurrentItem == null)
                {
                    Equalizer.Shared.CurrentPreset = preset;
                }
                else
                {
#if iPod
                    Equalizer.SaveEq(currentItem, preset);
                    if (CurrentItem == AudioPlayer.Shared.CurrentSong)
                    {
                        await Equalizer.Shared.ApplyEqualizer();
                    }
#else
                    Equalizer.Shared.ApplyEqualizer();
#endif
                }
                SetSourc();
                if (PresetSelected != null)
                {
                    PresetSelected(preset);
                }
#if PIONEER
                if (PPioneerManager.SharedPioneerManager.Connected)
                {
                    NavigationController.PopViewController(true);
                }
                else
#endif
                this.NavigationController.DismissViewController(true, null);
            }
            catch (Exception ex)
            {
                LogManager.Shared.Report(ex);
            }
            //TableView.ReloadData ();
        }