示例#1
0
文件: TransportBar.cs 项目: daisy/obi
 /// <summary>
 /// Update the playlist with the selection.
 /// </summary>
 private void ProjectPanel_SelectionChanged(ProjectPanel sender, EventArgs e)
 {
     mPlaylist.Clear();
     foreach (Selectable s in ProjectPanel.Selected)
     {
         if (s.Node != null)
         {
             ChannelsProperty chprop = (ChannelsProperty)s.Node.getProperty(typeof(ChannelsProperty));
             if (chprop != null)
             {
                 ManagedAudioMedia media = chprop.getMedia(ProjectPanel.Project.AudioChannel) as ManagedAudioMedia;
                 if (media != null)
                 {
                     mPlaylist.Add(media.getMediaData());
                 }
             }
         }
     }
     UpdateButtonsState();
 }