/// <summary> /// Initializes a new instance of the <see cref="CommandOpenSpotify"/> class. /// Adds our command handlers for menu (commands must exist in the command table file) /// </summary> /// <param name="package">Owner package, not null.</param> private CommandOpenSpotify(Package package) { if (package == null) { throw new ArgumentNullException("package"); } SpotifyRemote spotifyRemotePackage = package as SpotifyRemote; m_spotifyManager = spotifyRemotePackage.GetSpotifyManager(); this.package = package; OleMenuCommandService commandService = this.ServiceProvider.GetService(typeof(IMenuCommandService)) as OleMenuCommandService; OleMenuCommand menuItem = null; if (commandService != null) { var menuCommandID = new CommandID(CommandSet, CommandId); menuItem = new OleMenuCommand(this.MenuItemCallback, menuCommandID); commandService.AddCommand(menuItem); } // Initialize TrackChangeAnimator. m_trackChangeAnimator = new TrackChangeAnimator(); m_trackChangeAnimator.Initialize(menuItem, m_currentTextlabel); m_spotifyManager.SpotifyClientTrackChange += SpotifyClientTrackChange; SettingsManager setManager = SettingsManager.GetSettingsManager(); setManager.SetTbButtonOpen(ref menuItem); setManager.SetTrackChangeAnimation(ref m_trackChangeAnimator); }
public void SetTrackChangeAnimation(ref TrackChangeAnimator trChangeAnimator) { m_trackChangeAnimator = trChangeAnimator; }