Develop and Download Open Source Software

Browse Subversion Repository

Diff of /NNDDv2/trunk/src/org/mineap/nndd/view/VideoInfoView.as

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 711 by mineap, Sat Dec 10 08:49:25 2011 UTC revision 786 by mineap, Sat Apr 7 13:43:13 2012 UTC
# Line 1521  public function resetPlayList():void{ Line 1521  public function resetPlayList():void{
1521   * @see https://github.com/edvakf/NNDDMOD/commit/6984ba8919727a98c249e1bc8a4848705de27df5   * @see https://github.com/edvakf/NNDDMOD/commit/6984ba8919727a98c249e1bc8a4848705de27df5
1522   */   */
1523  public function shufflePlayList():void{  public function shufflePlayList():void{
1524            
1525            var selectedObject:Object = null;
1526            if (dataGrid_playList != null)
1527            {
1528                    selectedObject = dataGrid_playList.selectedItem;
1529            }
1530            
1531          var tempArrayCollection:ArrayCollection = new ArrayCollection();          var tempArrayCollection:ArrayCollection = new ArrayCollection();
1532          for each(var object:Object in playListProvider){          for each(var object:Object in playListProvider){
1533                  tempArrayCollection.addItem(object);                  tempArrayCollection.addItem(object);
# Line 1536  public function shufflePlayList():void{ Line 1543  public function shufflePlayList():void{
1543                  tempArrayCollection.setItemAt( object, j );                  tempArrayCollection.setItemAt( object, j );
1544          }          }
1545          playListProvider = tempArrayCollection;          playListProvider = tempArrayCollection;
1546            
1547            if (dataGrid_playList != null && selectedObject != null)
1548            {
1549                    dataGrid_playList.selectedItem = selectedObject;
1550            }
1551  }  }
1552    
1553  /**  /**
# Line 1850  private function ownerTextLinkClicked(ev Line 1862  private function ownerTextLinkClicked(ev
1862  private function playListReverseButtonClicked(event:Event):void{  private function playListReverseButtonClicked(event:Event):void{
1863          var tempArrayCollection:ArrayCollection = new ArrayCollection();          var tempArrayCollection:ArrayCollection = new ArrayCollection();
1864                    
1865            var newIndex:int = -1;
1866            if (dataGrid_playList != null)
1867            {
1868                    var selectedIndex:int = dataGrid_playList.selectedIndex;
1869                    if (selectedIndex != -1)
1870                    {
1871                            newIndex = (playListProvider.length-1) - selectedIndex;
1872                    }
1873            }
1874            
1875          for each(var object:Object in playListProvider){          for each(var object:Object in playListProvider){
1876                  tempArrayCollection.addItemAt(object, 0);                  tempArrayCollection.addItemAt(object, 0);
1877          }          }
1878                    
1879          playListProvider = tempArrayCollection;          playListProvider = tempArrayCollection;
1880            
1881            if (dataGrid_playList != null && newIndex != -1)
1882            {
1883                    dataGrid_playList.selectedIndex = newIndex;
1884            }
1885  }  }
1886    
1887  public function get playList():PlayList{  public function get playList():PlayList{

Legend:
Removed from v.711  
changed lines
  Added in v.786

Back to OSDN">Back to OSDN
ViewVC Help
Powered by ViewVC 1.1.26