Changeset 7429


Ignore:
Timestamp:
12/08/17 08:28:51 (17 months ago)
Author:
rohit_tandon
Message:

-Improvement in begin and end mark selection of Assign note dialog box when player is active.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/Obi/Obi/ProjectView/ProjectView.cs

    r7428 r7429  
    4242        private double m_ZoomWaveformIncrementFactor; 
    4343        private bool m_SaveZoomWaveformZoomLevel; 
    44         private double m_TotalCursorTime; // use to calulate time between two marks. 
    45         private PhraseNode m_BeginMarkPhraseWhenPlayerIsActive; // use to get begin mark phrase when player is active for time elapsed calculations.        
     44        private double m_TotalCursorTime; // use to calulate time between two marks.    
    4645                   
    4746     
     
    52725271        public void MarkBeginNote() 
    52735272        { 
     5273            if (this.TransportBar.IsPlayerActive && this.Selection != null) 
     5274            { 
     5275                this.Selection = new AudioSelection(this.TransportBar.CurrentPlaylist.CurrentPhrase, mContentView, new AudioRange(this.TransportBar.CurrentPlaylist.CurrentTimeInAsset)); 
     5276            } 
    52745277            mContentView.BeginSpecialNode = Selection.EmptyNodeForSelection; //@AssociateNode 
    52755278 
    52765279            m_TotalCursorTime = 0; 
    5277             m_BeginMarkPhraseWhenPlayerIsActive = null; 
    5278             if (this.Selection != null && this.Selection is AudioSelection && ((AudioSelection)this.Selection).AudioRange != null && !TransportBar.IsPlayerActive) 
     5280            
     5281            if (this.Selection != null && this.Selection is AudioSelection && ((AudioSelection)this.Selection).AudioRange != null) 
    52795282            { 
    52805283                if (((AudioSelection)this.Selection).AudioRange.HasCursor) 
     
    52885291                m_TotalCursorTime = this.Selection.Node.Duration - m_TotalCursorTime; 
    52895292            } 
    5290             else if (this.Selection != null && this.Selection.Node != null && !TransportBar.IsPlayerActive) 
     5293            else if (this.Selection != null && this.Selection.Node != null) 
    52915294            { 
    52925295                m_TotalCursorTime = this.Selection.Node.Duration; 
    52935296            } 
    5294             else if (this.TransportBar.IsPlayerActive) 
    5295             { 
    5296                 m_TotalCursorTime = TransportBar.CurrentPlaylist.CurrentPhrase.Duration - TransportBar.CurrentPlaylist.CurrentTimeInAsset; 
    5297                 m_BeginMarkPhraseWhenPlayerIsActive = TransportBar.CurrentPlaylist.CurrentPhrase; 
    5298             } 
     5297            //else if (this.TransportBar.IsPlayerActive) 
     5298            //{ 
     5299            //    m_TotalCursorTime = TransportBar.CurrentPlaylist.CurrentPhrase.Duration - TransportBar.CurrentPlaylist.CurrentTimeInAsset; 
     5300            //    m_BeginMarkPhraseWhenPlayerIsActive = TransportBar.CurrentPlaylist.CurrentPhrase; 
     5301            //} 
    52995302             
    53005303           TransportBar.PlayAudioClue(TransportBar.AudioCluesSelection.SelectionBegin); 
     
    53045307        { 
    53055308            if (mContentView.BeginSpecialNode == null) return; 
     5309 
     5310            if (this.TransportBar.IsPlayerActive && this.Selection != null) 
     5311            { 
     5312                
     5313                this.Selection = new AudioSelection(this.TransportBar.CurrentPlaylist.CurrentPhrase, mContentView, new AudioRange(this.TransportBar.CurrentPlaylist.CurrentTimeInAsset)); 
     5314            } 
     5315 
    53065316            mContentView.EndSpecialNode = Selection.EmptyNodeForSelection; //@AssociateNode 
    53075317 
     5318            
    53085319          
    5309             if (this.Selection != null && this.Selection is AudioSelection && ((AudioSelection)this.Selection).AudioRange != null && !TransportBar.IsPlayerActive) 
     5320            if (this.Selection != null && this.Selection is AudioSelection && ((AudioSelection)this.Selection).AudioRange != null) 
    53105321            { 
    53115322                if (((AudioSelection)this.Selection).AudioRange.HasCursor) 
     
    53315342                
    53325343            } 
    5333             else if (this.Selection != null && this.Selection.Node != null && !TransportBar.IsPlayerActive) 
     5344            else if (this.Selection != null && this.Selection.Node != null) 
    53345345            { 
    53355346                m_TotalCursorTime += this.Selection.Node.Duration; 
    53365347            } 
    5337             else if(this.TransportBar.IsPlayerActive) 
    5338             { 
    5339  
    5340                 if (m_BeginMarkPhraseWhenPlayerIsActive == TransportBar.CurrentPlaylist.CurrentPhrase) 
    5341                 { 
    5342                     double tempTime = TransportBar.CurrentPlaylist.CurrentPhrase.Duration - TransportBar.CurrentPlaylist.CurrentTimeInAsset; 
    5343                     m_TotalCursorTime = m_TotalCursorTime - tempTime; 
    5344                 } 
    5345                 else 
    5346                 { 
    5347                     m_TotalCursorTime += TransportBar.CurrentPlaylist.CurrentTimeInAsset; 
    5348                 } 
    5349                  
    5350             } 
     5348 
    53515349            TransportBar.PlayAudioClue(TransportBar.AudioCluesSelection.SelectionEnd); 
    53525350        } 
     
    53585356           // EmptyNode endNode = Selection.EmptyNodeForSelection; 
    53595357            EmptyNode endNode = mContentView.EndSpecialNode; 
    5360             PhraseNode EndMarkPhraseWhenPlayerIsActive = null; 
    5361             if (TransportBar.IsPlayerActive) 
    5362             { 
    5363                 EndMarkPhraseWhenPlayerIsActive = TransportBar.CurrentPlaylist.CurrentPhrase; 
    5364             } 
     5358 
    53655359            if (startNode == null || endNode == null) return; 
    53665360            bool IsSpecialNodeAdded = false; 
     
    54015395                else if (AssignSpecialNodeDialog.IsTimeElapsedChecked) 
    54025396                { 
    5403                     if (m_BeginMarkPhraseWhenPlayerIsActive != null) 
    5404                     { 
    5405                         startNode = m_BeginMarkPhraseWhenPlayerIsActive; 
    5406                     } 
    5407                     if (EndMarkPhraseWhenPlayerIsActive != null) 
    5408                     { 
    5409                         endNode = EndMarkPhraseWhenPlayerIsActive; 
    5410                     } 
     5397                     
    54115398                    if (m_TotalCursorTime < 0) 
    54125399                    { 
     
    70447031                    { 
    70457032                        phraseNode = (PhraseNode)startNode; 
    7046                         Console.WriteLine("Start Phrase selected is <<<<<<<<<<<<<<<<<<<<< {0}", phraseNode); 
    70477033                    } 
    70487034                    else if(startNode is EmptyNode) 
     
    70667052                    { 
    70677053                        phraseEndNode = (PhraseNode)endNode; 
    7068                         Console.WriteLine("End Phrase selected is <<<<<<<<<<<<<<<<<<<<< {0}", phraseEndNode); 
    70697054                    } 
    70707055                    else if (endNode is EmptyNode) 
Note: See TracChangeset for help on using the changeset viewer.