Exemple #1
0
        /// <summary>
        ///  Returns a cutout of the list from start to end
        /// </summary>
        /// <param> start First Element </param>
        /// <param> end Last Element </param>
        /// <returns> Liste of ListItems from start till end </returns>
        public JList <T> GetValues(int start, int end)
        {
            JList <T> returnValue = new JList <T>();
            int       count       = end - start + 1;

            return(new JList <T>(list.GetRange(start, count)));
        }
Exemple #2
0
 /// <summary>
 /// Fügt eine Liste am Ende der Liste an.
 /// </summary>
 /// <param name="l"></param>
 public void AppendJList(JList <T> l)
 {
     foreach (T item in l.list)
     {
         list.Add(item);
         // Here the 'active' could be set too...
     }
 }
Exemple #3
0
        /// <summary>
        /// Erstellt eine neue Liste und fügt dieser die Daten der List hinzu
        /// </summary>
        /// <returns>Neue Liste</returns>
        public JList <T> Clone()
        {
            List <T> newList = new List <T>();

            T[] array = new T[list.Count];
            list.CopyTo(array);
            newList.AddRange(array);
            JList <T> returnValue = new JList <T>(newList);

            returnValue.active = this.active;
            return(returnValue);
        }