Example #1
0
        public void RemoveCoachingPoint(VideoCoachingPoint vcp)
        {
            this.VideoCoachingPoints.Remove(vcp);

            if (System.IO.Directory.Exists(vcp.Path))
            {
                System.IO.Directory.Delete(vcp.Path, true);
            }
        }
Example #2
0
        public VideoCoachingPoint Copy()
        {
            VideoCoachingPoint vcp = new VideoCoachingPoint(VideoPath, Frame, false);

            vcp.Path = Path;

            vcp.Shape = Shape;

            return(vcp);
        }
Example #3
0
        public bool Contains(VideoCoachingPoint vcp)
        {
            foreach (VideoCoachingPoint v in this.VideoCoachingPoints)
            {
                if (v.Equals(vcp))
                {
                    return(true);
                }
            }

            return(false);
        }
Example #4
0
        public override bool Equals(object obj)
        {
            bool bEqual = false;

            VideoCoachingPoint otherVCP = obj as VideoCoachingPoint;

            if (otherVCP != null)
            {
                bEqual = this.Frame == otherVCP.Frame;
            }

            return(bEqual);
        }
Example #5
0
        public VideoCoachingPoint CheckFrame(System.Windows.Point pt)
        {
            VideoCoachingPoint bRet = null;

            foreach (VideoCoachingPoint vcp in this.VideoCoachingPoints)
            {
                if (pt.X > vcp.Shape.Margin.Left && pt.X < vcp.Shape.Margin.Left + vcp.Shape.ActualWidth)
                {
                    bRet = vcp;

                    break;
                }
            }

            return(bRet);
        }
Example #6
0
        public VideoCoachingPoint CheckFrame(int nFrame)
        {
            VideoCoachingPoint bRet = null;

            foreach (VideoCoachingPoint vcp in this.VideoCoachingPoints)
            {
                if (nFrame <= vcp.Frame + 20 && nFrame >= vcp.Frame - 20)
                {
                    bRet = vcp;

                    break;
                }
            }

            return(bRet);
        }
Example #7
0
        public void ReadXML(XElement elem)
        {
            VideoCoachingPoints.Clear();

            if (elem.Name == "VideoCoachingPointInfo")
            {
                foreach (XElement elemVideoCoachingPoint in elem.Elements("VideoCoachingPoint"))
                {
                    VideoCoachingPoint vcp = new VideoCoachingPoint(VideoPath, false);

                    vcp.ReadXML(elemVideoCoachingPoint);

                    this.VideoCoachingPoints.Add(vcp);
                }
            }
        }
Example #8
0
 public void Apply(VideoCoachingPoint vcp)
 {
     this.Frame     = vcp.Frame;
     this.Path      = vcp.Path;
     this.VideoPath = vcp.VideoPath;
 }