public BuffersWindow() { // language stuff needs to happen before InitializeComponent if (!settings.DontShowFirstTimeWizard) { // find out what language was used in the installer and use it for the first time wizard and everything else SetThreadToInstallationLanguage(); DisplayFirstTimeWizard(); } else { // if a language code is set in settings, set it on the thread if (settings.UILanguageCode != 0) { Thread.CurrentThread.CurrentUICulture = new System.Globalization.CultureInfo(settings.UILanguageCode); } } InitializeComponent(); InitializeTrayIcon(); Commands = new Dictionary <string, HotkeyCommandBase>(); playbackManager = new PlaybackManager(settings.OutputDeviceID, settings.UseDirectSound); playbackManager.OnError += new PlaybackManager.PlaybackManagerErrorHandler(StreamingError); SetupFormEventHandlers(); Buffers = new BufferListCollection(); _playQueueBuffer = new BufferList("Play Queue", false); Buffers.Add(_playQueueBuffer); Buffers.Add(new PlaylistContainerBufferList("Playlists", false)); spotify = SpotifyClient.Instance; _trayIconMenuManager = new TrayIconMenuManager(Buffers, Commands, _trayIcon); settings.PropertyChanged += new PropertyChangedEventHandler(OnUserSettingChange); }
public void CanCreateEmptyBufferListCollection() { BufferListCollection bcl = new BufferListCollection(); Assert.IsNotNull(bcl); Assert.IsInstanceOfType(bcl, typeof(BufferListCollection)); Assert.AreEqual(0, bcl.Count); }
private void OutputCurrentBufferItemGraphically(BufferListCollection buffers) { var currentList = buffers.CurrentList; string titleString = string.Format("{0} ({1}/{2})", currentList.Name, currentList.CurrentItemIndex + 1, currentList.Count); OutputMessageGraphically(titleString, currentList.CurrentItem.ToString()); }
public void CanInitializeCollectionWithBlankListInInitialization() { BufferListCollection bcl = new BufferListCollection { new BufferList("List 1") }; Assert.AreEqual(1, bcl.Count); }
public void OutputBufferListState(BufferListCollection buffers, NavigationDirection direction, bool interrupt = true) { if (UseScreenReader) { OutputCurrentBufferItemToScreenReader(buffers, direction, interrupt); } if (UseGraphicalOutput) { OutputCurrentBufferItemGraphically(buffers); } }
public void CanInitializeCollectionWithNonEmptyListInInitialization() { BufferList list = new BufferList { new BufferItem(), new BufferItem(), new BufferItem() }; BufferListCollection bcl = new BufferListCollection { list }; Assert.AreEqual(3, bcl[0].Count); }
private void OutputCurrentBufferItemToScreenReader(BufferListCollection buffers, NavigationDirection direction, bool interrupt) { string textToRead; if (direction == NavigationDirection.Left || direction == NavigationDirection.Right) { textToRead = buffers.CurrentList.ToString(); } else { textToRead = buffers.CurrentList.CurrentItem.ToString(); } OutputMessageToScreenReader(textToRead, interrupt); }
public NextBufferCommand(BufferListCollection buffersIn) { buffers = buffersIn; }
public ShowItemDetailsCommand(BufferListCollection buffersIn) { buffers = buffersIn; }
public PreviousBufferItemCommand(BufferListCollection buffersIn) { buffers = buffersIn; }
public LastBufferItemCommand(BufferListCollection buffersIn) { buffers = buffersIn; _output = OutputManager.Instance; }
public NewSearchCommand(BufferListCollection buffersIn) { buffers = buffersIn; _output = OutputManager.Instance; }
public DismissBufferCommand(BufferListCollection buffersIn) { buffers = buffersIn; _output = OutputManager.Instance; }
public RemoveFromPlaylistCommand(BufferListCollection buffers) { _buffers = buffers; }
public NextTrackCommand(BufferListCollection buffersIn, PlaybackManager pbManagerIn) { buffers = buffersIn; playbackManager = pbManagerIn; }
public ActivateBufferItemCommand(BufferListCollection buffersIn, PlaybackManager pbManagerIn) { buffers = buffersIn; playbackManager = pbManagerIn; _output = OutputManager.Instance; }
public AddToPlaylistCommand(BufferListCollection buffers) { _buffers = buffers; }
public AddToQueueCommand(BufferListCollection buffersIn) { this.buffers = buffersIn; _output = OutputManager.Instance; }
public TrayIconMenuManager(BufferListCollection buffers, Dictionary <string, Blindspot.Commands.HotkeyCommandBase> commands, NotifyIcon trayIcon) { _buffers = buffers; _commands = commands; _trayIcon = trayIcon; }