コード例 #1
0
        /// <summary>
        /// Counts the number of references to this document by all TimelineDocuments</summary>
        /// <param name="document">Document</param>
        /// <returns>Number references to document</returns>
        private int NumReferences(ITimelineDocument document)
        {
            int count = 0;

            foreach (IDocument topDoc in m_documentRegistry.Documents)
            {
                ITimelineDocument topTimelineDoc = topDoc as ITimelineDocument;
                if (topTimelineDoc != null)
                {
                    if (document == topTimelineDoc)
                    {
                        count++;
                    }

                    foreach (TimelinePath path in D2dTimelineControl.GetHierarchy(topTimelineDoc.Timeline))
                    {
                        IHierarchicalTimeline target = ((ITimelineReference)path.Last).Target;
                        if (document == target.As <ITimelineDocument>())
                        {
                            count++;
                        }
                    }
                }
            }
            return(count);
        }
コード例 #2
0
ファイル: TimelineEditor.cs プロジェクト: GeertVL/ATF
        /// <summary>
        /// Counts the number of references to this document by all TimelineDocuments</summary>
        /// <param name="document">Document</param>
        /// <returns>Number references to document</returns>
        private int NumReferences(ITimelineDocument document)
        {
            int count = 0;
            foreach (IDocument topDoc in m_documentRegistry.Documents)
            {
                ITimelineDocument topTimelineDoc = topDoc as ITimelineDocument;
                if (topTimelineDoc != null)
                {
                    if (document == topTimelineDoc)
                        count++;

                    foreach (TimelinePath path in D2dTimelineControl.GetHierarchy(topTimelineDoc.Timeline))
                    {
                        IHierarchicalTimeline target = ((ITimelineReference)path.Last).Target;
                        if (document == target.As<ITimelineDocument>())
                            count++;
                    }
                }
            }
            return count;
        }
コード例 #3
0
 //public _TimelineControl(ITimelineDocument timelineDocument) : base(timelineDocument)
 //{
 //}
 //public _TimelineControl(ITimelineDocument timelineDocument, D2dTimelineRenderer timelineRenderer) : base(timelineDocument, timelineRenderer)
 //{
 //}
 //public _TimelineControl(ITimelineDocument timelineDocument, D2dTimelineRenderer timelineRenderer, Sce.Atf.Controls.Timelines.TimelineConstraints timelineConstraints) : base(timelineDocument, timelineRenderer, timelineConstraints)
 //{
 //}
 public _TimelineControl(ITimelineDocument timelineDocument, D2dTimelineRenderer timelineRenderer, Sce.Atf.Controls.Timelines.TimelineConstraints timelineConstraints, bool createDefaultManipulators) : base(timelineDocument, timelineRenderer, timelineConstraints, createDefaultManipulators)
 {
 }