public SecondaryAxis(Tube p1, Tube p2, TubeFinder tubeFinder) : base(p1, p2, tubeFinder)
 {
     if (!TubesArePerpedicualOrHorizontal)
     {
         throw new InvalidOperationException("Can't create secondary axis, given tubes aren't perpedicual or horizontal");
     }
     NotifyOnPropertyChanged();
 }
Пример #2
0
        protected Axis(Tube p1, Tube p2, TubeFinder tubeFinder)
        {
            Point1  = new Point(p1);
            Point2  = new Point(p2);
            _finder = tubeFinder;

            _tube1 = p1;
            _tube2 = p2;
        }
Пример #3
0
        internal static TubeColor Resolve(Tube tube)
        {
            TubeColor resolved = null;

            switch (tube.Status.ToUpperInvariant())
            {
            case "UNKNOWN":
                resolved = new TubeColor(Constants.GRAY_COLOR, Color.Gray);
                break;

            case "PLUGGED":
                resolved = new TubeColor(Constants.BLACK_COLOR, Color.Black);
                break;

            case "CRITICAL":
                resolved = new TubeColor(Constants.RED_COLOR, Color.Red);
                break;
            }

            return(resolved);
        }
Пример #4
0
 public Point(Tube tube)
 {
     X        = tube.Column;
     Y        = tube.Row;
     IsLocked = tube.TubeColor.Name == Constants.RED_COLOR;
 }