예제 #1
0
        private void AddItem(VideoAnnotationItemCollection scic, StrokeCollection strokes, string id, string text, TimeSpan time, Point pt)
        {
            VideoAnnotationItem sci = new VideoAnnotationItem();

            sci.ID           = id;
            sci.Title        = id;
            sci.Description  = text;
            sci.Strokes      = strokes;
            sci.InkTimeSpan  = time;
            sci.PositionLeft = pt.X;
            sci.PositionTop  = pt.Y;

            scic.Add(sci);
        }
예제 #2
0
        private void RemoveItem(VideoAnnotationItemCollection scic, string id)
        {
            if ((id == null) || (Data == null))
            {
                return;
            }

            VideoAnnotationItem sci = FindVideoAnnotationItem(scic, id);

            if (sci != null)
            {
                scic.Remove(sci);
            }
        }
예제 #3
0
        private VideoAnnotationItem FindVideoAnnotationItemTimeSpan(VideoAnnotationItemCollection scic, TimeSpan time)
        {
            VideoAnnotationItem sciRet = null;

            foreach (VideoAnnotationItem sci in scic)
            {
                if ((int)sci.InkTimeSpan.TotalSeconds == (int)time.TotalSeconds)
                {
                    sciRet = sci;
                    break;
                }
            }

            return(sciRet);
        }
예제 #4
0
        private VideoAnnotationItem FindVideoAnnotationItem(VideoAnnotationItemCollection scic, string id)
        {
            VideoAnnotationItem sciRet = null;

            foreach (VideoAnnotationItem sci in scic)
            {
                if (sci.ID == id)
                {
                    sciRet = sci;
                    break;
                }
            }

            return(sciRet);
        }
 public VideoAnnotationData()
 {
     _VideoAnnotationItems = new VideoAnnotationItemCollection();
 }