Changeset 159
- Timestamp:
- 03/08/07 22:38:19 (1 year ago)
- Files:
-
- dmp/trunk/BadClient/Form1.Designer.cs (modified) (2 diffs)
- dmp/trunk/BadClient/Form1.cs (modified) (5 diffs)
- dmp/trunk/vlc.NET/IMusicPlayer.cs (added)
- dmp/trunk/vlc.NET/MusicPlayerControl.cs (added)
- dmp/trunk/vlc.NET/VLanControl.csproj (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
- Modified
- Copied
- Moved
dmp/trunk/BadClient/Form1.Designer.cs
r145 r159 38 38 this.splitContainer2 = new System.Windows.Forms.SplitContainer(); 39 39 this.button2 = new System.Windows.Forms.Button(); 40 this.vlcPlayer = new VLanControl. VlcUserControl();40 this.vlcPlayer = new VLanControl.MusicPlayerControl(); 41 41 this.splitContainer3 = new System.Windows.Forms.SplitContainer(); 42 42 this.panel1 = new System.Windows.Forms.Panel(); … … 354 354 //private VLanControl.VlcUserControl vlcController; 355 355 private System.Windows.Forms.Button button3; 356 private VLanControl. VlcUserControl vlcPlayer;356 private VLanControl.MusicPlayerControl vlcPlayer; 357 357 private System.Windows.Forms.DataGridViewTextBoxColumn colID; 358 358 private System.Windows.Forms.DataGridViewTextBoxColumn colLibID; dmp/trunk/BadClient/Form1.cs
r145 r159 11 11 public partial class Form1 : Form { 12 12 private Bridge myBridge; 13 private System.Collections.Hashtable playlistHash;14 13 public Form1() { 15 14 InitializeComponent(); 16 15 myBridge = new Bridge(); 17 playlistHash = new System.Collections.Hashtable();18 16 if( myBridge.isDatabaseUp() ) 19 17 lblStatus.Text = "Status: Bridge constructed and db up!"; … … 36 34 dgvSongs.Rows.Add(row.ItemArray); 37 35 int songId = int.Parse(row.ItemArray[0].ToString()); 38 if (!playlistHash.Contains(songId)) 39 { 40 String songURL = this.myBridge.getSongURL(songId); 41 playlistHash.Add(songId, vlcPlayer.AddToPlayList(songURL, songURL, null)); 42 } 36 String songURL = this.myBridge.getSongURL(songId); 37 vlcPlayer.AddSongToPlaylist(songId, songURL, songURL); 43 38 } 44 39 } … … 70 65 71 66 int songId = int.Parse(row.ItemArray[0].ToString()); 72 73 if (!playlistHash.Contains(songId)) 74 { 75 String songURL = this.myBridge.getSongURL(songId); 76 playlistHash.Add(songId, vlcPlayer.AddToPlayList(songURL, songURL, null)); 77 } 67 String songURL = this.myBridge.getSongURL(songId); 68 vlcPlayer.AddSongToPlaylist(songId, songURL, songURL); 78 69 } 79 70 } … … 90 81 if (vlcPlayer.IsPaused) 91 82 { 92 vlcPlayer. TogglePause();83 vlcPlayer.UnPause(); 93 84 this.button3.Text = "Pause"; 94 85 } 95 86 else if (vlcPlayer.IsPlaying) 96 87 { 97 vlcPlayer. TogglePause();88 vlcPlayer.Pause(); 98 89 this.button3.Text = "Play"; 99 90 } … … 121 112 //vlcPlayer.AddAndPlay(songURL,""); 122 113 123 int playlistId = (int)playlistHash[songId]; 124 Debug.WriteLine("Playing song with id " + playlistId.ToString()); 125 vlcPlayer.PlayItem(playlistId); 114 115 vlcPlayer.PlaySong(songId); 126 116 this.button3.Text = "Pause"; 127 117 } dmp/trunk/vlc.NET/VLanControl.csproj
r98 r159 56 56 </Compile> 57 57 <Compile Include="IPlayer.cs" /> 58 <Compile Include="MusicPlayer.cs" /> 59 <Compile Include="MusicPlayerControl.cs"> 60 <SubType>UserControl</SubType> 61 </Compile> 58 62 <Compile Include="NativeLibVlc.cs" /> 59 63 <Compile Include="VlcUserControl.cs">
