public void RemoveCoachingPoint(VideoCoachingPoint vcp) { this.VideoCoachingPoints.Remove(vcp); if (System.IO.Directory.Exists(vcp.Path)) { System.IO.Directory.Delete(vcp.Path, true); } }
public VideoCoachingPoint Copy() { VideoCoachingPoint vcp = new VideoCoachingPoint(VideoPath, Frame, false); vcp.Path = Path; vcp.Shape = Shape; return(vcp); }
public bool Contains(VideoCoachingPoint vcp) { foreach (VideoCoachingPoint v in this.VideoCoachingPoints) { if (v.Equals(vcp)) { return(true); } } return(false); }
public override bool Equals(object obj) { bool bEqual = false; VideoCoachingPoint otherVCP = obj as VideoCoachingPoint; if (otherVCP != null) { bEqual = this.Frame == otherVCP.Frame; } return(bEqual); }
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); }
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); }
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); } } }
public void Apply(VideoCoachingPoint vcp) { this.Frame = vcp.Frame; this.Path = vcp.Path; this.VideoPath = vcp.VideoPath; }