コード例 #1
0
        public override bool Equals(object obj)
        {
            if (!base.Equals(obj))
            {
                return(false);
            }
            if (!(obj is PointTextContainer))
            {
                return(false);
            }
            PointTextContainer other = (PointTextContainer)obj;

            if (!this.text.Equals(other.text))
            {
                return(false);
            }
            return(true);
        }
コード例 #2
0
        public override bool ClashesWith(MapElementContainer other)
        {
            if (base.ClashesWith(other))
            {
                return(true);
            }
            if (!(other is PointTextContainer))
            {
                return(false);
            }
            PointTextContainer ptc = (PointTextContainer)other;

            if (this.text.Equals(ptc.text) && this.xy.Distance(ptc.xy) < 200)
            {
                return(true);
            }
            return(false);
        }