Пример #1
0
 /// <summary>
 /// Adds a straight linear segment to the weld segment collection.
 /// </summary>
 /// <param name="l1"></param>
 public void AddLine(FilletWeldLine l1)
 {
     if (lines == null)
     {
         lines = new List <FilletWeldLine>();
     }
     if (lines.Contains(l1))
     {
         throw new DuplicateWeldLineException();
     }
     else
     {
         lines.Add(l1);
     }
 }
Пример #2
0
        public override bool Equals(object obj)
        {
            // If parameter is null return false.
            if (obj == null)
            {
                return(false);
            }

            // If parameter cannot be cast to Point return false.
            FilletWeldLine line = obj as FilletWeldLine;

            if ((System.Object)line == null)
            {
                return(false);
            }

            // Return true if the fields match:
            return((NodeI == line.NodeI) && (NodeJ == line.NodeJ));
        }