Пример #1
0
 /// <summary>
 /// Checks if the pipeline where the mouse click has been made is not connected(null).
 /// </summary>
 /// <param name="location">The location of the mouse click.</param>
 /// <returns>True if the pipeline is null.Otherwise false.</returns>
 public override bool IsLocationEmpty(Point location)
 {
     if (UpperHalf.Contains(location))
     {
         return(this.UpperIncomePipeline == null);
     }
     else if (LowerHalf.Contains(location))
     {
         return(this.LowerIncomePipeline == null);
     }
     else if (OutcomeHalf.Contains(location))
     {
         return(this.OutcomePipeline == null);
     }
     return(false);
 }
Пример #2
0
 /// <summary>
 /// Gets a concrete point that is used for connecting pipelines based on where the mouse click has been made.
 /// </summary>
 /// <param name="location">The location of the mouse click.</param>
 /// <returns>A concrete prefixed point.</returns>
 public override Point?GetPipelineLocation(Point mouseClick)
 {
     if (UpperHalf.Contains(mouseClick))
     {
         return(upperHalfPoint);
     }
     else if (LowerHalf.Contains(mouseClick))
     {
         return(lowerHalfPoint);
     }
     else if (OutcomeHalf.Contains(mouseClick))
     {
         return(outcomingHalfPoint);
     }
     return(null);
 }
 /// <summary>
 /// Gets a concrete point that is used for connecting pipelines based on where the mouse click has been made.
 /// </summary>
 /// <param name="location">The location of the mouse click.</param>
 /// <returns>A concrete prefixed point.</returns>
 public override Point?GetPipelineLocation(Point location)
 {
     if (UpperHalf.Contains(location))
     {
         return(upperHalfPoint);
     }
     else if (LowerHalf.Contains(location))
     {
         return(lowerHalfPoint);
     }
     else if (IncomeHalf.Contains(location))
     {
         return(incomeHalfPoint);
     }
     return(null);
 }
Пример #4
0
 /// <summary>
 /// Returns the hash code for this instance.
 /// </summary>
 /// <returns>The hash code for this instance.</returns>
 public override Int32 GetHashCode()
 {
     return(HigherHalf.GetHashCode() ^ LowerHalf.GetHashCode());
 }
Пример #5
0
        public Int32 CompareTo(Value128 other)
        {
            var difference = HigherHalf.CompareTo(other.HigherHalf);

            return(difference == 0 ? LowerHalf.CompareTo(other.LowerHalf) : difference);
        }