コード例 #1
0
ファイル: MultilineTextBox.cs プロジェクト: xxy1991/cozy
 /// <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>();
 }
コード例 #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);
        }
コード例 #3
0
ファイル: UniqueNameCreator.cs プロジェクト: xxy1991/cozy
        /// <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;
        }
コード例 #4
0
ファイル: ResourcePool.cs プロジェクト: shangshen/cozy
 /// <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();
 }