예제 #1
0
        /// <summary>
        /// Returns true if any range in list contians the provided range.
        /// </summary>
        public static bool ContainsRange(this List <DekRangeDouble> me, DekRangeDouble range)
        {
            foreach (DekRangeDouble r in me)
            {
                if (r.Contains(range))
                {
                    return(true);
                }
            }

            return(false);
        }
예제 #2
0
        public static void LoadFromText(this List <DekRangeDouble> me, string text)
        {
            me = new List <DekRangeDouble>();
            if (string.IsNullOrWhiteSpace(text))
            {
                return;
            }

            string[] asdjh = text.Split(';');
            foreach (string s in asdjh)
            {
                string[]       ns = s.Split(',');
                DekRangeDouble tr = new DekRangeDouble(int.Parse(ns[0]), int.Parse(ns[1]));
                me.Add(tr);
            }
        }
예제 #3
0
 public static List <DekRangeDouble> AddAndMerge(this List <DekRangeDouble> me, DekRangeDouble range)
 {
     return(DekRangeDouble.AddAndMerge(me, range));
 }