Changeset 7428


Ignore:
Timestamp:
12/07/17 17:08:34 (19 months ago)
Author:
rohit_tandon
Message:

When end mark is before begin mark in a phrase then Time Elapse will throw error message.

Location:
trunk/Obi/Obi
Files:
4 edited

Legend:

Unmodified
Added
Removed
  • trunk/Obi/Obi/Dialogs/AssignSpecialNodeMark.cs

    r7427 r7428  
    5757        } 
    5858 
    59         public bool EnableTimeElapsed 
    60         { 
    61             set 
    62             { 
    63                 m_rtb_btn_TimeElapsed.Enabled = value; 
    64             } 
    65         } 
    66  
    6759        private void m_btn_OK_Click(object sender, EventArgs e) 
    6860        { 
  • trunk/Obi/Obi/ProjectView/ProjectView.cs

    r7427 r7428  
    4343        private bool m_SaveZoomWaveformZoomLevel; 
    4444        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. 
    46         private PhraseNode m_EndMarkPhraseWhenPlayerIsActive; // use to get end mark phrase when player is active for time elapsed calculations. 
     45        private PhraseNode m_BeginMarkPhraseWhenPlayerIsActive; // use to get begin mark phrase when player is active for time elapsed calculations.        
    4746                   
    4847     
     
    53075306            mContentView.EndSpecialNode = Selection.EmptyNodeForSelection; //@AssociateNode 
    53085307 
    5309             m_EndMarkPhraseWhenPlayerIsActive = null; 
     5308          
    53105309            if (this.Selection != null && this.Selection is AudioSelection && ((AudioSelection)this.Selection).AudioRange != null && !TransportBar.IsPlayerActive) 
    53115310            { 
     
    53385337            else if(this.TransportBar.IsPlayerActive) 
    53395338            { 
    5340                 m_EndMarkPhraseWhenPlayerIsActive = TransportBar.CurrentPlaylist.CurrentPhrase; 
    5341                 if (m_BeginMarkPhraseWhenPlayerIsActive == m_EndMarkPhraseWhenPlayerIsActive) 
     5339 
     5340                if (m_BeginMarkPhraseWhenPlayerIsActive == TransportBar.CurrentPlaylist.CurrentPhrase) 
    53425341                { 
    53435342                    double tempTime = TransportBar.CurrentPlaylist.CurrentPhrase.Duration - TransportBar.CurrentPlaylist.CurrentTimeInAsset; 
     
    53595358           // EmptyNode endNode = Selection.EmptyNodeForSelection; 
    53605359            EmptyNode endNode = mContentView.EndSpecialNode; 
     5360            PhraseNode EndMarkPhraseWhenPlayerIsActive = null; 
     5361            if (TransportBar.IsPlayerActive) 
     5362            { 
     5363                EndMarkPhraseWhenPlayerIsActive = TransportBar.CurrentPlaylist.CurrentPhrase; 
     5364            } 
    53615365            if (startNode == null || endNode == null) return; 
    53625366            bool IsSpecialNodeAdded = false; 
     
    53865390                    AssignSpecialNodeDialog.EnableSkippableNotes = false;                     
    53875391                } 
    5388                 if (m_TotalCursorTime < 0) 
    5389                 { 
    5390                     AssignSpecialNodeDialog.EnableTimeElapsed = false; 
    5391                 } 
     5392 
    53925393            AssignSpecialNodeDialog.ShowDialog(); 
    53935394            if (AssignSpecialNodeDialog.DialogResult == DialogResult.OK) 
     
    54045405                        startNode = m_BeginMarkPhraseWhenPlayerIsActive; 
    54055406                    } 
    5406                     if (m_EndMarkPhraseWhenPlayerIsActive != null) 
    5407                     { 
    5408                         endNode = m_EndMarkPhraseWhenPlayerIsActive; 
     5407                    if (EndMarkPhraseWhenPlayerIsActive != null) 
     5408                    { 
     5409                        endNode = EndMarkPhraseWhenPlayerIsActive; 
     5410                    } 
     5411                    if (m_TotalCursorTime < 0) 
     5412                    { 
     5413                        MessageBox.Show(Localizer.Message("TimeElapsedCannotBeCalculated"),Localizer.Message("Caption_Error")); 
     5414                        return; 
    54095415                    } 
    54105416                    TimeElasped(startNode, endNode); 
  • trunk/Obi/Obi/messages.Designer.cs

    r7414 r7428  
    72477247         
    72487248        /// <summary> 
     7249        ///   Looks up a localized string similar to Time Elapsed cannot be Calculated as End Mark is before Begin Mark. 
     7250        /// </summary> 
     7251        internal static string TimeElapsedCannotBeCalculated { 
     7252            get { 
     7253                return ResourceManager.GetString("TimeElapsedCannotBeCalculated", resourceCulture); 
     7254            } 
     7255        } 
     7256         
     7257        /// <summary> 
    72497258        ///   Looks up a localized string similar to {0}{1} ({2}) - {3} ({4}). 
    72507259        /// </summary> 
  • trunk/Obi/Obi/messages.resx

    r7414 r7428  
    30073007    <value>You do not have enough sections to import all the files.</value> 
    30083008  </data> 
     3009  <data name="TimeElapsedCannotBeCalculated" xml:space="preserve"> 
     3010    <value>Time Elapsed cannot be Calculated as End Mark is before Begin Mark</value> 
     3011  </data> 
    30093012</root> 
Note: See TracChangeset for help on using the changeset viewer.