// sorts in descending order of Score public int CompareTo(object obj) { if (obj is Multistroke) { Multistroke ms = (Multistroke)obj; return(Name.CompareTo(ms.Name)); } else { throw new ArgumentException("object is not a Multistroke"); } }
private Multistroke GetMultiStroke(string name, StrokeCollection strokeCollection) { List <List <PointR> > pointCollection = new List <List <PointR> >(); foreach (var stroke in strokeCollection) { List <PointR> points = new List <PointR>(); foreach (var point in stroke.StylusPoints) { points.Add(new PointR(point.X, point.Y)); } pointCollection.Add(points); } Multistroke mStroke = new Multistroke(name, "test", "test", pointCollection); return(mStroke); }