Пример #1
0
        /// <summary>
        /// Indicates whether this instance and a specified sweepline segment are equal.
        /// </summary>
        /// <param name="another">The sweepline segment to compare with this instance.</param>
        /// <returns><c>true</c> if <paramref name="another" /> and this instance represent the same value; otherwise, <c>false</c>.</returns>
        public Boolean Equals(SweepLineSegment other)
        {
            if (ReferenceEquals(null, other))
            {
                return(false);
            }
            if (ReferenceEquals(this, other))
            {
                return(true);
            }

            return(Edge.Equals(other.Edge) && LeftCoordinate.Equals(other.LeftCoordinate) && RightCoordinate.Equals(other.RightCoordinate));
        }
Пример #2
0
            public override string ToString()
            {
                var sb = new StringBuilder();

                sb.Append("ID: ");
                sb.AppendLine(MonitorId);
                sb.Append("DPI: ");
                sb.AppendLine(Dpi.ToString());

                sb.Append("X: ");
                sb.AppendLine(LeftCoordinate.ToString());
                sb.Append("Y: ");
                sb.AppendLine(TopCoordinate.ToString());

                return(sb.ToString());
            }
Пример #3
0
            public override string ToString()
            {
                var sb = new StringBuilder();

                // using CultureInfo.InvariantCulture since this is internal data
                sb.Append("ID: ");
                sb.AppendLine(MonitorId);
                sb.Append("DPI: ");
                sb.AppendLine(Dpi.ToString(CultureInfo.InvariantCulture));

                sb.Append("X: ");
                sb.AppendLine(LeftCoordinate.ToString(CultureInfo.InvariantCulture));
                sb.Append("Y: ");
                sb.AppendLine(TopCoordinate.ToString(CultureInfo.InvariantCulture));

                return(sb.ToString());
            }
Пример #4
0
            public override string ToString()
            {
                var sb = new StringBuilder();

                // using CultureInfo.InvariantCulture since this is internal data
                sb.Append("Monitor: ");
                sb.AppendLine(Monitor);
                sb.Append("Virtual desktop: ");
                sb.AppendLine(VirtualDesktop);
                sb.Append("DPI: ");
                sb.AppendLine(Dpi.ToString(CultureInfo.InvariantCulture));

                sb.Append("X: ");
                sb.AppendLine(LeftCoordinate.ToString(CultureInfo.InvariantCulture));
                sb.Append("Y: ");
                sb.AppendLine(TopCoordinate.ToString(CultureInfo.InvariantCulture));

                sb.Append("Width: ");
                sb.AppendLine(MonitorWidth.ToString(CultureInfo.InvariantCulture));
                sb.Append("Height: ");
                sb.AppendLine(MonitorHeight.ToString(CultureInfo.InvariantCulture));

                return(sb.ToString());
            }
Пример #5
0
 /// <summary>
 /// Serves as a hash function for a particular type.
 /// </summary>
 /// <returns>A hash code for this instance.</returns>
 public override Int32 GetHashCode()
 {
     return(Edge.GetHashCode() >> 4 ^ LeftCoordinate.GetHashCode() >> 2 ^ RightCoordinate.GetHashCode());
 }