public override bool Equals(Object o)
        {
            if (this == o)
            {
                return(true);
            }
            if (o == null || GetType() != o.GetType())
            {
                return(false);
            }

            PolyLine polyLine = (PolyLine)o;

            return(Name == polyLine.Name);
        }
Exemple #2
0
        private void SetUpExample4()
        {
            PolyLine           = new PolyLine("line1");
            AddPolyLineCommand = new ActionCommand(() =>
            {
                _polyLines.Add(PolyLine);
                PolyLine = new PolyLine("line" + rnd.Next());
            });
            RemovePolyLineCommand = new ActionCommand(() => _polyLines.Remove(_polyLine));
            PolyLines             = new ReadOnlyObservableCollection <PolyLine>(_polyLines);

            LinePoint           = new Point(rnd.Next(), rnd.Next());
            AddLinePointCommand = new ActionCommand(() =>
            {
                PolyLine.AddPoint(LinePoint);
                LinePoint = new Point(rnd.Next(), rnd.Next());
            });
            RemovePolyLineCommand = new ActionCommand(() => PolyLine.RemovePoint(LinePoint));
        }