예제 #1
0
        /// <summary>
        /// Removes a nest object from its containing list
        /// </summary>
        /// <param name="nestObj"></param>
        /// <returns></returns>
        public static bool Remove(this ISNNestObj nestObj)
        {
            var nestsList = nestObj.OwnerList as ISNNestsList;

            if (nestsList != null)
            {
                return(nestsList.RemoveByName(nestObj.ProgramName));
            }

            return(false);
        }
예제 #2
0
        /// <summary>
        /// Gets the parts list associated with the nest object
        /// </summary>
        /// <param name="nestObj"></param>
        /// <returns></returns>
        public static ISNPartsList PartsList(this ISNNestObj nestObj)
        {
            var task = nestObj.ParentObject as ISNTaskObj;

            if (task != null)
            {
                return(task.PartsList);
            }
            else
            {
                return(null);
            }
        }