Exemplo n.º 1
0
        /// <summary>
        /// Checks if <see cref="PolyLine"/>s are Equal.
        /// </summary>
        /// <param name="obj"><see cref="PolyLine"/> to check with.</param>
        /// <returns>Are <see cref="PolyLine"/>s Equal .</returns>
        public override bool Equals(object obj)
        {
            if (obj is PolyLine)
            {
                bool     isCorrect = true;
                PolyLine pl        = obj as PolyLine;
                isCorrect = pl.Brush == this.Brush;
                for (int i = 0; i < this.Pc.Count() && i < pl.Pc.Count(); i++)
                {
                    isCorrect = this.Pc[i] == pl.Pc[i];
                }

                return(true);
            }
            else
            {
                return(base.Equals(obj));
            }
        }
Exemplo n.º 2
0
        /// <summary>
        /// This function creates and adds <see cref="PolyLine"/> to <see cref="ObservableCollection{PolyLine}"/>.
        /// </summary>
        /// <param name="line"><see cref="Polyline"/> to add.</param>
        public void AddPl(Polyline line)
        {
            PolyLine pl = new PolyLine(line.Points);

            this.Polylines.Add(pl);
        }
Exemplo n.º 3
0
 /// <summary>
 /// This function adding <see cref="PolyLine"/> to <see cref="ObservableCollection{PolyLine}"/>
 /// </summary>
 /// <param name="line"><see cref="PolyLine"/> to add.</param>
 public void AddPl(PolyLine line)
 {
     this.Polylines.Add(line);
 }
Exemplo n.º 4
0
        /// <summary>
        /// Adds <see cref="PolyLine"/> to <see cref="ObservableCollection{PolyLine}"/>
        /// </summary>
        /// <param name="line"><see cref="Polyline"/> to add.</param>
        /// <param name="color"><see cref="Brush"/>(Color) to draw.</param>
        public void AddPl(Polyline line, Brush color)
        {
            PolyLine pl = new PolyLine(line.Points, color);

            this.Polylines.Add(pl);
        }