Пример #1
0
        /// <summary>
        /// 单例方式.
        /// </summary>
        /// <param name="sender"></param>
        /// <param name="e"></param>
        private void singtonToolStripMenuItem_Click(object sender, EventArgs e)
        {
            FormSington newForm = FormSington.GetInstance();

            newForm.MdiParent = this;
            newForm.Show();
        }
Пример #2
0
 /// <summary>
 /// 获取实例.
 /// </summary>
 /// <returns></returns>
 public static FormSington GetInstance()
 {
     if (me == null)
     {
         me = new FormSington();
     }
     return(me);
 }
Пример #3
0
 /// <summary>
 /// 获取实例.
 /// </summary>
 /// <returns></returns>
 public static FormSington GetInstance()
 {
     if (me == null)
     {
         me = new FormSington();
     }
     return me;
 }