Beispiel #1
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);
 }
Beispiel #2
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);
 }
 /// <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);
 }