Exemplo n.º 1
0
        private void SetupMarks()
        {
            if (MarkCollections == null || !MarkCollections.Any())
            {
                LipSyncMode = LipSyncMode.Phoneme;
                return;
            }

            if (string.IsNullOrEmpty(MarkCollectionId))
            {
                var dmc = MarkCollections.FirstOrDefault(x => x.CollectionType == MarkCollectionType.Phoneme);
                if (dmc != null && string.IsNullOrEmpty(MarkCollectionId))
                {
                    MarkCollectionId = dmc.Name;
                }
            }


            IMarkCollection mc = MarkCollections.FirstOrDefault(x => x.Id == _data.MarkCollectionId);

            if (mc != null)
            {
                _marks = mc.MarksInclusiveOfTime(StartTime, StartTime + TimeSpan);
            }
            else
            {
                _marks = new List <IMark>();
            }
        }
Exemplo n.º 2
0
        /// <summary>
        /// Method to invoke when the AddCollection command is executed.
        /// </summary>
        private void AddCollection()
        {
            var mc = new MarkCollection();

            if (!MarkCollections.Any())
            {
                mc.IsDefault = true;
            }
            MarkCollections.Add(mc);
        }
Exemplo n.º 3
0
        /// <summary>
        /// Gets the mark collection with the specified Guid.
        /// </summary>
        private IMarkCollection GetMarkCollection(Guid markCollectionGuid)
        {
            IMarkCollection markCollection = null;

            // If the mark collection contains the specified Guid then...
            if (MarkCollections.Any(item => item.Id == markCollectionGuid))
            {
                // Find the specified mark collection
                markCollection = MarkCollections.First(item => item.Id == markCollectionGuid);
            }

            return(markCollection);
        }
Exemplo n.º 4
0
        /// <summary>
        /// Updates the selected mark collection drop down.
        /// This method allows for the associated mark collection to be renamed.
        /// </summary>
        public void UpdateSelectedMarkCollectionName()
        {
            // If the selected mark collection no longer exists then...
            if (MarkCollections != null &&
                !MarkCollections.Any(mc => mc.Id == _markCollectionId))
            {
                // Make the mark collection drop down blank
                MarkCollectionId = new Guid();
            }

            OnPropertyChanged("MarkCollections");
            OnPropertyChanged("MarkCollectionName");
        }
Exemplo n.º 5
0
 /// <summary>
 /// Method to check whether the ToggleMarkBarState command can be executed.
 /// </summary>
 /// <returns><c>true</c> if the command can be executed; otherwise <c>false</c></returns>
 private bool CanToggleMarkBarState()
 {
     return(MarkCollections.Any());
 }
Exemplo n.º 6
0
 /// <summary>
 /// Method to check whether the ExportCollection command can be executed.
 /// </summary>
 /// <returns><c>true</c> if the command can be executed; otherwise <c>false</c></returns>
 private bool CanExportCollection()
 {
     return(MarkCollections.Any());
 }