Exemple #1
0
 public AlignedAxes GetAlignedAxes(AlignmentDirection alignmentDirection, int position, int span)
 {
     var axes = alignedAxesList.Where(t => t.AlignmentDirection == alignmentDirection
         && t.Position == position && t.Span == span).DefaultIfEmpty(null).First();
     if (axes == null)
     {
         var newAxes = new AlignedAxes()
         {
             Axes = new List<Axis2D>(),
             AlignmentDirection = alignmentDirection,
             Position = position,
             Span = span
         };
         alignedAxesList.Add(newAxes);
         return newAxes;
     }
     else return axes;
 }
Exemple #2
0
        public AlignedAxes GetAlignedAxes(AlignmentDirection alignmentDirection, int position, int span)
        {
            var axes = alignedAxesList.Where(t => t.AlignmentDirection == alignmentDirection &&
                                             t.Position == position && t.Span == span).DefaultIfEmpty(null).First();

            if (axes == null)
            {
                var newAxes = new AlignedAxes()
                {
                    Axes = new List <Axis2D>(),
                    AlignmentDirection = alignmentDirection,
                    Position           = position,
                    Span = span
                };
                alignedAxesList.Add(newAxes);
                return(newAxes);
            }
            else
            {
                return(axes);
            }
        }