/// <summary>
        /// Adds a layer to the collection
        /// </summary>
        /// <param name="layer"></param>
        /// <returns></returns>
        public int Add(GraphLayer layer)
        {
            int index = this.InnerList.Add(layer);

            layer.SetNumber(index);
            return(index);
        }
        /// <summary>
        /// Adds a layer to the collection
        /// </summary>
        /// <param name="layer"></param>
        /// <returns></returns>
        public int Add(GraphLayer layer)
        {
            for (int i = 0; i < InnerList.Count; i++)
            {
                if (layer == InnerList[i])
                {
                    return(i);
                }
            }

            int index = this.InnerList.Add(layer);

            layer.SetNumber(index);
            return(index);
        }