Changeset 175
- Timestamp:
- 03/09/07 08:24:35 (2 years ago)
- Files:
-
- dmp/trunk/Bridge/Bridge.cs (modified) (2 diffs)
- dmp/trunk/client/wpfclient/main_window.xaml (modified) (2 diffs)
- dmp/trunk/client/wpfclient/main_window.xaml.cs (modified) (4 diffs)
Legend:
- Unmodified
- Added
- Removed
- Modified
- Copied
- Moved
dmp/trunk/Bridge/Bridge.cs
r173 r175 381 381 /// <param name="libraryId">The library ID to disconnect from</param> 382 382 /// <returns></returns> 383 p ublicbool RemoveServerConnection(int libraryId) {383 private bool RemoveServerConnection(int libraryId) { 384 384 bool containsKey; 385 385 lock (this.clientList) { … … 426 426 lock (this.serverNameToIdList) { 427 427 libraryId = this.serverNameToIdList[zeroconfName]; 428 serverNameToIdList.Remove(zeroconfName); 428 429 } 429 430 bool result = this.RemoveServerConnection(libraryId); dmp/trunk/client/wpfclient/main_window.xaml
r172 r175 53 53 54 54 <StackPanel Orientation="Horizontal" Grid.Row="0" Grid.ColumnSpan="3" Grid.Column="1" HorizontalAlignment="Center"> 55 <Button Template="{StaticResource BackIcon}" Margin="5" >55 <Button Template="{StaticResource BackIcon}" Margin="5" Click="PrevButtonOnClick"> 56 56 <Button.BitmapEffect> 57 57 <OuterGlowBitmapEffect GlowColor="#FF000000" GlowSize="2" Opacity="0.9"/> … … 63 63 </Button.BitmapEffect> 64 64 </Button> 65 <Button Template="{StaticResource NextIcon}" Margin="5" >65 <Button Template="{StaticResource NextIcon}" Margin="5" Click="NextButtonOnClick"> 66 66 <Button.BitmapEffect> 67 67 <OuterGlowBitmapEffect GlowColor="#FF000000" GlowSize="2" Opacity="0.9"/> dmp/trunk/client/wpfclient/main_window.xaml.cs
r172 r175 260 260 } 261 261 262 VLControl.ClearPlayList(); 263 264 foreach(DataRow dr in newDT.Rows){ 265 int songId = (int)((long)dr["id"]); 266 string url = myBridge.getSongURL(songId); 267 VLControl.AddSongToPlaylist(songId, url, url); 268 } 269 262 270 songView.SongDT = newDT; 263 271 } … … 271 279 serverAddQueue.Enqueue(new ServerStatus(status.ServerName, status.Connected)); 272 280 } 273 Thread newThread = new Thread(TServerClick); 274 newThread.Start(); 281 //Thread newThread = new Thread(TServerClick); 282 //newThread.Start(); 283 284 TServerClick(); 275 285 } 276 286 … … 288 298 } 289 299 300 int playingId = -2; 301 290 302 void PlayButtonOnClick(object sender, RoutedEventArgs args) { 291 292 if(VLControl.IsPlaying){ 293 VLControl.Pause(); 294 PlayButton.Template = (ControlTemplate)this.FindResource("PlayIcon"); 295 } 296 else if(VLControl.IsPaused){ 297 VLControl.UnPause(); 298 299 PlayButton.Template = (ControlTemplate)this.FindResource("PauseIcon"); 303 if(songView.HighlightedRow.SongId == playingId){ 304 if(VLControl.IsPlaying){ 305 VLControl.Pause(); 306 PlayButton.Template = (ControlTemplate)this.FindResource("PlayIcon"); 307 308 } 309 else if(VLControl.IsPaused){ 310 VLControl.UnPause(); 311 312 PlayButton.Template = (ControlTemplate)this.FindResource("PauseIcon"); 313 } 300 314 } 301 315 else { … … 303 317 string songURL = myBridge.getSongURL(songId); 304 318 305 VLControl.AddSongToPlaylist(songId, songURL, songURL);319 //VLControl.AddSongToPlaylist(songId, songURL, songURL); 306 320 VLControl.PlaySong(songId); 321 playingId = songId; 307 322 308 323 PlayButton.Template = (ControlTemplate)this.FindResource("PauseIcon"); 309 324 } 325 } 326 327 void NextButtonOnClick(object sender, RoutedEventArgs args) { 328 VLControl.NextPlaylistTrack(); 329 } 330 331 void PrevButtonOnClick(object sender, RoutedEventArgs args) { 332 VLControl.PrevPlaylistTrack(); 310 333 } 311 334
