Beispiel #1
0
 /// <summary>
 /// Initializes a new instance of the <see cref="MultilineTextBox"/> class.
 /// </summary>
 /// <param name="name">The name.</param>
 public MultilineTextBox(string name) : base(name)
 {
     this.text = "I am still empty";
     this.textLines = new List<string>();
     this.uniqueNameCreator = UniqueNameCreator.CreateInstance();
     this.MyLines = new Collection<Label>();
 }
Beispiel #2
0
        /// <summary>Creates the instance using the singleton pattern.</summary>
        /// <returns>A singleton instance of the unique name creator.</returns>
        public static UniqueNameCreator CreateInstance()
        {
            if (instance == null)
            {
                instance = new UniqueNameCreator();
            }

            return(instance);
        }
Beispiel #3
0
        /// <summary>Creates the instance using the singleton pattern.</summary>
        /// <returns>A singleton instance of the unique name creator.</returns>
        public static UniqueNameCreator CreateInstance()
        {
            if (instance == null)
            {
                instance = new UniqueNameCreator();
            }

            return instance;
        }
Beispiel #4
0
 /// <summary>
 /// Initializes a new instance of the <see cref="ResourcePool{T}"/> class.
 /// </summary>
 protected ResourcePool()
 {
     this.resources         = new Dictionary <string, T>();
     this.uniqueNameCreator = UniqueNameCreator.CreateInstance();
 }