コード例 #1
0
        public SongLibraryWindow(ISongLibraryData songLibrary, IPlaylistData playlist)
        {
            InitializeComponent();

            this.songLibrary = songLibrary;
            this.songUpload  = new SongUpload(songLibrary);
            this.playlist    = playlist;

            syncUI();
        }
コード例 #2
0
 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;
 }
コード例 #3
0
        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;
        }
コード例 #4
0
        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);
            }
        }
コード例 #5
0
        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();
        }
コード例 #6
0
ファイル: SongUpload.cs プロジェクト: LHGSSH/JukeboxJam
 public SongUpload(ISongLibraryData songLibrary)
 {
     this.songLibrary = songLibrary;
 }
コード例 #7
0
ファイル: PlaylistData.cs プロジェクト: LHGSSH/JukeboxJam
 public PlaylistData(ListBox songsListBox, ISongLibraryData library)
 {
     this.songsListBox = songsListBox;
     this.library      = library;
 }