/// <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); }
/// <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; }
//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) { }