Beispiel #1
0
 private static void ExecuteSongBrowserAction(SongBrowserAction action)
 {
     //var _songBrowserUI = SongBrowser.SongBrowserApplication.Instance.GetField<SongBrowser.UI.SongBrowserUI, SongBrowser.SongBrowserApplication>("_songBrowserUI");
     //if (_songBrowserUI)
     //{
     //    if (action.HasFlag(SongBrowserAction.ResetFilter))
     //    {
     //        // if filter mode is set, clear it
     //        if (_songBrowserUI.Model.Settings.filterMode != SongBrowser.DataAccess.SongFilterMode.None)
     //        {
     //            _songBrowserUI.InvokePrivateMethod("OnClearButtonClickEvent");
     //        }
     //    }
     //}
 }
Beispiel #2
0
        private static void ExecuteSongBrowserAction(SongBrowserAction action)
        {
            var _songBrowserUI = SongBrowserApplication.Instance.GetPrivateField <SongBrowserPlugin.UI.SongBrowserUI>("_songBrowserUI");

            if (_songBrowserUI)
            {
                if (action.HasFlag(SongBrowserAction.ResetFilter))
                {
                    _songBrowserUI.Model.Settings.filterMode = SongFilterMode.None;
                    if (!action.HasFlag(SongBrowserAction.Refresh))
                    {
                        action |= SongBrowserAction.Refresh;
                    }
                }
                if (action.HasFlag(SongBrowserAction.Refresh))
                {
                    _songBrowserUI.UpdateSongList();
                    _songBrowserUI.RefreshSongList();
                }
            }
        }