public SongLibraryWindow(ISongLibraryData songLibrary, IPlaylistData playlist) { InitializeComponent(); this.songLibrary = songLibrary; this.songUpload = new SongUpload(songLibrary); this.playlist = playlist; syncUI(); }
public ServerWindow(IPlaylistData playlist, Label hosting, ISongLibraryData songLibrary) { InitializeComponent(); this.portNum = 1000; hostName = Dns.GetHostName(); Server_IP_txtbox.Text = Dns.GetHostByName(hostName).AddressList[0].ToString(); Server_IP_txtbox.IsEnabled = false; this.playlist = playlist; this.songLibrary = songLibrary; this.hosting = hosting; }
public MainWindow() { InitializeComponent(); songLibrary = new SongLibraryData(); playlist = new PlaylistData(Song_List_Box, songLibrary); player = new Player(Media_Element, Song_Slider, Song_Time_Text, playlist, Album_Art, Song_Info); Play_Button.Click += player.Play_Click; Pause_Button.Click += player.Pause_Click; Stop_Button.Click += player.Stop_Click; Next_Button.Click += player.Next_Click; Previous_Button.Click += player.Previous_Click; }
private byte[] getCurrentSongByteArray(HttpListenerRequest r, ISongLibraryData songLibrary) { //Replace %20 with spaces string filePath = r.RawUrl.Substring(1); filePath = filePath.Replace("%20", " "); if (songLibrary.isFileInLibrary(filePath)) { return(File.ReadAllBytes(filePath)); } else { return(null); } }
public MediaServer(string prefix, ISongLibraryData songLibrary) { this.songLibrary = songLibrary; if (!HttpListener.IsSupported) { throw new NotSupportedException( "Needs Windows XP SP2, Server 2003 or later."); } if (prefix == null) { throw new ArgumentException("prefix"); } _listener.Prefixes.Add(prefix); _listener.Start(); }
public SongUpload(ISongLibraryData songLibrary) { this.songLibrary = songLibrary; }
public PlaylistData(ListBox songsListBox, ISongLibraryData library) { this.songsListBox = songsListBox; this.library = library; }